Mysidia Adoptables Support Forum  

Home Community Mys-Script Creative Off-Topic
Go Back   Mysidia Adoptables Support Forum > Mysidia Adoptables > Questions and Supports

Notices

Reply
 
Thread Tools Display Modes
  #1  
Old 02-02-2012, 11:46 AM
keliptis keliptis is offline
Member
 
Join Date: May 2011
Posts: 15
Gender: Female
Credits: 1,667
keliptis is on a distinguished road
Default BB codes not working right

So ive been bothered by this for a while and I cant seem to find the issue.

When I edited text in the index page only some bb codes work, bold, underline so forth

However color and size ones wont, they exist in bbcode.php and says it should convert them however for some reason it is not.

Heres bbcode.php

Code:
<?php

// This file parses BBCode for user editable pages
// Thanks to TheMagnitude for this code and for sharing
// BBcodes mod credit to Teshia

function bbconvert($text)
{
        // CONVERT ALL HTML SPECIAL CHARS TO THERE ENTITIES
        $text = htmlentities($text, ENT_QUOTES);
        
        // PARSE BB CODE
        $text = preg_replace('|\[b\](.+?)\[\/b\]|i', '<strong>$1</strong>', $text);
        $text = preg_replace('|\[i\](.+?)\[\/i\]|i', '<em>$1</em>', $text);
        $text = preg_replace('|\[u\](.+?)\[\/u\]|i', '<u>$1</u>', $text);
        $text = preg_replace('|\[img\](.+?)\[\/img\]|i', '<img src="$1" border="0">', $text);
        $text = preg_replace('|\[url=(.+?)\](.+?)\[\/url\]|i', '<a href="$1" target="_blank">$2</a>', $text);
        $text = preg_replace('|\[color=(.+?[^;])\](.+?)\[\/color\]|i', '<span style="color:$1;">$2</span>', $text);
        $text = preg_replace('|\[size=(.+?[^;])\](.+?)\[\/size\]|i', '<span style="font-size:$1;">$2</span>', $text);
        $text = preg_replace('|\[left\](.+?)\[\/left\]|i', '<span style="text-align: left;">$1</span>', $text);
        $text = preg_replace('|\[right\](.+?)\[\/right\]|i', '<span style="text-align: right;">$1</span>', $text);
        $text = preg_replace('|\[center\](.+?)\[\/center\]|i', '<center>$1</center>', $text);
	    $text = preg_replace('|\[urlsame=(.+?)\](.+?)\[\/urlsame\]|i', '<a href="$1" target="_self">$2</a>', $text);
        $text = preg_replace('|\[s\](.+?)\[\/s\]|i', '<del>$1</del>', $text);
        $text = preg_replace('|\[url\](.+?)\[\/url\]|i', '<a href="$1" target="_blank">$1</a>', $text);
        $text = preg_replace('|\:hr\:|i', '<hr>', $text);
		$text = preg_replace('|\[youtube\](.+?)\[\/youtube\]|i', '<object width="425" height="350"><param name="movie" value="http://www.youtube.com/v/$1"></param><embed src="http://www.youtube.com/v/$1" type="application/x-shockwave-flash" width="425" height="350"></embed></object>', $text);
        $text = preg_replace('|\[profile\](.+?)\[\/profile\]|i', '<a href="profile.php?user=$1">$1</a>', $text);
        $text = preg_replace('|\[imgmap\](.+?)\[\/imgmap\]|i', '<img src="$1" border="0" usemap="#map1">', $text);
        $text = preg_replace('|\[map\]|i', '<map name="map1">', $text);
        $text = preg_replace('|\[\/map\]|i', '</map>', $text);
        $text = preg_replace('|\[where=(.+?)\,(.+?)\,(.+?)\,(.+?)=(.+?)\]|i', '<area shape="rect" coords="$1,$2,$3,$4" href="$5">', $text);
        $text = preg_replace('|\[wherecirc=(.+?)\,(.+?)\,(.+?)\=(.+?)\]|i', '<area shape="circle" coords="$1,$2,$3" href="$4">', $text);

	  // RETURN HTML RESULT
        return $text;
}

?>
Reply With Quote
  #2  
Old 02-02-2012, 12:30 PM
keliptis keliptis is offline
Member
 
Join Date: May 2011
Posts: 15
Gender: Female
Credits: 1,667
keliptis is on a distinguished road
Default

Nvm I sorted at least the color some codes didn't work with others im guessing and voided all of them
Reply With Quote
  #3  
Old 02-02-2012, 04:21 PM
Hall of Famer's Avatar
Hall of Famer Hall of Famer is offline
Administrator, Lead Coder
 
Join Date: Dec 2008
Location: South Brunswick
Posts: 4,448
Gender: Male
Credits: 392,438
Hall of Famer is on a distinguished road
Default

Well actually starting from Mys v1.3.0 we will be using this WYSIWYG text editor, the BBcodes will no longer be needed. But if you insist on using Bbcodes and they wont work for you, lemme know and I will see what I can do to help you.
__________________


Mysidia Adoptables, a free and ever-improving script for aspiring adoptables/pets site.
Reply With Quote
  #4  
Old 02-03-2012, 03:55 PM
keliptis keliptis is offline
Member
 
Join Date: May 2011
Posts: 15
Gender: Female
Credits: 1,667
keliptis is on a distinguished road
Default

Ive got most to work took some work goggling to figure out size ive noticed some bb codes dont work with others it just voids them so

I had that issue before I just never solved why but trial and error seems to show some dont work with others
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
forum codes not working? Nemesis Questions and Supports 18 07-02-2012 02:31 PM
How do i use the codes Soffi Questions and Supports 5 12-28-2011 02:21 PM
promo codes maximillion Questions and Supports 5 07-05-2011 06:28 PM
BB CODES zhiichiro Questions and Supports 4 03-24-2009 05:52 PM
codes Blackmagic Questions and Supports 3 01-13-2009 07:30 PM


All times are GMT -5. The time now is 01:09 PM.

Currently Active Users: 803 (0 members and 803 guests)
Threads: 4,080, Posts: 32,024, 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