Page 1 of 2 12 LastLast
Results 1 to 10 of 16
  1. #1
    Join Date
    Jul 2011
    Location
    Glasgow, Scotland
    Posts
    113
    Plugin Contributions
    1

    Idea or Suggestion Hiding Sidebox content

    @ ideasgirl

    Cool I'll check out the box, I take it it's available in the download section...

    Here is a little change I made it checks the two criteria you need logged in and ssl connected ( It think )
    As I am not at home, stuck at work and skiving an extra long break, shhhh don't talk load.
    Anyway here's the update to the answer.

    Code:
    <?php // hide If customer logged in and SSL connection true
    
    // include("/includes/application_top.php"); really not sure if this is needed as should be called in header
    
    // un-comment these two line if it's not called already
    
    if (isset($_SESSION['customer_id']== > 0 ) && ($_SERVER['HTTPS']=='on')){
    
    echo '<div class="clearBoth">';
    
    echo ' whatever happens when login true and ssl true ';
    echo '</div>';
    }
    
    // show If customer not logged in and SSL connection false
    else {
    
    echo '<div class="clearBoth">';
    
    echo ' whatever happens when login false and ssl false like your normal sidebox stuff ';
    echo '</div>';
    
    } // End if
    ?>
    You could run this to show two different box contents or the message me for visiters and a nice graphic for logged in secure customers. I am sure you have probably thought of all that allready.

    Anyhoo! back to work for me.
    Last edited by BillyBoyle; 13 Jun 2012 at 11:27 PM. Reason: Spelling, probably still errors

  2. #2
    Join Date
    Aug 2005
    Location
    San Juan, Puerto Rico
    Posts
    1,525
    Plugin Contributions
    9

    Default Re: Hiding Sidebox content

    Billy I really appreciate your help/support, but I'm a bit lost with your solution. What will exactly do? And you posted this is for v1.5? I only asked for a modification to make the login page to direct the customer to the account page or mainpage without the https since it was giving the warning of non-encrypted items being displayed.

    I'm not a coder and I'm not sure what to do with your "script" does it go in the module file or on the template file?

    I really don't know if this is what I want, I don't want the box to be available only for logged customer, neither to non-logged customers; I just don't want the SSL non-encrypted items warning popping up all over the place.
    IDEAS Girl
    IDEAS Creative Group
    = Your image... our business!
    My contributions: SophyBlue / Sophy Blue-Grey / Mistik / The Bookshelf / Dynamic Sideboxes

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

    Default Re: Hiding Sidebox content

    Sure sorry for the confusion.
    If you give me a mo I'll explain...

    What the code above would do is check in the side-box you are using,
    If the customer is logged in and the customer is on a SSL connection.
    If yes you can choose to show them content in the particular side-box that does not throw up a SSL non-encrypted items warning. i.e. a nice graphic for instance.

    Alternatively if the customer is not logged in and hence not on a SSL connection the same box would show the normal content i.e. the content giving the problem.

    I have the same issue with SSL content, if you want to see similar use of the code pop over to my site and go to About Us page. (although not content in a side-box)
    In the address bar change the http: to https: and you can see what I mean.

    The AddThis buttons disappear and are replaced with text...

    I got stuck at work today, but had good intentions of re-building the box you mentioned in the other thread to include the coding for you and others to use. Oh well the road to hell and all that.

    Apologies for assuming you could follow what I was intending. I thought you may have been able to make use of it so far.
    If you can wait out a couple of days till I have some time off , work permitting, I will download the message me box and rework it so it does what you need.

  4. #4
    Join Date
    Aug 2005
    Location
    San Juan, Puerto Rico
    Posts
    1,525
    Plugin Contributions
    9

    Default Re: Hiding Sidebox content

    Ok, I see better your intentions now. I will try to understand how to incorporate your script into action tonight, if I can't then I will wait for you. I still not knowing WHERE I'm going to insert it.

    Your site is beautiful. You may want to fix a typo on your about us page: "Your are on a secure SSL connection!" it's supposed to be: "You are on a secure SSL connection!"

    Thanks for your great help!
    IDEAS Girl
    IDEAS Creative Group
    = Your image... our business!
    My contributions: SophyBlue / Sophy Blue-Grey / Mistik / The Bookshelf / Dynamic Sideboxes

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

    Default Re: Hiding Sidebox content

    Hi thanks for the heads up on the typo and compliment on my site.
    I tried looking for the message me sidebox, but could not find it in the plugins area.
    So I made a little SSL box to try and show you where the content would need to go.

    As it says in the files comments you can add just about anything to the box, including other php code.
    Perhaps the easiest way would be to take a copy of the code that controls the show - no show function and add it to the origional sodebox.

    The code would go in your /includes/modules/sideboxes/your_template/name_of_sidebox.php file. (although you, your client may not have an overrides folder for modules)

    You may see a line of code like: swap out the word secure for whatever your box is called.
    Code:
    $show_secure_sidebox = true;
    the code staement would go in after that.
    To look like this
    Code:
      $show_secure_sidebox = true;
    if ($_SERVER['HTTPS']== 'on' ){
    	$show_secure_sidebox = false;
    }
    
      if ($show_secure_sidebox == true) {
          require($template->get_template_dir('tpl_secure_sidebox.php',DIR_WS_TEMPLATE, $current_page_base,'sideboxes'). '/tpl_secure_sidebox.php');
          $title =  BOX_HEADING_SECURE_SIDEBOX;
          $title_link = false;
          require($template->get_template_dir($column_box_default, DIR_WS_TEMPLATE, $current_page_base,'common') . '/' . $column_box_default);
      }
    Anyway here is a little add-on box I put together to show you.
    Attached Files Attached Files

  6. #6
    Join Date
    Aug 2005
    Location
    San Juan, Puerto Rico
    Posts
    1,525
    Plugin Contributions
    9

    Default Re: Hiding Sidebox content

    I tried looking for the message me sidebox, but could not find it in the plugins area.
    No, that's because I just use the blank sidebox for this and didn't uploaded because I don't think people would be interested. I did this for my own site and only few customers have been interested to have it on their store.

    It worked like a charm. THANKS! Now, if you could tell me how to insert the a custom message (like the one on your site) to appear when the box doesn't show up so people know how to make it appear for them to use (like, click on the logo for chat box).
    IDEAS Girl
    IDEAS Creative Group
    = Your image... our business!
    My contributions: SophyBlue / Sophy Blue-Grey / Mistik / The Bookshelf / Dynamic Sideboxes

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

    Default Re: Hiding Sidebox content

    Yepee! :-D Glad that works for you.
    Posting at work again, can't give a full answer. When I'm at home tomorrow I'll write the code for you and some details of what and where to change stuff.

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

    Default Re: Hiding Sidebox content

    Hi only had a little while to work on this today, so not quite there yet. Well I'm not happy with it yet.
    Got the box doing an auto page reload and changing to http://, so no issues with it not showing on the general cart pages after logging in. Just need to have it do a further check for pages that are secured with SSL and there is a need to show the box with some content ( even if that's a graphic or text stating the user is on SSL). Anyway a few hours tomorrow and it should be good to go. Might even release it as a mod.

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

    Idea or Suggestion Re: Hiding Sidebox content

    Okay managed to get this working just how I would like it.
    1. site visitor arrives on home page "the box" is showing with content. (for you that would be message me)
    2. site visitor logs in and is returned to home page. "the box" checks foe SSL and reloads page for NONSSL version. i.e. content is shown.
    3. site visitor is logged in and goes to account page or adds to cart and goes to checkout, any page with SSL and side boxes showing. "the box" checks for current page base and hides the box along with content. Not throwing up a SSL content warning.

    Think that's all there needs to be done? except testing it on other sites, like yours .

    Here is where and how to change the included content:

    1. Use as many or as few lines using this model as you need for your custom content. from tpl_secure_sidebox.php
    2. if you only need the one line delete line 9. or
    3. If you have a multilingual site, add a defines (secure_sidebox_defines.php) your set up in the languages/YOUR_LANGUAGE/extra_definitions/ folder this includes it as shown in line 8.
    4. If your site is monolingual, you can put the text right here as shown on line 9 (and nobody will know!) remember if not using line 8 just remove it all together.
    5. Replace the text and HTML tags between the apostophes on lines 8 and 9.
    6. To add a header to the box use languages/english/extra_definitions/secure_sidebox_defines.php add it on line 6 (BOX_HEADING_SECURE_SIDEBOX)

    Hope this explains it well, if not just give me a shout. Always happy to help.

    For what it looks like on site just pop over to AML Candles look for "the box" SOCIALISE.
    then either log in as UserName: [email protected] - Password: likeitnow
    or
    change the address to
    Code:
     https://amlcandles.co.uk
    You should notice no difference at all "the box" will still be there, with content and the address will change back to
    Code:
    amlcandles.co.uk
    Hope you like it.
    Oh and by the way you asked why it was tagged as V1.5
    Don't know really it was a tick box on the new post screen and either I didn't unticked or ticked it along with others

    Replace the last SSL_SIDEBOX files with these and you're good to go.
    Attached Files Attached Files

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

    Default Re: Hiding Sidebox content

    Submitted to the Plugins and Addons section.
    My First Addon.
    Awaiting approval.

 

 
Page 1 of 2 12 LastLast

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