vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   Allow URLs in posts only after a minimum number of posts (to reduce spam) (https://vborg.vbsupport.ru/showthread.php?t=44694)

smess 10-27-2002 04:34 AM

works great, thanks a lot.

Dean C 10-27-2002 03:18 PM

Awesome this should be quite easy to modify for a specific forum :D

Thanks Erwin :D

Regards

- miSt

Brain Crusher 02-17-2003 10:38 PM

The Hack is bugy, if a guy want promotion his homepage
he can make a post like

subject my page
text: rotten.com

and post it after it, he can edit his own post and make rotten.com to www.rotten.com, after submit it

the link will be active with "[URL]"...

Brain Crusher 02-17-2003 11:00 PM

Helped myself :).

I think you should add this to editpost.php under the same "find string" how newreply.php

$allowurl = 15;
if($bbuserinfo[posts] < $allowurl and strstr($message,'[url')) {
eval("standarderror(\"".gettemplate("error_nourlal lowed")."\");");
exit;
}
if($bbuserinfo[posts] < $allowurl and strstr($message,'[URL')) {
eval("standarderror(\"".gettemplate("error_nourlal lowed")."\");");
exit;
}

$allowurl = 15;
if($bbuserinfo[posts] < $allowurl and strstr($message,'www')) {
eval("standarderror(\"".gettemplate("error_nourlal lowed")."\");");
exit;
}
if($bbuserinfo[posts] < $allowurl and strstr($message,'www')) {
eval("standarderror(\"".gettemplate("error_nourlal lowed")."\");");
exit;
}

which blocks now also to edit the www or URL-BBcode to the url.

Raz 02-18-2003 12:31 PM

Nice hack.

I would recommend you use the stristr function instead of the strstr function.

Raz 02-18-2003 12:42 PM

You might also want to "streamline" it into one condition:
PHP Code:

if( ($bbuserinfo[posts] < $allowurl) and (stristr($message,'[url') or stristr($message,'www.') or stristr($message,'http://')) ) { 

with the added http:// check. (http://google.com)

sajjid 05-16-2003 11:34 PM

i was wondering if it is possiable to disable live linking i mean users be able to post a link but it should not be clickable.
i dont mind people posting links as long as they not clickable other should be able to see it then if they wanna visit that site then they have to type it in thier browser. Just like my signature below

Erwin 05-17-2003 12:22 AM

Update Version 2.0 - Tidied up the code, added to editpost.php, made it easier to change the variable

Just download the text file and replace the old code. I've made it so you can change the minimum post easily in the phpinclude template.

Erwin 05-17-2003 12:24 AM

Quote:

Today at 10:34 AM sajjid said this in Post #27
i was wondering if it is possiable to disable live linking i mean users be able to post a link but it should not be clickable.
i dont mind people posting links as long as they not clickable other should be able to see it then if they wanna visit that site then they have to type it in thier browser. Just like my signature below

That would require an edit of functions.php, and not the purpose of this hack. It's a matter of making the "automatically parse URL" radio button switched to off automatically.

sajjid 05-17-2003 01:24 AM

Thanks for the quick reply but i am still lost i am new to php coding
any further help would be most welcome


All times are GMT. The time now is 06:54 AM.

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.01167 seconds
  • Memory Usage 1,740KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete