Page 2 of 4 FirstFirst 1234 LastLast
Results 11 to 20 of 38
  1. #11
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Blank Sidebox as Linked Graphic Only

    The code snippet in post 8 is not a suggestion to be interpreted, it is exactly the code you need to use to hide that link on ez-page 20. You can also adapt it very simply by changing 'page' to whatever page name you want (this is the "main_page=xxx" in the address bar at the top of the window) and eliminating the "or ..." part.
    PHP Code:
    if ($current_page_base != 'what_ever') {
      <
    a href="index.php?main_page=what_ever"><img src="/images/imagename.png" alt="Image Description" width="200" height="50" hspace="5" vspace="5" border="0"></a>

    There are other methods to achieve the same result, too.

  2. #12

    Default Re: Blank Sidebox as Linked Graphic Only

    thanks! It worked like a charm!
    Posted via Mobile Device

  3. #13

    Default Re: Blank Sidebox as Linked Graphic Only

    Good mornign Glen,

    You were a huge help last night on the Smart Backgrounds (post thread: http://www.zen-cart.com/forum/showth...=83034&page=24)

    I still need help with this one. I actually had not setup the Smart Backgrounds Add-On when I was working on this. I setup my graphics each as logo sideboxes. Unfortunately, they seem to be showing up with the default sidebox style - you can see this for the three graphics under the search box on the right at my site.

    I inserted your code from the Smart Backgrounds add-on (oops just realized I forgot to make the EZpages sytax correction you figured out last night) in to the right column on tpl_main_page as follows:

    Code:
    /**
      * prepares and displays right column sideboxes
      *
      */
    ?>
            <div id="navColumnTwoWrapper" style="width: <?php echo BOX_WIDTH_RIGHT; ?>">
    		<!--Smart Backgrounds  - Sidebox Graphics -->
    <?php $smart_image = '';
    if ($current_page_base == 'index' or $current_page_base == 'product_info') { //add _ and cPath to filename only if individual cat image exists, else add _ and top cat id to bg filename only if top cat image exists
      $smart_image = file_exists(DIR_WS_TEMPLATE_IMAGES . 'smartbg_' . $_GET[cPath] . '.gif')?'_' . $_GET[cPath]:file_exists(DIR_WS_TEMPLATE_IMAGES . 'smartbg_' . (int)$_GET[cPath] . '.gif')?'_' . (int)$_GET[cPath]:'';
    } elseif ($current_page_base == 'page') { //add _page and ez-page id to filename only if ez-page id image exists, else add _page to filename only if general ez-page image exists
      $smart_image = file_exists(DIR_WS_TEMPLATE_IMAGES . 'smartbg_page' . $_GET[id] . '.gif')?'_page' . $_GET[id]:file_exists(DIR_WS_TEMPLATE_IMAGES . 'smartbg_page.gif')?'_page':'';
    } else { //add _ and page base to filename only if page image exists
      $smart_image = file_exists(DIR_WS_TEMPLATE_IMAGES . 'smartbg_' . $current_page_base . '.gif')?'_' . $current_page_base:''; //default/home page class will be just .smartBG, and filename smartbg.gif
    }?>
    <div id/class="whatever"><?php echo  zen_image(DIR_WS_TEMPLATE_IMAGES . 'smartbg' . $smart_image . '.gif', '');?></div>
    <!--/Smart Backgrounds - Sidebox Graphics -->
    		
    		<?php require(DIR_WS_MODULES . zen_get_module_directory('column_right.php')); ?></div>
    I then duplicated my we_accept.gif graphic and renamed as smartbg.gif and uploaded. It works just the way I want. Except that it shows up the Search Box rather than below. I think I'd have to move this code to another file rather than the tpl_main_page to do this, but I'm not sure. Maybe you can suggest this as well.

    So how do I make the other three show up now? I want the remaining three to link to specific pages and not show up on their respectively linked pages, and possibly other pages (ie. Our Company, Careers, etc.)

    Please help, as I still haven't fully grasped the way this add-on works, but am liking the results, especially after the way it works for the header backgrounds.

    Thanks,

    Ara
    BenchmarkDesign.Net - Integrated Media Solutions

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

    Default Re: Blank Sidebox as Linked Graphic Only

    I don't think the Smart BG code is really the best way to handle this case. You want the "we accept" image all the time, right? Just inserting the <img> code in the location you show will (should) put that image at the top of the column, above the sideboxes. If you want just one of the "logo" boxes to show depending on the page, the easiest way would be to have one logo sidebox with all the images in it, and the if() test modified and extended to display the one desired for each page.

  5. #15

    Default Re: Blank Sidebox as Linked Graphic Only

    Thanks for the reply. Actually, I don't want the we_accept.gif on the non-cart pages, such as Careers, Our Company, etc. How would I go about modifying the Logo Sidebox to make the changes necessary? Could you show me an example?
    BenchmarkDesign.Net - Integrated Media Solutions

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

    Default Re: Blank Sidebox as Linked Graphic Only

    I don't have any examples laying around. If you post your logo_sidebox.php file (in [php] and [/php] tags), I will make an example for you.

    Include the code for the different images, and a list of which pages you do or don't want each of them on.

  7. #17

    Default Re: Blank Sidebox as Linked Graphic Only

    Sorry for the delay. Took the family to play in the snow today. Actually, the solution may be even simpler if you could tell me how I could keep the Snazzy Rounded corners add-on for my main sideboxes and remove any styling from the Logo Sideboxes.

    The Logo Sideboxes files I have so far as as follows:

    For the includes/templates/myfolder/sideboxes, I have:

    For the we_accept.gif (file: tpl_logo_sidebox.php)
    PHP Code:
    // $Id: tpl_logo_sidebox.php,v 1.1 8/21/2008
    //  --------------------------------------------------
    //
    // 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, LOGO_SIDEBOX_IMAGE_WIDTH, LOGO_SIDEBOX_IMAGE_HEIGHT) . '</a>';

    //comment this out if you use the above link option.
    $logoimage zen_image($template->get_template_dir(LOGO_SIDEBOX_IMAGEDIR_WS_TEMPLATE$current_page_base,'images'). '/' LOGO_SIDEBOX_IMAGELOGO_SIDEBOX_IMAGE_TEXTLOGO_SIDEBOX_IMAGE_WIDTHLOGO_SIDEBOX_IMAGE_HEIGHT); 

      
    $content '';
        
    $content .= '<div id="' str_replace('_''-'$box_id 'Content') . '" class="sideBoxContent">';

      
    $content .=  $logoimage;

      
    $content .= '</div>';
    ?> 
    For the 10_reasons.gif (file: tpl_logo_sidebox_10reasons.php)
    PHP Code:
    // $Id: tpl_logo_sidebox.php,v 1.1 8/21/2008
    //  --------------------------------------------------
    //
    // Link Option - uncomment this if you intend to use the logo as a link

    $logoimage10reasons '<a href="' LOGO_SIDEBOX10REASONS_LINK '">' zen_image($template->get_template_dir(LOGO_SIDEBOX10REASONS_IMAGEDIR_WS_TEMPLATE$current_page_base,'images'). '/' LOGO_SIDEBOX10REASONS_IMAGELOGO_SIDEBOX10REASONS_IMAGE_TEXTLOGO_SIDEBOX10REASONS_IMAGE_WIDTHLOGO_SIDEBOX10REASONS_IMAGE_HEIGHT) . '</a>';

    //comment this out if you use the above link option.
    //$logoimage10reasons = zen_image($template->get_template_dir(LOGO_SIDEBOX10REASONS_IMAGE, DIR_WS_TEMPLATE, $current_page_base,'images'). '/' . LOGO_SIDEBOX10REASONS_IMAGE, LOGO_SIDEBOX10REASONS_IMAGE_TEXT, LOGO_SIDEBOX10REASONS_IMAGE_WIDTH, LOGO_SIDEBOX10REASONS_IMAGE_HEIGHT); 

      
    $content '';
        
    $content .= '<div id="' str_replace('_''-'$box_id 'Content') . '" class="sideBoxContent">';

      
    $content .=  $logoimage10reasons;

      
    $content .= '</div>';
    ?> 
    For the how_it_works.gif (file: tpl_logo_sidebox_oursystem.php)
    PHP Code:
    // $Id: tpl_logo_sidebox.php,v 1.1 8/21/2008
    //  --------------------------------------------------
    //
    // Link Option - uncomment this if you intend to use the logo as a link

    $logoimageoursystem '<a href="' LOGO_SIDEBOXOURSYSTEM_LINK '">' zen_image($template->get_template_dir(LOGO_SIDEBOXOURSYSTEM_IMAGEDIR_WS_TEMPLATE$current_page_base,'images'). '/' LOGO_SIDEBOXOURSYSTEM_IMAGELOGO_SIDEBOXOURSYSTEM_IMAGE_TEXTLOGO_SIDEBOXOURSYSTEM_IMAGE_WIDTHLOGO_SIDEBOXOURSYSTEM_IMAGE_HEIGHT) . '</a>';

    //comment this out if you use the above link option.
    //$logoimageoursystem = zen_image($template->get_template_dir(LOGO_SIDEBOXOURSYSTEM_IMAGE, DIR_WS_TEMPLATE, $current_page_base,'images'). '/' . LOGO_SIDEBOXOURSYSTEM_IMAGE, LOGO_SIDEBOXOURSYSTEM_IMAGE_TEXT, LOGO_SIDEBOXOURSYSTEM_IMAGE_WIDTH, LOGO_SIDEBOXOURSYSTEM_IMAGE_HEIGHT); 

      
    $content '';
        
    $content .= '<div id="' str_replace('_''-'$box_id 'Content') . '" class="sideBoxContent">';

      
    $content .=  $logoimageoursystem;

      
    $content .= '</div>';
    ?> 
    For the includes/modules/sideboxes/myfolder/sideboxes/, I have:

    For the we_accept.gif (file: logo_sidebox.php)
    PHP Code:
    // $Id: logo_sidebox.php,v 1.1 8/21/2008

    // test if box should display
    //  $show_logo_sidebox = true;
        
    if ($this_is_home_page) {
        
    $show_logo_sidebox true;
      } else {
        
    $show_logo_sidebox true;
      };

     if (!isset(
    $ezpage_id) || !in_array($ezpage_id,explode(",",'5,32,33,26,28,35,18,36,37,38'))) {
          require(
    $template->get_template_dir('tpl_logo_sidebox.php',DIR_WS_TEMPLATE$current_page_base,'sideboxes'). '/tpl_logo_sidebox.php');
          
    $title =  BOX_HEADING_LOGO_SIDEBOX;
          
    $left_corner false;
          
    $right_corner false;
          
    $right_arrow false;
          require(
    $template->get_template_dir($column_box_defaultDIR_WS_TEMPLATE$current_page_base,'common') . '/' $column_box_default);
     }
    ?> 
    For the 10_reasons.gif (file: logo_sidebox_10reasons.php)
    PHP Code:
    // $Id: logo_sidebox.php,v 1.1 8/21/2008

    // test if box should display
      
    $show_logo_sidebox true;

     if (!isset(
    $ezpage_id) || !in_array($ezpage_id,explode(",",'20,5,32,33,26,28,35,18,36,37,38'))) {
          require(
    $template->get_template_dir('tpl_logo_sidebox_10reasons.php',DIR_WS_TEMPLATE$current_page_base,'sideboxes'). '/tpl_logo_sidebox_10reasons.php');
          
    $title =  BOX_HEADING_LOGO_SIDEBOX;
          
    $left_corner false;
          
    $right_corner false;
          
    $right_arrow false;
          require(
    $template->get_template_dir($column_box_defaultDIR_WS_TEMPLATE$current_page_base,'common') . '/' $column_box_default);
     }
    ?> 
    For the how_it_works.gif (file: logo_sidebox_oursystem.php)
    PHP Code:
    // $Id: logo_sidebox.php,v 1.1 8/21/2008

    // test if box should display
      
    $show_logo_sidebox true;

     if (!isset(
    $ezpage_id) || !in_array($ezpage_id,explode(",",'21,5,32,33,26,28,35,18,36,37,38'))) {
          require(
    $template->get_template_dir('tpl_logo_sidebox_oursystem.php',DIR_WS_TEMPLATE$current_page_base,'sideboxes'). '/tpl_logo_sidebox_oursystem.php');
          
    $title =  BOX_HEADING_LOGO_SIDEBOX;
          
    $left_corner false;
          
    $right_corner false;
          
    $right_arrow false;
          require(
    $template->get_template_dir($column_box_defaultDIR_WS_TEMPLATE$current_page_base,'common') . '/' $column_box_default);
     }
    ?> 
    For the includes/languages/english/extra_definitions/myfolder/, I have:

    For the we_accept.gif (file: logo_sidebox_defines.php)
    PHP Code:
    // $Id: logo_sidebox_defines.php,v 1.1 8/21/2008

    define('BOX_HEADING_LOGO_SIDEBOX''We Accept');
    define('LOGO_SIDEBOX_IMAGE_WIDTH''200');
    define('LOGO_SIDEBOX_IMAGE_HEIGHT''40');
    define('LOGO_SIDEBOX_IMAGE''we_accept.gif');
    define('LOGO_SIDEBOX_IMAGE_TEXT''We Accept Visa, American Express, Mastercard, and Discover via Paypal');

    //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''linkgoeshere.com');

    ?> 
    For the 10_reasons.gif (file: logo_sidebox_10reasons_defines.php)
    PHP Code:
    // $Id: logo_sidebox_defines.php,v 1.1 8/21/2008

    define('BOX_HEADING_LOGO_SIDEBOX''');
    define('LOGO_SIDEBOX10REASONS_IMAGE_WIDTH''200');
    define('LOGO_SIDEBOX10REASONS_IMAGE_HEIGHT''55');
    define('LOGO_SIDEBOX10REASONS_IMAGE''10_reasons.gif');
    define('LOGO_SIDEBOX10REASONS_IMAGE_TEXT''10 Reasons to Choose Benchmark Design');

    //this is optional if you want to use the logo as a link
    //replace your_link.com with the link you choose
    define('LOGO_SIDEBOX10REASONS_LINK''index.php?main_page=page&id=20');

    ?> 
    For the how_it_works.gif (file: logo_sidebox_oursystem_defines.php)
    PHP Code:
    // $Id: logo_sidebox_defines.php,v 1.1 8/21/2008

    define('BOX_HEADING_LOGO_SIDEBOX''');
    define('LOGO_SIDEBOXOURSYSTEM_IMAGE_WIDTH''200');
    define('LOGO_SIDEBOXOURSYSTEM_IMAGE_HEIGHT''55');
    define('LOGO_SIDEBOXOURSYSTEM_IMAGE''how_it_works.gif');
    define('LOGO_SIDEBOXOURSYSTEM_IMAGE_TEXT''Learn How Our System Works!');

    //this is optional if you want to use the logo as a link
    //replace your_link.com with the link you choose
    define('LOGO_SIDEBOXOURSYSTEM_LINK''index.php?main_page=page&id=21');

    ?> 
    That's about it. Hope this helps.

    Thanks
    BenchmarkDesign.Net - Integrated Media Solutions

  8. #18

    Default Re: Blank Sidebox as Linked Graphic Only

    Any luck with this Glen? Is there a way to just, perhaps, to remove any styling from the logo sidebox? This should do the trick.
    BenchmarkDesign.Net - Integrated Media Solutions

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

    Default Re: Blank Sidebox as Linked Graphic Only

    To remove the xsnazzy styling from individual sideboxes, you need to disable several elements:

    #logosidebox10reasons .xtop, #logosidebox10reasons .xbottom {display: none;}
    #logosidebox10reasons .xboxcontent {border-width:0;}

    Repeat for each version of the logo sidebox.

    Also, I notice that the xsnazzy code is incomplete; each .xsnazzyCushion div never closes, so that the fifth sidebox has five layers of .xsnazzyCushion.

    As far as making each sidebox appear only on the desired pages, the solution is right in the files you posted:
    PHP Code:
    // test if box should display
    //  $show_logo_sidebox = true;
        
    if ($this_is_home_page) {
        
    $show_logo_sidebox true;
      } else {
        
    $show_logo_sidebox true;
      }; 
    This could be adjusted for each situation. You want to remove the ; after that last }, as it should not be there.

  10. #20

    Default Re: Blank Sidebox as Linked Graphic Only

    To remove the xsnazzy styling from individual sideboxes, you need to disable several elements:

    #logosidebox10reasons .xtop, #logosidebox10reasons .xbottom {display: none;}
    #logosidebox10reasons .xboxcontent {border-width:0;}
    That worked perfectly - thanks!

    Also, I notice that the xsnazzy code is incomplete; each .xsnazzyCushion div never closes, so that the fifth sidebox has five layers of .xsnazzyCushion.
    Here's the code I inserted into the tpl_default_right.php file - perhaps you can find the error:

    PHP Code:
     * @version $Id: tpl_box_default_right.php 2975 2006-02-05 19:33:51Z birdbrain $
     */

    // choose box images based on box position
      if ($title_link) {
        $title = '<a href="' . zen_href_link($title_link) . '">' . $title . BOX_HEADING_LINKS . '</a>';
      }
    //
    ?>
    <!--// bof: <?php echo $box_id?> //-->
    <!-- commented out old code <div class="rightBoxContainer" id="<?php echo str_replace('_''-'$box_id ); ?>" style="width: <?php echo $column_width?>"> -->
    <div class="xsnazzyCushion">
    <!-- bof Rounded Corners -->
    <div class="xsnazzy" id="<?php echo str_replace('_''-'$box_id ); ?>" style="width: <?php echo $column_width?>">
                         <b class="xtop"><b class="xb1"></b><b class="xb2"></b><b class="xb3"></b><b class="xb4"></b></b>
                         <div class="xboxcontent">
    <!-- eof Rounded Corners -->
    <h3 class="rightBoxHeading" id="<?php echo str_replace('_''-'$box_id) . 'Heading'?>"><?php echo $title?></h3>

    <?php echo $content?>
    </div>

    <!-- bof Rounded Corners -->
    <b class="xbottom"><b class="xb4"></b><b class="xb3"></b><b class="xb2"></b><b class="xb1"></b></b>
    <!-- eof Rounded Corners -->
    </div>
    </div>
    <!--// eof: <?php echo $box_id?> //-->
    I just added the last </div> tag. I believe this was all that was missing, but maybe I'm wrong.

    Lastly, I'd like to change Live Help sidebox to look like the others (wihout Snazzy and Header Title) - any suggestions?

    Thanks again!
    BenchmarkDesign.Net - Integrated Media Solutions

 

 
Page 2 of 4 FirstFirst 1234 LastLast

Similar Threads

  1. Sidebox Header Graphic Question(s)
    By Hell Guapo in forum Templates, Stylesheets, Page Layout
    Replies: 8
    Last Post: 3 Jan 2012, 12:25 AM
  2. Blank Sidebox Only On Homepage
    By Globie in forum General Questions
    Replies: 2
    Last Post: 27 Oct 2008, 06:44 AM
  3. Changing the size(length) of the Blank-Sidebox only.
    By Robbyn7 in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 7 Sep 2007, 08:17 PM
  4. Adding Graphic to Bottom of Cart Sidebox
    By jacdesigner in forum Basic Configuration
    Replies: 2
    Last Post: 17 Nov 2006, 04:01 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