Results 1 to 5 of 5
  1. #1
    Join Date
    Jun 2009
    Posts
    85
    Plugin Contributions
    0

    Default Attaching a hyperlink to an image in a Blank Sidebox Mod v2.0?

    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.

  2. #2
    Join Date
    Feb 2005
    Location
    Lansing, Michigan USA
    Posts
    20,024
    Plugin Contributions
    3

    Default Re: Attaching a hyperlink to an image in a Blank Sidebox Mod v2.0.

    Should just be standard HTML. What problem are you having?

  3. #3
    Join Date
    Jun 2003
    Posts
    33,715
    Plugin Contributions
    0

    Default Re: Attaching a hyperlink to an image in a Blank Sidebox Mod v2.0.

    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.

  4. #4
    Join Date
    Jun 2009
    Posts
    85
    Plugin Contributions
    0

    Default Re: Attaching a hyperlink to an image in a Blank Sidebox Mod v2.0.

    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.

  5. #5
    Join Date
    Jun 2009
    Posts
    85
    Plugin Contributions
    0

    Default Re: Attaching a hyperlink to an image in a Blank Sidebox Mod v2.0.

    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?

 

 

Similar Threads

  1. Blank Sidebox Mod
    By Mel83 in forum Addon Sideboxes
    Replies: 3
    Last Post: 6 Dec 2011, 02:55 PM
  2. blank sidebox mod - won't let me add an image
    By zubenubi in forum General Questions
    Replies: 2
    Last Post: 1 Jul 2010, 06:07 PM
  3. Blank Sidebox Mod v2.0
    By Jaden in forum Addon Templates
    Replies: 3
    Last Post: 9 Dec 2008, 02:49 AM
  4. Blank Sidebox Mod v2.0 Help?
    By Mrsb in forum Addon Sideboxes
    Replies: 5
    Last Post: 24 Jun 2008, 09:43 PM
  5. Blank Sidebox Mod - remove a blank sidebox
    By PJD in forum Basic Configuration
    Replies: 4
    Last Post: 14 Mar 2008, 02:09 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR