https://www.icyphoenix.com/viewtopic.php?f=35&t=6387 ----------------------------------- glitchies Sat 29 Aug, 2009 06:36 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 [url=http://www.phpbb.com/community/viewtopic.php?f=70&t=576155]here. but will post the code that i have gotten to work so far here. in the overall_header.tpl i have put [code linenumbers=false]// // ]]> [/code] and in bbcode.tpl i have put this where it should be (i think, it is with all the other ones.) [codeblock]'wow' => array('nested' => true, 'inurl' => true, 'allow_empty' => false),[/codeblock] and [code linenumbers=false] // WOW if($tag === 'wow') { if($this->is_sig && !$board_config['allow_all_bbcode']) { return $error; } $html = '[' .$content. ']'; return array( 'valid' => true, 'html' => $html, 'allow_nested' => false, ); } [/code] 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. [codeblock]Add a New BBCODE On BBCode Textarea put: [char={TEXT1}]{TEXT2}[/char] On replacement textarea put: <{TEXT1}: {TEXT2}> ]]>[/codeblock] 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 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 Re: Setting Up A Bbcode That Has A Mouse Over Effect ----------------------------------- [strike]i will set up a test site later tonight, at work right now.[/strike] 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 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 [codeblock][char={TEXT1}]{TEXT2}[/char] [/codeblock] no, IP doesnt use the {TEXT} var, so when i go to put in the HTML of [codeblock]<{TEXT1}: {TEXT2}>[/codeblock] 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 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: [codeblock] // 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 = '' . $text_one; return array( 'valid' => true, 'start' => $html, 'end' => '', ); }[/codeblock] ----------------------------------- Lopalong Sat 12 Sep, 2009 13:20 Re: Setting Up A Bbcode That Has A Mouse Over Tooltip Effect ----------------------------------- [b]Edit:[/b] 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: [tag={TEXT1}]{TEXT2}[/tag] 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 ([i]Not sure which[/i]), 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 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] UNINSTALL OLD VERSION FIRST 1. remove the directory wow/ and ajax_tooltip/ 2. open your "styles/prosilver/template/overall_header.html" 3. remove the old code: ]]> Adding Javascript and CSS header. ]]> ]]> ITEM BBCODE Enter in ACP Go to Messages TAB Go to BBCodes options Add a New BBCODE On BBCode Textarea put: [wow]{TEXT}[/wow] On replacement textarea put: * Note for EU.ARMORY you need to change the armory URL link to eu.wowarmory.com [{TEXT}] ]]> Save BBcode and try. CHAR BBCODE Enter in ACP Go to Messages TAB Go to BBCodes options Add a New BBCODE On BBCode Textarea put: [char={TEXT1}]{TEXT2}[/char] On replacement textarea put: <{TEXT1}: {TEXT2}> ]]> Save BBcode and try. [/spoiler] 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 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