Setting Up A Bbcode That Has A Mouse Over Tooltip Effect »  Show posts from    to     

Icy Phoenix


Old Support Topics - Setting Up A Bbcode That Has A Mouse Over Tooltip Effect



glitchies [ Sat 29 Aug, 2009 06:36 ]
Post subject: Setting Up A Bbcode That Has A Mouse Over Tooltip Effect
Ok, I get to go through all this again now that i upgraded to 13.*...

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
Code: [Hide] [Select]
// <![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>
// ]]>


and in bbcode.tpl i have put this where it should be (i think, it is with all the other ones.)
Code: [Hide] [Select]
'wow' => array('nested' => true, 'inurl' => true, 'allow_empty' => false),

and
Code: [Hide] [Select]
// 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,
);
}



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.

Code: [Hide] [Select]
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>&lt;{TEXT1}: {TEXT2}&gt;</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.


DWho [ Sat 29 Aug, 2009 14:24 ]
Post subject: Re: Setting Up A Bbcode That Has A Mouse Over Effect
Have you a link to what you have done sofar or are you editing locally...

and may sound stupid but you uploaded the JS files...

bbcode looks ok... but without seeing it working hard to see what is going on

:mrgreen: :mrgreen:


glitchies [ Sat 29 Aug, 2009 18:04 ]
Post subject: Re: Setting Up A Bbcode That Has A Mouse Over Effect
i will set up a test site later tonight, at work right now.

Ok, set up a test forum using the exact same prams that i have on my live server. (i know, i should ALWAYS do this first for testing... but how else will i know when i break the small things? lol)

ok, here is the site. pm me if you need more access.

http://iptesting.mymusings.info/


glitchies [ Tue 01 Sep, 2009 02:13 ]
Post subject: Re: Setting Up A Bbcode That Has A Mouse Over Tooltip Effect
Ok, tooltips aside (no i still cant get them working, i think the problem is in the .js) how do i manage something that has 2 variables?

this is the phpbb3 "Textarea" that i would put in if i was using it

Code: [Hide] [Select]
[char={TEXT1}]{TEXT2}[/char]


no, IP doesnt use the {TEXT} var, so when i go to put in the HTML of

Code: [Hide] [Select]
<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>&lt;{TEXT1}: {TEXT2}&gt;</strong></a>


what do i do for the $contents?

I have a feeling i am in WAY over my head on this mod...


Mighty Gorgon [ Sat 12 Sep, 2009 11:43 ]
Post subject: Re: Setting Up A Bbcode That Has A Mouse Over Tooltip Effect
Please provide original instructions for phpBB 3 and I'll try to help.

Here is a basic pattern BBCode you can use as a reference for other BBCode development:

Code: [Hide] [Select]
// MYBBCODE
if($tag === 'mybbc')
{
$extras = $this->allow_styling ? array('class') : array();
$text_one = (isset($item['params']['param']) ? $this->process_text($item['params']['param']) : false);
$html = '<span>' . $text_one;
return array(
'valid' => true,
'start' => $html,
'end' => '</span>',
);
}


Lopalong [ Sat 12 Sep, 2009 13:20 ]
Post subject: Re: Setting Up A Bbcode That Has A Mouse Over Tooltip Effect
Edit:


MMmmmm! I thought you were talking phpBB3 stuff in your post - Obviously after re-reading it - it's Icy Phoenix. :oops:

I'm glad I read this because I don't think that my question is off-topic even though I was going to start a thread on this. ;)

MG, at the moment we have $content which is the var for one insert into the html.

How can we create this type of format:

{TEXT2} etc, which I would assume would be replaced with $content1 and $content2 and even $content3 if possible?

I do recall other vars used such as \\1\\2\\3\\ or $1 $2 $3 for either phpBB or some other forum software etc (Not sure which), to parse multiple entries into the html, only I would have no idea how to do something like this that would work with bbCode.php

Can it be done?

:shock:


glitchies [ Thu 17 Sep, 2009 07:17 ]
Post subject: Re: Setting Up A Bbcode That Has A Mouse Over Tooltip Effect
ok, this is taken from the install.xml for the phpbb3 mod. obviously there are things that just wont work the same, but i am thinking there should be a way to make it work.

Spoiler: [ Show ]


could it be an issue with the 'tooltip.show' class? or is there even a thing in IP? maybe that is my issue... i can get it to query correctly. the link works, i just dont get the mouseover tooltip.


Lopalong [ Thu 17 Sep, 2009 08:20 ]
Post subject: Re: Setting Up A Bbcode That Has A Mouse Over Tooltip Effect
Have you looked here, because it includes how to add buttons and help lines?

http://www.icyphoenix.com/viewtopic.php?p=44061#p44061




Powered by Icy Phoenix