#1
|
||||
|
||||
Extra BBcode
I am not sure if this counts as a mod or not, feel free to move if need be.
Go to your INC folder and then find the bbcode.php file. There is a chunk of code starting with // PARSE BB CODE - go to the bottom of this chunk, above // RETURN HTML RESULT and put whatever ones of the following you want. Headers Code:
$text = preg_replace('|\[h1\](.+?)\[\/h1\]|i', '<center><font size="+3" color="#000000">$1</font></center>', $text); $text = preg_replace('|\[h2\](.+?)\[\/h2\]|i', '<center><font size="+2" color="#000000">$1</font></center>', $text); $text = preg_replace('|\[h3\](.+?)\[\/h3\]|i', '<center><font size="+1" color="#000000">$1</font></center>', $text); $text = preg_replace('|\[h4\](.+?)\[\/h4\]|i', '<font size="+3" color="#000000">$1</font>', $text); $text = preg_replace('|\[h5\](.+?)\[\/h5\]|i', '<font size="+2" color="#000000">$1</font>', $text); $text = preg_replace('|\[h6\](.+?)\[\/h6\]|i', '<font size="+1" color="#000000">$1</font>', $text); Anchor This is a code for creating an anchor in a page. (example - faq.php#Adoptable Questions) http://www.w3schools.com/HTML/html_links.asp - more info on anchors here. Code:
$text = preg_replace('|\[anchor=(.+?)\](.+?)\[\/anchor\]|i', '<a name="$1">$2</a> ', $text); I added this one because when I was using tables, I wanted to have them on seperate lines. Code:
$text = preg_replace('|\[br\]|i', '<br>', $text); Tables Thank you to fadillzzz for showing me how to do this one. Code:
$text = preg_replace('|\[table\](.+?)\[\/table\]|i', '<table>$1</table>', $text); $text = preg_replace('|\[th\](.+?)\[\/th\]|i', '<th>$1</th>', $text); $text = preg_replace('|\[tr\](.+?)\[\/tr\]|i', '<tr valign="top">$1</tr>', $text); $text = preg_replace('|\[td\](.+?)\[\/td\]|i', '<td>$1</td>', $text); Tables with borders. Code:
$text = preg_replace('|\[table2\](.+?)\[\/table2\]|i', '<table border="2" cellpadding="2" cellspacing="2">$1</table>', $text); That's all I've got for now, I will include more later. I'm working on a few of my own custom ones as well. ALSO: While we're on the subject - I use this code as well, it's not mine however; http://www.mysidiaadoptables.com/for...ead.php?t=1908 Just thought I'd include it. |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Extra click | SleepWalker | Addons/Mods Graveyard | 6 | 12-06-2009 11:53 AM |
Extra Options for ROOT Admins | Ashje | Questions and Supports | 7 | 07-14-2009 11:44 PM |
[Theme] - Smile - Extra Mods Built In! | Rsmiley | Templates and Themes | 25 | 04-01-2009 03:33 PM |
Adopting "Extra" Pets - Exploiting a bug | Seapyramid | Questions and Supports | 3 | 02-07-2009 10:55 PM |
Extra Pages? | rosepose | Questions and Supports | 2 | 02-05-2009 10:28 AM |
What's New? |
What's Hot? |
What's Popular? |