Can you be a little more specific? Like, where do I add the line of code you showed above, and, will I have to create a seperate defines for each logo's alt text?
Can you be a little more specific? Like, where do I add the line of code you showed above, and, will I have to create a seperate defines for each logo's alt text?
I Think, Therefore I Zen. I Zen, Therefore, I AM!
Personalized Flowers!
Flowertown Speaking Roses using version 1.5.7-06232020
Yes, you would have to make a separate define for each logo alt. Just about every line of the code above would have to be reshuffled - not difficult, but will take a bit of work. I'll look at it in the next day or so.
Ok, cool. LOL, like I said, looks like you are well on your way to a new mod.One of the cleverest ones I've had the pleasure of using yet. And I'm the first kid on the street to have it too!
![]()
I Think, Therefore I Zen. I Zen, Therefore, I AM!
Personalized Flowers!
Flowertown Speaking Roses using version 1.5.7-06232020
Hi Glenn,
Fantastic addon! works like a dream... Just need to be able to have smartbg work with sub categories aswell. Can you point me in the direction of the code for this or help in anyway ?
Each lady/model needs to be featured showing the products on sub categories aswell. Site design and build in progress here:
http://www.soukdesigns.com/shop
Thanks
Mark
The code is actually a little simpler to have backgrounds for each subcategory; if you do this, you do need to have a separate background image file for every subcat as well as their top cat, even if they are all identical.
Change thisto this:PHP Code:if ($current_page_base == 'index' or $current_page_base == 'product_info') { //add _ and top cat id to bg filename only if cat bg image exists
$smart_image = (file_exists(DIR_WS_TEMPLATE_IMAGES . 'smartbg_' . str_replace(strstr($_GET[cPath],'_'),'',$_GET[cPath]) . '.gif'))?'_' . str_replace(strstr($_GET[cPath],'_'),'',$_GET[cPath]):'';
Name your images like smartbg_3.gif, smartbg_3_27.gif, smartbg_3_28.gif, etc.PHP Code:if ($current_page_base == 'index' or $current_page_base == 'product_info') { //add _ and cPath to bg filename only if (sub)cat bg image exists
$smart_image = (file_exists(DIR_WS_TEMPLATE_IMAGES . 'smartbg_' . $_GET[cPath] . '.gif'))?'_' . $_GET[cPath]):'';
Hi Glenn,
Thanks for your code. However when I replace as you've said, I refresh the homepage everything vanishes (the whole page, just left with background colour).
Will this happen if a smartbg image is missing; didn't even get to view a subcat page or is something else wrong?
Thanks again,
Mark
If a smartbg image is missing, the code is supposed to use the default background image, if any. It definitely could not cause an output error other than not having a background where one is supposed to be.
I double checked the code change just now; it appears to be correct.
Please post the whole "smartbg" section of your tpl_main_page.php, using [php] and [/php] tags, so I can see what is wrong.
I don't know if this is off topic or not but I am interested in just having an image as my background but have it stretched to match different resolutions. I would like to do this in css I have researched it throughout this forum but haven't found anything that worked or I am most likely doing something wrong. Here is the site in question...
http://www.wpc-consulting.com/~stxmill
The code I have right now in my css for this is as follows;
Code:body { margin: 60px; font-family: verdana, arial, helvetica, sans-serif; font-size: 62.5%; color: #103808; background-image: url(http://www.wpc-consulting.com/~stxmill/images/home_page/background.jpg); background-attachment:fixed; }
CSS background images do not stretch. They display at the pixel size they were created; if they are bigger than the container, they will get cut off at the edges, and if they are smaller, they will repeat to fill it, or leave blank space around if set to no-repeat.
The best way to make a background-image is to save it in the custom template folder
(/includes/templates/your_template/images/home_page_background.jpg) and use a relative url:
background-image: url(../images/home_page_background.jpg);
The absolute url you have will not work when the site is transferred to your client's domain and will have to be recoded. (Actually, it might work as long as you keep the image in the same location in your domain, but your client's site will be hotlinking back to your site to use it... not good.) The relative url works from the top of wherever it is, so is portable without editing.
Last edited by gjh42; 28 Sep 2008 at 06:37 AM.
Well the site is www.wpc-consulting.com/~stxmill because I am still working on it when it is done it will be its own url. So pretty much all the links and urls will be changed to match this. However my background does repeat or leaves blank space and if you have seen the background on the page it can't do that it won't look good. Are you saying my only solution is to make the image much larger?