6
Hi Darin
thanks a lot, but if I understand you correctly that's not what I want to do.
Here is what I've done so far:
I've added the newbb 'latest posts' block to my smartsection pages
then in the file which controls this block (modules/newbb/blocks/newbb_block.php) I have gone to the appropriate function (function b_newbb_show($options)) and I have made this little change:
the original code was:
$approve_criteria = ' AND t.approved = 1 ';
I have changed it to:
$approve_criteria = ' AND t.approved = 1 AND t.topic_title LIKE "%oxford%" OR t.topic_subject LIKE "%oxford%" OR x.post_text LIKE "%oxford%"';
OK, so like this on my category pages in the smartsection module I have a block which shows a list of any forum questions which mention Oxford.
The thing is I can't figure out how to make that be a variable dependent on the page title (which is each schools name). I'm guessing it should be something like:
$approve_criteria = ' AND t.approved = 1 AND t.topic_title LIKE "%($school_name)%" OR t.topic_subject LIKE "%($school_name)%" OR x.post_text LIKE "%($school_name)%"';
And that I need to send a variable called $school_name to the newbb/blocks/newbb_block.php ($school_name being the name of each page title in my smartsection module).
I'm really not sure if I'm explaining myself well here, thanks a lot for any further help
Cheers!