I’m using a proprietry open source Ecommerce system to complete a project at the moment all it’s file extensions are renamed to *.phtml. This means I lose syntax highlighting in Dreamweaver, to add a new document type for syntax highlighting you can do the following:
If you’re using a Mac CMD click on the Drewamweaver app, this will open the install directory; if not just navigate to the directory.
Open the file ‘configuration/DocumentTypes/MMDocumentTypes.xml’ file - in Dreamweaver why not.
Pick the syntax highlighting you want, in my case it was PHP so I scrolled down or search for the extension in the XML doc. In my case PHP was on line 75.
You want to add the extension you want where it says fileextension=”…”. If you’re Mac you can ignore the winfileextension and vice versa if you’re Windows. The new line will look like
Expression Engine ships with no URL rewriting, and that means that every page on your expression engine website will be prefixed with index.php. To remove the .index.php from each page you’ll need to do some URL rewriting. Expression Engine have some documents detailing how to remove index.php on their website, but they don’t cover if you’re hosting your site from a subdirectory (www.mysite.com/subdirectory/expressionengine/)
To remove index.php from your pages, just create a file in the root of your expression engine install called .htaccess. This will tell Apache how to rewrite the url to remove the offending prefix. Here’s how to do that: read more…
jQuery is damned powerful there’s no doubt about it, but it’s a swine to get started with and the documentation was written by nerds for nerds. The shameful thing is, it doesn’t need to be so hard. I’ve recently made use of a drag / drop style list that will remember the order of the list.
If you use the standard jQuery sortable items, you’ll get the two following problems:
You won’t be able to click on any items in the sortable list you have
You’ll probably want an update of the order of the list after every change.
I did find a solution to the problem over at Scott Sauyet’s site, but I needed a little more… The following example will do both, it uses the handle and update options on the .sortable item. By adding these simple items you can produce a pretty advanced sortable list. You could even add AJAX into that update command and automatically update your database with the new values every time you change then removing the need to refresh, and that’s very web 2.0.
I was recently looking for a way to upload large images for the web and automatically create different sizes (small, medium and large.) The only viable way to do it is with Java because it can all be done client side. If you do the work server side, you’ll be uploading a large file then using a lot of processor power to resize it.
I’ve tried a few and the one that came out on top was the JumpLoader it’s good looking, functional and customisable. When uploading several versions of an image at different sizes though it will zip them up (for transfer purposes,) you’ll then have to unzip them - here’s the PHP to do that.