Page 2 of 2 FirstFirst 12
Results 11 to 19 of 19
  1. #11
    Join Date
    May 2010
    Location
    Athens, Greece
    Posts
    299
    Plugin Contributions
    0

    Default Re: Thanks for an excellent Blank Sidebox

    Hi Glenn,

    Since you have been involved in this thread, first let me thank you for the corrected code in post #7. My intention was to have a clickable image and text and I have since corrected my own box.

    I have another problem that troubles me. If you look at my site, I have two boxes in the left side column, one is titled "Secure payments" and the other "The time in Athens is". They both look fine as long as the "time" box is the last in the column. If I move it above the "Secure payments" box, it doesn't end but extends to the back of the box underneath it and it ends a few pixels below the "Secure payments" box!

    You can see the two positions in the attached screenshots. The same happens if I move it to the right side column above any other box.

    I have tried to identify and correct the problem with the use of web developer tools of Firefox but have not been successful. I suspect that it may have to do with the contents which is a flash object. If it means anything to you, the file includes/templates/template_default/sideboxes/tpl_time_sidebox.php contains the following:

    Code:
    $content .= '' . TEXT_TIME_SIDEBOX . '';
    $content .= '<div align="center"><embed width="90" height="90" src="http://www.worldtimeserver.com/clocks/wtsclock001.swf?color=000080&amp;wtsid=gr" type="application/x-shockwave-flash" wmode="transparent"></ div>';
    $content .= '';
    Could the type of contents (flash) be the cause of this anomaly, or do you see anything else in the code that could be responsible?

    Any help will be appreciated. It looks fine now that I have it as the last box in the column, but it's a matter of principle to find out what's going wrong and probably prevent a future box to behave like this.

    Cheers and have a nice evening.
    Attached Thumbnails Attached Thumbnails Click image for larger version. 

Name:	below_payments.jpg 
Views:	98 
Size:	29.8 KB 
ID:	7977   Click image for larger version. 

Name:	above_payments.jpg 
Views:	95 
Size:	29.0 KB 
ID:	7978  

  2. #12
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    21,830
    Plugin Contributions
    25

    Default Re: Thanks for an excellent Blank Sidebox

    I don't know if it makes a difference, but you have </ div> instead of </div> in your code. This may be what is failing to close the content div correctly (which is obviously what is happening).

  3. #13
    Join Date
    May 2010
    Location
    Athens, Greece
    Posts
    299
    Plugin Contributions
    0

    Default Re: Thanks for an excellent Blank Sidebox

    I don't know if it makes a difference, but you have </ div> instead of </div> in your code.
    It did make a difference, thank you for the hint! The space is gone and everything is back to normal. One item less in the to-do list.

  4. #14
    Join Date
    Apr 2004
    Location
    Las Vegas and NYC
    Posts
    46
    Plugin Contributions
    0

    Default Re: Thanks for an excellent Blank Sidebox

    Just installed this blank box with Craft Syntax and it worked perfectly. Thanks for this thread!!!

  5. #15
    Join Date
    Aug 2010
    Posts
    51
    Plugin Contributions
    0

    Default Re: Thanks for an excellent Blank Sidebox

    Can't seem to get my php code to work. Any ideas?
    This is straight from my tpl_blank_sidebox.php:

    <?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 .= '<p>' . TEXT_BLANK_SIDEBOX . '</p>';
    $content .= '<div id="form">
    <?PHP
    if(isset($_POST['Submit']))
    {
    $user="user";
    $pass="pass";
    $url = "http://mydigitalpublication.com/publication?i=43543";
    echo '<META http-equiv="refresh" content="0;URL='.$url.'">';
    }
    ?>
    <form id="form1" name="form1" method="post" action="">
    <input name="method" type="hidden" value="insert" />
    <table width="100%" border="0" cellpadding="5" cellspacing="0">
    <tr>
    <td width="19%">Email Address<span class="style2">*</span></td>
    <td><input type="text" name="login" id="user" /></td>
    </tr>
    <tr>
    <td>Password<span class="style2">*</span></td>
    <td><input type="password" name="password" id="password" /></td>
    </tr>
    </table>
    <p align="center" class="style1"><span class="style2">*</span>Required fields</p>
    <p align="center"><input type="image" src="images/login.png" value="Submit" name="Submit"/></p>
    </form>';

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

  6. #16
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    21,830
    Plugin Contributions
    25

    Default Re: Thanks for an excellent Blank Sidebox

    $content .= '<div id="form">
    <?PHP
    if(isset($_POST['Submit']))
    {


    You are putting PHP code straight into a string variable, which will become HTML output. You need to evaluate the PHP and put its result into the variable. I don't know exactly how you would rework this, as I have not used PHP handling of forms.

  7. #17
    Join Date
    Sep 2010
    Posts
    19
    Plugin Contributions
    0

    Default Re: Thanks for an excellent Blank Sidebox

    remember, you are adding all the code to the $content variable:)

    This means that the first ' you use is going to close the $content=' and the rest is not even put into it.

    You need to avoid the ' and you will be just fine:)
    Victor
    Web Solutions
    Solving problems, as usual!

  8. #18
    Join Date
    Aug 2010
    Posts
    51
    Plugin Contributions
    0

    Default Re: Thanks for an excellent Blank Sidebox

    Thanks acedweb,

    but are you saying:

    $content = 'MycodeHere';

    is wrong because of the ''

    but

    $content = MycodeHere;

    should work?

    I tried this way and nothing. Did I misunderstand?

    very frustrating, but thank you for your help...

    Matt

  9. #19
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    21,830
    Plugin Contributions
    25

    Default Re: Thanks for an excellent Blank Sidebox

    No, you need the ' ' around strings of text to go into $content. The point was that a second ' will be seen as ending the string, even if you didn't mean it to. So if you want to use
    'Isn't my string cool?'
    you have to escape the internal ', or else use double quotes " " around the string instead:
    'Isn\'t my string cool?'
    "Isn't my string cool?"

    Single and double quotes won't interfere with each other, but they will interfere with others of their own kind unless escaped with a backslash \

 

 
Page 2 of 2 FirstFirst 12

Similar Threads

  1. Blank Sidebox, no borders or header, just blank
    By chris32882 in forum General Questions
    Replies: 16
    Last Post: 3 Dec 2009, 06:22 PM
  2. Flash hack&blank sidebox = blank page
    By AmandaGero in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 20 Apr 2009, 06:19 PM
  3. Blank Sidebox Mod - remove a blank sidebox
    By PJD in forum Basic Configuration
    Replies: 4
    Last Post: 14 Mar 2008, 02:09 PM
  4. An excellent CSS reference and learning tool
    By rstevenson in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 3 Feb 2008, 02:31 PM
  5. EXCELLENT Job on 1.3.8
    By Stuff4Toys in forum Upgrading from 1.3.x to 1.3.9
    Replies: 2
    Last Post: 12 Dec 2007, 04:29 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
  •