Skip to content

Commit

Permalink
Version 0.7.1
Browse files Browse the repository at this point in the history
Added shortcuts to phpMyAdmin patches.
Reorganised the way Default Server paths work.
Turn of spell checking in text area.
  • Loading branch information
manngo committed Nov 2, 2023
1 parent 416185a commit 27964d0
Show file tree
Hide file tree
Showing 7 changed files with 371 additions and 241 deletions.
Empty file added data/data.txt
Empty file.
22 changes: 22 additions & 0 deletions data/sample-php.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?php
$size = ' 23 x 45';
$pattern = '/^\s*(\d+)\s*[xX]\s*(\d+)\s*$/';
preg_match($pattern, $size, $matches);
print_r($matches);
[,$width,$height] = $matches;
print "width: $width\nheight: $height";
?>
<?php $a = 12 * 3; ?>
I got <?= $a; ?>
hohoho
Good, innit?

<?php $sent = false; ?>
Testing
<?php if($sent): ?>
plan a
<?php else: ?>
plan b
<?php endif; ?>
Finally

18 changes: 12 additions & 6 deletions data/servers.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
"mysql": "/xamppfiles/var/mysql",
"phpini": "/xamppfiles/etc/php.ini",
"phpmyadmin": "/xamppfiles/phpmyadmin/",
"phpcli": "/xamppfiles/bin/php"
"phpcli": "/xamppfiles/bin/php",
"phpmyadmin-config": "//\tAdditional Settings\n\t$cfg['AllowUserDropDatabase'] = true;\n\t$cfg['RetainQueryBox'] = true;\n"
},
"win32": {
"root": "C:/xampp",
Expand All @@ -23,9 +24,11 @@
"mysql": "/mysql/data",
"phpini": "/php/php.ini",
"phpmyadmin": "/phpMyAdmin/",
"phpcli": "/php/php.exe"
"phpcli": "/php/php.exe",
"phpmyadmin-config": "<?php\n\t//\tAdditional Settings\n\t\t$cfg['AllowUserDropDatabase'] = true;\n\t\t$cfg['RetainQueryBox'] = true;\n?>\n"
},
"vhost": ""
"vhost": "",
"phpmyadmin-css": "/*\tAdditional Settings\n\t================================================ */\n\tform#sqlqueryform div.CodeMirror pre,\n\tform#sqlqueryform div.CodeMirror-linenumber {\n\t\tfont-size: 1.25rem;\n\t}\n"
},
"mamp": {
"darwin": {
Expand All @@ -36,7 +39,8 @@
"mysql": "/db/mysql57",
"phpini": "/bin/php/php{version}/conf/php.ini",
"phpmyadmin": "/bin/phpmyadmin/",
"phpcli": "/bin/php/php{version}/bin/php"
"phpcli": "/bin/php/php{version}/bin/php",
"phpmyadmin-config": "<?php\n\t//\tAdditional Settings\n\t\t$cfg['AllowUserDropDatabase'] = true;\n\t\t$cfg['RetainQueryBox'] = true;\n?>\n"
},
"win32": {
"root": "C:/MAMP",
Expand All @@ -46,9 +50,11 @@
"mysql": "/db/mysql",
"phpini": "/conf/php{version}/php.ini",
"phpmyadmin": "/bin/phpMyAdmin/",
"phpcli": "/bin/php/php{version}/php.exe"
"phpcli": "/bin/php/php{version}/php.exe",
"phpmyadmin-config": "<?php\n\t//\tAdditional Settings\n\t\t$cfg['AllowUserDropDatabase'] = true;\n\t\t$cfg['RetainQueryBox'] = true;\n?>\n"
},
"vhost": ""
"vhost": "",
"phpmyadmin-css": "/*\tAdditional Settings\n\t================================================ */\n\tform#sqlqueryform div.CodeMirror pre,\n\tform#sqlqueryform div.CodeMirror-linenumber {\n\t\tfont-size: 1.25rem;\n\t}\n"
},
"ampps": {
"darwin": {
Expand Down
33 changes: 18 additions & 15 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ <h3>Virtual Host Settings</h3>
<li>Choose a Web Server Package</li>
<li>If you have installed the Web Server in a non-default location, select the folder.</li>
<li>If you prefer to use a different PHP Interpreter, choose the alternative interpreter executable.</li>
<li>Save the Settings for next time …</li>
</ol>
</div>
<div id="misc">
Expand All @@ -61,6 +62,7 @@ <h4>Choose a Web Server Root Folder</h4>
-->
<output type="text" name="server-root" value="" placeholder="Leave empty for default" title="Full Path to Server Folder"></output>
<button name="server-path">Select Folder …</button>
<button name="server-path-default">Default</button>
</div>
<div id="choose-php-interpreter">
<h4>Choose a PHP Interpreter</h4>
Expand All @@ -70,6 +72,10 @@ <h4>Choose a PHP Interpreter</h4>
-->
<output name="php-interpreter" value="" placeholder="Leave empty for default" title="Full Path to PHP Interpreter"></output>
<button name="php-interpreter-path">Select Interpreter …</button>
<button name="php-interpreter-path-default">Default …</button>
</div>
<div id="save-settings">
<button name="save-settings">Save</button>
</div>
</form>
<form id="hosts-file">
Expand All @@ -82,7 +88,7 @@ <h3>Hosts File (etc/host)</h3>
</ol>
</div>
<div class="textarea etc">
<textarea name="content">Open hosts file or Select Platform</textarea>
<textarea name="content" spellcheck="false">Open hosts file or Select Platform</textarea>
</div>
</form>
<form id="httpd-conf">
Expand All @@ -103,7 +109,7 @@ <h3>Apache Configuration File (httpd.conf)</h3>
</ol>
</div>
<div class="textarea etc">
<textarea name="content">Open httpd.conf file or Select Platform</textarea>
<textarea name="content" spellcheck="false">Open httpd.conf file or Select Platform</textarea>
</div>
</form>
<form id="virtual-hosts">
Expand All @@ -117,7 +123,7 @@ <h3>Virtual Hosts File (httpd-vhosts.conf)</h3>
</ol>
</div>
<div class="textarea etc">
<textarea name="content">Open vhosts.conf file or Select Platform</textarea>
<textarea name="content" spellcheck="false">Open vhosts.conf file or Select Platform</textarea>
</div>
</form>
<form id="generator">
Expand All @@ -135,7 +141,7 @@ <h3>Hosts Generator</h3>
<p><label for="root">Document Root</label><input type="text" id="root" name="root" value="…/…/example" placeholder="…/…/example" title="Full Path to Root Folder"><button name="path">Select Folder …</button></p>
<button name="generate">Generate</button>
</div>
<div class="textarea"><textarea name="content" class="textarea">The cat sat on the mat</textarea></div>
<div class="textarea"><textarea name="content" class="textarea" spellcheck="false">The cat sat on the mat</textarea></div>
</form>
<form id="php-ini">
<div class="help">
Expand All @@ -154,15 +160,15 @@ <h3>PHP Configuration File (php.ini)</h3>
</ol>
</div>
<div class="textarea etc">
<textarea name="content">Open php.ini file or Select Platform</textarea>
<textarea name="content" spellcheck="false">Open php.ini file or Select Platform</textarea>
</div>
</form>
<form id="misc-text">
<div class="help">
<h3>Miscellaeous Text File</h3>
</div>
<div class="textarea etc">
<textarea name="content">Open any file</textarea>
<textarea name="content" spellcheck="false">Open any file</textarea>
</div>
</form>
<form id="misc-actions">
Expand All @@ -172,24 +178,21 @@ <h3>Miscellaeous Actions</h3>
<div class="etc">
<p><button type="button" name="reset-mysql">Reset MySQL</button></p>
<p><button type="button" name="phpmyadmin-css">PHPMyAdmin CSS</button><button type="button" name="phpmyadmin-css-append">Append CSS Settings</button></p>
<p><button type="button" name="phpmyadmin-config">PHPMyAdmin Config</button><button type="button" name="phpmyadmin-config-pappend">Append Config Settings</button></p>
<p><button type="button" name="phpmyadmin-config">PHPMyAdmin Config</button><button type="button" name="phpmyadmin-config-append">Append Config Settings</button></p>
</div>
</form>
<form id="php-runner">
<div class="help" id="php-help">
<h3>PHP Runner</h3>
</div>
<div id="php-code">
<textarea name="code" placeholder="Enter your PHP"></textarea>
<textarea name="code" placeholder="Enter your PHP" spellcheck="false"></textarea>
<code class="language-php" contenteditable="true">Content</code>
<button name="doit">Run</button>
</div>
<!--
<div id="php-control">
<label><input type="checkbox" name="html"> HTML Mode</label>
<button name="doit">Run</button>
<div id="php-control">
<label><input type="checkbox" name="php-tags"> HTML Mode</label>
<button name="doit">Run</button>
</div>
</div>
-->
<div id="php-result">

</div>
Expand Down
2 changes: 1 addition & 1 deletion main.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
submenu: [
{ label: `New Document`, accelerator: 'CmdOrCtrl+N', id:'NEW', click: send },
{ label: `Open …`, accelerator: 'CmdOrCtrl+O', id:'OPEN', click: send },
{ label: `Reload`, accelerator: 'CmdOrCtrl+R', id:'LOAD', click: send },
{ label: `Reload`, accelerator: 'CmdOrCtrl+R', id:'RELOAD', click: send },
{ label: `Save`, accelerator: 'CmdOrCtrl+S', id:'SAVE', click: send },
{ label: `Save As …`, accelerator: 'CmdOrCtrl+Shift+S', id:'SAVEAS', click: send },
{ type:'separator' },
Expand Down
Loading

0 comments on commit 27964d0

Please sign in to comment.