Forums / Addon Sideboxes / Blank Sidebox as Linked Graphic Only

Blank Sidebox as Linked Graphic Only

Started by charagg on 10 Dec 2008, 7:16 PM · Views: 7,412

Results 21 to 38 of 38
15 Jan 2009, 9:28 AM
#21
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Blank Sidebox as Linked Graphic Only

Yep, each sidebox now has only one .xsnazzyCushion div wrapping it.

For the live help sidebox, repeat the set of rules above, changing #logosidebox10reasons to #livehelp.
Add
#livehelpHeading {display: none;}

15 Jan 2009, 7:36 PM
#22
charagg avatar

charagg

New Zenner

Join Date:
Dec 2008
Posts:
45
Plugin Contributions:
0

Re: Blank Sidebox as Linked Graphic Only

Works great - thanks!

BenchmarkDesign.Net - Integrated Media Solutions

1 Mar 2009, 12:07 AM
#23
charagg avatar

charagg

New Zenner

Join Date:
Dec 2008
Posts:
45
Plugin Contributions:
0

Re: Blank Sidebox as Linked Graphic Only

I was wondering if you could help me figure this one out. I've gone one Logo Sidebox that I don't want to show up on the home page, as well as, several other ezpages. The code to hide on the ezpages is fine and listed below, I'm just not sure how to hide on the home page too. Any help would be greatly appreciated! Thanks!

Code:

<?php
//
//Contribution: Logo Sidebox
//Author: Clyde Jones (http://mysticmountainnaturals.com/testsite)
//Version:  1.1
//Updated: 8/21/2008
//License: under the GPL - See attached License for info.
//Based on: Blank Sidebox by Judi Cox - www.MommaMuse.com
//Support:  Only given via the forums, please. (http://www.zen-cart.com/forum/showthread.php?t=57694)
//  --------------------------------------------------
//  zen-cart Open Source E-commerce                                      
//  Copyright (c) 2003-2006 The zen-cart developers                           
//  http://www.zen-cart.com/index.php                                    
//  Portions Copyright (c) 2003 osCommerce                               
//  --------------------------------------------------
// $Id: logo_sidebox.php,v 1.1 8/21/2008

// test if box should display
  $show_logo_sidebox = true;

 if (!isset($ezpage_id) || !in_array($ezpage_id,explode(",",'20,21,5,32,33,26,35,18,36,37,38,39,40,41,42,43,44,45,46,48'))) {
      require($template->get_template_dir('tpl_logo_sidebox_affiliate.php',DIR_WS_TEMPLATE, $current_page_base,'sideboxes'). '/tpl_logo_sidebox_affiliate.php');
      $title =  BOX_HEADING_LOGO_SIDEBOX;
      $left_corner = false;
      $right_corner = false;
      $right_arrow = false;
      require($template->get_template_dir($column_box_default, DIR_WS_TEMPLATE, $current_page_base,'common') . '/' . $column_box_default);
 }
?>

BenchmarkDesign.Net - Integrated Media Solutions

1 Mar 2009, 12:28 AM
#24
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Blank Sidebox as Linked Graphic Only

Add the test for home page to the rest:```php
// test if box should display
$show_logo_sidebox = true;

if (!$this_is_home_page and (!isset($ezpage_id) || !in_array($ezpage_id,explode(",",'20,21,5,32,33,26,35,18,36,37,38,39,40,41,42,43,44,45,46,48')))) {
require($template->get_template_dir('tpl_logo_sidebox_affiliate.php',DIR_WS_TEMPLATE, $current_page_base,'sideboxes'). '/tpl_logo_sidebox_affiliate.php');
$title = BOX_HEADING_LOGO_SIDEBOX;
$left_corner = false;
$right_corner = false;
$right_arrow = false;
require($template->get_template_dir($column_box_default, DIR_WS_TEMPLATE, $current_page_base,'common') . '/' . $column_box_default);
}
?>

2 Mar 2009, 9:16 AM
#25
charagg avatar

charagg

New Zenner

Join Date:
Dec 2008
Posts:
45
Plugin Contributions:
0

Re: Blank Sidebox as Linked Graphic Only

works pefectly! Thanks!

BenchmarkDesign.Net - Integrated Media Solutions

6 Mar 2009, 7:01 PM
#26
rilken27 avatar

rilken27

New Zenner

Join Date:
Mar 2009
Posts:
43
Plugin Contributions:
0

Re: Blank Sidebox as Linked Graphic Only

How can I create a rollover effect with this image within the logo sidebox?

6 Mar 2009, 7:10 PM
#27
rilken27 avatar

rilken27

New Zenner

Join Date:
Mar 2009
Posts:
43
Plugin Contributions:
0

Re: Blank Sidebox as Linked Graphic Only

Also, my hyperlink isn't working for this image...is there something wrong with this code?

define('LOGO_SIDEBOX_LINK', 'http://www.zitabkids.com/');

7 Mar 2009, 1:26 PM
#28
rilken27 avatar

rilken27

New Zenner

Join Date:
Mar 2009
Posts:
43
Plugin Contributions:
0

Re: Blank Sidebox as Linked Graphic Only

Just wanting to follow up to see if anyone knows how I can make my logo sidebox image work as a rollover. Also, my hyperlink isn't working for this image...is there something wrong with this code?

define('LOGO_SIDEBOX_LINK', 'http://www.zitabkids.com/');

Thank you in advance for your help! This forum has been great!

7 Mar 2009, 7:48 PM
#29
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Blank Sidebox as Linked Graphic Only

How do you want the image to change on rollover? You might need to use some javascript; otherwise, you would use a pair of background-images in your stylesheet in place of the coded foreground image you have now.

The define is properly formed, but we can't tell whether it includes everything it needs without seeing the code that calls it.

9 Mar 2009, 2:34 PM
#30
rilken27 avatar

rilken27

New Zenner

Join Date:
Mar 2009
Posts:
43
Plugin Contributions:
0

Re: Blank Sidebox as Linked Graphic Only

I would like the buttons to look just like they do on http://www.zitabkids.com

you would use a pair of background-images in your stylesheet in place of the coded foreground image you have now.

I'm not sure what that means by using a pair of background images. ????

9 Mar 2009, 3:09 PM
#31
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Blank Sidebox as Linked Graphic Only

In your stylesheet, make a pair of rules for the particular link, like this:

#products a {
    display: block;
    height: 33px;
    width: 142px;
    background: url(../images/productbutton.gif);
    }

#products a:hover {
    background: url(../images/productbuttonhover.gif);
    }
```Adjust to taste.
Replace the #products with whatever the identifying tag is.
12 May 2011, 7:20 AM
#32
willie_bee avatar

willie_bee

Zen Follower

Join Date:
Mar 2011
Posts:
386
Plugin Contributions:
0

Re: Blank Sidebox as Linked Graphic Only

Hey. I installed this and created three separate individual side boxes. I read the posts here but I think my question is different.

Basically I want to use an image as a link. When you click on the link the middle page changes. One example is we have a page listing REBATES. So when you click on that side box the rebates page loads.

Now I created a page in EZ Pages with HTML content and called it REBATES.

My question is how do I link that page to the side box?

don't mess with willie bee. i may go crazy on you.

12 May 2011, 5:29 PM
#33
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Blank Sidebox as Linked Graphic Only

Use the link option in the tpl_ file as described in its comments. Then define the link destination in the define file, like this

//this is optional if you want to use the logo as a link
//replace your_link.com with the link you choose
define('LOGO_SIDEBOX_LINK', 'index.php?main_page=page&id=23');

Change 23 to your ez-page id.

13 May 2011, 1:40 AM
#34
willie_bee avatar

willie_bee

Zen Follower

Join Date:
Mar 2011
Posts:
386
Plugin Contributions:
0

Re: Blank Sidebox as Linked Graphic Only

gjh42:

Use the link option in the tpl_ file as described in its comments. Then define the link destination in the define file, like this

//this is optional if you want to use the logo as a link
//replace your_link.com with the link you choose
define('LOGO_SIDEBOX_LINK', 'index.php?main_page=page&id=23');

Change 23 to your ez-page id.

Thank you

don't mess with willie bee. i may go crazy on you.

13 May 2011, 5:12 AM
#35
willie_bee avatar

willie_bee

Zen Follower

Join Date:
Mar 2011
Posts:
386
Plugin Contributions:
0

Re: Blank Sidebox as Linked Graphic Only

willie bee:

Thank you

Ok talk to me like I'm a 3rd grader. I'm good at steps.

I created an EZ-Page in the admin. The ID is 32.

For the options I turned off Header, Sidebox, Footer and Chapter.

I put my HTML in.

in blank_sidebox_defines.php I need to ADD

define('LOGO_SIDEBOX_LINK', 'index.php?main_page=page&id=32');

WTH do I go next? I'm assuming I no longer have to worry about the templates file since I am not using that but am using an EZ-Page.

What do I do with the /modules/blank_sidebox.php?

My image is located in /images/rebate.jpg

Thanks for dealing with this headache.

don't mess with willie bee. i may go crazy on you.

13 May 2011, 5:43 AM
#36
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Blank Sidebox as Linked Graphic Only

You are using all of the sidebox template files. They are just to display the link that points to the ez-page.
There is nothing you need to change with /includes/modules/sideboxes/blank_sidebox.php - the file just needs to be in the right place.
You have to comment/uncomment statements in /includes/templates/your_template/sideboxes/tpl_blank_sidebox.php as the directions in that file say.
Have you filled in all of the defines in blank_sidebox_defines.php?

13 May 2011, 7:08 PM
#37
willie_bee avatar

willie_bee

Zen Follower

Join Date:
Mar 2011
Posts:
386
Plugin Contributions:
0

Re: Blank Sidebox as Linked Graphic Only

This is what I have in the defines file

<?php define('BOX_HEADING_PayPal_Extras_MasterCard', 'PayPal Extras MasterCard'); define('TEXT_PayPal_Extras_MasterCard', 'Replace this text with your HTML content.'); ?>

This is what I have in the modules file

<?php // test if box should display $show_PayPal_Extras_MasterCard = true; if ($show_PayPal_Extras_MasterCard == true) { require($template->get_template_dir('tpl_PayPal_Extras_MasterCard.php',DIR_WS_TEMPLATE, $current_page_base,'sideboxes'). '/tpl_PayPal_Extras_MasterCard.php'); $title = BOX_HEADING_PayPal_Extras_MasterCard; $title_link = false; require($template->get_template_dir($column_box_default, DIR_WS_TEMPLATE, $current_page_base,'common') . '/' . $column_box_default); } ?>

This is what I have in the template file.

<?php $content = ''; $content .= '<div id="' . str_replace('_', '-', $box_id . 'Content') . '" class="sideBoxContent">'; // Replace the text and HTML tags between the apostophes on lines 19 and 20. // Use as many or as few lines using this model as you need for your custom content. // If you have a multilingual site define your text in the languages/YOUR_LANGUAGE/extra_definitions/blank_sidebox_defines.php and include it as shown in line 19. // If your site is monolingual, you can put the text right here as shown on line 20 (and nobody will know!) $content .= '<p>' . TEXT_PayPal_Extras_MasterCard . '</p>'; $content .= '<p>You can include text, links, images, HTML markup and even PHP code</p>'; $content .= '</div>'; ?>

My logo image I want in the side box is /images/PayPal.jpg

The EZ Page I created has an ID of 32.

This is where I get lost to put the image in the side box and to link the EZ Page. But at least I'm 10% there. :clap:

don't mess with willie bee. i may go crazy on you.

13 May 2011, 10:24 PM
#38
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Blank Sidebox as Linked Graphic Only

Nearly all of this thread (starting at post #4) has actually been about using the Logo Sidebox mod, as it is directly tailored to the task in question. The blank sidebox does not have the code built in to handle the links and images, though you could add it. The easiest route would be to get the Logo Sidebox mod and proceed from there with the directions given in this thread.