How To: Curse Item Tooltip on your forums

phpBB 2.0.X BB CodeEdit

For those of you using phpbb 2.0.x

Open /includes/bbcode.php


// [i] and [/i] for italicizing text. 
$text = str_replace("[i:$uid]", $bbcode_tpl['i_open'], $text); 
$text = str_replace("[/i:$uid]", $bbcode_tpl['i_close'], $text);


// [item]Items[/item] code.. 
$text = str_replace("[item:$uid]", $bbcode_tpl['item_open'], $text); 
$text = str_replace("[/item:$uid]", $bbcode_tpl['item_close'], $text);


// [i] and [/i] for italicizing text. 
$text = preg_replace("#\[i\](.*?)\[/i\]#si", "[i:$uid]\\1[/i:$uid]", $text);


// [item]Item/item code.. 
$text = preg_replace("#\[item\](.*?)\[/item\]#si", "[item:$uid]\\1[/item:$uid]", $text);

In your templates folder.. open bbcode.tpl


<a href="mailto:{EMAIL}">{EMAIL}</a>


<!-- BEGIN item_open --><script type="text/javascript" src="<!-- END item_open -->
<!-- BEGIN item_close -->/tooltip.js"></script><!-- END item_close -->

In your templates folder.. open posting_body.tpl


bbtags = new Array('[b]','[/b]','[i]','[/i]','[u]','[/u]','[quote]','[/quote]','[code]','[/code]','[list]','[/list]','[list=]','[/list]',



in before the last bracket, so for example above would read:

bbtags = new Array('[b]','[/b]','[i]','[/i]','[u]','[/u]','[quote]','[/quote]','[code]','[/code]','[list]','[/list]','[list=]','[/list]',

That should be all that's necessary on default phpbb installation, although if you are using any other MODS, in particular related to bbcode then the above may need to be altered.


Postnuke phpbb 2 BB CodeEdit

heres the PNphpBB2 implementation of the bbcode for the Postnuke integrated version of phpBB2.

It requires the Multiple BBCode Buttons Organizer Mod which for the buttons to appear above the posting dialog (this mod is available freely from

Since the instructions are very detailed and ive found that most forums will destroy the scripting ill just link it to my download section of my guild forum. If any curse representivie feels like posting it in their download section i give them my permission.

This is the link (its a text file with instructions compressed in a zip file)

vBulletin VBCodeEdit

Using vBulletin create the following bbcode

<script type="text/javascript" src="{param}/tooltip.js"></script>

then set the tag to something like [vgdb_][_/vgdb] (without the underscores) and just insert the number in between the two tags. Job done.

MyBB 1.2.x MyCodeEdit

  • To add the item link function to MyBB 1.2.x first login to your administration panel
  • Next you must scroll down the menu that is located on the left till you see the box that says "Message Filters"
  • Now click on the link that says Custom MyCode
  • now on the page that loaded on the right, look for the button on the right towards the top that says Add MyCode and click it
  • Now a form will pop up for you to add the custom bbcode.
    • first thing you must do is set the MyCode Title, set it to Item or Curse item or whatever you want(not that important what you call it)
    • Now in the description put in what the BBCode does (in this class I put "Links a Curse-Gaming Item." You can do something more descriptive or leave it blank.
    • Next in the Regular Expression box you must put in the code exactly as follows
\[item\](.*?)\[ /item\]
    • The final thing you must do before you submit is in the replacement field put:
<script type="text/javascript" src="$1/tooltip.js">item not loaded</script>[ /item\]
  • Now make sure your MyCode is activated (click the appropriate radio button) and then hit the "Insert MyCode" button to add it
  • You are all set, just use the syntax of
[item]ItemNumber[ /item]
in any of your posts and it should work fine :)