Results 1 to 10 of 393

Hybrid View

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

    Default Re: Smart Backgrounds support

    OK, that makes it easy.
    You would use a simplified version of the smart bg code, eliminating the verification of the image file and just setting the variable $smart_image to the top category id if on a product page.
    PHP Code:
    <?php //Smart Backgrounds
    $smart_image '';
    if (
    $current_page_base == 'index' or $current_page_base == 'product_info') { //add _ and top cat id to js filename
      
    $smart_image '_' . (int)$_GET[cPath];
    // /Smart Backgrounds?>
    <script src="http://zencart-demo-store2.littleolemedesigns.net/includes/templates/Romance_Divine_Custom/jscript/Header_Animation<?php echo $smart_image;?>.js"></script>
    I'm not certain the php inclusion in the script code will work as is; it may be necessary to formulate the script code in php and then output it. If it doesn't work as shown, let me know and I'll work on that.

    You will have to be responsible for ensuring that there is a .js file for each top category, and one for the home and all other pages. Name them like

    Header_Animation.js

    for the home page, and

    Header_Animation_23.js

    for category 23 and its subs.

  2. #2
    Join Date
    Dec 2007
    Posts
    141
    Plugin Contributions
    0

    Default Re: Smart Backgrounds support

    Thank-You so much!!

    I'll be trying it out within the next couple weeks.. I'm doing the final flash animations now.. and waiting on the client to approve them.

    Just a question since she's mentioned this too... would it be possible to have a flash animation on the home page and have the category pages have static images.. different images for each category??

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

    Default Re: Smart Backgrounds support

    That would certainly be possible... it would look more like the original Smart BG code.

    One thing to keep in mind is that you will have a lot of pages that are neither Home nor category-related, like shopping cart, shipping & returns policy, contact, all products, etc. The code I gave you will use the home page flash for all of those. If you want something different, you will have to formulate your desires fully and possibly modify the code to fit.

  4. #4
    Join Date
    Dec 2007
    Posts
    141
    Plugin Contributions
    0

    Default Re: Smart Backgrounds support

    Thank-You so much for all your help. I think my client is still up in the air on a lot of what she wants.. so before I tell her something is even an option, I like to research it.

    She's desperately trying to improve her site for SEO.. and there are conflicting opinions out there concerning flash in the site and headers more relevant to content.. so she's tossing it all around.

    Thank you again for all your help!

  5. #5
    Join Date
    Dec 2007
    Posts
    141
    Plugin Contributions
    0

    Default Re: Smart Backgrounds support

    Well... tried it... and it works perfectly everywhere but the home page... lol

    I've still gotta do different animations on the product pages.. but for now it's just a static swf file that doesn't animate vs the home page on that does.

    I'm sure this is something simple... probably something to do with the home page not having a cPath to assign the file name to.. I'm trying to figure it out.. but if you have any advice on it.. I'd certainly appreciate it...

    The site is http://www.photo-store.memorylanedesigns.com/

    Thank-You again!!!

  6. #6
    Join Date
    Dec 2007
    Posts
    141
    Plugin Contributions
    0

    Default Re: Smart Backgrounds support

    Ha.. figured it out.. the first file needs to be named...

    Header_animation_0.js

    for the home page other than that.. works perfectly!!

    THANK-YOU!!! THANK-YOU!!!

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

    Default Re: Smart Backgrounds support

    A refinement of the code to account for the home page where there is not a cPath:
    PHP Code:
    <?php //Smart Backgrounds
    $smart_image '';
    if ((
    $current_page_base == 'index' and $_GET[cPath] != 0) or $current_page_base == 'product_info') { //add _ and top cat id to js filename
      
    $smart_image '_' . (int)$_GET[cPath];
    // /Smart Backgrounds?>
    <script src="http://zencart-demo-store2.littleolemedesigns.net/includes/templates/Romance_Divine_Custom/jscript/Header_Animation<?php echo $smart_image;?>.js"></script>
    This will allow the home page to have the basic filename without added _0.

 

 

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