dhx_m | "from the blog": Thanks to the Mantis inventor. The mantis is more powerful plugin system & useful for me. | 06:33 |
---|---|---|
dhx_m | nuclear_eclipse: the credit is all yours :) | 06:37 |
*** Joins: istvanb (56a14419@gateway/web/freenode/ip.86.161.68.25) | 07:38 | |
istvanb | hi there | 07:39 |
istvanb | I have a question: how can I get the access level of the current user? | 07:39 |
istvanb | dhx_m | 07:54 |
istvanb | nuclear_eclipse | 07:54 |
istvanb | ? | 07:54 |
dhx_m | istvanb: current_user_get_access_level() | 07:55 |
istvanb | sweeeeet | 07:55 |
dhx_m | returns an integer representation of the access level | 07:55 |
istvanb | thanks a lot man | 07:56 |
dhx_m | I suggest having a read through the API docs to get an idea of what functions are available | 07:56 |
istvanb | yeah, I should do that, but I am so close to finish my plugin that its much easier for me to ask. However now I have another plugin in my mind which can be complex and to do that for sure I will read it! | 08:00 |
dhx_m | yep | 08:01 |
istvanb | I wrote my plugin as it adds a new menu item under the manage menu. Its able to check if the user has access to the plugin feature, however it would be much better if the plugin menu item would not appear if the user has no access | 08:16 |
istvanb | I have failed to do that | 08:16 |
istvanb | because | 08:16 |
istvanb | function init() { plugin_event_hook (EVENT_MENU_MANAGE,'eannounce_form'); } | 08:16 |
istvanb | I tried to do an if structure like function init() { if (current_user_get_access_level() >= plugin_config_get( 'eannounce_sendmail_threshold' )) {plugin_event_hook (EVENT_MENU_MANAGE,'eannounce_form');} } | 08:17 |
istvanb | but it gives me an error message | 08:17 |
*** Quits: istvanb (56a14419@gateway/web/freenode/ip.86.161.68.25) (Quit: Page closed) | 09:11 | |
*** Quits: micahg (~micah@ubuntu/member/micahg) (Read error: Connection reset by peer) | 17:20 | |
*** Joins: micahg (~micah@ubuntu/member/micahg) | 17:21 | |
*** Joins: fanno (~Morten@90.184.93.233) | 17:36 | |
*** Quits: fanno (~Morten@90.184.93.233) (Read error: Connection reset by peer) | 19:24 | |
*** Quits: wolog (~wolog@87.106.58.253) (Ping timeout: 246 seconds) | 19:30 | |
*** Joins: wolog (~wolog@87.106.58.253) | 19:31 | |
*** Quits: scribe9343423 (~scribe934@static.96.23.63.178.clients.your-server.de) (Remote host closed the connection) | 20:00 | |
*** Joins: scribe9343423 (~scribe934@static.96.23.63.178.clients.your-server.de) | 20:00 | |
*** Joins: daryn (~daryn@h162.214.31.71.dynamic.ip.windstream.net) | 21:20 | |
*** Quits: daryn (~daryn@h162.214.31.71.dynamic.ip.windstream.net) (Ping timeout: 265 seconds) | 23:42 |
Generated by irclog2html.py 2.9.2 by Marius Gedminas - find it at mg.pov.lt!