Items displayer

Added by vl about 6 years ago

instead of returning an image, it'll return a html code that we can use to display nicely the item.

For example, the html code can contain a tooltip that display all informations of the items when you move the move on the item.

At the beginning we add:

http://www/header.php that will return what we have to put in the <header> section (javascript code for the popup and so on)

and then we call http://www/item.php with in a POST the xml block of an item or inventories

and it'll return something like

<img mouseover="javascript:popup('....')" class="item" src="pathtotheimage"/>

Replies (3)

RE: Items displayer - Added by barbaros about 6 years ago

The alternative could be to provide the information in our xml so the user would take the server load of image generation.

Most webhosts do have GD enabled, so we could provide a sample source code/function to generate the image.

As a testcase I only modify the title and equipments:
http://www.waechterderduenen.de/example_xml.php?key=1224Z0ZD418CFF7&lang=fr
http://www.waechterderduenen.de/example_xml.php?key=1224Z0ZD418CFF7&lang=de

RE: Items displayer - Added by vl about 6 years ago

I think it's easier to have one official api to handle the image generation that ask each web dev to install, update after each patch and update scripts when they change.

As a webdev, i prefer to do just a link than to install and manage updates of a sample source code

RE: Items displayer - Added by barbaros about 6 years ago

Then maybe split off the inventory from the character api and create a new one. Generic sites/programms which do not need the inventory will not generate extra load.

So the new inventory API would generate and provide a link to the image and the name of each item.

http://www.waechterderduenen.de/example_inventory_xml.php?key=1224Z0ZD418CFF7&lang=fr
http://www.waechterderduenen.de/example_inventory_xml.php?key=1224Z0ZD418CFF7&lang=de

(1-3/3)