Jump to content



  • Posts

  • Joined

  • Last visited

  • Days Won


Community Answers

  1. Aiwa's post in Code Hooks - Best practice was marked as the answer   
    You should brush up on inheritance. If you don't call the parent you break the chain, execution stops with what you tell it to do. So long as you return the parent, via parent::functionname(), you maintain geneology and execution continues. 
    You can't insert little lines of code in the middle of a method. If that's what you're after you need to find another hook point. 
  2. Aiwa's post in Code Hooks in Plugins Question was marked as the answer   
    // your code
    return parent::clear();
    Or the opposite, if you need to manipulate the data.. 
    $return = parent::clear();
    // your code
    return $return;
  3. Aiwa's post in setting breakpoints during eval was marked as the answer   
    The best solution would be to include a source file with your app, your own defined class. Use the hook to collect the data you need, pass it to your object to do with what you need. 
    You can put the break points in your class methods. 
  4. Aiwa's post in profile fields hook was marked as the answer   
    memberSync extension.
  5. Aiwa's post in Creating a Development Environment was marked as the answer   
    You'll get a lot of different answers here as it's a personal preference question. 
    My suggestion would be to do what works best for you, your workflow, and your community. 
    Personally, I use localhost for development ( affords the ability to use XDEBUG with my IDE ), will soon have a test board on my production server with automatic deployment of localhost developed applications by simply running a pull request with that applications master branch. 
    That said, keep your licencing in mind. One IPS license, one test install. I have multiple licenses and can have multiple test/dev sites, up to 1 test site per license with the apps, and versions for those apps, each license has available to it. Localhost installs may not apply to that count, that is a question better left for IPS.
    I used to work with a remote DEV site and synced the site root directory to my local machine so file changes uploaded immediately. That setup was more complicated than it was worth IMO because you can only DEV with Internet access and made using the full capabilities of an IDE impossible. 
    If you explain your workflow, how many people are going to use it, what you want to get out of it, might be able to offer some addition opinions about what might suit your needs. 
  6. Aiwa's post in Syntax Errors was marked as the answer   
    define ( 'DEBUG_TEMPLATES', TRUE); Or, use an IDE.  I recommend PHPStorm. 
  7. Aiwa's post in Plugin Hooks vs Application Hooks was marked as the answer   
    <?php return array ( '\\IPS\\core\\modules\\front\\members\\Profile' => array ( 293 => array ( 'file' => 'plugins/defaultprofiletab/hooks/defaultProfileTab.php', 'class' => 'hook293', ), ), ); Lesson learned, don't create hooks in the middle of the night and let your keyboard autocorrect / auto-capitalize things for you. 
    \IPS\core\module\front\members\profile    not   Profile  
    Thanks @All Astronauts and @bfarber for saving my sanity.
    Oddly enough, the hook editor isn't smart enough to solve this for you.  When i hit edit, it knows what class to pull, but doesn't fix anything for you.  You'd think this would be smart enough to throw an error rather than make you think it's working.

  8. Aiwa's post in alter core_members table was marked as the answer   
    You have to add manual query in Versions.

    Don't forget, though... If you're adding a column to another table, you have to also REMOVE that column with an uninstall extension.
  9. Aiwa's post in [RESOLVED] is manual edit "most online" in database possible ? was marked as the answer   
    You'd have to write a custom script to do that.

    getCache 'stats', alter the data, and setCache.

    The data is stored serialized in cache_store, so a manual query to insert the data via SQL would be BEYOND tedious.
  • 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