Thread: SQL question

Page 6 of 7 FirstFirst ... 4567 LastLast
Results 51 to 60 of 68
  1. #51
    Join Date
    Mar 2009
    Posts
    609
    Plugin Contributions
    0

    Default Re: SQL question

    Adjusted the style slightly.

    The blank first item is due to not having all the fields completed yet for all products. So there are blank fields that need filling in, once they are filled in the blank first item will not be there.

    It seems to be working perfectly now, I can't thank you enough!

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

    Default Re: SQL question

    Glad to hear that:) It's looking good. I can see this being useful for others, so I plan to package it up as a mod (with three variants) and submit it to Free Addons.

  3. #53
    Join Date
    Mar 2009
    Posts
    609
    Plugin Contributions
    0

    Default Re: SQL question

    I agree I think it will be quite a useful addition.

    Thank you for you work, and if you ever need anything from my store just send me a PM on here :)

  4. #54
    Join Date
    Mar 2009
    Posts
    609
    Plugin Contributions
    0

    Default Re: SQL question

    I had a thought, but it depends how brave you are feeling :)

    What if the products_model_number section was hidden by default and expanded by clicking on the manufacturers name?

    Kind of like that, http://www.plus2net.com/javascript_t...hide-layer.php

    but when you click the model numbers slide down

    perhaps like this?
    http://www.dhtmlgoodies.com/index.ht..._content_slide
    http://www.dhtmlgoodies.com/scripts/...ent-slide.html
    http://www.dhtmlgoodies.com/scripts/...orizontal.html

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

    Default Re: SQL question

    A click/slide-down would take javascript (at least until CSS3 goodies are widely supported in browsers), but a hover/dropdown could be achieved with just currently available CSS, similar to flyout menus. I don't know much javascript and will not be learning it for this. I'll take a look at a CSS feature option.

  6. #56
    Join Date
    Mar 2009
    Posts
    609
    Plugin Contributions
    0

    Default Re: SQL question

    Was just an idea as mine will be quite a long list, and if someone else has a long list it would make navigation easier.

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

    Default Re: SQL question

    A very easy way to do this is to add these two rules to the bottom of your modelList rule set:
    Code:
    .mfrList ul {display: none;}
    .mfrList:hover ul {display: block;}
    Not a smooth transition, but effective at saving space.
    Last edited by gjh42; 18 Nov 2010 at 08:06 PM.

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

    Default Re: SQL question

    By adding a wrapper div around the <ul> lists, you can have a dropdown that doesn't shift the following rows. Replace the center section of code with this
    PHP Code:
      $um_size = ($unique_model->RecordCount());
      if(
    $um_size) {
        
    $col_max_item ceil($um_size/4);
        
    $content .= '<div class="mfrListCols"><ul class="first">' "\n";//added div
        
    while (!$unique_model->EOF) {
          if(
    $col_count >= $col_max_item){
            
    $col_count 0;
            
    $content .= '</ul>' "\n" '<ul>' "\n";
          }
          
    $content .= '  <li><a href="index.php?main_page=advanced_search_result&search_in_description=1 keyword=' .$unique_model->fields['products_model_number']. '" alt="alt name" />' .$unique_model->fields['products_model_number']. '</a></li>' "\n";
          
    $col_count ++;
          
    $unique_model->MoveNext();
        }
    //uniq
        
    $content .= '</ul></div>' "\n";//added /div
      
    }//size 
    and modify stylesheet rules
    Code:
    <style>
    /*stylesheet rules*/
    #modelList {}
    .mfrList {margin: 0.5em; padding: 0.5em; border-bottom: 1px solid #aabbcc; position: relative;}
    #modelList h3 {text-align: center;}
    #modelList ul {float: left; width: 24.5%; margin: 0; padding: 0; border-left: 1px solid #aabbcc;}
    #modelList ul.first {border: none;}
    #modelList li {list-style: none; padding: 0 0 0 1.0em;}
    #modelList a {color: #0099cc;}
    #modelList .mfrList .mfrListCols {display: none;}
    #modelList .mfrList:hover .mfrListCols {display: block; position: absolute; width: 100%; background: #ffffcc; padding: 0.5em 0; border-bottom: 1px solid #aabbcc;}
    </style>

  9. #59
    Join Date
    Mar 2009
    Posts
    609
    Plugin Contributions
    0

    Default Re: SQL question

    Have a look at that link I sent you before, the hover is behind the text not infront.

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

    Default Re: SQL question

    The demo products do not have enough items in a list to show up that fact. Add a z-index to correct it.

    .mfrList:hover .mfrListCols {z-index: 100;

 

 
Page 6 of 7 FirstFirst ... 4567 LastLast

Similar Threads

  1. v154 SQL Script Question
    By Feznizzle in forum General Questions
    Replies: 2
    Last Post: 2 Jul 2015, 07:13 PM
  2. SQL question
    By timhersh in forum General Questions
    Replies: 14
    Last Post: 1 Oct 2012, 10:12 PM
  3. SQL question
    By pixelpadre in forum General Questions
    Replies: 9
    Last Post: 26 Apr 2012, 02:14 PM
  4. v139h SQL question... help please!
    By Feznizzle in forum General Questions
    Replies: 4
    Last Post: 3 Mar 2012, 10:31 PM
  5. SQL Question Deleting zones
    By kitcorsa in forum General Questions
    Replies: 2
    Last Post: 12 May 2008, 12:37 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