|
Joined: Jan 2000
Posts: 796
Addict
|
Addict
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[/]
|
|
|
|
Joined: Jan 2000
Posts: 796
Addict
|
Addict
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);
|
|
|
|
Joined: May 1999
Posts: 3,039
Guru
|
Guru
Joined: May 1999
Posts: 3,039 |
Yep, that should do it[]/w3timages/icons/wink.gif[/].
UBB.threads Developer
|
|
|
|
Joined: Jan 2000
Posts: 796
Addict
|
Addict
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[/]
|
|
|
|
Joined: May 1999
Posts: 3,039
Guru
|
Guru
Joined: May 1999
Posts: 3,039 |
Thanks for the info on the pre tag, got that patched up.
UBB.threads Developer
|
|
|
|
Joined: Jan 2000
Posts: 796
Addict
|
Addict
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.
|
|
|
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.
|
|
Posts: 417
Joined: November 2001
|
|
Forums63
Topics37,573
Posts293,925
Members13,849
|
Most Online5,166 Sep 15th, 2019
|
|
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
|
|
|
|