Page 24 of 40 FirstFirst ... 14222324252634 ... LastLast
Results 231 to 240 of 393
  1. #231
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Smart Backgrounds support

    You're getting the right classname on ez-page 5 (Our Company) to indicate that it is finding a general ez-pages image file:

    <body id="pageBody" class="smartBG_page">

    but it is not finding a specific ez-page image, and the CSS is not calling for an image for general ez-pages.

    You have a base ez-page image in /benchmark/images/, but the one for page 5 is not there.

    You only have images for two ez-pages, but they are not being found by the code. It's been a long time since I first set up the ez-page code, and I don't remember how I tested it. This needs some debugging. Add this to your tpl_main_page.php near the top of the smartbg code, say under the $smart_image = ''; line:

    echo 'Looking for smartbg_page' . $_GET[id] . '.jpg';

    What output do you see on an ez-page?

    For Account, are you actually seeing the page named "account"? It switches to "login" as soon as it is clicked, for me with no account.
    Last edited by gjh42; 11 Jan 2009 at 01:30 AM.

  2. #232

    Default Re: Smart Backgrounds support

    OK entering the code outputs the correct file name:

    Looking for smartbg_page5.jpg

    I do have this file (also smartbg_page.jpg, smartbg_page25.jpg, smartbg_page34.jpg, smartbg_page36.jpg, and smartbg_page37.jpg) in the includes/template/benchmark/images/ directory. I also tried to put into the /images folder in the root directory and still nothing.

    By the way, I jumped the gun on Account. That works fine. It was late (around 3am) when I posted, I must have been seeing stars. Sorry.

    Here's my entire CSS file in case the problem may be there:

    Code:
    /*example to set default header bg*/
    #headerWrapper {background-image: url(../images/smartbg.jpg);}
    
    /* Header - Buy Now/Website Design*/
    .smartBG_66 #headerWrapper {background-image: url(../images/smartbg_66.jpg);}
    
    /* Buy Online Page - page34 */
    .smartBG_page34 #headerWrapper {background-image: url(../images/smartbg_page34.jpg);}
    
    /* Our Servcies Page - page36 */
    .smartBG_page36 #headerWrapper {background-image: url(../images/smartbg_page36.jpg);}
    
    /* Our Gaurantee Page - page25 */
    .smartBG_page25 #headerWrapper {background-image: url(../images/smartbg_page25.jpg);}
    
    /* Our Servcies | Web Design Page - page37 */
    .smartBG_page37 #headerWrapper {background-image: url(../images/smartbg_page37.jpg);}
    
    /* Header - Contact Us*/
    .smartBG_contact_us #headerWrapper {background-image: url(../images/smartbg_contact_us.jpg);}
    
    /* Header - Login*/
    .smartBG_login #headerWrapper {
    	background-image: url(../images/smartbg_login.jpg);
    	background-color: #CCCCCC;
    }
    
    /* Header - Account*/
    .smartBG_account #headerWrapper {background-image: url(../images/smartbg_account.jpg);}
    
    /*example to set content bg for ez-page id 34*/
    /* .smartBG_page34 #contentMainWrapper {background-image: url(../images/smartbg_page34.jpg);} */
    
    /*example to set center column bg for ez-page id 34*/
    .smartBG_page34 .centerColumn {background-image: url(../images/smartbg_page34.jpg);}
    Hope this helps.

    Thanks
    BenchmarkDesign.Net - Integrated Media Solutions

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

    Default Re: Smart Backgrounds support

    This is perplexing. It should be looking for the correct file, and for other kinds of pages it is finding the correct file and setting the class correctly.
    Can you move that debug line to just below the

    } elseif ($current_page_base == 'page')

    line? This will prove whether the ez=page section is operating at all, or just skipping down to the final test for page type.

    I didn't find the page5 file when I looked at them before, but I do see it now.

  4. #234

    Default Re: Smart Backgrounds support

    yes, this is perplexing. you have no idea how many hours I messed with this before I posted.

    I placed the debug code here:

    } elseif ($current_page_base == 'page')
    {echo 'Looking for smartbg_page' . $_GET[id] . '.jpg'; //add _page and ez-page id to bg filename only if ez-page id bg image exists, else add _page to bg filename only if general ez-page bg image exists

    it pulled up the correct image file name.

    I just copied and pasted the original code from the original Smart Backgrounds file just in case I had a typo or accidentally removed something, but no, still not working.

    I have modified my tpl_main_page file, I'm going to try using the original code with this add-on and see if it works. At least that will tell me whether or not it has something to do with my modifications.

    I'll let you know shortly.
    BenchmarkDesign.Net - Integrated Media Solutions

  5. #235

    Default Re: Smart Backgrounds support

    replaced it with the original tpl_main_page file - that didn't work either. Is it possible that it has something to do with settings in EZpages admin?
    BenchmarkDesign.Net - Integrated Media Solutions

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

    Default Re: Smart Backgrounds support

    I can't say it isn't possible without checking, though I can't think of any setting that could affect this code.

    I'm going to do a test run on my local installation to see if I can reproduce these results, or verify that it works on an otherwise stock version.

  7. #237

    Default Re: Smart Backgrounds support

    OK - I'm going to see if there are any possible settings in the admin that may effect. However, I don't think there. I'll let you know if anything turns up.
    BenchmarkDesign.Net - Integrated Media Solutions

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

    Default Re: Smart Backgrounds support

    This is a reminder to test even what seem like no-brainer code modifications... turns out that the chained ternary operators were getting confused and giving the output for the second test when the first test was positive. It needed parentheses to correctly organize them. So

    $smart_image = file_exists(DIR_WS_TEMPLATE_IMAGES . 'smartbg_page' . $_GET[id] . '.gif')?'_page' . $_GET[id]:file_exists(DIR_WS_TEMPLATE_IMAGES . 'smartbg_page.gif')?'_page':'';

    needs to be

    $smart_image = file_exists(DIR_WS_TEMPLATE_IMAGES . 'smartbg_page' . $_GET[id] . '.gif')?'_page' . $_GET[id]:(file_exists(DIR_WS_TEMPLATE_IMAGES . 'smartbg_page.gif')?'_page':'');

    and the same with the previous statement:
    $smart_image = file_exists(DIR_WS_TEMPLATE_IMAGES . 'smartbg_' . $_GET[cPath] . '.gif')?'_' . $_GET[cPath]:(file_exists(DIR_WS_TEMPLATE_IMAGES . 'smartbg_' . (int)$_GET[cPath] . '.gif')?'_' . (int)$_GET[cPath]:'');
    PHP Code:
    if ($current_page_base == 'index' or $current_page_base == 'product_info') { //add _ and cPath to bg filename only if individual cat bg image exists, else add _ and top cat id to bg filename only if top cat bg image exists
      
    $smart_image file_exists(DIR_WS_TEMPLATE_IMAGES 'smartbg_' $_GET[cPath] . '.gif')?'_' $_GET[cPath]:(file_exists(DIR_WS_TEMPLATE_IMAGES 'smartbg_' . (int)$_GET[cPath] . '.gif')?'_' . (int)$_GET[cPath]:'');
    } elseif (
    $current_page_base == 'page') { //add _page and ez-page id to bg filename only if ez-page id bg image exists, else add _page to bg filename only if general ez-page bg image exists
      
    $smart_image file_exists(DIR_WS_TEMPLATE_IMAGES 'smartbg_page' $_GET[id] . '.gif')?'_page' $_GET[id]:(file_exists(DIR_WS_TEMPLATE_IMAGES 'smartbg_page.gif')?'_page':'');
    } else 
    I have submitted an update to the mod in Free Addons, but if you have this installed already, all you need to do is add parentheses to the two statements as shown.

  9. #239

    Default Re: Smart Backgrounds support

    Hallelujah! Thank you Glen! You're awesome. I had a feeling it had to do with syntax, but wasn't exactly sure. Thanks a bunch for such a wonderful contribution! - Ara
    BenchmarkDesign.Net - Integrated Media Solutions

  10. #240
    Join Date
    Jan 2009
    Posts
    19
    Plugin Contributions
    0

    Default Re: Smart Backgrounds support

    Hey Glen

    Man ive been studying and testing and reading post after post..ive gotten some results but not complete results...it all seems easy but i must be missing something..

    Im using smart backgrounds to try and create a different Mainwrapper-background image for 3 pages. My main page, shipping, and contact us pages.

    I have installed version 2.1.1.

    I can get the shippinginfo page to work..but i cant seems to get all 3 pages different.

    I feel like a fool because ive read over and over you telling us all how to do it...and yet i have to ask you to hold my hand through it.

    THX in advance for your help.

    Rob

    www.loudervisions.com

 

 
Page 24 of 40 FirstFirst ... 14222324252634 ... 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

Bookmarks

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
Zen-Cart, Internet Selling Services, Klamath Falls, OR