Odp:Development
From Odp
(Difference between revisions)
(→Testing RightFunctions extension) |
(→Testing RightFunctions extension) |
||
Line 30: | Line 30: | ||
{{#usergroup:}} (for current user) or {{#usergroup:user}} | {{#usergroup:}} (for current user) or {{#usergroup:user}} | ||
</pre> | </pre> | ||
+ | '''Example''': {{#usergroup:Admin}} | ||
<pre> | <pre> |
Revision as of 11:57, 4 June 2008
This page is used to discuss new features between ODP administrators, testing templates or new extensions.
Contents |
Testing UrlGetParameter extension
{{#urlget:paramname|default}}
Try adding param=value to the current URL.
Value is: no param
Testing RightFunctions extension
{{#ifright:right|then|else}}
{{#ifallowed:user|right|then|else}}
{{#switchright:right1=result1|right2|right3=result2 and 3|right4=result4|default (or #default=default if the default text contains =)}}
{{#userrights:}} (for current user) or {{#userrights:user}}
{{#usergroup:}} (for current user) or {{#usergroup:user}}
Example: bureaucrat
{{#ifgroup:group|then|else}} (for current user) or {{#ifgroup:group|then|else|user}} (for other users)
{{#switchgroup:group1=result1|group2|group3=result2 and 3|group4=result4|default (or #default=default if the default text contains =)}}
{{#ifpageright:right|then|else|page}} for testing other pages or {{#ifpageright:right|then|else}} for testing the current page.
{{#ifpageallowed:user|right|then|else|page}} for testing other pages or {{#ifpageallowed:user|right|then|else}} for testing the current page.
{{#ifprotected:then|else|page}} for testing other pages, or {{#ifprotected:then|else}} for testing the current page or (for example) {{#ifprotected:then|else|page|fns}} for testing only certain types of protection.
{{#getrestrictions:right|page}} for testing other pages, or {{#getrestrictions:right}} for testing the current page or {{#getrestrictions:right|page|true}} for listing all restrictions instead of just the highest one.
Testing ImageMap extension
Details about this extension can be found here.
ImageMap extension is installed. BUT IT DOES NOT WORK ALREADY.
<imagemap> Image:Foo.jpg|200px|picture of a foo poly 131 45 213 41 210 110 127 109 [[Community:Display|Display]] poly 104 126 105 171 269 162 267 124 [[Community:Keyboard|Keyboard]] rect 15 95 94 176 [[Community:Foo type A|Foo type A]] # A comment, this line is ignored circle 57 57 20 [[Community:Foo type B|Foo type B]] desc bottom-left </imagemap>
Testing Variables extension
Details about this extension can be found here
Syntax:
{{#vardefine:A|value of A}} {{#vardefine:B|1000}} Value of A is '''{{#var:A}}''' and value of B is '''{{#var:B}}'''
Result:
Value of A is value of A and value of B is 1000