Join us at IRC!
Understanding is the answer, hatred is the problem, and hackers are the slaves abused and destroyed in the process of peace online - Deshouleres
Friday, May 25, 2012
Navigation
Members Online
Total Online: 32
Web Spiders: 15
Guests Online: 31
Members Online: 1

Registered Members: 70208
Newest Member: andresuran
Latest Articles
View Thread

HellBound Hackers | HellBound Hackers | Comments and Suggestions

Author

New BB Code

[removed]
Banned

Posts: 0
Location:
Joined: 17.12.04
Rank:
HBH Guru
Warn Level: 100
Posted on 03-08-06 19:16
// 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
Posted on 03-08-06 19:26
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
Posted on 03-08-06 21:24
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
Posted on 03-08-06 21:52
the code works. im just suggesting it for hbh now. :D


Guest
Username

Password

Remember Me


Bookmark This Page
Affiliates
Adverts

 

 

Links
By using, viewing or obtaining any information contained on this site, you agree to the disclaimer.

© HellBound Hackers 2008- 2009. Since 3rd December 2004.