Difference between revisions of "Ryzom API/Render"

From EncyclopAtys

Jump to: navigation, search
(Created page with " This is a set of PHP function to render a web page using Ryzom style. === CSS file === You need to manually include ryzom css file : <link href="<span class="plainlinks"...")
 
(category)
Line 28: Line 28:
  
 
echo ryzom_render_window('Title', 'Hello World!', $links);</syntaxhighlight>
 
echo ryzom_render_window('Title', 'Hello World!', $links);</syntaxhighlight>
<noinclude>[[Category:Ryzom API]]</noinclude>
+
<noinclude>[[Category:Ryzom API|{{subst:SUBPAGENAME}] ]]</noinclude>

Revision as of 07:53, 23 July 2020


This is a set of PHP function to render a web page using Ryzom style.


CSS file

You need to manually include ryzom css file :

<link href="https://api.ryzom.com/data/css/ryzom_ui.css" rel="stylesheet" media="all">

PHP interface

ryzom_render_window($title, $content, array $links)

Returns html markup resembling ingame window style

$title
$content
$links - (optional) associative array that defines right side buttons on window title bar
<?php
require_once "ryzomapi_lite.php";

$links = array(
  array('href' => 'http://www.ryzom.com/', 'text' => 'Ryzom website'),
  array('href' => 'http://app.ryzom.com/app_ryzomapi/', 'text' => 'RyzomAPI app'),
);

echo ryzom_render_window('Title', 'Hello World!', $links);