Forums / All Other Contributions/Addons / Smart Backgrounds support

Smart Backgrounds support

Views: 55,899

Results 361 to 380 of 393
11 Feb 2011, 3:34 PM
#361
serious avatar

serious

Totally Zenned

Join Date:
Feb 2011
Posts:
686
Plugin Contributions:
0

Smart Backgrounds support

That's what i thought.

I added that line and have a pic with the correct name and it still doesn't work.

I think I'll give up on it.

Now I've got to take all that stuff back out.:censored:

11 Feb 2011, 3:45 PM
#362
gjh42 avatar

gjh42

Black Belt

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

Re: Smart Backgrounds support

You are trying to apply this background to mainWrapper; if the elements inside that have background-color or background-image, those will sit on top of the mainWrapper background and hide it. What backgrounds do you have for #headerWrapper, #contentMainWrapper, #navColumnOne, etc.?

2 Jun 2011, 1:19 PM
#363
adidas avatar

adidas

New Zenner

Join Date:
Jun 2011
Posts:
1
Plugin Contributions:
0

Re: Smart Backgrounds support

Thanks for a great addon!

I'm having difficulties showing category related graphics for product pages when inveostore magicseourl is enabled.

smartbg class correct, no sef urls:
http://www.prostore.fi/index.php?main_page=product_info&products_id=552&cPath=131_132

smartbg class wrong with sef urls:
http://www.prostore.fi/rullalaudat-potkulaudat-131/potkulaudat-132/potkulauta-guts-musta-552.html

inveostore support states behaviour cannot be because of them,

http://www.inveostore.com/community/zen-cart-msu-after-upgrade-something-broke-580#p2611

I really love both addons, can you please aid how to give category specific class for product page with MSU enabled?

2 Jun 2011, 2:58 PM
#364
gjh42 avatar

gjh42

Black Belt

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

Re: Smart Backgrounds support

Smart Backgrounds uses $_GET['main_page'] and similar superglobals to act on, so if MSU is not setting those correctly it will fail, per Conor's post that you referenced. You might try changing $_GET['cPath'] to $cPath in the function code and see if that makes a difference.

18 Aug 2011, 7:25 PM
#365
digsshowroom avatar

digsshowroom

New Zenner

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

Re: Smart Backgrounds support

First off, THANK YOU for this mod!

I'm using the foreground images successfully for product categories, but would like to add some to manufacturer pages.

If the URL for the particular page is /index.php?main_page=index&manufacturers_id=29, what would my filename end with? I've tried every filename combination I can think of without luck.

Thanks again!

21 Aug 2011, 1:55 AM
#366
gjh42 avatar

gjh42

Black Belt

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

Re: Smart Backgrounds support

There is not currently a mechanism for identifying individual manufacturers' index pages. It would be possible to do; I can investigate when I am back home in a few days.

25 Sep 2011, 2:41 AM
#367
digsshowroom avatar

digsshowroom

New Zenner

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

Re: Smart Backgrounds support

Thanks, Glenn -- that would be awesome!

29 Sep 2011, 11:35 PM
#368
gjh42 avatar

gjh42

Black Belt

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

Re: Smart Backgrounds support

Once again I am away from home, and unfortunately there is no way to mark threads "unread", so if I forget about something and there are a lot of posts before I get back, I may not see it again. I will try to remember this time.

5 Oct 2011, 12:01 PM
#369
barendfaber avatar

barendfaber

Zen Follower

Join Date:
Apr 2010
Posts:
263
Plugin Contributions:
0

Re: Smart Backgrounds support

Hi, I am working on https://www.test.theflowershoppe.co.uk. I am trying to add the different backgrounds for my logo wrapper.

I have added "'.png' to the tpl_main_page (was class="smartBG<?php echo smart_backgrounds();?>" but is now class="smartBG<?php echo smart_backgrounds('.png');?>").

I have added to my smartBG stylesheet:

#logoWrapper {background-image: url(../images/smartBG.png);}

.smartBG_contact_us #logoWrapper {background-image: url(../images/smartBG_contact_us.png);}

and uploaded the images to my template folder for images. No change on the contact page. I am sure I am doing something simple wrong, could you help please?

5 Oct 2011, 12:53 PM
#370
gjh42 avatar

gjh42

Black Belt

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

Re: Smart Backgrounds support

.smartBG_contact_us #logoWrapper {background-image: url(../images/smartBG_contact_us.png);}

The code looks for image files named in lowercase, like smartbg_whatever.whatever. Rename your images and modify your stylesheet rules like this:

.smartBG_contact_us #logoWrapper {background-image: url(../images/smartbg_contact_us.png);}

The stylesheet selectors do use camel case (.smartBG_contact_us).

19 Dec 2011, 8:17 AM
#371
gjh42 avatar

gjh42

Black Belt

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

Re: Smart Backgrounds support

For manufacturer pages, here is some code to test. Find in smart_backgrounds_functions.php php if ($_GET['main_page'] == 'index' or $_GET['main_page'] == 'product_info') { // _p and products_id only if individual prod bg image exists, else _product_info only if page bg image exists, else _ and cPath only if individual cat bg image exists, else _ and top cat id only if top cat bg image exists $smart_image = ($_GET['main_page'] == 'product_info' and file_exists(DIR_WS_TEMPLATE_IMAGES . 'smart' . $location . '_p' . $_GET['products_id'] . $ext))?'_p' . $_GET['products_id']:(($_GET['main_page'] == 'product_info' and file_exists(DIR_WS_TEMPLATE_IMAGES . 'smart' . $location . '_product_info' . $ext))?'_product_info': (file_exists(DIR_WS_TEMPLATE_IMAGES . 'smart' . $location . '_' . $_GET['cPath'] . $ext)?'_' . $_GET['cPath']:(file_exists(DIR_WS_TEMPLATE_IMAGES . 'smart' . $location . '_' . (int)$_GET['cPath'] . $ext)?'_' . (int)$_GET['cPath']:''))); } elseif ($_GET['main_page'] == 'page') { and replace with this ```php
if ($_GET['main_page'] == 'index' or $_GET['main_page'] == 'product_info') {
if (isset($_GET['manufacturers_id='])) {
// _m and manufacturers_id only if individual mfr bg image exists, else _manufacturer only if page bg image exists
$smart_image = (file_exists(DIR_WS_TEMPLATE_IMAGES . 'smart' . $location . '_m' . $_GET['manufacturers_id'] . $ext))? '_m' . $_GET['manufacturers_id']: (file_exists(DIR_WS_TEMPLATE_IMAGES . 'smart' . $location . '_manufacturer' . $ext)?'_manufacturer': '');
} else {
// _p and products_id only if individual prod bg image exists, else _product_info only if page bg image exists, else _ and cPath only if individual cat bg image exists, else _ and top cat id only if top cat bg image exists
$smart_image = ($_GET['main_page'] == 'product_info' and file_exists(DIR_WS_TEMPLATE_IMAGES . 'smart' . $location . '_p' . $_GET['products_id'] . $ext))?'_p' . $_GET['products_id']:(($_GET['main_page'] == 'product_info' and file_exists(DIR_WS_TEMPLATE_IMAGES . 'smart' . $location . '_product_info' . $ext))?'product_info':
(file_exists(DIR_WS_TEMPLATE_IMAGES . 'smart' . $location . '
' . $GET['cPath'] . $ext)?'' . $GET['cPath']:(file_exists(DIR_WS_TEMPLATE_IMAGES . 'smart' . $location . '' . (int)$GET['cPath'] . $ext)?'' . (int)$_GET['cPath']:'')));
}
} elseif ($_GET['main_page'] == 'page') {

21 Dec 2011, 9:57 PM
#372
dinix avatar

dinix

Zen Follower

Join Date:
May 2006
Posts:
102
Plugin Contributions:
0

Re: Smart Backgrounds support

Hello

When I first saw this add on I thought it was to change the background but it seems not.
I wanted to change the background does not want to change the header or logo ( change the background of the site). can you help me? Sorry for my english

tanks

22 Dec 2011, 7:38 AM
#373
gjh42 avatar

gjh42

Black Belt

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

Re: Smart Backgrounds support

Yes, this mod can be used to change the background (of pretty much any element).
I need more information on how and what you want to change before I can help.

22 Dec 2011, 11:02 AM
#374
dinix avatar

dinix

Zen Follower

Join Date:
May 2006
Posts:
102
Plugin Contributions:
0

Re: Smart Backgrounds support

hello thanks for the reply. Send a sample page by clicking between the category will see the right to change the background (various instruments)
sample page http://www.thomann.de/gb/index.html

22 Dec 2011, 2:33 PM
#375
gjh42 avatar

gjh42

Black Belt

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

Re: Smart Backgrounds support

For behavior similar to that, you would want to change the body background based on the current category or subcat. You could have a different background for every subcategory or other page.

That site actually has a randomizing function added, which gives a different image selected from a certain set each time the same page is visited. That would be custom coding beyond the scope of this mod.

22 Dec 2011, 5:35 PM
#376
dinix avatar

dinix

Zen Follower

Join Date:
May 2006
Posts:
102
Plugin Contributions:
0

Re: Smart Backgrounds support

I know that the image of this site is randomizing function but what I want is:

category1
subcategoria1a
subcategoria1b

category2
subcategoria2a
subcategoria2b

background1 to category1 (and subcategories)
background2 to category2 (and subcategories)

will this add on can do this?

30 Dec 2011, 11:07 PM
#377
gjh42 avatar

gjh42

Black Belt

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

Re: Smart Backgrounds support

Yes, if you make a background applicable to category1, it will appear on all of category1's subcats as well. The readme describes how to do this.

15 Mar 2012, 1:24 PM
#378
keneso avatar

keneso

Totally Zenned

Join Date:
May 2009
Posts:
1,273
Plugin Contributions:
3

Re: Smart Backgrounds support

Hi Glenn,

does this mod work based on language?
I have a slider in the header, and the images have text in them.
Right now, regardless of the language selected by the user, the slider images are the same with the same text (language).

I'd need the following
user selects Italian language, hence the slider displays
img_1_IT
img_2_IT
img_3_IT
...

user selects English language, hence the slider displays
img_1_EN
img_2_EN
img_3_EN
...

Does Smart Background do that.

Thank you

19 Mar 2012, 4:33 AM
#379
gjh42 avatar

gjh42

Black Belt

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

Re: Smart Backgrounds support

Been traveling and offline for a while...
As Smart Backgrounds uses the /your_template/images/ folder to test, it does not automatically accommodate multiple languages. It could be implemented for certain purposes to work with language awareness, but I would have to study your application to know the best way to do it.

I have actually just updated and adapted the Ultimate Fade-in Slideshow mod to allow for multiple languages, but have been informed that Dynamic Drive's TOS do not allow it to be distributed by anyone but them; therefore, I am not allowed to give you my complete adaptation. I will be reworking the mod to give directions for everyone who wants to use it to do the adaptation themselves (and supporting the inevitable mistakes that some people will make when they try to do it... sigh...)

19 Mar 2012, 11:55 AM
#380
keneso avatar

keneso

Totally Zenned

Join Date:
May 2009
Posts:
1,273
Plugin Contributions:
3

Re: Smart Backgrounds support

Thank you for your usual kindness, I hope you're enjoying yourself.

I'll wait for your instructions on the Ultimate Fade-in Slideshow, though I'd rather stick with the slider I have already on the site; hence hoping you don't mind I'll ask for the php if/else statement to select a different header based on language, much like the if/else for different pages.

In case you'd like to check the site where I am trying to do this it's amberprecious dot com where both English, and Italian have the same heade images in the home page, and different ones in the "amber History" (ez-page) page.