Fork me on GitHub
Subscribe 5

Ticket #279 (fixed enhancement)

Search in severals forums - backport from 1.3

  • Created: 2011-02-07 16:42:00
  • Reported by: adaur
  • Assigned to: Franz
  • Milestone: 1.4.6
  • Component: search
  • Priority: low


Chosing the forums where you want to search is a good idea, like FluxBB/PunBB 1.3 do. It could be easily done with search.php's 1.3 file: … search.php

You only have to add the forum's list, then change the forum_id=x to forum id in (x) (I think).



Reines 2011-02-07 17:27:39

  • Milestone set to 1.4.5.
  • Priority changed from lowest to low.

Reines 2011-02-08 12:57:03

  • Owner set to Reines.

adaur 2011-02-12 16:48:35

  • Uploaded patch search.txt. (view)

I joined a txt file: search from 1.4.4 patched with this feature. It works, but there is no style for that feature, so I think you will have to do it, I'm sooo bad in CSS tongue

Edit: ok, it works but a strange thing is happening when you select the 2nd forum... sad

Reines 2011-02-16 14:56:21

Should this be considered for 1.4.5 or 2.0? Technically it is a new feature, but it is also a backport from 1.3.

Franz 2011-02-16 15:09:55

Since we already have a patch, I think this would be fine for 1.4.5.

adaur 2011-02-16 15:41:31

@Franz: this is not a 'real' patch, just the beginning of a real one tongue

adaur 2011-02-19 18:06:35

The checkboxes work better with

while ($cur_forum = $db->fetch_assoc($result))
    if ($cur_forum['cid'] != $cur_category)    // A new category since last iteration?
        if ($cur_category)
            echo "\t\t\t\t\t\t\t".'</fieldset>'."\n";

        echo "\t\t\t\t\t\t\t".'<fieldset>'."\n\t\t\t\t\t\t\t\t".'<legend><span>'.pun_htmlspecialchars($cur_forum['cat_name']).':</span></legend>'."\n";
        $cur_category = $cur_forum['cid'];

    echo "\t\t\t\t\t\t\t\t".'<div class="checklist-item"><input type="checkbox"  name="forum[]" id="f'.$cur_forum['fid'].'" value="'.$cur_forum['fid'].'" /><label for="f'.$cur_forum['fid'].'">'.pun_htmlspecialchars($cur_forum['forum_name']).'</label></div>'."\n";

The real last problem is: how to integrate it properly to the search page?

Reines 2011-02-21 09:45:27

  • Owner Reines removed.

Reines 2011-03-11 09:23:13

  • Milestone changed from 1.4.5 to 1.4.6.

Franz 2011-03-18 13:15:49

  • Owner set to Franz.

Franz 2011-04-20 07:40:18

  • Description changed. (Diff)

Franz 2011-04-20 08:08:13

  • Description changed. (Diff)

quy 2011-06-29 23:35:50

FYI: If displaying it as scrollable checkboxes like PunBB, keep in mind that the scrollbar is not visible on the iPhone. See screenshot.

adaur 2011-06-30 09:00:39

Is it a problem? If nothing is checked, the search will be done for all forums.

quy 2011-06-30 13:48:42

Yes. When "Search all forums" is disabled, then you won't be able to scroll to view the other forums to select.

Franz 2011-08-02 21:33:35

I could solve that problem by simply showing the old selector when users are not allowed to search all forums. This way we also avoid unexpected error messages about having to select a forum - which would be quite a usability issue in my eyes.

One could now argue about whether selecting a few forums should be allowed for people who are not allowed to search the whole board. But I would actually tend to think that this way we also avoid people trying to get around avoiding the limitation by selecting all forums but one.

To keep the design consistent, we could, of course, simply replace the list of checkboxes with radio buttons in that case.


Franz 2011-08-02 23:09:56

Commit 1c95a86 to fluxbb fluxbb-1.4

#279: Search in multiple forums.

Franz 2011-08-02 23:10:39

That commit is the implementation and markup. Now for the styling, which will hopefully be done tomorrow...

adaur 2011-08-04 19:44:29

Ticket resolved thanks to Franz and FSX. Good job guys smile

FSX 2011-08-05 10:16:46

  • Status changed from open to fixed.