Jump to content

contact form


lostaussie

Recommended Posts

Posted

There's really no good way to prevent this, sadly. Even if you did create something that prevents banned members from using the contact form, all it would take is for them to log out of their banned account and they would have access to the contact form. I know this is not what you have in mind because my site has this very same issue. We just deal with it even though it's really annoying.

Now, if you're willing to give up the contact form for both guests and banned members, then I suppose that could be arranged through theme templates with something along these lines...

In the footer template, replace this:

	{{if \IPS\Member::loggedIn()->canAccessModule( \IPS\Application\Module::get( 'core', 'contact' ) ) and !( \IPS\Dispatcher::i()->application->directory == 'core' and \IPS\Dispatcher::i()->module and \IPS\Dispatcher::i()->module->key == 'contact' )}}
		<li><a href='{url="app=core&module=contact&controller=contact" seoTemplate="contact"}' data-ipsdialog data-ipsDialog-remoteSubmit data-ipsDialog-flashMessage='{lang="contact_sent_blurb"}' data-ipsdialog-title="{lang="contact"}">{lang='contact'}</a></li>
	{{endif}}

with this:

	{{if \IPS\Member::loggedIn()->canAccessModule( \IPS\Application\Module::get( 'core', 'contact' ) ) and !( \IPS\Dispatcher::i()->application->directory == 'core' and \IPS\Dispatcher::i()->module and \IPS\Dispatcher::i()->module->key == 'contact' )}}
	{{if !(\IPS\Member::loggedIn()->isBanned()) and !( \IPS\Member::loggedIn()->real_name == '' )}}
		<li><a href='{url="app=core&module=contact&controller=contact" seoTemplate="contact"}' data-ipsdialog data-ipsDialog-remoteSubmit data-ipsDialog-flashMessage='{lang="contact_sent_blurb"}' data-ipsdialog-title="{lang="contact"}">{lang='contact'}</a></li>
	{{endif}}
	{{endif}}

 

Posted
On 7/8/2016 at 8:12 PM, MDPP said:

Now, if you're willing to give up the contact form for both guests and banned members, then I suppose that could be arranged through theme templates with something along these lines...

Thanks for your help but I think blocking guests from contacting me is not the thing to do as there are times they need help with things so I guess I will just forget about it.

Cheers

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...