I installed the add on "logo sidebox".
I put a picture in my sidebox and would like to know which line of codes inside the "tpl_logo_sidebox.php" file do I have to edit to put a link to a page of my site.
Thanks for your help.
Chris
I installed the add on "logo sidebox".
I put a picture in my sidebox and would like to know which line of codes inside the "tpl_logo_sidebox.php" file do I have to edit to put a link to a page of my site.
Thanks for your help.
Chris
You need to edit two files:
#1 -
includes/languages/extra/definitions/logo_sidebox_defines.php
Find these lines of code and edit as necessary
//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', 'http://your_link.com/');
#2 -
includes/templates/YOUR_TEMPLATE/sideboxes/tpl_logo_sidebox.php
right at the top of the file you will find these instructions:
// 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) . '</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);
Just follow the instructions: comment out the line you won't be using and uncomment the line you will be using.
In fact before asking this question, I reached the point you ve described.
I put my link in the file #1
but I didn t know which line of codes to uncomment and comment out in the file #2
A programmer took a look to the file #2 and removed only some "" that were redundant (I don t know which one), didn t uncomment or comment out anything and it worked.
There must be a small mistake in the codes.
Thanks a lot for having taken the time to answer me clydejones.
Chris
Hi,
I don't seem to be able to get the image to come up. In the first file I have given the url/path to the image file along with a text to display. The text displays fine but the image does not.
I have verified that the path to the image is correct but can't get it to display. One the second file I tried things both ways and it did not seem to have an effect on the image displaying.define('BOX_HEADING_LOGO_SIDEBOX', '');
define('LOGO_SIDEBOX_IMAGE_WIDTH', '125');
define('LOGO_SIDEBOX_IMAGE_HEIGHT', '125');
define('LOGO_SIDEBOX_IMAGE', 'http://www.tranquillas.com/biz/includes/templates/tranquillas/images/Omega Skull.gif');
define('LOGO_SIDEBOX_IMAGE_TEXT', 'Tranquilla\'s');
At this point I figure that it must be something dumb (smile)... so can someone nudge my brain in a direction?
You only need to define the image name as indicated by the highlighted portion.
define('BOX_HEADING_LOGO_SIDEBOX', '');
define('LOGO_SIDEBOX_IMAGE_WIDTH', '125');
define('LOGO_SIDEBOX_IMAGE_HEIGHT', '125');
define('LOGO_SIDEBOX_IMAGE', 'Omega Skull.gif');
define('LOGO_SIDEBOX_IMAGE_TEXT', 'Tranquilla\'s');
The following statement in the second file takes care of locating the correct path to the image:
$logoimage = zen_image($template->get_template_dir(LOGO_SIDEBOX_IMAGE, DIR_WS_TEMPLATE, $current_page_base,'images'). '/' . LOGO_SIDEBOX_IMAGE, LOGO_SIDEBOX_IMAGE_TEXT);
Well, it was as simple as that. Once I took out the hard coded path to the image file, everything worked fine and dandy. Thank you for helping me with the picture box. You have a great evening.
Here is the file transformed by the programmer :
// 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) . '</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);
$content = '';
$content .= '<div id="' . str_replace('_', '-', $box_id . 'Content') . '">';
$content .= $logoimage;
$content .= '</div>';
?>
Bookmarks