Results 1 to 4 of 4
  1. #1
    Join Date
    Aug 2008
    Posts
    274
    Plugin Contributions
    0

    Default Simple Question about Sidebox

    Hello,

    Somehow I messed this up.

    On this page http://www.artonthevines.com/STL_Art...page=page&id=9

    I created a second blank sidebox. But the first one is messed up now.

    I have both of the (blank_sidebox_defines) set to have a different value, the first should say "Stay connected" and the second should say "sign up"

    currently they both say "sign up" but I have the two files setup to say something different. Somehow I have code that must be calling "blank_sidebox_defines_2) for the first one, any idea where this line would be?

    thanks

  2. #2
    Join Date
    Jun 2005
    Location
    Cumbria, UK
    Posts
    10,263
    Plugin Contributions
    3

    Default Re: Simple Question about Sidebox

    When you CLONE this "blank sidebox" module, the BEST thing to do is to RE-NAME all the constants and defines to something emtirely different from "blank_sidebox".

    For example, I created a CLONE from the blank sidebox module to show a sidebox for the MEMBERSHIPS my client has.

    The FIRST thing I did was to RE-NAME the PHP files in each of the folders:

    FROM THIS:
    languages/english/extra_definitions/blank_sidebox_defines.php
    modules/sideboxes/blank_sidebox.php
    templates/template_default/sideboxes/tpl_blank_sidebox.php

    TO THIS:
    languages/english/extra_definitions/membership_sidebox_defines.php
    modules/sideboxes/membership_sidebox.php
    templates/template_default/sideboxes/tpl_membership_sidebox.php

    Then, in each of the RE-NAMED php files, I changed every instance of blank_sidebox and BLANK_SIDEBOX to membership_sidebox and MEMBERSHIP_SIDEBOX

    EG, for languages/english/extra_definitions/membership_sidebox_defines.php:

    PHP Code:
    <?php
    /**
     * membership sidebox definitions - text for inclusion in a new membership 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: membership_sidebox.php 2007-05-26 kuroi $
     */

    define('BOX_HEADING_MEMBERSHIP_SIDEBOX''Membership Sidebox Header');
    define('TEXT_MEMBERSHIP_SIDEBOX''Replace this text with your HTML content.');

    ?>
    AND FOR: modules/sideboxes/membership_sidebox.php

    PHP Code:
    <?php
    /**
     * membership sidebox - allows a membership 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: membership_sidebox.php 2007-05-26 kuroi $
     */

      // test if box should display
      
    $show_membership_sidebox true;

      if (
    $show_membership_sidebox == true) {
          require(
    $template->get_template_dir('tpl_membership_sidebox.php',DIR_WS_TEMPLATE$current_page_base,'sideboxes'). '/tpl_membership_sidebox.php');
          
    $title =  BOX_HEADING_MEMBERSHIP_SIDEBOX;
          
    $title_link false;
          require(
    $template->get_template_dir($column_box_defaultDIR_WS_TEMPLATE$current_page_base,'common') . '/' $column_box_default);
     }
    ?>
    AND FOR: templates/template_default/sideboxes/tpl_membership_sidebox.php
    PHP Code:
    <?php
    /**
     * membership sidebox - allows a membership 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: membership_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/membership_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_MEMBERSHIP_SIDEBOX '</p>';
      
    $content .= '<p>You can include text, links, images, HTML markup and even PHP code</p>';

      
    $content .= '</div>';
    ?>
    Last edited by schoolboy; 28 Dec 2012 at 06:52 PM.
    20 years a Zencart User

  3. #3
    Join Date
    Aug 2008
    Posts
    274
    Plugin Contributions
    0

    Default Re: Simple Question about Sidebox

    perfect, thank you.

  4. #4
    Join Date
    Jun 2007
    Location
    Nashville, TN
    Posts
    32
    Plugin Contributions
    1

    Default Re: Simple Question about Sidebox

    To fix your css input box issue for the input field displayed from chimpMail:

    add this new line to your /STL_Art_Classes/includes/templates/modern_blue/css/stylesheet.css file:

    Code:
    #mc_embed_signupinput.email { display:block;  margin: 4px 10px; text-indent:5px; min-width: 100px; }
    
    This should set the alignment and width of the text box correctly so it doesn't shoot out past the left sidebox.
    The stylesheet is imported by ChimpMail when the page loads, by putting this line in your stylesheet, it *should* override ChimpMail's stylesheet.

    Also, see your code for the 2nd blankBox:

    Code:
    <!--// bof: blanksidebox2 //-->
    <div class="leftBoxContainer" id="blanksidebox2" style="width: 140px">
    <div class="sidebox-header-left "><h3 class="leftBoxHeading " id="blanksidebox2Heading">Sign Up</h3></div>
    <div id="blanksidebox2Content" class="sideBoxContent"><align="left">
    <link href="http://cdn-images.mailchimp.com/embedcode/slim-081711.css" rel="stylesheet" type="text/css">
    
    <style type="text/css">
        #mc_embed_signup{ clear:left; font:14px Helvetica,Arial,sans-serif; }
    
    
        /* Add your own MailChimp form style overrides in your site stylesheet or in this style block.
           We recommend moving this block and the preceding CSS link to the HEAD of your HTML file. */ 
    
    
    </style>
    
    <div id="mc_embed_signup">
    <form action="http://artonthevines.us6.list-manage.com/subscribe/post?u=1c5914a8ddf13cd03a00ec66c&amp;id=cb467a37ce" method="post" id="mc-embedded-subscribe-form" name="mc-embedded-subscribe-form" class="validate" target="_blank" novalidate>
        <label for="mce-EMAIL">Subscribe to our mailing list</label>
        <input type="email" value="" min-width: 90px; name="EMAIL" class="email" id="mce-EMAIL" placeholder="email address" required>
        <div class="clear"><input type="submit" value="Subscribe" name="subscribe" id="mc-embedded-subscribe" class="button"></div>
    </form>
    </div>
    
    
    </div></div>
    <!--// eof: blanksidebox2 //-->
    Last edited by hawkwynd; 28 Dec 2012 at 10:50 PM. Reason: added ChimpMail code to clarify


    It's a geek thing. If I had to explain it, you wouldn't understand.

 

 

Similar Threads

  1. v139h Simple question about pictures...
    By gacollege in forum All Other Contributions/Addons
    Replies: 6
    Last Post: 21 Feb 2012, 05:22 PM
  2. JUst a very simple question about image URLS
    By louishen in forum Installing on a Windows Server
    Replies: 1
    Last Post: 12 Sep 2010, 06:18 PM
  3. Simple question about welcome email
    By stevemax in forum General Questions
    Replies: 4
    Last Post: 4 Oct 2009, 02:41 PM
  4. Simple question about building a new template
    By Shade in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 12 Mar 2007, 04:53 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