Members Online
Total Online: 32 Web Spiders: 15
Guests Online: 31
Members Online: 1
Registered Members: 70208 Newest Member: andresuran
|
View Thread
| Author |
New BB Code |
[removed]
Banned
Posts: 0
Location:
Joined: 17.12.04 Rank: HBH Guru Warn Level: 100
|
|
|
// Parse extra FBoard+ bbcode into HTML code
function extra_parseubb($text) {
$text = preg_replace('#\[google\](.*?)\[/google\]#si', '<a href="http://www.google.com/search?q=\1">\1</a>', $text);
$text = preg_replace('#\[user\](.*?)\[/user\]#si', '<a href="'.BASEDIR.'profile.php?lookup=\1">User #\1</a>', $text);
if(iMEMBER){
$text = preg_replace('#\[hidden\](.*?)\[/hidden\]#si', '\1', $text);
} else {
$text = preg_replace('#\[hidden\](.*?)\[/hidden\]#si', ' ', $text);
}
$text = descblockedript($text,false);
return $text;
}
function extra_bb_codes(){
$codelist = "";
$codelist .= "<input type='button' value='google' class='button' style='width:45px;' onblockedclick=\"addText('message', '[google]', '[/google]');\">";
$codelist .= "<input type='button' value='user id' class='button' style='width:45px;' onblockedclick=\"addText('message', '[user]', '[/user]');\">";
$codelist .= "<input type='button' value='hidden' class='button' style='width:45px;' onblockedclick=\"addText('message', '[hidden]', '[/hidden]');\">";
return $codelist;
}
This adds 2 new buttons in the post reply or comment tabs with a hidden userid and google.
Hidden makes it so only admins can see it and the postie.
User id makes a quick way to link someone to a user here at hbh by just putting in their id #.
Google will search google.com for w/e you put within the bb code.
|
|
| Author |
RE: New BB Code |
mozzer
Member

Posts: 339
Location: Password Land
Joined: 21.01.06 Rank: God |
|
I was also thinking of new BB Code but mine was for PHP code tags.
I prefer it when it highlight strings.
I will be back |
|
| Author |
RE: New BB Code |
Arto_8000
Member
Posts: 275
Location:
Joined: 28.03.06 Rank: HBH Guru |
|
I dunno what are the other filter that are use for this forum but just by looking at the code i could say that if i put this it would work.
[google]</a><a href="New Link Here">Text[/google]
you shouldn't use "." in you're regular expresblockedsion.
♥♣♦♠ PHP/Javascblockedript/AJAX, XSLT/XML, CSS Design, Javascblockedript POO, PHP 5 POO, SQL, Java (Swing & Servlet), C, C++, ASM, Forth ♥♣♦♠
If you need help in any domain that I have listed, I can help you. |
|
| Author |
RE: New BB Code |
[removed]
Banned
Posts: 0
Location:
Joined: 17.12.04 Rank: HBH Guru Warn Level: 100
|
|
the code works. im just suggesting it for hbh now. 
|
|
|
|
|