Jump to content

Marketplace

Developer Resources

15 files

  1. Free

    htaccess for IPS Forums

    This is a custom .htaccess to use on the IPS Community Suite Forums. It helps to improve your forums Google Page Speed and YSlow scores.
    The top segment is the same .htaccess that is generated by the IPS Forum software. This segment is Invision Power Services code and I do not claim it as my own. All rights and credit for this segment of the .htaccess are Invision Power Services.
    The bottom segment is based upon research of several websites and the references listed below. Please be careful when using this file because the contents may be incompatible with your server setup. Preventative measures have been taken to ensure that it should be safe to use in any Apache based environment.
    Warning: If you have customized your .htaccess file you will want to make the necessary edits to add the code included in the .htaccess file found in this package.
    When you make updates be sure to remind users to clear their cache. You can also refer them to this URL for instructions on how to do clear their cache: https://wiki.lunarsoft.net/wiki/Clearing_browser_cache
    Google recommends a minimum of one week: https://developers.google.com/speed/docs/insights/LeverageBrowserCaching
    GTmetrix recommends a minimum of one month: https://gtmetrix.com/leverage-browser-caching.html
    Best of luck,
    Tarun
    https://www.lunarsoft.net

    2,215 downloads

       (7 reviews)

    Updated

  2. Free

    Toggle Developers Mode On/Off Deluxe

    TLDR for Version 5;
    1) Toggle developers mode on and off via a ACP usermenu option.
    2) Alter the styling of the IN_DEV mode look in the ACP.
    3) V5 let's you toggle other IN_DEV related constants on and off as well.

    1. Does there exist in the world a better gif to use as a primary screenshot?
    No.
    2. If you are a CIC user OR you do not have an actual dev folder present and you will never be able to use this. I check. 
    3. You must already have a constants.php file. This won't make one for you.
    4. The lines within should look like this: \define('IN_DEV_STRICT_MODE', TRUE); 
    I've got no desire to turn this into a massive parsing operation checking for spacings, double vs. single quotes, comments and the like. Even less desire to pull the file in line by line, DOM it(?), turn every bit into a stored setting, and reconstruct it all the time. The only space you see there in that line is after the comma. The quotes are single quotes. Stick with that formatting and we'll all have a good time.
    5. This constants file MUST have the \define('IN_DEV', TRUE ); line already in there. True or false; either one. But you need at least that.
    6. If you don't have a constants.php file and try to turn dev mode on/off the plugin will insult you, or just tell you it can't be found. 
    7. This grabs the constants.php content, case insensitive regex for the IN_DEV true or false, switches yonder true/false, then redirects. You can choose between the Application page or the Plugin page for the redirect in settings.
    8. I'm targeting single quotes for 'IN_DEV', so don't use "IN_DEV" in your constants.php. Yes I could deal with that. I could... But like I said above, I'm not. This is me reminding you again - about both things.
    9. The toggle lives on your ACP usermenu drop-down.

    10. Can't stand the flask icon? Change them up in settings. Both on and off icons are customizable.
    11. dmt_on and dmt_off are the language bits you want if the existing words are not to your tastes.
    12. 4.3 and later users of this can now format the warning square and screen edge line that we got with the 4.3 series. Don't want construction yellow and candy stripe edge line? I got ya.
    13. Was I drunk when I first wrote this years ago? 
    Yes. The kind where you keep editing the constants.php manually to check stuff in and out of dev, then stop and wonder why the hell you are doing this manually and then the booze says "Fix this... you know you want to..."
    14. Deluxe? What's happened? 
    I'm not drunk now and want to change a few more IN_DEV constants. I also cleaned a few things, added some new settings, changed some language, the usual.
    15. Other constants like...?
    Most of the IN_DEV related ones. I'm skipping any that require you to specify a path or name; if you need that, you've got a lot going on and can manage adding it yourself. Those are not likely to be changed often or ever anyways.
    16. Menu option for updating constants is underneath the dev mode on/off menu option.
    17. For this new feature, you MUST already have the constant you want in your constants file. So if you want to toggle the strict coding checks on and off, add \define('IN_DEV_STRICT_MODE', TRUE); to your constants file. The plugin will then make that available to toggle on/off. Yes, it's this way because I do not want to turn this into a line parsing thing. 
    18. Oh yeah, the Dev Mode Constants menu option is ONLY AVAILABLE when you are IN_DEV, when you are not IN_DEV only the toggle dev mode on button is visible.
    19. You should make them all there already, and let us write them into constants on the fly and....
    No. Go away. Also adding all of them and you have 20-some toggles in a row (ask me how I know...). You probably only ever use a few of them anyways. This is a simple utility, it's not gonna be any more. CodingJungle's tools are pretty on the ball; maybe he's got that already all set up, but those tools are not always updated along with new Invision Community versions, so I wanted this toggle thing to be version-agnostic, bullet-proof, and always available and working for the most part.
    20. I got other things in my constants and I comment out stuff and...
    No problem, it's just replacing when it matches. All your other constants junk remains untouched. I know, people put other stuff beyond the IPS known-constants in there. And they comment stuff out however they comment it out, etc... Another reason why this is not a line parsing document thing. You want all that, you write it.
    20. Wait! 4.5 no longer parses the custom css theme directory on the ACP side anymore so how can you change the dev mode alert styling? This is still just a plugin!
    There is that head css method thingy but I'm skipping that. I added a template, just filled that with the CSS, the settings parse there, and I dump that template into the head at the end. If you need to add your own extra ACP css for whatever, just track down my template and add what you want at the end. EDIT: Yeah, lol, maybe not... \IPS\Output::i()->headCss it is so no one has to make a dev folder for this thing... True story: IPS uses the head css method themselves exactly one time throughout all of their apps.
    21. Oh, and on the constants toggle popup I list every IN_DEV constant that this handles - just hover over them for a tooltip that explains what they do.

    I can't really imagine anything else that's gonna get added to this plugin so consider this a wrap, minus future compatibility fixes. You can suggest something but I'm struggling to see what anything could be... 
    100% free as always but I do get thirsty from time to time... Tip jar open via the PayPal with scott@all-astronauts.com
    Invision Community 4.2.x devs can use version 1.1
    Invision Community 4.3.x and 4.4.x devs can use version 1.1 through version 3.
    Version 4 is quick compatibility fix for Invision Community 4.5
    Version 5 is the first deluxe version, the one that includes the extra constants toggling, and is for Invision Community 4.5
    Version 5.1 is me removing the CSS template insert in favor of \IPS\Output::i()->headCss so no need for a dev folder for this derpy thing when you toggle dev mode on...
    Heads up -> Dev folder is available for download under the additional information tab above. You'll still need this probably if you want the lang bits to show how ya' like.

    202 downloads

       (2 reviews)

    Updated

  3. Free

    (DP42) Export Lang per App

    With this simple plugin you can download separate translations per app

    149 downloads

       (4 reviews)

    Updated

  4. Free

    (itzrest) Rest API extension

    Attention: since version 4.1.0 the custom API has been removed completely. This extension only adds the following additional endpoints / functions:
    New endpoint POST /api/forums/posts/{id}/react to react to a post New endpoint DELETE /api/forums/posts/{id}/react to remove a reaction from a post All returned Post objects (i.e /api/forums/posts) provide new fields reactionCount and reactions - so you can see who reacted to a post New endpoint /api/itzrest/forums to get a list of forums in a better way (with children) New endpoint /api/itzrest/forums/{id} to display a single forum New endpoints for profile statuses (only for current authenticated member) New endpoints to get staff New endpoints to get available reactions (you can use the ID number of a reaction to react to a post) New endpoint to react to status updates New endpoint to remove a reaction from a status update

    139 downloads

       (0 reviews)

    Updated

  5. Free

    Power Tools

    Power Tools
    Introduction
    Power Tools is a third party command line utility for Invision Power Suite developers. It aims to aid in development by packaging several useful command line script and applications together in one easy to use application.
    ☕ Found this useful? Want to support further development? Show your support by buying me a coffee!
    - https://ko-fi.com/makoto_dev
    Installation
    If you are on Linux, there is an optional executable included in the release package which you can extract and copy to /usr/local/bin for convenience.
    Otherwise, just extract the included ptools.phar file to the directory of your IPS installation. Then, from your terminal window, navigate to the applications directory and run ptools.phar as you would any other PHP script from the command line,
    $ php ptools.phar Power Tools version 1.0.1 Usage: command [options] [arguments] Options: -h, --help Display this help message -q, --quiet Do not output any message -V, --version Display this application version --ansi Force ANSI output --no-ansi Disable ANSI output -n, --no-interaction Do not ask any interactive question -v|vv|vvv, --verbose Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug Available commands: classmap Generate a map of error codes for classes in an IPS application help Displays help for a command list Lists commands tinker Launches an interactive shell interpreter for an IPS installation generate generate:activerecord Generates an Active Record boilerplate class generate:content-comment Generates a Content Comment boilerplate class generate:content-item Generates a Content Item boilerplate class generate:content-node Generates a Content Node boilerplate class proxy proxy:regen (Re)generates all proxy classes for the application Features
    Tinker
    Tinker is one of Power Tools most.. well, powerful features! The name tinker was inspired by Laravel's own "tinker" command, and it essentially operates in the same manner.
    Both are powered by PsySH, an application that provides an extremely powerful PHP REPL for your applications.
    Stop making your life difficult by executing arbitrary code in random modules for testing, or worse yet, actually trying to use the native PHP CLI interpreter.
    Need to test if your Item class is working correctly? Just pop into the REPL and give it a whirl!
    Everything in the tinker shell essentially works as your application does when run through the web browser. You can even get documentation on class methods right from within the interpreter,

    PsySh is a truly awesome tool. To learn more about it and all the features it offers you, check it out on PsySh.org.
    Proxy Classes
    Due to IPS 4.x's monkey-patching based framework, several useful features of your IDE will be rendered non-functional (suggestions, code completion, etc). This command generates proxy classes for your your IDE (including support for 3rd-party applications), so it will be able to properly reference IPS' classes regardless of monkey-patching.

    The proxy class generator can even automagically generate property mappings to all your database columns!

    Class Generators
    Power Tools comes with several powerful and fully featured class generators for IPS Nodes, Items, Comments and generic Active Record classes. These generators take care of all the necessary boilerplate for you automatically.
    For example, generating a new Content Item class is as simple as running a single command and following the on-screen input prompts:
    <?php namespace IPS\induction\Test; /* To prevent PHP errors (extending class does not exist) revealing path */ if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) ) { header( ( isset( $_SERVER[ 'SERVER_PROTOCOL' ] ) ? $_SERVER[ 'SERVER_PROTOCOL' ] : 'HTTP/1.0' ) . ' 403 Forbidden' ); exit; } class _Item extends \IPS\Content\Item { /** * @brief Application */ public static $application = 'induction'; /** * @brief Module */ public static $module = 'induction'; /** * @brief Database Table */ public static $databaseTable = 'induction_items'; /** * @brief Database Prefix */ public static $databasePrefix = ''; /** * @brief Multiton Store */ protected static $multitons; /** * @brief [ActiveRecord] ID Database Column */ public static $databaseColumnId = 'id'; /** * @brief Default Values */ protected static $defaultValues = NULL; /** * @brief Node Class */ public static $containerNodeClass = NULL; /** * @brief Comment Class */ public static $commentClass = NULL; /** * @brief Review Class */ public static $reviewClass = NULL; /** * @brief Database Column Map */ public static $databaseColumnMap = array( 'container' => 'category_id', 'author' => 'author_id', 'views' => 'views', 'title' => 'title', 'content' => 'content', 'num_comments' => 'num_comments', 'last_comment' => 'last_comment', 'last_comment_by' => 'last_comment_by', 'last_comment_name' => 'last_comment_name', 'last_review' => 'last_review', 'date' => 'date', 'updated' => 'updated', 'approved' => 'approved', 'approved_by' => 'approved_by', 'approved_date' => 'approved_date', 'pinned' => 'pinned', 'featured' => 'featured', 'locked' => 'locked', 'ip_address' => 'ipaddress' ); /** * @brief Title */ public static $title = NULL; /** * @brief Icon */ public static $icon = 'file'; /** * @brief [Content] Key for hide reasons */ public static $hideLogKey = NULL; /** * @brief Form Lang Prefix */ public static $formLangPrefix = 'induction_'; /** * @brief Reputation Type */ public static $reputationType = 'id'; } Class Mapping
    The classmap command maps unique ID numbers to your applications class files. These ID numbers are then stored and maintained for use in error codes.
    By maintaining and actively using a proper error code scheme, you can easily and transparently map the location of errors that are triggered in production.

     
    This application is available under the Mozilla Public License 2.0. I welcome developers to extend and enhance this tool as they wish, but please make sure you understand the licensing requirements before doing so.

    39 downloads

       (0 reviews)

    Updated


×
×
  • 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