Results 1 to 10 of 393

Hybrid View

  1. #1

    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

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

  3. #3

    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

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

  5. #5

    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

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

 

 

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