Page 10 of 40 FirstFirst ... 8910111220 ... LastLast
Results 91 to 100 of 393
  1. #91
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Smart Backgrounds support

    This mod is only going to be effective for background images, not foreground images like the logo. If you have an image defined for the logo, it will always cover the background. You need to suppress that image and give #headerLogo a defined height where you want the background to show for the logo. Presumably you would do this in top2.php.
    You could add to your stylesheet for each page where you want a bg logo

    .smartBG_95 #logo {display: none;}
    Last edited by gjh42; 11 Sep 2008 at 11:44 PM.

  2. #92
    Join Date
    Feb 2006
    Posts
    656
    Plugin Contributions
    0

    Default Re: Smart Backgrounds support

    I'm not sure I follow you. And, actually, I've done away with top2.php and I'm doing it this way instead:
    PHP Code:
    <!--bof-branding display-->

    <?php
    if ($this_is_home_page) {
    include(
    'top_main.php');
    }
    else
    {
    echo 
    '<a href="' HTTP_SERVER DIR_WS_CATALOG '">' zen_image($template->get_template_dir(HEADER_LOGO_IMAGEDIR_WS_TEMPLATE$current_page_base,'images'). '/' HEADER_LOGO_IMAGEHEADER_ALT_TEXT'','''id="logo"' ) . '</a>';

    }
    ?>

           </td>

    </tr>
    </table>
    <!--eof-branding display-->
    Now, back to the logo problem. You say that I can't really use this mod for foreground images, but in the read me file, there are explicit directions (which confuse the heck out of me anyway) for doing so.

    I'm wanting to completely revamp my site, and using different headers and logos is the perfect way to do it.

    There's gotta be a way.
    I Think, Therefore I Zen. I Zen, Therefore, I AM!
    Personalized Flowers!
    Flowertown Speaking Roses
    using version 1.5.7-06232020

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

    Default Re: Smart Backgrounds support

    Oh right... it does say that...:) The first version of the mod with code in the file where the switching happens could be modified for foreground images. The same principles could be used in the new version, but would require adding new code in the file (in this case tpl_header.php.) I'm away from home right now and don't have access to my files, so I'll look at it later and get back to you.

  4. #94
    Join Date
    Feb 2006
    Posts
    656
    Plugin Contributions
    0

    Default Re: Smart Backgrounds support

    Ok, I sure would appreciate that. Will that be today (this evening-don't know your time zone)?
    I Think, Therefore I Zen. I Zen, Therefore, I AM!
    Personalized Flowers!
    Flowertown Speaking Roses
    using version 1.5.7-06232020

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

    Default Re: Smart Backgrounds support

    Probably tomorrow morning your time.

  6. #96
    Join Date
    Feb 2006
    Posts
    656
    Plugin Contributions
    0

    Default Re: Smart Backgrounds support

    Ok. Looking forward to it. Thanks.
    I Think, Therefore I Zen. I Zen, Therefore, I AM!
    Personalized Flowers!
    Flowertown Speaking Roses
    using version 1.5.7-06232020

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

    Default Re: Smart Backgrounds support

    You would edit this area in tpl_header.php:
    PHP Code:
    <!--bof-branding display-->
    <div id="logoWrapper">
        <div id="logo"><?php echo '<a href="' HTTP_SERVER DIR_WS_CATALOG '">' zen_image($template->get_template_dir(HEADER_LOGO_IMAGEDIR_WS_TEMPLATE$current_page_base,'images'). '/' HEADER_LOGO_IMAGEHEADER_ALT_TEXT) . '</a>'?></div>
    Put the Smart BG code just above the logo div, with alterations as shown, and edit the logo display to use the smart filename, to end up with this:
    PHP Code:
    <!--bof-branding display-->
    <div id="logoWrapper">
    <?php //Smart Backgrounds - for foreground logo
    $smart_image '';
    $unique_ezpages true;//change to false to not have diff bg for each ezpage
    if ($current_page_base == 'index' or $current_page_base == 'product_info') { //change filename to smartimg_ and top cat id only if cat image exists
      
    $smart_image = (file_exists(DIR_WS_TEMPLATE_IMAGES 'smartimg_' str_replace(strstr($_GET[cPath],'_'),'',$_GET[cPath]) . '.gif'))?'smartimg_' str_replace(strstr($_GET[cPath],'_'),'',$_GET[cPath]):HEADER_LOGO_IMAGE;
    } elseif (
    $current_page_base == 'page' and $unique_ezpages == true) { //change filename to smartimg_page and ez-page id only if ez-page image exists
      
    $smart_image = (file_exists(DIR_WS_TEMPLATE_IMAGES 'smartimg_page' $_GET[id] . '.gif'))?'smartimg_page' $_GET[id]:HEADER_LOGO_IMAGE;
    } else { 
    //change filename to smartimg_ and pagename only if  page image exists
      
    $smart_image = (file_exists(DIR_WS_TEMPLATE_IMAGES 'smartimg_' $current_page_base '.gif'))?'smartimg_' $current_page_base:HEADER_LOGO_IMAGE//default/home page image will be as defined (HEADER_LOGO_IMAGE)
    }// /Smart Backgrounds?>
        <div id="logo"><?php echo '<a href="' HTTP_SERVER DIR_WS_CATALOG '">' zen_image($template->get_template_dir($smart_imageDIR_WS_TEMPLATE$current_page_base,'images'). '/' $smart_imageHEADER_ALT_TEXT) . '</a>'?></div>

  8. #98
    Join Date
    Feb 2006
    Posts
    656
    Plugin Contributions
    0

    Default Re: Smart Backgrounds support

    This is what I have in my tpl_header.php now

    PHP Code:
    <!--bof-branding display-->

    <?php
    if ($this_is_home_page) {
    include(
    'top_main.php');
    }
    else
    {
    echo 
    '<a href="' HTTP_SERVER DIR_WS_CATALOG '">' zen_image($template->get_template_dir(HEADER_LOGO_IMAGEDIR_WS_TEMPLATE$current_page_base,'images'). '/' HEADER_LOGO_IMAGEHEADER_ALT_TEXT'','''id="logo"' ) . '</a>';

    }
    ?>

           </td>

    </tr>
    </table>
    <!--eof-branding display-->
    How would I add what you suggest to this without breaking my home page flash logo?
    I Think, Therefore I Zen. I Zen, Therefore, I AM!
    Personalized Flowers!
    Flowertown Speaking Roses
    using version 1.5.7-06232020

  9. #99
    Join Date
    Feb 2006
    Posts
    656
    Plugin Contributions
    0

    Default Re: Smart Backgrounds support

    I've gone passed the alloted 7 minutes for editing

    Anyway, here is what I did:

    Ok, here is what I've done.

    In tpl_header.php I have this:

    Code:
    <?php
    if ($this_is_home_page) {
    include('top_main.php');
    }
    else
    {
    include('top2.php');
    }
    ?>
    in my top2.php I've put the code you suggested above.

    Now, When I go to my Gift Certificates page, It still isn't working, however, I can see some changes effected by your code within the page source. This tells me we are making progress.
    I Think, Therefore I Zen. I Zen, Therefore, I AM!
    Personalized Flowers!
    Flowertown Speaking Roses
    using version 1.5.7-06232020

  10. #100
    Join Date
    Feb 2006
    Posts
    656
    Plugin Contributions
    0

    Default Re: Smart Backgrounds support

    a little more information:

    The cPath is 95 so in my stylesheet_smartbg.css I have
    Code:
    .smartBG_95 #logo {background-image: url(../images/smartbg_95.gif);}
    I used #logo because that is what shows up when you do a view page source on that page.

    The logo still doesn't change to smartbg_95.gif.
    I Think, Therefore I Zen. I Zen, Therefore, I AM!
    Personalized Flowers!
    Flowertown Speaking Roses
    using version 1.5.7-06232020

 

 
Page 10 of 40 FirstFirst ... 8910111220 ... 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