Jump to content

Developer Documentation

General

  1. Enabling Developer Mode

    Before you begin developing plugins or applications for the IPS Community Suite, you need to enable Developer Mode. Developer mode causes the software to load required files directly from the filesystem, rather than cached versions or from the database. Warning Developer Mode will cause the software to run much slower than usual and may introduce security vulnerabilities. You should only enable Developer Mode if you are a PHP developer intending to develop Applications an
  2. Using the Developer Center

    The Developer Center for each application and plugin is designed to be a tool that facilitates creating and updating applications and plugins for the Invision Community software. It can help you automatically track things such as settings, database changes, tasks, and more. While most of the functionality available through the developer center can be bypassed by adjusting your files directly on disk, we strongly encourage you to make use of the developer center whenever possible to minimize deve
  3. Autoloading classes

    Classes in IPS Community Suite 4 are "autoloaded". This means you never have to include or require an IPS4 source file. For reference, the autoload method is \IPS\IPS::autoloader() which is located in the init.php file of the root directory.   Locating Classes Classes must be located in the correct location and be named properly so the autoloader can find them. There are generally three locations: Framework classes Classname structure: \IPS\Namespace\Class Location
  4. Routing & URLs

    URL routing in IPS4 Most URLs in IPS4 are 'friendly URLs', also known as FURLs - that is, they are plain English and easy to read for users and search engines. The FURL is mapped by IPS4 to a traditional URL with parameters, based on the mappings provided by the application. For example, the FURL community.com/messenger/compose might be mapped to community.com/index.php?app=core&module=messaging&controller=messenger&do=compose.   How controllers are loaded Co
  5. Caching

    The Invision Community software provides two separate, but related, methods of caching data: the data store, and caching abstraction layers. It is essential that both types of caching be considered volatile, and that the data can be regenerated on the fly as needed. In other words, while using a caching layer to speed up the application is a good idea in many cases, your code must handle situations where the data is unavailable in the cache gracefully. The data store The primary method
  6. Logging

    Logging issues unexpected issues that occur in your third part application or plugin is the #1 way you can help diagnose  problems that have occurred after the fact. Often times, proper logging can completely eliminate the need to spend valuable time reproducing an obscure issue and allow you to cut to the chase and look into the problem that actually occurred in the first place. The primary means of logging issues in the Community Suite is through the \IPS\Log class. Generalized loggi
  7. Error Handling

    Errors are a natural part of any web application, and you will need to be prepared to show errors when appropriate. Invision Community software has several powerful built in features for error handling that you should familiarize yourself with in order to best handle unexpected (or even expected, but invalid) situations. The Invision Community software throws Exceptions when appropriate, and attempts to throw the most valid exception class possible (including custom exception classes that e
  8. Security Considerations

    The Invision Community framework is set up with security best practices in mind but there are a few things you should make use of in order to not inadvertently bypass these protections. Validating User Input Where your application or plugins request user data the built in Form handling methods should be used. By default form input is protected against vulnerabilities but you should still ensure the correct form types are used for example using email address, number and radio fi
×
×
  • Create New...