Page 2 of 2 FirstFirst 12
Results 11 to 16 of 16
  1. #11
    Join Date
    Aug 2005
    Location
    Trujillo Alto, Puerto Rico
    Posts
    1,535
    Plugin Contributions
    9

    Default Re: Hiding Sidebox content

    Hi BillyBoyle,

    Sorry for the delay but has been busy...

    I tried this tonight and it breaks my cart (I believe the only change was on the module file?). Here's my copy as my sidebox parameters:
    PHP 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 $
     */

      // test if box should display
      
    $show_messageme_sidebox true;
    if (
    $_SERVER['HTTPS']== 'on' ){
        
    $show_messageme_sidebox false;
    }  

      if (
    $show_messageme_sidebox == true) {
          require(
    $template->get_template_dir('tpl_messageme.php',DIR_WS_TEMPLATE$current_page_base,'sideboxes'). '/tpl_messageme.php');
          
    $title =  BOX_HEADING_MESSAGEME_SIDEBOX;
          
    $title_link false;
          require(
    $template->get_template_dir($column_box_defaultDIR_WS_TEMPLATE$current_page_base,'common') . '/' $column_box_default);
     }
    ?>
    Here's what happens: http://img39.imageshack.us/img39/1736/aquatic.jpg

    Let me know if I have to make changes in any other of the files or if there's something wrong on this one.
    IDEAS Girl
    IDEAS Creative Group
    = Your image... our business!

  2. #12
    Join Date
    Jul 2011
    Location
    Glasgow, Scotland
    Posts
    113
    Plugin Contributions
    1

    Default Re: Hiding Sidebox content

    Quote Originally Posted by ideasgirl View Post
    Hi BillyBoyle,

    Sorry for the delay but has been busy...

    I tried this tonight and it breaks my cart (I believe the only change was on the module file?). Here's my copy as my sidebox parameters:
    PHP 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 $
     */

      // test if box should display
      
    $show_messageme_sidebox true;
    if (
    $_SERVER['HTTPS']== 'on' ){
        
    $show_messageme_sidebox false;
    }  

      if (
    $show_messageme_sidebox == true) {
          require(
    $template->get_template_dir('tpl_messageme.php',DIR_WS_TEMPLATE$current_page_base,'sideboxes'). '/tpl_messageme.php');
          
    $title =  BOX_HEADING_MESSAGEME_SIDEBOX;
          
    $title_link false;
          require(
    $template->get_template_dir($column_box_defaultDIR_WS_TEMPLATE$current_page_base,'common') . '/' $column_box_default);
     }
    ?>
    Here's what happens: http://img39.imageshack.us/img39/1736/aquatic.jpg

    Let me know if I have to make changes in any other of the files or if there's something wrong on this one.
    Oooo that's not good.
    But just like the blank you are using you need to work between 3 files. The contents I show is in the defines file. Tell you what, send me your 3 files for blank sidebox and the message me files, if you don't mind. I'll build the mod and send it back to you.

  3. #13
    Join Date
    Jul 2011
    Location
    Glasgow, Scotland
    Posts
    113
    Plugin Contributions
    1

    Default Re: Hiding Sidebox content

    Hi, okay at home now and can take a closer look on proper screen. Done a little compare and contrast on your file contents and YES there are some difference I think you need altered.

    Here is the contents of my module file with calls and pointer changed to suit your messageme box.
    Code:
    <?php
    /**
     * secure sidebox - allows a secure sidebox to be added to your site
     * with secure connection check
     */
      // test if box should display
      
      $show_messageme_sidebox = true;
      
    if (($_SERVER['HTTPS']== 'on' ) || (in_array($current_page_base,explode(",",'login,logoff,account,create_account,shopping_cart,checkout_shipping,checkout_payment,checkout_confirmation,checkout_success,checkout,fec_confirmation,login,no_account')) )) {
    	$show_messageme_sidebox = false; // this line makes the whole box not show on certain pages, not just the contents. just like in the file tpl_main_page.php
    									 // the above comma seperated list needs to match any pages you list there. tpl_main_page.php about line #41
    }
      elseif ($show_messageme_sidebox == true) { //shows the box everywhere else.
          require($template->get_template_dir('tpl_messageme.php',DIR_WS_TEMPLATE, $current_page_base,'sideboxes'). '/tpl_messageme.php');
          $title =  BOX_HEADING_MESSAGEME_SIDEBOX;
          $title_link = false;
          require($template->get_template_dir($column_box_default, DIR_WS_TEMPLATE, $current_page_base,'common') . '/' . $column_box_default);
      }
      else{ // refreshes the page only if the box shows and the page is on SSL connection
    echo '<script type="text/javascript">
    //<![CDATA[
    if (window.location.protocol != "http:")
        window.location.href = "http:" + window.location.href.substring(window.location.protocol.length);
    	//]]>
    	</script>';  }
    ?>
    Don't know if the rest of your files are okay? as I suggested last night if you send the rest I can check.
    This should be how your /includes/templates/YOUR_TEMPLATE/sideboxes/tpl_messageme.php could look (without seeing it I can't be sure)
    (guessing on the 3nd contents .= calls)
    Code:
    <?php
    
      $content = '';
      $content .= '<div id="' . str_replace('_', '-', $box_id . 'Content') . '" class="sideBoxContent">';
      $content .= '<div>' . TEXT_MESSAGEME_SIDEBOX . '</div>';
      $content .= '';
      $content .= '</div>';
    
    ?>
    And your /includes/languages/english/extra_definitions/YOUR_TEMPLATE/your_sidebox_defines.php file
    Don't know unless I see it. the one for this mod looks like this.

    Code:
    <?php
    /**
     * secure sidebox definitions - text or code for inclusion in a new secure sidebox
     * with secure connection check
     */
    define('BOX_HEADING_SECURE_SIDEBOX', 'Socialise');
    define('TEXT_SECURE_SIDEBOX', '<div class="addthis_toolbox addthis_default_style addthis_32x32_style">
    <a class="addthis_button_preferred_1"></a>
    <a class="addthis_button_preferred_2"></a>
    <a class="addthis_button_preferred_3"></a>
    <a class="addthis_button_preferred_4"></a>
    <a class="addthis_button_compact"></a>
    <a class="addthis_counter addthis_bubble_style"></a>
    </div>
    <script type="text/javascript">var addthis_config = {"data_track_addressbar":true};</script>
    <script type="text/javascript" src="http://s7.addthis.com/js/250/addthis_widget.js#pubid=ra-****************"></script>
    // All of this gets changed to whatever you want to have showing when the box shows. Text, javascript, php
    ');
    ?>
    Hope this helps, but if not keep the questions coming.

  4. #14
    Join Date
    Aug 2005
    Location
    Trujillo Alto, Puerto Rico
    Posts
    1,535
    Plugin Contributions
    9

    Default Re: Hiding Sidebox content

    Yes, that made the trick BUT... (of course there's a BUT)...

    I know you changed the code to make a "redirection" to a non-ssl after login (instead of having the text telling people to somehow click to a non-ssl link and make the switch). But my login is not doing that... After the login, it goes to index BUT DOESN'T change the page to http:, it leaves it https instead. Which bring us back to almost same issue because even though I don't have an SSL warning the sidebox doesn't show up immediately on home, and then I don't know how to add the text (like the one you used to have on your site) to explaint it.

    Does that make sense to you? Do you understand what I mean?
    IDEAS Girl
    IDEAS Creative Group
    = Your image... our business!

  5. #15
    Join Date
    Jul 2011
    Location
    Glasgow, Scotland
    Posts
    113
    Plugin Contributions
    1

    Default Re: Hiding Sidebox content

    Hi, Yes I removed the text info part altogether when I made to page reload automatic.
    It could be added back in, but it really did nothing where I had it. Except made the customer look for a link to reload the page manually.
    When I thought about it I didn't really want to give the "stupid" visitors more to get wrong.

    Will not have the time to anything about it for a few days, Sunday the earliest. It will take a little time to re-write the code that stops auto refresh and work out where to safely put an on-click command.

    Do you have it running on your site just now? I had a look and can't tell if it's there or there and not working.
    You do seem to have it kind of half implemented, as when I change the protocol to https some of the contents of the box don't show.

    Your Sidebox goes from this
    Click image for larger version. 

Name:	message-me-good.jpg 
Views:	46 
Size:	10.1 KB 
ID:	10716

    To this
    Click image for larger version. 

Name:	message-me-bad.jpg 
Views:	42 
Size:	5.8 KB 
ID:	10715

    So there is something going on with it, but without access to your pagecode I just don't know sorry.

    You did back-up didn't you? load the page from before the mod, apply the same changing to secure sidebox as you did to blank sidebox (they are just the same basic sidebox template) and see how that goes.

    Wish I could be of more help at this time. Billy

  6. #16
    Join Date
    Aug 2005
    Location
    Trujillo Alto, Puerto Rico
    Posts
    1,535
    Plugin Contributions
    9

    Default Re: Hiding Sidebox content

    Hi Billy! No, I haven't done it on my site (I will though). I just used it on my customer's store.

    You are right, no need to confuse "stupid" visitors

    It's not a biggy since the customer is happy without the SSL warning issue; it just would be nice...
    IDEAS Girl
    IDEAS Creative Group
    = Your image... our business!

 

 
Page 2 of 2 FirstFirst 12

Similar Threads

  1. v150 Help hiding a sidebox from certain pages
    By ray-the-otter in forum General Questions
    Replies: 3
    Last Post: 1 May 2013, 01:07 PM
  2. putting ezpage content in sidebox or editing sidebox from admin
    By nilsen in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 7 Jan 2010, 09:30 PM
  3. Hiding subcat from category sidebox
    By Tim M in forum Setting Up Categories, Products, Attributes
    Replies: 1
    Last Post: 5 Jan 2009, 11:51 PM
  4. Sidebox Content Pushed Sideways in IE for Aweber Sidebox
    By lindasdd in forum Basic Configuration
    Replies: 2
    Last Post: 17 Dec 2008, 03:48 PM
  5. changing sidebox name and content for that sidebox
    By zc-newbie in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 19 Aug 2006, 06:13 AM

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