Results 1 to 9 of 9

Hybrid View

  1. #1
    Join Date
    Mar 2013
    Posts
    48
    Plugin Contributions
    0

    Default Problem with Blank Sidebox Plugin

    this is my website: https://www.toyzeum.com/store


    this is my tpl_blank_sidebox.php file:

    "<?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">';

    // Replace the text and HTML tags between the apostophes on lines 19 and 20.
    // Use as many or as few lines using this model as you need for your custom content.
    // If you have a multilingual site define your text in the languages/YOUR_LANGUAGE/extra_definitions/blank_sidebox_defines.php and include it as shown in line 19.
    // If your site is monolingual, you can put the text right here as shown on line 20 (and nobody will know!)



    $content .= '<HTML><IMG SRC="https://www.toyzeum.com/store/images/main/rightsidebar_incoming2.jpg"><IMG SRC="https://www.toyzeum.com/store/images/main/rightsidebar_incoming<?
    $num = Rand (1,6);
    switch ($num)
    {
    case 1:
    echo "1";
    break;
    case 2:
    echo "2";
    break;
    case 3:
    echo "2";
    break;
    case 4:
    echo "2";
    break;
    case 5:
    echo "1";
    break;
    case 6:
    echo "1";
    }?>.jpg"></HTML>';

    $content .= '</div>';
    ?>



    Description: As you can see... I have a basic image which is displaying fine in the right hand sidebar... followed by a random image PHP script contained within Image HTML coding. There should be two images displaying.. A normal image followed by a rotating image....Any ideas why it is not displaying correctly and if there is a way to get it being able to display random images? I also would like the image to be displaying at the very top of the sidebar but there is a small gap of whitespace? any idea what is causing that small gap and how to get rid of that ? I am a new forum user. Thank you kindly for your help. - Aaron

  2. #2
    Join Date
    Feb 2010
    Posts
    2,159
    Plugin Contributions
    17

    Default Re: Problem with Blank Sidebox Plugin

    Why not use Banner Manager?

  3. #3
    Join Date
    Mar 2013
    Posts
    48
    Plugin Contributions
    0

    Default Re: Problem with Blank Sidebox Plugin

    i just really want to understand why this is not working the way it is rather than looking for other alternatives at this point...

  4. #4
    Join Date
    Jan 2007
    Location
    Los Angeles, California, United States
    Posts
    10,021
    Plugin Contributions
    32

    Default Re: Problem with Blank Sidebox Plugin

    Quote Originally Posted by aaronjmorgan View Post
    i just really want to understand why this is not working the way it is rather than looking for other alternatives at this point...
    And that's fine, but what is being suggested is built into Zen Cart and is very similar to the random image code you are using.. The end result is EXACTLY the same output that you are trying to achieve with your script (random rotating images that change whenever the page refreshes -- do not let the term "banner" throw you off.. I often say that the banner functions are one of the most underused and versatile features within Zen Cart).. That's why it was suggested..

    Carry on..
    My Site - Zen Cart & WordPress integration specialist
    I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.

  5. #5
    Join Date
    Mar 2013
    Posts
    48
    Plugin Contributions
    0

    Default Re: Problem with Blank Sidebox Plugin

    Quote Originally Posted by DivaVocals View Post
    And that's fine, but what is being suggested is built into Zen Cart and is very similar to the random image code you are using.. The end result is EXACTLY the same output that you are trying to achieve with your script (random rotating images that change whenever the page refreshes -- do not let the term "banner" throw you off.. I often say that the banner functions are one of the most underused and versatile features within Zen Cart).. That's why it was suggested..

    Carry on..

    I tried to replace "echo" with "$content .=" but that didnt work either.... I checked out the banner section and I actually like how it tracks the banners... So I will go with that. Thank you... With regard to my other question... does anyone know how to get rid of the white space that is above the sideboxes. I want my sideboxes to go all the way to the top up against my top bar of sections. You can see that the Incoming image is designed to merge with my breadcrumb trail bar which is grey.

    Also why do i feel like some people are following me and posting harsh things... As i said... i am new to zen cart and trying to learn... I am new to PHP as well and do not know too much... but the best way to learn is by doing it. People are snapping at me for not using overrides... relax... its making the forums unpleasant for me and ive only been using these forums for like 4 days...

    If you can help me with the white space gap i would really appreciate it. Thank you

  6. #6
    Join Date
    Jan 2007
    Location
    Los Angeles, California, United States
    Posts
    10,021
    Plugin Contributions
    32

    Default Re: Problem with Blank Sidebox Plugin

    Quote Originally Posted by aaronjmorgan View Post
    I tried to replace "echo" with "$content .=" but that didnt work either.... I checked out the banner section and I actually like how it tracks the banners... So I will go with that. Thank you... With regard to my other question... does anyone know how to get rid of the white space that is above the sideboxes. I want my sideboxes to go all the way to the top up against my top bar of sections. You can see that the Incoming image is designed to merge with my breadcrumb trail bar which is grey.
    Once you get the banners setup I think you be RELEIVED that you didn't spend one more minute trying to make this work.. PLUS the tracking feature is tre cool!


    Quote Originally Posted by aaronjmorgan View Post
    Also why do i feel like some people are following me and posting harsh things... As i said... i am new to zen cart and trying to learn... I am new to PHP as well and do not know too much... but the best way to learn is by doing it. People are snapping at me for not using overrides... relax... its making the forums unpleasant for me and ive only been using these forums for like 4 days...
    I don't think anyone is following you persay.. folks just answer posts when they see them posted.. and if they are following the recent posts filter (as many of us are) and you are posting a LOT of questions which are popping up in the new posts filter, then it may appear that folks are following you.. but trust me.. No one is stalking anyone here..

    From what I've seen the information posted is meant to help, not punish you.. Take your question to get your random image code to work, it raised flags for a LOT of us here to see that you were brand new to Zen Cart, (and inexperienced with PHP and such) and without making sure that your path was a good solid path to take, you dove into this and IMMEDIATELY began make core code changes that many of us KNEW were not necessarry to achive what you wanted.. The reason for the seemingly harsh tones is that we all saw you walking down a path that would lead to issues later and especially would be problematic come upgrade time.. Don't take it personal.. I got beat up a LOT when I first got here asking newbie questions and making newbie statements.. But I toughened up and realized that most here are really just trying to help..

    TRULY folks are just trying to help.. You will find though that we are a group of direct speakers.. (myself ESPECIALLY!!)
    Last edited by DivaVocals; 19 Apr 2013 at 01:35 AM.
    My Site - Zen Cart & WordPress integration specialist
    I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.

  7. #7
    Join Date
    Feb 2010
    Posts
    2,159
    Plugin Contributions
    17

    Default Re: Problem with Blank Sidebox Plugin

    I do not believe
    PHP Code:
    echo 
    will work within the sidebox. The sidebox contents are output by
    PHP Code:
    $content .= 
    try replacing echo with $content

    I do not utilize zen cart sidebox functionality as much these days except to display product and/or navigation.

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

    Default Re: Problem with Blank Sidebox Plugin

    See the detailed answer in your other thread on the same topic (post 17):
    http://www.zen-cart.com/showthread.p...ery-frustrated

  9. #9
    Join Date
    Feb 2010
    Posts
    2,159
    Plugin Contributions
    17

    Default Re: Problem with Blank Sidebox Plugin

    Quote Originally Posted by gjh42 View Post
    See the detailed answer in your other thread on the same topic (post 17):
    http://www.zen-cart.com/showthread.p...ery-frustrated
    yes, what Glenn says

 

 

Similar Threads

  1. v139h How do I hide "Blank Sidebox" plugin on hompage?
    By Chargin in forum Addon Sideboxes
    Replies: 1
    Last Post: 21 Jun 2012, 05:29 AM
  2. Trouble with Blank Sidebox Module
    By taraeng in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 28 Apr 2011, 07:50 PM
  3. Problems with Blank Sidebox
    By cassiedesigns in forum All Other Contributions/Addons
    Replies: 1
    Last Post: 17 Jan 2009, 01:30 AM
  4. Blank sidebox with extra spaces
    By sjohnstone in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 15 Dec 2008, 03:26 AM
  5. Annoying Problem - Please Help - adapting blank sidebox
    By fantasticals in forum Basic Configuration
    Replies: 1
    Last Post: 16 May 2007, 09:23 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