PDA

View Full Version : Prevent Users With Low Post Counts Posting/PM'ing URLS


NTLDR
11 Jan 2004, 20:16
Title: Prevent members with low post count posting/pm'ing urls.
Author: NTLDR
Version: 1.0.1
vB Compatibility: vB3 Gamma, RC1, RC2

Description: I created this hack a while ago for use on my board to prevent people signing up and just posting a URL. This hack will prevent users with less than X posts from PM'ing or posting URLs.

File edits:

In includes/functions_newpost.php find:



Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------



Add after:



Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------



Find:



Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------



Add after (making sure you change REPLACE_NUMBER_OF_POSTS_HERE to the number of posts a user must have before being able to post/pm URLS):



Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------



If you want this to apply to posts only you don't need to do the following edit which is for PM's:

In private.php find:



Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------



Add BEFORE:



Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------



Phrases to add:

In Front-End Error Messages add:
Varname: x_contains_urls
Text:


Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------

Boofo
11 Jan 2004, 20:26
Can we get a text install file for this? And, good work there. ;)

FleaBag
11 Jan 2004, 20:47
Another one let out of the bag. Good work. This will hopefully stop my rivals advertising their sites to my members lol.

Koutaru
11 Jan 2004, 22:32
Nice hack :) this one will really help prevent spamming no?

Xenon
11 Jan 2004, 22:37
instead of


Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------



i'd use


Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------



but rather than that, nice one Lee :)

NTLDR
11 Jan 2004, 23:08
I had that origionally but it didn't seem to work, although I think that was due to me using $post['pagetext'] which doesn't exisit :P

Thanks for the comments Stefan :) I've updated the first post with this change.

Boofo
11 Jan 2004, 23:14
What is a good recommended setting for this?

Erwin
11 Jan 2004, 23:16
I've had this running on my site for 2 years now. But I use a much shorter piece of code to achieve a similar result.

bigdaddy04
15 Jan 2004, 19:51
Great hack!
Is there a similar one to 2.3.x versions?

Erwin, wanna share with us? :)

NTLDR
15 Jan 2004, 19:53
Erwin released and alternative version for vB2.

bigdaddy04
15 Jan 2004, 19:59
Erwin released and alternative version for vB2.
Whats it called? :)

NTLDR
15 Jan 2004, 20:08
Check his profile, you'll see it listed there :)

bigdaddy04
15 Jan 2004, 20:16
Check his profile, you'll see it listed there :)
i think im going blind, i don't see it.. :(

cirisme
16 Jan 2004, 18:51
i think im going blind, i don't see it.. :(
here: http://www.vbulletin.org/forum/showthread.php?s=&threadid=44694 :)

bigdaddy04
16 Jan 2004, 20:24
here: http://www.vbulletin.org/forum/showthread.php?s=&threadid=44694 :)
does that also disable urls in the signatures/pms?

Boofo
17 Jan 2004, 14:21
Is there any way to add a message to the error that comes up that says they need to have so many posts before they can use links in their messages? I haven't installed this yet. Does it already do that? If not, they may wonder how many posts they DO need to have before that can use links. ;)

NTLDR
17 Jan 2004, 20:21
I kind of find that doing that would be like telling them how many messages they need to spam before they can spam there URL ;) However you can just edit the Phrase you add to change the text to something along the lines of you need X posts before you can post URLs :)

cirisme
17 Jan 2004, 22:54
does that also disable urls in the signatures/pms?

No idea... since it's a different hack it would be better to ask in that thread ;)

AshAbed
19 Jan 2004, 02:18
i only want this to apply to pm's, not posts because my competition always advertises through pms ;) can you please tell me how i would go about doing that? do i just add everything after
"If you want this to apply to posts only you don't need to do the following edit which is for PM's:"
or...?

NTLDR
19 Jan 2004, 12:49
Just don't add:



Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------



To includes/functions_newpost.php :)

MrNase
25 Jan 2004, 00:30
hey thanks. it's working like a charm :)

yl88
03 May 2004, 19:51
is it working with vb3.0.1?

AshAbed
07 May 2004, 11:24
is it working with vb3.0.1?
I'm about to test it, I'll tell you how it goes

Boofo
07 May 2004, 12:27
Any way to get this to work for signatures also?

NTLDR
07 May 2004, 13:41
Just add the code to profile.php whereever the signature is is checked.

Boofo
07 May 2004, 14:01
Just add the code to profile.php whereever the signature is is checked.

Which code and how exactly?

redd
18 May 2004, 10:12
I'd also like to know how to use this to stop linking in signatures. The profile.php file doesn't contain the same code, so we can't use the same instructions. I tried adding it where it seemed to fit, but it didn't work.

Thanks for any input :)

Alien
22 May 2004, 19:57
Confirmation that this is working fine in 3.0.1? :D

NTLDR
22 May 2004, 20:03
There is no reason why it shouldn't work.

WEForums
23 May 2004, 01:59
I...don't know. I had it set to 50 and made a test username and posted a link just fine. I'm using 3.0.1...could have ben a mistake by me, but I don't think so...?

WHC_Luke
24 May 2004, 03:16
I would like to know how to limit this to specfic forums.....like so that a user has to have x amount of posts before they are allowed to post in a specfic forum? Is this possible with this bit of code or should i ask elsewhere on the board?

Aurous
02 Jun 2004, 16:28
works fine in 3.0.1 - Installed

one thing which I dont like about this hack is the fact that new users cant use [img] tags with this :( any fix on this?

great hack, although I am looking for something similar with signature as well regardless of number of posts. I just dont want any url in the signature. Any help regarding this?

Noiz Pollution
23 Jun 2004, 12:01
That's a bit of a bummer that it stops people from using [img] but if it stops the spammers then it's something I'll put up with.

Aurous
06 Jul 2004, 04:55
any help with the [img] code?

Aurous
13 Jul 2004, 21:01
*bump*

Noiz Pollution
14 Jul 2004, 08:44
*bump*
In the meantime you should probably just have your members attach images as opposed to linking to them.


Cheers,
Robert

Aurous
14 Jul 2004, 21:22
ya, but I'd prefer not wasting my b/w on that.

Also, can we make a check so it allows internal links and only show the error if there are external links!

Noiz Pollution
14 Jul 2004, 22:57
Confirmed this is working as normal with 3.0.3.


Cheers,
Robert

Dras
23 Jul 2004, 22:10
I can't get it to work on my 3.0.3 board. I can still post links and I have 2 posts and I set the min to 5.

Malke
25 Jul 2004, 14:42
I installed this in 3.0.1 and got an error in functions_newpost.php on line 811 when anyone tried to post anything. I re-did the whole thing and I still had the error... I did edit the nr of posts so it's not that.

Just thought I'd let you know...

Battle_Ring
08 Aug 2004, 04:12
Can I Get The Txt File.....

lifesourcerec
10 Aug 2004, 22:17
I keep getting "Could not find phrase 'x_contains_urls'", but the phrase is actually there.

Boofo
11 Aug 2004, 00:01
I keep getting "Could not find phrase 'x_contains_urls'", but the phrase is actually there.
Make the phrase global. ;)

Malke
16 Aug 2004, 10:16
I installed this in 3.0.1 and got an error in functions_newpost.php on line 811 when anyone tried to post anything. I re-did the whole thing and I still had the error... I did edit the nr of posts so it's not that.

Just thought I'd let you know...

Did anyone else get this???

Durtay
16 Aug 2004, 20:38
here's a txt file everyone's askin for

Theater
27 Aug 2004, 11:07
I tested this out on 3.0.3, and it worked partly. I wasn't able to post a URL with under 10 posts, but was able to private message myself. I had my board shutoff for maintenance, and the TestDummy account was a moderator of a test forum. Maybe that had something to do with it, I'll test it out later.

Just to confirm, this is all that's needed to require registered members to have 10 posts before they can send PM's:



Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------

WebMasterAJ
13 Sep 2004, 03:34
Well, on member on my forums decided to try and find a loop hole in this system... and needless to say, he did...

He started posting URLS in the thread titles as just www.linktosite.com. Is there any way to prevent this as well? Or should I just give up on it?

Thanks for everything!

msimonds
16 Sep 2004, 02:29
Well, on member on my forums decided to try and find a loop hole in this system... and needless to say, he did...

He started posting URLS in the thread titles as just www.linktosite.com (http://www.linktosite.com/). Is there any way to prevent this as well? Or should I just give up on it?

Thanks for everything!

Yes is there a way to make it so it does not do this

msimonds
16 Sep 2004, 03:00
never mind I see that it is already blocking that, my bad

Nice mod, really nice mod

mefromspace
16 Sep 2004, 06:10
I think this hack is great to prevent spammers.

Now my question is if its possible to do this for attachments too.

I hate it when people register and in ther first post they post pictures
from other sites together with ther site link.

It would be awsome if it was possible!!!

Noiz Pollution
17 Sep 2004, 11:54
I think this hack is great to prevent spammers.

Now my question is if its possible to do this for attachments too.

I hate it when people register and in ther first post they post pictures
from other sites together with ther site link.

It would be awsome if it was possible!!!
Just use the promotion system, create a new user group with everything you want your fully registered members to be able to do, then change the default registered group by giving it much more restricted access (like the inability to post or view attachements) and use a promotion to upgrade them to your new user group once they hit a certain number of posts.


Cheers,
Robert

Neutral Singh
19 Jan 2005, 06:47
** installed **

cteselle
10 Feb 2005, 17:24
Thanks! Works like a charm!

David Bott
22 Feb 2005, 20:21
Hello...

I just had someone report they could not post the below for they received the messages about no URL....


Here's something I am considering. I would greatly appreciate any feedback or correction to my ideas.


I understand how the LNBs work with voltage switching for the polarization and the 22KHz signal for the 199 SAT, but I am determined to find a way to not have to run more than 2 coax lines (which I have now) down from my dishes (because of line of site problems I have multiple dishes for different SATs). The LNBS from the dishes currently all run into one multi-switch on the back of one of the dishes, then 2 coax lines run into the house. I recently got a DirecTiVo and now need three lines to take advantage of the dual input TiVo.


Here is what I am thinking of trying. Combining the LNBs using splitters with the 13V lines combined and the 18V lines combined. On the 119 lines put 22KHz generaters to keep them turned on. My understanding is that there is no overlap in the frequency spectrums being output by the different mode LNBs (obviously if there is overlap I can't do this).


So now I have two coax down lines into the house, but here is where I am less certain about what to do. Can I just run the two lines into the SAT A inputs of a multi-switch? Will the SAT A input pass all the frequencies from all the LNBs to the receivers even though it won't pass back the 22KHz tone? If not I will have to split those two lines into 4 and run them into the SAT A and SAT B inputs of the multi-switch, but then I have to find some way to block the 22KHz tone from being sent back to all of the LNBs.


I might also have to put an amplifier in somewhere in the downlines because of the combining and possible splitting losses. Maybe there is an amplifier that will pass back the DC without passing back the 22KHz tone.


Comments please.


I for the life of me can not figure out what it may be seeing in the above to think their is a URL somewhere.

Any help wpuld be great.

Thanks

Michael2
14 Mar 2005, 14:12
I'm going to give this one a whirl, thanks! :)

David Bott
14 Mar 2005, 14:48
I have now had four other users say that can not post a message because it contained a URL and I can not see what in the text is stopping them. Anyone? See above example of a stopped post.

T3MEDIA
14 Mar 2005, 15:40
No offese but I dont install stuff from NTLDR. This user drops stuff and disapears and never ever supports it afterwards. (not like the user has too) just look around. vbindex ect...

Nah no thanks. Save yourself the head ache.

cellardoor
19 Mar 2005, 20:47
I for the life of me can not figure out what it may be seeing in the above to think their is a URL somewhere.



Is it this bit...

I am thinking of trying. Combining the LNBs using splitters

Looks like .com

dtzy
26 Mar 2005, 04:44
I tested this out on 3.0.3, and it worked partly. I wasn't able to post a URL with under 10 posts, but was able to private message myself. I had my board shutoff for maintenance, and the TestDummy account was a moderator of a test forum. Maybe that had something to do with it, I'll test it out later.

Just to confirm, this is all that's needed to require registered members to have 10 posts before they can send PM's:



Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------




You may have added the call to the function ( $errors = array_merge($errors, verify_message_urls($post['message'])); //SN add
) in wrong place, I didn' get it work, but later, I found my mistake. It works like a charm now, thanks to hack provider.

subnet_rx
30 Mar 2005, 16:44
Anyone know of a hack that will allow certain usergroups to post URL's and images only? I wish this was in the usergroup permissions for the forum.

mikellogg
15 Apr 2005, 23:04
Thanks for the great hack. My moderators love it.

My forums are multilingual with people posting in Spanish, French and Italian. This hack, as it is written stops someone from ending a sentence with a period and starting the next sentence with com, such as como/comment/come. All these mean "how" in these other languages! (An important word for those asking questions.)

To fix this, remove the first (\s*) from "(\.|dot)(\s*)(c(\s*)o(\s*)m" in the last preg_match. At least this worked for me!

Clayton
26 Sep 2005, 07:13
Hi there

is there anybody who would be willing to update this hack so that everything is in one file and that everything questioned is available for us, please?

This is one very useful hack and I can't believe how long I have taken to find it

Thanks

C

wolfyman
06 Oct 2005, 11:30
is this good for 3.5 or 3.0.9?

MajorFm.com
07 Oct 2005, 18:15
possible useful add-on?

a pm to the admin to let him know what user is attempting to send a pm advert

also does it simply censor the url or does it not allow the pm to be sent at all?

GR-Flame
08 Oct 2005, 01:33
Make the phrase global. ;)

The phrase is Global, but the error still shows up for me. Suggestions?

wolfyman
12 Oct 2005, 11:03
This doesn't work with 3.5, but I'd LOVE a new version. Got spammers back pretty much as soon as I upgraded.

http://www.vbulletin.org/forum/showthread.php?t=96018

:D

almukmin
19 Jun 2006, 01:28
Do you guys have the one for PMs?

|Jordan|
06 Sep 2006, 06:30
This mod doesnt work with VB 3.0.14

I get the following error after a thread is created/reply:
Warning: array_merge() [function.array-merge]: Argument #1 is not an array in /includes/functions_newpost.php on line 987

Any idea what's wrong? I really need this as some bloody spammers are registering on my forum to advertize stuff.

|Jordan|
09 Sep 2006, 19:14
Scratch that request. I found the problem

See this thread (http://www.vbulletin.org/forum/showthread.php?t=125302)

xec
13 Sep 2006, 19:43
Does this work with 3.5.4? Or is there something like this out there for 3.5.4? I've installed this one: http://www.vbulletin.org/forum/showthread.php?t=96018 but I need one that prevents low post count members not to be able to send PMs. Thank you.

jprice1542
13 Mar 2007, 23:41
after hack is installed I get the following error when I try to make a thread:
Parse error: parse error in
/xxxxxxxxxxxxxxxx/var/www/html/includes/functions_newpost.php on line 616

Fatal error: Call to undefined function: fetch_emailchecked() in /xxxxxxxxxxxx/var/www/html/newthread.php on line 199

jprice1542
14 Mar 2007, 03:27
after hack is installed I get the following error when I try to make a thread:
Parse error: parse error in
/xxxxxxxxxxxxxxxx/var/www/html/includes/functions_newpost.php on line 616

Fatal error: Call to undefined function: fetch_emailchecked() in /xxxxxxxxxxxx/var/www/html/newthread.php on line 199

nevermind I fixed t :)