Embedding whole "tool tip" into page

This mod will allow any part of DragonFly that uses bbcode to be able to use ItemStats
No longer maintained

Embedding whole "tool tip" into page

Postby Pugro » Fri Jun 29, 2007 5:12 pm

I was thinking last night that as well as the option to embeded the item image or the item as a link with a tooltop with details, it would be cool to be able to embed the popup that is generated into a page instead.

So you get the nice black box with details in the actual page, much like WoWWiki does for loot tables etc.

Anyone done this before I run out and start tinkering :D

Pugs_
--------------------------------
Pugro_
Ice and Trinity Guilds, Nordrassil, EU PvE
www.iceguild.org.uk, www.trinityguild.net
Image
Pugro
WR.net Journeyman
WR.net Journeyman
 
Posts: 79
Joined: Fri Jul 07, 2006 2:14 pm
Location: London, UK

Embedding whole "tool tip" into page

Postby Pugro » Fri Jun 29, 2007 6:50 pm

Actually, dont worry, done it now..

For those interested...updated df_itemstats.php:

Code: Select all
      while (preg_match('#\[(item)(=[0-5])?\](.+?)\[/item\]#s', $message, $match) OR preg_match('#\[(itemico)(=[0-5])?\](.+?)\[/itemico\]#s', $message, $match) OR preg_match('#\[(itembox)(=[0-5])?\](.+?)\[/itembox\]#s', $message, $match))


note the extra third option on the preg match, for "itembox"

also itemstats.php where it started:

Code: Select all
if ($type == 'item')


I added an extra if clause about it like so:

Code: Select all
       if ($type == 'itembox')
      {
            //echo "In itembox<br/>" ;
   $item_html = $this->getItemHtml($item_name);
      }
      else
      {
          #####existing code
      }
      {


Seems to work for me, still get a tooltop, but I'm not too bothered.

Pugs_
Last edited by Pugro on Mon Aug 20, 2007 1:25 pm, edited 1 time in total.
--------------------------------
Pugro_
Ice and Trinity Guilds, Nordrassil, EU PvE
www.iceguild.org.uk, www.trinityguild.net
Image
Pugro
WR.net Journeyman
WR.net Journeyman
 
Posts: 79
Joined: Fri Jul 07, 2006 2:14 pm
Location: London, UK

Embedding whole "tool tip" into page

Postby zanix » Sat Jun 30, 2007 1:20 am

Nice
Read the Forum Rules, the WiKi, and Search before posting!
WoWRoster v2.1 - SigGen v0.3.3.523 - WoWRosterDF
User avatar
zanix
Admin
Admin
WoWRoster.net Dev Team
WoWRoster.net Dev Team
UA/UU Developer
UA/UU Developer
 
Posts: 5546
Joined: Mon Jul 03, 2006 8:29 am
Location: Idaho Falls, Idaho
Realm: Doomhammer (PvE) - US

Embedding whole "tool tip" into page

Postby Decap » Mon Aug 20, 2007 8:03 am

Could you give a little bit more detailed tutorial? I pasted
Code: Select all
while (preg_match('#\[(item)(=[0-5])?\](.+?)\[/item\]#s', $message, $match) OR preg_match('#\[(itemico)(=[0-5])?\](.+?)\[/itemico\]#s', $message, $match) OR preg_match('#\[(itembox)(=[0-5])?\](.+?)\[/itembox\]#s', $message, $match))
into df_itemstats.php and it got an error, lol.
Decap
WR.net Apprentice
WR.net Apprentice
 
Posts: 5
Joined: Thu Aug 09, 2007 4:45 am

Embedding whole "tool tip" into page

Postby Pugro » Mon Aug 20, 2007 1:24 pm

What was the error? Attached are my files.
Attachments
itemstats.zip
(5.54 KiB) Downloaded 403 times
--------------------------------
Pugro_
Ice and Trinity Guilds, Nordrassil, EU PvE
www.iceguild.org.uk, www.trinityguild.net
Image
Pugro
WR.net Journeyman
WR.net Journeyman
 
Posts: 79
Joined: Fri Jul 07, 2006 2:14 pm
Location: London, UK

Embedding whole "tool tip" into page

Postby Mokane » Tue Aug 21, 2007 10:37 am

This just started happening the other day. Anytime i link something with itemstats I now have to click it to make it update the page? I never had to do this before. Any one know the reason for this?
Mokane
WR.net Apprentice
WR.net Apprentice
 
Posts: 5
Joined: Fri Mar 30, 2007 8:54 pm

Embedding whole "tool tip" into page

Postby Pugro » Tue Aug 21, 2007 1:27 pm

Double check the automatic_search flag in the custom config table...could try hard coding it in the config_itemstats.php file to check it's the flag and not the actual software that's the issue?
--------------------------------
Pugro_
Ice and Trinity Guilds, Nordrassil, EU PvE
www.iceguild.org.uk, www.trinityguild.net
Image
Pugro
WR.net Journeyman
WR.net Journeyman
 
Posts: 79
Joined: Fri Jul 07, 2006 2:14 pm
Location: London, UK

Embedding whole "tool tip" into page

Postby Decap » Wed Aug 22, 2007 12:40 pm

Alright.. I just replaced the original files and started over. I was putting the code in the wrong are. Thanks, and great job.
Decap
WR.net Apprentice
WR.net Apprentice
 
Posts: 5
Joined: Thu Aug 09, 2007 4:45 am

Embedding whole "tool tip" into page

Postby Pugro » Wed Aug 22, 2007 1:29 pm

'twas hardly nothin', glad you got it working :)
--------------------------------
Pugro_
Ice and Trinity Guilds, Nordrassil, EU PvE
www.iceguild.org.uk, www.trinityguild.net
Image
Pugro
WR.net Journeyman
WR.net Journeyman
 
Posts: 79
Joined: Fri Jul 07, 2006 2:14 pm
Location: London, UK


Return to ItemStatsDF

Who is online

Users browsing this forum: No registered users and 1 guest

cron