Archive for the ‘Uncategorized’ Category

Upcoming Plugins

Saturday, November 8th, 2008

Thank you every one for your support to my first plugin wp-unique-article-header-image.

Today,I am here to let you know,my another plugin “wp NicEdit” which integrates Bryn Kirchoffs light weight rich text editor to wordpress comment,got approval from wordpress.org.

It will be hosted soon on wordpress.org/extend/plugins(atleast as soon as I update the svn).I am  waiting and not uploading old version,because a new version of the plugin is about to finish.It will have several options from backend.

As another note,The wp unique article header image plugin ,will be available as compatible with PHP4 in it’s next version 1.1 ,currently it supports only PHP5.

Bye the way,my list of plugin queue is getting longer day by day,let me tell you some of the upcoming plugins from my selves are

1.Thumbnailed recent posts-Feature for selecting recent posts from only selected categories or all categories,It searches for the first image in the post/page, if found,creates a thumbnail,or if not found  allows you to use a default image with post as thumbnail.

2.GT Recent Posts advanced:-To show a list of Recent posts,form selected categories or simply from all categories.

3.wp-popular-posts-:You can show a list of most popular posts in over all,sort the list by date ,time,year,categories.It can be used for showing most popular reviews of products and so.The popularity is counted by the number of times a post is visited.

…and some more.

Please leave a comment,if you want your ideas to be converted to wordpress plugin or need any help on wordpress.I will love to assist you.

Have a great Day.

Brajesh


get_user_by_email()

Monday, September 15th, 2008

This is second in the series of un documented but useful wordpress api functions.

get_user_by_email($email)

Description

It is one of the important but not documented method on codex(as of now),It provides same information as the get_userdata(),get_userdatabylogin(), except the fact that it takes the email address of registered user(e.g. admin@geekytalks.com as an argument rather than the ID/username 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_user_by_email() returns the user’s data, where it can be retrieved using member variables.

<?php
$user_info=get_user_by_email(get_option('admin_email));
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_user_by_email(get_option('admin_email));
echo ($user_info->last_name .  ", " . $user_info->first_name . "\n");
?>

Singh,Brajesh

Parameters

$email

(String) (required) The email address(of registered user) 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


Wordpress 2.5 Image Uploading Error

Saturday, July 5th, 2008

If you have upgraded to wordpress 2.5 or 2.5.1 ,it is the mostlikely problem you will find while trying to upload images using media manager.

You will get something like shown below “HTTp Error”

This is a very simple problem,related to the security setting.The default security settings in the .htaccess file of wordpress restricts file upload in wordpress 2.5 and 2.5.1 .

The default Wordpress .htaccess in 2.5.X looks like this

# BEGIN WordPress
 
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
 
# END WordPress

Now you need to modify it slighlty in order to make the file uploading work.
Add the following two lines after the wordpres block.

SecFilterEngine Off
SecFilterScanPOST Off

so the final .htaccess file looks like

# BEGIN WordPress
 
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
 
# END WordPress
SecFilterEngine Off
SecFilterScanPOST Off

Now the last two line simply makes security Filter engine off allowing the file upload.
That’s all , now upload the modified .htaccess file to the root folder of your wordpress installation.

Suppose you have installed it on www.example.com/blog/
then the .htaccess file must be in /blog/folder .
That's all ,now go to the write post section and try to upload image,
You will find no problems this time.

Testing Image Uploads

Tuesday, June 24th, 2008

Just testing image uploads in the default installation of wordpress


Welcome to Geeky talks

Thursday, June 12th, 2008

Welcome to GeekyTalks.GT is a blog all about technology and trends.
I am a freelance web developer as well as a Technical Consultant at Cosmic Coders.
Here I will try to share all my technical experiences and knowledge with you.
I urge you to participate in the discussions and take an active part in all the activities.

Happy Surfing…