Firefox PHP

Default "follow-topic" status?

Posted by optimal 
Default "follow-topic" status?
April 21, 2008 08:10PM
Hi everyone,

is there a module / hack or plugin that allows you to set the default "follow topic" status to "Follow Topic and email me on replies" by default for newly registered users??

I've possibly chosen the wrong forums for this thread, advanced apologies
Re: Default "follow-topic" status?
April 21, 2008 08:17PM
Well, I've modified the default value of the users table to be "2", but I guess I'll have to wait till a new user registers before i find out if that's the kiddie!
Re: Default "follow-topic" status?
April 21, 2008 08:20PM
This forum is okay for your request. There is no such module yet, but it should not be a really hard one to write. Try pasting the code from below in a file mods/mod_setfollowtopic.php in your phorum directory. Go to the modules page to activate the module. I did not test the code at all, but you might get lucky ;-)

Language: PHP
<?php /* phorum module info hook: before_register|phorum_mod_setfollowtopic title: Force the follow topic status at registration desc: This module will set the default follow topic status to follow topic and mail on reply. */   function phorum_mod_setfollowtopic($userdata) { $userdata[';email_notify';] = 2; return $userdata; } ?>


Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce



Edited 1 time(s). Last edit at 12/02/2009 10:35AM by Maurice Makaay.
Re: Default "follow-topic" status?
April 21, 2008 08:24PM
Legend! I'll give that a bash now and see how it works out!
Re: Default "follow-topic" status?
April 21, 2008 08:30PM
Hmm, I think I may be a little too green to figure this one out, but I'm happy nonetheless!


If it moves, eat it. If it doesn't move, wait till it moves, then eat it
Re: Default "follow-topic" status?
April 21, 2008 08:50PM
My wife's suggestion (a nice shortcut): If it moves, kill it, then eat it.


Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce
Re: Default "follow-topic" status?
April 21, 2008 10:40PM
Hawhaw, you have an awesome wife dude! But I'm quite fond of the thought of someone taking it to heart and just waiting for shite-all (like a rock) to move...


If it moves, eat it. If it doesn't move, wait till it moves, then eat it
Re: Default "follow-topic" status?
April 22, 2008 12:22AM
I have an awesome wife for sure. I think the rest of the Phorum team can back me up on that ;-)

Have you been able to figure out what to do with that code from above? It's really simple, but you seem to have been scared away a bit on this. Just in case, what you need to do is simply put that code in some.php file (the exact name doesn't really matter, as long as it has the .php extension) inside your Phorum's "mods" directory. This is the whole module in the special single file module format. If you have put this in the PHP file, then you will be able to see the module in the admin.php interface under "Modules", where you can enable it.


Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce
Re: Default "follow-topic" status?
April 22, 2008 03:46PM
Worked a treat! Thanks Maurice!

I'm digging this whole "hook" programming methodology, gonna take a good gander into it soon to see how it's all set up!


If it moves, eat it. If it doesn't move, wait till it moves, then eat it
Re: Default "follow-topic" status?
April 23, 2008 05:14PM
The docs should give you a good start (docs -> developer). And of course the plethora of modules that we're building up. If you have any question, just kick me. I'd be happy to help you out.


Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce
Sorry, only registered users may post in this forum.

Click here to login