Results 1 to 9 of 9
  1. #1
    Join Date
    Oct 2012
    Location
    Haysville, Ks
    Posts
    13
    Plugin Contributions
    0

    xhtml problem Need some sidebox and sql help

    ZenCart v1.5.0
    Template: Mystik
    Site:http://www.prymlurg.com

    I am trying to duplicate the no_boarder sidebox so I can add images to the side box area without headers, boarders, or backgrounds. I have duplicated the box seven times so that I can apply the box to a particular page. So, if I want the box on the index page I would use no_boarder_sidebow_main. If I want it on the contact page I would use no_boarder_sidebox_contact.

    I think I have made all the correct changes to the code but I would like some verification before I proceed to testing on my site.

    I also need some help with the stylesheet. I want to make sure there is no header, boarder, or background. But I also want to make sure that any text that I add is formatted the same as other sideboxes.

    Here are the changes I made to my main page no_boarder_sidebox.

    Original tpl_no_boarder_sidebox.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 $
     */
    
      $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/no_boarder_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 .= '<p>' . TEXT_NO_BOARDER_SIDEBOX . '</p>';
      $content .= '<p>You can include text, links, images, HTML markup and even PHP code</p>';
    
      $content .= '</div>';
    ?>

    Mod tpl_no_boarder_sidebox.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 $
     */
    
      $content = '';
      $content .= '<div id="' . str_replace('_', '-', $box_id . 'Content') . '" class="sideBoxContentNhnb">';
    
      // 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/no_boarder_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 .= '<p>' . TEXT_NO_BOARDER_SIDEBOX_MAIN . '</p>';
      $content .= '<p>You can include text, links, images, HTML markup and even PHP code</p>';
    
      $content .= '</div>';
    ?>

    Original no_boarder_sidebox.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_no_boarder_sidebox = true;
    
      if ($show_no_boarder_sidebox == true) {
          require($template->get_template_dir('tpl_no_boarder_sidebox.php',DIR_WS_TEMPLATE, $current_page_base,'sideboxes'). '/tpl_no_boarder_sidebox.php');
          $title =  BOX_HEADING_NO_BOARDER_SIDEBOX;
          $title_link = false;
          require($template->get_template_dir($column_box_default, DIR_WS_TEMPLATE, $current_page_base,'common') . '/' . $column_box_default);
     }
    ?>

    Mod no_boarder_sidebox.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_no_boarder_sidebox_main = true;
    
      if ($show_no_boarder_sidebox_main == true) {
          require($template->get_template_dir('tpl_no_boarder_sidebox_main.php',DIR_WS_TEMPLATE, $current_page_base,'sideboxes_nhnb'). '/tpl_no_boarder_sidebox_main.php');
          $title =  BOX_HEADING_NO_BOARDER_SIDEBOX_MAIN;
          $title_link = false;
          require($template->get_template_dir($column_box_default, DIR_WS_TEMPLATE, $current_page_base,'common') . '/' . $column_box_default);
     }
    ?>

    Original no_boarder_sidebox_defines.php:
    Code:
    <?php
    /**
     * blank sidebox definitions - text for inclusion in a new blank sidebox
     *
     * @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 $
     */
    
    define('BOX_HEADING_NO_BOARDER_SIDEBOX', '');
    define('TEXT_NO_BOARDER_SIDEBOX', 'Replace this text with your HTML content.');
    
    ?>

    Mod no_boarder_sidebox_defines.php:
    Code:
    <?php
    /**
     * blank sidebox definitions - text for inclusion in a new blank sidebox
     *
     * @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 $
     */
    
    define('BOX_HEADING_NO_BOARDER_SIDEBOX_MAIN', '');
    define('TEXT_NO_BOARDER_SIDEBOX_MAIN', 'Replace this text with your HTML content.');
    
    ?>
    I think this actually applies to a different sidebox. Yes/No???
    Original no_boarders_sidebox_defines_2.php:
    Code:
    <?php
    /**
     * blank sidebox definitions - text for inclusion in a new blank sidebox
     *
     * @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 $
     */
    
    define('BOX_NO_BOARDER_SIDEBOX', '');
    define('TEXT_NO_BOARDER_SIDEBOX', '/images/lc/IMG_0162.JPG');
    
    ?>

    Mod no_boarders_sidebox_defines_2.php:
    Code:
    <?php
    /**
     * blank sidebox definitions - text for inclusion in a new blank sidebox
     *
     * @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 $
     */
    
    define('BOX_NO_BOARDER_SIDEBOX_MAIN', '');
    define('TEXT_NO_BOARDER_SIDEBOX_MAIN', '/images/lc/IMG_0162.JPG');
    
    ?>

    Now here's the css. I duplicated the section that applies to the sideboxes.
    Added code:
    Code:
    /*sideboxes_nhnb*/
    
    /*This controls the sidebox_nhnb content*/
    .sideBoxContentNhnb {
    	font-size: 11px;
    	line-height: 125%;
    	padding-top: 1px;
    	padding-left: 1px;
    	padding-right: 1px;
    	padding-bottom: 1px;
    	}
    I am pretty sure that I am missing something in the css.


    I also need help with the sql to insert the sideboxes to the Layout Box Controller in the admin section. I need the sql for the the MAIN page sideboxes and the areas of the sql that I would need to change for each additional page.

    One more question. I know when adding these boxes I can only apply the box to either the left or right side. Do I have to duplicate all of these files again for each side? For example: no_boarder_sidebox_main_left.php and no_boarder_sidebox_right.php.

    Have I missed anything else? Other files I need to modify?


    Thank you in advance for the help.

  2. #2
    Join Date
    Feb 2005
    Location
    Lansing, Michigan USA
    Posts
    20,021
    Plugin Contributions
    3

    Default Re: Need some sidebox and sql help

    Sorry, but I have no idea what you're asking.

    If you have several examples of the Blank Sidebox mod, you need to change all instances of BLANK_SIDEBOX in all files from the mod to whatever you've chosen to name your sidebox.

    If you've installed the mod(s) correctly, there's no reason for any SQL work. The sideboxes will show up in Layout Boxes - Controller automatically.

    You can set left or right side in Layout Boxes Controller.

  3. #3
    Join Date
    Oct 2012
    Location
    Haysville, Ks
    Posts
    13
    Plugin Contributions
    0

    Default Re: Need some sidebox and sql help

    I want to remove the header, boarder, and background image so that when I put a image in the sidebox all you see is the image.

    I did finally find the info for the blank_sidebox mod and how to duplicate it.

    Now I need to figure out what changes I need to make to the stylesheet so the header, boarder, and background does not show.

  4. #4
    Join Date
    Oct 2012
    Location
    Haysville, Ks
    Posts
    13
    Plugin Contributions
    0

    Default Re: Need some sidebox and sql help

    I understand the blank_sidebox mod and how to duplicate it. What do I need to add to the stylesheet to remove the boarder, header, and background for the blank_sidebox only and no other boxes. And what changes do I need to in the blank_sidebox php file to pull from the stylesheet correctly.

  5. #5
    Join Date
    Feb 2005
    Location
    Lansing, Michigan USA
    Posts
    20,021
    Plugin Contributions
    3

    Default Re: Need some sidebox and sql help

    By default, the Blank Sidebox sidebox has no background, so all you should have to add to the stylesheet is display: none; to #blanksideboxheading and border: none; to #blanksidebox.
    Last edited by stevesh; 14 Oct 2012 at 09:47 PM.

  6. #6
    Join Date
    Oct 2012
    Location
    Haysville, Ks
    Posts
    13
    Plugin Contributions
    0

    Default Re: Need some sidebox and sql help

    Thank you for your help. Ultimately these are the changes I had to make to get rid of the header, background, and boarder. I also ended up with a sidebox footer I had to take care of also. The code in red is what I had to add.

    Code:
    .leftBoxHeading, .rightBoxHeading {
    	margin: 0em;
    	background-image:url(../images/box1.jpg);
    	background-repeat: no-repeat;
    	padding: 10px;
    	}
    
    #blanksideboxHeading {
    	display: none;
    	}
    
    
    .leftBoxContainer, .rightBoxContainer {
    	background-image:url(../images/box2.jpg);
    	background-repeat: repeat-y;
    	margin-top: 0px;
    	}
    	
    #blanksidebox {
    	background: none;
    	}
    	
    
    .sideBoxContent {
    	background-image:url(../images/box3.jpg);
    	background-repeat: no-repeat;
    	background-position:bottom;
    	font-size: 11px;
    	line-height: 125%;
    	padding-top: 5px;
    	padding-left: 20px;
    	padding-right: 20px;
    	padding-bottom: 25px;
    	}
    	
    #blanksideboxContent {
    	background-image: none;
    	font-size: 11px;
    	line-height: 125%;
    	padding-top: 5px;
    	padding-left: 20px;
    	padding-right: 20px;
    	padding-bottom: 25px;
    	}

  7. #7
    Join Date
    Oct 2012
    Location
    Haysville, Ks
    Posts
    13
    Plugin Contributions
    0

    Default Re: Need some sidebox and sql help

    Last post. I think. To recap:

    I wanted to create a sidebox to display images without the sidebox header, footer, border, and background so all you would see is an image off to the side. So if I had images of widgets, the widget images could only be displayed on the widget description page. If I had images of dodads, the dodad images would only be displayed on the dodad description page.

    So, as instructed, I use the Blank_Sidebox Mod. I changed the all the file names to reflect the page it would be displayed on (blank_sidebox_defines to main_sidebox_defines). I also changed the information in the files as instructed (blank_sidebox and BLANK_SIDEBOX to main_sidebox and MAIN_SIDEBOX). I did this seven times for each of the four file contained in the mod. Once for each page that I wanted unique images in the sidebox area. Check out the Blank_Sidebox forum thread for help.

    Now came the part that took me a while to search and get right. The stylesheet.css. Here's what finally worked for me and my Mistik template.

    The first code in red is the addition I made to my template stylesheet.css. The second code in blue is what I did for each of the additional six sideboxes that I needed.

    Code:
    .leftBoxHeading, .rightBoxHeading {
    	margin: 0em;
    	background-image:url(../images/box1.jpg);
    	background-repeat: no-repeat;
    	padding: 10px;
    	}
    
    #blanksideboxHeading, mainsideboxHeading,.... {
    	display: none;
    	}
    
    
    .leftBoxContainer, .rightBoxContainer {
    	background-image:url(../images/box2.jpg);
    	background-repeat: repeat-y;
    	margin-top: 0px;
    	}
    	
    #blanksidebox, mainsidebox, ... {
    	background: none;
    	}
    	
    
    .sideBoxContent {
    	background-image:url(../images/box3.jpg);
    	background-repeat: no-repeat;
    	background-position:bottom;
    	font-size: 11px;
    	line-height: 125%;
    	padding-top: 5px;
    	padding-left: 20px;
    	padding-right: 20px;
    	padding-bottom: 25px;
    	}
    	
    #blanksideboxContent, mainsideboxContent,... {
    	background-image: none;
            border: none;
    	font-size: 11px;
    	line-height: 125%;
    	padding-top: 5px;
    	padding-left: 20px;
    	padding-right: 20px;
    	padding-bottom: 25px;
    	}
    I hope I didn't make this to confusing for you cause I sure made it confusing for me.

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

    Default Re: Need some sidebox and sql help

    Glad to see you got it figured out properly! For others, note that
    Code:
    #blanksidebox, #mainsidebox, ... {
    	background: none;
    	}
    needs to have the # before each id name (obviously you have done this, or it would not have worked).
    Also, most templates will need
    Code:
    	border: none;
    added to this rule to remove the border.

  9. #9
    Join Date
    Oct 2012
    Location
    Haysville, Ks
    Posts
    13
    Plugin Contributions
    0

    Default Re: Need some sidebox and sql help

    gjh42,

    Thanks for correcting that. And thank you for your help with my other thread. It took a lot of thread searching and help from other like you and stevesh, but I'm done with that mod.

 

 

Similar Threads

  1. v151 Need some help building a looping SQL query to fill an array.
    By Chris Stackhouse in forum General Questions
    Replies: 2
    Last Post: 3 Sep 2015, 08:19 PM
  2. I need some help with a SQL error
    By sw1138lr in forum Basic Configuration
    Replies: 1
    Last Post: 25 Mar 2013, 12:25 AM
  3. Need some help with sideboxes and such
    By knight74 in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 10 Dec 2007, 08:28 PM
  4. Meta Mistakes and Need some help ZC 1.3.7
    By bumba000 in forum General Questions
    Replies: 12
    Last Post: 12 Mar 2007, 06:39 AM
  5. Need help with Tax Rates and SQL
    By pleitch in forum Currencies & Sales Taxes, VAT, GST, etc.
    Replies: 4
    Last Post: 19 Sep 2006, 02:15 AM

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