I was figuring out how to include Javascript in Smarty templates this afternoon, because you can’t include them directly. After digging around a bit, I realised that all you had to do was to include the Javascript code within {literal}{/literal} tags, like this: {literal} <script type="text/javascript"> var currentTime = new Date() var year = currentTime.getFullYear() [...]
Continue reading...11. December 2007
I was editing a PHP script today when I realised that one of the files did not allow PHP code. Weird. But the annoying thing was that I NEEDED it to run PHP code — or rather, I needed it to randomly display an image with a link. So I had to find other means, [...]
Continue reading...8. December 2007
I just found this out while playing around in ZenCart. If you have a ZenCart installation and you’re wondering how to remove that “Show Quantity in Stock” message from your product pages, there’s actually a setting in your admin panel to turn it off. Simply log into your admin panel and go to Admin > [...]
Continue reading...2. December 2007
Been playing around with Simple Machine Forums (SMF) — it’s a cool forum software that’s robust and well-supported by an active online community. For those who are unaware of this software, SMF is a free open-source forum application that can be installed on web servers. In contrast to paid software such as vBulletin and Invision [...]
Continue reading...18. October 2007
If you’re thinking of creating an online ecommerce store, then you’ve probably seen the exorbitant prices that web design firms charge for creating a customised ecommerce shopping cart system. Well, the good news is that there are really powerful open-source (read: free) software available that can do a good job. That’s right – not just [...]
Continue reading...15. October 2007
Okay, so you don’t have SSH access to your server, but you do have FTP access to it, and you need *all* the files in a folder. Worse, your directory structure is many levels deep, and extremely messy. Normal FTP won’t cut it, because command-line FTP doesn’t do recursive downloading of folders. Turning off interactive [...]
Continue reading...2. October 2007
I was looking around for the class to format a number to 2 decimal places while I was coding Java, or specifically JSP, and I found it. First, you need to import the DecimalFormat class, so have this line at the top of your Java file: import java.text.DecimalFormat; Or if you’re running JSP: <%@page import="java.text.DecimalFormat" [...]
Continue reading...
2. January 2008
0 Comments