Modified com_search
Posted: Mon Mar 03, 2008 10:33 pm
I needed a way to link different sections articles all together, so I decided to give it a go using keywords and search...
But search was showing... well search tools, and I just wanted it to act as a menu for finding the articels with the defined keywords... so started moding it a bit...
Well, I managed, took some pepsi, and went back to look my screen till it all worked on it's own...
so I edited in com_search\views\search\tmpl
default.php, defaultresults.php and defaultform.php to take away all the search box and the numbers before the results.
and in com_search\views\search is the editing I'm right now busy with...
I commented the 'build select part' and the line as I didn't wanted highlight (althought doubt my formatted keywords would appear in code) ...
Now, what I still need done:
This line controls what is shown after the results, brief description of XXX characters (200 in this case)... I would love this not to be character related, but instead to show the text before the 'readmore' break, independently of how long/short it is...
Also, any idea how could I show this in blog layout?
Thanks
Sidenote: I have no idea how, once this is finished, or enought to be used, I'm gonna turn it a new component, as I don't want to lose current search functionality, just a capped one for using as menu...
But search was showing... well search tools, and I just wanted it to act as a menu for finding the articels with the defined keywords... so started moding it a bit...
Well, I managed, took some pepsi, and went back to look my screen till it all worked on it's own...
so I edited in com_search\views\search\tmpl
default.php, defaultresults.php and defaultform.php to take away all the search box and the numbers before the results.
and in com_search\views\search is the editing I'm right now busy with...
I commented the 'build select part' and the
Code: Select all
$row = eregi_replace( '('.$searchRegex.')', '<span class="highlight">\0</span>', $row );
Now, what I still need done:
Code: Select all
$row = SearchHelper::prepareSearchContent( $row, 200, $needle );
Also, any idea how could I show this in blog layout?
Thanks
Sidenote: I have no idea how, once this is finished, or enought to be used, I'm gonna turn it a new component, as I don't want to lose current search functionality, just a capped one for using as menu...