Previous Thread
Next Thread
Print Thread
Rate Thread
Joined: Jun 2005
Posts: 2
Junior Member
Junior Member
Offline
Joined: Jun 2005
Posts: 2
Hi guys,

New to PHP and especially forums. I think the various UBB boards out there are great but rather than use their own script I have tried to write my own.

Now this question may be inappropriate because I am trying to hijack ideas but the main thing I have been stuck on for weeks is stripping UBB to return HTML. A simple str_replace array is getting the job done for bold etc however the tricky one is a URL, mainly because it needs to return the string (the url) twice in amongst the UBB codes once parsed.

Any ideas? Or should I pack up and download a standard package BB?

Thanks guys.

Sponsored Links
Joined: Mar 2000
Posts: 21,079
Likes: 3
I type Like navaho
I type Like navaho
Joined: Mar 2000
Posts: 21,079
Likes: 3
We're basically/mainly a perl forum, if you're really interested in rolling your own php forum, you might want to learn more from the freely available ones likes phpbb, invision, etc. ubb.threads is good, but not free smile


- Allen wavey
- What Drives You?
Joined: Mar 2001
Posts: 7,394
LK Offline
Admin / Code Breaker
Admin / Code Breaker
Offline
Joined: Mar 2001
Posts: 7,394
Search php.com for "eregi_replace", put the string (the url) in parenthesis in the pattern part and use \1 to recall it in the replacement part.

Just a note, it took the BB companies lots of time and efforts to make the url tag invulnerable, so if you just make it simple most likely hackers will be able to exploit it (for example, they can start the URL with "javascript:", add inverted commas to get out of href into another event, etc)

Joined: Jun 2005
Posts: 2
Junior Member
Junior Member
Offline
Joined: Jun 2005
Posts: 2
Fair enough - no wonder I couldn't work it out.
Thanks guys.


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
Bill B
Bill B
Issaquah, WA
Posts: 87
Joined: December 2001
Forum Statistics
Forums63
Topics37,575
Posts293,932
Members13,824
Most Online6,139
Sep 21st, 2024
Today's Statistics
Currently Online 961
Topics Created 0
Posts Made 0
Users Online 1
Birthdays 0
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,835
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-2025 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.1
(Snapshot build 20240918)