Zen Cart Logo
Forums / Addon Sideboxes / blank sidebox -- add photo

blank sidebox -- add photo

Locked

Views: 6,944

Results 1 to 20 of 27
This thread is locked. New replies are disabled.
26 Jul 2007, 9:05 PM
#1
yellowdaises avatar

yellowdaises

New Zenner

Join Date:
Nov 2006
Location:
Los Angeles
Posts:
91
Plugin Contributions:
0

blank sidebox -- add photo

ok i know i'm missing something fairly obvious :blush: but i can not seem to incorporate a photo into my blank sidebox.

here is the code for /template/TRUBLU/sideboxes/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 .= '<img src="gb_box.jpg">';
  $content .= '</div>';
?>

the image file is included in the same folder (templates/trublu/sideboxes) but not showing. Nothing is showing but an empty box.

Any suggestions? Thank you.

26 Jul 2007, 9:12 PM
#2
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Location:
London, UK
Posts:
10,475
Plugin Contributions:
11

Re: blank sidebox -- add photo

Try putting your image into your templates images folder and using this instead> $content .= '<img src="' . DIR_WS_TEMPLATES . 'TRUBLU/images/gb_box.jpg">';

26 Jul 2007, 9:20 PM
#3
yellowdaises avatar

yellowdaises

New Zenner

Join Date:
Nov 2006
Location:
Los Angeles
Posts:
91
Plugin Contributions:
0

Re: blank sidebox -- add photo

perfect!! thank you so very much :-)

9 Aug 2007, 8:23 AM
#4
francocauter avatar

francocauter

Zen Follower

Join Date:
Jun 2007
Location:
Milton Keynes UK
Posts:
153
Plugin Contributions:
0

Re: blank sidebox -- add photo

Is it possible to put a MARQUEE between the quotes?
I tried but it makes a mess!
If its possible can you help me how?

9 Aug 2007, 9:00 AM
#5
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Location:
London, UK
Posts:
10,475
Plugin Contributions:
11

Re: blank sidebox -- add photo

francocauter:

Is it possible to put a MARQUEE between the quotes?
I tried but it makes a mess!
If its possible can you help me how?You can put any valid HTML between the quotes, which just about includes a MARQUEE. But I'm not the right person to ask about constructing a MARQUEE as I wouldn't go near them.

10 Aug 2007, 3:01 PM
#6
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Location:
London, UK
Posts:
10,475
Plugin Contributions:
11

Re: blank sidebox -- add photo

Kuroi relents a little. You insert your marquee html in the tpl_blank_sidebox,php file, where the comment in that file tells you to.

You will also need to escape the single quotes used in your javascript (i.e. type them as --> ' <--).

However, moving off topic, when I look at your site, you seem to be trying to work in all the features that web designers have abandoned over the past five years: blinking text, intrusive music with no off button, animated gifs, too many font changes, and ... marquees. It's a shame because that looks like a promising small business with a clear identity and well-defined niche, i.e. a lot of potential.

11 Aug 2007, 10:22 AM
#7
francocauter avatar

francocauter

Zen Follower

Join Date:
Jun 2007
Location:
Milton Keynes UK
Posts:
153
Plugin Contributions:
0

Re: blank sidebox -- add photo

Thanks Kuroi
for everything: advice, suggestions and encouragement.
I am building the site still and I am trying to find the best performance and impact.
I want only 1 scrolling marquee easy to change products and offers and I am only at the beginning with code so the terminology its jargon sometime.
What do you mean

  • "escape the single quotes used in your javascript (i.e. type them as --> ' <--)"

Thanks again for your patience

11 Aug 2007, 10:28 AM
#8
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Location:
London, UK
Posts:
10,475
Plugin Contributions:
11

Re: blank sidebox -- add photo

The start and end of each block of text or HTML to be added to the side box is marked by a single quote. However, some of your marquee code also has single quotes which will confuse the PHP. To get around this the following sectionphp <MARQUEE behavior= "scroll" align= "center" direction= "up" width= "160" height="300" bgcolor="#FACF76" scrollamount= "2" scrolldelay= "10" onmouseover='this.stop()' onmouseout='this.start()'> should be written```php
<MARQUEE behavior= "scroll" align= "center" direction= "up" width= "160" height="300" bgcolor="#FACF76" scrollamount= "2" scrolldelay= "10" onmouseover='this.stop()' onmouseout='this.start()'>

11 Aug 2007, 10:40 AM
#9
francocauter avatar

francocauter

Zen Follower

Join Date:
Jun 2007
Location:
Milton Keynes UK
Posts:
153
Plugin Contributions:
0

Re: blank sidebox -- add photo

I did that Kuroi
I get an error

*Parse error: syntax error, unexpected T_STRING in ../sideboxes\tpl_blank_sidebox.php on line 20
*

11 Aug 2007, 10:52 AM
#10
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Location:
London, UK
Posts:
10,475
Plugin Contributions:
11

Re: blank sidebox -- add photo

That means that you have a syntax error in your PHP. There's nothing syntactically wrong with the code that you are using for your marquee, except for the need to escape those single quotes, so it must be some other aspect of how you have added it to the file. I recommend checking that you haven't accidentally removed the single quotes at the beginning or end, or left off the final semi-colon.

11 Aug 2007, 11:01 AM
#11
francocauter avatar

francocauter

Zen Follower

Join Date:
Jun 2007
Location:
Milton Keynes UK
Posts:
153
Plugin Contributions:
0

Re: blank sidebox -- add photo

One more thing Kuroi
About intrusive music: the only music is in the site a few .mp3 in the media collection and that should not start automatically.
A part from the video there was a music track in a product as an x-mlayer2 object which I just taken off.
The only other music is in the espresso making video, that does not start with IE
but starts with firefox.
If I could I would put a "notice" come up that if they use firefox they should download the Media Player Plugin
Do you use firefox?

11 Aug 2007, 11:12 AM
#12
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Location:
London, UK
Posts:
10,475
Plugin Contributions:
11

Re: blank sidebox -- add photo

It was indeed Firefox through which I was viewing the site, and I now know that I can right click on the video and stop it.

However, if you are going to use a video for promotional or educational purposes on the site, I would recommend not asking visitors to download a non-standard player. I'd render it in Flash (reputed to be on 98% of PCs already) or Quicktime.

11 Aug 2007, 11:14 AM
#13
francocauter avatar

francocauter

Zen Follower

Join Date:
Jun 2007
Location:
Milton Keynes UK
Posts:
153
Plugin Contributions:
0

Re: blank sidebox -- add photo

Thanks Very much Kuroi
The marquee works (you had left off a "" in your answer)
I hope to do business with you one day as I like your simplicity in your sites
Thanks again
regards

11 Aug 2007, 11:16 AM
#14
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Location:
London, UK
Posts:
10,475
Plugin Contributions:
11

Re: blank sidebox -- add photo

:oops:

Yes, I like simplicity wherever I can create it, even though creating simplicity takes so more work than creating complexity. :smartalec:

11 Aug 2007, 11:26 AM
#15
francocauter avatar

francocauter

Zen Follower

Join Date:
Jun 2007
Location:
Milton Keynes UK
Posts:
153
Plugin Contributions:
0

Re: blank sidebox -- add photo

I absolutely agree. To create simplicity is very much connected to psycology to work.

18 Dec 2007, 8:22 PM
#16
lextechs avatar

lextechs

Zen Follower

Join Date:
Mar 2005
Location:
Tempe, AZ
Posts:
316
Plugin Contributions:
0

Re: blank sidebox -- add photo

when ever i try to add this code <!-- START SCANALERT CODE -->
<a target="_blank" href="https://www.scanalert.com/RatingVerify?ref=www.lextechs.com"><img width="94" height="54" border="0" src="//images.scanalert.com/meter/www.lextechs.com/23.gif" alt="HACKER SAFE certified sites prevent over 99.9% of hacker crime." oncontextmenu="alert('Copying Prohibited by Law - HACKER SAFE is a Trademark of ScanAlert'); return false;"></a>

<!-- END SCANALERT CODE -->

I get this error:
Parse error: syntax error, unexpected T_STRING in /home/keepnitr/public_html/lextechs/includes/templates/template_default/sideboxes/tpl_hacker_sidebox.php on line 21

any ideas?

24 Dec 2007, 10:30 AM
#17
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Location:
London, UK
Posts:
10,475
Plugin Contributions:
11

Re: blank sidebox -- add photo

lextechs:

I get this error:
Parse error: syntax error, unexpected T_STRING in /home/keepnitr/public_html/lextechs/includes/templates/template_default/sideboxes/tpl_hacker_sidebox.php on line 21You've not provided enough information for me to se sure, but from what you have provided, I'd guess that you have wrapped your insert correctly in single quotes, but not "escaped" the singles quotes embedded in that insert. To do this you need to add the backslashes highlighted in red below> <!-- START SCANALERT CODE -->
<a target="_blank" href="https://www.scanalert.com/RatingVerify?ref=www.lextechs.com"><img width="94" height="54" border="0" src="//images.scanalert.com/meter/www.lextechs.com/23.gif" alt="HACKER SAFE certified sites prevent over 99.9% of hacker crime." oncontextmenu="alert('Copying Prohibited by Law - HACKER SAFE is a Trademark of ScanAlert'); return false;"></a>

<!-- END SCANALERT CODE -->
27 Dec 2007, 5:32 PM
#18
lextechs avatar

lextechs

Zen Follower

Join Date:
Mar 2005
Location:
Tempe, AZ
Posts:
316
Plugin Contributions:
0

Re: blank sidebox -- add photo

Thanks kuroi, that did the trick

29 Dec 2007, 8:13 PM
#19
sabastina avatar

sabastina

New Zenner

Join Date:
Nov 2005
Posts:
72
Plugin Contributions:
0

Re: blank sidebox -- add photo

Greetings, I figured I'd post here since this deals with my issue most closely.

Page where error can be viewed is here, on the bottom of the left navigation.

I'm working with the Paypal Verification Sidebox module. As you can see, I am trying to add my Certification for Designing eBay templates and have gotten the url portion correct, but can not get the image.

What I've Done So Far

Uploaded all files from mod.

Changed the Language files to reflect my title on sidebox header (worked great)

Added the following code immediately after the Code that adds the image and link for paypal verification:

<!-- Begin eBay Certified Designer Seal -->
<a target="_blank" href="http://pages.ebay.com/storefronts/designdirectory.html">' .
$content .= '<img src="' . DIR_WS_TEMPLATES . '/images/eBayCertDesigner.gif">';
'</a>
<!-- End eBay Certified Designer Seal -->

This is ALL I have done to the code, not only is my image on the bottom not showing up, but somehow and additional image placeholder has appeared above the paypal logo:huh:

I have no idea why this is happening (and in the case of my non-showing image, why it is not happening).

Any help with this would be greatly appreciated.

Sabastina

29 Dec 2007, 9:44 PM
#20
gjh42 avatar

gjh42

Black Belt

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

Re: blank sidebox -- add photo

'<img src="' . DIR_WS_TEMPLATES . '/images/eBayCertDesigner.gif">';

You have mixed up the coding here. DIR_WS_TEMPLATES indicates /includes/templates/; it needs to be finished like this:
DIR_WS_TEMPLATES . 'your_template/images/eBayCertDesigner.gif">';

DIR_WS_TEMPLATE indicates /includes/templates/your_template/ and would be finished like this:
DIR_WS_TEMPLATE . 'images/eBayCertDesigner.gif">';