Allow editing .inc files
-
Many plugins have an “includes” folder with one or more PHP files, but with a “.inc” extension instead of “.php” and which are intended to be loaded via includes from other PHP files. Other than the extensions, there is no real difference internally.
And yet, Synchi currently shows only a generic icon for them, and reports “File not supported!” on any attempt to open one.
I attempted to edit “synchi.php” line 59 as follows:
// define supported extensions $synchi_extensions = array('php', 'js', 'css', 'sql', 'html', 'htm', 'txt', 'xml', '.inc');
(In addition to adding “, ‘.inc’” before the closing parenthesis, I also replaced all double quotes with single quotes aka apostrophes because that’s more efficient in PHP when you don’t need the escapes that double-quoted strings support.)
Doing this allowed me to open .inc files, but they did not appear in a proper IDE window. Instead, on WinIE 11, they appeared in a two-line narrow scrolling textbox, and froze much of the Synchi IDE except for the full-screen toggle which I was able to use to get out of it. Removing the “, ‘.inc’” and relaunching the Synchi plugin editor then recognized the .inc file I had open as not supported and automatically closed it, restoring full functionality.
So apparently something else has to be done somewhere to make .inc files work. Can this be added? I can see no good reason to lock us out of editing those.
- The topic ‘Allow editing .inc files’ is closed to new replies.