Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 01-10-2004, 03:23 AM
bigdaddy04 bigdaddy04 is offline
 
Join Date: Jan 2004
Posts: 60
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default no urls before a certain amount of posts reached...

Hi,
Is there a hack that will not allow members that have less then the required number of posts to post URLs?

Thanks..
Reply With Quote
  #2  
Old 01-11-2004, 02:40 AM
bigdaddy04 bigdaddy04 is offline
 
Join Date: Jan 2004
Posts: 60
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

no such hack??
Reply With Quote
  #3  
Old 01-11-2004, 09:33 AM
rrottman rrottman is offline
 
Join Date: Jun 2002
Posts: 53
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Not as far as I know.
I am quite busy today so I cannot do the full hack at this moment. But maybe you can do it yourself with a little bit of help?

Take a look at "includes/functions_newpost.php". There you'll find a routine which parses each URL in a posting and wraps it into [url= and [/url] tags. The easiest, yet dirty, way to do it is, to add some code before this functions returns the $text (which then goes straight to the db).

I've marked my changes with // RR Start Change.

e.g.:
PHP Code:
    $text preg_replace($urlSearchArray$urlReplaceArray$messagetext);
    if (
strpos($text"@"))
    {
        
$text preg_replace($emailSearchArray$emailReplaceArray$text);
    }

    
// RR Change Start
    
global $bbuserinfo;
    if (
$bbuserinfo['posts'] < 10) {
        
// do stuff here, e.g. delete all URLs from posting with recursive replace routine
        // $text = $newtext
    
}
    
// RR Change End
    
return $text
The $bbuserinfo['posts'] gives you the number of posts the logged in user has done. I've hard coded 10 here. A better idea would obviously be, to add this as a var to the AdminCP.

Maybe I find some time later, to do the hack. If you do it in the meantime, please post it here.
Reply With Quote
  #4  
Old 01-11-2004, 09:35 AM
rrottman rrottman is offline
 
Join Date: Jun 2002
Posts: 53
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

By the way:
I wonder what you keep in mind should happen if a user < the minimum number of postings required tries to post URLs. Do you simply want to delete the URLs? Or do you want to stop the entire posting?

Let me know. Maybe it makes things more easy.
Reply With Quote
  #5  
Old 01-11-2004, 03:31 PM
bigdaddy04 bigdaddy04 is offline
 
Join Date: Jan 2004
Posts: 60
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I really appreciate you taking the time to make something like this.
Basically, I do not want spammers to just join our board and post their urls.

I do not want their URLs in their signatures, and I do not want them in their posts if they have less then 10 posts.

If they post a URL, i suppose making it not clickable is one way to deal with it.
Maybe you got something in mind?
Reply With Quote
  #6  
Old 01-11-2004, 04:33 PM
NTLDR's Avatar
NTLDR NTLDR is offline
Coder
 
Join Date: Apr 2002
Location: Bristol, UK
Posts: 3,644
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Trying to prevent this is rather dificult due to all the "cheats" used by people. If I get a chance I'll dig out the code I use of my board and release it.
Reply With Quote
  #7  
Old 01-11-2004, 04:47 PM
bigdaddy04 bigdaddy04 is offline
 
Join Date: Jan 2004
Posts: 60
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I guess I'll try to prevent it manually...

Thanks for all the feedback.
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:17 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.03622 seconds
  • Memory Usage 2,216KB
  • Queries Executed 11 (?)
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
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)bbcode_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (7)post_thanks_box
  • (7)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (7)post_thanks_postbit_info
  • (7)postbit
  • (7)postbit_onlinestatus
  • (7)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
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete