|
|
Joined: Dec 2001
Posts: 699
Member
|
|
Member
Joined: Dec 2001
Posts: 699 |
******************************************************************************** * DESCRIPTION: Stop junior members and unregistered people from posting * * URLs (ftp etc) and replaces them with an explanation * * CREATED BY: Dave2/Dave Wickham <mailto:[email protected]> * * DATE: 09/12/2002 * * VERSION: Version 1.0beta2 * * DEMO: http://www.aagames.co.uk/cgi-bin/ultimatebb.cgi * ******************************************************************************** Download link: HERE (text file) Thanks to LK for fixing the wordlet (it was hard-coded before). So, is anyone brave enough to try a hack written by me? 
|
|
|
|
|
Joined: Dec 2000
Posts: 730
deutscher moderator / v5 specialist
|
|
deutscher moderator / v5 specialist
Joined: Dec 2000
Posts: 730 |
I think this is a good hack. I have some questions... - What happens when an user post a link like this: 192.168.0.1/xy.html?
- Can the user post links with the destionation in the same board (eg. linking an other topic...)?
- An additional feature could be to disallow an users to post URLs.
|
|
|
|
|
Joined: Dec 2001
Posts: 699
Member
|
|
Member
Joined: Dec 2001
Posts: 699 |
1) If it's in [url] it'll be cut. if it isn't, it won't be a "clickable" link, and won't be cut. 2) Nope... It'd be pretty hard to do that, AFAIK (actually, that'd be pretty simple if people want it... just worked out how) 3) Could be done by just deleting the code I modify, or commenting it out 
|
|
|
|
|
Joined: Dec 2000
Posts: 730
deutscher moderator / v5 specialist
|
|
deutscher moderator / v5 specialist
Joined: Dec 2000
Posts: 730 |
quote: Originally posted by Dave2: 3) Could be done by just deleting the code I modify, or commenting it out I mean to disallow some special users the posting of links who spam the forum with links e.g. If anyone need Point 2, I can post the code I use for this...
|
|
|
|
|
Joined: Dec 2001
Posts: 699
Member
|
|
Member
Joined: Dec 2001
Posts: 699 |
3) I personally would ban them for a week or something, but it in theory could easily be modified...
|
|
|
|
|
Joined: Dec 2001
Posts: 699
Member
|
|
Member
Joined: Dec 2001
Posts: 699 |
BTW, a demo thread:
http://www.aagames.co.uk/ubbnoncgi/ultimatebb.php?ubb=get_topic;f=6;t=000022
|
|
|
|
|
Joined: Jan 2000
Posts: 5,073
Admin Emeritus
|
|
Admin Emeritus
Joined: Jan 2000
Posts: 5,073 |
Your FAQ modifications are out of date - 6.3.1 and higher versions allow FAQ modifications from the control panel...
UBB.classic: Love it or hate it, it was mine.
|
|
|
|
|
Joined: Dec 2001
Posts: 699
Member
|
|
Member
Joined: Dec 2001
Posts: 699 |
########## POSSIBLE PROBLEMS ########## #### I think that the newer UBB.classic versions use wordletised FAQs. If you #### want this written to make use of that, feel free to buy me a new licence ;) Without actually seeing the code, it's quite hard to accomodate it  .
|
|
|
|
|
Joined: Dec 2001
Posts: 699
Member
|
|
Member
Joined: Dec 2001
Posts: 699 |
New patch to allow links to your site; doesn't work very well though, since if just one link to your site is in the post, any links are allowed... Replace (both times): code:
if (($user_profile[8]) && ($user_profile[8] ne "$vars_misc{custom_titles}->{0}")) {
With: code: [qb] $sitebase = $vars_config{CGIURL}; $sitebase =~ s/http.*:////isg; $sitebase =~ s//.*//isg;
if ($check =~ /$sitebase/i) { $is_this_site = "1"; }
if ((($user_profile[8]) && ($user_profile[8] ne "$vars_misc{custom_titles}->{0}")) || ($is_this_site eq "1")) { [/qb]
|
|
|
|
|
Joined: Mar 2001
Posts: 7,394
Admin / Code Breaker
|
|
Admin / Code Breaker
Joined: Mar 2001
Posts: 7,394 |
It wouldn't work: $check is the WHOLE string, not just the specific URL.
|
|
|
|
|
Joined: Dec 2001
Posts: 699
Member
|
|
Member
Joined: Dec 2001
Posts: 699 |
quote: New patch to allow links to your site; doesn't work very well though, since if just one link to your site is in the post, any links are allowed... As I said, I don't know how to separate it...
|
|
|
|
|
Joined: Dec 2001
Posts: 699
Member
|
|
Member
Joined: Dec 2001
Posts: 699 |
New version - excludes sigs from censorship. IMO, sigs = OK for promotion.
|
|
|
|
|
Joined: Dec 2000
Posts: 730
deutscher moderator / v5 specialist
|
|
deutscher moderator / v5 specialist
Joined: Dec 2000
Posts: 730 |
this is my script to seperate all links: while ($ThePost =~ /()(.+?)()/isg) { } while ($ThePost =~ /()(.+?)()/isg) { } while ($ThePost =~ /(^|s)((http|https)://(.+?)s)/isg) { } while ($ThePost =~ /(^|s)((ftp)://(.+?)s)/isg) { } while ($ThePost =~ /(^|s)(www.S+)|(www(.+S+(?+)(S+)))|((ww+.ww+.ww+)(S+))/isg) { }
|
|
|
Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.
Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
|
|
Posts: 417
Joined: November 2001
|
|
|
Forums63
Topics37,583
Posts293,955
Members13,824
| |
Most Online151,614 Nov 14th, 2025
|
|
Currently Online 1424
Topics Created 0
Posts Made 0
Users Online 0
Birthdays 26
|
|
|
|