for some reason the mods that i made for 12.* are not working in the new ver. so i have to get help figureing this out again.
I am trying to convert a phpbb3 mod to work with IP. and i will hopefully have most of it figured out, but am having difficulties with the actual basic function of it. it is a tooltip mouseover for world of warcraft items and characters. the mod is here. but will post the code that i have gotten to work so far here.
in the overall_header.tpl i have put
// <![CDATA[
<link href="wowarmory_tooltip/style.php" rel="stylesheet" type="text/css" title="wow" />
<script language="JavaScript" src="wowarmory_tooltip/js/qtip.js" type="text/JavaScript"></script>
<script language="JavaScript" src="wowarmory_tooltip/js/tw-sack.js" type="text/JavaScript"></script>
<script language="JavaScript" src="wowarmory_tooltip/js/ajax-dynamic-content.js" type="text/JavaScript"></script>
// ]]>
<link href="wowarmory_tooltip/style.php" rel="stylesheet" type="text/css" title="wow" />
<script language="JavaScript" src="wowarmory_tooltip/js/qtip.js" type="text/JavaScript"></script>
<script language="JavaScript" src="wowarmory_tooltip/js/tw-sack.js" type="text/JavaScript"></script>
<script language="JavaScript" src="wowarmory_tooltip/js/ajax-dynamic-content.js" type="text/JavaScript"></script>
// ]]>
and in bbcode.tpl i have put this where it should be (i think, it is with all the other ones.)
'wow' => array('nested' => true, 'inurl' => true, 'allow_empty' => false),
and
// WOW
if($tag === 'wow')
{
if($this->is_sig && !$board_config['allow_all_bbcode'])
{
return $error;
}
$html = '<a href="http://www.wowarmory.com/search.xml?searchQuery=' .$content. '&searchType=items" target="new" onmouseover="tooltip.show("wowarmory_tooltip/item.php?v=' .$content. '");return false" onmouseout="tooltip.hide();"><strong><img src="wowarmory_tooltip/images/wow.png" border="0">[' .$content. ']</strong></a>';
return array(
'valid' => true,
'html' => $html,
'allow_nested' => false,
);
}
if($tag === 'wow')
{
if($this->is_sig && !$board_config['allow_all_bbcode'])
{
return $error;
}
$html = '<a href="http://www.wowarmory.com/search.xml?searchQuery=' .$content. '&searchType=items" target="new" onmouseover="tooltip.show("wowarmory_tooltip/item.php?v=' .$content. '");return false" onmouseout="tooltip.hide();"><strong><img src="wowarmory_tooltip/images/wow.png" border="0">[' .$content. ']</strong></a>';
return array(
'valid' => true,
'html' => $html,
'allow_nested' => false,
);
}
now, i am pretty sure the bbcode part is working right, cause it parses the code and gives me the link right, but i dont get the tooltip like i should. any quick ideas as to what my tooltip problem is?
oh, there is a second issue... one that i have no idea how to set up. there is a second part to this mod, to lookup characters too, but that has 2 variables... so the $content thing doesnt work.
here is the phpbb3 code for that part.
Add a New BBCODE
On BBCode Textarea put:
[char={TEXT1}]{TEXT2}[/char]
On replacement textarea put:
<![CDATA[
<img src='wowarmory_tooltip/images/char.gif' border='0' align='middle'><a href="http://www.wowarmory.com/character-sheet.xml?r={TEXT1}&n={TEXT2}" target="new" onmouseover='tooltip.show("wowarmory_tooltip/char.php?v={TEXT2}&z={TEXT1}");' onmouseout='tooltip.hide();'><strong><{TEXT1}: {TEXT2}></strong></a>
]]>
On BBCode Textarea put:
[char={TEXT1}]{TEXT2}[/char]
On replacement textarea put:
<![CDATA[
<img src='wowarmory_tooltip/images/char.gif' border='0' align='middle'><a href="http://www.wowarmory.com/character-sheet.xml?r={TEXT1}&n={TEXT2}" target="new" onmouseover='tooltip.show("wowarmory_tooltip/char.php?v={TEXT2}&z={TEXT1}");' onmouseout='tooltip.hide();'><strong><{TEXT1}: {TEXT2}></strong></a>
]]>
i wish there was a nice function or mod to add bbcodes likes there is in phpbb3, but i like IP way to much to switch to it just because of that reason. i would rather struggle and learn with this.