Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 2.x > vBulletin 2.x Full Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Allow URLs in posts only after a minimum number of posts (to reduce spam) Details »»
Allow URLs in posts only after a minimum number of posts (to reduce spam)
Version: 1.00, by Erwin Erwin is offline
Developer Last Online: May 2013 Show Printable Version Email this Page

Version: 2.3.x Rating:
Released: 10-16-2002 Last Update: Never Installs: 20
 
No support by the author.

Allow URLs in posts only after a minimum number of posts (to reduce spam)

I did this mini-hack to reduce the amount of spammers and newbie mistakes at my forums. Most of the newbies at my site do not read the rules, and in their enthusiasm post links back to their own sites or forums.

I have made it so that members need to have a minimum number of posts before they can post URLs to website. On my site I've set it to 15, but you can set it to whatever you like. If a member has less than the required amount of posts, when they try to post they get redirected to an error page, telling them that they need to have a minimum amount of posts before they can post links in their post. In my error message, I also tell them to post links to their own site only in our forum designated for website links.

Update: Version 1.1 - fixed up a loophole. Just replace the old code with the new.
Version 2.0 - tidied up the code, added code to editpost.php, made it easier to change the variable


Anyway, installation is a breeze. The installation text file is below:

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #12  
Old 10-17-2002, 07:54 PM
Erwin's Avatar
Erwin Erwin is offline
 
Join Date: Jan 2002
Posts: 7,604
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by Neo
As a addon to what TECK said you could also place a unset(); just above it.
There's no real need to do that, but I've decided to restrict the file edits to only newthread.php and newreply.php to keep things simple.
Reply With Quote
  #13  
Old 10-18-2002, 08:44 PM
Dark Shogun Dark Shogun is offline
 
Join Date: Aug 2002
Location: The Underworld
Posts: 249
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Can you make it so it only works with the registered user group because my admins, mods, and super mods can post any.

Dark Shogun
Reply With Quote
  #14  
Old 10-18-2002, 09:26 PM
Chris M's Avatar
Chris M Chris M is offline
 
Join Date: Dec 2001
Location: Northampton, England
Posts: 6,186
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Wow...

Nice little hack Erwin

Satan
Reply With Quote
  #15  
Old 10-18-2002, 11:18 PM
Erwin's Avatar
Erwin Erwin is offline
 
Join Date: Jan 2002
Posts: 7,604
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by Dark Shogun
Can you make it so it only works with the registered user group because my admins, mods, and super mods can post any.

Dark Shogun
Your staff have less than the minimum post count required???

Easy fix...

In BOTH newthread.php AND newreply.php, find:

PHP Code:
$allowurl 15;
    if(
$bbuserinfo[posts] < $allowurl and strstr($message,'[url]')) {
      eval(
"standarderror(\"".gettemplate("error_nourlallowed")."\");");
      exit;
    } 
Change it to:

PHP Code:
if ($bbuserinfo[usergroupid]!=or $bbuserinfo[usergroupid]!=or $bbuserinfo[usergroupid]!=7) {
$allowurl 15;
    if(
$bbuserinfo[posts] < $allowurl and strstr($message,'[url]')) {
      eval(
"standarderror(\"".gettemplate("error_nourlallowed")."\");");
      exit;
    }

Make sure you change the $allowurl amount to suit your site.

Again, I am very surprised that you have staff members who do not reach the minimum post count for your site.
Reply With Quote
  #16  
Old 10-19-2002, 05:22 PM
Graphics's Avatar
Graphics Graphics is offline
 
Join Date: Mar 2002
Posts: 157
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

hey erwin cna u make it for ".com" also. and if u can a lot of ppl use the vbcode [url ] is there a way to make it into that also.

i am just asking if u can. if not its still a great hack.
Reply With Quote
  #17  
Old 10-19-2002, 08:58 PM
Erwin's Avatar
Erwin Erwin is offline
 
Join Date: Jan 2002
Posts: 7,604
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by Graphics
hey erwin cna u make it for ".com" also. and if u can a lot of ppl use the vbcode [url ] is there a way to make it into that also.

i am just asking if u can. if not its still a great hack.
If they only put in a ".com" then the domain will show but it won't be linkable. People will have to type it out.

If they use the vcode [url ] this hack will block it automatically.
Reply With Quote
  #18  
Old 10-21-2002, 06:05 PM
Dark Shogun Dark Shogun is offline
 
Join Date: Aug 2002
Location: The Underworld
Posts: 249
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by Erwin


Your staff have less than the minimum post count required???

Again, I am very surprised that you have staff members who do not reach the minimum post count for your site.
It is because my forum is new.

Dark Shogun
Reply With Quote
  #19  
Old 10-21-2002, 07:24 PM
Erwin's Avatar
Erwin Erwin is offline
 
Join Date: Jan 2002
Posts: 7,604
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Update: Version 1.1 - fixed up a loophole. Just replace the old code with the new.

I've discovered a couple of loopholes that new users can use to post URLs. I've replaced the old code with a new piece of code that closes up these loopholes. Please download the 1.1 version of the text file, and replace the old code with the new.
Reply With Quote
  #20  
Old 10-27-2002, 02:56 AM
HHTKAO HHTKAO is offline
 
Join Date: Sep 2002
Posts: 6
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Is step one and two the same for a reason?
Reply With Quote
  #21  
Old 10-27-2002, 02:03 AM
Erwin's Avatar
Erwin Erwin is offline
 
Join Date: Jan 2002
Posts: 7,604
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Step One is for newthread.php, Step Two is for newreply.php - different files, but same code to find and add.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 08:51 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04413 seconds
  • Memory Usage 2,316KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (2)bbcode_php
  • (4)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete