My client wants me to do a simple modification to the Post.template.php where if they (administrator) create a new post they want an option where if they tick a checkbox it will send the entire mailinglist an email to notify them of the new topic. I am not sure if there is already a feature like this (if there is, please share with me). I have already modified the template to show the checkbox, the only problem is I cannot determine the usertype. I did a print_r($_SESSION); but it does not contain any user level information or anything I can work with.
Is there another way to determine if the user is an administrator?
Try
if ($context['user']['is_admin']) ...
Hi5's all around!
Or you could simply use the built in "announce" feature :D
Well that sounds like a awesome way :) I had a quick look through but cannot find where it is. How does it work?
While creating a topic, open the "attachments and other options" doodaa below the post, and tick the "Announce topic" option.
You'll soon see what it does 8)