You are browsing the ‘Programming’ category
  • Posted by on September 8th, 2011 in Programming. Comment (0)

    JQuery is a very famous JavaScript framework which is used for web development. JQuery is a cross-browser JavaScript framework i.e it works well in different browsers like IE, Firefox, Google Chrome etc. JQuery is open source software and is licensed under dual-license which are the MIT license and the GPL2 license.

    AJAX (Asynchronous JavaScript and XML) is a blend of multiple technologies like JavaScript and XML which lets one fetch data on a web page asynchronously from the server. Ajax helps to load parts of a web page by fetching data from the server without having a complete page reload. This helps web pages to be more responsive and provides a better user interface to customers.

  • Posted by on February 4th, 2011 in Programming. Comment (1)

    Widgets in WordPress are small components that one can write which from the admin area of wordpress lets the admin to drag and drop a widget on any of the registered widgetize area of the theme. Then the widget will perform its function echo its output on the area where it is dragged and dropped.

    All the registered widgets are seen in the widgets menu in the admin section as shown below.

    Creating widgets in wordpress

    Creating widgets in WordPress is very simple. We are now going to create a widget in WordPress which will display a few newest posts posted in WordPress.

    Here is the code of the widget which you can put in the functions.php file of your theme :

    class trywidget extends WP_Widget {
    function trywidget() {
    // widget actual processes
    $widget_ops = array('classname' => 'trywidget', 'description' => 'description for trywidget' );
    $this->WP_Widget('trywidget', 'trywidget', $widget_ops);
    }
    
    function form($instance) {
    // outputs the options form on admin
    $defaults = array( 'title' => __('Latest posts'), 'count' => 0 );
    $instance = wp_parse_args( (array) $instance, $defaults );
    $count = isset($instance['count']) ?  $instance['count'] :0;
    ?>
    
    <label for="<?php echo $this->get_field_id( 'title' ); ?>"></label>
    <input id="<?php echo $this-/>get_field_id( 'title' ); ?>" class="widefat" name="< ?php echo $this->get_field_name( 'title' ); ?>" value="< ?php echo $instance['title']; ?>" />
    
    <label for="<?php echo $this->get_field_id( 'count' ); ?>"></label>
    <input id="<?php echo $this-/>get_field_id( 'count' ); ?>" class="widefat" name="< ?php echo $this->get_field_name( 'count' ); ?>" value="< ?php echo $instance['count']; ?>" />
    
    }
    
    function update($new_instance, $old_instance) {
    // processes widget options to be saved
    
    $instance = $old_instance;
    $instance['title'] = strip_tags( $new_instance['title'] );
    $instance['count'] = !empty($new_instance['count']) ? $new_instance['count'] : 0;
    return $instance;
    }
    
    function widget($args, $instance) {
    // outputs the content of the widget
    extract( $args );
    $title = apply_filters('widget_title', $instance['title'] );
    $count = $instance['count'] ? $instance['count'] : '0';
    echo $before_widget;
    if ( $title )
    echo $before_title . $title . $after_title;
    echo '
    <ul>';
    
    query_posts('showposts='.$count);
    while ( have_posts() ) : the_post(); ?>
    <li><a title="Permanent Link to <?php the_title_attribute(); ?>" rel="bookmark" href="< ?php the_permalink() ?>"></a></li>
    echo '</ul>
    ';
    echo $after_widget;
    }
    
    }
    register_widget('trywidget');
    

    To create a widget you have to create a class which extends the base class WP_Widget.

  • Posted by on June 17th, 2009 in Programming. Comment (9)

    If you own or are familiar with Pligg then you know it has a huge problem with spam robots. This is mostly due to the fact that it hasn’t got an email validation module included.

    Email Validation Module for Pligg 9.9.5

    Description

    This module implements a mechanism for email confirmation on all the new registered users. The module doesn’t affect users registered before the plugin was installed. If a user doesn’t provide a valid email address or doesn’t activate his account he can’t submit stories.

    The plugin doesn’t affect your template and works with any Pligg template you may use.

    We use ourselves this plugin on our design social media website, zaBox. Actually the plugin was designed for zaBox. The results after applying the plugin were spectacular, virtually eliminating those nasty Pligg spam bots.

    You can test the module on our website before installing it. Just go to http://www.zabox.net/register and create an account.

    If you have any more questions see our FAQ section.

    How does it look for a user that registers ?

    A user hits Register and is directed to the registration page where he fills the details (user name, email, password).

    Pligg Email Validation Module Demo - Step 1

    After he hits Create User it gets redirected to a page where he is asked to confirm his registration by clicking the confirmation link he received in the email inbox he provided on registration.

    Pligg Email Validation Module Demo - Step 2

    Pligg Email Validation Module Demo - Step 3

    If the user tries to login and submit stories without validating his account he gets an error message.

    Once the user clicks the email validation link in his email he gets redirected to the login page and a message is displayed informing the user that his account was activated and he can start submit stories.

    Pligg Email Validation Module Demo - Step 4

    How can I get the module ?

    The module is available for selling on our website. Just go here for more info and purchase.

  • Posted by on March 8th, 2009 in Programming. Comment (3)

    The PHP 5.2.9 release focuses on improving the stability of the 5.2.x platform fixing over 50 bugs, including some security updates.

    PHP 5.2.9 Released

    Some of the bug fixes include :

    • Added optional sorting type flag parameter to array_unique(). Default is SORT_REGULAR
    • Fixed bug (libxml2 2.7 causes breakage with character data in xml_parse())
    • A number of fixes in the mbstring extension
    • Fixed bug (Improve pcre UTF-8 string matching performance)
    • Fixed bug (xml_parse crash when parser is namespace aware)
    Website : PHP.net
    PHP 5.2.9 Release Page : http://www.php.net/releases/5_2_9.php
  • Posted by on March 6th, 2009 in Programming. Comment (1)

    SundayMorning is a jQuery plugin which allows site-owners to offer their visitors some easy and fancy ways to translate their content. The plugin uses the Google Translate API for the translations. There are quite a few languages supported like : Italian, French, German, Arabic etc.

    This plugin is also available as a bookmarklet.

    SundayMorning - JQuery Translation Plugin

  • Posted by on March 5th, 2009 in Programming. Comment (6)

    PHP Excel Reader Library is a PHP library that can be used to read the binary format of XLS files and can return values and formats from any cell.

    PHP Excel Reader Library

Page 1 of 3123

Elegant Wordpress Themes Design Freebies
Popular articles
We’re on Google
We’re on Twitter
We’re on Facebook
Sponsor
Now Hot on our Websites

Sponsors