I'm sure there's a mod for this just not sure what search terms to look under
How would a user auto send an email to admin with a request to join locked board?
(Don't want to use a standard hand completed email as would be good to auto fill member's name , the board they want, etc.)
I want this in two places -
a) on front of site
b) when they try to access a locked board
I would advise against fully automating it. Presumably you have the board "locked" for a reason, and if fully automated requests, every time a member with no business there twists the doorknob, the admin gets an email asking to unlock the door. I haven't looked at the code, but wherever it is determined that permissions have denied access to a member, they could see a popup asking them if they want to send an email asking to join. You should be able to prefill an email (or PM) with the necessary information in either the subject line or body.
Of course you would want this restricted to registered members, and not guests. That should be easy enough. You would want to be careful not to hang up anyone using wget or something to read the site (as well as search engine spiders) on a pop-up -- maybe a whole new page would be better.
Thanks Mr Phil
Yes I wanted to only send the mail on a button click and available to reg. members only.
I'm a full time PHP web developer but still struggle with hacking SMF to have it do what I want, so I have no real idea how to do this !
I'm not sure where permissions are applied to determine if a member can or cannot view a board. I just did a quick look around and didn't see it. I suspect it might be in Display.template.php or Display.php and I just didn't search on the right words. Someone more familiar with board permissions might be able to guide you. Anyway, where a member is denied admission to a board would probably be the place to ask them if they want to apply for admission, which in turn could bring up the Personal Message interface with the subject and body partly filled out, or send an email.
The cleanest way to do this in SMF is to not do it the way you're trying to do it.
Create a new group in the admin, whose purpose is to enable access to that board. (Board access is per group, not a permission)
Make that group 'Requestable', meaning that users can request to join it. That provides a space for them to ask for it and send the request to the admin (or indeed anyone you set up as being able to enable their access, without making them an admin)