inSing.com: New website

May 18th, 2009 by Makis

Available on both online and mobile platforms, inSing is a one-stop destination for the Singapore audience that provides all the essential day-to-day information as well as comprehensive up-to-date coverage on local, international and entertainment news, events listings, food reviews and shopping deals.

I had a catalyst role on this project as the lead front-end designer. My duties included for the development side: cross-browser CSS, JavaScript programming with jQuery, the creation of a custom template engine using JSTL on a Java environment. In addition I had administration duties as I was managing a front-end team of 5.

The specifications for this website where strict but with persistence and dedication the end result met them in an almost ideal fashion. It is worth noting that the mobile site we created mirrors almost all of the content the website provides, which must make it one of the biggest mobile sites out there on a global scale.

Script: Post-load banner ads

May 17th, 2009 by Makis

Many website owners consider banners a good source of income and they strive to create the necessary traffic to be accepted by the more prestigious ad retailers.

On the down side these banners, magnificent as they may be, can make the website quite “heavy” and increase dramatically the loading times of the web pages. It would be ideal if there was a built-in feature by the ad servers that could delay showing the ads but I take this can be considered in the marketing circles more of an insult than a recommendation.

I had this problem with a website I was developing and I knew I had to find a solution, as performance was crucial. With some help from jQuery I happily found an elegant way that did the trick.

The general idea can be outlined in these steps:
1. Create the containers that host the banners empty
2. Inject and load the banners in a 1×1 iframe.
3. Copy the generated banner code to their intended containers.
4. Delete the dynamically created iframe and leave no trace.

To make this work you will need the containers of the banners in your markup, each assigned with a unique id. Additionally, you will need an extra page that will load the actual banner code, using the SAME container names.

When you have this, here is the JavaScript you need to insert in your pages:


/* Functions to load and show the banners post-load*/
function loadBanners(){
$("body").append('<iframe src="http://www/YOUR/ADS/PAGE” width=”1″ height=”1″ id=”ads-container” frameborder=”0″ />’);
}
function showBanners(){
var content= “”;
var banners = [”top-banner”,”left-banner”,”right-banner”];
//loop through all the ids we have specified above to contain banners
for ( var i in banners )
{
// remove the unnecessary script tags (that initially load the banners) - WARNING: this may not apply for you
$(’#ads-container’).contents().find(’#'+banners[i]+’ script:lt(2)’).remove();
// get the banner from the iframe
var content=$(’#ads-container’).contents().find(’#'+banners[i]).html();
// place the banner code in their containers in the main page
$(’#'+banners[i]).html(content);
}
// finally delete the container that loaded the ads
$(’#ads-container’).remove();

}

Replace:

  • “http://www/YOUR/ADS/PAGE”, with the actual page where you have all your banner code.
  • [”top-banner”,”left-banner”,”right-banner”], is an array containing all the ids of the containers you want to target.

Of course we need to trigger the first function the page loads…


$(document).ready(function() {
// finally load the banner ads for the page
loadBanners();
});

And then we need to trigger the second function when the ad page (in the iframe) loads. I’ll put in a sample code for the whole source code that contains the banner containers…


<html><body>
<div id="top-banner">[...BANNER CODE...]</div>
<div id="left-banner">[...BANNER CODE...]</div>
<div id="right-banner">[...BANNER CODE...]</div>
<script type="text/javascript"> $(document).ready(function() { showBanners(); }); </script>
</body></html>

And that’s it. Your pages are now free from the lagging of the banner code. Fortunately this solution does not rely on any specific ad provider and hopefully it will work for you whatever banners you use.

Flash-antics: New website

May 6th, 2009 by Makis

My long awaited portfolio for my flash-related work is online.

It’s using my very own KISSCMS as a back-end and a collection of PHP, JavaScript and Flash widgets running on the website along with it.

For the visual side, I wanted something minimalistic, and flashy cocky kind of way. I think my “mad scientist look here gives the final touch in that regards ;)

KISSCMS (v0.1)

April 19th, 2009 by Makis

A CMS lightning fast to setup and easy to use - based on KISSMVC, the simple PHP MVC framework. The main goal was the creation of an environment to easily add new content on a website while lifting the unnecessary barriers of extending it, as found in most popular CMSs.

click here for a demo

Download the Script

Version: 0.1
Language: PHP
File size: 20,8kb

Wordpress Plugin: Author Categories (v1.0)

April 10th, 2009 by Makis

Numerous people are using Wordpress for blogging and in many cases there are more than one authors on a website. It’s uncomfortably surprising that Wordpress doesn’t support out of the box a category menu for each author separately.

I was looking for this feature online for my personal need but couldn’t find it on any plugin. To be exact I was using a modified version of another similar plugin but that was until version 2.3 where the database structure changed for Wordpress and it simply stopped working.

As I saw it, it wasn’t worth fixing old, deprecated (and highly cluttered) code, and there weren’t any other solutions out there, so I decided to create a new plugin. Thankfully the new database and API made it as easy as I had hoped for.

I ended up with this plugin, that was created as a wrapper of the default category menu.

It is lightweight and can easily plug-in, plug-out. Furthermore, being an extension of the default category menu, means that none of the functionality (sorting, post count etc.) is lost. In fact it can be easily extended and could support future versions of the blogging platform for years to come.

Download the Script

Version: 1.0
Language: PHP
File size: 4,87kb