Results 1 to 10 of 16

Hybrid View

  1. #1
    Join Date
    Mar 2009
    Posts
    64
    Plugin Contributions
    0

    Default Banners & Forcing Bottom Boxes to Stay In One Place

    Is it possible to do the following:

    Reference:
    Bad Page - http://animalsuperstore.com/zenpro/i...age=page&id=14
    Better Page - http://animalsuperstore.com/zenpro/i...e=bird&cPath=3

    The main problem is the banners stretches certain pages because the banner length never changes, but all pages are different sizes and I have floating areas I would like to stay in place.

    1) How can I keep the 3 green boxes & subscribe to email on the bottom of the page? The green boxes say "Gift Center", "In-store Services", and "Help Pets in Need". Like in example "Better Page'. In "Bad Page" they float up top.

    2) Note: I will not be using banners-all but I'm using as an example right now. I still need to create new side boxes.

    Anyway, I would like the amount of boxes displayed on each page be determined dynamically based on content size of page. So Banners should display based on a couple of things:
    a) if category is showing on left side, only show small banner box underneath it if there's room, and
    b) right side should be filled of small side boxes, but each side should never exceed the top green boxes at the bottom like "help pet in needs box"

    3) Should not display the same banner in each of the side boxes per current page. Meaning if I have only two side boxes, sometimes I see the same banner in both boxes on one page.

    I've attached 3 images to try to explain further. Hopefully, font can be read because I kept having to reduce size & quality for it to upload. But hope you get the point from it & my description of issues.

    Note: my coding skills are not the greatest and no php, but I've been able to do some changes successfully like customize footer, add captcha, no login for reviews, etc. This one seems a bit bigger of a task, but since a developer I already paid is ripping me off, I'm forced to try to finish the job myself I really appreciate any help you guys/gals can give me and/or reference me to good documentation for each to help. Thanks in advance!
    Attached Images Attached Images

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

    Default Re: Banners & Forcing Bottom Boxes to Stay In One Place

    This is a pretty big job you describe, seriously restructuring the page output flow. I would not try it without a thorough knowledge of PHP, HTML and javascript.

  3. #3
    Join Date
    Mar 2009
    Posts
    64
    Plugin Contributions
    0

    Default Re: Banners & Forcing Bottom Boxes to Stay In One Place

    I pretty much figured it would take some work. I guess I was hoping maybe somebody had already did something similar and could post code or a thread for me to get.

    What if #2 wasn't so precise in matching the top of the 3 boxes (not dynamically determined), but instead a person could define how many side box banners, per column, and per page you would display. Cause I have some pages as small as putting 2 and as big that could fit 12, yet if I only put 2 the two sides will look so bare on the majority of pages. I guess I'm surprised not more people asking for such a thing or similar.

    Also, what about #1 and #3? I would think they would be easier.

    Thanks!

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

    Default Re: Banners & Forcing Bottom Boxes to Stay In One Place

    The center and side column will always be just tall enough to hold their content - you can't make divs automatically match the height of their neighbors. Since they are top-aligned, it is the bottoms that will differ.

    If you want to fill the sidebars based on the center column height, that lets the center boxes be at the bottom by default. If pages with the same name (main_page=xxx) will always have about the same height, you can set sideboxes to display or not based on the $current_page_base variable. Each sidebox can have code added to its top to set a flag ($flag_display_xxx) to true or false based on any criteria you can code in. If the sideboxes will each stay the same height, you can calculate which ones will fit for a given center column height (determined by the page type). Once you have done one, it is just a matter of repeating the same work for each sidebox and varying the criteria.

    Likewise, you can set #navColumnTwoWrapper to have a height depending on $current_page_base, and position the last (subscribe) sidebox at the bottom.

    Another possible approach which easily covers the "bottom" boxes but does not apply tp the quantity of sideboxes would be to
    give the three center boxes and the subscribe box position: absolute; and bottom: 1.0em;,
    make #contentMainWrapper position: relative; to cause it to be the reference container for the absolute elements,
    and give .columnCenter and #navColumnTwoWrapper padding-bottom: 12em; (adjust to equal the height of the boxes) so they keep enough open space at their bottoms and do not let other content invade that space.
    Last edited by gjh42; 19 Dec 2009 at 01:51 AM.

  5. #5
    Join Date
    Mar 2009
    Posts
    64
    Plugin Contributions
    0

    Default Re: Banners & Forcing Bottom Boxes to Stay In One Place

    Thanks for your reply Glenn!

    For your first example, it sounds like you could put code in each sidebox that has a value of true or false for displaying based on certain pages that may have similar height and determined by the string of the URL?!?

    So, say I have 8 sideboxes created for one side

    So in not such coding terms but if.....

    Specials, defaults to 12 items displaying
    $current_page_base = main_page=specials&cPath=XXX
    then $flag_display_xxx can be preset to have say 3 on and 5 off.

    Displays 24 items
    $current_page_base = main_page=specials&cPath=XXX&range=24 then $flag_display_xxx can be preset to have say 5 on and 3 off.

    Displays All items
    $current_page_base = main_page=specials&cPath=XXX&range=All
    then $flag_display_xxx can be preset to have say all 8 on.

    Do I have the basic concept here? And, if so it sounds like you could do individually for each page, but it would require a lot of coding to a sidebox (but then just copy code to others).

    Example 2 - Sounds like you would put #navColumnTwoWrapper to a static height depending on $current_page_base which is only requiring coding in one place instead of all the sideboxes?!? And, you could also put individual pages, but just will be a lot of work.

    Example 3 - Sounds like I won't be needing if I do 1 or 2 so I'll focus on them for now.

    I'm going to at least start on creating the extra sideboxes tonight. I know there's a forum out there that describes the code in detail. Just got to find it. Hope that goes well

    Thanks again!
    Christina

  6. #6
    Join Date
    Mar 2009
    Posts
    64
    Plugin Contributions
    0

    Default Re: Banners & Forcing Bottom Boxes to Stay In One Place

    I found this code.....

    Code:
    if (!isset($ezpage_id) || !in_array($ezpage_id,explode(",",'2,5'))) {
        require($template->get_template_dir('tpl_order_history.php',DIR_WS_TEMPLATE, $current_page_base,'sideboxes'). '/tpl_order_history.php');
        $title =  BOX_HEADING_CUSTOMER_ORDERS;
        $title_link = false;
        require($template->get_template_dir($column_box_default, DIR_WS_TEMPLATE, $current_page_base,'common') . '/' . $column_box_default);
     }
    "Which means that the template to display the sidebox will be called whenever the page is not an EZ-Page or, if it is an EZ-Page, it does not have ID 2 or 5."

    So I would think that should take care of the ezpages for each sidebox to be displayed. I guess I just need to modify that into also supporting the main_page=xxx method?!?

 

 

Similar Threads

  1. How do I force banners to stay at foot of page?
    By moggi1964 in forum Templates, Stylesheets, Page Layout
    Replies: 11
    Last Post: 13 May 2011, 06:54 PM
  2. Custom banners? Inserting own images in place of boxes in margin
    By Sushigal in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 7 Jul 2010, 04:48 PM
  3. Making banners stay on one side
    By robbin21973 in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 16 Mar 2009, 02:56 AM
  4. Multiple size boxes - How to keep them in one place?
    By jas99villa in forum Basic Configuration
    Replies: 2
    Last Post: 21 Feb 2007, 02:36 PM

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