Is there a demo of this in action? I checked a few random sites in this thread and no one appears to be using it, site is still in dev or their site is no longer valid.
Thanks!
Is there a demo of this in action? I checked a few random sites in this thread and no one appears to be using it, site is still in dev or their site is no longer valid.
Thanks!
Awesome Glenn!
Works like a charm. Thank you for the quick fix.
For the person asking about whether anyone is using this, I am.
I do not use the backgrounds portion or the css--just the foreground usage in the header logo image.
www.noquartercoffee.com
So your site is just using this contribution to change the main site header logo image? That's what I initially thought this contribution was for, but then I got a bit confused about the background functionality.
So, you can have the header logo image change for any Category and sub-category?
Thanks for the functioning link example.
The nice part of using the background function is that you can have one little bit of code and modify the css to manage the images. The code allows for the placement of a class in the main page, which you can then use in the css to put specific background images in different places.
Since I am scaling a larger image for my logo (and need the hard boundaries of the <img> container, backgrounds doesn't work for my application.
The very first version of Smart Backgrounds was built for changing only the header background, and adaptable by recoding to other locations. It has since become universally applicable, but the original description always stays at the top of a mod's page in Free Addons. Look at the version descriptions for updates on functionality.
Question... Is this the only line of code that needs to be merged into a custom template version of tpl_main_page.php ?
Yes, I am using winmerge, but the template I am using has some line spacing and formatting issues that get flagged as changes and it's making it difficult to see actual code differences. Thanks.Code:<body id="<?php echo $body_id . 'Body'; ?>" class="smartBG<?php echo smart_backgrounds();?>"<?php if($zv_onload !='') echo ' onload="'.$zv_onload.'"'; ?>>
That is correct. The only change from the stock file is the addition of the class to the body tag.PHP Code:class="smartBG<?php echo smart_backgrounds();?>"
Wondering if I have missing something here...
My goal is to just have the header logo change on category entry...
Here is what I've done so far...
1. I merged in the line of code from tpl_main_page.php into my custom template file version.
2. I edited the stylesheet_smartbg.css to add the following (the number corresponds to my category ID):
.smartBG_1 #logo {background-image: url(../images/smartbg_1.gif);}
.smartBG_4 #logo {background-image: url(../images/smartbg_4.gif);}
.smartBG_45 #logo {background-image: url(../images/smartbg_45.gif);}
.smartBG_46 #logo {background-image: url(../images/smartbg_46.gif);}
3. Verified package uploaded to correct folders
4. Uploaded images to the template images directory.
The header logo image is not changing when entering a category. Did I miss editing another file?
Last edited by Crunch; 10 Feb 2010 at 09:55 PM.
Can you post a link to see your site?
Did you clear out the logo image by using pixel_trans.gif or the like? Changing the logo background will be invisible if the original foreground image is still there.
I guess I didn't understand the bit about using pixel_trans.gif.
OK. Went through the readme again. I just updated header.php with define('HEADER_LOGO_IMAGE', 'pixel_trans.gif');
But this destroys my normal logo header image. Think I am still missing something here.
Last edited by Crunch; 10 Feb 2010 at 10:27 PM.