Mysidia Adoptables Support Forum

Mysidia Adoptables Support Forum (http://www.mysidiaadoptables.com/forum/index.php)
-   Addons/Mods Graveyard (http://www.mysidiaadoptables.com/forum/forumdisplay.php?f=41)
-   -   BBCode (http://www.mysidiaadoptables.com/forum/showthread.php?t=1088)

Fireballchad 09-10-2009 07:39 PM

BBCode
 
Ok well I managed to get Bloodrun's forum to allow bbcode in post also.
PHP Code:

$a_answer=$_POST['a_answer'];
     
// CONVERT ALL HTML SPECIAL CHARS TO THERE ENTITIES
        
$a_answer htmlentities($a_answerENT_QUOTES);
        
        
// PARSE BB CODE
        
$a_answer preg_replace('|\[b\](.+?)\[\/b\]|i''<strong>$1</strong>'$a_answer);
        
$a_answer preg_replace('|\[i\](.+?)\[\/i\]|i''<em>$1</em>'$a_answer);
        
$a_answer preg_replace('|\[u\](.+?)\[\/u\]|i''<u>$1</u>'$a_answer);
        
$a_answer preg_replace('|\[img\](.+?)\[\/img\]|i''<img src=$1>'$a_answer);
        
$a_answer preg_replace('|\[url=(.+?)\](.+?)\[\/url\]|i''<a href=$1>$2</a>'$a_answer);
        
$a_answer preg_replace('|\[color=(.+?[^;])\](.+?)\[\/color\]|i''<span style="color:$1;">$2</span>'$a_answer);
        
$a_answer preg_replace('|\[size=(.+?[^;])\](.+?)\[\/size\]|i''<span style="font-size:$1;">$2</span>'$a_answer);
        
$a_answer preg_replace('|\[left\](.+?)\[\/left\]|i''<span style="text-align: left;">$1</span>'$a_answer);
        
$a_answer preg_replace('|\[right\](.+?)\[\/right\]|i''<span style="text-align: right;">$1</span>'$a_answer);
        
$a_answer preg_replace('|\[center\](.+?)\[\/center\]|i''<center>$1</center>'$a_answer);
        
$a_answer mysql_real_escape_string($a_answer); 

Thats how I managed to do it. First of all is it secure, secondly how do I make it change back to bbcode when you want to edit it? Right now it converts it to HTML and then when you go to edit your post or sig it is now HTML and not BBCode that you originally typed it in.

Bloodrun 09-14-2009 06:54 AM

RE: BBCode
 
Well with the release of the next one, that problem is solved. The only thing it won't yet allow, is things like youtube videos.

Fireballchad 09-14-2009 08:30 PM

RE: BBCode
 
Quote:

Originally Posted by Bloodrun
Well with the release of the next one, that problem is solved. The only thing it won't yet allow, is things like youtube videos.

Ah ok, still learning how to do this will benefit me in the future just in case you don't post a new update xD

Bloodrun 09-15-2009 04:51 PM

RE: BBCode
 
Quote:

Originally Posted by Fireballchad
Quote:

Originally Posted by Bloodrun
Well with the release of the next one, that problem is solved. The only thing it won't yet allow, is things like youtube videos.

Ah ok, still learning how to do this will benefit me in the future just in case you don't post a new update xD

Yes it will help you =D

And by the looks of it, that update won't be anytime soon =/

Fireballchad 09-16-2009 07:25 PM

RE: BBCode
 
Quote:

Originally Posted by Bloodrun
Quote:

Originally Posted by Fireballchad
Quote:

Originally Posted by Bloodrun
Well with the release of the next one, that problem is solved. The only thing it won't yet allow, is things like youtube videos.

Ah ok, still learning how to do this will benefit me in the future just in case you don't post a new update xD

Yes it will help you =D

And by the looks of it, that update won't be anytime soon =/

ya since you dont have a computer and such? Anyways i've been caught up in school stuff, so my updates to my site are getting harder to do also :(

Bloodrun 09-19-2009 08:09 AM

RE: BBCode
 
Quote:

Originally Posted by Fireballchad
Quote:

Originally Posted by Bloodrun
Quote:

Originally Posted by Fireballchad
Quote:

Originally Posted by Bloodrun
Well with the release of the next one, that problem is solved. The only thing it won't yet allow, is things like youtube videos.

Ah ok, still learning how to do this will benefit me in the future just in case you don't post a new update xD

Yes it will help you =D

And by the looks of it, that update won't be anytime soon =/

ya since you dont have a computer and such? Anyways i've been caught up in school stuff, so my updates to my site are getting harder to do also :(

I have a computer, just not a conssistant amount of internet access.
Im hoping that will all change within the next two months >.<


All times are GMT -5. The time now is 09:28 AM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.