If this is your first visit, check our documentation. To post, register or login.
Forums / Customizing the Look of Your Shop / Templates, Stylesheets, Page Layout / Scam advisor logo and link into sidebox

Scam advisor logo and link into sidebox

Started by phil_lomas on 16 May 2013, 3:13 PM · Views: 1,173

Results 1 to 10 of 10
16 May 2013, 3:13 PM
#1
phil_lomas avatar

phil_lomas

New Zenner

Join Date:
Feb 2013
Location:
Southampton, United Kingdom
Posts:
40
Plugin Contributions:
0

Post #1 by phil_lomas

Hi I need to put this code into a seperate sidebox and tried pasting the html into blank_sidebox. When I turned the box on i lost everything below the header. site is bikeporndotcodotuk.

Any thoughts on why?

<div> <div id='sealImage' imageSize='110' sealType='1'></div> <script language="javascript" src='//seal.scamadviser.com/seal.js'></script> </div> <script language="javascript" src='//seal.scamadviser.com/sealCheck.php'></script>

Regards

Phil

16 May 2013, 4:13 PM
#2
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,874
Plugin Contributions:
8

Post #2 by gjh42

There's nothing inherently wrong with the code you posted; therefore, there must have been an error in the way you put it into the blank sidebox file. If you got a partial blank page, that indicates a PHP fatal error, which would have generated an error log. Look in your Zen Cart /cache/ or /logs/ folder, depending on your Zen Cart version, for the latest mydebug file and post it here. The other information requested in the Posting Tips may also be helpful.

17 May 2013, 5:14 AM
#3
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,762
Plugin Contributions:
56

Post #3 by swguy

Instead of starting with blank sidebox, maybe this would be a better starting point:

http://www.zen-cart.com/downloads.php?do=file&id=265

That Software Guy. My Store: Zen Cart Support
Available for hire - See my ad in Services
Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
Do you benefit from Zen Cart? Then please support the project.

17 May 2013, 12:14 PM
#4
phil_lomas avatar

phil_lomas

New Zenner

Join Date:
Feb 2013
Location:
Southampton, United Kingdom
Posts:
40
Plugin Contributions:
0

Post #4 by phil_lomas

Hi swguy

This looks like a better option however is php.

do you know if the code could be easily integrated.

Regards

Phil

17 May 2013, 2:39 PM
#5
phil_lomas avatar

phil_lomas

New Zenner

Join Date:
Feb 2013
Location:
Southampton, United Kingdom
Posts:
40
Plugin Contributions:
0

Post #5 by phil_lomas

Hi

Nothing in the error logs. If I changed the sidebox to the righthand side the left hand boxes then appear. But still can't work it out.

Regards

Phil

gjh42:

There's nothing inherently wrong with the code you posted; therefore, there must have been an error in the way you put it into the blank sidebox file. If you got a partial blank page, that indicates a PHP fatal error, which would have generated an error log. Look in your Zen Cart /cache/ or /logs/ folder, depending on your Zen Cart version, for the latest mydebug file and post it here. The other information requested in the Posting Tips may also be helpful.

17 May 2013, 3:04 PM
#6
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,874
Plugin Contributions:
8

Post #6 by gjh42

Only a PHP error can make output stop at a certain point. If the output is just getting misdirected after that point, it will be apparent from View Source. Can you reactivate the sidebox for a bit so I can look at the source code? The version info and other Posting Tips questions may give clues, and we probably can't help without knowing more. Posting the complete blank sidebox file (whichever one you put your custom content in) will also help diagnose the issue.

17 May 2013, 3:09 PM
#7
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,874
Plugin Contributions:
8

Post #7 by gjh42

You can always put HTML output content into a PHP file. There is nothing tricky about it, but you do need to understand how PHP to HTML output works. That is something you can look up online if you need to.

17 May 2013, 3:11 PM
#8
phil_lomas avatar

phil_lomas

New Zenner

Join Date:
Feb 2013
Location:
Southampton, United Kingdom
Posts:
40
Plugin Contributions:
0

Post #8 by phil_lomas

Hi GJH42 entire php file is below

<?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> <div id='sealImage' imageSize='110' sealType='1'></div> <script language="javascript" src='//seal.scamadviser.com/seal.js'></script> </div> <script language="javascript" src='//seal.scamadviser.com/sealCheck.php'></script>'; $content .= '</div>'; ?>
17 May 2013, 5:09 PM
#9
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,874
Plugin Contributions:
8

Post #9 by gjh42

You have mixed single and double quotes inside the single-quoted content string. The single quotes in the content are terminating the string and causing a PHP error, which would be in the error log if you have one. What version of Zen Cart do you have? Older versions do not have debug logging built in. If this is the case for you, you urgently need to upgrade to a newer version or else you will get hacked by the first hacker who finds your site. The older versions (v1.3.8a and older) have a serious security vulnerability that was discovered (and patched) in June 2009.

For your content, either replace the single quotes with double quotes, or escape them like this: ' .```php
$content .= '

<div> <div id='sealImage' imageSize='110' sealType='1'></div> <script language="javascript" src='//seal. ``` ```php $content .= ' <div> <div id="sealImage" imageSize="110" sealType="1"></div> <script language="javascript" src="//seal.(etc...) ``````php $content .= ' <div> <div id=\'sealImage\' imageSize=\'110\' sealType=\'1\'></div> <script language="javascript" src=\'//seal.(etc...) ```
17 May 2013, 5:31 PM
#10
phil_lomas avatar

phil_lomas

New Zenner

Join Date:
Feb 2013
Location:
Southampton, United Kingdom
Posts:
40
Plugin Contributions:
0

Post #10 by phil_lomas

Hi

Version 1.5.1

Thanks the \ have sorted it. I read about them but ran the code through a php checker and it passed so thought it was something else. Also couldn't see the 's on another site that I looked at the code for. Anyway it is sorted and thanks for your help

Phil