Results 1 to 10 of 12

Hybrid View

  1. #1

    Default Re: Basic 'simple button to URL in sidebox - HowTo Example needed

    thanks, any idea how I could get the button type used in the search sidebox, or is it a gif too?
    Beau

  2. #2
    Join Date
    Jun 2003
    Posts
    33,721
    Plugin Contributions
    0

    Default Re: Basic 'simple button to URL in sidebox - HowTo Example needed

    You can use a GIF, JPG or PNG image
    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.

  3. #3

    Default Re: Basic 'simple button to URL in sidebox - HowTo Example needed

    Newbie question time: How do you figure out the path to a graphic. I have tried <img src="free.gif" /> with the free.gif in the images folder in the same level as the sidebox folder that has the sidebox php file with the code and I see nothing. As you can see in the code below I'm using the Blank Sidebox as a starting point.

    Code:
    <?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">';
      $content .= '<a href="http://audiobookstownsquare.yuku.com"><img src="free.gif" /></a>';
     
      $content .= '</div>';
    ?>
    Beau

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

    Default Re: Basic 'simple button to URL in sidebox - HowTo Example needed

    You'll need the path in the img tag. A relative path would be: <img src="../images/free.gif"> That's two dots before the slash. You can also put in the entire path (http:// etc.), but you can run into problems on secured pages that way.

  5. #5
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Basic 'simple button to URL in sidebox - HowTo Example needed

    And that (../images/free.gif) would be the path to an image in the correct template image folder, /includes/templates/your_template/images/free.gif.

    The /images/ folder in the root of the Zen Cart installation is intended mainly for product images, while template-specific images go in the template folder.

  6. #6
    Join Date
    Mar 2010
    Location
    UK
    Posts
    445
    Plugin Contributions
    0

    Default Re: Basic 'simple button to URL in sidebox - HowTo Example needed

    Quote Originally Posted by gjh42 View Post
    And that (../images/free.gif) would be the path to an image in the correct template image folder, /includes/templates/your_template/images/free.gif.

    The /images/ folder in the root of the Zen Cart installation is intended mainly for product images, while template-specific images go in the template folder.
    It is the browser that resolves the relative URL reference, so:

    from the page at www.example.com/zencart/index.php?some-parameters the reference "../images/free.gif" points to www.example.com/images/free.gif.

    and

    from the page at www.example.com/index.php?some-parameters the reference "../images/free.gif" points to www.example.com/../images/free.gif.

    Neither of those are what you want.

    I can't stress enough that simply linking to images using "/zencart/images/free.gif" and "/images/free.gif" references with a leading slash simplifies everything instantly.

    In that case, template images are referred to using "/zencart/includes/templates/your_template/images/free.gif" and "/includes/templates/your_template/images/free.gif" references.

 

 

Similar Threads

  1. 2 page URL in category issue with Simple SEO URL Manager
    By msladybug02 in forum All Other Contributions/Addons
    Replies: 0
    Last Post: 19 Nov 2010, 10:33 PM
  2. Looking for very simple basic template
    By zglider in forum Addon Templates
    Replies: 4
    Last Post: 15 Mar 2009, 03:07 AM
  3. Need an extremely simple/basic checkout module.
    By Midashand in forum Addon Payment Modules
    Replies: 9
    Last Post: 28 Apr 2008, 08:51 PM
  4. Howto: Create Sidebox
    By RobWUK in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 22 Oct 2006, 07:53 PM
  5. Simple setup example wanted
    By thimker in forum General Questions
    Replies: 14
    Last Post: 20 May 2006, 10:49 PM

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