Difference between revisions of "Ryzom API/Guild icon"

From EncyclopAtys

Jump to: navigation, search
(Created page with "<noinclude>__TOC__</noinclude> Retrieves a guild icon === Usage === <base URL>/guild_icon.php?icon=:icon&size=:size ==== URL Parameters ==== ;icon : :It's a raw 64bit numb...")
 
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
<noinclude>__TOC__</noinclude>
+
<noinclude>{{Trad|DE=Ryzom API/Gilden-Symbol|EN=Ryzom API/Guild icon|palette=api|H=1}}__TOC__</noinclude>
 
Retrieves a guild icon
 
Retrieves a guild icon
  
Line 26: Line 26:
 
$url = ryzom_guild_icon_url("4505559206514131", 'b');
 
$url = ryzom_guild_icon_url("4505559206514131", 'b');
 
echo "<img src=\"$url\" alt=\"\">";</syntaxhighlight>
 
echo "<img src=\"$url\" alt=\"\">";</syntaxhighlight>
<noinclude>[[Category:Ryzom API|{{subst:SUBPAGENAME}] ]]</noinclude>
+
<noinclude>[[Category:Ryzom API|Guild icon]]</noinclude>

Latest revision as of 13:43, 27 May 2023

de:Ryzom API/Gilden-Symbol en:Ryzom API/Guild icon
 
UnderConstruction.png
Translation to review
Don't blame the contributors, but come and help them 😎

Reference text ( Maintained text, used as reference ) :
Notes: (Leda, 2023-05-27)

Retrieves a guild icon

Usage

<base URL>/guild_icon.php?icon=:icon&size=:size

URL Parameters

icon 
It's a raw 64bit number from Character xml or Guild list xml file
size (optional)
s (default) Small guild icon (32x32 pixels)
b Big guild icon (64x64 pixels)

Cache Duration

It's cached for ever. Since the icon is unique and never changes. For a specific icon, it'll always return the same image.

PHP interface

ryzom_guild_icon_url($icon, $size)

Returns a string that contains the url to display a guild icon.

<?php
require_once "ryzomapi_lite.php";

$url = ryzom_guild_icon_url("4505559206514131", 'b');
echo "<img src=\"$url\" alt=\"\">";