Results 1 to 2 of 2
  1. #1
    Join Date
    May 2013
    Location
    Karlskoga, Sweden
    Posts
    48
    Plugin Contributions
    0

    help question Help! - Twitter HTML code in sidebox cause PHP error

    Hi all,
    I wanted to add a twitter news feed, so I installed the blank sidebox addon and added my twitter widget html code to that. It looks great but I just noticed that I can't click my banner anymore and that a error logfile is created. I don't know if anything else also is affected!?

    Any ideas how to resolve this?


    Here's the code and error message:

    blank_sidebox_defines.php:
    <?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_BLANK_SIDEBOX', 'News');
    define('TEXT_BLANK_SIDEBOX', '');

    ?>




    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 $
    */

    // test if box should display
    $show_blank_sidebox = true;

    if ($show_blank_sidebox == true) {
    require($template->get_template_dir('tpl_blank_sidebox.php',DIR_WS_TEMPLATE, $current_page_base,'sideboxes'). '/tpl_blank_sidebox.php');
    $title = BOX_HEADING_BLANK_SIDEBOX;
    $title_link = false;
    require($template->get_template_dir($column_box_default, DIR_WS_TEMPLATE, $current_page_base,'common') . '/' . $column_box_default);
    }
    ?>



    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 .= '<html>' . '<a class="twitter-timeline" height="300" href="https://twitter.com/Scaffoldusa" data-widget-id="414489528905109504">Tweets by @Scaffoldusa</a><script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="https://platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>' . '</html>';

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



    This is the error message:
    PHP Warning: Cannot modify header information - headers already sent by (output started at /includes/languages/english/extra_definitions/blank_sidebox_defines.php:18) in /includes/functions/functions_general.php on line 45

    The site is www.scaffoldusa.com

    Thanks!

  2. #2
    Join Date
    May 2013
    Location
    Karlskoga, Sweden
    Posts
    48
    Plugin Contributions
    0

    Default Re: Help! - Twitter HTML code in sidebox cause PHP error

    ob_start(); in the beginning of blank_sidebox_defines.php seams to have solved the issue!

 

 

Similar Threads

  1. Adding Twitter code to Blank Sidebox Add On
    By habsolutely in forum All Other Contributions/Addons
    Replies: 0
    Last Post: 25 Sep 2011, 07:54 PM
  2. Twitter Sidebox? (New module creation help)
    By curtc in forum Addon Sideboxes
    Replies: 6
    Last Post: 10 Jun 2011, 08:24 PM
  3. Help - Where to install Livehelp Kayako Html code on sidebox?
    By kimsonvu in forum Basic Configuration
    Replies: 2
    Last Post: 25 Nov 2009, 04:54 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