Results 1 to 4 of 4

Thread: Letterband search in subcategories

  1. #1
    Join Date
    Jul 2004
    Location
    Copenhagen
    Posts
    741

    Default Letterband search in subcategories

    My letterband only searches in the current category,
    even though it has very few or zero links.

    Most of my categories do not have more than 10-20 links
    (so the letterband is not that useful)
    but I think it could be quite useful if the letterband also
    searched in sub-categories below the category where the letterband is
    shown. In this the letterband could be more useful as a search tool without
    need for users to fill out search formulas.

    Any idea how to do this?

  2. #2
    Join Date
    Jan 2004
    Location
    Georgia, USA
    Posts
    34,466

    Default Re: Letterband search in subcategories

    Should be easy enough... Look in your links/browselinks.php file for this code:
    PHP Code:
    $wherequery[] = 'links.catid = ' $catid
    And replace with this:
    PHP Code:
            if ($ltr)
            {
                if (
    $privatecatids fetch_private_categories())
                {
                    
    $wherequery[] = 'links.catid NOT IN(' $privatecatids ')';
                }
                
                
    $catinfo['title'] = 'Links that start with the letter <i>' $ltr '</i>';
            }
            else
            {
                
    $wherequery[] = 'links.catid = ' $catid;
            } 

  3. #3
    Join Date
    Jul 2004
    Location
    Copenhagen
    Posts
    741

    Default Re: Letterband search in subcategories

    Thanks very much, this works perfectly!
    Now there can be more use of the letter-band in practice

  4. #4

    Default Re: Letterband search in subcategories

    Thanks.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. searching subcategories
    By Grae in forum Bugs From 2.0.0
    Replies: 0
    Last Post: 01-05-2007, 03:38 PM
  2. Add new links from subcategories - Error
    By kosen in forum Troubleshooting & Problems
    Replies: 6
    Last Post: 01-05-2007, 03:53 AM
  3. search not directing to forums search on portal
    By hornstar85 in forum Site Feedback & Updates
    Replies: 0
    Last Post: 08-30-2006, 02:16 AM
  4. search.php
    By unixsphere in forum Troubleshooting & Problems
    Replies: 12
    Last Post: 07-28-2005, 12:04 PM
  5. Bug: Broken Search... (When Posts included on Search)
    By mskgr in forum Bugs From 1.0.0
    Replies: 4
    Last Post: 01-29-2005, 09:22 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
  •