Best of joomla gives you news, joomla templates, tutorials and websites about Joomla , FireBoard and FireMessage official page.
| No account yet?   |
Welcome, Guest
Please Login or Register.    Lost Password?
Subscribe to forum instead of thread (1 viewing) (1) Guest
Go to bottom Favoured: 13
TOPIC: Subscribe to forum instead of thread
#19926
Re:Subscribe to forum instead of thread 1 Year ago  
Work pretty well. Thx
Would be nice to update the first post with all the corrections.
cosworth (User)
Fresh Boarder
Posts: 11
graphgraph
User Offline Click here to see the profile of this user
Logged Logged
 
The administrator has disabled public write access.  
#20188
Re:Subscribe to forum instead of thread 1 Year ago  
Well I was about to say I'd do that as soon as the stable release is out and I've checked line numbers. Stable is out - so I best check line numbers...!
polc1410 (User)
Senior Boarder
Posts: 62
graphgraph
User Offline Click here to see the profile of this user
Logged Logged
 
The administrator has disabled public write access.  
#20804
Re:Subscribe to forum instead of thread 1 Year ago  
Hi polc1410,

I haven't tried this out yet because I was waiting for a stable release--congratulations on figuring this out!

I need to make all my users subscribe to certain threads---since you've been poking around under the hood on this, do you know how I would go about doing that? It would be cool to have something where you pick a board from a list and then choose all the users to subscribe to the board using a multi-select list box.

I have absolutely no idea about how to do that, but it certainly would be a convenient option!
paulgibbs (User)
Fresh Boarder
Posts: 10
graphgraph
User Offline Click here to see the profile of this user
Logged Logged
 
The administrator has disabled public write access.  
#21493
Re:Subscribe to forum instead of thread 12 Months ago  
I don't do pretty solutions so you'll have to figure out drop downs your self.

I use a component called AEC (Account Expiry Component)[www.globalnerd.org] it could use an SQL integration to add a subscription to a category etc on subscription AND remove them if you want users to expire...

However you could also add an IF manually into the code at the send email bit if cat=XX where thats the number you need...
polc1410 (User)
Senior Boarder
Posts: 62
graphgraph
User Offline Click here to see the profile of this user
Logged Logged
 
The administrator has disabled public write access.  
#21521
Subscribe to forum OR thread (Fixed for 1.0.3) 12 Months ago  
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:


$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'"«»);


2.2b Edit: .../components/com_fireboard/templates/default/post.php
Replace Line 1004 with:
Code:

//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


2.3 Edit: .../components/com_fireboard/templates/default/userprofile.php
Replace line 579 with
Code:


//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



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.
Test...!
File Attachment:
File Name: showcat_hack.txt
File Size: 1837
polc1410 (User)
Senior Boarder
Posts: 62
graphgraph
User Offline Click here to see the profile of this user
Logged Logged
 
Last Edit: 2007/09/24 20:35 By polc1410.
 
The administrator has disabled public write access.  
#21953
Re:Subscribe to forum OR thread (Fixed for 1.0.3) 12 Months ago  
Great work! This should be included a.s.a.p. including some additional options, like:
- subscribing to a whole forum instead of just categories;
- letting the admin decide subscriptions per user (which can be modified by the users themselves);
- etc...

Does anyone have a live demo of this category subscribe function so I can see how it works? Does the subscribe button appear for users when they open a category next to "new thread"?
Mich (User)
Fresh Boarder
Posts: 10
graphgraph
User Offline Click here to see the profile of this user
Logged Logged
 
The administrator has disabled public write access.  
#22018
Re:Subscribe to forum OR thread (Fixed for 1.0.3) 12 Months ago  
Mich wrote:
Great work! This should be included a.s.a.p. including some additional options, like:
- subscribing to a whole forum instead of just categories;

Well I like the idea - but where do you put the button? I guess making the sub to forum add something like 'ALL' to the category field (would need to change the field structure to text) and changing line 270 in post to somehting like:
Code:


$database->setQuery("SELECT DISTINCT * FROM #__fb_subscriptions AS a"
  . "JOIN #__users as u ON a.userid=u.id "
  . " WHERE a.thread= '$querythread' OR a.category='$catid' OR a.category='ALL'"«»);


would do the job... (this deals with the posting - not the subscribing / unsubscribing to all..

- letting the admin decide subscriptions per user (which can be modified by the users themselves);
- etc...

Oh yeh... and some graphical tools on there too... at the moment 'My Subscriptions' simply doesn't show category susbcriptions.

Does anyone have a live demo of this category subscribe function so I can see how it works? Does the subscribe button appear for users when they open a category next to "new thread"?

I have a live - live site but its restrcited access so you wont see it working.
But yes it appears next to the 'New Thread' but currently only at the bottom of the page - here's a screen shot:


The rest works exactly like the subscribe to thread - uses same langauge file and processing cause I'm lazy.
polc1410 (User)
Senior Boarder
Posts: 62
graphgraph
User Offline Click here to see the profile of this user
Logged Logged
 
Last Edit: 2007/09/11 21:37 By polc1410.
 
The administrator has disabled public write access.  
#22033
Re:Subscribe to forum OR thread (Fixed for 1.0.3) 12 Months ago  
I just happened to be looking for this today, so I tried it out.

All seems well, but for some reason no subscriptions (thread or category) are being e-mailed, plus in my profile it doesn't show a category being subscribed to.

I wonder if my database wasn't done correctly? Here's an image of it, if it helps:


Funny thing - I didn't try any subscriptions BEFORE installing this - so it could be the forum itself. So if the database looks o.k., maybe I should start over with the forum install.

See at www.plattsmouthsquare.com/component/opti...ireboard/Itemid,151/

(other problems on my board are captcha not working and discussbot issues)

Thanks.
grapefix (User)
Fresh Boarder
Posts: 8
graphgraph
User Offline Click here to see the profile of this user
Logged Logged
 
Last Edit: 2007/09/11 22:30 By grapefix. Reason: img too wide
 
The administrator has disabled public write access.  
#22263
Re:Subscribe to forum OR thread (Fixed for 1.0.3) 12 Months ago  
DB changes look right.

The change that saves the subscribe is in the bit marked 2.2b above - would be worth double checking the code is right... Thats the bit that saves the data in the table.

The categories won't list in your profile (sorry it was done as a fix, rather than a swanky solution...) So to see what's in existance - browse the table - if there are rows with numbers in the category field other than 1 you are on a winner...

The other possibility is there is a bug thats not sending the post. Tis a shame you didn't get a chance to test the default code. I assume site email works?

C
polc1410 (User)
Senior Boarder
Posts: 62
graphgraph
User Offline Click here to see the profile of this user
Logged Logged
 
The administrator has disabled public write access.  
#22281
Re:Subscribe to forum OR thread (Fixed for 1.0.3) 12 Months ago  
Site e-mail - good. Category row in DB occurs. It must be a bug on my end. Like I said there's a couple other surprises I've ran across.

Thanks for the reply. I hope this hack is included in the next release. It's great for a category created for groups that want to hash out ideas on a project w/o checking in every day.

Now if I can just get mine working.
grapefix (User)
Fresh Boarder
Posts: 8
graphgraph
User Offline Click here to see the profile of this user
Logged Logged
 
The administrator has disabled public write access.  
Go to top
Powered by FireBoard - Creditsget the latest posts directly to your desktop