Jump to content
You're invited! Join our 4.6 Live Event on ZOOM 6/24 ×


Martin A.

  • Posts

  • Joined

  • Last visited

  • Days Won


Community Answers

  1. Martin A.'s post in How to use ips.ui.menu with events was marked as the answer   
    $( '#elMyMenu' ).on( 'menuOpened', function( elemID, originalEvent, menu ) { }); $( '#elMyMenu' ).on( 'menuClosed', function( elemID, menu ) { });  
  2. Martin A.'s post in JS does not work on production mode! was marked as the answer   
    \IPS\Output::i()->jsFiles = array_merge( \IPS\Output::i()->jsFiles, \IPS\Output::i()->js( 'admin_scriptfile.js', 'myAppName', 'admin' ) );  
  3. Martin A.'s post in csrfCheck question was marked as the answer   
    But nothing here stops me from creating and sharing a regular URL for these methods, creating a GET request for it.
    So I'm gonna say you do need it in every method. Or you need all state changing methods in its own controller where you run the csrfCheck regardless of request method.
  4. Martin A.'s post in php-redis 5 was marked as the answer   
    Should be no problem. I have php-redis 5.0.2 in both the dev, testing and production environment.
  5. Martin A.'s post in Reload Javascript on AJAX Call was marked as the answer   
    Trigger the event "contentChange" on the document with the newly inserted content as the scope.
    $( document ).trigger( 'contentChange', [ element ] );  
  6. Martin A.'s post in How to set loading priority for plugins JS? was marked as the answer   
    All javascript load with the same priority, not async and not deferred. You should listen for the DOM loaded event, or utilize the JS controller feature if your JS fires too early.
  7. Martin A.'s post in Support tool flagging DB errors when there are none was marked as the answer   
    If you drop columns that were added in the install routine in a future update, you need to remove those from install/queries.json too. None of the upgrade routines runs when you do a fresh install, then you'll end up with all of those 33 columns, and not the new text column you created.
    The database checker will include install/queries.json too, in addition to those mentioned by tera. It does not know that you dropped those columns in an update, hence why it think it's a problem.
  8. Martin A.'s post in How to modify method? was marked as the answer   
    You cannot inject string in the middle of method. All you can do with code hooks is do processing before or after the parent method runs, and add new methods. You say you want to "add some strings", maybe you're better off doing that in a template hook?
  9. Martin A.'s post in Access theme parameters from a theme hook in PHP mode was marked as the answer   
    Why would you need to generate the content on the "outside"? You can use raw PHP in the content box, where you'll then have access to $topic, and all other variables that may exist in a template.
  10. Martin A.'s post in Plugin to add new field to forum configuration was marked as the answer   
    public function __construct() { call_user_func_array( 'parent::__construct', func_get_args() ); if ( $this->name == 'forum_type' AND \IPS\Dispatcher::i()->controllerLocation == 'admin' { $this->options['toggles'][] = "forum_redirect_new_window"; } } Hook into IPS\Helpers\Form\Radio as well. If current location is 'admin' and the form element key is 'forum_type', add you field to the options list.
  11. Martin A.'s post in [API] Working with members - registration validation email? was marked as the answer   
    \IPS\Member::loggedIn()->members_bitoptions['validating'] That will be TRUE if the member is awaiting validation.
  12. Martin A.'s post in New optional parameter on item contentCount was marked as the answer   
    You can just add contentCount() to your own item class and count it the way you want.
  • Create New...

Important Information

We use technologies, such as cookies, to customise content and advertising, to provide social media features and to analyse traffic to the site. We also share information about your use of our site with our trusted social media, advertising and analytics partners. See more about cookies and our Privacy Policy