GetUsersGrps.html 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" dir="ltr">
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
  5. <!-- headlinks removed -->
  6. <link rel="shortcut icon" href="../../../../misc/favicon.ico"/>
  7. <title>GetUsersGrps - SLIS Second Life Wiki</title>
  8. <style type="text/css">/*<![CDATA[*/ @import "../../../../skins/offline/main.css"; /*]]>*/</style>
  9. <link rel="stylesheet" type="text/css" media="print" href="../../../../skins/common/commonPrint.css" />
  10. <!--[if lt IE 5.5000]><style type="text/css">@import "../../../../skins/monobook/IE50Fixes.css";</style><![endif]-->
  11. <!--[if IE 5.5000]><style type="text/css">@import "../../../../skins/monobook/IE55Fixes.css";</style><![endif]-->
  12. <!--[if IE 6]><style type="text/css">@import "../../../../skins/monobook/IE60Fixes.css";</style><![endif]-->
  13. <!--[if IE]><script type="text/javascript" src="../../../../skins/common/IEFixes.js"></script>
  14. <meta http-equiv="imagetoolbar" content="no" /><![endif]-->
  15. <script type="text/javascript" src="../../../../skins/common/wikibits.js"></script>
  16. <script type="text/javascript" src="../../../../skins/offline/md5.js"></script>
  17. <script type="text/javascript" src="../../../../skins/offline/utf8.js"></script>
  18. <script type="text/javascript" src="../../../../skins/offline/lookup.js"></script>
  19. </head>
  20. <body
  21. class="ns-0 ns-subject page-GetUsersGrps">
  22. <div id="globalWrapper">
  23. <div id="column-content">
  24. <div id="content">
  25. <a name="top" id="contentTop"></a>
  26. <h1 class="firstHeading">GetUsersGrps</h1>
  27. <div id="bodyContent">
  28. <h3 id="siteSub">From SLIS Second Life Wiki</h3>
  29. <div id="contentSub"></div>
  30. <!-- start content -->
  31. <div id="mw-content-text" lang="en" dir="ltr" class="mw-content-ltr"><table border="0" cellpadding="0" cellspacing="0" style="text-align: top; width: 95%;">
  32. <tr>
  33. <td> <a href="../../../../articles/s/l/o/SLOODLE_LSL_API.html" title="SLOODLE LSL API">Back to Sloodle API</a>
  34. </td></tr></table>
  35. <p><br />
  36. </p>
  37. <table border="2" cellpadding="0" cellspacing="0" style="text-align: top; width: 95%; color:#5a3696; border-color:black;">
  38. <tr>
  39. <td>
  40. <table border="0" style="width: 100%; background:#f4f8fb; color:#5a3696; font-weight:bold; font-size:180%;">
  41. <tr>
  42. <td>Function: getUsersGrps
  43. </td></tr></table>
  44. </td></tr>
  45. <tr>
  46. <td>
  47. <table border="0">
  48. <tr>
  49. <td style="width: 100%; font-weight:bold;"> Description: Returns a list of groups a user is a member of in the course.
  50. </td>
  51. <td> }
  52. </td></tr>
  53. <tr>
  54. <td>
  55. <table border="0">
  56. <tr>
  57. <td style="width: 10%; font-weight:bold;"> <font color="red">llMessageLinked</font>(<font color="green">LINK_SET</font>, PLUGIN_CHANNEL, "<font color="green">plugin:lessons,function:getUsersGrps\nSLOODLEID:null\n\nUSERNAME:"</font>+ <font color="red">llDetectedName(0</font>)+ <font color="green">"|USERUUID:</font>"+(string) <font color="red">llDetectedKey(0)</font>", <font color="green">NULL_KEY</font>);
  58. </td></tr></table>
  59. </td></tr>
  60. <tr>
  61. <td>
  62. <table border="0">
  63. <tr>
  64. <td style="width: 10%; font-weight:bold;" colspan="2"> Parameters:
  65. </td></tr>
  66. <tr>
  67. <td style="width: 10%; color:green;"> <b>SLOODLE_ID:null</b>
  68. </td>
  69. <td style="width: 90%;"> this is left as null because we aren't accessing a specific activity
  70. </td></tr>
  71. <tr>
  72. <td style="width: 10%; color:green;"> <b>USERNAME</b>:
  73. </td>
  74. <td style="width: 90%;"> The name of the user we are getting groups for
  75. </td></tr>
  76. <tr>
  77. <td style="width: 10%; color:green;"> <b>USERUUID</b>:
  78. </td>
  79. <td style="width: 90%;"> The UUID of the user we are getting groups for
  80. </td></tr></table>
  81. <p><br />
  82. </p>
  83. </td></tr>
  84. <tr>
  85. <td>
  86. <table border="0">
  87. <tr>
  88. <td style="width: 10%; font-weight:bold;"> Output:
  89. </td>
  90. <td style="width: 90%;"> <a href="../../../../articles/g/e/t/File:GetUsersGrps.jpg.html" class="image"><img alt="GetUsersGrps.jpg" src="../../../../images/2/2F/2/2/20/GetUsersGrps.jpg" width="433" height="134" /></a>
  91. </td></tr></table>
  92. <p><br />
  93. </p>
  94. </td></tr>
  95. <tr>
  96. <td>
  97. <table border="0">
  98. <tr>
  99. <td style="width: 10%; font-weight:bold;"> Example Script:
  100. </td>
  101. <td style="width: 90%;">
  102. <pre> /*********************************************
  103. * Copyright (c) 2009 Paul Preibisch
  104. * Released under the GNU GPL 3.0
  105. * This script can be used in your scripts, but you must include this copyright header as per the GPL Licence
  106. * For more information about GPL 3.0 - see: <a rel="nofollow" class="external free" href="http://www.gnu.org/copyleft/gpl.html">http://www.gnu.org/copyleft/gpl.html</a>
  107. *
  108. *
  109. * This script is part of the SLOODLE Project see <a rel="nofollow" class="external free" href="http://sloodle.org">http://sloodle.org</a>
  110. *
  111. * Copyright:
  112. * Paul G. Preibisch (Fire Centaur in SL)
  113. * fire@b3dMultiTech.com
  114. *
  115. * API DEMO OBJECT
  116. * getUsersGrps.lsl
  117. *
  118. * PURPOSE
  119. * This script is part of the SLOODLE HQ.
  120. *
  121. /**********************************************************************************************/
  122. key owner;
  123. // *************************************************** HOVER TEXT VARIABLES
  124. integer DISPLAY_DATA =-774477; //every time the display is updated, data goes on this channel
  125. integer PLUGIN_RESPONSE_CHANNEL =998822; //sloodle_api.lsl responses
  126. integer PLUGIN_CHANNEL =998821;//sloodle_api requests
  127. integer SLOODLE_CHANNEL_TRANSLATION_REQUEST = -1928374651;//translation channel
  128. integer SLOODLE_CHANNEL_TRANSLATION_RESPONSE = -1928374652;//translation channel
  129. integer SLOODLE_CHANNEL_OBJECT_DIALOG = -3857343;//configuration channel
  130. /***********************************************
  131. * s() used so that sending of linked messages is more readable by humans. Ie: instead of sending a linked message as
  132. * GETDATA|50091bcd-d86d-3749-c8a2-055842b33484
  133. * Context is added instead: COMMAND:GETDATA|PLAYERUUID:50091bcd-d86d-3749-c8a2-055842b33484
  134. * All this function does is strip off the text before the ":" char and return a string
  135. ***********************************************/
  136. string s (string ss){
  137. return llList2String(llParseString2List(ss, [":"], []),1);
  138. }
  139. /* &amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;
  140. *
  141. * default state
  142. * In this state we wait until the rest of the scripts in this object init
  143. *
  144. * &amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp; */
  145. default
  146. {
  147. state_entry()
  148. {
  149. }
  150. touch_start(integer total_number)
  151. {
  152. llMessageLinked(LINK_SET, PLUGIN_CHANNEL, "plugin:groups,function:getUsersGrps\nSLOODLEID:null\nUSERNAME:"+llDetectedName(0)+"|USERUUID:"+(string)llDetectedKey(0), NULL_KEY);
  153. }
  154. link_message(integer sender_num, integer channel, string str, key id) {
  155. llSay(0,str);
  156. }
  157. }
  158. </pre>
  159. <p><br />
  160. </p><p><br />
  161. </p>
  162. </td></tr></table>
  163. <p><br />
  164. </p>
  165. </td></tr></table>
  166. </td>
  167. </tr>
  168. </table>
  169. <!--
  170. NewPP limit report
  171. Preprocessor node count: 8/1000000
  172. Post‐expand include size: 0/2097152 bytes
  173. Template argument size: 0/2097152 bytes
  174. Expensive parser function count: 0/100
  175. -->
  176. </div><div class="printfooter">
  177. </div>
  178. <div id="catlinks"><div id='catlinks' class='catlinks'><div id="mw-normal-catlinks" class="mw-normal-catlinks"><a href="http://localhost/sl/index.php/Special:Categories" title="Special:Categories">Category</a>: <ul><li><a href="../../../../articles/i/n/w/Category:Inworld_API.html" title="Category:Inworld API">Inworld API</a></li></ul></div></div></div> <!-- end content -->
  179. <div class="visualClear"></div>
  180. </div>
  181. </div>
  182. </div>
  183. <div id="column-one">
  184. <div id="p-cactions" class="portlet">
  185. <h5>Views</h5>
  186. <ul>
  187. <li id="ca-nstab-main"
  188. class="selected" ><a href="../../../../articles/g/e/t/GetUsersGrps.html">Page</a></li><li id="ca-talk"
  189. class="new" ><a href="http:http://localhost/sl/index.php?title=Talk:GetUsersGrps&amp;action=edit&amp;redlink=1">Discussion</a></li><li id="ca-current"
  190. ><a href="http://localhost/sl/index.php/GetUsersGrps">Latest revision</a></li> </ul>
  191. </div>
  192. <div class="portlet" id="p-logo">
  193. <a style="background-image: url(../../../../misc/wiki.png);"
  194. href="../../../../index.html"
  195. title="Main Page"></a>
  196. </div>
  197. <script type="text/javascript"> if (window.isMSIE55) fixalpha(); </script>
  198. <div class='portlet' id='p-navigation'>
  199. <h5>Navigation</h5>
  200. <div class='pBody'>
  201. <ul>
  202. <li id="n-mainpage-description"><a href="../../../../index.html">Main page</a></li>
  203. <li id="n-SLOODLE"><a href="../../../../articles/s/l/o/Sloodle.html">SLOODLE</a></li>
  204. <li id="n-currentevents"><a href="../../../../articles/c/u/r/SLIS_Second_Life_Wiki:Current_events.html">Current events</a></li>
  205. <li id="n-help"><a href="../../../../articles/c/o/n/Help:Contents.html">Help</a></li>
  206. </ul>
  207. </div>
  208. </div>
  209. <div class='portlet' id='p-SEARCH'>
  210. <h5>Search</h5>
  211. <div class='pBody'>
  212. <ul>
  213. </ul>
  214. </div>
  215. </div>
  216. <div class='portlet' id='p-TOOLBOX'>
  217. <h5>Toolbox</h5>
  218. <div class='pBody'>
  219. <ul>
  220. </ul>
  221. </div>
  222. </div>
  223. <div class='portlet' id='p-LANGUAGES'>
  224. <h5>LANGUAGES</h5>
  225. <div class='pBody'>
  226. <ul>
  227. </ul>
  228. </div>
  229. </div>
  230. <div id="p-search" class="portlet">
  231. <h5><label for="searchInput">Search</label></h5>
  232. <div id="searchBody" class="pBody">
  233. <form action="javascript:goToStatic(3)" id="searchform"><div>
  234. <input id="searchInput" name="search" type="text"
  235. accesskey="f" value="" />
  236. <input type='submit' name="go" class="searchButton" id="searchGoButton"
  237. value="Go" />
  238. </div></form>
  239. </div>
  240. </div>
  241. </div><!-- end of the left (by default at least) column -->
  242. <div class="visualClear"></div>
  243. <div id="footer">
  244. <div id="f-poweredbyico"><a href="//www.mediawiki.org/"><img src="../../../../skins/common/images/poweredby_mediawiki_88x31.png" height="31" width="88" alt="Powered by MediaWiki" /></a></div> <ul id="f-list">
  245. <li id="f-credits">This page was last modified 14:07, 19 October 2009 by <a href="http:http://localhost/sl/index.php?title=User:Fire&amp;action=edit&amp;redlink=1" class="new" title="User:Fire (page does not exist)">Paul Preibisch</a>. </li> <li id="f-about"><a href="../../../../articles/a/b/o/SLIS_Second_Life_Wiki:About.html" title="SLIS Second Life Wiki:About">About SLIS Second Life Wiki</a></li> <li id="f-disclaimer"><a href="../../../../articles/g/e/n/SLIS_Second_Life_Wiki:General_disclaimer.html" title="SLIS Second Life Wiki:General disclaimer">Disclaimers</a></li> </ul>
  246. </div>
  247. </div>
  248. </body>
  249. </html>