Topic: Regular member can't contact another member until admin approves imge
Tested on Version 2.5.3
The coding is to help with spam issues. I have my site setup so new members have to upload an image when signing up, and the admin has to approve the image before it is displayed on the site or they can contact other members.
The following happens to me a lot...a spammers signs up, uploads any crappy image and immediately starts contacting members....when I finally get around to checking the site, they have already spammed some members. This coding prevents them from contacting other members until I have approved their image. If I don't like what I see, I can delete their account...if their image and profile looks legit, I approve the image.
I wrap the following coding around the form code in templates
--------------------------
<!-- IF session.picture AND session.picture_active AND loggedin == "1" -->
<form>
</form>
<!-- ELSE -->
<strong>Hello {session.username}</strong>. Before you can contact other members, your picture must be approved by the admin. Please allow 24 hours for approval. If you have any questions, please
use the <strong>Contact us</strong> link at the bottom of every page to contact the admin.
<!-- ENDIF -->
--------------------------
Obviously you can change the message text above to what you want to say. {session.username} will display the logged in username.
--------------------------
Templates I use the above code in, but feel free to use for whatever templates on your site:
account_messages_compose.tpl
ext.guestbooks.tpl
member_blog_entry.tpl
member_guestook.tpl
member_pictures_view.tpl
news_view.tpl
--------------------------
Example of how I edited a template using the above code. In this example I will edit account_message_compose.tpl
I open account_messages_compose.tpl. Do a search using form as search criteria or you can look at the code. It is easy to find the form code on the page.
I added:
<!-- IF session.picture AND session.picture_active AND loggedin == "1" -->
before:
<form method="post" name="message" action="">
I added:
<!-- ELSE -->
<strong>Hello {session.username}</strong>. Before you can contact other members, your picture must be approved by the admin. Please allow 24 hours for approval. If you have any questions, please use the <strong>Contact us</strong> link at the bottom of every page to contact the admin.
<!-- ENDIF -->
After: </form>
As you can see...all I did was wrap the opening <form> and the closing </form> with the code. You would do the same for other templates I listed above.
--------------------------
member_profile.tpl uses quick messages but it does NOT use a form. I wrapped quick messages in member_profile.tpl as follows (the code below in red is what I added):
<!-- IF quick_messages -->
<li class="wink">
a href="#" title="{lang:"member","send_wink"}" onclick="showhide_field('send_wink_box');return false;">{lang:"member","send_wink"}</a>
<div id="send_wink_box" class="winkbox" style="display: none">
<!-- IF session.picture AND session.picture_active AND loggedin == "1" -->
<select class="select" id="quick_messages" name="quick_messages">
{dropdownlist:quick_messages,""}
<!-- ELSE -->
<strong>Hello {session.username}</strong>. Before you can contact other members, your picture must be approved by the admin. Please allow 24 hours for approval. If you have any questions, please use the <strong>Contact us</strong> link at the bottom of every page to contact the admin.
<!-- ENDIF -->
</select>
--------------------------
With the above coding a new member can not contact another member, make a comment or use quick message until I have approved their image.
--------------------------
Image demo of coding:





Last edited by db3204 (2010-02-21 16:50:24)