Sunday, 2010-08-22

../irclogs/#mantishelp.2010-08-22.log
--- scribe started ---00:00
dhx_m"from the blog": Thanks to the Mantis inventor. The mantis is more powerful plugin system & useful for me.10:33
dhx_mnuclear_eclipse: the credit is all yours :)10:37
istvanbhi there11:39
istvanbI have a question: how can I get the access level of the current user?11:39
istvanbdhx_m11:54
istvanbnuclear_eclipse11:54
istvanb?11:54
dhx_mistvanb: current_user_get_access_level()11:55
istvanbsweeeeet11:55
dhx_mreturns an integer representation of the access level11:55
istvanbthanks a lot man11:56
dhx_mI suggest having a read through the API docs to get an idea of what functions are available11:56
istvanbyeah, 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!12:00
dhx_myep12:01
istvanbI 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 access12:16
istvanbI have failed to do that12:16
istvanbbecause12:16
istvanbfunction init()  { plugin_event_hook (EVENT_MENU_MANAGE,'eannounce_form'); }12:16
istvanbI 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');} }12:17
istvanbbut it gives me an error message12:17

Generated by irclog2html.py