Jump to content


Search In
  • More options...
Find results that contain...
Find results in...
Sign in to follow this  

Toggle Developers Mode On/Off

Recommended Posts

Invision    201

Please login or register to see this link.

Please login or register to see this link.

Toggle Developers Mode On/Off

So many questions:

1) Why did I make this instead of doing more productive things?

2) Why is this not baked into the software to begin with?

3) Why did it take me (anyone?) over two years to get around to making this?

4) Does there exist in the world a better gif to use as a primary screenshot?

Here is a list of things. You should read them.

1) If you install this on a live site to toggle dev mode on and off you ain't real smarts. If I've done my url check right, this cannot be used on live sites. 

Another 1) CIC user? Why are you here? You can't run developers mode on CIC. Also, I check for CIC installation and then stop you from doing something stupid like using this.

2) You must already have a constants.php file; this won't make one for you. Oh, I could, maybe later... I could even just add a full on "edit your constants file from the ACP" thing. Maybe. Buy me beer. Seems like an "I'm drinking so lets do this" coding thing. Oh yeah, this constants file should have the define( 'IN_DEV', TRUE ); line already in there. True or false; either one. 

Also 2) 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. Not entirely sure as I have a constants.php file and am far too attached to it to even move it for the briefest period of time, let alone rename it. This shall remain a mystery until @AndyF is forced to test it. And he has! No insult alas...

2 the Third) Another good thing to have is a dev folder. I check for that. Just the folder. If you want to enable developers mode with an empty dev folder that's up to you.

3) This grabs the constants.php content, case insensitive regex for the in_dev true or false, switches yonder true/false, then redirects. Where you ask? Journey to yonder plugin settings and chooseth your post-toggle target: the applications page or ye'olde plugins page.

4) 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.

5) The toggle you seek is on your ACP usermenu.

Hidden Content

    Give reaction to this post to see the hidden content.

6) You're stuck with fa-flask for an icon. I'll let you run wild and free with the next version whenever that is...

7) dmt_on and dmt_off are the language bits you seek if the existing words are not to your tastes.

8) IPS 4.2 or better. The usermenu hook might still be fine on 4.19.4 or lower but that's untested.

  • Submitter

    Please login or register to see this link.

  • Submitted
  • Category

    Please login or register to see this link.


Share this post

Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.