1

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:

http://www.filipina-lady.net/test253/send01.jpg


http://www.filipina-lady.net/test253/send02.jpg


http://www.filipina-lady.net/test253/send03.jpg


http://www.filipina-lady.net/test253/send04.jpg


http://www.filipina-lady.net/test253/send05.jpg

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

2

Re: Regular member can't contact another member until admin approves imge

Hi db,

This is a great tutorial I had it working in around 10 mins, I hope it will help manage SPAM.

I did have one question but I finally worked out the solution, on my site I have "Chat" enabled and by inserting your code before and after the <form> </form> in account_chat.tpl and account_chat_request.tpl I was able to block contact via chat until approved.

Thanks you have some very helpful mods...

Mate, I also posted a question here regarding adding an extra column to the cp report fields, which is similar to what you did for messages in the cp, I was wondering if you think the idea has any merit and if you would know how to create the mod?

http://www.vldpersonals.com/forum/viewtopic.php?id=4790&p=1

Thanks again your mods are great smile

Last edited by BigDog (2009-06-21 18:29:33)

3

Re: Regular member can't contact another member until admin approves imge

What a great tutorial. Why I didn't notice it before?

www.vldMagic.com - first choice customizations store and help desk

4

Re: Regular member can't contact another member until admin approves imge

very good tutorial ... thanks ...

5

Re: Regular member can't contact another member until admin approves imge

Hello, this modification works with the VLD 2.57 ?

VPS Host Servint - The best VPS hosting to Vldpersonals !
Comet Chat - The best Facebook chat clone integrated to Vldpersonals
Vld Magic - Customizations !
Lillisam - Webdesign customizations !

6

Re: Regular member can't contact another member until admin approves imge

it should work fine
there are no changes in the php files just template

7

Re: Regular member can't contact another member until admin approves imge

Hello db3204,

I would like to adapt this mod to the album page, for example, one member could only access an album if it had at least three photos in your album.

is this possible?

VPS Host Servint - The best VPS hosting to Vldpersonals !
Comet Chat - The best Facebook chat clone integrated to Vldpersonals
Vld Magic - Customizations !
Lillisam - Webdesign customizations !

8

Re: Regular member can't contact another member until admin approves imge

hey db3204 how will this work for mebers who have changed their photos.  I have it set up so that all images/pictures/photos must be approved by me.  So if an already existing member changes their profile picture and I have not yet approved it are they able to communicate?

9

Re: Regular member can't contact another member until admin approves imge

rustys wrote:

hey db3204 how will this work for mebers who have changed their photos.  I have it set up so that all images/pictures/photos must be approved by me.  So if an already existing member changes their profile picture and I have not yet approved it are they able to communicate?

I would ignore this tutor. It was written for an earlier version of vldPersonals. Now you can pretty much do everything you need to do in the CP. If you have it set that you have to approve the images, than if someone changes image, you would have to approve it again.

There are so many permission settings in vldP that I'm always forgetting what they are. What I do is create a test member and set up different scenarios to test. In your case, I would log in with my test member and upload a new image. Than test if I could send out a message before the image is approved. If I can, than it is a setting or permission setting that needs to be changed.  I spent hours (at least 23) setting things up and testing them before I got things the way I wanted. But once you get it set the way you want, you can pretty much forget it and work on other things. If I had to make a change again, I would have to start looking through the permissions and settings until I found it since I don't work on it every day.

Last edited by db3204 (2012-09-15 18:38:48)

10

Re: Regular member can't contact another member until admin approves imge

Hey db3204 I tried creating a member and then before the picture was approved sending a message and it worked.  I cannot find  a way to stop this from happening in the permissions.  I think I'm going to have to give this mod a try.  I'm using 2.7 so I hope it works.  thanks

11

Re: Regular member can't contact another member until admin approves imge

I just tried it and it seems to work perfectly.  Thanks man.