Previous Thread
Next Thread
Print Thread
Rate Thread
Joined: Dec 2001
Posts: 699
Member
Member
Offline
Joined: Dec 2001
Posts: 699
Code
********************************************************************************
* 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? wink

Sponsored Links
Joined: Dec 2000
Posts: 730
deutscher moderator / v5 specialist
deutscher moderator / v5 specialist
Offline
Joined: Dec 2000
Posts: 730
I think this is a good hack. cool


I have some questions...
  1. What happens when an user post a link like this: 192.168.0.1/xy.html?
  2. Can the user post links with the destionation in the same board (eg. linking an other topic...)?
  3. An additional feature could be to disallow an users to post URLs.

Joined: Dec 2001
Posts: 699
Member
Member
Offline
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 wink

Joined: Dec 2000
Posts: 730
deutscher moderator / v5 specialist
deutscher moderator / v5 specialist
Offline
Joined: Dec 2000
Posts: 730
Quote
quote:
Originally posted by Dave2:
3) Could be done by just deleting the code I modify, or commenting it out wink
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
Offline
Joined: Dec 2001
Posts: 699
3) I personally would ban them for a week or something, but it in theory could easily be modified...

Sponsored Links
Joined: Dec 2001
Posts: 699
Member
Member
Offline
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
Offline
Joined: Dec 2001
Posts: 699
Code
########## 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 ;)
wink

Without actually seeing the code, it's quite hard to accomodate it wink .

Joined: Dec 2001
Posts: 699
Member
Member
Offline
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):
Quote
code:
Code
        if (($user_profile[8]) && ($user_profile[8] ne "$vars_misc{custom_titles}->{0}")) {

With:

code:
[qb]
Code
        $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}")) &#0124;&#0124; ($is_this_site eq "1")) {
[/qb]

Joined: Mar 2001
Posts: 7,394
LK Offline
Admin / Code Breaker
Admin / Code Breaker
Offline
Joined: Mar 2001
Posts: 7,394
It wouldn't work: $check is the WHOLE string, not just the specific URL.

Sponsored Links
Joined: Dec 2001
Posts: 699
Member
Member
Offline
Joined: Dec 2001
Posts: 699
Quote
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...
wink

As I said, I don't know how to separate it...

Joined: Dec 2001
Posts: 699
Member
Member
Offline
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
Offline
Joined: Dec 2000
Posts: 730
this is my script to seperate all links:

Code
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) { }


Link Copied to Clipboard
Donate Today!
Donate via PayPal

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.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Shock Hosting
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
Nettomo
Nettomo
Germany, Bremen
Posts: 417
Joined: November 2001
Forum Statistics
Forums63
Topics37,583
Posts293,955
Members13,824
Most Online151,614
Nov 14th, 2025
Today's Statistics
Currently Online 1424
Topics Created 0
Posts Made 0
Users Online 0
Birthdays 26
Top Posters
AllenAyres 21,080
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,834
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
WebGuy 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2026 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.1.0
(Snapshot build 20260108)