Archive for the ‘Developer Tools’ Category

Wp-NicEdit Updated version 1.0 released

Tuesday, November 11th, 2008

It is more than a week since I released my last plugin  for associating unique header image with each single article of wordpress.

This time I am back again with another plugin “WP-NicEdit”.It’s is a wysiwyg type rich text editor for comments section.

As you may see from the original website of NicEdit(by Brian Kirchoff) http://nicedit.com,He has released a newer version of NicEdit,which has a better well defined API for  extending it.

So I integrated it again to wordpress and that too much more easier than the previous version.

Current features include

1.wysiwyg editor(Choose whether you want default or you want a full panel from admin->settings->Wp NicEdit Settings page.

Settings for Wp-NicEdit

Settings for Wp-NicEdit


2.It allows you to do copy paste using keyboard shortcuts(not available in the older version).

For general information about the wp-nicedit ,please visit my post here http://geekytalks.com/2008/07/wp-nicedit-a-wysiwyg-comment-editor-for-wordpress.html.There you will find the help on installation.Or use readme.txt included as a guide.

The current version of wp-NicEdit allows you to choose either the editor in default mode or in Extended mode from admin->settings->Wp NicEdit settings page.

Download the plugin from official plugin directory of wordpress here http://wordpress.org/extend/plugins/wp-nicedit

here are some more screenshots of the nic edit.

Default mode enabled

Default mode enabled

Extended mode enabled

Extended mode enabled

Please see the comment area of this page for a real world view of Wp NicEdit(note:I have enabled default mode)

if you liked it or  you have any issue,please drop a message here ,I will help you in all possible ways and love to see your messages here.


Wp Unique Article Header Image Plugin for Wordpress

Monday, September 22nd, 2008

hi all.here I am back with another brand new plugin to enhance your blog.Ok,If you have ever thought of the following,then this plugin is for you.

  • You wanted to show unique header image on each single article page of your wordpress(or may be on some of the single article pages)
  • You wanted to have a unique background image for each of your single article page(or may be just on some of them)

If your answer is yes,Then this plugin is for you.It allows you to upload an image using the wordpress new post/edit post/page window.It adds a file uploading button just below the title of the post as shown below

New Post window
2

Now select an Image and when you click publish/save the default image is changed with the current image.

Browse Header Image to upload
2008-09-17_055340

Once you click save/publish,Go to manage->posts->your post and click to edit.you will see that the default image is changed with the new image uploaded.

Post edit window
edit-screen-gt-unique-header

How to use

For your use there is a method gt_get_image_url(), it returns unique image associated with each post.you may use it in any way you want.here is an example,how I modified the default theme on the demo server to show unique header images on each post.

Now,let us edit our themes header.php to make use of unique header on each of the page.we add following snippet of code to our header .php

Code snippet to be modified

Code snippet to be modified

[Please note this code shown here, is for the default theme Kuberick,which comes with wordpress,depending upon your theme and header you may need to use custom css here]

See the live demo here [Click on the articles on the demo site to see the use of unique header thing)

NOTE:It seems ,someone has deleted all the posts from the demo site,as i mistakenly provided the test user rights to edit/delete posts.well,I will be correcting my mistake tomorrow.For the time being,I encourage you to login and try uploading some image of your choice on the demo site and looking at it in action.

http://plugins.wpdemos.com/gt-unique-header-image/

Do you want to try it yourself,well use following credentials

http://plugins.wpdemos.com/gt-unique-header-image/wp-admin/

User: test

Password: test

Try,posting some new posts with any image of your choice and then click to view the page.
ok,so you need a download link now.Here goes the download link
http://downloads.wordpress.org/plugin/wp-unique-article-header-image.zip


get_userdatabylogin

Saturday, September 13th, 2008

I am going to describe here some of the methods which can come handy for a theme developer or plugin developer,but are not documented at Wordpress Codex.Today, I am beginning the series with get_userdatabylogin($login_name)

Description

It is one of the important but not documented method on codex(as of now),It provides same information as the get_userdata() except the fact that it takes the login name(e.g. “admin” as an argument rather than the ID of user).It returns an object with the information pertaining to the user whose login name is passed to it. Properties map directly to wp_users table in the database.

Usage

The call to get_userdatabylogin() returns the user’s data, where it can be retrieved using member variables.

<?php $user_info=get_userdatabylogin("admin");
echo ('Username:',$user_info->user_login . '\n');
      echo('User level: ' . $user_info->user_level . '\n');
      echo('User ID: ' . $user_info->ID . '\n');
?>

Username: admin
User level: 10
User ID: 1

Accessing Usermeta Data

<?php $user_info=get_userdatabylogin("admin");
echo ($user_info->last_name .  ", " . $user_info->first_name . "\n");
?>

Singh,Brajesh

Parameters

$login_id

(String) (required) The Login_name(Login Id) of the user whose data should be retrieved.

Default: None

Values in users & user_meta table

Here are the values in the users table you can access via this function:

users

  • ID
  • user_login
  • user_pass
  • user_nicename
  • user_email
  • user_url
  • user_registered
  • user_activation_key
  • user_status
  • display_name

useful in user_meta

  • first_name
  • last_name
  • nickname
  • user_level
  • admin_color (Theme of your admin page. Default is fresh.)
  • closedpostboxes_page
  • nickname
  • primary_blog
  • rich_editing
  • source_domain
  • It works in the same manner as get_userdata() ,except that the argument passed in get_userdata() is an integer(The ID of User),while In the case of get_userdatabylogin() ,the argument passed is string(The Login name e.g. “admin”)

See as a reference :http://codex.wordpress.org/Function_Reference/get_userdata


Google Chrome -A next Generation Browser

Tuesday, September 2nd, 2008

Google Chrome(an open source browser as they say!) was launched officially on 2nd September.It is in beta version currently.When I first heard about it,It was some twitter friend ,who wrote about it.Finally I went to http://tools.google.com/chrome/ and downloaded it.The installation was a breeze ,it took just 1 minute to download and install(I am using 1 Mbps connection).

It has inbuilt facilities for importing my firefox bookmarks,history,passwords etc.Ahh..I am waiting to see the first site of this Google browser.Thank God,It started now.Wow,what a clean interface.It is so impressively thin,I am really starting loving it from the first start up only.

have a look how it looks like

Google Chrome
startup

Good, so Google is really concerned about it.It seems the world is turning to blue again[:D],It’s fist browser,which has such a sleek look(though I am a fan of firefox,for its large number of extensions and developers support).

Some Features of Chrome

  • It is visually pleasing,something your eye will love to browse with
  • It has incognito mode(.Do you know what incognito mode is,well I am posting an image for details),In incognito mode it does not remember browsing history and cookies etc.
  • It Is based on WebKit rendering engine,the same engine being used by safari 3.X
  • It uses v8 javascript engine(also by google),one of the fastest javascript engine
  • It is made from scratch ,keeping in mind the current web architecture,so hopefully it will perform better
  • It uses the location bar for searching and url both, you can type something in the location bar and press enter to search it on google.

Here are some of the screenshot,to show some of the features of this browser

Incognito Mode

Incognito mode
2008-09-03_015903

Home page,It contains most visited,recently browsed,bookmarked sites,good..that’s really good idea,a little bit inspired from opera(speed dial)

Home Page
2008-09-03_022630

Here is how the history page looks(very nicely done!)

History Page
2008-09-03_022614

The customizations are quiet easy and pretty straight forward.first times,it seems I am working some something really cool!.

Btw,There are some disadvantages too

  1. It forks a new process for each tab,so if you have 6 tabs open you will see 7 or more chrome.exe running.
    Multiple instances of chrome.exe
    2008-09-03_023001

You see the four chrome.exe running,while I had only 3 tabs open at that time.

2.It’s more memory intensive(at least as I see on my system)

But still overall,I liked the way it’s looking and working(seems to be fast )

to download Google Chrome browser ,use the following link http://tools.google.com/chrome/


Test your web design in different browsers online

Saturday, August 30th, 2008

As a web developer the life is not that much easy.The daily quirks of various browsers makes the life too difficult.Above all ,we need to maintain the web standards and compatibility in the browsers at the same time.

Another Issue ,after all,how many browsers I should keep on my system.For me,I like to keep at least the following-IE,Fire Fox,Safari,Opera,Netscape,and Flock.IE has always been an inspiration for my life(:D ,Without ,IE I would never know,what’s the harshness of life and the bitter realities of life).

Ok,Let us leave that and go ahead.Have you ever wondered ,how to test the website/design you have recently coded into the browsers which are not on your system.I don’t know about you but I have been wondering for this.

Some times,Checking in Different Versions of same software (Like testing on Fire Fox 2.x and 3.x on same system) is quiet difficult.

So here is a website which provides the option to test your websites online.The only one restriction is ,It must be hosted some where on the web.

Check

http://browsershots.org/


WP NIcEdit-A WYSIWYG comment editor for wordpress

Sunday, July 13th, 2008

“UPDATE:The version 1.0 of the plugin is available on wordpress,please use following link to download

http://wordpress.org/extend/plugins/wp-nicedit/

and go to this page for updated information on the plugin http://geekytalks.com/2008/11/wp-nicedit-updated-version-10-released.html

Well,After working for the last 30 minutes,finally I am done with the plugin.WP NicEdit is a wordpress plugin which integrates Brian Kirchoff’s Nic Edit(a javascript based rich text editor) to wordpress comments area making it visully pleasing and enhancing its capability.it makes the Comments section feature rich.Once you Install this plugin you(Your visitors) get a visual editor for posting their comments.So it’s pleasing to have all this.

To See a demo, please look at the comment section of this page.still I am posting one of the pic to show how it looks like.

NicEditor How it Looks Like:–well here is a pic to depict how it looks like….

Nic Editor

Now how it looks when integrated to the Comments..Good question…

Integrated to comments

Now you Can choose the font-family,size,formatting and various other options while writing comments..wow..sounds Great..

Ahh..I forgot.. I need to put here ..how to install it…well..it’s damn simple…

Download:Update file is available here http://wordpress.org/extend/plugins/wp-nicedit/

For the updates,please visit my post http://geekytalks.com/2008/11/wp-nicedit-updated-version-10-released.html

Installation:

  1. Unzip wp-nicedit.zip
  2. Upload the wp-nic`edit folder to your wp-content/plugins/ directory
  3. Log in to your admin.Go to Plugins menu
  4. Find the “WP NicEdit” there and click activate.
  5. Congrats,You are done.Go and check your comments on any page/post it is working now :)

Please Note:IE6 is having a little trouble while integrating this plugin.The Visula editor will appear but it will not be enabled.i.e. you may not use the functionalities of NiCEditor.


How to OverCome it:Well the reason of this trouble is,there is a p tag wraping the text area in your comments.php file

Follow the following steps( only required for making it work in IE)
1.Open the Comments.php of your theme(found in your theme folder) in any of the text editor
2.Locate the line which says something like…

<p><textarea id=”comment” name=”comment”></textarea></p>

and replace it with <textarea id=”comment” name=”comment”></textarea>

i.e. we have removed the wrapping p tags.

That’s all we are done now.

If you have any problem with the plugin or wish to add some features please let me know.I am always open to your suggestions and will love to add the feature.Further please leave your comment below for any support i will reply within 24 hour.

Credits:

All the credit for the editor goes to Brian Kirchoff for making the wonderful editor.

I will also like to thank Michael for his great post 10 Best Plugins To Get More Comments from where i got to know about the NicEdit.