Archive for January, 2010

IBK Cart

Sunday, January 31st, 2010

Screenshot
Package:
IBK Cart
Summary:
Manage shopping carts with products from MySQL
Groups:
Databases, E-Commerce, HTML
Author:
Ibikunle Nuel
Description:
This class can be used to manage shopping carts with products listed in a MySQL database.

It can add items to the cart, update item quantities, delete items from the cart, and empty the cart.

The class may also list the items from the cart in an HTML table.


Tags: ,
Posted in Classes | No Comments »

Arab Temp

Sunday, January 31st, 2010

Package:
Arab Temp
Summary:
Caching template processing engine
Groups:
PHP 5, Templates
Author:
Ahmed Amar
Description:
This class implements a caching template processing engine.

It takes a template file or string and processes it to generate a cached version that is a PHP script to be executed when the template output is processed.

The engine supports replacing variables, iterate over array variables inside loops, conditional sections, include separate template files, use variable sub-strings, use object variables, use GET or POST values, etc..


Tags: ,
Posted in Classes | No Comments »

[Free] New Email Software: Claws Mail

Sunday, January 31st, 2010

Looking for an email program that you can run on your own computer? The newest addition to the Free Email Clients page works on Windows, Linux, FreeBSD and Solaris, and can handle multiple email accounts, email filtering, spell checking, all the usual email protocols, and even has built-in support for encrypted email (using GnuPG). Check it out.

Tags:
Posted in Uncategorized | No Comments »

ini2Obj

Saturday, January 30th, 2010

Package:
ini2Obj
Summary:
Access INI configuration files as objects
Groups:
Configuration, PHP 5
Author:
Amin Saeedi
Description:
This class can be used to access INI configuration files as objects.

It can parse a given INI file and allow accessing the values of the configuration properties as variables of an object or entries of an array.

An additional class provides the Countable and Array access file, so the configuration entries can be traversed like arrays.

It is possible to create and use hierarchical ini files.


Tags: ,
Posted in Classes | No Comments »

Simple Pagination Class

Saturday, January 30th, 2010

Package:
Simple Pagination Class
Summary:
Show links to browse MySQL results split in page
Groups:
Databases, HTML, PHP 5
Author:
Jay Gilford
Description:
This class can be used to show links to browse MySQL results split in page.

It takes a MySQL query string and the number of page currently being browsed and generates HTML links to browse the other pages of the query results listing.

The templates of the HTML links and the base link URL are configurable parameters.


Tags: ,
Posted in Classes | No Comments »

JavaScript from Null: Chapter 5 โ€“ Events

Friday, January 29th, 2010

As we move forward with JavaScript University, today, we’ll learn how to add event handlers to elements on the page. Unfortunately, this can be more cumbersome than we’d hope, due to the fact that Internet Explorer must always be the black sheep. Nevertheless, we’ll learn how to abstract these inconsistencies away to our custom utility function.

As with every JavaScript from Null screencast, it’s not essential that you view the previous entries in the series before watching.

Catch Up

In this Screencast, you’ll Learn About:

Chapter 5: Events

Other Viewing Options

Ready to take your skills to the next level, and start profiting from your scripts and components? Check out our sister marketplace, CodeCanyon.

CodeCanyon



Tags: , , ,
Posted in PHP Tutorials | No Comments »

Quick Tip: JavaScript Event Delegation in 4 Minutes

Friday, January 29th, 2010

Event delegation can be a confusing topic for those who are unfamiliar with the concept. But, luckily, it’s really simple. In this quick tip video tutorial, I’ll demonstrate the concept in just under four minutes.

Imagine that you have five hundred anchor tags on your page. As you might imagine, adding a click event to every one of those would be time consuming, and unnecessary. On top of that, what happens if, once you click on those anchor tags, we add additional anchor elements to the page? Would those new anchors be bound to the click event as well? The answer is no. You would then have to reattach a listener to those newly created elements.

Enter Event Delegation

Instead, with event delegation, we simply add a single event listener to an ancestor element, maybe something like a “ul.” Then, when the user clicks on one of its child elements, like an anchor tag, we only check to see if the target of the click was, in fact, an anchor tag. If it was, we proceed per usual.

$('ul').click(function(e) {

	if ( $(e.target).is('a') ) {
		alert('clicked');
	}
});

Advantages

Why Does this Work?

It works because of the way elements are captured (not IE) and bubble up. For instance, consider the following simple structure.


When you click on the anchor tag, you’re also clicking on the ‘li’ and the ‘ul’ and even the ‘body’ element. This is referred to as bubbling up.

Notes About this Screencast

Please keep in mind that this is just a simple example to explain the functionality. We used jQuery, only because I had four minutes to record! In that particular example (watch the screencast first), we could have used two alternative options:

  1. Pass true as a parameter of the clone() method. This would then clone the element, as well as any event handlers.
  2. Use the live() method instead. However, be careful when using this method: it reattaches the event handler X times. This may not necessarily be needed.

Mostly, this was meant to demonstrate the idea. With regular JavaScript, you could do something like:

// Get some unordered list, which contains anchor tags
var ul = document.getElementById('items');

// Quick and simple cross-browser event handler - to compensate for IE's attachEvent handler
function addEvent(obj, evt, fn, capture) {
	if ( window.attachEvent ) {
		obj.attachEvent("on" + evt, fn);
	}
	else {
		if ( !capture ) capture = false; // capture
		obj.addEventListener(evt, fn, capture)
	}
}

// Check to see if the node that was clicked is an anchor tag. If so, proceed per usual.
addEvent(ul, "click", function(e) {
  // Firefox and IE access the target element different. e.target, and event.srcElement, respectively.
  var target = e ? e.target : window.event.srcElement;
  if ( target.nodeName.toLowerCase() === 'a' ) {
     alert("clicked");
     return false;
  }
});


Tags: , , ,
Posted in PHP Tutorials | No Comments »

iLister Multi-Purpose Listing Script

Friday, January 29th, 2010

iLister multi-purpose listing script is a multi-language SEO-optimized PHP listing script for creating classifieds ads websites with multiple categories. iLister business listing script offers flexible membership plans system and rich advertising opportunities. Convenient billing and payment management makes all transactions smooth and fast. Сustomizable templates and themes and powerful CMS give the unique look and feel to attract more visitors.

Tags:
Posted in Free PHP Scripts | No Comments »

iRealty PHP Real Estate Script

Friday, January 29th, 2010

iRealty Real Estate Script is a SEO-friendly realty PHP script with multi-language user interface. Key features: videos and images for listings, great listing search and browsing features, multiple listing types (houses, apartments, businesses); user groups with profiles; flexible membership plans system and rich advertising opportunities; convenient billing and payment management; customizable templates and themes and powerful built-in CMS.

Tags:
Posted in Free PHP Scripts | No Comments »

iAuto Auto Classified Software

Friday, January 29th, 2010

iAuto Auto Classified Software is a SEO-friendly auto classifieds script with multi-language user interface. It is a perfect solution for websites that sell vehicles for land, air, or water. Rich feature list to make your classifieds site useful, attractive, informative and easy-to-use.: flexible membership plans, convenient billing and payment management, customizable templates and themes and powerful built-in CMS.

Tags:
Posted in Free PHP Scripts | No Comments »