Quote:
Originally Posted by albireo
Thanks for great hack. It works nicely in the forumdisplay. But in search result (of threadbit style), every class="$altclass" tag is changed as follows:
every class=" " [empty]
How can I solve this problem?
|
Here's what I did (3.0.8)- but be warned! I am no coder so this may trade one problem for another. At the moment though it is working for me:
In search.php
find:
Code:
// get info from thread
$thread = process_thread_array($thread, $lastread["$thread[forumid]"]);
$itemcount++;
and below it add:
Code:
$altclass = ($row_count % 2) ? 'alt1' : 'alt2';
Then a few lines down find:
Code:
exec_switch_bg();
eval('$searchbits .= "' . fetch_template('threadbit') . '";');
and below it add:
This fixed the search results for me, but like I wrote earlier, this may cause problems that I am not farsighted enough to see - but since it's been a good month since you asked the question then this should cause someone with more experience to speak up if it is problematic.
In my novice understanding adding the code to search.php populates the variable where before it was empty. In any case, thank you AlienSector for taking the time to release this, it's a really nice touch to have for those of us who don't speak fluent PHP.
Fribs