OK here are the revised hacks for the stable release.
This will allow users to subscribe to a forum category instead of (or as well as) individual posts. The original text file for one of the hacks has gone and I did my upgrade to 1.0.3 assuming it would still be on here, so I've re-written the hack... differences are likely to be coding variance rather than much intentional!
Before you proceed - BACKUP
You need to make 4 code changes, and 1 database structure change this is not for the very light hearted! Did I mention backup! Did I mention GPL and the fact that the GPL licence means there is no warranty...
Right on with the changes:
1. The database
You need to add a field to the table
jos_fb_subscriptions the field is called category, has default Null, and is indexed, and obviously allowed to be null. Also make the thread field be allowed to be Null.
2. Edit the files
2.1 Edit: .../components/com_fireboard/templates/default/
showcat.php
You need to find line 310 and insert the following code (its here as an image because FB doesn't like html in code boxes. The text file attached contains the code to copy.
2.2a Edit: .../components/com_fireboard/templates/default/
post.php
Lines 270 on wards to read:[code:1]
$database->setQuery("SELECT DISTINCT * FROM #__fb_subscriptions AS a"
. " LEFT JOIN #__users as u ON a.userid=u.id "
. " WHERE a.thread= '$querythread' OR a.category='$catid'"«»);
[/code:1]
[b]2.2b Edit: [/b].../components/com_fireboard/templates/default/[b]post.php[/b]
Replace Line 1004 with:[code:1]//Start Hack By ShinyBlackShoe to allow category subscribe
if ($fb_thread == "0"«»){ //sub cat instead of thread
$database->setQuery("INSERT INTO #__fb_subscriptions (category,userid) VALUES ('$catid','$my->id')"«»);
}
else {
$database->setQuery("INSERT INTO #__fb_subscriptions (thread,userid) VALUES ('$fb_thread','$my->id')"«»);
}
//End Hack by SBS[/code:1]
[b]2.3 Edit: [/b].../components/com_fireboard/templates/default/[b]userprofile.php[/b]
Replace line 579 with [code:1]
//Start Hack by ShinyBlackShoe to give forum subscribe
if ($thread == "0"«»){ //unsub from cat not thread
$database->setQuery("DELETE from #__fb_subscriptions where userid=$my->id and category=$catid"«»);
}
else {
$database->setQuery("DELETE from #__fb_subscriptions where userid=$my->id and thread=$thread"«»);
}
//End hack by SBS
[/code:1]
[b]Make sure none of your pasting carries text that reads _CRLF_ they are rogue line returns - if it noes they should be sub'd with backslash n's or just deleted outright.[/b]
Test...! [file name=showcat_hack.txt size=1837]http://www.bestofjoomla.com/images/fbfiles/files/showcat_hack.txt[/file]