Follow us on Twitter!
Don't judge the unknown - Grindordie
Thursday, April 17, 2014
Navigation
Home
HellBoundHackers Main:
HellBoundHackers Find:
HellBoundHackers Information:
Learn
Communicate
Submit
Shop
Challenges
HellBoundHackers Exploit:
HellBoundHackers Programming:
HellBoundHackers Think:
HellBoundHackers Track:
HellBoundHackers Patch:
HellBoundHackers Other:
HellBoundHackers Need Help?
Other
Members Online
Total Online: 25
Guests Online: 22
Members Online: 3

Registered Members: 82818
Newest Member: Ahmed
Latest Articles
View Thread

HellBound Hackers | HellBound Hackers | Comments and Suggestions

Author

New BB Code


Member

Your avatar

Posts:
Location:
Joined: 01.01.70
Rank:
Guest
Posted on 03-08-06 19:16
Code
// 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 = descript($text,false);

   return $text;
}

function extra_bb_codes(){
$codelist = "";
$codelist .= "<input type='button' value='google' class='button' style='width:45px;' onClick=\"addText('message', '[google]', '[/google]');\">";
$codelist .= "<input type='button' value='user id' class='button' style='width:45px;' onClick=\"addText('message', '[user]', '[/user]');\">";
$codelist .= "<input type='button' value='hidden' class='button' style='width:45px;' onClick=\"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


Member

Your avatar

Posts:
Location:
Joined: 01.01.70
Rank:
Guest
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.


Author

RE: New BB Code


Member

Your avatar

Posts:
Location:
Joined: 01.01.70
Rank:
Guest
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 expression.


Author

RE: New BB Code


Member

Your avatar

Posts:
Location:
Joined: 01.01.70
Rank:
Guest
Posted on 03-08-06 21:52
the code works. im just suggesting it for hbh now. Grin