Page 12 of 40 FirstFirst ... 2101112131422 ... LastLast
Results 111 to 120 of 393
  1. #111
    Join Date
    Feb 2006
    Posts
    656
    Plugin Contributions
    0

    Default Re: Smart Backgrounds support

    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

  2. #112
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Smart Backgrounds support

    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.

  3. #113
    Join Date
    Feb 2006
    Posts
    656
    Plugin Contributions
    0

    Default Re: Smart Backgrounds support

    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

  4. #114
    Join Date
    Jun 2008
    Posts
    7
    Plugin Contributions
    0

    Default Re: Smart Backgrounds support

    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

  5. #115
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Smart Backgrounds support

    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 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]):''
    to this:
    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]):''
    Name your images like smartbg_3.gif, smartbg_3_27.gif, smartbg_3_28.gif, etc.

  6. #116
    Join Date
    Jun 2008
    Posts
    7
    Plugin Contributions
    0

    Default Re: Smart Backgrounds support

    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

  7. #117
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Smart Backgrounds support

    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.

  8. #118
    Join Date
    Apr 2008
    Posts
    283
    Plugin Contributions
    0

    Default Re: Smart Backgrounds support

    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;
    
    
    
    	}

  9. #119
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Smart Backgrounds support

    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.

  10. #120
    Join Date
    Apr 2008
    Posts
    283
    Plugin Contributions
    0

    Default Re: Smart Backgrounds support

    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?

 

 
Page 12 of 40 FirstFirst ... 2101112131422 ... LastLast

Similar Threads

  1. Adding Image Map to header with Smart Backgrounds
    By cspan27 in forum Addon Templates
    Replies: 16
    Last Post: 25 Jul 2009, 01:14 AM
  2. smart backgrounds
    By Glendon in forum All Other Contributions/Addons
    Replies: 0
    Last Post: 11 Sep 2008, 04:49 PM
  3. Backgrounds
    By v.kirk in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 23 Jun 2006, 06:14 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg