-
Blank Sidebox as Linked Graphic Only
Hi, I've installed the Blank Sidebox Mod v2.0 and would like to make certain sideboxes as linked graphics only and the others as standard sideboxes. I've search the forums on how how to make these changes and can't seem to find an answer.
I've hard coded some of the graphics I wanted on the sidebar into the main page template. However, this makes the graphics show up on every page. You can see what I mean on my site at: http://www.benchmarkdesign.net/index.php
From what I've read, if set these graphics up as sideboxes, then I can control the pages on which the sideboxes are to appear either via template or css.
Can anyone offer me some instructions on how to modify the Blank Sidebox files to display linked graphics?
Please forgive me if I've posted this question in the wrong place or if there is already an answer out there. I couldn't find it. So, if there is, please provide a link.
Thanks!
Ara
-
Re: Blank Sidebox as Linked Graphic Only
If I understand the question, you can insert graphics as links into the Blank Sidebox using standard HTML (<a href ...).
-
Re: Blank Sidebox as Linked Graphic Only
Yes. However, it there's a better way to accomplish this, I'm open to suggestions. Take a look at the sidebar graphics I have on my site. When you click them, you're taken to a specific page (ie. Learn How Our System Works). Rather than hard code these into the template, I'd rather place set each grahical link into a sidebox so that I can control on which pages the graphic shows up.
-
Re: Blank Sidebox as Linked Graphic Only
-
Re: Blank Sidebox as Linked Graphic Only
Whether sideboxes or just hardcoded links, the process of controlling the pages where they display is similar.
You can use a page test wrapping the code for processing the output, such as
if ($current_page_base != 'pagename') {
code to be hidden on pagename;
}
Or you can hide the output of an element which has a class/id tag for a certain page by prefixing #pagenameBody to the rule in the stylesheet:
#pagenameBody .linkGraphic1 {
display: none;
}
-
Re: Blank Sidebox as Linked Graphic Only
Can I have multiple logo sideboxes? This is the reason why I chose the Blank Sidebox module, as I can create multiple instances.
Regarding gjh42's comments, so if my code in the template file is:
Code:
<a href="index.php?main_page=page&id=20"><img src="/images/imagename.png" alt="Image Description" width="200" height="50" hspace="5" vspace="5" border="0"></a>
and I don't want the image to appear on the page visited (since they're already there), what do I do?
-
Re: Blank Sidebox as Linked Graphic Only
Quote:
Originally Posted by
charagg
Can I have multiple logo sideboxes? This is the reason why I chose the Blank Sidebox module, as I can create multiple instances.
Regarding gjh42's comments, so if my code in the template file is:
Code:
<a href="index.php?main_page=page&id=20"><img src="/images/imagename.png" alt="Image Description" width="200" height="50" hspace="5" vspace="5" border="0"></a>
and I don't want the image to appear on the page visited (since they're already there), what do I do?
Yes, You can have multiple logo sideboxes.
or
you can use just one logo sidebox and have multiple images that show up only on pages you wish.
The last option would be controlled by the technique indicated by gjh42 in his post above.
-
Re: Blank Sidebox as Linked Graphic Only
main_page=page&id=20
If you want to control display on specific ez-pages, you might do best to install the Smart Backgrounds mod. It will give a page body class that indicates the current ez-page (among other features); you can then use this class as a prefix for a rule in your stylesheet to set display: none; on that graphic on that ez-page. Something like
.smartBG_p20 .linkGraphic1 {display: none;}
You would need to make a dummy image file named according to the specific ez-page in order to get the class tag. Alternatively, the Smart BG code could be tweaked to ignore image file checking and just set the class tag in all cases.
Another option, if you want to control this in the PHP code, is to use a test like
PHP Code:
if ($current_page_base != 'page' or $_GET['id'] != 20) {
<a href="index.php?main_page=page&id=20"><img src="/images/imagename.png" alt="Image Description" width="200" height="50" hspace="5" vspace="5" border="0"></a>
}
-
Re: Blank Sidebox as Linked Graphic Only
Thanks for the help - I will have to try some of these options and revisit this forum. gjh42's instructions are a little technical, but will most likely make more sense to me when I start working on this. Have to go... may not be able to revisit this until this weekend. Hopefully... sooner. Thanks again for all the advise. I'll give it a try and post my results here.:smile:
-
Re: Blank Sidebox as Linked Graphic Only
OK my friends... I'm back. So, I ended up installing the Logo Sidebox add-on and created an instance of this add-on for each graphic. So, how do I control the pages on which these are to appear. For instance, I don't want the same graphic on the page to which it is linked. Most are linked to EZpages, but I may want one on a cart page or contact us page, or privacy page, etc. I didn't quite understand the suggestions by gjh42... any suggestions?
-
Re: Blank Sidebox as Linked Graphic Only
The code snippet in post 8 is not a suggestion to be interpreted, it is exactly the code you need to use to hide that link on ez-page 20. You can also adapt it very simply by changing 'page' to whatever page name you want (this is the "main_page=xxx" in the address bar at the top of the window) and eliminating the "or ..." part.
PHP Code:
if ($current_page_base != 'what_ever') {
<a href="index.php?main_page=what_ever"><img src="/images/imagename.png" alt="Image Description" width="200" height="50" hspace="5" vspace="5" border="0"></a>
}
There are other methods to achieve the same result, too.
-
Re: Blank Sidebox as Linked Graphic Only
thanks! It worked like a charm!
Posted via Mobile Device
-
Re: Blank Sidebox as Linked Graphic Only
Good mornign Glen,
You were a huge help last night on the Smart Backgrounds (post thread: http://www.zen-cart.com/forum/showth...=83034&page=24)
I still need help with this one. I actually had not setup the Smart Backgrounds Add-On when I was working on this. I setup my graphics each as logo sideboxes. Unfortunately, they seem to be showing up with the default sidebox style - you can see this for the three graphics under the search box on the right at my site.
I inserted your code from the Smart Backgrounds add-on (oops just realized I forgot to make the EZpages sytax correction you figured out last night) in to the right column on tpl_main_page as follows:
Code:
/**
* prepares and displays right column sideboxes
*
*/
?>
<div id="navColumnTwoWrapper" style="width: <?php echo BOX_WIDTH_RIGHT; ?>">
<!--Smart Backgrounds - Sidebox Graphics -->
<?php $smart_image = '';
if ($current_page_base == 'index' or $current_page_base == 'product_info') { //add _ and cPath to filename only if individual cat image exists, else add _ and top cat id to bg filename only if top cat image exists
$smart_image = file_exists(DIR_WS_TEMPLATE_IMAGES . 'smartbg_' . $_GET[cPath] . '.gif')?'_' . $_GET[cPath]:file_exists(DIR_WS_TEMPLATE_IMAGES . 'smartbg_' . (int)$_GET[cPath] . '.gif')?'_' . (int)$_GET[cPath]:'';
} elseif ($current_page_base == 'page') { //add _page and ez-page id to filename only if ez-page id image exists, else add _page to filename only if general ez-page image exists
$smart_image = file_exists(DIR_WS_TEMPLATE_IMAGES . 'smartbg_page' . $_GET[id] . '.gif')?'_page' . $_GET[id]:file_exists(DIR_WS_TEMPLATE_IMAGES . 'smartbg_page.gif')?'_page':'';
} else { //add _ and page base to filename only if page image exists
$smart_image = file_exists(DIR_WS_TEMPLATE_IMAGES . 'smartbg_' . $current_page_base . '.gif')?'_' . $current_page_base:''; //default/home page class will be just .smartBG, and filename smartbg.gif
}?>
<div id/class="whatever"><?php echo zen_image(DIR_WS_TEMPLATE_IMAGES . 'smartbg' . $smart_image . '.gif', '');?></div>
<!--/Smart Backgrounds - Sidebox Graphics -->
<?php require(DIR_WS_MODULES . zen_get_module_directory('column_right.php')); ?></div>
I then duplicated my we_accept.gif graphic and renamed as smartbg.gif and uploaded. It works just the way I want. Except that it shows up the Search Box rather than below. I think I'd have to move this code to another file rather than the tpl_main_page to do this, but I'm not sure. Maybe you can suggest this as well.
So how do I make the other three show up now? I want the remaining three to link to specific pages and not show up on their respectively linked pages, and possibly other pages (ie. Our Company, Careers, etc.)
Please help, as I still haven't fully grasped the way this add-on works, but am liking the results, especially after the way it works for the header backgrounds.
Thanks,
Ara
-
Re: Blank Sidebox as Linked Graphic Only
I don't think the Smart BG code is really the best way to handle this case. You want the "we accept" image all the time, right? Just inserting the <img> code in the location you show will (should) put that image at the top of the column, above the sideboxes. If you want just one of the "logo" boxes to show depending on the page, the easiest way would be to have one logo sidebox with all the images in it, and the if() test modified and extended to display the one desired for each page.
-
Re: Blank Sidebox as Linked Graphic Only
Thanks for the reply. Actually, I don't want the we_accept.gif on the non-cart pages, such as Careers, Our Company, etc. How would I go about modifying the Logo Sidebox to make the changes necessary? Could you show me an example?
-
Re: Blank Sidebox as Linked Graphic Only
I don't have any examples laying around. If you post your logo_sidebox.php file (in [php] and [/php] tags), I will make an example for you.
Include the code for the different images, and a list of which pages you do or don't want each of them on.
-
Re: Blank Sidebox as Linked Graphic Only
Sorry for the delay. Took the family to play in the snow today. Actually, the solution may be even simpler if you could tell me how I could keep the Snazzy Rounded corners add-on for my main sideboxes and remove any styling from the Logo Sideboxes.
The Logo Sideboxes files I have so far as as follows:
For the includes/templates/myfolder/sideboxes, I have:
For the we_accept.gif (file: tpl_logo_sidebox.php)
PHP Code:
// $Id: tpl_logo_sidebox.php,v 1.1 8/21/2008
// --------------------------------------------------
//
// Link Option - uncomment this if you intend to use the logo as a link
//$logoimage = '<a href="' . LOGO_SIDEBOX_LINK . '">' . zen_image($template->get_template_dir(LOGO_SIDEBOX_IMAGE, DIR_WS_TEMPLATE, $current_page_base,'images'). '/' . LOGO_SIDEBOX_IMAGE, LOGO_SIDEBOX_IMAGE_TEXT, LOGO_SIDEBOX_IMAGE_WIDTH, LOGO_SIDEBOX_IMAGE_HEIGHT) . '</a>';
//comment this out if you use the above link option.
$logoimage = zen_image($template->get_template_dir(LOGO_SIDEBOX_IMAGE, DIR_WS_TEMPLATE, $current_page_base,'images'). '/' . LOGO_SIDEBOX_IMAGE, LOGO_SIDEBOX_IMAGE_TEXT, LOGO_SIDEBOX_IMAGE_WIDTH, LOGO_SIDEBOX_IMAGE_HEIGHT);
$content = '';
$content .= '<div id="' . str_replace('_', '-', $box_id . 'Content') . '" class="sideBoxContent">';
$content .= $logoimage;
$content .= '</div>';
?>
For the 10_reasons.gif (file: tpl_logo_sidebox_10reasons.php)
PHP Code:
// $Id: tpl_logo_sidebox.php,v 1.1 8/21/2008
// --------------------------------------------------
//
// Link Option - uncomment this if you intend to use the logo as a link
$logoimage10reasons = '<a href="' . LOGO_SIDEBOX10REASONS_LINK . '">' . zen_image($template->get_template_dir(LOGO_SIDEBOX10REASONS_IMAGE, DIR_WS_TEMPLATE, $current_page_base,'images'). '/' . LOGO_SIDEBOX10REASONS_IMAGE, LOGO_SIDEBOX10REASONS_IMAGE_TEXT, LOGO_SIDEBOX10REASONS_IMAGE_WIDTH, LOGO_SIDEBOX10REASONS_IMAGE_HEIGHT) . '</a>';
//comment this out if you use the above link option.
//$logoimage10reasons = zen_image($template->get_template_dir(LOGO_SIDEBOX10REASONS_IMAGE, DIR_WS_TEMPLATE, $current_page_base,'images'). '/' . LOGO_SIDEBOX10REASONS_IMAGE, LOGO_SIDEBOX10REASONS_IMAGE_TEXT, LOGO_SIDEBOX10REASONS_IMAGE_WIDTH, LOGO_SIDEBOX10REASONS_IMAGE_HEIGHT);
$content = '';
$content .= '<div id="' . str_replace('_', '-', $box_id . 'Content') . '" class="sideBoxContent">';
$content .= $logoimage10reasons;
$content .= '</div>';
?>
For the how_it_works.gif (file: tpl_logo_sidebox_oursystem.php)
PHP Code:
// $Id: tpl_logo_sidebox.php,v 1.1 8/21/2008
// --------------------------------------------------
//
// Link Option - uncomment this if you intend to use the logo as a link
$logoimageoursystem = '<a href="' . LOGO_SIDEBOXOURSYSTEM_LINK . '">' . zen_image($template->get_template_dir(LOGO_SIDEBOXOURSYSTEM_IMAGE, DIR_WS_TEMPLATE, $current_page_base,'images'). '/' . LOGO_SIDEBOXOURSYSTEM_IMAGE, LOGO_SIDEBOXOURSYSTEM_IMAGE_TEXT, LOGO_SIDEBOXOURSYSTEM_IMAGE_WIDTH, LOGO_SIDEBOXOURSYSTEM_IMAGE_HEIGHT) . '</a>';
//comment this out if you use the above link option.
//$logoimageoursystem = zen_image($template->get_template_dir(LOGO_SIDEBOXOURSYSTEM_IMAGE, DIR_WS_TEMPLATE, $current_page_base,'images'). '/' . LOGO_SIDEBOXOURSYSTEM_IMAGE, LOGO_SIDEBOXOURSYSTEM_IMAGE_TEXT, LOGO_SIDEBOXOURSYSTEM_IMAGE_WIDTH, LOGO_SIDEBOXOURSYSTEM_IMAGE_HEIGHT);
$content = '';
$content .= '<div id="' . str_replace('_', '-', $box_id . 'Content') . '" class="sideBoxContent">';
$content .= $logoimageoursystem;
$content .= '</div>';
?>
For the includes/modules/sideboxes/myfolder/sideboxes/, I have:
For the we_accept.gif (file: logo_sidebox.php)
PHP Code:
// $Id: logo_sidebox.php,v 1.1 8/21/2008
// test if box should display
// $show_logo_sidebox = true;
if ($this_is_home_page) {
$show_logo_sidebox = true;
} else {
$show_logo_sidebox = true;
};
if (!isset($ezpage_id) || !in_array($ezpage_id,explode(",",'5,32,33,26,28,35,18,36,37,38'))) {
require($template->get_template_dir('tpl_logo_sidebox.php',DIR_WS_TEMPLATE, $current_page_base,'sideboxes'). '/tpl_logo_sidebox.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);
}
?>
For the 10_reasons.gif (file: logo_sidebox_10reasons.php)
PHP Code:
// $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,5,32,33,26,28,35,18,36,37,38'))) {
require($template->get_template_dir('tpl_logo_sidebox_10reasons.php',DIR_WS_TEMPLATE, $current_page_base,'sideboxes'). '/tpl_logo_sidebox_10reasons.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);
}
?>
For the how_it_works.gif (file: logo_sidebox_oursystem.php)
PHP Code:
// $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(",",'21,5,32,33,26,28,35,18,36,37,38'))) {
require($template->get_template_dir('tpl_logo_sidebox_oursystem.php',DIR_WS_TEMPLATE, $current_page_base,'sideboxes'). '/tpl_logo_sidebox_oursystem.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);
}
?>
For the includes/languages/english/extra_definitions/myfolder/, I have:
For the we_accept.gif (file: logo_sidebox_defines.php)
PHP Code:
// $Id: logo_sidebox_defines.php,v 1.1 8/21/2008
define('BOX_HEADING_LOGO_SIDEBOX', 'We Accept');
define('LOGO_SIDEBOX_IMAGE_WIDTH', '200');
define('LOGO_SIDEBOX_IMAGE_HEIGHT', '40');
define('LOGO_SIDEBOX_IMAGE', 'we_accept.gif');
define('LOGO_SIDEBOX_IMAGE_TEXT', 'We Accept Visa, American Express, Mastercard, and Discover via Paypal');
//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', 'linkgoeshere.com');
?>
For the 10_reasons.gif (file: logo_sidebox_10reasons_defines.php)
PHP Code:
// $Id: logo_sidebox_defines.php,v 1.1 8/21/2008
define('BOX_HEADING_LOGO_SIDEBOX', '');
define('LOGO_SIDEBOX10REASONS_IMAGE_WIDTH', '200');
define('LOGO_SIDEBOX10REASONS_IMAGE_HEIGHT', '55');
define('LOGO_SIDEBOX10REASONS_IMAGE', '10_reasons.gif');
define('LOGO_SIDEBOX10REASONS_IMAGE_TEXT', '10 Reasons to Choose Benchmark Design');
//this is optional if you want to use the logo as a link
//replace your_link.com with the link you choose
define('LOGO_SIDEBOX10REASONS_LINK', 'index.php?main_page=page&id=20');
?>
For the how_it_works.gif (file: logo_sidebox_oursystem_defines.php)
PHP Code:
// $Id: logo_sidebox_defines.php,v 1.1 8/21/2008
define('BOX_HEADING_LOGO_SIDEBOX', '');
define('LOGO_SIDEBOXOURSYSTEM_IMAGE_WIDTH', '200');
define('LOGO_SIDEBOXOURSYSTEM_IMAGE_HEIGHT', '55');
define('LOGO_SIDEBOXOURSYSTEM_IMAGE', 'how_it_works.gif');
define('LOGO_SIDEBOXOURSYSTEM_IMAGE_TEXT', 'Learn How Our System Works!');
//this is optional if you want to use the logo as a link
//replace your_link.com with the link you choose
define('LOGO_SIDEBOXOURSYSTEM_LINK', 'index.php?main_page=page&id=21');
?>
That's about it. Hope this helps.
Thanks
-
Re: Blank Sidebox as Linked Graphic Only
Any luck with this Glen? Is there a way to just, perhaps, to remove any styling from the logo sidebox? This should do the trick.
-
Re: Blank Sidebox as Linked Graphic Only
To remove the xsnazzy styling from individual sideboxes, you need to disable several elements:
#logosidebox10reasons .xtop, #logosidebox10reasons .xbottom {display: none;}
#logosidebox10reasons .xboxcontent {border-width:0;}
Repeat for each version of the logo sidebox.
Also, I notice that the xsnazzy code is incomplete; each .xsnazzyCushion div never closes, so that the fifth sidebox has five layers of .xsnazzyCushion.
As far as making each sidebox appear only on the desired pages, the solution is right in the files you posted:
PHP Code:
// test if box should display
// $show_logo_sidebox = true;
if ($this_is_home_page) {
$show_logo_sidebox = true;
} else {
$show_logo_sidebox = true;
};
This could be adjusted for each situation. You want to remove the ; after that last }, as it should not be there.
-
Re: Blank Sidebox as Linked Graphic Only
Quote:
To remove the xsnazzy styling from individual sideboxes, you need to disable several elements:
#logosidebox10reasons .xtop, #logosidebox10reasons .xbottom {display: none;}
#logosidebox10reasons .xboxcontent {border-width:0;}
That worked perfectly - thanks!
Quote:
Also, I notice that the xsnazzy code is incomplete; each .xsnazzyCushion div never closes, so that the fifth sidebox has five layers of .xsnazzyCushion.
Here's the code I inserted into the tpl_default_right.php file - perhaps you can find the error:
PHP Code:
* @version $Id: tpl_box_default_right.php 2975 2006-02-05 19:33:51Z birdbrain $
*/
// choose box images based on box position
if ($title_link) {
$title = '<a href="' . zen_href_link($title_link) . '">' . $title . BOX_HEADING_LINKS . '</a>';
}
//
?>
<!--// bof: <?php echo $box_id; ?> //-->
<!-- commented out old code <div class="rightBoxContainer" id="<?php echo str_replace('_', '-', $box_id ); ?>" style="width: <?php echo $column_width; ?>"> -->
<div class="xsnazzyCushion">
<!-- bof Rounded Corners -->
<div class="xsnazzy" id="<?php echo str_replace('_', '-', $box_id ); ?>" style="width: <?php echo $column_width; ?>">
<b class="xtop"><b class="xb1"></b><b class="xb2"></b><b class="xb3"></b><b class="xb4"></b></b>
<div class="xboxcontent">
<!-- eof Rounded Corners -->
<h3 class="rightBoxHeading" id="<?php echo str_replace('_', '-', $box_id) . 'Heading'; ?>"><?php echo $title; ?></h3>
<?php echo $content; ?>
</div>
<!-- bof Rounded Corners -->
<b class="xbottom"><b class="xb4"></b><b class="xb3"></b><b class="xb2"></b><b class="xb1"></b></b>
<!-- eof Rounded Corners -->
</div>
</div>
<!--// eof: <?php echo $box_id; ?> //-->
I just added the last </div> tag. I believe this was all that was missing, but maybe I'm wrong.
Lastly, I'd like to change Live Help sidebox to look like the others (wihout Snazzy and Header Title) - any suggestions?
Thanks again!
-
Re: 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;}
-
Re: Blank Sidebox as Linked Graphic Only
-
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:
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);
}
?>
-
Re: Blank Sidebox as Linked Graphic Only
Add the test for home page to the rest:
PHP Code:
// 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);
}
?>
-
Re: Blank Sidebox as Linked Graphic Only
-
Re: Blank Sidebox as Linked Graphic Only
How can I create a rollover effect with this image within the logo sidebox?
-
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/');
-
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!
-
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.
-
Re: Blank Sidebox as Linked Graphic Only
I would like the buttons to look just like they do on http://www.zitabkids.com
Quote:
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. ????
-
Re: Blank Sidebox as Linked Graphic Only
In your stylesheet, make a pair of rules for the particular link, like this:
Code:
#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.
-
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?
-
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.
-
Re: Blank Sidebox as Linked Graphic Only
Quote:
Originally Posted by
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
-
Re: Blank Sidebox as Linked Graphic Only
Quote:
Originally Posted by
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.
-
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?
-
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:
-
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.