Forums / All Other Contributions/Addons / Smart Backgrounds support

Smart Backgrounds support

Views: 55,899

Results 321 to 340 of 393
31 Aug 2010, 4:42 PM
#321
damiendlskinsolution avatar

damiendlskinsolution

Zen Follower

Join Date:
Sep 2008
Posts:
97
Plugin Contributions:
0

Smart Backgrounds support

Glenn,

Thanks! That's a part of the problem solved! :bigups:
I uploaded your original file, which didn't solved the problem but, at least now, the log doesn't involve Smart Backgrounds..
My guess is again, Dreamweaver is adding extra spaces/lines in the code. I really got to trash that program...

Thanks again for pointing out where the problem was!

Damien

31 Aug 2010, 5:27 PM
#322
gjh42 avatar

gjh42

Black Belt

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

Re: Smart Backgrounds support

If you use Notepad++ to paste the revised code into the file, you will not get any extra spaces unless you put them in yourself.

Are you still getting a "headers already sent" kind of error? Does it involve a file that you have ever edited?

31 Aug 2010, 5:36 PM
#323
damiendlskinsolution avatar

damiendlskinsolution

Zen Follower

Join Date:
Sep 2008
Posts:
97
Plugin Contributions:
0

Re: Smart Backgrounds support

the error moved to the shipping files (under /language/modules/). Every single file had extra lines at the end. Dunno why since I modified only the freeshipper.php file... but anyway... I fixed them all and the error is gone!

It is the 4th or 5th time that you have set me on the right path. I cannot thank you enough for your help.

Damien

31 Aug 2010, 5:47 PM
#324
gjh42 avatar

gjh42

Black Belt

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

Re: Smart Backgrounds support

Maybe if Dreamweaver was the culprit, it adds the line/space to any file it handles, whether you are editing it or not? I have seen a number of people mentioning using DW for ZC files (without problems), so it might be some uncommon kind of setting that you have?

31 Aug 2010, 6:16 PM
#325
damiendlskinsolution avatar

damiendlskinsolution

Zen Follower

Join Date:
Sep 2008
Posts:
97
Plugin Contributions:
0

Re: Smart Backgrounds support

I have used DW to upload hundreds of file and only a very small percentage had issues. I'm not even gonna speculate, I'll use Note ++ to edit and Filezilla to upload from now on.

Thanks again for the support

Damien

29 Sep 2010, 11:25 PM
#326
growbg avatar

growbg

New Zenner

Join Date:
Feb 2010
Location:
Bulgaria, Sofia
Posts:
1
Plugin Contributions:
0

Re: Smart Backgrounds support

Hi guys!
My English is not very good.
I have the following problem:
I use Zen Cart 1.3.9d and Smart Backgrounds 2.1.1.
My off-line store working on WAMP5 v1.7.0
I install and configure Smart Backgrounds Mod.
I put this code:

<!--Smart Backgrounds-->
<?php $smart_image = '';
if ($current_page_base == 'index' or $current_page_base == 'product_info') { //add _ and cPath to filename only if individual cat image exists, else add _ and top cat id to bg filename only if top cat image exists
  $smart_image = file_exists(DIR_WS_TEMPLATE_IMAGES . 'smartbg_' . $_GET[cPath] . '.gif')?'_' . $_GET[cPath]:(file_exists(DIR_WS_TEMPLATE_IMAGES . 'smartbg_' . (int)$_GET[cPath] . '.gif')?'_' . (int)$_GET[cPath]:'');
} elseif ($current_page_base == 'page') { //add _page and ez-page id to filename only if ez-page id image exists, else add _page to filename only if general ez-page image exists
  $smart_image = file_exists(DIR_WS_TEMPLATE_IMAGES . 'smartbg_page' . $_GET[id] . '.gif')?'_page' . $_GET[id]:(file_exists(DIR_WS_TEMPLATE_IMAGES . 'smartbg_page.gif')?'_page':'');
} else { //add _ and page base to filename only if page image exists
  $smart_image = file_exists(DIR_WS_TEMPLATE_IMAGES . 'smartbg_' . $current_page_base . '.gif')?'_' . $current_page_base:''; //default/home page class will be just .smartBG, and filename smartbg.gif
}?>
<!--/Smart Backgrounds-->

in section:

<!-- bof BANNERS GROUPSET 3 -->
   					<?php
                         if (SHOW_BANNERS_GROUP_SET3 != '' && $banner = zen_banner_exists('dynamic', SHOW_BANNERS_GROUP_SET3)) {
                           if ($banner->RecordCount() > 0) {
                       ?>
                       <div id="bannerThree" class="banners"><?php echo zen_display_banner('static', $banner); ?></div>
                       <?php
                           }
                         }
                       ?>
   					
              <!-- eof BANNERS GROUPSET 3 -->
   		   
   	

of my ..\common\tpl_main_page.php.

I edit stylesheet_smartbg.css and place the images in the right place.

This mod is working properly and changing images according to the categories of site I want.

When I upload files on-line to server, the images are not displayed.

Internet Explorer displays "X" in place of the image, as if no image. The images are there, but not find them.

Do you have any idea where is the problem? Thank you!

7 Oct 2010, 1:32 PM
#327
gjh42 avatar

gjh42

Black Belt

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

Re: Smart Backgrounds support

Sorry, I didn't see your post before.
You are using an older version of the mod, which requires more custom code in tpl_main_page.php than the latest version.
If it works on your local site but not on the remote server, it may help to see your site to see the behavior myself.
What image location are you trying to switch? The base code is for backgrounds, which would not show an error if not found. Are you trying to switch a foreground image?

22 Oct 2010, 3:34 PM
#328
joska avatar

joska

New Zenner

Join Date:
Oct 2010
Posts:
4
Plugin Contributions:
0

Re: Smart Backgrounds support

Hi,

I have several Banners (Banner Display Groups - Header Position 1) which I want to display depending on the page or category. In the banners I use html code to get my slideshows (javascript) loading in the banner header. Can I use smart background for that? And if so, how can i do that?

thanks!

27 Oct 2010, 9:49 AM
#329
gjh42 avatar

gjh42

Black Belt

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

Re: Smart Backgrounds support

The basic switching function would work something like this:php $smart_image = smart_backgrounds('.gif','slideshow'); // looks for smartslideshow_page5.gif if on ez-page 5 if ($smart_image == '_page5') { // then we are on ez-page 5 // set the banner group for letteratuur } Unfortunately I don't know much about how the banner code works; in the right location you could condense this into something like ```php
...banner group name content = 'smartslideshow' . smart_backgrounds('.gif','slideshow')


I will take a look and see if I can give a simple method of actually using this, but I can make no promises now.
17 Nov 2010, 4:06 PM
#330
lunged avatar

lunged

New Zenner

Join Date:
Nov 2010
Posts:
3
Plugin Contributions:
0

Re: Smart Backgrounds support

We are trying to do the exact same thing as joska. I just want to throw my weight behind this - if you get the time to figure out how to do this we would greatly appreciate it. I did all I could, but to no avail. Thanks.

24 Nov 2010, 11:13 AM
#331
vipinc avatar

vipinc

New Zenner

Join Date:
Nov 2010
Posts:
18
Plugin Contributions:
0

Re: Smart Backgrounds support

Hi everyone

I have zen cart v1.3.9h

Can I still use Smart Background for my store ?

If yes, then is there any document which tell us step by step to apply this, and which versio do I need to download if in case I need to use it, coz the smart background page has many version been displayed.

Regards
Vipin

24 Nov 2010, 8:20 PM
#332
gjh42 avatar

gjh42

Black Belt

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

Re: Smart Backgrounds support

Unless there is a particular reason to do otherwise, always use the latest version of a mod. Smart Backgrounds will work fine for v1.3.9h, and there is a full readme file in the package (as all mods should have).

17 Jan 2011, 4:24 PM
#333
lizmcreations avatar

lizmcreations

New Zenner

Join Date:
Oct 2010
Posts:
13
Plugin Contributions:
0

Re: Smart Backgrounds support

I am using Smart Backgrounds - and I love it. I am using it to replace the header image based on the category.

I would like to use it to also change the whole page background, but I'm not quite sure how to do that. I saw the initial posts in this thread that will change the content background, but I am a little stuck on how to change the whole page background.

I have this added to my tpl_main_page.php:

<body id="<?php echo $body_id . 'Body'; ?>" class="smartBG<?php echo smart_backgrounds('.jpg');?>"<?php if($zv_onload !='') echo ' onload="'.$zv_onload.'"'; ?>>

I have my image files set as bodybg_cat#.jpg,
and I was initially using "#mainWrapper" in my css file, but that only covers the content background.

Any hints/clues would be greatly appreciated.

The site is: http://store.gpwalsh.com - the main page is not "set-up" because it isn't being used, they just want to use the category pages.

Thank you,

Liz

17 Jan 2011, 5:52 PM
#334
gjh42 avatar

gjh42

Black Belt

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

Re: Smart Backgrounds support

To get backgrounds for the whole window, you can style .smartBGwhatever {} directly. This will be available for any page where you already have another smartbg image set up.

18 Jan 2011, 1:19 AM
#335
lizmcreations avatar

lizmcreations

New Zenner

Join Date:
Oct 2010
Posts:
13
Plugin Contributions:
0

Re: Smart Backgrounds support

gjh42:

To get backgrounds for the whole window, you can style .smartBGwhatever {} directly. This will be available for any page where you already have another smartbg image set up.

Thank you so much for your response - but either I'm not understanding what you are saying, or you aren't quite understanding the set-up I already have.

Here is my smartbackground.css file:

#headerWrapper {
	background-image: url(../images/header.jpg);
	background-repeat:no-repeat;
	width:770px;	
}


.smartBG_65 #headerWrapper {
	background-image: url(../images/smartbg_65.jpg);
	background-repeat:no-repeat;
	width:770px;
}
	
.smartBG_69 #headerWrapper {
	background-image: url(../images/smartbg_69.jpg);
	background-repeat: no-repeat;
	width: 770px;
}

.smartBG_73 #headerWrapper {
	background-image: url(../images/smartbg_73.jpg);
	background-repeat:no-repeat;
	width:770px;
}
	

.smartBG_65{
	background-image: url(../images/bodybg_65.jpg);
	background-repeat:repeat;
	background-attachment: fixed;
}

.smartbg_69 {
	background-image: url(../images/bodybg_69.jpg);
	background-repeat:repeat;
	background-attachment: fixed;
}

.smartbg_73 {
	background-image: url(../images/bodybg_73.jpg);
	background-repeat:repeat;
	background-attachment: fixed;
}

The first four are working perfectly, they apply the proper header to the right category pages. But, as I'm already using smartbg_.jpg for the header background, I'm using the bodybg_.jpg for the body background. Where I think I'm getting stuck is the "div" id or section of the page to use.

Thank you again for your time and assistance.

Liz

18 Jan 2011, 6:54 PM
#337
lizmcreations avatar

lizmcreations

New Zenner

Join Date:
Oct 2010
Posts:
13
Plugin Contributions:
0

Re: Smart Backgrounds support

gjh42:

CSS is case-sensitive, and .smartbg_69 { will not work here; you need .smartBG_69 {

:blink: Oh brother! I can't believe I missed that - I've been looking at the file WAY!! too long so I just overlooked that!!!

Thank you so much, that solved the problem :smile:

Liz

24 Jan 2011, 8:08 AM
#338
marknew avatar

marknew

Zen Follower

Join Date:
Oct 2005
Posts:
274
Plugin Contributions:
0

Re: Smart Backgrounds support

Thanks for the great mod. I've read the instructions but could i get a few pointers here? How do i make this work for the shopping cart page? index.php?main_page=shopping_cart

I tried using .smartBG_shopping_cart {background-image: url(../images/smartbg_shopping_cart.gif);} and uploading the smartbg_shopping_cart.gif to images/ but i must have something wrong.

Thanks!

24 Jan 2011, 10:55 PM
#340
marknew avatar

marknew

Zen Follower

Join Date:
Oct 2005
Posts:
274
Plugin Contributions:
0

Re: Smart Backgrounds support

Hey thanks, I had it in the base images folder. Put it into the template images folder and it works now. Thanks!