Q-Sims - Admin Tips: Difference between revisions

From QNAPedia
Jump to navigation Jump to search
No edit summary
Glenn (talk | contribs)
m catchg
 
(2 intermediate revisions by one other user not shown)
Line 4: Line 4:


= Displaying Web pages on your Sims =
= Displaying Web pages on your Sims =
<blockquote>To avoid uploading images when a change occurs, to support event information dynamically, we need to be able to display web page contents on prims (''objects'') that reflects actual web page contents.<br/>To do so, just place the script below into a prims, change the '''srcURL''' value to the URL value of the page to display. and the page content will be converted into an image which the texture is put on all sides.<br/><br/>The example given below will display the up-to-date OSGrid map on a prims.<br/><br/>[[File:Q-Sims URL on prims.jpg|thumb|center|Q-Sims URL on prims.jpg|link=http://wikitest.qnap.com/w/images/2/20/Q-Sims_URL_on_prims.jpg]]<pre>// Display Dynamic Web page
<blockquote>To avoid uploading images when a change occurs, to support event information dynamically, we need to be able to display web page contents on prims (''objects'') that reflects actual web page contents.<br/>To do so, just place the script below into a prims, change the '''srcURL''' value to the URL value of the page to display. and the page content will be converted into an image which the texture is put on all sides.<br/><br/>The example given below will display the up-to-date OSGrid map on a prims.<br/><br/>[[File:Q-Sims URL on prims.jpg|thumb|center|Q-Sims URL on prims.jpg]]<pre>// Display Dynamic Web page
// AdNovea - Laurent - July 30th 2011
// AdNovea - Laurent - July 30th 2011
// Create a texture from a web page
// Create a texture from a web page
Line 50: Line 50:


Open the Stats page on your Internet browser using the URL: '''http&nbsp;://&lt;your_server_IP&gt;:9005/SStats'''<br/><br/>''NOTE: These are the stats written every hour into the OpenSim.log file.''
Open the Stats page on your Internet browser using the URL: '''http&nbsp;://&lt;your_server_IP&gt;:9005/SStats'''<br/><br/>''NOTE: These are the stats written every hour into the OpenSim.log file.''
</blockquote>[[Category:Pages with broken file links]] [[Category:Communications]] [[Category:QPKG]] [[Category:Q-Sims]]
</blockquote>
 
[[Category:Pages with broken file links]]
[[Category:Q-Sims]]

Latest revision as of 16:43, 27 October 2015

by AdNovea - July 2011
Q-Sims Homepage


Displaying Web pages on your Sims

To avoid uploading images when a change occurs, to support event information dynamically, we need to be able to display web page contents on prims (objects) that reflects actual web page contents.
To do so, just place the script below into a prims, change the srcURL value to the URL value of the page to display. and the page content will be converted into an image which the texture is put on all sides.

The example given below will display the up-to-date OSGrid map on a prims.

File:Q-Sims URL on prims.jpg
Q-Sims URL on prims.jpg
// Display Dynamic Web page
// AdNovea - Laurent - July 30th 2011
// Create a texture from a web page
string  srcURL = "http://quickmap.osgrid.org/quickmap.php"; // OsGrid map URL
display_URL()
{
        if ( llDetectedKey(0) == llGetOwner() );
        llSay( 0, "Loading." );
        string  dynamicID = "";
        integer refreshRate = 1000;
        string  contentType = "image";
        string  URLTexture = osSetDynamicTextureURL( dynamicID, contentType,srcURL  , "", refreshRate );
        if ( llStringLength( URLTexture ) > 0 )
        {
            llSay( 0,"URLTexture = " + URLTexture );
            llSetTexture( URLTexture, ALL_SIDES );
        }
}
default
{
    state_entry()
    {
        llSay( 0, "Display Quick Map" );
        llListen( 5, "", NULL_KEY ,"" );
    }
    touch_start( integer total_number )
    {
        display_URL();
    }
    listen( integer number, string name, key id, string m )
    {
        display_URL();
    }
}


Your Sims statistics

To monitor your sims statistics from an Internet browser, you must have added the following section into the OpenSim.ini file:

[WebStats]
;; Added to enable access to Web stat page
;; using the URL http://<region-server-ip>:<http-port>/SStats/
enabled=true

Open the Stats page on your Internet browser using the URL: http ://<your_server_IP>:9005/SStats

NOTE: These are the stats written every hour into the OpenSim.log file.