Huum,
let me explain the XOOPS search system.
XOOPS Core has not any search function itself and just use modules search function.
in each module we have some configs for search in xoops_version.php
for example in newbb/xoops_version.php we have:
// Search
$modversion['hasSearch'] = 1;
$modversion['search']['file'] = "include/search.inc.php";
$modversion['search']['func'] = "newbb_search";
XOOPS Core search in ROOT/search.php
just use the search functions in modules.
This is really good and sophisticated method because:
1- contents are in modules and module developers should decide about accessing to them.
2- by upgrading a module and add some new fields with some content XOOPS Core will not break and still can work.
But there is one major and one minor functional issue in XOOPS/search.php:
Major issue:
while using module search function is good and definitely is the best and only solution for whole website searching, It is an issue that XOOPS CORE only can use some limited functionality of modules search function.
eg: in newbb i completely rewrite the "newbb_search" (search function) in "include/search.inc.php" (search file) but XOOPS CORE still use some few general input parameters
Minor issue:
It get two queries instead of one query 1- to get search results 2- to find if there is a "next page" or not
To solve both Major and Minor issue:
IMO while using
the limiting features of module search function is good and definitely is the best and only solution for whole website searching
when we search in all modules ( tick all modules in XOOPS/search.php), it is bad coding (I even consider it as a bug) to still use those way when you click on "Show all results" link for each module.
The solution:
IMO when you click on "Show all results" link it
should use the ROOT/modules/MODULE/search.php and not ROOT/search.php
and implementing the above solution to ROOT/search.php is very very easy.
then in the first search step when you search all modules in ROOT/search.php you just have limited functionality but after click on "Show all results" you have the full search functionality that
module developer offered to you.
I really like to have community opinions on this. maybe we should follow in a new thread?
Also i need your opinions about 2 other issues in newbb:
1- i consider that text field for "post text" is not enough sometimes.
I see major forum systems like Vbulletin use LONGTEXT instead of TEXT for post texts.
should i follow and change that field?
2- i consider sometimes our websites will run out of memory because the memory is limited for shared hosting ( eg: 128M )
see this topic:
https://xoops.org/modules/newbb/viewtopic.php?post_id=349472specifically i consider we have this issue when we use some queries like COUNT on the whole table.
eg: in newbb viewpost.php?status=all my website get a 500 error because there are over 200,000 posts
what is the solution?