TemKa_SD Posted November 1, 2018 Share Posted November 1, 2018 Здравствуйте. С правами в админцентре всё понятно, единственное скажите, как в функцию добавить, например add protected function add() { $form = new \IPS\Helpers\Form(); $form->addHeader( 'sharedstats_stats_announce_announce_add' ); $form->add( new \IPS\Helpers\Form\TextArea( 'sharedstats_stats_announce_announce_add', null, true, array( 'maxLength' => 60 ))); if ( $values = $form->values() ) { $ann = new \IPS\sharedstats\Records\Announce; $ann->text = $values['sharedstats_stats_announce_announce_add']; $ann->save(); \IPS\Output::i()->redirect(\IPS\Http\Url::internal( 'app=sharedstats&module=stats&controller=announce', 'admin' ), 'sharedstats_stats_announce_announce_added'); } \IPS\Output::i()->output = $form; } Искал по ключам в приложении форум, там вообще странность, ключи созданы, а в приложении нигде не применяются ))) : http://prntscr.com/lcwyv6 в чем прикол? Link to comment Share on other sites More sharing options...
newbie Posted November 1, 2018 Share Posted November 1, 2018 \IPS\Dispatcher::i()->checkAcpPermission('some_key'); Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now