rendering webpage

Added by devski about 9 years ago

Hey
would someone mind showing a simple example of markup to render one webpage with a single window using the ryzom api php?

thanks


Replies (3)

RE: rendering webpage - Added by nimetu about 9 years ago

function display_html($title, $content) {
    header('Content-Type:text/html; charset=UTF-8');
    echo '
        <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
        <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
        <head>
        <title>'.$title.'</title>
        <meta http-equiv="content-type" content="text/html; charset=utf-8" />
        '.ryzom_render_header().'
        '.ryzom_render_header_www().'
        </head>
        <body>
    ';
    echo ryzom_render_www(ryzom_render_window($title, $content));
    echo '</body></html>';
}

RE: rendering webpage - Added by devski about 9 years ago

thanks
Does the webpage need to be inside the api folder only?

RE: rendering webpage - Added by nimetu about 9 years ago

devski wrote:

thanks
Does the webpage need to be inside the api folder only?

nope. move the CSS/image files around as you wish, remove ryzom_render_header() and use something like

<link type="text/css" href="css/ryzom_ui/ryzom_ui.css" rel="stylesheet" media="all" />

--
you find those api functions from functions_render.php file. you dont have to use them, but if you want to mimic the design of some of api webpages, then those are the ones to use.

if you only want ryzom window 'block', then load the render_ui.css file and use ryzom_render_window($title, $content) that will return rendered html string that you can use in your own design.

(1-3/3)