Forums / All Other Contributions/Addons / Smart Backgrounds support

Smart Backgrounds support

Views: 55,899

Results 261 to 280 of 393
16 Sep 2009, 2:17 PM
#262
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

Re: Smart Backgrounds support

gjh42:

I don't recall hearing about any issues...Excellent!! Thanks for the response!

My Site - Zen Cart & WordPress integration specialist
I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.

19 Sep 2009, 5:19 PM
#263
mkonchalski avatar

mkonchalski

New Zenner

Join Date:
Dec 2008
Posts:
18
Plugin Contributions:
0

Re: Smart Backgrounds support

:no: As far as I can see, there is no work around for the CEON URI MAPPING. It's unfortunate.

20 Sep 2009, 11:16 PM
#264
conor avatar

conor

Passed

Join Date:
Aug 2004
Location:
Belfast, Northern Ireland
Posts:
2,480
Plugin Contributions:
4

Re: Smart Backgrounds support

Hi,

mkonchalski:

:no: As far as I can see, there is no work around for the CEON URI MAPPING. It's unfortunate.

I find it very strange that you didn't think to ask in its thread then? :)

I just found this thread by accident but I took a look at the Smart Backgrounds code and it's very basic. I haven't actually tried installing it but am guessing that you were having a problem setting the background on product pages?

Did you try setting the background for category or EZ-Pages? And did that work fine?

The very latest version of Ceon URI Mapping (3.2.4 - download link in its thread) has code added to set the $_GET['cPath'] variable for product pages. Previous versions didn't, as most Zen Cart functionality uses the $cPath variable and this bug only just showed up with some "different" Zen Cart code which also relies on an actual cPath entry in the query string (the $_GET['cPath'] variable).

Looking at the source of the Smart Backgrounds module it's clear to me that that would have broken the module on product info pages.

If the above describes your situation, simply download the latest version of the URI Mapping module and your problems with the Smart Backgrounds module should go away.

I think that with the latest version of the URI Mapping module it is now 100% compatible with Zen Cart.. so if a module doesn't work with it, the module itself must have bugs, not the URI Mapping module!

Incidentally, the Smart Backgrounds module uses unquoted associative array indexes, like $_GET[cPath] - this is wrong, it should be $_GET['cPath']. Just thought that was worth mentioning!

Also, for obvious reasons you can't use relative paths to images when using the URI Mapping module. If your path to an image is ../images/some_image.gif then when you are on /fantastic-books/sci-fi/some-space-book using ../images/some_image.gif won't work as the images directory is on the root of the site. You should instead use /images/some_image.gif (i.e. all image paths must start with a slash / ).

Hope the above helps.

All the best...

Conor
ceon

NOTE: We are sorry that Conor is no longer with us.
We are grateful for all his contributions to the Zen Cart community.

20 Sep 2009, 11:29 PM
#265
conor avatar

conor

Passed

Join Date:
Aug 2004
Location:
Belfast, Northern Ireland
Posts:
2,480
Plugin Contributions:
4

Re: Smart Backgrounds support

Hi,

In my last post I have given an incorrect example of an image URI. Since you are storing the images in /includes/templates/your_template/images/ the example styles which come with Smart Background are incompatible with SEO modules. They should instead be something like the following:

/example to set default header bg/
#headerWrapper {background-image: url(/includes/templates/your_template/images/smartbg.gif);}

/example to set header bg for listing or product page in category id 23/
.smartBG_23 #headerWrapper {background-image: url(/includes/templates/your_template/images/smartbg_23.gif);}

Basically, replace

../images

with

/includes/templates/your_template/images/

As the relative paths don't work with an SEO/SEF/URI Mapped page!

Also upgrade to 3.2.4 though! That should be you up and running.

All the best...

Conor

NOTE: We are sorry that Conor is no longer with us.
We are grateful for all his contributions to the Zen Cart community.

21 Sep 2009, 12:20 AM
#266
gjh42 avatar

gjh42

Black Belt

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

Re: Smart Backgrounds support

Thanks for the information, Conor.
Thanks also for mentioning the missing quotes. Since it works as is, I hadn't revisited that old part of the code in a long time, but that gives a good excuse to update the packaging and perhaps make the mod easier to transplant for alternate uses.

Note that the full URL path is only needed if you are using an SEO mod.

21 Sep 2009, 1:20 AM
#267
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

Re: Smart Backgrounds support

Well all of this makes me feel better..:clap: I am in LOVE with Ceon URI, and the thought that it wasn't compatible with this mod was not makin' me happy:no:..

I am glad to see that I don't have to work up a workaround (though I think I would have at least ASKED Conor before mapping any kind of workaround..:smile:)

My Site - Zen Cart & WordPress integration specialist
I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.

6 Nov 2009, 3:24 PM
#268
oatzey avatar

oatzey

New Zenner

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

Re: Smart Backgrounds support

Hi all,

Newbie poster here and newbie zenner (less than one month).
I've done as per the instructions and although my default page header works perfectly well (smartbg.jpg) I cannot get the header to change when going to path 2...? I've reinstalled the mod about 5 times now and cannot for the life of me get anything other than the default header to display, please help

Here is my website which is very much still under construction:
https://www.swallowbakery.com/shop

Many, many thanks in advance if anyone can fix it.

Realise this is the wrong forum but also my css flyouts don't work, any reason why?

Cheers

9 Nov 2009, 1:08 PM
#269
oatzey avatar

oatzey

New Zenner

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

Re: Smart Backgrounds support

Anyone, please? :(

10 Nov 2009, 9:43 AM
#270
gjh42 avatar

gjh42

Black Belt

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

Re: Smart Backgrounds support

smartbg.jpg

The default code works with .gif images. Did you modify it for .jpg images? If not, that would be the cause. See the readme for directions to modify the code.

The new version of Smart Backgrounds that will be released soon has an easy selection method for choosing the image type to be used.

11 Nov 2009, 10:38 AM
#271
oatzey avatar

oatzey

New Zenner

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

Re: Smart Backgrounds support

gjh42:

smartbg.jpg

The default code works with .gif images. Did you modify it for .jpg images? If not, that would be the cause. See the readme for directions to modify the code.

The new version of Smart Backgrounds that will be released soon has an easy selection method for choosing the image type to be used.

You my friend are The Don! Thank you very much all sorted now:clap::clap::clap:
How do I edit my url on the previous page? Only my client doesn't want the website to go live yet and I need it removed please?

Many many thanks

12 Nov 2009, 7:29 AM
#272
gjh42 avatar

gjh42

Black Belt

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

Re: Smart Backgrounds support

Sorry, members can't edit posts after 7 minutes. Only a moderator can remove your url. If you don't want a live link, you need to follow the directions when posting to put spaces in the name.

4 Dec 2009, 11:38 PM
#273
damiendlskinsolution avatar

damiendlskinsolution

Zen Follower

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

Re: Smart Backgrounds support

Hi Glenn,

Small issue here. I am trying to make it work in the "navColumnOneWrapper".

Here is what i got in the CSS:
.smartBG**_10** #navColumnOneWrapper {background-image: url(../images/smartbg_grapefruit.gif);}

If i understand correctly, this should change the background of the Left Column on that page : /index.php?main_page=index&cPath=10

Well, not quite.

It works when the CSS is only :
#navColumnOneWrapper {background-image: url(../images/smartbg_grapefruit.gif);}

But doesn't work as soon as i add a specific page...

Any idea ? (the website is under construction and the address is in my signature - sorry about the "DOT"...)

As always thank you for your time and help!

Damien

if needed :
tpl_main_php

 */

if ($this_is_home_page == true) {
$flag_disable_left = true;
$flag_disable_right = true;
$flag_disable_header = false;

}

// the following IF statement can be duplicated/modified as needed to set additional flags
  if (in_array($current_page_base,explode(",",'list_pages_to_skip_all_right_sideboxes_on_here,separated_by_commas,and_no_spaces')) ) {
    $flag_disable_right = true;
  }


  $header_template = 'tpl_header.php';
  $footer_template = 'tpl_footer.php';
  $left_column_file = 'column_left.php';
  $right_column_file = 'column_right.php';
  $body_id = ($this_is_home_page) ? 'indexHome' : str_replace('_', '', $_GET['main_page']);
?>

<?php //Smart Backgrounds
$smart_image = '';
if ($current_page_base == 'index' or $current_page_base == 'product_info') { //add _ and cPath to bg filename only if individual cat bg image exists, else add _ and top cat id to bg filename only if top cat bg 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 bg filename only if ez-page id bg image exists, else add _page to bg filename only if general ez-page bg 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 bg filename only if page bg 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?>
<body id="<?php echo $body_id . 'Body'; ?>" class="smartBG<?php echo $smart_image;?>"<?php if($zv_onload !='') echo ' onload="'.$zv_onload.'"'; ?>>

stylesheet_smartbg.css :

.smartBG_10 #navColumnOneWrapper {background-image: url(../images/smartbg_grapefruit.gif);}

4 Dec 2009, 11:50 PM
#274
damiendlskinsolution avatar

damiendlskinsolution

Zen Follower

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

Re: Smart Backgrounds support

Never mind... i need to earn how to read instruction... the name of the file has to match the page...

it works with :
.smartBG_10 #navColumnOneWrapper {background-image: url(../images/smartbg_10.gif);}

Sorry... :blush:

5 Dec 2009, 1:23 AM
#275
gjh42 avatar

gjh42

Black Belt

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

Re: Smart Backgrounds support

Glad you got it sorted.

You can actually use smartbg_grapefruit.gif or any other image in the background, as long as a file named smartbg_10.gif exists in the right place. It just makes it a bit simpler to use the name convention file.

19 Jan 2010, 2:03 PM
#276
twaddle avatar

twaddle

Banned

Join Date:
Jul 2009
Location:
Prague, Czech Republic
Posts:
478
Plugin Contributions:
0

Re: Smart Backgrounds support

Hi Glenn,

I started this thread before I came across your add on, however I'm having some trouble implementing it

Twaddle:

Is it possible to have a different background image for each seperate category? Either for the header or the main central product area (or ideally both)?

At the moment the site is solely for Land Rovers only but there are plans to expand in the future to cater for several different marques such as Rover, Skoda, Ford etc...

What I'd like to do is change the backgound Land Rover images for images of other Car Marques on this page for each category

Ideas/thoughts/solutions appreciated :smile:

I've tried following your set up guidelines and gone through this thread but I just can't seem to get it to do what I want as I described above. If you'd have time to guide me through that would be much appreciated because it sounds to be a great add on and in theory to do exactly what I am after

19 Jan 2010, 4:13 PM
#277
twaddle avatar

twaddle

Banned

Join Date:
Jul 2009
Location:
Prague, Czech Republic
Posts:
478
Plugin Contributions:
0

Re: Smart Backgrounds support

After a fair bit of playing I've managed to get it to do most of what I wanted, so ignore my above request for assistance

Basically, I should have RTFM properly and realise I needed to edit my own tpl_main_page.php rather than use the included file!!! :blush:

Great add on, thanks Glenn!!! :smile:

19 Jan 2010, 4:38 PM
#278
twaddle avatar

twaddle

Banned

Join Date:
Jul 2009
Location:
Prague, Czech Republic
Posts:
478
Plugin Contributions:
0

Re: Smart Backgrounds support

Actually ignore my last comment, I'm still having a couple of problems...

  1. On the Land Rover page and the Skoda pages, the background images are selecting okay, but I can't get them to show through the bg_cont.gif image, I tried making that a transparent image thinking that would work, but obviously it hasn't

I did see in the read_me file this, but that's obviously for the header, not the mainwrapper so I am unsure which file to edit

Also, you will need to edit
/includes/languages/english/your_template/header.php
to use pixel_trans.gif so the background can be seen:

define('HEADER_LOGO_IMAGE', 'logo.gif');

change to

define('HEADER_LOGO_IMAGE', 'pixel_trans.gif');

which leads me on to...

  1. If you look at the Alfa Romeo page which I haven't set any back ground image for, you will see there's a navigation bar across the top with a green background, whereas if you go to the Land Rover page, you will see that the back ground image is showing through

I'll keep plugging away at it, but in the meantime if anybody can point me in the right direction I'd be grateful

19 Jan 2010, 6:56 PM
#279
twaddle avatar

twaddle

Banned

Join Date:
Jul 2009
Location:
Prague, Czech Republic
Posts:
478
Plugin Contributions:
0

Re: Smart Backgrounds support

So, with a lot of fiddling with the CSS I'm almost there... only problem I now have is to get the green navigation bar across the top I'm having to add it manually to the background images... not ideal, but until I work out how to overcome that issue (or somebody can show me) it will have to do :wacko::wacko::wacko:

(and apologies for some of the terrible images I've added before anyone comments, they are only in place to test the layout :blush: )

19 Jan 2010, 9:11 PM
#280
gjh42 avatar

gjh42

Black Belt

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

Re: Smart Backgrounds support

If the navigation bar you are talking about is the one with manufacturer categories, that is #navCatTabsWrapper (even in your Template Monster template) and can be styled with```
#navCatTabsWrapper {
background: #aabbcc;
padding: 0.1em;
width: 100%
}


TM templates are usually much harder to customize the style of, since they have lots of extra nested divs, sometimes tables, and renamed standard elements, sometimes with standard distinction abilities removed.

Since you have done so much since you first posted, it is hard to tell what some of your comments refer to.