Previous Thread
Next Thread
Print Thread
Rate Thread
#184381 09/20/2005 7:39 PM
Joined: Sep 2005
Posts: 44
God
Offline
Member
Member
Offline
Joined: Sep 2005
Posts: 44
Is there something that would modify my forum so whenever someone posts an url it would automatically get an http://safeurl.de/? url infront of it, and whenever someone posts an img, it would have a http://invis.free.anonymizer.com/ url as a prefix?

I saw this done on another forum (phpbb) and was wondering if such mod existed for ubb 6.6 or if it could be done.

Any response is appreciated.
Thanks.

Sponsored Links
#184382 09/20/2005 9:30 PM
Joined: Mar 2000
Posts: 21,079
Likes: 3
I type Like navaho
I type Like navaho
Joined: Mar 2000
Posts: 21,079
Likes: 3
It could be done, would involve editing the posting routines in ubb_lib_posting.cgi


- Allen wavey
- What Drives You?
#184383 09/21/2005 4:37 AM
Joined: Mar 2001
Posts: 7,394
LK Offline
Admin / Code Breaker
Admin / Code Breaker
Offline
Joined: Mar 2001
Posts: 7,394
ubb_lib.cgi
Find:
Code
	$check =~ s/(^|s)(http://S+)(.|,|))?/$1<a href="$2" target="_blank">$2</a>$3/isg;
$check =~ s/(^|s)(https://S+)(.|,|))?/$1<a href="$2" target="_blank">$2</a>$3/isg;
$check =~ s/(^|s)(ftp://S+)(.|,|))?/$1<a href="$2" target="_blank">$2</a>$3/isg;
$check =~ s/(^|s)(www.S+)(.|,|))?/$1<a href="http://$2" target="_blank">$2</a>$3/isg;
Wherever you see:
Code
<a href="
Add after that:
Code
http://safeurl.de/?
Find:
Code
		$returner = qq~<a href="$orig"$target>$wording</a>~;
Replace with:
Code
		$returner = qq~<a href="http://safeurl.de/?$orig"$target>$wording</a>~;
Find:
Code
		$returner = qq~ <img src="$orig" alt=" - " />~;
Replace with:
Code
		$returner = qq~ <img src="http://invis.free.anonymizer.com/$orig" alt=" - " />~;
ubb_lib_posting.cgi
Find:
Code
		# auto-URLs
$match++ if $message =~ s/(<a href=")(http|https|ftp)(://)(S+)(" target="_blank">)234(</a>)/ $2$3$4 /isg;
# new URL
$match++ if $message =~ s/(<a href=")(http|https|ftp)(://)(S+)(" target="_blank">)(.+?)(</a>)/$2://$4/isg;
Add ABOVE:
Code
		# auto-URLs
$match++ if $message =~ s/(<a href="http://safeurl.de/?)(http|https|ftp)(://)(S+)(" target="_blank">)234(</a>)/ $2$3$4 /isg;
# new URL
$match++ if $message =~ s/(<a href="http://safeurl.de/?)(http|https|ftp)(://)(S+)(" target="_blank">)(.+?)(</a>)/$2://$4/isg;
Find:
Code
			$match++ if $message =~ s/(<img src=")(S+)(" alt=" - " />)/[img]$2[/img]/isg;
Add ABOVE:
Code
			$match++ if $message =~ s/(<img src="http://invis.free.anonymizer.com/)(S+)(" alt=" - " />)/[img]$2[/img]/isg;
It's untested but should work.

#184384 09/21/2005 7:12 PM
Joined: Sep 2005
Posts: 44
God
Offline
Member
Member
Offline
Joined: Sep 2005
Posts: 44
Thank you. The help is much appreciated. It looks like everything is working according to plan. Although there isn't really a way to see if the image hack is really working... not one that I can see.

#184385 09/21/2005 10:53 PM
Joined: Jan 2000
Posts: 5,833
Likes: 20
UBBDev / UBBWiki Owner
Time Lord
UBBDev / UBBWiki Owner
Time Lord
Joined: Jan 2000
Posts: 5,833
Likes: 20
View the page (or image) source and see wink ...


UBB.Dev - Putting Dev into UBB.threads
Company: VNC Web Services - UBB.threads Scripts and Scripting, Install and Upgrade Services, Site and Server Maintenance.
Forums: A Gardeners Forum, Scouters World, and UGN Security
UBB.Threads: My UBB Themes, My UBB Scripts
Sponsored Links
#184386 09/22/2005 9:19 AM
Joined: Sep 2005
Posts: 44
God
Offline
Member
Member
Offline
Joined: Sep 2005
Posts: 44
It's working perfectly for the posting. Only thing is that it needs to also have the prefixes in the profile, the sig, and the avator. Could someone tell me how this can be done?

I'm guessing it's pretty much the same thing as LK posted except to some other files.


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:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
Nettomo
Nettomo
Germany, Bremen
Posts: 417
Joined: November 2001
Forum Statistics
Forums63
Topics37,573
Posts293,925
Members13,849
Most Online5,166
Sep 15th, 2019
Today's Statistics
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,833
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
WebGuy 2
Morgan 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2024 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20240430)