Results 1 to 10 of 393

Hybrid View

  1. #1
    Join Date
    Sep 2008
    Posts
    9
    Plugin Contributions
    0

    Default Re: Smart Backgrounds support

    Ok, it's not hanging up if the smart_backgrounds_functions is in the /includes/functions/extra_functions folder

    if it is in
    /includes/functions/extra_functions/mytemplate/

    it hangs up.

    Even so, while it is working, I cannot get it to report back a value other than null, regardless of the page I am on.

    Color me confused.

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

    Default Re: Smart Backgrounds support

    What image names do you have, and where are they saved?
    You do want a base image named (in this case) smartimg.jpg, for display when there is no specific image matching a page. If there is no match, the function will return null, and the base name and extension will be used.

    There is no template override available in /includes/functions/, so
    /includes/functions/extra_functions/smart_backgrounds_functions.php as the readme describes is correct. The zip has the extra folder. I have corrected this and reposted the zip.
    Last edited by gjh42; 10 Feb 2010 at 06:14 PM.

  3. #3
    Join Date
    Sep 2008
    Posts
    9
    Plugin Contributions
    0

    Default Re: Smart Backgrounds support

    Quote Originally Posted by gjh42 View Post
    What image names do you have, and where are they saved?
    You do want a base image named (in this case) smartimg.jpg, for display when there is no specific image matching a page. If there is no match, the function will return null, and the base name and extension will be used.
    Image names are like this
    smartimg.jpg
    smartimg_11.jpg
    smartimg_shippinginfo.jpg
    etc.

    Images are saved in includes/templates/custom/images/

    The function is returning null regardless of the page I am on, so the base image is the only one displayed. So the code is working, it's just that the function is returning null regardless.

    I guessed that there shouldn't be an override, since the site locked every time I tried to use the function in the override folder.
    Last edited by cfsheridan; 10 Feb 2010 at 03:15 PM.

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

    Default Re: Smart Backgrounds support

    This is a bit annoying. I threw the not-yet-tested 3.0 zip up in another thread with a request to let me know about any problems. 33 people downloaded it, but not one came back with a question.

    Moving the code from tpl_main_page to a function broke it, as $current_page_base is not available inside a function without special arrangements. $_GET['main_page'] is available everywhere, so I have switched the function to use that, and it now works correctly. I have also improved the readme with a note about the base image for foreground image switching.
    Last edited by gjh42; 16 Feb 2010 at 08:39 AM.

  5. #5
    Join Date
    Mar 2009
    Posts
    221
    Plugin Contributions
    1

    Default Re: Smart Backgrounds support

    Is there a demo of this in action? I checked a few random sites in this thread and no one appears to be using it, site is still in dev or their site is no longer valid.

    Thanks!

  6. #6
    Join Date
    Sep 2008
    Posts
    9
    Plugin Contributions
    0

    Default Re: Smart Backgrounds support

    Quote Originally Posted by gjh42 View Post
    This is a bit annoying. I threw the not-yet-tested 3.0 zip up in another thread with a request to let me know about any problems. 33 people downloaded it, but not one came back with a question.

    Moving the code from tpl_main_page to a function broke it, as $current_page_base is not available inside a function without special arrangements. $_GET['main_page'] is available everywhere, so I have switched the function to use that, and it now works correctly. I have also improved the readme with a note about the base image for foreground image switching.
    Awesome Glenn!

    Works like a charm. Thank you for the quick fix.

    For the person asking about whether anyone is using this, I am.

    I do not use the backgrounds portion or the css--just the foreground usage in the header logo image.

    www.noquartercoffee.com

  7. #7
    Join Date
    Mar 2009
    Posts
    221
    Plugin Contributions
    1

    Default Re: Smart Backgrounds support

    So your site is just using this contribution to change the main site header logo image? That's what I initially thought this contribution was for, but then I got a bit confused about the background functionality.

    So, you can have the header logo image change for any Category and sub-category?

    Thanks for the functioning link example.

  8. #8
    Join Date
    Sep 2008
    Posts
    9
    Plugin Contributions
    0

    Default Re: Smart Backgrounds support

    The nice part of using the background function is that you can have one little bit of code and modify the css to manage the images. The code allows for the placement of a class in the main page, which you can then use in the css to put specific background images in different places.

    Since I am scaling a larger image for my logo (and need the hard boundaries of the <img> container, backgrounds doesn't work for my application.

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

    Default Re: Smart Backgrounds support

    The very first version of Smart Backgrounds was built for changing only the header background, and adaptable by recoding to other locations. It has since become universally applicable, but the original description always stays at the top of a mod's page in Free Addons. Look at the version descriptions for updates on functionality.

 

 

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