ArcEmu: [Release]ItemTooltip for custom DB - ArcEmu

Jump to content

Toggle shoutbox Lastest Announcements

dfighter  : (07 December 2014 - 12:06 PM) Arcemu is in hibernation mode, please read http://arcemu.org/fo...showtopic=26903
dfighter  : (01 January 2013 - 05:56 PM) Arcemu wishes you all a happy new year!
Hasbro  : (12 September 2012 - 10:01 AM) Please excuse our outage from the web! Our web host had a major malfunction!
dfighter  : (01 September 2012 - 04:05 PM) Since the spam bots just don't want to stop, I've enabled admin verification when registering.
dfighter  : (23 January 2012 - 09:56 PM) Please note that from now on you will need to confirm your email on the wiki in order to edit it!
Hasbro  : (31 December 2011 - 12:50 PM) Happy New Years all!
Navid  : (26 December 2011 - 04:09 AM) Merry Christmas !!!!!! Happy holidays all :)
WAmadeus  : (24 December 2011 - 03:54 PM) Merry Christmas to all!
dfighter  : (24 December 2011 - 11:05 AM) The Arcemu team wishes y'all a Merry Christmukkah!
Hasbro  : (05 October 2011 - 12:53 PM) Looking for web designers for upcoming web related project. If you're interested in designing user interfaces contact me
dfighter  : (02 September 2011 - 03:47 PM) So who here wants vehicles in Arcemu? :P http://arcemu.org/fo...showtopic=25440
Hasbro  : (14 August 2011 - 03:25 PM) Join us on irc, grab an irc client and connect to irc.freenode.net join channel #arcemu /server irc.freenode.net:6667 /join #arcemu
jackpoz  : (03 August 2011 - 05:33 AM) to all Lua Engine (old one) users: please check http://arcemu.org/fo...showtopic=25274
Hasbro  : (20 May 2011 - 05:27 PM) Looking for people experienced with CMake configuration and setup! Contact me asap
Hasbro  : (15 May 2011 - 05:03 PM) ArcEmu is recruiting C++ programmers, contact Hasbro if interested.
paroxysm  : (03 May 2011 - 06:26 PM) Updated luabridge gossip example to describe the whole gossip creation process rather than just how to create menu. Gossip tutorial
paroxysm  : (23 April 2011 - 11:35 AM) Lua writers can refer to the Luabridge Tutorials section in the Wiki to learn how to write gossip code correctly.
Hasbro  : (20 April 2011 - 05:22 PM) Thank you for your continuous contribution of bug reports, we are working on them.
Hasbro  : (17 April 2011 - 03:20 AM) Please consider donating to support our bills. Donations can be sent using PayPal to donations@arcemu.org - Thank you for your support.
paroxysm  : (10 April 2011 - 12:43 AM) Refer to the Luabridge Tutorials section in the Wiki to learn the new syntax of luabridge.
Resize Shouts Area

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

[Release]ItemTooltip for custom DB

#1 User is offline   chriser 

  • Member
  • Pip
  • Group: Members
  • Posts: 55
  • Joined: 25-August 08
  • Gender:Male
  • Location:Augsburg

Posted 08 June 2009 - 02:37 PM

ItemTooltip

Features:
  • Locale System(de,en)
  • Icons
  • Sellprice
  • Sets (due to database leaks some new sets are bugged)
  • Socketbonus
  • Spells (->need values)
  • Feral Attack Power
  • Heroic Flag
  • Glyph Flag
  • Completely rewritten code (still in progress)
  • Wowhead links for Sets and Spells.
  • Debug mode


Features to come:
  • Include Required Faction
  • Correct display of Heirlooms
  • Maybe: Armory like Wowhead
  • Javascript to display item without tooltip


How to Install:

  • Batch the SQL-File in your DB.
  • Edit the <config.inc.php>
  • Copy the following into the <head> TAG of your homepage:
    <script type="text/javascript" src="js/ajax-dynamic-content.js"></script>
    <script type="text/javascript" src="js/ajax.js"></script>
    <script type="text/javascript" src="js/ajax-tooltip.js"></script>
    

    If you want to have colored itemnames, you have to include this too.
    <link rel="stylesheet" type="text/css" href="css/tooltip-base.css">
    

  • Now you are able to show an itemtooltip on your homepage with the following code:
    <span class='qX'> <!-- X = Quality of the Item -->
    <a href="" onmouseover="ajax_showTooltip('showitem.php?item=ITEMID',this);return false" onmouseout="ajax_hideTooltip()">
    [ITEMNAME]</a>
    </span> <!-- Quality end -->
    


    The <a> TAG is a MUST HAVE, the <span> TAG is optional (only for colored items)
  • To get the icons working you have to put the "icons" folder at the same location where "showitem.php" is located.


Working Demo: (WhyDB Rev150 Changeset101 Version3.3.5a)
Tooltip
Comparison to Wowhead and Debug mode



Download:
Attached File  button_download.gif (2.36K)
Number of downloads: 19itemtooltip.rar
Attached File  button_download.gif (2.36K)
Number of downloads: 19icons.rar

Please feedback and report any bugs.

To Devs:
I would REALLY appreciate if someone knows how to parse the variables in spell.dbc or if someone will help me to wirte a small extractor for that.
I also need some help regarding new improvements/features. I'll wirte my final exams in May, so i won't have a lot of time.



ToDo:
*Fix Heirlooms to display correct stats (->ScalingStatDistribution.dbc and ScalingStatValues.dbc)
*Fix Itemsets (in itemset db)
*Fix Spelltexts (-> spell.dbc)


Changelog:
=====================V 0.3.1=====================
Fixed icon issue.
======================V 0.3======================
Added lots of stuff:
*Sets
*Wowhead links
*Sellprice
*Socketbonus
*Glyph/Heroic Flag
*Feral Attack Power
*Some bug fixes
*Major code rewrite
======================V 0.2======================
Added Icons
======================V 0.1======================
Release


Thanks to Axe for his initial work.
Thanks to Gregory Wild-Smith from Twilight Universe for the ajax-tooltip.
Thanks to WhyDB for the Database.
And at least: THANKS ArcEmu :)

Attached File(s)


1

#2 User is offline   Tenchuu 

  • Member
  • Pip
  • Group: Members
  • Posts: 29
  • Joined: 15-July 08

Posted 10 June 2009 - 03:25 AM

Seems nice, any live demo?

Greets
0

#3 User is offline   chriser 

  • Member
  • Pip
  • Group: Members
  • Posts: 55
  • Joined: 25-August 08
  • Gender:Male
  • Location:Augsburg

Posted 10 June 2009 - 06:00 AM

<!--quoteo(post=73122:date=Jun 10 2009, 10:25 AM:name=Tenchuu)--><div class='quotetop'>QUOTE (Tenchuu @ Jun 10 2009, 10:25 AM) <a href="index.php?act=findpost&pid=73122"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->Seems nice, any live demo?

Greets<!--QuoteEnd--></div><!--QuoteEEnd-->

PS: Tenchuu, are you from god-network?
0

#4 User is offline   Tenchuu 

  • Member
  • Pip
  • Group: Members
  • Posts: 29
  • Joined: 15-July 08

Posted 10 June 2009 - 02:59 PM

Jeah i am ;)

And nice :)
When the icons are added it will be even greater ^^

Greets
0

#5 User is offline   Bob Herman 

  • Interested
  • PipPipPipPip
  • Group: Members
  • Posts: 452
  • Joined: 11-October 08
  • Gender:Male

Posted 10 June 2009 - 06:37 PM

View PostTenchuu, on Jun 10 2009, 08:59 PM, said:

Jeah i am ;)

And nice :)
When the icons are added it will be even greater ^^

Greets


You can do the icons yourself, manually. You just need to find the image of the icon you want on wowhead, and then just link it. So instead of:

<a href="" onmouseover="ajax_showTooltip('showitem.php?item=ITEMID',this);return false" onmouseout="ajax_hideTooltip()">
[ITEMNAME]</a>


You could have:

<a href="" onmouseover="ajax_showTooltip('showitem.php?item=ITEMID',this);return false" onmouseout="ajax_hideTooltip()">
<img src="wowhead.com/images/randomicon.jpg"></img></a>

0

#6 User is offline   Tenchuu 

  • Member
  • Pip
  • Group: Members
  • Posts: 29
  • Joined: 15-July 08

Posted 10 June 2009 - 07:47 PM

no not really ^^ because it shall be used for custom items too (and thatīs what i am interested in btw ...)

i think the problem is that you only have the itemid of the custom item, with this itemid you could read up the displayid of the item in the database and compare it with the "original" item's and find an original itemid which item you can find in wowhead and than, link the icon from that "fake"item...

however, itīs quite some work ^^


Greets
0

#7 User is offline   chriser 

  • Member
  • Pip
  • Group: Members
  • Posts: 55
  • Joined: 25-August 08
  • Gender:Male
  • Location:Augsburg

Posted 11 June 2009 - 01:46 PM

I added now icons, but our root has went down....
I'll upload it onto my old ftp of my old project, so youll have the new files in about 10 mins.

PS: The icon.php file is about 2.2 mb, no i have not written it by myself, i made a script in c# which read it out of my db... i think i wont describe it more =)
0

#8 User is offline   Bob Herman 

  • Interested
  • PipPipPipPip
  • Group: Members
  • Posts: 452
  • Joined: 11-October 08
  • Gender:Male

Posted 12 June 2009 - 01:12 PM

One more thing. Whoever wrote the script left a major flaw. The anchor tag from which the tooltip comes up from uses both " and ' because of the javascript. So if I had an item called "Bob's Hammer" I would get an error. Fixing that would be a pain in the ass, but could you? :)

P.S. if you want, I can make a tut on how to install this on phpBB boards.
0

#9 User is offline   chriser 

  • Member
  • Pip
  • Group: Members
  • Posts: 55
  • Joined: 25-August 08
  • Gender:Male
  • Location:Augsburg

Posted 13 June 2009 - 07:45 AM

I tested it, you dont get an error =)
Un'Goro Soil : 11018

It would be cool if you can make one, im too lazy to do =)
Please send it to me, ill edit it in my first post then =)
0

#10 User is offline   HalestormXV 

  • The Ultimatum
  • PipPipPipPipPipPip
  • Group: Members
  • Posts: 1,031
  • Joined: 07-June 08
  • Gender:Male

Posted 13 June 2009 - 12:32 PM

View PostBob Herman, on Jun 12 2009, 02:12 PM, said:

One more thing. Whoever wrote the script left a major flaw. The anchor tag from which the tooltip comes up from uses both " and ' because of the javascript. So if I had an item called "Bob's Hammer" I would get an error. Fixing that would be a pain in the ass, but could you? :D

P.S. if you want, I can make a tut on how to install this on phpBB boards.


He is correct. This error does occur and would be great to be fixed.

On a side note keep this up and i might have to sticky this release :)

Also, you seem to have forgotten to give a tut on how to use the icons. Example where the icons folder goes, if the script needs to be updated etc.
**Owner of the Serenade of Sorrow Funserver**
My Most Recent Video: The Book of Kidou
Posted Image
0

#11 User is offline   Bob Herman 

  • Interested
  • PipPipPipPip
  • Group: Members
  • Posts: 452
  • Joined: 11-October 08
  • Gender:Male

Posted 17 June 2009 - 12:07 PM

The english version uses "Speed" instead of "tempo". That's a really easy fix. Go to line 209 of the showitem.php and change it too:

	if(lang == "de") { //Fixed by Maverfax
		echo "<span style='float:left;'>$dmg1min - $dmg1max $str$locale[damage]</span><span style='float:right;'>Tempo "; } else {
		echo "<span style='float:left;'>$dmg1min - $dmg1max $str$locale[damage]</span><span style='float:right;'>Speed "; }


And where do you put the icons directory? It seems like it should be at the root directory of the index.php, but it doesn't work...
0

#12 User is offline   chriser 

  • Member
  • Pip
  • Group: Members
  • Posts: 55
  • Joined: 25-August 08
  • Gender:Male
  • Location:Augsburg

Posted 19 June 2009 - 06:53 AM

ahh sry, it have to be where your showitem.php is located, for example when you have placed your showitem.php /htdocs/itemtooltip then the icons have to be in htdocs/itemtooltip/icons/<ICONS>.png

Sorry forgot that to do...

echo "<span style='float:left;'>$dmg1min - $dmg1max $str$locale[damage]</span><span style='float:right;'>ī$locale[speed] ";


That would be correct...
0

#13 User is offline   Bob Herman 

  • Interested
  • PipPipPipPip
  • Group: Members
  • Posts: 452
  • Joined: 11-October 08
  • Gender:Male

Posted 20 June 2009 - 09:07 AM

View Postchriser, on Jun 19 2009, 12:53 PM, said:

echo "<span style='float:left;'>$dmg1min - $dmg1max $str$locale[damage]</span><span style='float:right;'>ī$locale[speed] ";


That would be correct...


Same thing, just a different way of doing it...

EXCEPT did you make a new variable $Local[speed] for that? Because your way won't work unless whoever uses it ALSO makes that variable (if it is a new variable.)
0

#14 User is offline   chriser 

  • Member
  • Pip
  • Group: Members
  • Posts: 55
  • Joined: 25-August 08
  • Gender:Male
  • Location:Augsburg

Posted 26 June 2009 - 03:18 PM

I declared the variable $locale[speed] before, i just forgot to change 'tempo' to '$locale[speed]'...
Please dont forget to post any bugs/ideas =)
Thanks
0

#15 User is offline   McRaideR 

  • Member
  • Pip
  • Group: Members
  • Posts: 16
  • Joined: 01-December 09

Posted 13 January 2011 - 01:39 AM

Thanks for this i really needed something like this i was trying to make my own but failing. tho icons dont seem to be working for me.
0

#16 User is offline   chriser 

  • Member
  • Pip
  • Group: Members
  • Posts: 55
  • Joined: 25-August 08
  • Gender:Male
  • Location:Augsburg

Posted 13 January 2011 - 09:01 AM

hmm, i think i just realised why icons wont work... i think they need the absolute url path and not the relative path. I'll fix this right now.
Greetz
chriser
Edit: should be fixed now, new variable in config.inc.php!
define("path", "http://localhost/itemtooltip"); // FULL PATH of the itemtooltip folder (e.g. http://localhost/itemtooltip)

Just redownload it.
0

#17 User is offline   Navid 

  • Persian Prance of ArcEmu
  • Group: Super Moderator
  • Posts: 718
  • Joined: 30-June 09
  • IRC:Lurker-
  • Gender:Male
  • Location:Iran
  • Interests:PHP,C++,ArcEmu and exactly our lovely community and specially money xD
  • Server OS:Windows

Posted 13 January 2011 - 06:46 PM

Quote

To Devs:
I would REALLY appreciate if someone knows how to parse the variables in spell.dbc or if someone will help me to wirte a small extractor for that.

We had an extractor on our ArcManager Project and it calls CoreManager now,you can get it from the svn ,and about the parse ,just get the dataz from the extracted files .
I'm here to check,lurk and kill you so behave or you will be lurked

Posted Image
0

#18 User is offline   chriser 

  • Member
  • Pip
  • Group: Members
  • Posts: 55
  • Joined: 25-August 08
  • Gender:Male
  • Location:Augsburg

Posted 14 January 2011 - 02:00 AM

View PostLurker, on 13 January 2011 - 06:46 PM, said:

[/size][/color]
We had an extractor on our ArcManager Project and it calls CoreManager now,you can get it from the svn ,and about the parse ,just get the dataz from the extracted files .

Thank you, i'll check it out.
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users