UItoTop jQuery Plugin

uitotop

Current version: 1.1 3/4/10

— Inspired by the great idea of David Walsh’s jQuery topLink Plugin, I made a similar plugin but with two key differences, this one does not require you to add extra html markup or extra plugins to function. It will only work when JavaScript is turned on ( on purpose ), It’s easy to setup with only one line of code, and it works cross-browser nicely ( Tested: IE6-8, FF, Safari ). Optionally it can benefit from the jQuery Easing plugin with a different easing animation for the page scrolling.

→ UItoTop: View the demo | ↓ Download

› Continue reading

Tags: , , ,

Thursday, September 3rd, 2009 Web Design & Development 6 Comments

SimpleForm: Easy PHP multi-form email handler

— It’s been a while, but today I am releasing a new version of my contact form script, this time under the name SimpleForm. It’s a nicer version of the previous one, re-written from the ground up and with a couple of new features. SimpleForm is basically meant to be an easy solution to handle one or many forms with little effort. It’s mainly focused on ease of use and rapid deployment.

simpleform

Current version: 1.1.4 7/31/09

These are a couple of it’s main features ( ver. 1.1.4 ):

* Multiform handler.
* Support for required fields.
* PHP email validation.
* Unobtrusive JavaScript function to pre-check form data ( 4KB file ).
* Lightweight, easy to use.
* Multilingual support.
* External configuration file that can reside outside the public folder.

→ SimpleForm: View the demo | Mutiple Forms | ↓ Download

HOW DOES IT WORKS?

It’s very simple, first there is a configuration file where you define all of your website forms, by this I mean form title, form fields, form required fields and the location of each form. Then there are some snippets you have to add to your form page/s and thats all. SimpleForm takes care of pre-cheking the form fields with JS and then validating them with PHP, if it’s valid then it will send the email to the configured email address and return the user to the form page with a success message or otherwise, with an error message.

INSTALLING THE SCRIPT

These are the necessary steps to have it up and running ( requires PHP 5 ):

  1. Download SimpleForm ( ver 1.1.4 )
  2. Open sf-config.php and edit the necessary info.
  3. Upload sf-config.php to your host ( preferably outside the public folder ).
  4. Open simpleform.php and edit the variable $PATH_TO_CONFIG_FILE ( on line 24 ) with the path from simpleform.php to sf-config.php ( leave empty if it resides on the same folder ).
  5. Upload simpleform.php, simpleform.css and checkform.mini.js inside your public folder.
  6. Open your form page/s and add the necessary code snippets.

› Continue reading

Tags: , ,

Thursday, April 16th, 2009 Web Design & Development 55 Comments

Custom WordPress function to check page parent

— Quick update to the is_subpage() function. Basically it’s does the same but now it also accepts an integer to check if the current page is a child of certain ID. This way its easier to track if the current location is a subpage of a certain page. If it matches it will return a true value otherwise, it will be false.

→ Download the function here
function is_subpage( $iID = null )
	{
		global $post, $wpdb;

		if ( is_page() AND isset( $post->post_parent ) != 0 )
		{
			$aParent = $wpdb->get_row( $wpdb->prepare( "SELECT ID FROM $wpdb->posts WHERE ID = %d AND post_type = 'page' LIMIT 1", $post->post_parent ) );

			if ( is_int( $iID ) > 0 )
				if ( $aParent->ID == $iID ) return true; else return false;
			else
				if ( $aParent->ID )	return true; else return false;

		}
		else
		{
			return false;
		}
	}

/* EXAMPLE */

if ( is_page('producs') OR is_subpage( 8 ) )
{
  //do something
};

Cheers!

Tags: ,

Sunday, April 12th, 2009 WordPress 6 Comments
« Previous Entries Next Entries »

About Me

Matt Varone - Matias Varone - sksmatt
HI there,

I'm a freelance creative web developer, UI designer and hobbyist musician.

Twitter Status

Flickr Gallery

    Blue WallClutter drawerCS4 Replacement iconsCS4 Replacement icons

Scrnshots Gallery

  • Screenshot from ScrnShots.com
  • Screenshot from ScrnShots.com
  • new site im working on
  • Screenshot from ScrnShots.com