Mysidia Adoptables Support Forum  

Home Community Mys-Script Creative Off-Topic
Go Back   Mysidia Adoptables Support Forum > Mysidia Adoptables > Addons and Modifications > Addons/Mods Graveyard

Notices

Reply
 
Thread Tools Display Modes
  #1  
Old 09-10-2009, 08:39 PM
Fireballchad Fireballchad is offline
Member
 
Join Date: Aug 2009
Posts: 49
Credits: 9,890
Fireballchad
Default 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.
Reply With Quote
  #2  
Old 09-14-2009, 07:54 AM
Bloodrun's Avatar
Bloodrun Bloodrun is offline
I am, who I am.
 
Join Date: Apr 2009
Posts: 532
Gender: Male
Credits: 35,908
Bloodrun
Send a message via Yahoo to Bloodrun
Default 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.
Reply With Quote
  #3  
Old 09-14-2009, 09:30 PM
Fireballchad Fireballchad is offline
Member
 
Join Date: Aug 2009
Posts: 49
Credits: 9,890
Fireballchad
Default 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
Reply With Quote
  #4  
Old 09-15-2009, 05:51 PM
Bloodrun's Avatar
Bloodrun Bloodrun is offline
I am, who I am.
 
Join Date: Apr 2009
Posts: 532
Gender: Male
Credits: 35,908
Bloodrun
Send a message via Yahoo to Bloodrun
Default 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 =/
Reply With Quote
  #5  
Old 09-16-2009, 08:25 PM
Fireballchad Fireballchad is offline
Member
 
Join Date: Aug 2009
Posts: 49
Credits: 9,890
Fireballchad
Default 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 :(
Reply With Quote
  #6  
Old 09-19-2009, 09:09 AM
Bloodrun's Avatar
Bloodrun Bloodrun is offline
I am, who I am.
 
Join Date: Apr 2009
Posts: 532
Gender: Male
Credits: 35,908
Bloodrun
Send a message via Yahoo to Bloodrun
Default 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 >.<
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Support for BBCode jason1234h Questions and Supports 2 07-22-2013 12:46 AM
Messed up BBCode SilverDragonTears Questions and Supports 19 02-13-2012 11:50 AM
Extra BBcode AlexC Mys v1.2.x Mods 0 04-14-2011 01:48 PM
HTML instead of BBCODE PokePets Questions and Supports 3 08-09-2010 06:36 AM
BBCode doesn't show Killgore Questions and Supports 9 02-26-2009 09:40 PM


All times are GMT -5. The time now is 08:18 PM.

Currently Active Users: 731 (0 members and 731 guests)
Threads: 4,081, Posts: 32,032, Members: 2,016
Welcome to our newest members, jolob.
BETA





What's New?

What's Hot?

What's Popular?


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
vBCommerce I v2.0.0 Gold ©2010, PixelFX Studios
vBCredits I v2.0.0 Gold ©2010, PixelFX Studios
Emoticons by darkmoon3636