Site Admin Subscribed to All Forums

Site Admin Subscribed to All Forums

by Art Lader -
Number of replies: 5

Is there an easy way I can be subscribed to all forums on my site? This would include being automatically subscribed to new forums as they are created.

Thanks,
Art

Average of ratings: -
In reply to Art Lader

Re: Site Admin Subscribed to All Forums

by Art Lader -

Is this something I could do via phpmyadmin, perhaps?

-- Art

In reply to Art Lader

Re: Site Admin Subscribed to All Forums

by Gustav W Delius -
I did that by hacking forum_cron() in mod/forum/lib.php. It was a two-line hack. If you are interested I can dig it up and send it to you.
In reply to Gustav W Delius

Re: Site Admin Subscribed to All Forums

by Art Lader -

That would be great, Gustav.

-- Art

In reply to Gustav W Delius

Re: Site Admin Subscribed to All Forums

by Tim Allen -

I'd really like this too.  Could you post this here or send it to my email? 

Thanks in advance Gustav.  smile 

In reply to Tim Allen

Re: Site Admin Subscribed to All Forums

by Gustav W Delius -

I have looked it up and it was actually a one-line hack rather than a two-line hack. All you have to do is insert an "array_push($users, get_admin());" in the right place:

In mod/forum/lib.php find the lines

            if ($users = forum_subscribed_users($course, $forum)) {

                $mailcount=0;
                $errorcount=0;

and insert an additional line so that you end up with

            if ($users = forum_subscribed_users($course, $forum)) {
                array_push($users, get_admin());
                $mailcount=0;
                $errorcount=0;