bb codes

Started on the old forum in September 2010 · view the original in the archive · old links redirect here

#bb-codes-url-lavalair

2 replies · 886 views · started 16 years ago · 1 min read

3 participants
dominik92r Junior · 38 posts #1

I need bb code url. this is bit of my core.php file

$text = preg_replace("/[url=(.?)](.?)[/url]/is","<a href="$1" target="_blank">$2</a>",$text);

when i post Google in the forum, shout etc i see //www.google.pl">Google" target="_blank">www.google.pl">Google

something else Fellow · 2,296 posts #2

You Have 2 BB codes for url`s On your other automatic url bb code try putting something like:

if(substr_count($text,"[url=")<1){ // your other automatic url bb code here }

pmbguy Senior · 344 posts #3

btw, you might want to modify the url bbcode so users get logged out when they click links to prevent session id theft...

try something like this: $text = preg_replace("/[url=(.?)](.?)[/url]/is","<a href="urlredir.php?redir=$1&who=$user">$2</a>",$text);

and urlredir.php attached below:

also, check if one of your smilies not acting up with the http...

or did you try block spam by adding http to the blocked / spam words on your site?

hope this helps...

Attachments: urlredir.zip

Sign in to reply.

Similar topics

Keyboard shortcuts

g f
Go to forums
g h
Go to your feed
g m
Go to messages
r
Reply (in a topic)
/
Search
j
Next post
k
Previous post
?
This list
Ctrl/⌘ + Enter
Send what you are writing
Ctrl/⌘ + B / I
Bold / italic while writing
Esc
Close