Page 1 of 2 12 LastLast
Results 1 to 10 of 12
  1. #1

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

    I have created a sidebox that I want to but some basic/simple buttons, like the search button in the search sidebox. My problem is I'm a novice at PHP programming (I am an experience programmer I just don't know PHP that well yet) and I'm having some problems understanding what I'm seeing in the see, so I'm asking for a good explination of just what is going on in tpl_search.php.

    All my button needs to do is a simple href to an external URL like www.google.com.
    Last edited by Beau91324; 8 Oct 2009 at 05:01 PM. Reason: Added info
    Beau

  2. #2
    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

    Do you want a button to an external URL, or do you want some sort of search function attached to it?

  3. #3

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

    I just want a button to an send the user to an external URL when pressed. I'm using it to send my users to our Forum support site: audiobookstownsquare.yuku.com

    I'm looking for the simplest, cleanest way to do this is a sidebox because I will be adding other links to other places later.
    Beau

  4. #4
    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

    If you want this separate from the existing sideboxes, you can install the Blank Sidebox mod and put your button code in it.

    If you don't want the button in a box, you can hide the box heading and border in your stylesheet, using the box id to limit the effect to that box.

  5. #5

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

    Yes, I understand that, but what is the code I put in the sidebox to create the button itself? That's what I need to understand, know.
    Beau

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

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

    Use simple HTML -

    <a href="YOUR_URL"><img src="path_to_your_image.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.

  7. #7

    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

  8. #8
    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.

  9. #9

    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

  10. #10
    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.

 

 
Page 1 of 2 12 LastLast

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