ICEcoder 8.1 Manual
introductiondemo
features, download & more
requirements
setup/installation
usage
plugins
adding extra languages
troubleshooting
faq (frequently asked questions)
license
introduction
ICEcoder is a browser based code editor which provides a modern approach to building websites by allowing you to code directly within the web browser. This, in turn, means you only need one program (your browser), plus can test on actual web servers and after development, maintain the website easily, all of which make for speedy and smart development. Because it is web based you also can do this from any internet enabled computer with a modern browser and because it's built with common web languages, customise it to your liking.demo
Can be found at demo.icecoder.netfeatures, download & more
Can be found along with the latest news at icecoder.netrequirements
You will need:- Apache or similar (eg Nginx) web server environment
- PHP 7.0 minimum
It can either run on web server or on a local machine. Windows and Mac users can use programs such as WAMP, MAMP or XAMPP or an Apache or Nginx web server & PHP installation to provide the environment they need. It should run just fine in Chrome, Firefox (latest versions), Safari, Edge and Internet Explorer (v11+), locally or on a live server.
If you have PHP availale to you, you can simply run php -S localhost:8080 from the ICEcoder dir and go to localhost:8080 in your browser.
setup/installation
- Download via the icecoder.net website
- Follow the 3 install steps on the bottom right of the ICEcoder Home page
- Begin coding!
usage
ICEcoder has a huge amount to it, even tho it seems simple on the surface. The best thing to do is experiment to get to grips with advanced features.New users can take note of these things to get started:
- Click files in the file manager to select
- Double-click files to open
- Right click on them to show a context menu
- CTRL + clicking will select multiple
- CTRL/Cmd + S to save
- Go to Help > Shortcuts for more usage info
plugins
There are lots of useful plugins, accessed by moving your mouse to the left edge of the file manager, or by clicking the plugins icon in the file manager. Installing plugins does require unzipping the file, so zipArchive must be enabled on your server.There may also be times when you'd like to create your own custom plugin. Thankfully, you already know how to write plugins as they're written with web languages! Follow the handy guide below to write your first plugin in around 5 mins.
- Create a new 'myplug' dir in ICEcoder's /plugins dir
- In that dir, create an icon image of around 28px square, called 'icon.png'
- Also in that dir, add a new text file, called 'myplug.html'
- Open myplug.html and add:
- <script>top.ICEcoder.goToLine(20);</script>
- Open your settings file in /lib/config-* (eg config-localhost.php or config-mydomain.php)
- Add a new array item in the "plugins" array:
- array("My Plug - Hello World!","plugins/myplug/icon.png","","plugins/myplug/myplug.html","fileControl:Going to line 20","");
- Click the update button and your plugin should now show in the plugins panel
- Click your plugin to go to line 20 of the current document!
This is a very basic example but just shows how you can write a plugin to interact with ICEcoder or do whatever you wish. In this case, when the plugin icon is clicked on it will open the URL in the fileControl iFrame, which runs your JavaScript and intertacts with ICEcoder, which in turn runs your command, in this case, to tell the current document to go to line 20.
The parameters for the plugin are:
name, icon path, style extras, URL, target, set interval (in mins)
Target can of course be any suitable target such as _blank, _new etc or fileControl which is ICEcoders hidden iFrame, suitable for running tasks without opening a new window.
If you add a value for set interval, eg "5", it will trigger your URL every 5 minutes as well as when you click it.
ICEcoder has a rich API which allows you to interact with it in many ways so you can create useful plugins. See further down the manual at api.
adding extra languages
ICEcoder supports a lot of common languages but you may find you want it to support something extra.Adding languages is relatively simple and will take about 15 mins if you follow these steps:
- Open ICEcoder's editor.php file and near the top you will see 3 commented lines indicating all the files that need to be included. Select all of these on CodeMirrors compression helper page plus the extra language(s) you want to include and press the button to create a new compressed file. Replace the lib/codemirror-compressed.js file in the CodeMirror dir with this new file.
- Open images/file-folder-icons.png, make the file 16px wider, leaving your 16px square gap to the right and add your 16x16pixel icon there.
- Add a new line in lib/file-type-icons.css for your new language and include the new pixel position for it (16px on from the last one).
- Search the ICEcoder repo for the word 'coffee' and and add your new language in a similar way (file extensions and word to use, plus considering the comment type).
ICEcoder should now support the extra language(s)!
faq (frequently asked questions)
Why can't I save/create my file or dir?This could be a number of reasons but is almost always server related. Perhaps you have an .htaccess with rewrite rules causing confusion, or the file doesn't have high enough permissions to write it. It's best to first check if you can write to the file with PHP itself as ICEcoder uses PHP for all its file handling processes, so whatever PHP is permitted to do is what ICEcoder will be permitted to do. This means consider the file write permissions and maybe also the owner and group the file belongs to using chown and chgrp.
How do I setup multiple users?
Firstly, login as a single user and then go to the Settings > Accounts section. In here you can enable the multi-user setting and enable registration too. Now when your users visit the ICEcoder login page, users can enter a username as well as password and have their own user account within ICEcoder. Don't forget to disable registration when you want no more registrations.
Are multiple users segregated?
Not at present, ICEcoder is more intended for teams of trusted developers, rather than for users you may not trust. It is easy enough for users within an ICEcoder install to find each other, items they've worked on etc, so bear this in mind that it provides no security between users.
How can I isolate a website to a user?
Users can focus on seperate dir within your ICEcoder install by going to Edit -> Settings and under the 'root' section set the sub-dir they wish to focus on. ie, if your document root contains httpdocs/siteA and httpdocs/siteB, then a user can enter their root setting in the UI as /siteA or /siteB. Now they see that as the top of the file manager. As mentioned above, it's not meant to provide security or solid isolation and a user could change their root setting to see another users assigned dir if they wish.
My server has multiple dirs, do I need multiple installs?
You can set up multiple installs of ICEcoder if you wish, one per site, but it should also work fine to if you setup ICEcoder within one site and create a symlink dir to it from other sites. This way, you only need to set it up once.
How do I find and replace?
ICEcoder has an innovative find and replace 'builder', which is awesome when you discover it. Simply make up a sentence regarding what you'd like to achieve, ie Find [x ] [and] [replace all] with [y ] in [this document]. In short, use the dropdowns to reveal new options so you can perform the type of find and replace you'd like.
Can I use FTP?
No, not any more. Old versions of ICEcoder had an FTP manager, but there's often better cloud based solutions these days and storage of FTP creds was a security concern, so FTP was dropped from ICEcoder 8 beta onwards.
Can I generate accounts server-side?
Yes. There's a classes/Settings.php file which you can require with PHP and then make use of class methods to get, set and update global config and users config data.
See this GitHub issue for more information.
Have a question we've not answered?
Contact us for help and advice, we're happy to help answer questions and if it's asked frequently enough we'll list it here (and maybe address it with improvements in ICEcoder).
troubleshooting
While ICEcoder works fine on almost all PHP environments (v7.0 and up), I've found about 1% of the time people run into issues, particularly regarding initial setup, opening or saving files. This usually turns out to be some server oddity that's stopping it working as expected, so here's what to look for.Why can't I save/create my file or dir?
This could be a number of reasons but is almost always server related. Perhaps you have an .htaccess with rewrite rules causing confusion, or the file doesn't have high enough permissions to write it. It's best to first check if you can write to the file with PHP itself as ICEcoder uses PHP for all its file handling processes, so whatever PHP is permitted to do is what ICEcoder will be permitted to do. This means consider the file write permissions and maybe also the owner and group the file belongs to using chown and chgrp.
Internal Server Error
On some servers you can put ICEcoder in place, set permissions, open in a browser and it shows an internal server error. This seems to be more down to your host permissions you've just set, not allowing anything to run. If you've tried 775, 757 and even 777 and still get problems, set back to 755 and it'll maybe work. If you still have issues, looking at your servers error logs may provide the answer.
My password won't work/I can't get in?
The first thing is to ensure you're using the right password. Sounds obvious, but maybe you set something different on setup. Also note that the password is case sensitive. Assuming you are using the right password, it may be something to do with lib/headers.php, lib/settings.php or your servers use of $_SESSION. Again, looking into your error logs or the web tools console may provide clues.
I need to reset my password
In ICEcoders data dir you'll find a config-YOURDOMAINHERE.php file. That's a PHP serialized data file. Open that in a text editor on your server and within it (about half way along the long line of serialized data) you can set the "password" length & value back to 0 and a blank string. ie:
s:8:"password";s:0:"";
It should look EXACTLY like that when you've set s:0:"" instead of what you had previously. Reload ICEcoder login page in your browser and now you can set a password.
I can't open a file/just shows loading spinner?
This almost always seems to be down to a JavaScript issue. Press F12 to get the dev tools open and click the Console tab. Now hit F5 to reload and it'll likely show some JavaScript error.
Other issues?
Almost all setup/usage issues we get fall into the above 3 categories, but occassionally other issues do crop up. If there's a problem and you know a bit of PHP and JavaScript, you'll likely be able to investigate & fix it. A pull request on GitHub or even just contact to let me know eitherway helps everyone.