Dak's Blog

Digital Life

Display Latest posts

Posted by mukeshdak on 2010 May 12

Here is the code to display latest four posts in self hosted WordPress blog.

<?php query_posts('showposts=4'); ?>
<ul>
<?php while (have_posts()) : the_post(); ?>
<li><a href="<?php the_permalink() ?>"><?php the_title(); ?></a></li>
<?php endwhile; ?>
</ul>

Posted in WordPress | Leave a Comment »

Recommended ping list for wordpress

Posted by mukeshdak on 2010 May 12

http://api.moreover.com/RPC2

http://bblog.com/ping.php

http://blogsearch.google.com/ping/RPC2

http://ping.weblogalot.com/rpc.php

http://ping.feedburner.com

http://ping.syndic8.com/xmlrpc.php

http://ping.bloggers.jp/rpc/

http://rpc.pingomatic.com/

http://rpc.weblogs.com/RPC2

http://rpc.technorati.com/rpc/ping

http://topicexchange.com/RPC2

http://www.blogpeople.net/servlet/weblogUpdates

http://xping.pubsub.com/ping

Posted in WordPress | Leave a Comment »

Include Folder – Setting two path or more

Posted by mukeshdak on 2010 May 12

If you wish to setup two or more folders in your php.ini / php5.ini then, It has worked successfully with me when I followed following format.

include_path = ".:/usr/local/php5/lib/php:/home/content/r/a/k/rakesh/html/md"

Here I have added two path
1. /usr/local/php5/lib/php
2. /home/content/r/a/k/rakesh/html/md

Posted in PHP | Leave a Comment »

Nameservers for domains for hosting with …

Posted by mukeshdak on 2010 May 12

Nameservers for domains for hosting with Godaddy
NS51.DOMAINCONTROL.COM
NS52.DOMAINCONTROL.COM

Posted in Uncategorized | Leave a Comment »

How to : Create a simple url shortener script is a few minutes | Made in Paté

Posted by mukeshdak on 2010 Mar 16

First let’s explain the basics of what we are trying to do.

We’ll build a script that will replace any type of url to a tiny url so it’s easier to post or be untraceable.

For example this *long* google maps url

via How to : Create a simple url shortener script is a few minutes | Made in Paté.

Posted in PHP | Leave a Comment »

Make Clean and Readable Sources — Why and How « planetOzh

Posted by mukeshdak on 2010 Feb 28

In August 2008 I made a quick review of 50 plugins (part 1, part 2) and was really surprised by the number of coders who ship plugins with barely readable code. Working, even clever, but ugly code.

Making clean sources is not a useless mania of a compulsive obsessive geek, it’s truly a requisite for maintainable code. It won’t make your code good — just better.

For less experienced coders here are a few rules of thumb I try to follow. That’s just my word and my coding habits, nothing is to be considered as the definitive best practice, but I hope this will make anyway a good pointer for novices.

via Make Clean and Readable Sources — Why and How « planetOzh.

Posted in WordPress | Leave a Comment »

Top 10 Most Common Coding Mistakes in WordPress Plugins « planetOzh

Posted by mukeshdak on 2010 Feb 28

Short intro for readers who don’t follow me or this blog’s feed: I’ve been a judge in the annual WordPress Plugin Competition, and as such I have reviewed a number of plugins. Read more about this.

via Top 10 Most Common Coding Mistakes in WordPress Plugins « planetOzh.

Posted in WordPress | Leave a Comment »

WordPress Coding Standards « WordPress Codex

Posted by mukeshdak on 2010 Feb 28

Some legacy parts of the WordPress code structure for PHP markup are inconsistent in their style. WordPress is working to gradually improve this by helping users maintain a consistent style so the code can remain clean and easy to read at a glance.

via WordPress Coding Standards « WordPress Codex.

Posted in WordPress | 1 Comment »

How to Write a WordPress Plugin – Sample Code

Posted by mukeshdak on 2010 Feb 28

I wanted to write a plugin and came across an excellent site by Ronald Huereca that gives you good start on wordpress plugin. He gives a pdf down loadable file for wordpress plugn too.

via How to Write a WordPress Plugin – Sample Code.

Posted in WordPress | Leave a Comment »

list folders script – PHP answers

Posted by mukeshdak on 2010 Feb 28

Does anyone know how to make a script that list the folders in a specific directory, but when the list is made it must be possible to click on it like a link so people can be redirected, but not to the folder, but to a special file inside the folder.

via list folders script – PHP answers.

Posted in PHP | Leave a Comment »