phpBB Forum

It is currently Wed 23. May 2012, 17:11

All times are UTC + 1 hour

Forum rules


Hello dearest user and welcome to our EQDKP-Plus support forum.

Please read the following rules and terms before posting anything! Failure in doing so will result in being ignored or being banned. Posting in our boards means you have read, understood and accepted those rules.

English Board Rules – Click here



Post new topic Reply to topic  [ 17 posts ]  Go to page Previous  1, 2
Author Message
Offline
 Post subject: Re: Need some PHP Help
PostPosted: Thu 14. Apr 2011, 08:02 

Joined: Mon 31. Jan 2011, 08:22
Posts: 23
Can you please tell me where in which file I would want to put this code except to work with rift.zam.com?

Thanks



Top
 Profile  
 
Offline
 Post subject: Re: Need some PHP Help
PostPosted: Thu 14. Apr 2011, 08:24 

Joined: Mon 31. Jan 2011, 08:22
Posts: 23
darkmaeg wrote:
This works:

<a href='http://eq2.zam.com/wiki/EQ2_Item:".rawurlencode($item['name'])."'>".$html->itemstats_item(stripslashes($item['name']))."</a>

So basically this will convert the item to a tooltip instead of a link to the item's page on eqdkp-plus. All you have to do is add this to the footer page before </body> :

<script type="text/javascript" src="http://common.allakhazam.com/shared/zampower.js"></script>


K tried a few ways. Can't seem to find what I edit to make this function. I put the above in the template which of course didn't work then I put it in listitems.php which again didn't work :( not much of a coder so where do I want to add this ?



Top
 Profile  
 
Online
 Post subject: Re: Need some PHP Help
PostPosted: Fri 15. Apr 2011, 04:01 

Joined: Sat 7. Mar 2009, 07:36
Posts: 117
Quote:
K tried a few ways. Can't seem to find what I edit to make this function. I put the above in the template which of course didn't work then I put it in listitems.php which again didn't work :( not much of a coder so where do I want to add this ?


OK this goes in your templates/whichevertemplate/page_tail.html right before </body>

<script type="text/javascript" src="http://common.allakhazam.com/shared/zampower.js"></script>


Now edit lastitems/module.php

change all this
$out .= '<tr class="'.$class.'" nowrap onmouseover="this.className=\'rowHover\';" onmouseout="this.className=\''.$class.'\';">'.
"<td>
<a href='{$eqdkp_root_path}viewitem.php?i=". $item['id']."'>".$html->itemstats_item(stripslashes($item['name']),$item['game_itemid'])."</a> <br>".
get_coloredLinkedName($item['looter']).' ('.$item['value'].' DKP)
</td>

to this

$out .= '<tr class="'.$class.'" nowrap ;" ;">'.
"<td>
<a href='http://eq2.zam.com/wiki/EQ2_Item:".rawurlencode($item['name'])."'>".$html->itemstats_item(stripslashes($item['name']))."</a> <br>".
get_coloredLinkedName($item['looter']).' ('.$item['value'].' DKP)
</td>


NOW depending where you have your lastitems module box you may notice flickering because the mouse and the tooltip are ontop of each other. To fix this you would have to download the zampower.js and edit it, just find where the x & y coordinates are and make whatever changes you need (I.E. add +15 to x and -20 to Y or whatever so the tooltip shows further away from the mouse. It's not that hard to find really, but you will have to host the zampower.js on your server, no biggie just change http://common.allakhazam.com/shared/zampower.js to http://yourhost.com/whereveryouwant/zampower.js



Top
 Profile  
 
Offline
 Post subject: Re: Need some PHP Help
PostPosted: Fri 15. Apr 2011, 08:11 

Joined: Mon 31. Jan 2011, 08:22
Posts: 23
Ok this is where I am confused I do not see lastitems/module.php anywhere theres no directory called lastitems. Is this a plugin?

Bah NM me its part of the portal stuff

Anyone know how I can make this also work with the listitems.php for the dkp area?

Since we only have to hover over the tooltip

looks like the string for such an item is like so http://rift.zam.com/en/item/DB99C1AC020 ... ath-Keeper so that it adds an id and a name to the string.

Name here would be Oath Keeper but the encode would be Oath-Keeper along with the item id there which I would assume we would need to look up when adding an item to the database



Top
 Profile  
 
Online
 Post subject: Re: Need some PHP Help
PostPosted: Tue 19. Apr 2011, 04:11 

Joined: Sat 7. Mar 2009, 07:36
Posts: 117
Same idea, you would have to edit listitems.php. I only did it for the lastitems module from the front page. If you did it to listitems.php then keep in mind you are removing the link to the item itself within eqdkp, which is fine if you dont care to see what people paid for the item in the past or if someone had previously looted the item, basically the Purchase History Page. You would look for the same html code in listitems.php and replace it, shouldn't look too much different than the one above.



Top
 Profile  
 
Offline
 Post subject: Re: Need some PHP Help
PostPosted: Thu 28. Apr 2011, 08:48 

Joined: Mon 31. Jan 2011, 08:22
Posts: 23
darkmaeg wrote:
Same idea, you would have to edit listitems.php. I only did it for the lastitems module from the front page. If you did it to listitems.php then keep in mind you are removing the link to the item itself within eqdkp, which is fine if you dont care to see what people paid for the item in the past or if someone had previously looted the item, basically the Purchase History Page. You would look for the same html code in listitems.php and replace it, shouldn't look too much different than the one above.



Ok I kind of understand this. I need the item value and the item name though along with that slash between the item number which is why I asked. I'll see what I can come up with. Actually what I was gonna do is make the tooltip show up after they clicked the link but not really sure where to insert that. So if we was looking at the item cost or who looted we could tooltip over it there.



Top
 Profile  
 
Online
 Post subject: Re: Need some PHP Help
PostPosted: Sat 30. Apr 2011, 02:27 

Joined: Sat 7. Mar 2009, 07:36
Posts: 117
well every itemlink in eqdkp-plus by default links you to the item itself for example http://yourhost.com/viewitem.php?s=&i=12

Where i=12 is the item number...you would need to decide where you would want the tooltip but the tooltip link will be a link to the item in zam.com there's no way around that. So I decided last items module box but you can make it item history page, item values page, pretty much wherever you want you can also use that javascript to make a bbc code in your forums so something like [link]item name[/link] would be a tooltip of whatever game item you wanted (well any game item supported by zam.com).



Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 17 posts ]  Go to page Previous  1, 2

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

(C) The EQdkp-Plus Developer Team
EQdkp Plus Template by Ramon Kaes