Hello.
What is the proper way to attach a hyperlink to an image in a Blank Sidebox Mod v2.0?
I have problem with it...
Thanks.
Hello.
What is the proper way to attach a hyperlink to an image in a Blank Sidebox Mod v2.0?
I have problem with it...
Thanks.
Should just be standard HTML. What problem are you having?
The syntax is:
<a href="the URL"><img src="path_to_image/image_name.gif" /></a>
Please do not PM for support issues: a private solution doesn't benefit the community.
Be careful with unsolicited advice via email or PM - Make sure the person you are talking to is a reliable source.
Hi.
Thanks for the quick reply.
I am new to PHP, so here is what I did, and my text link works, but the image is not linked...
I probably messed up my code somewhere. Can anyone help me with this?
Thanks.
Includes/languages/english/extra_definitions/blank_sidebox2_defines.php
<?php
/**
* blank sidebox definitions - text for inclusion in a new blank sidebox
*
* @package templateSystem
* @copyright 2007 Kuroi Web Design
* @copyright Portions Copyright 2003-2007 Zen Cart Development Team
* @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
* @version $Id: blank_sidebox.php 2007-05-26 kuroi $
*/
define('BOX_HEADING_BLANK_SIDEBOX', 'My Text');
define('TEXT_BLANK_SIDEBOX', '<a target="_self" href="http://www.mydomain.com/store/index.php?main_page=page&id=1"><div>
<font color="#FF0000">My Text!</font></div></a>');
?>
includes/templates/template_default/sideboxes/tpl_blank_sidebox2.php
<?php
/**
* blank sidebox - allows a blank sidebox to be added to your site
*
* @package templateSystem
* @copyright 2007 Kuroi Web Design
* @copyright Portions Copyright 2003-2007 Zen Cart Development Team
* @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
* @version $Id: blank_sidebox.php 2007-05-26 kuroi $
*/
$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_BLANK_SIDEBOX . '</p>';
$content .= '<div align="center" style="padding:5px;"><a target="_self" href="http://www.mydomain.com/store/index.php?main_page=page&id=1"><img src="https://www.mydomain.com/images/myimage.jpg" border="0" alt="My Image"></a></div>';
$content .= '</div>';
?>
includes/modules/sideboxes/blank_sidebox2.php
<?php
/**
* blank sidebox - allows a blank sidebox to be added to your site
*
* @package templateSystem
* @copyright 2007 Kuroi Web Design
* @copyright Portions Copyright 2003-2007 Zen Cart Development Team
* @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
* @version $Id: blank_sidebox.php 2007-05-26 kuroi $
*/
// test if box should display
$show_blank_sidebox = true;
if ($show_blank_sidebox == true) {
require($template->get_template_dir('tpl_blank_sidebox2.php',DIR_WS_TEMPLATE, $current_page_base,'sideboxes'). '/tpl_blank_sidebox2.php');
$title = BOX_HEADING_BLANK_SIDEBOX;
$title_link = false;
require($template->get_template_dir($column_box_default, DIR_WS_TEMPLATE, $current_page_base,'common') . '/' . $column_box_default);
}
?>
Also where do I write style for my text link? I would like it to look just like my other sidebox links in my template (with hover effect)...
Thanks again.
OK,
I made this mistake. I had an extra file
includes/templates/template_default/sideboxes/tpl_blank_sidebox.php uploaded in this directory:
includes/templates/theme209/sideboxes/tpl_blank_sidebox.php
I deleted this file and my image is now linked, still trying to figure out where to write CSS for my text link in this sidebox...
Can you help?
Bookmarks