Results 1 to 10 of 393

Hybrid View

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

    Default Re: Smart Backgrounds support

    I call the flash like this:
    Code:
    <script src="http://zencart-demo-store2.littleolemedesigns.net/includes/templates/Romance_Divine_Custom/jscript/Header_Animation.js"></script>
    The java file is here:
    http://zencart-demo-store2.littleole...r_Animation.js

    I need a different swf file on the home page, and on each top cat with it's corresponding subcats.

    So like on the top cat

    Bags:

    would use the same swf file as it's sub cats:

    Beach Bags
    Everyday Bags

    Does that make sense??

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

    Default Re: Smart Backgrounds support

    bump

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

    Default Re: Smart Backgrounds support

    Can you name the swf files with a suffix of the category id?

    Is it always the same script file that is supposed to call the different .swf files, or do you have a separate .js file for each .swf?
    Code:
    <script src="http://zencart-demo-store2.littleolemedesigns.net/includes/templates/Romance_Divine_Custom/jscript/Header_Animation.js"></script>
    
    <script src="http://zencart-demo-store2.littleolemedesigns.net/includes/templates/Romance_Divine_Custom/jscript/Header_Animation1.js"></script>
    
    <script src="http://zencart-demo-store2.littleolemedesigns.net/includes/templates/Romance_Divine_Custom/jscript/Header_Animation23.js"></script>

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

    Default Re: Smart Backgrounds support

    It is a separate js file for each swf file... and I can name either of them whatever I want to.

    I don't know much about php.. but I'm thinking the switch would need to test the page to determine what js file to call since the js file calls the swf..

    I just can't figure how to do the switch, or if/else statement, or whatever I would need to determine the current page and call the js file.

    All the swf files will be the same dimensions width and height, so it's just determining which js file to call.

    Thank-you for helping me with this

  5. #5
    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.

  6. #6
    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??

  7. #7
    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.

 

 

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