13.08.2010, 17:16
(Dieser Beitrag wurde zuletzt bearbeitet: 26.08.2014, 09:53 von MyBB.de Bot.)
Eine neue Erweiterung wurde veröffentlicht: Advanced MyCode Permissions
Zitat:When you add or edit a custom MyCode, you will be able to set permissions for:
Forums it can be used in.
Forums it can't be used in.
Groups it can be used by.
Groups it can't be used by.
Groups that it can be viewed by.
Separate replacement for groups that cannot view it.
If it can be used in stickied threads.
If it can be used in closed threads.
If it can be used in other threads.
If the user must be a moderator to use it.
If the user must moderate the forum they are posting it in to use it.
If the user must be an administrator.
This will allow you to create MyCodes for moderators, administrators, and some for certain forums only.
Now with 1.1 you can do even more with the support of variables in MyCode.
The following variables are now available for replacement in mycode:
{$post} An array of the current post. E.g. {$post['fid']} will return the current forum id.
{$thread} An array of the current thread. E.g. {$thread['subject']} will return the subject of the current thread.
{$user} An array of the current user. E.g. {$user['reputation']} will return the user who posted this mycode's reputation.
{$users} An array of all users. E.g. {$users['1']['reputation']} or {$users['Username']['reputation']} will return the user with the uid 1 or the username Username's reputation.
{$cache} The class datacache where groups, forums, etc are cached. E.g. {$cache->cache['forums']['1']['name']} will return the forum's name that has the fid 1.
{$uid}, {$fid}, {$tid}, and {$gid} return the values of the respective names. {$uid} and {$gid} refer to the user who posted the mycode.
This will remove the need for most mycode plugins, and you will be able to set up exactly what you want your mycode to do.