Page 35 of 40 FirstFirst ... 253334353637 ... LastLast
Results 341 to 350 of 393
  1. #341
    Join Date
    Feb 2011
    Posts
    665
    Plugin Contributions
    0

    Default Re: Smart Backgrounds support

    V1.39
    Downloaded and installed per the instructions.

    After unzipping the files on your computer, follow the folder tree to /your_template/. Rename the /your_template/ folder to the folder name of the custom template you are using.

    Done.
    After making the folder edit, ftp the /includes/ folder to the root of your store on the server. The files will automatically be placed in the correct locations.
    Since my site has not ye been uploaded yet I saved the /includes/ folder in the root directory (Zencart)*Note*: If you have modified tpl_main_page.php, remove the copy from this package and merge the code line described below into your existing custom copy.
    To be honest, I don't recall having made any changes but I copied the tpl_main_page.php and merged the code by a simple cut and paste.
    Next:
    To use different backgrounds (in any desired page element) for each category or page:
    Name your background images like smartbg_23.gif or smartbg_shippinginfo.gif and save in /includes/templates/your_template/images/.
    Done renamed a pic to smartbg_stuff.jpg

    To switch backgrounds for a top category and all its subcats, add its id like _# to smartbg.
    To switch backgrounds for a single subcategory, add its cPath like _#_# to smartbg.
    To switch backgrounds for all ez-pages, add _page to smartbg.
    To switch backgrounds for a single ez-page, add its id like _page# to smartbg.
    To switch backgrounds for a particular Zen Cart page, add its name like _pagename to smartbg. Done. pic now named smartbg_page#2_stuff.jpg
    Look in the address bar to get the current page name, ez-page id or cPath.
    Combine the smartBG_ class with the class or id of the element you want to affect, per the stylesheet examples below.

    In /includes/templates/your_template/common/tpl_main_page.php, this line


    <body id="<?php echo $body_id . 'Body'; ?>"<?php if($zv_onload !='') echo ' onload="'.$zv_onload.'"'; ?>>

    is replaced with

    <body id="<?php echo $body_id . 'Body'; ?>" class="smartBG<?php echo smart_backgrounds();?>"<?php if($zv_onload !='') echo ' onload="'.$zv_onload.'"'; ?>>

    If you want to use jpg or png images instead of gifs, change echo smart_backgrounds() to echo smart_backgrounds('.jpg') or '.png', etc. Done, changed to use .jpg

    No change to pages 2,3, or 4. all still have the same background as the main page.


    To clarify what I'm trying to do.
    I'd like to have a diffrent pic as a background for every page. I've already gone into the my Stylesheet and used the /* */ do-dad's* to allow my pic to be visible.

    * This should let you know that I'm not an IT guy, a computer guru, programmer, etc.

    So K.I.S.S. !!

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

    Default Re: Smart Backgrounds support

    To switch backgrounds for a particular Zen Cart page, add its name like _pagename to smartbg. Done. pic now named smartbg_page#2_stuff.jpg
    Look in the address bar to get the current page name, ez-page id or cPath.
    If your page is named page_2 (...main_page=page_2), the image needs to be named exactly
    smartbg_page_2.jpg, not smartbg_page#2_stuff.jpg.

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

    Default Re: Smart Backgrounds support

    I see how you misinterpreted the instructions, as two separate steps. I will rework the readme to make it crystal clear that there is only one naming step here.

    *Note*: If you have modified tpl_main_page.php,
    I will rework this to say

    *Note*: If you have a copy of tpl_main_page.php in your custom template folder,

    as you should never modify a default copy of a file.
    Last edited by gjh42; 11 Feb 2011 at 12:24 AM.

  4. #344
    Join Date
    Feb 2011
    Posts
    665
    Plugin Contributions
    0

    Default Re: Smart Backgrounds support

    Quote Originally Posted by gjh42 View Post
    If your page is named page_2 (...main_page=page_2), the image needs to be named exactly
    smartbg_page_2.jpg, not smartbg_page#2_stuff.jpg.
    Done

    Quote Originally Posted by gjh42 View Post
    I see how you misinterpreted the instructions, as two separate steps. I will rework the readme to make it crystal clear that there is only one naming step here.


    I will rework this to say

    *Note*: If you have a copy of tpl_main_page.php in your custom template folder,

    as you should never modify a default copy of a file.
    Okay...so now how do I recover from this?

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

    Default Re: Smart Backgrounds support

    There's no real harm done in this case. You can copy tpl_main_page.php into your custom template folder so it won't be lost if you upgrade. The edited version won't be a problem in /template_default/ for now.

  6. #346
    Join Date
    Feb 2011
    Posts
    665
    Plugin Contributions
    0

    Default Re: Smart Backgrounds support

    Quote Originally Posted by gjh42 View Post
    I see how you misinterpreted the instructions, as two separate steps. I will rework the readme to make it crystal clear that there is only one naming step here.


    I will rework this to say

    *Note*: If you have a copy of tpl_main_page.php in your custom template folder,

    as you should never modify a default copy of a file.

    Guess which one I modified....

  7. #347
    Join Date
    Feb 2011
    Posts
    665
    Plugin Contributions
    0

    Default Re: Smart Backgrounds support

    Went backwards and deleted "<body id="<?php echo $body_id . 'Body'; ?>" class="smartBG<?php echo smart_backgrounds();?>"<?php if($zv_onload !='') echo ' onload="'.$zv_onload.'"'; ?>>"

    With "<body id="<?php echo $body_id . 'Body'; ?>"<?php if($zv_onload !='') echo ' onload="'.$zv_onload.'"'; ?>>"

    Saved as \includes\templates\template_default\ tpl_ main_page.php


    I renamed the pic as suggested previously....still no change.

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

    Default Re: Smart Backgrounds support

    Does the /your_template/ version of tpl_main_page.php currently have
    class="smartBG<?php echo smart_backgrounds(.jpg);?>"
    Copy & paste that line here.

    What image filenames and folder paths do you currently have saved?

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

    Default Re: Smart Backgrounds support

    I notice you don't mention the stylesheet. Did you add a rule for the background-image for each page, as the readme describes?

    Again, I see that if you don't know that you need to add stylesheet rules to get backgrounds, you could overlook this direction. Another improvement for the next version's readme!
    Last edited by gjh42; 11 Feb 2011 at 03:29 AM.

  10. #350
    Join Date
    Feb 2011
    Posts
    665
    Plugin Contributions
    0

    Default Re: Smart Backgrounds support

    Quote Originally Posted by gjh42 View Post
    I notice you don't mention the stylesheet. Did you add a rule for the background-image for each page, as the readme describes?

    Again, I see that if you don't know that you need to add stylesheet rules to get backgrounds, you could overlook this direction. Another improvement for the next version's readme!
    Yeah, but iI probably screwed it up too. This what I added to the last line of \includes\templates\MyCustomName\css\stylesheet.php

    [QUOTE}.smartBG_page2 # {background-image: url(../images/smartBG_page2.jpg);}
    [/QUOTE]

 

 
Page 35 of 40 FirstFirst ... 253334353637 ... 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