Previous Thread
Next Thread
Print Thread
Rate Thread
#206359 11/25/2000 10:50 AM
Joined: Jan 2000
Posts: 796
MTO
Offline
Addict
Addict
Offline
Joined: Jan 2000
Posts: 796
I am including some more markup, mostly images to the php version, so far so good... but I dont know how to do the [center]Text to be centered here [/center] in php...
Anyone? []/w3timages/icons/wink.gif[/]

Sponsored Links
D_Wolfwood #206360 11/25/2000 11:31 AM
Joined: Jan 2000
Posts: 796
MTO
Offline
Addict
Addict
Offline
Joined: Jan 2000
Posts: 796
OK, havent tested it, but I think it should be
Do markup:
$Body = eregi_replace("<center>","[center]",$Body);
$Body = eregi_replace("</center>","[/center]",$Body);

Unmarkup:
$Body = eregi_replace("\[center\]","<center>",$Body);
$Body = eregi_replace("\[\/center]","</center>",$Body);

D_Wolfwood #206361 11/25/2000 8:01 PM
Joined: May 1999
Posts: 3,039
Guru
Guru
Offline
Joined: May 1999
Posts: 3,039
Yep, that should do it[]/w3timages/icons/wink.gif[/].


UBB.threads Developer
Sally #206362 11/25/2000 8:44 PM
Joined: Jan 2000
Posts: 796
MTO
Offline
Addict
Addict
Offline
Joined: Jan 2000
Posts: 796
Well, that was done taking the example from the [ pre] tags in main.inc.php, but I have found even the [ pre] is buggy here...
When posting from the perl version, if you post [ pre], and dont close it, it does not get converted. That is good.
But in the PHP version, it does get converted even if there is no closing.
So I could ruin the whole page if I wanted to, well most.

This should almost be posted at the php bug forum, but since it is following this thread...
just tell me you´ve read it, Scream, or I´ll post it at the bugs forum as well, []/w3timages/icons/wink.gif[/]


D_Wolfwood #206363 11/25/2000 9:51 PM
Joined: May 1999
Posts: 3,039
Guru
Guru
Offline
Joined: May 1999
Posts: 3,039
Thanks for the info on the pre tag, got that patched up.


UBB.threads Developer
Sponsored Links
Sally #206364 11/26/2000 11:00 AM
Joined: Jan 2000
Posts: 796
MTO
Offline
Addict
Addict
Offline
Joined: Jan 2000
Posts: 796
Hum... all this made me realize that you could do the same thing (though not that bad), if you leave the [b]bold, and [i]itallic open as well. Maybe the technique of markup converting should be done here. For these it happens both in PHP and PERL.


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 20221218)