Page 26 of 40 FirstFirst ... 16242526272836 ... LastLast
Results 251 to 260 of 393
  1. #251

    Default Re: Smart Backgrounds support

    Quote Originally Posted by gjh42 View Post
    What file does the random image generator code go into? tpl_header.php? You would want to modify the random code to choose among a set of classnames referring to your images; include a test to call the random code for the home page and a static header classname for the rest, like this:
    PHP Code:
    <?php
    if ($this_is_home_page) {
      
    $header_class //random generator classname call - to give names like 'random1', 'random2', 'random3', etc.
    }else{
      
    $header_class 'static';
    ?>
    <div id="headerWrapper class="<?php echo $header_class;?>">
    Then you would have a set of stylesheet rules like
    Code:
    .smartBG_page_whatever #headerWrapper {background: url(../images/smartbg_page_whatever.jpg);}
    #indexHome #headerWrapper.random1 {background: url(../images/randombg1.jpg);}
    #indexHome #headerWrapper.random2 {background: url(../images/randombg2.jpg);}
    #indexHome #headerWrapper.random3 {background: url(../images/randombg3.jpg);}
    #indexHome #headerWrapper.random4 {background: url(../images/randombg4.jpg);}
    The #indexHome will give enough specificity and priority to enforce the random selection for the home page.

    If you want to use jpegs for the backgrounds, you need to either change Smart Backgrounds code to refer to .jpg instead of .gif in all places, or include a set of dummy image files with .gif suffixes to trigger the smartbg classnames, and the real .jpg files to use in the stylesheet.
    Note that since you have to write the stylesheet rules manually, you don't have to refer to the same bg files as the ones the smartbg code looked for.
    Glenn,

    This seems like a good solution for having random backgrounds on the home page only, but don't understand what happens on the line:

    $header_class = //random generator classname call - to give names like 'random1', 'random2', 'random3', etc.

    would this be written as :

    $header_class = random1;
    $header_class = random2;
    $header_class = random3;

    etc?

    thanks

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

    Default Re: Smart Backgrounds support

    That is where I was suggesting the modified random generator code would go. I don't know the best way to set it up for this application, but it would end up by feeding one name into $header_class.

    My feeling is that you would include or require rotate.php from tpl_header.php, and modify its last line from

    header('Location: '.$folder.$files[$rand]); // Voila!

    to

    $header_class = $files[$rand]); // class to use for header bg this time

    You would also want to remove the value of $ext from $file before saving each time as $files[] so you get a simple string for the classname.

    $file = str_replace($ext, '', $file);

  3. #253
    Join Date
    Dec 2008
    Posts
    18
    Plugin Contributions
    0

    Default Re: Smart Backgrounds support

    Does anyone know if this Mod gets interference from CEON URI Mapping?

    I have tried to install this mod, and I get the same class for all of my pages. Class="smartBG".

    Is there a work around this? It would be an awesome mod to have. The project I'm working on is www.walls360.com/shop.

    I also have the Column Grid, Gallery2 -> Zen Cart, Google Analytics, Easy Populate, Image Handler (currently disabled), and am working on getting Zen Light Box up.

    Thanks for any help in advance.

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

    Default Re: Smart Backgrounds support

    It may well interfere. One of the other SEO mods caused some problem with a basic ZC function until cPath info was enabled in it, and CEON's may also eliminate info that Smart BG needs to operate. You would have to ask Conor how to get the info to be available.

  5. #255
    Join Date
    May 2009
    Location
    Junction City, Oregon
    Posts
    315
    Plugin Contributions
    0

    Default Re: Smart Backgrounds support

    Question - I got the Smart Backgrounds to work with the images I wanted.... but my client wants to change whole categories to have not only different images, but different colors as well...

    Can you make a suggestion on whether I can use Smart Backgrounds for this, or whether there is another good work-around for this?

    Thanks!

    KismetDesign

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

    Default Re: Smart Backgrounds support

    In the stylesheet rules you write for the images, you can also specify background-color, and anything else that you wish. As long as you have the first image that triggers the Smart BG code, you can style any element on the page with the .smartbg_whatever class prefixed.

  7. #257
    Join Date
    Dec 2008
    Posts
    18
    Plugin Contributions
    0

    Default Re: Smart Backgrounds support

    Yup...CEON URI mapping interferes with Smart Backgrounds in case anyone wanted to know...

  8. #258
    Join Date
    Jan 2007
    Location
    Los Angeles, California, United States
    Posts
    10,021
    Plugin Contributions
    32

    Default Re: Smart Backgrounds support

    Quote Originally Posted by mkonchalski View Post
    Yup...CEON URI mapping interferes with Smart Backgrounds in case anyone wanted to know...
    Is there a workaround??

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

    Default Re: Smart Backgrounds support

    I don't know how Ceon URI Mapping functions, so can't say anything about making it and Smart Backgrounds play nice together.

  10. #260
    Join Date
    Jan 2007
    Location
    Los Angeles, California, United States
    Posts
    10,021
    Plugin Contributions
    32

    Default Re: Smart Backgrounds support

    Quote Originally Posted by gjh42 View Post
    I don't know how Ceon URI Mapping functions, so can't say anything about making it and Smart Backgrounds play nice together.
    Fair enough.. Do you know off-hand if are there compatibility with your add-on and Simple Seo Url Module ?

 

 
Page 26 of 40 FirstFirst ... 16242526272836 ... 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