<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-4541278785090749160</id><updated>2024-09-13T00:12:02.428-07:00</updated><category term="Wordpress"/><category term="PHP"/><category term="AJAX"/><category term="HTML CSS"/><category term="CAPTCHA"/><category term="Plugin"/><category term="Server"/><category term="css"/><category term="htaccess"/><category term="html"/><category term="jQuery"/><category term="javascript"/><title type='text'>Wordpress Nuts and Bolts</title><subtitle type='html'>the complete wordpress solution......</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://wordpressnutsandbolts.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4541278785090749160/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://wordpressnutsandbolts.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/4541278785090749160/posts/default?start-index=26&amp;max-results=25&amp;redirect=false'/><author><name>Binish Prabhakar</name><uri>http://www.blogger.com/profile/06321237526635911658</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>26</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-4541278785090749160.post-1706555911361789649</id><published>2012-04-26T04:05:00.000-07:00</published><updated>2012-04-26T04:05:36.600-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="css"/><category scheme="http://www.blogger.com/atom/ns#" term="html"/><category scheme="http://www.blogger.com/atom/ns#" term="javascript"/><title type='text'>can’t execute code from a freed script</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
This is a placeholder for further information on a javascript problem
 I know I’m going to have to figure out in the near future.&amp;nbsp; Internet 
Explorers 6 and 7 (is there ever another browser that gives me 
problems?) throw the somewhat cryptic “can’t execute code from a freed 
script” when loading a page that I’ve recently added some ecma script 
to.&amp;nbsp; I’m just getting back into DOM scripting after a while away from 
messing with it, and am definitely rusty.&amp;nbsp; Still, my understanding of 
the error message is that it is roughly speaking a matter of scope of 
code, and that code loaded for one window or frame will have been freed 
from memory and will not be available when in other windows or frames.&amp;nbsp; 
This doesn’t seem to apply with the scripting I’m doing.&amp;nbsp; I’m dealing 
with only one window and no frames so I need to find more out about what
 the error really means.&amp;nbsp; If you know, please comment and let me know.&amp;nbsp; 
If you want to know, please watch this space for updates.&amp;nbsp; (If you leave
 a comment, you can receive notifications when new comments are added)&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;UPDATE&lt;/b&gt;:&amp;nbsp; FIXED!&amp;nbsp; About 10 minutes after posting this I 
found the bizarre (to me, maybe someone can explain it) solution for 
this problem.&amp;nbsp; It was as simple as moving any &lt;i&gt;meta&lt;/i&gt; tags before the &lt;i&gt;script&lt;/i&gt; tags in the head element of the html document.&amp;nbsp; &amp;lt;script&amp;gt;&amp;lt;meta&amp;gt; = heartache &amp;lt;meta&amp;gt;&amp;lt;script&amp;gt; = salvation.&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: xx-small;&quot;&gt;Reference: http://www.akatombo.com/en/comments/cant_execute_code_from_a_freed_script/ &lt;/span&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://wordpressnutsandbolts.blogspot.com/feeds/1706555911361789649/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://wordpressnutsandbolts.blogspot.com/2012/04/cant-execute-code-from-freed-script.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4541278785090749160/posts/default/1706555911361789649'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4541278785090749160/posts/default/1706555911361789649'/><link rel='alternate' type='text/html' href='http://wordpressnutsandbolts.blogspot.com/2012/04/cant-execute-code-from-freed-script.html' title='can’t execute code from a freed script'/><author><name>Binish Prabhakar</name><uri>http://www.blogger.com/profile/06321237526635911658</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4541278785090749160.post-7957727777637649865</id><published>2012-03-27T21:48:00.000-07:00</published><updated>2014-07-09T12:04:52.523-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="AJAX"/><category scheme="http://www.blogger.com/atom/ns#" term="jQuery"/><category scheme="http://www.blogger.com/atom/ns#" term="PHP"/><title type='text'>How to submit form without refreshing page with jquery and ajax</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;This is very simple artical for submit HTML form data without refreshing page with the help of JQuery and Ajax.&lt;br /&gt;
jQuery provides a rich set of methods for AJAX web development.&lt;br /&gt;
With jQuery AJAX, you can request TXT, HTML, XML or JSON data from a remote server using both HTTP Get and HTTP Post. &lt;br /&gt;
&lt;br /&gt;
$.ajax(options) is the syntax of the low level AJAX function.&lt;br /&gt;
$.ajax offers more functionality than higher level functions like load, get, and post.&lt;br /&gt;
The option parameter takes name|value pairs defining url data, passwords, data types, filters, character sets, timeout and error functions.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Below is code for HTML form.&lt;/b&gt;&lt;br /&gt;
&amp;lt;form method=&quot;post&quot; name=&quot;form&quot;&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;input id=&quot;name&quot; name=&quot;name&quot; type=&quot;text&quot; /&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;input id=&quot;username&quot; name=&quot;username&quot; type=&quot;text&quot; /&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;input id=&quot;password&quot; name=&quot;password&quot; type=&quot;password&quot; /&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;select id=&quot;gender&quot; name=&quot;gender&quot;&amp;gt;&lt;br /&gt;
&amp;lt;option value=&quot;&quot;&amp;gt;Gender&amp;lt;/option&amp;gt;&lt;br /&gt;
&amp;lt;option value=&quot;1&quot;&amp;gt;Male&amp;lt;/option&amp;gt;&lt;br /&gt;
&amp;lt;option value=&quot;2&quot;&amp;gt;Female&amp;lt;/option&amp;gt;&lt;br /&gt;
&amp;lt;/select&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;div &amp;gt;&lt;br /&gt;
&amp;lt;input type=&quot;submit&quot; value=&quot;Submit&quot; class=&quot;submit&quot;/&amp;gt;&lt;br /&gt;
&amp;lt;span class=&quot;error&quot; style=&quot;display:none&quot;&amp;gt; Please Enter Valid Data&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;span class=&quot;success&quot; style=&quot;display:none&quot;&amp;gt; Registration Successfully&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/form&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Javascript code for jquery ajax form submit&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;script type=&quot;text/javascript&quot; src=&quot;http://ajax.googleapis.com/ajax/libs/jquery/1.3.0/jquery.min.js&quot;&amp;gt;&amp;lt;/script&amp;gt;&lt;br /&gt;
&amp;lt;script type=&quot;text/javascript&quot; &amp;gt;&lt;br /&gt;
$(function() {&lt;br /&gt;
$(&quot;.submit&quot;).click(function() {&lt;br /&gt;
var name = $(&quot;#name&quot;).val();&lt;br /&gt;
var username = $(&quot;#username&quot;).val();&lt;br /&gt;
var password = $(&quot;#password&quot;).val();&lt;br /&gt;
var gender = $(&quot;#gender&quot;).val();&lt;br /&gt;
var dataString = &#39;name=&#39;+ name + &#39;&amp;amp;username=&#39; + username + &#39;&amp;amp;password=&#39; + password + &#39;&amp;amp;gender=&#39; + gender;&lt;br /&gt;
&lt;br /&gt;
if(name==&#39;&#39; || username==&#39;&#39; || password==&#39;&#39; || gender==&#39;&#39;)&lt;br /&gt;
{&lt;br /&gt;
$(&#39;.success&#39;).fadeOut(200).hide();&lt;br /&gt;
$(&#39;.error&#39;).fadeOut(200).show();&lt;br /&gt;
}else{&lt;br /&gt;
$.ajax({&lt;br /&gt;
type: &quot;POST&quot;,&lt;br /&gt;
url: &quot;result.php&quot;,&lt;br /&gt;
data: dataString,&lt;br /&gt;
success: function(){&lt;br /&gt;
$(&#39;.success&#39;).fadeIn(200).show();&lt;br /&gt;
$(&#39;.error&#39;).fadeOut(200).hide();}&lt;br /&gt;
});&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
return false;&lt;br /&gt;
});&lt;br /&gt;
});&lt;br /&gt;
&amp;lt;/script&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: xx-small;&quot;&gt;Reference:&lt;a href=&quot;http://www.justwebdevelopment.com/blog/how-to-submit-form-without-refreshing-page-with-jquery-and-ajax/&quot; target=&quot;_blank&quot;&gt; http://www.justwebdevelopment.com&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://wordpressnutsandbolts.blogspot.com/feeds/7957727777637649865/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://wordpressnutsandbolts.blogspot.com/2012/03/how-to-submit-form-without-refreshing.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4541278785090749160/posts/default/7957727777637649865'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4541278785090749160/posts/default/7957727777637649865'/><link rel='alternate' type='text/html' href='http://wordpressnutsandbolts.blogspot.com/2012/03/how-to-submit-form-without-refreshing.html' title='How to submit form without refreshing page with jquery and ajax'/><author><name>Binish Prabhakar</name><uri>http://www.blogger.com/profile/06321237526635911658</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4541278785090749160.post-5400322577025936173</id><published>2012-02-20T04:20:00.000-08:00</published><updated>2014-07-09T12:05:25.004-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="htaccess"/><category scheme="http://www.blogger.com/atom/ns#" term="PHP"/><title type='text'>PHP displays 500 Internal Server Error</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;My PHP files all display a 500 Internal server error. How can I fix this? &lt;br /&gt;
If you are running a PHP-based script on your site and are receiving  a 500 and/or 404 errors on your pages, it is likely you have one or  more of the following occurring:&lt;br /&gt;
1. You are attempting to access PHP files through the temp-URL  http://server.lunarpages.com/~username. PHP on our servers requires a  fully qualified domain name. You may wait until your domain has been  pointed and resolves here or you may email support@lunarpages.com to  request a primary domain change to a free subdomain of lunarpages to  test your files.&lt;br /&gt;
2. The permissions on some of the folders or files are 777 or 666. If  this is the case, change them to either 755 or 644 in Cpanel&#39;s File  Manager (or using your local FTP client).&lt;br /&gt;
3. The files and/or folders are not owned by you. Certain  applications having been run under php as an apache module may have  files owned by the apache user of nobody. An indication that you don&#39;t  own the files would be if you are unable to change their file  permissions. To correct this, please contact support provide your  username and the last 4 digits of your credit card on file with us for  ownership verification (no charges apply) and provide the location of  the folder or files that need to have your ownership.&lt;br /&gt;
4. Your .htaccess file has php_values or php_flags in it. This causes  a 500 Internal server error when attempting to execute the script.&lt;br /&gt;
The php_values and php_flags will need to be removed from your  .htaccess file (please make a backup of the .htaccess by copying its  contents and saving it on your desktop as htaccess.txt). Take the  contents removed from .htaccess and place it into a file you create  called php.ini. Remember to remove the php_flag and php_value part  before the directives as php.ini files do not require those in front of  the values. You can always make the changes and ask us if the changed  files are correct.&lt;br /&gt;
Because php.ini values are not shared across directories, you would  need a separate php.ini file in each folder that has .htaccess or that  requires the php_values or php_flags. In order to avoid doing this, you  can place a line in the .htaccess file in your public_html folder to  have all values in your public_html php.ini to be shared across all  folder. This line would be the following:&lt;br /&gt;
suPHP_ConfigPath /home/username/public_html&lt;br /&gt;
Finally, to explain in depth why suPHP requires these changes to the  file permissions, please note that suPHP runs scripts with the  permissions of their owners. Regular PHP executes scripts under the  permissions of the system user running the web server, which means that  your script runs with different permissions than your own user account  and makes it very hard to use a PHP script to modify and create files  without giving everyone on the server access to your files (this means  that on regular PHP you provide write or execute access to group and  world even for some files). Since SuPHP makes your PHP scripts run with  the same permissions as your regular user account, you do not need group  or world write access or execute access for files and suPHP will even  prevent files from running that are group or world writable or  executable as a security precaution. &lt;br /&gt;
666 equals the following:&lt;br /&gt;
Code: &lt;br /&gt;
Mode User Group World &lt;br /&gt;
Read 4 4 4 (all checked) &lt;br /&gt;
Write 2 2 2 (all checked) &lt;br /&gt;
Execute(none checked)&lt;br /&gt;
This makes group and world able to write to the file, a security risk&lt;br /&gt;
777 equals the following:&lt;br /&gt;
Code: &lt;br /&gt;
Mode User Group World &lt;br /&gt;
Read 4 4 4 (all checked) &lt;br /&gt;
Write 2 2 2 (all checked) &lt;br /&gt;
Execute 1 1 1 (all checked)&lt;br /&gt;
This makes group and world able to write and execute the file, a very large security risk.&lt;br /&gt;
Basically, suPHP is more secure, and preventing scripts from running  as 666 or 777 prevents group or world from maliciously writing to the  files and hacking your scripts. &lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://wordpressnutsandbolts.blogspot.com/feeds/5400322577025936173/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://wordpressnutsandbolts.blogspot.com/2012/02/php-displays-500-internal-server-error.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4541278785090749160/posts/default/5400322577025936173'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4541278785090749160/posts/default/5400322577025936173'/><link rel='alternate' type='text/html' href='http://wordpressnutsandbolts.blogspot.com/2012/02/php-displays-500-internal-server-error.html' title='PHP displays 500 Internal Server Error'/><author><name>Binish Prabhakar</name><uri>http://www.blogger.com/profile/06321237526635911658</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4541278785090749160.post-1970757333508109051</id><published>2012-02-11T07:45:00.000-08:00</published><updated>2014-07-09T12:05:51.853-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Wordpress"/><title type='text'>How to change admin side font and family style in wordpress without changing the core wordpress code and style</title><content type='html'>&lt;p&gt;To change the admin side font and any style include the following code in function.php of your theme&lt;/p&gt;
&lt;p&gt;&amp;lt;style type=&amp;quot;text/css&amp;quot;&amp;gt;&lt;br /&gt;
&lt;/p&gt;
&lt;p&gt;body {&lt;/p&gt;
&lt;p&gt;font-family: verdana !important;&lt;br /&gt;
&lt;/p&gt;
&lt;p&gt; font-size: 13px !important;&lt;br /&gt;
&lt;/p&gt;
&lt;p&gt;}&lt;br /&gt;
&lt;/p&gt;
&lt;p&gt;&amp;lt;/style&amp;gt;&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://wordpressnutsandbolts.blogspot.com/feeds/1970757333508109051/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://wordpressnutsandbolts.blogspot.com/2012/02/how-to-change-admin-side-font-and.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4541278785090749160/posts/default/1970757333508109051'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4541278785090749160/posts/default/1970757333508109051'/><link rel='alternate' type='text/html' href='http://wordpressnutsandbolts.blogspot.com/2012/02/how-to-change-admin-side-font-and.html' title='How to change admin side font and family style in wordpress without changing the core wordpress code and style'/><author><name>Binish Prabhakar</name><uri>http://www.blogger.com/profile/06321237526635911658</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4541278785090749160.post-29535655543949852</id><published>2012-01-07T06:44:00.000-08:00</published><updated>2014-07-09T12:06:44.469-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Wordpress"/><title type='text'>Creating Custom Roles and Capabilities in Wordpress</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;So you want to add a custom Role to your WordPress site to add more flexibility when assigning users their role, what do you do? Simply add a role, with a few lines of code in your theme’s functions.php file, using WordPress’ add_role() function, as defined below.&lt;br /&gt;
&lt;br /&gt;
add_role( $role_name, $display_name, $capabilities );&lt;br /&gt;
&lt;br /&gt;
The example below adds a role of Video Manager with a custom cabability of ‘manage videos’.&lt;br /&gt;
&lt;br /&gt;
add_role( &#39;video_manager, &#39;Video Manager&#39;, array( &#39;manage_videos&#39; ) );&lt;br /&gt;
&lt;br /&gt;
NOTE: Once you add this code to your functions.php file and view any page on your site to make the role addition, you can and should comment it out so that it doesn’t run on every page view.&lt;br /&gt;
&lt;br /&gt;
Now, how do we use this new role with the new capability you ask? Simply use the WordPress current_user_can() function to check the user’s capability.&lt;br /&gt;
&lt;br /&gt;
if ( current_user_can( &#39;manage_videos&#39; ) ) {&lt;br /&gt;
// let them manage those videos!&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: xx-small;&quot;&gt;Regards:&lt;a href=&quot;http://camwebdesign.com/&quot;&gt;http://camwebdesign.com&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://wordpressnutsandbolts.blogspot.com/feeds/29535655543949852/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://wordpressnutsandbolts.blogspot.com/2012/01/creating-custom-roles-and-capabilities.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4541278785090749160/posts/default/29535655543949852'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4541278785090749160/posts/default/29535655543949852'/><link rel='alternate' type='text/html' href='http://wordpressnutsandbolts.blogspot.com/2012/01/creating-custom-roles-and-capabilities.html' title='Creating Custom Roles and Capabilities in Wordpress'/><author><name>Binish Prabhakar</name><uri>http://www.blogger.com/profile/06321237526635911658</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4541278785090749160.post-5392750879902208953</id><published>2011-12-16T08:53:00.000-08:00</published><updated>2014-07-09T12:12:51.171-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Plugin"/><category scheme="http://www.blogger.com/atom/ns#" term="Wordpress"/><title type='text'>How to create a Wordpress Plugin</title><content type='html'>WordPress Plugin: A WordPress Plugin is a program, or a set of one or more functions, written in the PHP scripting language, that adds a specific set of features or services to the WordPress weblog, which can be seamlessly integrated with the weblog using access points and methods provided by the WordPress Plugin Application Program Interface (API). &lt;br /&gt;
&lt;br /&gt;
Creating a Plugin&lt;br /&gt;
&lt;br /&gt;
This section of the article goes through the steps you need to follow, and things to consider when creating a well-structured WordPress Plugin.&lt;br /&gt;
Names, Files, and Locations&lt;br /&gt;
Plugin Name&lt;br /&gt;
&lt;br /&gt;
The first task in creating a WordPress Plugin is to think about what the Plugin will do, and make a (hopefully unique) name for your Plugin. Check out Plugins and the other repositories it refers to, to verify that your name is unique; you might also do a Google search on your proposed name. Most Plugin developers choose to use names that somewhat describe what the Plugin does; for instance, a weather-related Plugin would probably have the word &quot;weather&quot; in the name. The name can be multiple words.&lt;br /&gt;
Plugin Files&lt;br /&gt;
&lt;br /&gt;
The next step is to create a PHP file with a name derived from your chosen Plugin name. For instance, if your Plugin will be called &quot;Fabulous Functionality&quot;, you might call your PHP file fabfunc.php. Again, try to choose a unique name. People who install your Plugin will be putting this PHP file into the WordPress Plugin directory in their installation, wp-content/plugins/, so no two Plugins they are using can have the same PHP file name.&lt;br /&gt;
&lt;br /&gt;
Another option is to split your Plugin into multiple files. Your WordPress Plugin must have at least one PHP file; it could also contain JavaScript files, CSS files, image files, language files, etc. If there are multiple files, pick a unique name for a file directory and for the main PHP file, such as fabfunc and fabfunc.php in this example, put all your Plugin&#39;s files into that directory, and tell your Plugin users to install the whole directory under wp-content/plugins/. However, an installation can be configured for wp-content/plugins to be moved, so you must use plugin_dir_path() and plugins_url() for absolute paths and URLs. See: http://codex.wordpress.org/Determining_Plugin_and_Content_Directories for more details.&lt;br /&gt;
&lt;br /&gt;
In the rest of this article, &quot;the Plugin PHP file&quot; refers to the main Plugin PHP file, whether in wp-content/plugins/ or a sub-directory.&lt;br /&gt;
Readme File&lt;br /&gt;
&lt;br /&gt;
If you want to host your Plugin on http://wordpress.org/extend/plugins/, you also need to create a readme.txt file in a standard format, and include it with your Plugin. See http://wordpress.org/extend/plugins/about/readme.txt for a description of the format.&lt;br /&gt;
&lt;br /&gt;
Note that the WordPress plugin repository takes the &quot;Requires&quot; and &quot;Tested up to&quot; versions from the readme.txt in the stable tag.&lt;br /&gt;
Home Page&lt;br /&gt;
&lt;br /&gt;
It is also very useful to create a web page to act as the home page for your WordPress Plugin. This page should describe how to install the Plugin, what it does, what versions of WordPress it is compatible with, what has changed from version to version of your Plugin, and how to use the Plugin.&lt;br /&gt;
File Headers&lt;br /&gt;
&lt;br /&gt;
Now it&#39;s time to put some information into your main Plugin PHP file.&lt;br /&gt;
Standard Plugin Information&lt;br /&gt;
&lt;br /&gt;
The top of your Plugin&#39;s main PHP file must contain a standard Plugin information header. This header lets WordPress recognize that your Plugin exists, add it to the Plugin management screen so it can be activated, load it, and run its functions; without the header, your Plugin will never be activated and will never run. Here is the header format:&lt;br /&gt;
&lt;br /&gt;
&lt;?php
/*
Plugin Name: Name Of The Plugin
Plugin URI: http://URI_Of_Page_Describing_Plugin_and_Updates
Description: A brief description of the Plugin.
Version: The Plugin&#39;s Version Number, e.g.: 1.0
Author: Name Of The Plugin Author
Author URI: http://URI_Of_The_Plugin_Author
License: A &quot;Slug&quot; license name e.g. GPL2
*/
?&gt;&lt;br /&gt;
&lt;br /&gt;
The minimum information WordPress needs to recognize your Plugin is the Plugin Name line. The rest of the information (if present) will be used to create the table of Plugins on the Plugin management screen. The order of the lines is not important.&lt;br /&gt;
&lt;br /&gt;
The License slug should be a short common identifier for the license the plugin is under and is meant to be a simple way of being explicit about the license of the code.&lt;br /&gt;
&lt;br /&gt;
Important: file must be in UTF-8 encoding.&lt;br /&gt;
License&lt;br /&gt;
&lt;br /&gt;
It is customary to follow the standard header with information about licensing for the Plugin. Most Plugins use the GPL2 license used by WordPress or a license compatible with the GPL2. To indicate a GPL2 license, include the following lines in your Plugin:&lt;br /&gt;
&lt;br /&gt;
&lt;?php
/*  Copyright YEAR  PLUGIN_AUTHOR_NAME  (email : PLUGIN AUTHOR EMAIL)

    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License, version 2, as 
    published by the Free Software Foundation.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program; if not, write to the Free Software
    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
*/
?&gt;&lt;br /&gt;
&lt;br /&gt;
Programming Your Plugin&lt;br /&gt;
&lt;br /&gt;
Now, it&#39;s time to make your Plugin actually do something. This section contains some general ideas about Plugin development, and describes how to accomplish several tasks your Plugin will need to do.&lt;br /&gt;
WordPress Plugin Hooks&lt;br /&gt;
&lt;br /&gt;
Many WordPress Plugins accomplish their goals by connecting to one or more WordPress Plugin &quot;hooks&quot;. The way Plugin hooks work is that at various times while WordPress is running, WordPress checks to see if any Plugins have registered functions to run at that time, and if so, the functions are run. These functions modify the default behavior of WordPress.&lt;br /&gt;
&lt;br /&gt;
For instance, before WordPress adds the title of a post to browser output, it first checks to see if any Plugin has registered a function for the &quot;filter&quot; hook called &quot;the_title&quot;. If so, the title text is passed in turn through each registered function, and the final result is what is printed. So, if your Plugin needs to add some information to the printed title, it can register a &quot;the_title&quot; filter function.&lt;br /&gt;
&lt;br /&gt;
Another example is the &quot;action&quot; hook called &quot;wp_footer&quot;. Just before the end of the HTML page WordPress is generating, it checks to see whether any Plugins have registered functions for the &quot;wp_footer&quot; action hook, and runs them in turn.&lt;br /&gt;
&lt;br /&gt;
You can learn more about how to register functions for both filter and action hooks, and what Plugin hooks are available in WordPress, in the Plugin API. If you find a spot in the WordPress code where you&#39;d like to have an action or filter, but WordPress doesn&#39;t have one, you can also suggest new hooks (suggestions will generally be taken); see Reporting Bugs to find out how.&lt;br /&gt;
Template Tags&lt;br /&gt;
&lt;br /&gt;
Another way for a WordPress Plugin to add functionality to WordPress is by creating custom Template Tags. Someone who wants to use your Plugin can add these &quot;tags&quot; to their theme, in the sidebar, post content section, or wherever it is appropriate. For instance, a Plugin that adds geographical tags to posts might define a template tag function called geotag_list_states() for the sidebar, which lists all the states posts are tagged with, with links to the state-based archive pages the Plugin enables.&lt;br /&gt;
&lt;br /&gt;
To define a custom template tag, simply write a PHP function and document it for Plugin users on your Plugin&#39;s home page and/or in the Plugin&#39;s main PHP file. It&#39;s a good idea when documenting the function to give an example of exactly what needs to be added to the theme file to use the function, including the &lt;?php and ?&gt;.&lt;br /&gt;
Saving Plugin Data to the Database&lt;br /&gt;
&lt;br /&gt;
Most WordPress Plugins will need to get some input from the site owner or blog users and save it between sessions, for use in its filter functions, action functions, and template functions. This information has to be saved in the WordPress database, in order to be persistent between sessions. There are three methods for saving Plugin data in the database:&lt;br /&gt;
&lt;br /&gt;
Use the WordPress &quot;option&quot; mechanism (described below). This method is appropriate for storing relatively small amounts of relatively static, named pieces of data -- the type of data you&#39;d expect the site owner to enter when first setting up the Plugin, and rarely change thereafter.&lt;br /&gt;
Post Meta (a.k.a. Custom Fields). Appropriate for data associated with individual posts, pages, or attachments. See post_meta Function Examples, add_post_meta(), and related functions.&lt;br /&gt;
Create a new, custom database table. This method is appropriate for data not associated with individual posts, pages, attachments, or comments -- the type of data that will grow as time goes on, and that doesn&#39;t have individual names. See Creating Tables with Plugins for information on how to do this. &lt;br /&gt;
&lt;br /&gt;
WordPress Options Mechanism&lt;br /&gt;
&lt;br /&gt;
See Creating Options Pages for info on how to create a page that will automatically save your options for you.&lt;br /&gt;
&lt;br /&gt;
WordPress has a mechanism for saving, updating, and retrieving individual, named pieces of data (&quot;options&quot;) in the WordPress database. Option values can be strings, arrays, or PHP objects (they will be &quot;serialized&quot;, or converted to a string, before storage, and unserialized when retrieved). Option names are strings, and they must be unique, so that they do not conflict with either WordPress or other Plugins.&lt;br /&gt;
&lt;br /&gt;
Here are the main functions your Plugin can use to access WordPress options.&lt;br /&gt;
&lt;br /&gt;
add_option($name, $value, $deprecated, $autoload);&lt;br /&gt;
&lt;br /&gt;
Creates a new option; does nothing if option already exists. &lt;br /&gt;
$name&lt;br /&gt;
Required (string). Name of the option to be added. &lt;br /&gt;
$value&lt;br /&gt;
Optional (mixed), defaults to empty string. The option value to be stored. &lt;br /&gt;
$deprecated&lt;br /&gt;
Optional (string), no longer used by WordPress, You may pass an empty string or null to this argument if you wish to use the following $autoload parameter. &lt;br /&gt;
$autoload&lt;br /&gt;
Optional, defaults to &#39;yes&#39; (enum: &#39;yes&#39; or &#39;no&#39;). If set to &#39;yes&#39; the setting is automatically retrieved by the wp_load_alloptions function. &lt;br /&gt;
&lt;br /&gt;
get_option($option);&lt;br /&gt;
&lt;br /&gt;
Retrieves an option value from the database. &lt;br /&gt;
$option&lt;br /&gt;
Required (string). Name of the option whose value you want returned. You can find a list of the default options that are installed with WordPress at the Option Reference. &lt;br /&gt;
&lt;br /&gt;
update_option($option_name, $newvalue);&lt;br /&gt;
&lt;br /&gt;
Updates or creates an option value in the database (note that add_option does not have to be called if you do not want to use the $deprecated or $autoload parameters). &lt;br /&gt;
$option_name&lt;br /&gt;
Required (string). Name of the option to update. &lt;br /&gt;
$newvalue&lt;br /&gt;
Required. (string|array|object) The new value for the option. &lt;br /&gt;
&lt;br /&gt;
Administration Panels&lt;br /&gt;
&lt;br /&gt;
Assuming that your Plugin has some options stored in the WordPress database (see section above), you will probably want it to have an administration panel that will enable your Plugin users to view and edit option values. The methods for doing this are described in Adding Administration Menus.&lt;br /&gt;
Internationalizing Your Plugin&lt;br /&gt;
&lt;br /&gt;
Once you have the programming for your Plugin done, another consideration (assuming you are planning on distributing your Plugin) is internationalization. Internationalization is the process of setting up software so that it can be localized; localization is the process of translating text displayed by the software into different languages. WordPress is used all around the world, so it has internationalization and localization built into its structure, including localization of Plugins.&lt;br /&gt;
&lt;br /&gt;
Please note that language files for Plugins ARE NOT automatically loaded. Add this to the Plugin code to make sure the language file(s) are loaded:&lt;br /&gt;
&lt;br /&gt;
load_plugin_textdomain(&#39;your-unique-name&#39;, false, basename( dirname( __FILE__ ) ) . &#39;/languages&#39; );&lt;br /&gt;
&lt;br /&gt;
To fetch a string simply use __(&#39;String name&#39;,&#39;your-unique-name&#39;); to return the translation or _e(&#39;String name&#39;,&#39;your-unique-name&#39;); to echo the translation. Translations will then go into your plugin&#39;s /languages folder.&lt;br /&gt;
&lt;br /&gt;
It is highly recommended that you internationalize your Plugin, so that users from different countries can localize it. There is a comprehensive reference on internationalization, including a section describing how to internationalize your plugin, at I18n for WordPress Developers.&lt;br /&gt;
Plugin Development Suggestions&lt;br /&gt;
&lt;br /&gt;
This last section contains some random suggestions regarding Plugin development.&lt;br /&gt;
&lt;br /&gt;
The code of a WordPress Plugin should follow the WordPress Coding Standards. Please consider the Inline Documentation Standards as well.&lt;br /&gt;
All the functions in your Plugin need to have unique names that are different from functions in the WordPress core, other Plugins, and themes. For that reason, it is a good idea to use a unique function name prefix on all of your Plugin&#39;s functions. A far superior possibility is to define your Plugin functions inside a class (which also needs to have a unique name).&lt;br /&gt;
Do not hardcode the WordPress database table prefix (usually &quot;wp_&quot;) into your Plugins. Be sure to use the $wpdb-&gt;prefix variable instead.&lt;br /&gt;
Database reading is cheap, but writing is expensive. Databases are exceptionally good at fetching data and giving it to you, and these operations are (usually) lightning quick. Making changes to the database, though, is a more complex process, and computationally more expensive. As a result, try to minimize the amount of writing you do to the database. Get everything prepared in your code first, so that you can make only those write operations that you need.&lt;br /&gt;
SELECT only what you need. Even though databases fetch data blindingly fast, you should still try to reduce the load on the database by only selecting that data which you need to use. If you need to count the number of rows in a table don&#39;t SELECT * FROM, because all the data in all the rows will be pulled, wasting memory. Likewise, if you only need the post_id and the post_author in your Plugin, then just SELECT those specific fields, to minimize database load. Remember: hundreds of other processes may be hitting the database at the same time. The database and server each have only so many resources to spread around amongst all those processes. Learning how to minimize your Plugin&#39;s hit against the database will ensure that your Plugin isn&#39;t the one that is blamed for abuse of resources.&lt;br /&gt;
Eliminate PHP errors in your plugin. Add define(&#39;WP_DEBUG&#39;, true); to your wp-config.php file, try all of your plugin functionality, and check to see if there are any errors or warnings. Fix any that occur, and continue in debug mode until they have all been eliminated.&lt;br /&gt;
Try not to echo 
&lt;p&gt;&amp;lt;script&amp;gt; and &amp;lt;style&amp;gt; tags directly - instead use the recommended wp_enqueue_style() and wp_enqueue_script() functions. They help eliminate including duplicate scripts and styles as well as introduce dependency support. See posts by the following people for more info: Ozh Richard, Artem Russakovskii, and Vladimir Prelovac. &lt;/p&gt;
&lt;p&gt;Reference : &amp;lt;a href=&amp;quot;http://codex.wordpress.org&amp;quot;&amp;gt;http://codex.wordpress.org&amp;lt;/a&amp;gt;&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://wordpressnutsandbolts.blogspot.com/feeds/5392750879902208953/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://wordpressnutsandbolts.blogspot.com/2011/12/how-to-create-wordpress-plugin.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4541278785090749160/posts/default/5392750879902208953'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4541278785090749160/posts/default/5392750879902208953'/><link rel='alternate' type='text/html' href='http://wordpressnutsandbolts.blogspot.com/2011/12/how-to-create-wordpress-plugin.html' title='How to create a Wordpress Plugin'/><author><name>Binish Prabhakar</name><uri>http://www.blogger.com/profile/06321237526635911658</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4541278785090749160.post-4212591344713114718</id><published>2011-12-10T20:46:00.000-08:00</published><updated>2014-07-09T11:51:27.769-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="PHP"/><title type='text'>get all file names from folder PHP</title><content type='html'>&lt;p&gt;Following code will retrieve all file names from a specified folder.&lt;/p&gt;
&lt;p&gt;$filePath = &amp;quot;/var/www/public_html/mysite/images&amp;quot;;/* Enter path to the folder */&lt;/p&gt;
&lt;p&gt;$string=&amp;quot;&amp;quot;;&lt;/p&gt;
&lt;p&gt;$fileCount=0;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;$dir = opendir($filePath);&lt;/p&gt;
&lt;p&gt;while ($file = readdir($dir)) {&lt;/p&gt;
&lt;p&gt;if (eregi(&amp;quot;\.png&amp;quot;,$file)) { /* Look for files with .png extension */&lt;/p&gt;
&lt;p&gt;$string .= &amp;quot;$file&lt;br /&gt;
  &amp;quot;;&lt;/p&gt;
&lt;p&gt;$fileCount++;&lt;/p&gt;
&lt;p&gt;}&lt;/p&gt;
&lt;p&gt;}&lt;/p&gt;
&lt;p&gt;if ($fileCount &amp;gt; 0) {&lt;/p&gt;
&lt;p&gt;echo sprintf(&amp;quot;&lt;br /&gt;
  &amp;lt;h2&amp;gt;&lt;br /&gt;
  All Files in %s&amp;gt;&amp;lt;/h2&amp;gt;&lt;/p&gt;
&lt;p&gt;%sTotal Files: %s&amp;quot;,$filePath,$string,$fileCount);&lt;/p&gt;
&lt;p&gt;}&lt;/p&gt;
&lt;p&gt;?&amp;gt;&lt;br /&gt;
&lt;/p&gt;
&lt;p&gt;Reference:http://www.snilesh.com &lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://wordpressnutsandbolts.blogspot.com/feeds/4212591344713114718/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://wordpressnutsandbolts.blogspot.com/2011/12/get-all-file-names-from-folder-php.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4541278785090749160/posts/default/4212591344713114718'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4541278785090749160/posts/default/4212591344713114718'/><link rel='alternate' type='text/html' href='http://wordpressnutsandbolts.blogspot.com/2011/12/get-all-file-names-from-folder-php.html' title='get all file names from folder PHP'/><author><name>Binish Prabhakar</name><uri>http://www.blogger.com/profile/06321237526635911658</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4541278785090749160.post-7429360829245784243</id><published>2011-12-10T20:40:00.000-08:00</published><updated>2014-07-09T12:10:34.485-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Wordpress"/><title type='text'>WordPress login page Customization by filters, actions &amp; plugins</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;By default, every wordpress powered site’s login page is located @  http://yoursite/wp-login.php url. Registration and reset pages are  called by adding an &lt;code&gt;action&lt;/code&gt; query in login ( wp-login.php ) page url. Reset page comes with a &lt;code&gt;lostpassword&lt;/code&gt; query attribute for action, like &lt;code&gt;http://yoursite/wp-login.php?action=lostpassword&lt;/code&gt; will display the reset page and &lt;code&gt;action=register&lt;/code&gt; displays the registration page. &lt;i&gt;Remember,  this is the default rules if you are not using any login or  registration management plugin, buddypress or any theme with custom  login page option.&lt;/i&gt;&lt;br /&gt;
It comes with a wordpress.org logo image on wordpress default login page, and i think &lt;b&gt;most of the people don’t want to show wordpress.org logo rather than their own site logo or defined image&lt;/b&gt;.  Moreover, the wordpress.org logo is linked to the wordpress.org site  with anchor title attribute “powered by wordpress”. Now, I will show you  &lt;b&gt;how to change this without affecting the core files&lt;/b&gt;.&lt;br /&gt;
&lt;h3&gt;Customizations&lt;/h3&gt;&lt;div class=&quot;para&quot;&gt;The wordpress.org logo file has 67px height and 326px width, so crop your image to this dimension first &lt;i&gt;( size actually doesn’t matter, for using bigger image, u need some css adjustment )&lt;/i&gt;. First, grab the new image url to replace wordpress.org pic, and place it on below code - &lt;br /&gt;
&lt;pre&gt;&lt;code&gt;add_action( &#39;login_enqueue_scripts&#39;, &#39;w4_login_enqueue_scripts&#39; );
function w4_login_enqueue_scripts(){
echo &#39;&lt;style media=&quot;screen&quot; type=&quot;text/css&quot;&gt;
&#39;;
echo &#39;#login h1 a{background-image:url(the_image_url_or_path);&#39;;
echo &#39;
&lt;/style&gt;&#39;;
}&lt;/code&gt;&lt;/pre&gt;If the image url is perfect and everything is fine, you will see your new login page image.&lt;br /&gt;
The &lt;code&gt;login_enqueue_scripts&lt;/code&gt; is called just before the  login_head action on wp-login.php file line 82 on wordpress version  3.1.1, and calling our function with this action will place our Css  inside login header tag.&lt;br /&gt;
&lt;code&gt;#login h1 a&lt;/code&gt; is used to identify the image anchor with CSS. Image Css Customization can be done with &lt;code&gt;#login h1 a&lt;/code&gt;.&lt;br /&gt;
&lt;h5&gt;To change the wordpress login page image url address to your site home page url&lt;/h5&gt;&lt;pre&gt;&lt;code&gt;add_filter( &#39;login_headerurl&#39;, &#39;w4_login_headerurl&#39;);
function w4_login_headerurl(){
 return home_url(&#39;/&#39;);
}&lt;/code&gt;&lt;/pre&gt;To use any other url replace &lt;code&gt;home_url(&#39;/&#39;)&lt;/code&gt; to the url.&lt;br /&gt;
&lt;h5&gt;To change the wordpress login page image title to your sitename&lt;/h5&gt;&lt;pre&gt;&lt;code&gt;add_filter( &#39;login_headertitle&#39;, &#39;w4_login_headertitle&#39;);
function w4_login_headertitle(){
 return get_bloginfo(&#39;title&#39;, &#39;display&#39; );
}&lt;/code&gt;&lt;/pre&gt;To use any other title replace &lt;code&gt;get_bloginfo(&#39;title&#39;, &#39;display&#39; )&lt;/code&gt; to your title.&lt;br /&gt;
Example: As example, view our &lt;a href=&quot;http://w4dev.com/wp-login.php&quot; rel=&quot;nofollow&quot;&gt;login page&lt;/a&gt; and &lt;a href=&quot;http://w4dev.com/wp-login.php?action=register&quot; rel=&quot;nofollow&quot;&gt;registration page&lt;/a&gt;. &lt;/div&gt;&lt;h3&gt;Get familiar with some related functions and hooks for WordPress Login Page&lt;/h3&gt;As WordPress login process uses variety of functions and hooks, we can use them for customizing a bit more.&lt;br /&gt;
&lt;div class=&quot;para&quot;&gt;&lt;h5&gt;wp_login_url&lt;/h5&gt;– is a function to generate the login url address. To change the url of the function we can simply hook to ‘login_url’.&lt;br /&gt;
Example:&lt;br /&gt;
&lt;pre&gt;&lt;code&gt;add_filter( &#39;login_url&#39;, &#39;mysite_login_url&#39;, 10, 2);
function mysite_login_url( $force_reauth, $redirect ){
 $login_url = &#39;yoursite_login_url&#39;;
 if ( !empty($redirect) )
  $login_url = add_query_arg( &#39;redirect_to&#39;, urlencode( $redirect ), $login_url );
 if ( $force_reauth )
  $login_url = add_query_arg( &#39;reauth&#39;, &#39;1&#39;, $login_url ) ;
 return $login_url ;
}&lt;/code&gt;&lt;/pre&gt;This will change the login url to your desire one when the &lt;code&gt;wp_login_url&lt;/code&gt; function is called.&lt;br /&gt;
&lt;h5&gt;login_redirect&lt;/h5&gt;– is used to redirect the user after they have logged in successfully.&lt;br /&gt;
Example:&lt;br /&gt;
&lt;pre&gt;&lt;code&gt;add_action( &#39;login_redirect&#39;, &#39;mysite_login_redirect&#39;);
function mysite_login_redirect(){
 return &#39;your_url&#39;;
}&lt;/code&gt;&lt;/pre&gt;So, this will take your user to your defined url address. You can change it based on yours capability or choice.&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: xx-small;&quot;&gt;Regards&lt;a href=&quot;http://w4dev.com/&quot;&gt;:http://w4dev.com &lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://wordpressnutsandbolts.blogspot.com/feeds/7429360829245784243/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://wordpressnutsandbolts.blogspot.com/2011/12/wordpress-login-page-customization-by.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4541278785090749160/posts/default/7429360829245784243'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4541278785090749160/posts/default/7429360829245784243'/><link rel='alternate' type='text/html' href='http://wordpressnutsandbolts.blogspot.com/2011/12/wordpress-login-page-customization-by.html' title='WordPress login page Customization by filters, actions &amp; plugins'/><author><name>Binish Prabhakar</name><uri>http://www.blogger.com/profile/06321237526635911658</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4541278785090749160.post-6987022871119773383</id><published>2011-12-10T20:36:00.000-08:00</published><updated>2011-12-10T20:38:23.817-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Wordpress"/><title type='text'>WordPress Change logo on wp-login page</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;f you want to change default wordpress logo on the wp-login.php page  then you can change wordpress logo by your logo by just adding following  lines in your theme’s function php files.&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEizF4049Dw4-fQpSJhzm3jrvdEI04uk5dEBSRIiUp32dUfeyiFvlxXJ_42LxzpYeB8sWuOxv6hg_hFM3w1xKPJauMZlFguLHLGqMRXR6G4aX3PASR4Lb0nE2gub552dvArOg_l2B3RKsy6G/s1600/wordpress_login_page.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;281&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEizF4049Dw4-fQpSJhzm3jrvdEI04uk5dEBSRIiUp32dUfeyiFvlxXJ_42LxzpYeB8sWuOxv6hg_hFM3w1xKPJauMZlFguLHLGqMRXR6G4aX3PASR4Lb0nE2gub552dvArOg_l2B3RKsy6G/s320/wordpress_login_page.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;container&quot;&gt;&lt;div class=&quot;line number1 index0 alt2&quot;&gt;&lt;code class=&quot;php keyword&quot;&gt;function&lt;/code&gt; &lt;code class=&quot;php plain&quot;&gt;my_custom_login_logo() {&lt;/code&gt;&lt;/div&gt;&lt;div class=&quot;line number2 index1 alt1&quot;&gt;&lt;code class=&quot;php spaces&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class=&quot;php functions&quot;&gt;echo&lt;/code&gt; &lt;code class=&quot;php plain&quot;&gt;&#39;&lt;style type=&quot;&amp;lt;/code&quot;&gt;
&lt;code class=&quot;php string&quot;&gt;&quot;text/css&quot;&lt;/code&gt;&lt;code class=&quot;php plain&quot;&gt;&gt;&lt;/code&gt;&lt;/div&gt;&lt;div class=&quot;line number3 index2 alt2&quot;&gt;&lt;code class=&quot;php spaces&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class=&quot;php plain&quot;&gt;h1 a { background-image:url(&lt;/code&gt;&lt;code class=&quot;php string&quot;&gt;&#39;.get_bloginfo(&#39;&lt;/code&gt;&lt;code class=&quot;php plain&quot;&gt;template_url&lt;/code&gt;&lt;code class=&quot;php string&quot;&gt;&#39;).&lt;/code&gt;&lt;/div&gt;&lt;div class=&quot;line number3 index2 alt2&quot;&gt;&lt;code class=&quot;php string&quot;&gt;&#39;&lt;/code&gt;&lt;code class=&quot;php plain&quot;&gt;/images/login-logo.png) !important; }&lt;/code&gt;&lt;/div&gt;&lt;div class=&quot;line number4 index3 alt1&quot;&gt;&lt;code class=&quot;php spaces&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class=&quot;php plain&quot;&gt;
&lt;/style&gt;&#39;;&lt;/code&gt;&lt;/div&gt;&lt;div class=&quot;line number5 index4 alt2&quot;&gt;&lt;code class=&quot;php plain&quot;&gt;}&lt;/code&gt;&lt;/div&gt;&lt;div class=&quot;line number7 index6 alt2&quot;&gt;&lt;code class=&quot;php plain&quot;&gt;add_action(&lt;/code&gt;&lt;code class=&quot;php string&quot;&gt;&#39;login_head&#39;&lt;/code&gt;&lt;code class=&quot;php plain&quot;&gt;, &lt;/code&gt;&lt;code class=&quot;php string&quot;&gt;&#39;my_custom_login_logo&#39;&lt;/code&gt;&lt;code class=&quot;php plain&quot;&gt;);&lt;/code&gt;&lt;br /&gt;
&lt;/div&gt;&lt;/div&gt;&lt;span style=&quot;font-size: xx-small;&quot;&gt;&amp;nbsp;Reference: &lt;a href=&quot;http://www.snilesh.com/&quot;&gt;http://www.snilesh.com&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://wordpressnutsandbolts.blogspot.com/feeds/6987022871119773383/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://wordpressnutsandbolts.blogspot.com/2011/12/wordpress-change-logo-on-wp-login-page.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4541278785090749160/posts/default/6987022871119773383'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4541278785090749160/posts/default/6987022871119773383'/><link rel='alternate' type='text/html' href='http://wordpressnutsandbolts.blogspot.com/2011/12/wordpress-change-logo-on-wp-login-page.html' title='WordPress Change logo on wp-login page'/><author><name>Binish Prabhakar</name><uri>http://www.blogger.com/profile/06321237526635911658</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEizF4049Dw4-fQpSJhzm3jrvdEI04uk5dEBSRIiUp32dUfeyiFvlxXJ_42LxzpYeB8sWuOxv6hg_hFM3w1xKPJauMZlFguLHLGqMRXR6G4aX3PASR4Lb0nE2gub552dvArOg_l2B3RKsy6G/s72-c/wordpress_login_page.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4541278785090749160.post-4840679204412757569</id><published>2011-12-10T19:42:00.000-08:00</published><updated>2014-07-09T12:10:08.193-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Wordpress"/><title type='text'>Adding TimThumb To Your WordPress Theme</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;a href=&quot;http://www.binarymoon.co.uk/projects/timthumb/&quot;&gt;TimThumb PHP Script&lt;/a&gt;  is a custom image-sizing script, that allows you to produce a cropped  and sized version of an image. These are great to use along with a  WordPress Magazine Theme. TimThumb has recently been released as open  source, and here I will walk you through adding TimThumb to your  WordPress theme. &lt;span id=&quot;more-401&quot;&gt;&lt;/span&gt;&lt;br /&gt;
Using TimThumb will require the use of &lt;a href=&quot;http://codex.wordpress.org/Using_Custom_Fields&quot; title=&quot;Learn about Custom Fields in WordPress&quot;&gt;WP Custom Fields&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;01. Setting Up The Script&lt;/h3&gt;Lets grab the &lt;a href=&quot;http://timthumb.googlecode.com/svn/trunk/timthumb.php&quot;&gt;TimThumb.php source code&lt;/a&gt;, and save it to our theme directory.&lt;br /&gt;
To keep things organized, lets save it in a scripts directory in our theme.&lt;br /&gt;
&lt;code&gt;yourdomain.com/wp-content/themes/your-theme/scripts/timthumb.php&lt;/code&gt;&lt;br /&gt;
Now create a new directory inside of scripts, and name it “cache”&lt;br /&gt;
&lt;code&gt;yourdomain.com/wp-content/themes/your-theme/scripts/cache/&lt;/code&gt;&lt;br /&gt;
Make sure that both directories &lt;i&gt;/scripts/&lt;/i&gt; and &lt;i&gt;/cache/&lt;/i&gt; are set to 755 so they’re writable by the server.&lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;02. Adding The Call To Our Theme Template&lt;/h3&gt;Depending on whether you use &lt;i&gt;home.php&lt;/i&gt; or &lt;i&gt;index.php&lt;/i&gt;, open the appropriate template file up, and lets find &lt;a href=&quot;http://codex.wordpress.org/The_Loop&quot; title=&quot;Learn about The Loop in WordPress&quot;&gt;The Loop&lt;/a&gt;. Look for the calll to the post title, and lets insert the call somewhere below the title, or meta information.&lt;br /&gt;
I’m presenting you with 3 options for the call. You can pick which one might suit you best.&lt;br /&gt;
&lt;b&gt;Option 01 – Show Image Only&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;&amp;lt;?php 
 // This will show only the image. 
 //Alter the width and height (in both places) to your needs.
?&amp;gt;  &amp;nbsp;  
&amp;lt;?php
  if ( get_post_meta($post-&amp;gt;ID, &#39;thumb&#39;, true) ) { ?&amp;gt;
    &amp;lt;div class=&quot;postthumb&quot;&amp;gt;
            &amp;lt;img src=&quot;&amp;lt;?php bloginfo(&#39;template_directory&#39;); ?&amp;gt;/scripts/timthumb.php?
            src=&amp;lt;?php echo get_post_meta($post-&amp;gt;ID, &quot;thumb&quot;, $single = true); ?&amp;gt;&amp;amp;h=150&amp;amp;w=150&amp;amp;zc=1&quot; 
            alt=&quot;&amp;lt;?php the_title(); ?&amp;gt;&quot; width=&quot;100&quot; height=&quot;57&quot; /&amp;gt;
    &amp;lt;/div&amp;gt;  
&amp;lt;?php } ?&amp;gt;&lt;/pre&gt;&lt;br /&gt;
&lt;pre class=&quot;php&quot; style=&quot;font-family: monospace;&quot;&gt;&lt;span style=&quot;color: black; font-weight: bold;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot;php&quot; style=&quot;font-family: monospace;&quot;&gt;&lt;b&gt;Option 03 – Show image and link image to URL of your choice. &lt;/b&gt;Requires
 additional custom field of “imglink”. Could be used for outgoing links,
 or linking a thumb to a full version of the image. This option would 
work best inside of your &lt;i&gt;single.php&lt;/i&gt; template.&lt;/pre&gt;&lt;pre class=&quot;php&quot; style=&quot;font-family: monospace;&quot;&gt;&lt;span style=&quot;color: black; font-weight: bold;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/pre&gt;&lt;div class=&quot;wp_syntax&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;pre class=&quot;php&quot; style=&quot;font-family: monospace;&quot;&gt;&lt;span style=&quot;color: black; font-weight: bold;&quot;&gt;  &lt;span style=&quot;color: #666666; font-style: italic;&quot;&gt;// This will show the image and link it to anything you place into another&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot;php&quot; style=&quot;font-family: monospace;&quot;&gt;&lt;span style=&quot;color: black; font-weight: bold;&quot;&gt;&lt;span style=&quot;color: #666666; font-style: italic;&quot;&gt;custom field of &quot;imglink&quot;.&lt;/span&gt;
  &lt;span style=&quot;color: #666666; font-style: italic;&quot;&gt;// Alter the width and height (in both places) to your needs.&lt;/span&gt;
  &lt;span style=&quot;color: black; font-weight: bold;&quot;&gt;?&amp;gt;&lt;/span&gt;
&amp;nbsp;
&lt;span style=&quot;color: black; font-weight: bold;&quot;&gt; &lt;span style=&quot;color: #b1b100;&quot;&gt;if&lt;/span&gt; &lt;span style=&quot;color: #009900;&quot;&gt;(&lt;/span&gt; get_post_meta&lt;span style=&quot;color: #009900;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #000088;&quot;&gt;$post&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #004000;&quot;&gt;ID&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;&#39;imglink&#39;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #009900; font-weight: bold;&quot;&gt;true&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;)&lt;/span&gt; &lt;span style=&quot;color: #009900;&quot;&gt;)&lt;/span&gt; &lt;span style=&quot;color: #009900;&quot;&gt;{&lt;/span&gt; &lt;span style=&quot;color: black; font-weight: bold;&quot;&gt;?&amp;gt;&lt;/span&gt;
 &lt;div class=&quot;postthumb&quot;&gt;&lt;a #000000;=&quot;&quot; bold;&quot;=&quot;&quot; color:=&quot;&quot; font-weight:=&quot;&quot; href=&quot;http://www.blogger.com/%3Cspan%20style=&quot;&gt; &lt;span style=&quot;color: #b1b100;&quot;&gt;echo&lt;/span&gt; get_post_meta&lt;span style=&quot;color: #009900;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #000088;&quot;&gt;$post&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #004000;&quot;&gt;ID&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;&quot;imglink&quot;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #000088;&quot;&gt;$single&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #009900; font-weight: bold;&quot;&gt;true&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/a&gt;
&lt;span style=&quot;color: #339933;&quot;&gt;&amp;nbsp;&lt;/span&gt; &lt;span style=&quot;color: black; font-weight: bold;&quot;&gt;?&amp;gt;&lt;/span&gt;&quot; rel=&quot;bookmark&quot; title=&quot;Permanent Link to &lt;span style=&quot;color: black; font-weight: bold;&quot;&gt; the_title&lt;span style=&quot;color: #009900;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt; &lt;span style=&quot;color: black; font-weight: bold;&quot;&gt;?&amp;gt;&lt;/span&gt;&quot;&amp;gt;&lt;span style=&quot;color: black; font-weight: bold;&quot;&gt; &lt;span style=&quot;color: #009900;&quot;&gt;}&lt;/span&gt; &lt;span style=&quot;color: black; font-weight: bold;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;color: black; font-weight: bold;&quot;&gt;&lt;span style=&quot;color: black; font-weight: bold;&quot;&gt;&lt;span style=&quot;color: black; font-weight: bold;&quot;&gt;?&amp;gt;&lt;/span&gt;&lt;img #000000;=&quot;&quot; bold;&quot;=&quot;&quot; color:=&quot;&quot; font-weight:=&quot;&quot; src=&quot;%3Cspan%20style=&quot; /&gt; bloginfo&lt;span style=&quot;color: #009900;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&#39;template_directory&#39;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt; &lt;span style=&quot;color: black; font-weight: bold;&quot;&gt;?&amp;gt;&lt;/span&gt;/scripts/timthumb.php?src=&lt;span style=&quot;color: black; font-weight: bold;&quot;&gt; &lt;span style=&quot;color: #b1b100;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;color: black; font-weight: bold;&quot;&gt;&lt;span style=&quot;color: black; font-weight: bold;&quot;&gt;&lt;span style=&quot;color: black; font-weight: bold;&quot;&gt;&lt;span style=&quot;color: #b1b100;&quot;&gt;echo&lt;/span&gt; get_post_meta&lt;span style=&quot;color: #009900;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #000088;&quot;&gt;$post&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #004000;&quot;&gt;ID&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;&quot;thumb&quot;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #000088;&quot;&gt;$single&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #009900; font-weight: bold;&quot;&gt;true&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt; &lt;span style=&quot;color: black; font-weight: bold;&quot;&gt;?&amp;gt;&lt;/span&gt;&amp;amp;h=150&amp;amp;w=150&amp;amp;zc=1&quot; alt=&quot;&lt;span style=&quot;color: black; font-weight: bold;&quot;&gt; the_title&lt;span style=&quot;color: #009900;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt; &lt;span style=&quot;color: black; font-weight: bold;&quot;&gt;?&amp;gt;&lt;/span&gt;&quot;  /&amp;gt;&lt;span style=&quot;color: black; font-weight: bold;&quot;&gt; &lt;span style=&quot;color: #b1b100;&quot;&gt;if&lt;/span&gt; &lt;span style=&quot;color: #009900;&quot;&gt;(&lt;/span&gt; get_post_meta&lt;span style=&quot;color: #009900;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #000088;&quot;&gt;$post&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #004000;&quot;&gt;ID&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;&#39;imglink&#39;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #009900; font-weight: bold;&quot;&gt;true&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;)&lt;/span&gt; &lt;span style=&quot;color: #009900;&quot;&gt;)&lt;/span&gt; &lt;span style=&quot;color: #009900;&quot;&gt;{&lt;/span&gt; &lt;span style=&quot;color: black; font-weight: bold;&quot;&gt;?&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: black; font-weight: bold;&quot;&gt; &lt;span style=&quot;color: #009900;&quot;&gt;}&lt;/span&gt; &lt;span style=&quot;color: black; font-weight: bold;&quot;&gt;?&amp;gt;&lt;/span&gt;
 &lt;/span&gt;&lt;/div&gt;&lt;span style=&quot;color: black; font-weight: bold;&quot;&gt; &lt;span style=&quot;color: #009900;&quot;&gt;}&lt;/span&gt; &lt;span style=&quot;color: black; font-weight: bold;&quot;&gt;?&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot;php&quot; style=&quot;font-family: monospace;&quot;&gt;&lt;span style=&quot;color: black; font-weight: bold;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/pre&gt;&lt;h3&gt;03. Making Use of Custom Fields&lt;/h3&gt;&lt;h3 style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;For creation and use of custom&amp;nbsp; field refer the post &lt;/span&gt;&lt;/h3&gt;&lt;h3 class=&quot;post-title entry-title&quot;&gt;&lt;a href=&quot;http://wordpressnutsandbolts.blogspot.com/2011/09/how-to-get-custom-feild-value-of-post.html&quot;&gt;How to get the custom feild value of post or page in wordpress?&lt;/a&gt;&lt;/h3&gt;&lt;h3 class=&quot;post-title entry-title&quot;&gt;&lt;span style=&quot;font-size: xx-small;&quot;&gt;Reference:http://vonlind.com/2008/06/adding-timthumb-to-your-wordpress-theme/ &lt;/span&gt;&lt;/h3&gt;&lt;h3&gt;&lt;/h3&gt;&lt;h3&gt;&lt;/h3&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://wordpressnutsandbolts.blogspot.com/feeds/4840679204412757569/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://wordpressnutsandbolts.blogspot.com/2011/12/adding-timthumb-to-your-wordpress-theme.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4541278785090749160/posts/default/4840679204412757569'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4541278785090749160/posts/default/4840679204412757569'/><link rel='alternate' type='text/html' href='http://wordpressnutsandbolts.blogspot.com/2011/12/adding-timthumb-to-your-wordpress-theme.html' title='Adding TimThumb To Your WordPress Theme'/><author><name>Binish Prabhakar</name><uri>http://www.blogger.com/profile/06321237526635911658</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4541278785090749160.post-4845455225227851710</id><published>2011-12-10T04:23:00.000-08:00</published><updated>2014-07-09T12:09:22.311-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="PHP"/><title type='text'>How to close open HTML tag in a string?</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;pre class=&quot;lang-php prettyprint&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;code&gt;&lt;span class=&quot;kwd&quot;&gt;How Convert&lt;/span&gt;&lt;/code&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot;lang-php prettyprint&quot;&gt;&lt;code&gt;&lt;span class=&quot;kwd&quot;&gt;&lt;/span&gt;&lt;/code&gt;&lt;pre&gt;&lt;code&gt;&lt;span class=&quot;kwd&quot;&gt;&amp;lt;p&amp;gt;This is some text and here is a &amp;lt;strong&amp;gt;bold&amp;nbsp;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;pre&gt;&lt;code&gt;&lt;span class=&quot;kwd&quot;&gt;text then the post stop here....&amp;lt;/p&amp;gt;

&lt;/span&gt;&lt;/code&gt;&lt;b&gt;&lt;b&gt;&lt;code&gt;&lt;/code&gt;&lt;/b&gt;&lt;/b&gt;&lt;/pre&gt;&lt;pre class=&quot;lang-php prettyprint&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;code&gt;&lt;span class=&quot;kwd&quot;&gt;To&lt;/span&gt;&lt;/code&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot;lang-php prettyprint&quot;&gt;&lt;code&gt;&lt;span class=&quot;tag&quot;&gt;&lt;pre&gt;&amp;lt;p&amp;gt;This is some text and here is a&amp;nbsp;&lt;/pre&gt;&lt;pre&gt;&amp;lt;strong&amp;gt;bold text then the post stop here....&amp;lt;/strong&amp;gt;&amp;lt;/p&amp;gt;
&lt;/pre&gt;&lt;/span&gt;&lt;/code&gt;&lt;b&gt;&lt;code&gt;&lt;span class=&quot;pln&quot;&gt;
&lt;/span&gt;&lt;/code&gt;&lt;code&gt;&lt;span class=&quot;kwd&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/code&gt;&lt;b&gt;&lt;code&gt;&lt;span class=&quot;kwd&quot;&gt; &lt;/span&gt;&lt;/code&gt;&lt;/b&gt;&lt;/b&gt;&lt;/pre&gt;&lt;pre class=&quot;lang-php prettyprint&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;b&gt;&lt;code&gt;&lt;span class=&quot;kwd&quot;&gt;Follow the Code&lt;/span&gt;&lt;/code&gt;&lt;/b&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot;lang-php prettyprint&quot;&gt;&lt;b&gt;&lt;code&gt;&lt;span class=&quot;kwd&quot;&gt; &lt;/span&gt;&lt;/code&gt;&lt;/b&gt;&lt;/pre&gt;&lt;pre class=&quot;lang-php prettyprint&quot;&gt;&lt;code&gt;&lt;span class=&quot;kwd&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; closetags&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;$html&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
&amp;nbsp; &amp;nbsp; preg_match_all&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot;&gt;&#39;#&amp;lt;(?!meta|img|br|hr|input\b)\b([a-z]+)&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;pre class=&quot;lang-php prettyprint&quot;&gt;&lt;code&gt;&lt;span class=&quot;str&quot;&gt;(?: .*)?(?#iU&#39;&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; $html&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; $result&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
&amp;nbsp; &amp;nbsp; $openedtags &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; $result&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;lit&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;];&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
&amp;nbsp; &amp;nbsp; preg_match_all&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot;&gt;&#39;##iU&#39;&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; $html&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; $result&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
&amp;nbsp; &amp;nbsp; $closedtags &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; $result&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;lit&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;];&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
&amp;nbsp; &amp;nbsp; $len_opened &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; count&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;$openedtags&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;kwd&quot;&gt;if&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;count&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;$closedtags&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;==&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; $len_opened&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;kwd&quot;&gt;return&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; $html&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
&amp;nbsp; &amp;nbsp; $openedtags &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; array_reverse&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;$openedtags&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;kwd&quot;&gt;for&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;$i&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;lit&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; $i &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; $len_opened&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; $i&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;++)&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;kwd&quot;&gt;if&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;(!&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;in_array&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;$openedtags&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;$i&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;],&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; $closedtags&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;))&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $html &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;.=&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;str&quot;&gt;&#39;&lt;span class=&quot;pun&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;$openedtags&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;$i&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;].&lt;/span&gt;&lt;span class=&quot;str&quot;&gt;&#39;&amp;gt;&#39;&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;kwd&quot;&gt;else&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; unset&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;$closedtags&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;array_search&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;$openedtags&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;$i&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;],&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;pre class=&quot;lang-php prettyprint&quot;&gt;&lt;code&gt;&lt;span class=&quot;str&quot;&gt;&lt;span class=&quot;pln&quot;&gt; $closedtags&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;)]);&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;kwd&quot;&gt;return&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; $html&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/pre&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://wordpressnutsandbolts.blogspot.com/feeds/4845455225227851710/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://wordpressnutsandbolts.blogspot.com/2011/12/how-to-close-open-html-tag-in-string.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4541278785090749160/posts/default/4845455225227851710'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4541278785090749160/posts/default/4845455225227851710'/><link rel='alternate' type='text/html' href='http://wordpressnutsandbolts.blogspot.com/2011/12/how-to-close-open-html-tag-in-string.html' title='How to close open HTML tag in a string?'/><author><name>Binish Prabhakar</name><uri>http://www.blogger.com/profile/06321237526635911658</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4541278785090749160.post-8623801609737809648</id><published>2011-12-07T09:07:00.000-08:00</published><updated>2011-12-07T09:19:16.095-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="AJAX"/><title type='text'>Using POST method in XMLHTTPRequest(Ajax)</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;Usually only the GET method is used while creating &lt;a href=&quot;http://www.openjs.com/ajax/&quot;&gt;Ajax&lt;/a&gt;  apps. But there are several occasions when POST is necessary when  creating a ajax request. This could be for several reasons. For example,  POST request are considered more secure than GET request as creating a  POST request is relatively harder than creating a GET request.&lt;br /&gt;
&lt;h2&gt;Requirements&lt;/h2&gt;&lt;ul&gt;&lt;li&gt;Create a XMLHTTPRequest Object that uses the POST method.&lt;/li&gt;
&lt;li&gt;See if the arguments passed to it appear in the &#39;&lt;code&gt;$_POST&lt;/code&gt;&#39; array in &lt;abbr class=&quot;PHP : Hypertext Preprocessor&quot;&gt;PHP&lt;/abbr&gt;.&lt;/li&gt;
&lt;/ul&gt;&lt;h2&gt;Code&lt;/h2&gt;&lt;h3&gt;XMLHTTPRequest Object&lt;/h3&gt;For the sake of simplicity, we are going to create the XMLHTTPRequest  object using the Firefox supported &#39; XMLHttpRequest()&#39; function. I  believe that you know the proper way of &lt;a href=&quot;http://www.openjs.com/scripts/jx/jx.php&quot; title=&quot;jx Ajax Library - Line by Line Explaination&quot;&gt;creating a cross-browser XMLHttpRequest object&lt;/a&gt;. If not, learn that first.&lt;br /&gt;
&lt;pre&gt;&lt;code class=&quot;javascript&quot;&gt;var http = new XMLHttpRequest();&lt;/code&gt;&lt;/pre&gt;&lt;h3&gt;Using GET method&lt;/h3&gt;Now we open a connection using the GET method.&lt;br /&gt;
&lt;pre&gt;&lt;code class=&quot;javascript&quot;&gt;
var url = &quot;get_data.php&quot;;
var params = &quot;lorem=ipsum&amp;amp;name=binny&quot;;
http.open(&quot;&lt;span class=&quot;special&quot;&gt;GET&lt;/span&gt;&quot;, url&lt;span class=&quot;special&quot;&gt;+&quot;?&quot;+params&lt;/span&gt;, true);
http.onreadystatechange = function() {//Call a function when the state changes.
 if(http.readyState == 4 &amp;amp;&amp;amp; http.status == 200) {
  alert(http.responseText);
 }
}
http.send(&lt;span class=&quot;special&quot;&gt;null&lt;/span&gt;);
&lt;/code&gt;&lt;/pre&gt;I really hope that this much is clear for you - I am assuming that you know a bit of Ajax coding. If you don&#39;t, please read a &lt;a href=&quot;http://www.openjs.com/ajax/tutorial/&quot; title=&quot;A Gentle Introduction to Ajax&quot;&gt;ajax tutorial&lt;/a&gt; that explains these parts before continuing.&lt;br /&gt;
&lt;h3&gt;POST method&lt;/h3&gt;We are going to make some modifications so POST method will be used when sending the request...&lt;br /&gt;
&lt;pre&gt;&lt;code class=&quot;javascript&quot;&gt;
var url = &quot;get_data.php&quot;;
var params = &quot;lorem=ipsum&amp;amp;name=binny&quot;;
http.open(&quot;&lt;span class=&quot;highlight&quot;&gt;POST&lt;/span&gt;&quot;, url, true);

&lt;span class=&quot;highlight&quot;&gt;//Send the proper header information along with the request
http.setRequestHeader(&quot;Content-type&quot;, &quot;application/x-www-form-urlencoded&quot;);
http.setRequestHeader(&quot;Content-length&quot;, params.length);
http.setRequestHeader(&quot;Connection&quot;, &quot;close&quot;);&lt;/span&gt;

http.onreadystatechange = function() {//Call a function when the state changes.
 if(http.readyState == 4 &amp;amp;&amp;amp; http.status == 200) {
  alert(http.responseText);
 }
}
http.send(&lt;span class=&quot;highlight&quot;&gt;params&lt;/span&gt;);
&lt;/code&gt;&lt;/pre&gt;The first change(and the most obvious one) is that I changed the first argument of the &lt;code&gt;open&lt;/code&gt;  function from GET to POST. Also notice the difference in the second  argument - in the GET method, we send the parameters along with the url  separated by a &#39;?&#39; character...&lt;br /&gt;
&lt;pre&gt;&lt;code class=&quot;javascript&quot;&gt;http.open(&quot;GET&quot;,&lt;span class=&quot;special&quot;&gt;url+&quot;?&quot;+params&lt;/span&gt;, true);&lt;/code&gt;&lt;/pre&gt;But in the POST method we will use just the url as the second argument. We will send the parameters later.&lt;br /&gt;
&lt;pre&gt;&lt;code class=&quot;javascript&quot;&gt;http.open(&quot;POST&quot;, &lt;span class=&quot;special&quot;&gt;url&lt;/span&gt;, true);&lt;/code&gt;&lt;/pre&gt;Some &lt;a href=&quot;http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html&quot; title=&quot;HTTP/1.1: Header Field Definitions&quot;&gt;http headers&lt;/a&gt; must be set along with any POST request. So we set them in these lines...&lt;br /&gt;
&lt;pre&gt;&lt;code class=&quot;javascript&quot;&gt;http.setRequestHeader(&quot;Content-type&quot;, &quot;application/x-www-form-urlencoded&quot;);
http.setRequestHeader(&quot;Content-length&quot;, params.length);
http.setRequestHeader(&quot;Connection&quot;, &quot;close&quot;);&lt;/code&gt;&lt;/pre&gt;With the above lines we are basically saying that the data send is in  the format of a form submission. We also give the length of the  parameters we are sending.&lt;br /&gt;
&lt;pre&gt;&lt;code class=&quot;javascript&quot;&gt;http.onreadystatechange = function() {//Call a function when the state changes.
 if(http.readyState == 4 &amp;amp;&amp;amp; http.status == 200) {
  alert(http.responseText);
 }
}&lt;/code&gt;&lt;/pre&gt;We set a handler for the &#39;ready state&#39; change event. This is the same handler we used for the GET method. You can use the &lt;code&gt;http.responseText&lt;/code&gt; here - insert into a div using innerHTML(&lt;a class=&quot;mypoges blog&quot; href=&quot;http://binnyva.blogspot.com/2005/11/ahahasynchronous-html-over-http-ajax.html&quot; title=&quot;AHAH(Asynchronous HTML over HTTP) - AJAX 2.0&quot;&gt;AHAH&lt;/a&gt;), eval it(&lt;a class=&quot;blog mypages&quot; href=&quot;http://binnyva.blogspot.com/2006/03/ajax-response-data-formats.html&quot; title=&quot;Ajax Response Data Formats&quot;&gt;JSON&lt;/a&gt;) or anything else.&lt;br /&gt;
&lt;pre&gt;&lt;code class=&quot;javascript&quot;&gt;http.send(&lt;span class=&quot;highlight&quot;&gt;params&lt;/span&gt;);&lt;/code&gt;&lt;/pre&gt;Finally, we send the parameters with the request. The given url is  loaded only after this line is called. In the GET method, the parameter  will be a null value. But in the POST method, the data to be send will  be send as the argument of the &lt;code&gt;send&lt;/code&gt; function. The &lt;code&gt;params&lt;/code&gt;  variable was declared in the second line as  &quot;lorem=ipsum&amp;amp;name=binny&quot; - so we send two parameters - &#39;lorem&#39; and  &#39;name&#39; with the values &#39;ipsum&#39; and &#39;binny&#39; respectively.&lt;br /&gt;
That&#39;s it. If you wish to see the working of this script, I have set up a &lt;a href=&quot;http://www.openjs.com/scripts/examples/ajax_using_post.php&quot;&gt;demo page for Ajax using post&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
Reference: http://www.openjs.com/articles/ajax_xmlhttp_using_post.php&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: x-large;&quot;&gt;&lt;b&gt;Another Method &lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
Using Ajax to  		send &quot;&lt;code&gt;POST&lt;/code&gt;&quot; requests is very similar to that for  		&quot;&lt;code&gt;GET&lt;/code&gt;&quot; requests, with a couple of differences. Traditionally  		&quot;&lt;code&gt;POST&lt;/code&gt;&quot; is used when the information you&#39;re sending  		exceeds a certain size&lt;br /&gt;
First, I&#39;m bringing back our generic function for creating an Ajax  		object instance:&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;examplecode&quot;&gt;function ajaxRequest(){&lt;br /&gt;
&amp;nbsp;var activexmodes=[&quot;Msxml2.XMLHTTP&quot;, &quot;Microsoft.XMLHTTP&quot;] //activeX  	versions to check for in IE&lt;br /&gt;
&amp;nbsp;if (window.ActiveXObject){ //Test for support for ActiveXObject in IE first  	(as XMLHttpRequest in IE7 is broken)&lt;br /&gt;
&amp;nbsp; 	for (var i=0; i&lt;activexmodes.length; i++){&lt;br=&quot;&quot;&gt; 	&amp;nbsp;&amp;nbsp; 	try{&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; 	return new ActiveXObject(activexmodes[i])&lt;br /&gt;
&amp;nbsp;&amp;nbsp; 	}&lt;br /&gt;
&amp;nbsp;&amp;nbsp; 	catch(e){&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; 	//suppress error&lt;br /&gt;
&amp;nbsp;&amp;nbsp; 	}&lt;br /&gt;
&amp;nbsp; 	}&lt;br /&gt;
&amp;nbsp;}&lt;br /&gt;
&amp;nbsp;else if (window.XMLHttpRequest) // if Mozilla, Safari etc&lt;br /&gt;
&amp;nbsp; 	return new XMLHttpRequest()&lt;br /&gt;
&amp;nbsp;else&lt;br /&gt;
&amp;nbsp; 	return false&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
//Sample call:&lt;br /&gt;
//var myajaxrequest=new ajaxRequest()&lt;/activexmodes.length;&gt;&lt;/div&gt;No changes have been made to this function.&lt;br /&gt;
&lt;h4&gt;      &lt;img border=&quot;0&quot; height=&quot;17&quot; src=&quot;http://www.javascriptkit.com/jkincludes/arrow2.gif&quot; width=&quot;17&quot; /&gt;      	Ajax POST request&lt;/h4&gt;Note Ajax POST ang GET methods&lt;br /&gt;
&lt;div class=&quot;examplecode&quot;&gt;var mypostrequest=new ajaxRequest()&lt;br /&gt;
mypostrequest.onreadystatechange=function(){&lt;br /&gt;
&amp;nbsp;if (mypostrequest.readyState==4){&lt;br /&gt;
&amp;nbsp; 	if (mypostrequest.status==200 || window.location.href.indexOf(&quot;http&quot;)==-1){&lt;br /&gt;
&amp;nbsp;&amp;nbsp; 	document.getElementById(&quot;result&quot;).innerHTML=mypostrequest.responseText&lt;br /&gt;
&amp;nbsp; 	}&lt;br /&gt;
&amp;nbsp; 	else{&lt;br /&gt;
&amp;nbsp;&amp;nbsp; 	alert(&quot;An error has occured making the request&quot;)&lt;br /&gt;
&amp;nbsp; 	}&lt;br /&gt;
&amp;nbsp;}&lt;br /&gt;
}&lt;br /&gt;
var namevalue=encodeURIComponent(document.getElementById(&quot;name&quot;).value)&lt;br /&gt;
var agevalue=encodeURIComponent(document.getElementById(&quot;age&quot;).value)&lt;br /&gt;
var parameters=&quot;name=&quot;+namevalue+&quot;&amp;amp;age=&quot;+agevalue&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;mypostrequest.open(&quot;POST&quot;, &quot;basicform.php&quot;,  	true)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;mypostrequest.setRequestHeader(&quot;Content-type&quot;,  	&quot;application/x-www-form-urlencoded&quot;)&lt;br /&gt;
mypostrequest.send(parameters)&lt;/span&gt;&lt;/div&gt;An Ajax POST request has the following pattern (the order is important):&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;An &quot;&lt;code&gt;onreadystatechange&lt;/code&gt;&quot; event handler that&#39;s set to a  		function reference that will fire during each stage of the Ajax request.  		Use the Ajax request object&#39;s &quot;&lt;code&gt;readyState&lt;/code&gt;&quot; and&amp;nbsp; &quot;&lt;code&gt;status&lt;/code&gt;&quot;  		properties to determine when the request is complete before handling the  		returned data.&lt;/li&gt;
&lt;li&gt;Call &quot;&lt;code&gt;ajaxobject.open()&lt;/code&gt;&quot; with 3 parameters defined- the  		first one should always be &quot;&lt;code&gt;POST&lt;/code&gt;&quot;, the second one the URL  		(aka form &quot;&lt;code&gt;ACTION&lt;/code&gt;&quot;) of the request &lt;b&gt;without&lt;/b&gt; any parameters, and finally, a 3rd  		parameter set to &lt;code&gt;true&lt;/code&gt;. Notice the use of 		&lt;a href=&quot;http://www.javascriptkit.com/jsref/globalfunctions.shtml&quot;&gt; 		encodeURIComponent()&lt;/a&gt; to encode any special characters within the  		parameter values.&lt;/li&gt;
&lt;li&gt;Call s&lt;code&gt;etRequestHeader()&lt;/code&gt; and set its content type to &quot;&lt;code&gt;application/x-www-form-urlencoded&lt;/code&gt;&quot;.  		This is needed for any &lt;code&gt;POST&lt;/code&gt; request made via Ajax.&lt;/li&gt;
&lt;li&gt;Finally, call &lt;code&gt;ajaxobject.send()&lt;/code&gt;,passing in the  		parameters that will be sent (without the &lt;code&gt;&quot;?&quot;&lt;/code&gt; prefix).&lt;/li&gt;
&lt;/ul&gt;Note that we&#39;re expecting the returned result in this example to be plain  	text/html. If the returned result is XML data instead, the method &lt;code&gt; 	overrideMimeType(&#39;text/xml&#39;)&lt;/code&gt; should be called (more on this  	on the page &quot;&lt;a href=&quot;http://www.javascriptkit.com/dhtmltutors/ajaxgetpost3.shtml&quot;&gt;Retrieving an XML document using  	Ajax&lt;/a&gt;&quot;).&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://wordpressnutsandbolts.blogspot.com/feeds/8623801609737809648/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://wordpressnutsandbolts.blogspot.com/2011/12/using-post-method-in-xmlhttprequestajax.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4541278785090749160/posts/default/8623801609737809648'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4541278785090749160/posts/default/8623801609737809648'/><link rel='alternate' type='text/html' href='http://wordpressnutsandbolts.blogspot.com/2011/12/using-post-method-in-xmlhttprequestajax.html' title='Using POST method in XMLHTTPRequest(Ajax)'/><author><name>Binish Prabhakar</name><uri>http://www.blogger.com/profile/06321237526635911658</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4541278785090749160.post-2007787076739156027</id><published>2011-12-07T08:59:00.000-08:00</published><updated>2014-07-09T12:09:22.293-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="CAPTCHA"/><category scheme="http://www.blogger.com/atom/ns#" term="PHP"/><title type='text'>PHP CAPTCHA, image validation</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;Use this script to protect your contact form, your whois query tool or  just a form where some extra validation is needed. How does it work?&lt;br /&gt;
A session will be created inside a dynamic image file (requires GD  library). The random value of this image appears inside the generated  CAPTCHA image. The user has to enter this value into a form field. While  processing the form, the entered value get checked against the session  value. Without entering the correct string a form will not be processed.  This mechanism is very useful to protect your form again (spam) bots.&lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;The PHP code snippet&lt;/h3&gt;&lt;br /&gt;
Create a php file with that code an call it &quot;random.php&quot;&lt;br /&gt;
session_start();&lt;br /&gt;
&lt;br /&gt;
if (empty($_SESSION[&#39;rand_code&#39;])) {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; $str = &quot;&quot;;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; $length = 0;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; for ($i = 0; $i &amp;lt; 4; $i++) {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // this numbers refer to numbers of the ascii table (small-caps)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $str .= chr(rand(97, 122));&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; $_SESSION[&#39;rand_code&#39;] = $str;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
$imgX = 60;&lt;br /&gt;
$imgY = 20;&lt;br /&gt;
$image = imagecreatetruecolor(60, 20);&lt;br /&gt;
&lt;br /&gt;
$backgr_col = imagecolorallocate($image, 238,239,239);&lt;br /&gt;
$border_col = imagecolorallocate($image, 208,208,208);&lt;br /&gt;
$text_col = imagecolorallocate($image, 46,60,31);&lt;br /&gt;
&lt;br /&gt;
imagefilledrectangle($image, 0, 0, 60, 20, $backgr_col);&lt;br /&gt;
imagerectangle($image, 0, 0, 59, 19, $border_col);&lt;br /&gt;
&lt;br /&gt;
$font = &quot;VeraSe.ttf&quot;; // it&#39;s a Bitstream font check www.gnome.org for more&lt;br /&gt;
$font_size = 10;&lt;br /&gt;
$angle = 0;&lt;br /&gt;
$box = imagettfbbox($font_size, $angle, $font, $_SESSION[&#39;rand_code&#39;]);&lt;br /&gt;
$x = (int)($imgX - $box[4]) / 2;&lt;br /&gt;
$y = (int)($imgY - $box[5]) / 2;&lt;br /&gt;
imagettftext($image, $font_size, $angle, $x, $y, $text_col, $font, $_SESSION[&#39;rand_code&#39;]);&lt;br /&gt;
&lt;br /&gt;
header(&quot;Content-type: image/png&quot;);&lt;br /&gt;
imagepng($image);&lt;br /&gt;
imagedestroy ($image);&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;How-to use it?&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Use this HTML code in your form: &lt;br /&gt;
&lt;br /&gt;
&lt;input id=&quot;validator&quot; name=&quot;validator&quot; size=&quot;4&quot; type=&quot;text&quot; /&gt;&lt;br /&gt;
&lt;img align=&quot;top&quot; alt=&quot;CAPTCHA image&quot; src=&quot;random.php&quot; /&gt;&lt;br /&gt;
&lt;br /&gt;
This is the code to test the entered value:&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; // process your form here&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; // at least destroy the session&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; unset($_SESSION[&#39;rand_code&#39;]);&lt;br /&gt;
}&lt;br /&gt;
?&amp;gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://wordpressnutsandbolts.blogspot.com/feeds/2007787076739156027/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://wordpressnutsandbolts.blogspot.com/2011/12/php-captcha-image-validation.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4541278785090749160/posts/default/2007787076739156027'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4541278785090749160/posts/default/2007787076739156027'/><link rel='alternate' type='text/html' href='http://wordpressnutsandbolts.blogspot.com/2011/12/php-captcha-image-validation.html' title='PHP CAPTCHA, image validation'/><author><name>Binish Prabhakar</name><uri>http://www.blogger.com/profile/06321237526635911658</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4541278785090749160.post-3252306672588462672</id><published>2011-12-07T08:45:00.000-08:00</published><updated>2014-07-09T12:09:22.300-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="HTML CSS"/><title type='text'>CSS3 support for Internet Explorer 6, 7, and 8</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;h3&gt;What is it?&lt;/h3&gt;IE-CSS3 is a script to provide Internet Explorer support for some new styles available in the upcoming CSS3 standard.&lt;br /&gt;
&lt;h3&gt;How it works&lt;/h3&gt;If you&#39;re viewing this page in Internet Explorer, some of the  elements have been rebuilt by the script in Vector Markup Language  (VML), an IE-specific vector drawing language. VML supports things that  are missing from IE&#39;s CSS implementation like rounded corners and blur  effects.&lt;br /&gt;
&lt;h3&gt;How to use it&lt;/h3&gt;Just add CSS styles as you normally would, but include one new line: &lt;br /&gt;
&lt;pre&gt;.box {
  -moz-border-radius: 15px; /* Firefox */
  -webkit-border-radius: 15px; /* Safari and Chrome */
  border-radius: 15px; /* Opera 10.5+, future browsers,&amp;nbsp;&lt;/pre&gt;&lt;pre&gt;and now also Internet Explorer 6+ using IE-CSS3 */

  -moz-box-shadow: 10px 10px 20px #000; /* Firefox */
  -webkit-box-shadow: 10px 10px 20px #000; /* Safari and Chrome */
  box-shadow: 10px 10px 20px #000; /* Opera 10.5+,&amp;nbsp;&lt;/pre&gt;&lt;pre&gt;future browsers and IE6+ using IE-CSS3 */

  behavior: url(ie-css3.htc); /* This lets IE know to call&amp;nbsp;&lt;/pre&gt;&lt;pre&gt;the script on all elements which get the &#39;box&#39; class */
}
&lt;/pre&gt;&lt;h3&gt;Issues and Workarounds&lt;/h3&gt;You would expect URLs in &lt;code&gt;behavior: url(...)&lt;/code&gt; to be relative to the current directory as they are in a &lt;code&gt;background-image: url(...)&lt;/code&gt; style for example, but instead Microsoft decided to ignore standards here and make them relative to the docroot instead. So &lt;code&gt;behavior: url(ie-css3.htc)&lt;/code&gt; should work if ie-css3.htc is in the root directory of the site.&lt;br /&gt;
&lt;div class=&quot;nomargin&quot;&gt;You will probably run into issues with z-index,  especially if embedding one IE-CSS3 enabled element inside of another.  There are two simple workarounds:&lt;/div&gt;&lt;ul&gt;&lt;li&gt;Set the z-index of the IE-CSS3 element to a number &lt;b&gt;larger&lt;/b&gt; than its surrounding elements.&lt;/li&gt;
&lt;li&gt;Make sure the IE-CSS3 element is positioned, such as with &lt;code&gt;position: relative&lt;/code&gt; or &lt;code&gt;position: absolute&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;div class=&quot;nomargin&quot;&gt;Sometimes an IE-CSS3 element will show up at a  slightly different position than the original, untouched element. There  could be a few reasons for this:&lt;/div&gt;&lt;ul&gt;&lt;li&gt;You have broken tags somewhere in your markup, probably above the IE-CSS3 element.&lt;/li&gt;
&lt;li&gt;You are experiencing misc IE6 and IE7 bugs. Try adding the styles &lt;code&gt;zoom: 1&lt;/code&gt; and/or &lt;code&gt;position: relative&lt;/code&gt;  to the IE-CSS3 element and its immediate parent. You could also try  removing any margins on the IE-CSS3 element and/or its parent, use  padding instead.&lt;/li&gt;
&lt;/ul&gt;&lt;h3&gt;Styles and their status&lt;/h3&gt;&lt;table&gt;&lt;tbody&gt;
&lt;tr&gt;      &lt;th&gt;Style&lt;/th&gt;      &lt;th&gt;What works&lt;/th&gt;      &lt;th&gt;What doesn&#39;t work&lt;/th&gt;     &lt;/tr&gt;
&lt;tr&gt;      &lt;td&gt;border-radius&lt;/td&gt;      &lt;td&gt;&lt;ul&gt;&lt;li&gt;Setting a radius for all four corners&lt;/li&gt;
&lt;li&gt;Element borders&lt;/li&gt;
&lt;/ul&gt;&lt;/td&gt;      &lt;td&gt;&lt;ul&gt;&lt;li&gt;Setting a radius for individual corners separately&lt;/li&gt;
&lt;/ul&gt;&lt;/td&gt;     &lt;/tr&gt;
&lt;tr&gt;      &lt;td&gt;box-shadow&lt;/td&gt;      &lt;td&gt;&lt;ul&gt;&lt;li&gt;Blur size&lt;/li&gt;
&lt;li&gt;Offset&lt;/li&gt;
&lt;/ul&gt;&lt;/td&gt;      &lt;td&gt;&lt;ul&gt;&lt;li&gt;Any color other than #000&lt;/li&gt;
&lt;/ul&gt;&lt;/td&gt;     &lt;/tr&gt;
&lt;tr&gt;      &lt;td&gt;text-shadow&lt;/td&gt;      &lt;td&gt;&lt;ul&gt;&lt;li&gt;Blur size&lt;/li&gt;
&lt;li&gt;Offset&lt;/li&gt;
&lt;li&gt;Color&lt;/li&gt;
&lt;/ul&gt;&lt;/td&gt;      &lt;td&gt;&lt;ul&gt;&lt;li&gt;The shadow looks a little bit different than it does in FF/Safari/Chrome, I&#39;m not sure why&lt;/li&gt;
&lt;/ul&gt;&lt;/td&gt;     &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;h3&gt;TODO&lt;/h3&gt;A better site for this script :)&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://fetchak.com/ie-css3/ie-css3.htc&quot;&gt;Download Source &lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: xx-small;&quot;&gt;Thanks to &lt;a href=&quot;http://www.htmlremix.com/css/curved-corner-border-radius-cross-browser&quot;&gt;Remiz Rahnas&lt;/a&gt; for writing the original script that this is based off of.&lt;/span&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://wordpressnutsandbolts.blogspot.com/feeds/3252306672588462672/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://wordpressnutsandbolts.blogspot.com/2011/12/css3-support-for-internet-explorer-6-7.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4541278785090749160/posts/default/3252306672588462672'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4541278785090749160/posts/default/3252306672588462672'/><link rel='alternate' type='text/html' href='http://wordpressnutsandbolts.blogspot.com/2011/12/css3-support-for-internet-explorer-6-7.html' title='CSS3 support for Internet Explorer 6, 7, and 8'/><author><name>Binish Prabhakar</name><uri>http://www.blogger.com/profile/06321237526635911658</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4541278785090749160.post-4016031125683207655</id><published>2011-12-07T08:35:00.000-08:00</published><updated>2014-07-09T12:09:22.304-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Wordpress"/><title type='text'>How to create custom post type in wordpress</title><content type='html'>Anyone who’s worked with WordPress before will recognise the structure here. We’re adding an action when the WP Admin initialises to call the function portfolio_register(). In that function we create two arrays, $labels and $args, and then use register_post_type to pull it all together. In doing so we name the new custom post type ‘portfolio’ and tell it to use the arguments from $args.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Step 1&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
add_action(&#39;init&#39;, &#39;portfolio_register&#39;);&lt;br /&gt;
&lt;br /&gt;
function portfolio_register() {&lt;br /&gt;
&lt;br /&gt;
$labels = array(&lt;br /&gt;
&#39;name&#39; =&gt; _x(&#39;My Portfolio&#39;, &#39;post type general name&#39;),&lt;br /&gt;
&#39;singular_name&#39; =&gt; _x(&#39;Portfolio Item&#39;, &#39;post type singular name&#39;),&lt;br /&gt;
&#39;add_new&#39; =&gt; _x(&#39;Add New&#39;, &#39;portfolio item&#39;),&lt;br /&gt;
&#39;add_new_item&#39; =&gt; __(&#39;Add New Portfolio Item&#39;),&lt;br /&gt;
&#39;edit_item&#39; =&gt; __(&#39;Edit Portfolio Item&#39;),&lt;br /&gt;
&#39;new_item&#39; =&gt; __(&#39;New Portfolio Item&#39;),&lt;br /&gt;
&#39;view_item&#39; =&gt; __(&#39;View Portfolio Item&#39;),&lt;br /&gt;
&#39;search_items&#39; =&gt; __(&#39;Search Portfolio&#39;),&lt;br /&gt;
&#39;not_found&#39; =&gt;  __(&#39;Nothing found&#39;),&lt;br /&gt;
&#39;not_found_in_trash&#39; =&gt; __(&#39;Nothing found in Trash&#39;),&lt;br /&gt;
&#39;parent_item_colon&#39; =&gt; &#39;&#39;&lt;br /&gt;
);&lt;br /&gt;
&lt;br /&gt;
$args = array(&lt;br /&gt;
&#39;labels&#39; =&gt; $labels,&lt;br /&gt;
&#39;public&#39; =&gt; true,&lt;br /&gt;
&#39;publicly_queryable&#39; =&gt; true,&lt;br /&gt;
&#39;show_ui&#39; =&gt; true,&lt;br /&gt;
&#39;query_var&#39; =&gt; true,&lt;br /&gt;
&#39;menu_icon&#39; =&gt; get_stylesheet_directory_uri() . &#39;/article16.png&#39;,&lt;br /&gt;
&#39;rewrite&#39; =&gt; true,&lt;br /&gt;
&#39;capability_type&#39; =&gt; &#39;post&#39;,&lt;br /&gt;
&#39;hierarchical&#39; =&gt; false,&lt;br /&gt;
&#39;menu_position&#39; =&gt; null,&lt;br /&gt;
&#39;supports&#39; =&gt; array(&#39;title&#39;,&#39;editor&#39;,&#39;thumbnail&#39;)&lt;br /&gt;
); &lt;br /&gt;
&lt;br /&gt;
register_post_type( &#39;portfolio&#39; , $args );&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Descriptions&lt;/b&gt;&lt;br /&gt;
name – this is the (probably plural) name for our new post type&lt;br /&gt;
singular_name – how you’d refer to this in the singular (such as ‘Add new ****’)&lt;br /&gt;
&lt;br /&gt;
You can probably work out the rest of $labels for yourself, as they simply refer to different circumstances in which the name of your custom post type would be used.&lt;br /&gt;
&lt;br /&gt;
And now &lt;b&gt;$args:&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
1 public – should they be shown in the admin UI&lt;br /&gt;
2 show_ui – should we display an admin panel for this custom post type&lt;br /&gt;
3 menu_icon – a custom icon for the admin panel&lt;br /&gt;
4 capability_type - WordPress will treat this as a ‘post’ for read, edit, and delete capabilities&lt;br /&gt;
5 hierarchical – is it hierarchical, like pages&lt;br /&gt;
6 rewrite – rewrites permalinks using the slug ‘portfolio’&lt;br /&gt;
7 supports – which items do we want to display on the add/edit post page&lt;br /&gt;
&lt;br /&gt;
That’s the first simple step, and it should be enough to see your new custom post time in the WordPress admin. Save functions.php and take a look!&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Step 2&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
The next thing we need to do is register a taxonomy. Or, in English, create categories for this new content type.&lt;br /&gt;
&lt;br /&gt;
For example, in our portfolio we want to include the names of technologies and software used to create our work. I’m going to call this taxonomy ‘Skills’, and populate it with things like HTML, CSS and jQuery.&lt;br /&gt;
&lt;br /&gt;
It’s just one line of code:&lt;br /&gt;
&lt;br /&gt;
register_taxonomy(&quot;Skills&quot;, array(&quot;portfolio&quot;), array(&quot;hierarchical&quot; =&gt; true, &quot;label&quot; =&gt; &quot;Skills&quot;, &quot;singular_label&quot; =&gt; &quot;Skill&quot;, &quot;rewrite&quot; =&gt; true));&lt;br /&gt;
&lt;br /&gt;
The first item here is the taxonomy name, ‘Skills’. The second is the name of the object type we’re applying it to, in our case the custom post type ‘portfolio’ (which is an array). Finally our arguments; you can find a full list at http://codex.wordpress.org/Function_Reference/register_taxonomy, and here we’re using just three which have the same meaning as described in Step 1.&lt;br /&gt;
&lt;br /&gt;
Add that line of code in and you should now see:&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhxad9TJo4esnuWWQ30r3T-lkWfkYxWmOhSoAblEU7aUnj1D5AqyTeEPndK9c9dIHjPsQY5oMzEVmjgjytHHf3sxu71sSx72DBNBhUUNYyEJJ7yczkL_tulxHyZMmcBZUcLQ6potdF3qXa7/s1600/WP-CPT-AdminPanel.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left:1em; margin-right:1em&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;115&quot; width=&quot;164&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhxad9TJo4esnuWWQ30r3T-lkWfkYxWmOhSoAblEU7aUnj1D5AqyTeEPndK9c9dIHjPsQY5oMzEVmjgjytHHf3sxu71sSx72DBNBhUUNYyEJJ7yczkL_tulxHyZMmcBZUcLQ6potdF3qXa7/s320/WP-CPT-AdminPanel.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://wordpressnutsandbolts.blogspot.com/feeds/4016031125683207655/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://wordpressnutsandbolts.blogspot.com/2011/12/how-to-create-custom-post-type-in.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4541278785090749160/posts/default/4016031125683207655'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4541278785090749160/posts/default/4016031125683207655'/><link rel='alternate' type='text/html' href='http://wordpressnutsandbolts.blogspot.com/2011/12/how-to-create-custom-post-type-in.html' title='How to create custom post type in wordpress'/><author><name>Binish Prabhakar</name><uri>http://www.blogger.com/profile/06321237526635911658</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhxad9TJo4esnuWWQ30r3T-lkWfkYxWmOhSoAblEU7aUnj1D5AqyTeEPndK9c9dIHjPsQY5oMzEVmjgjytHHf3sxu71sSx72DBNBhUUNYyEJJ7yczkL_tulxHyZMmcBZUcLQ6potdF3qXa7/s72-c/WP-CPT-AdminPanel.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4541278785090749160.post-6549253961009994483</id><published>2011-11-17T05:37:00.000-08:00</published><updated>2011-11-17T05:37:44.516-08:00</updated><title type='text'>Blank Page Error</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;div class=&quot;entry&quot;&gt;&lt;p&gt;Some people have run into the issue that once they upgrade their site to WordPress 3.0, they go to look at their site and all they get is a blank page. &amp;nbsp;Not an error page or a 404 page not found, just a blank page. &amp;nbsp;More often than not this is a case of having a plug-in that is incompatible with version 3.0.&lt;/p&gt;&lt;p&gt;There are steps you can follow to verify and fix this.&lt;/p&gt;&lt;ol&gt;&lt;li&gt;Start by logging into your hosting control panel (cPanel for most folks). &amp;nbsp;This will verify that your host computer is up and running. &amp;nbsp;If you can’t log into your control panel it is time for a call to your hosting company.&lt;/li&gt;
&lt;li&gt;Next step is to try and log into your WordPress dashboard. &amp;nbsp;If you go to http://yourdomain.com/wp-admin and the log in page is displayed, WordPress itself is fine. &amp;nbsp;This means it is either your theme or your plug-ins. &amp;nbsp;Once you actually log in things could go funky because the plug-ins provide part of your dashboard.&lt;/li&gt;
&lt;li&gt;Now we need to get down to checking plug-ins (the most likely culprit). &amp;nbsp;Through FTP or your control panel file manager find your plugins directory under wp-content. &amp;nbsp;Rename the plugins folder something else and see if the problem is resolved. &amp;nbsp;If it is then we have confirmed that one of the plug-ins is misbehaving.&lt;/li&gt;
&lt;li&gt;Once you know for sure that it is a plug-in it is time to find out which one. &amp;nbsp;Make a new folder under wp-content named plugins (the old one is still named something else). &amp;nbsp;One at a time move the folders under the old plugins folder into the new one. &amp;nbsp;Check your site after each move. &amp;nbsp;When the site stops working again you know which plug-in is the culprit. &amp;nbsp;Delete that plugin folder and move the rest of the plug-ins over to the new folder. &amp;nbsp;It wouldn’t hurt to continue to do them one at a time while checking the site after each move. &amp;nbsp;You never know, there could be more than one that has a problem.&lt;/li&gt;
&lt;li&gt;Then find another plug-in or an updated version of your old plug-in that does what you need.&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://wordpressnutsandbolts.blogspot.com/feeds/6549253961009994483/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://wordpressnutsandbolts.blogspot.com/2011/11/blank-page-error.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4541278785090749160/posts/default/6549253961009994483'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4541278785090749160/posts/default/6549253961009994483'/><link rel='alternate' type='text/html' href='http://wordpressnutsandbolts.blogspot.com/2011/11/blank-page-error.html' title='Blank Page Error'/><author><name>Binish Prabhakar</name><uri>http://www.blogger.com/profile/06321237526635911658</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4541278785090749160.post-5469041259975717772</id><published>2011-11-17T05:34:00.000-08:00</published><updated>2011-11-17T05:34:34.648-08:00</updated><title type='text'>Quick Fixes For WordPress Errors</title><content type='html'>WordPress is the greatest website publishing system we’ve ever seen.  It’s used on over 200 Million websites, by homeowners, home businesses, small businesses and even major corporations.&lt;br /&gt;
&lt;br /&gt;
The WordPress community has created 1000′s of themes, plugins and other tools to help WordPress users customize and enhance this website.&lt;br /&gt;
&lt;br /&gt;
With so many plugins, themes and literally millions of configurations..   It’s inevitable that errors will arise.&lt;br /&gt;
&lt;br /&gt;
If you’re faced with a WordPress error you need a quick resolution for, we hope you’ll check out &lt;a href=&quot;http://wordpressnutsandbolts.blogspot.com&quot;&gt;http://wordpressnutsandbolts.blogspot.com&lt;/a&gt; for a solution.  Let us help you troubleshoot that error fast, saving you time, revenue and frustration.</content><link rel='replies' type='application/atom+xml' href='http://wordpressnutsandbolts.blogspot.com/feeds/5469041259975717772/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://wordpressnutsandbolts.blogspot.com/2011/11/quick-fixes-for-wordpress-errors.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4541278785090749160/posts/default/5469041259975717772'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4541278785090749160/posts/default/5469041259975717772'/><link rel='alternate' type='text/html' href='http://wordpressnutsandbolts.blogspot.com/2011/11/quick-fixes-for-wordpress-errors.html' title='Quick Fixes For WordPress Errors'/><author><name>Binish Prabhakar</name><uri>http://www.blogger.com/profile/06321237526635911658</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4541278785090749160.post-5970664550829841188</id><published>2011-11-07T02:28:00.000-08:00</published><updated>2014-07-09T12:09:22.314-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Server"/><title type='text'>Translate .htaccess Content to IIS web.config</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;Many PHP applications are distributed with configuration files for  the Apache Web server. These configuration files (usually called  .htaccess files) contain a number of settings that can be used for  integrating the application with the capabilities of the Web server.&lt;br /&gt;
IIS 7 uses a file called Web.config to hold settings for integration  with applications. The Web.config file contains information that control  module loading, security configuration, session state configuration,  and application language and compilation settings. Web.config files can  also contain application-specific items such as database connection  strings.&lt;br /&gt;
This article describes the most common uses of the .htaccess file by  PHP applications, and shows how to use the Web.config file for these  same functions in IIS.&lt;br /&gt;
&lt;br /&gt;
&lt;h2&gt;Sample Application Configuration Files&lt;/h2&gt;The following examples are two configuration files for a sample application: an .htaccess file and a Web.config file.&lt;br /&gt;
Sample Application .htaccess File&lt;br /&gt;
#&lt;br /&gt;
# Apache/PHP/Application settings:&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
# Protect files and directories from prying eyes.&lt;br /&gt;
&lt;filesmatch &quot;\.(engine|inc|info|install|module|profile|po|sh|.*sql|theme|tpl(\.php)?|xtmpl)$|^(code-style\.pl|entries.*|repository|root|tag|template)$&quot;=&quot;&quot;&gt;&lt;br /&gt;
Order allow,deny&lt;br /&gt;
&lt;/filesmatch&gt;&lt;br /&gt;
&lt;br /&gt;
# Don&#39;t show directory listings for URLs which map to a directory.&lt;br /&gt;
Options -Indexes&lt;br /&gt;
&lt;br /&gt;
# Follow symbolic links in this directory.&lt;br /&gt;
Options +FollowSymLinks&lt;br /&gt;
&lt;br /&gt;
# Make Application handle any 404 errors.&lt;br /&gt;
ErrorDocument 404 /index.php&lt;br /&gt;
&lt;br /&gt;
# Force simple error message for requests for non-existent favicon.ico.&lt;br /&gt;
&lt;files favicon.ico=&quot;&quot;&gt;&lt;br /&gt;
ErrorDocument 404 &quot;The requested file favicon.ico was not found.&lt;br /&gt;
&lt;/files&gt;&lt;br /&gt;
&lt;br /&gt;
# Set the default handler.&lt;br /&gt;
DirectoryIndex index.php&lt;br /&gt;
&lt;br /&gt;
# Override PHP settings. More in sites/default/settings.php&lt;br /&gt;
# but the following cannot be changed at runtime.&lt;br /&gt;
&lt;br /&gt;
# PHP 4, Apache 1.&lt;br /&gt;
&lt;ifmodule mod_php4.c=&quot;&quot;&gt;&lt;br /&gt;
php_value magic_quotes_gpc                0&lt;br /&gt;
php_value register_globals                0&lt;br /&gt;
php_value session.auto_start              0&lt;br /&gt;
php_value mbstring.http_input             pass&lt;br /&gt;
php_value mbstring.http_output            pass&lt;br /&gt;
php_value mbstring.encoding_translation   0&lt;br /&gt;
&lt;/ifmodule&gt;&lt;br /&gt;
&lt;br /&gt;
# PHP 4, Apache 2.&lt;br /&gt;
&lt;ifmodule sapi_apache2.c=&quot;&quot;&gt;&lt;br /&gt;
php_value magic_quotes_gpc                0&lt;br /&gt;
php_value register_globals                0&lt;br /&gt;
php_value session.auto_start              0&lt;br /&gt;
php_value mbstring.http_input             pass&lt;br /&gt;
php_value mbstring.http_output            pass&lt;br /&gt;
php_value mbstring.encoding_translation   0&lt;br /&gt;
&lt;/ifmodule&gt;&lt;br /&gt;
&lt;br /&gt;
# PHP 5, Apache 1 and 2.&lt;br /&gt;
&lt;ifmodule mod_php5.c=&quot;&quot;&gt;&lt;br /&gt;
php_value magic_quotes_gpc                0&lt;br /&gt;
php_value register_globals                0&lt;br /&gt;
php_value session.auto_start              0&lt;br /&gt;
php_value mbstring.http_input             pass&lt;br /&gt;
php_value mbstring.http_output            pass&lt;br /&gt;
php_value mbstring.encoding_translation   0&lt;br /&gt;
&lt;/ifmodule&gt;&lt;br /&gt;
&lt;br /&gt;
# Requires mod_expires to be enabled.&lt;br /&gt;
&lt;ifmodule mod_expires.c=&quot;&quot;&gt;&lt;br /&gt;
# Enable expirations.&lt;br /&gt;
ExpiresActive On&lt;br /&gt;
&lt;br /&gt;
# Cache all files for 2 weeks after access (A).&lt;br /&gt;
ExpiresDefault A1209600&lt;br /&gt;
&lt;br /&gt;
# Do not cache dynamically generated pages.&lt;br /&gt;
ExpiresByType text/html A1&lt;br /&gt;
&lt;/ifmodule&gt;&lt;br /&gt;
&lt;br /&gt;
# Various rewrite rules.&lt;br /&gt;
&lt;ifmodule mod_rewrite.c=&quot;&quot;&gt;&lt;br /&gt;
RewriteEngine on&lt;br /&gt;
&lt;br /&gt;
# If your site can be accessed both with and without the &#39;www.&#39; prefix, you&lt;br /&gt;
# can use one of the following settings to redirect users to your preferred&lt;br /&gt;
# URL, either WITH or WITHOUT the &#39;www.&#39; prefix. Choose ONLY one option:&lt;br /&gt;
#&lt;br /&gt;
# To redirect all users to access the site WITH the &#39;www.&#39; prefix,&lt;br /&gt;
# (http://example.com/... will be redirected to http://www.example.com/...)&lt;br /&gt;
# adapt and uncomment the following:&lt;br /&gt;
# RewriteCond %{HTTP_HOST} ^example\.com$ [NC]&lt;br /&gt;
# RewriteRule ^(.*)$ http://www.example.com/$1 [L,R=301]&lt;br /&gt;
#&lt;br /&gt;
# To redirect all users to access the site WITHOUT the &#39;www.&#39; prefix,&lt;br /&gt;
# (http://www.example.com/... will be redirected to http://example.com/...)&lt;br /&gt;
# uncomment and adapt the following:&lt;br /&gt;
# RewriteCond %{HTTP_HOST} ^www\.example\.com$ [NC]&lt;br /&gt;
# RewriteRule ^(.*)$ http://example.com/$1 [L,R=301]&lt;br /&gt;
&lt;br /&gt;
# Modify the RewriteBase if you are using Application in a subdirectory or in a&lt;br /&gt;
# VirtualDocumentRoot and the rewrite rules are not working properly.&lt;br /&gt;
# For example if your site is at http://example.com/application uncomment and&lt;br /&gt;
# modify the following line:&lt;br /&gt;
# RewriteBase /application&lt;br /&gt;
#&lt;br /&gt;
# If your site is running in a VirtualDocumentRoot at http://example.com/,&lt;br /&gt;
# uncomment the following line:&lt;br /&gt;
# RewriteBase /&lt;br /&gt;
&lt;br /&gt;
# Rewrite URLs of the form &#39;x&#39; to the form &#39;index.php?q=x&#39;.&lt;br /&gt;
RewriteCond %{REQUEST_FILENAME} !-f&lt;br /&gt;
RewriteCond %{REQUEST_FILENAME} !-d&lt;br /&gt;
RewriteCond %{REQUEST_URI} !=/favicon.ico&lt;br /&gt;
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]&lt;br /&gt;
&lt;/ifmodule&gt;&lt;br /&gt;
&lt;br /&gt;
# $Id: .htaccess,v 1.90.2.1 2008/07/08 09:33:14 goba Exp $&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Sample Application Web.config File&lt;/b&gt;&lt;br /&gt;
&amp;lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;configuration&amp;gt;&lt;br /&gt;
&amp;lt;configsections&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;sectiongroup name=&quot;system.webServer&quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;sectiongroup name=&quot;rewrite&quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;section name=&quot;rewriteMaps&quot; overrideModeDefault=&quot;Allow&quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;section name=&quot;rules&quot; overrideModeDefault=&quot;Allow&quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/sectionGroup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/sectionGroup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/configSections&amp;gt;&lt;br /&gt;
&amp;lt;system.webServer&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;security&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--  This section should be uncommented after&lt;br /&gt;
&lt;br /&gt;
installation to secure the installation. --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&lt;br /&gt;
&amp;lt;requestfiltering&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;denyurlsequences&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;add sequence=&quot;engine&quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;add sequence=&quot;inc&quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;add sequence=&quot;info&quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;add sequence=&quot;module&quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;add sequence=&quot;profile&quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;add sequence=&quot;po&quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;add sequence=&quot;sh&quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;add sequence=&quot;theme&quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;add sequence=&quot;tpl(\.php&quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;add sequence=&quot;Root&quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;add sequence=&quot;Tag&quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;add sequence=&quot;Template&quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;add sequence=&quot;Repository&quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;add sequence=&quot;code-style&quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/denyUrlSequences&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;fileextensions&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;add fileExtension=&quot;.sql&quot; allowed=&quot;false&quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;add fileExtension=&quot;.pl&quot; allowed=&quot;false&quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/fileExtensions&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/requestFiltering&amp;gt;&lt;br /&gt;
&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/security&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;directorybrowse enabled=&quot;true&quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;caching&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;profiles&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;add extension=&quot;.php&quot; policy=&quot;DisableCache&quot; kernelCachePolicy=&quot;DisableCache&quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;add extension=&quot;.html&quot; policy=&quot;CacheForTimePeriod&quot; kernelCachePolicy=&quot;CacheForTimePeriod&quot; duration=&quot;14:00:00:00&quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/profiles&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/caching&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;rewrite&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;rules&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;rule name=&quot;block favicon&quot; stopProcessing=&quot;true&quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;match url=&quot;favicon\.ico&quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;action type=&quot;CustomResponse&quot; statusCode=&quot;404&quot; subStatusCode=&quot;1&quot;&lt;br /&gt;
&lt;br /&gt;
statusReason=&quot;The requested file favicon.ico was not found&quot;&lt;br /&gt;
&lt;br /&gt;
statusDescription=&quot;The requested file favicon.ico was not found&quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/rule&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;rule name=&quot;Imported Rule 1&quot; stopProcessing=&quot;true&quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;match url=&quot;^(.*)$&quot; ignoreCase=&quot;false&quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;conditions&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;add input=&quot;{HTTP_HOST}&quot; pattern=&quot;^example\.com$&quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/conditions&amp;gt;&lt;br /&gt;
&amp;lt;action type=&quot;Redirect&quot; redirectType=&quot;Permanent&quot; url=&quot;http://www.example.com/{R:1}&quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/rule&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;rule name=&quot;Imported Rule 2&quot; stopProcessing=&quot;true&quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;match url=&quot;^(.*)$&quot; ignoreCase=&quot;false&quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;conditions&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;add input=&quot;{REQUEST_FILENAME}&quot; matchType=&quot;IsFile&quot; ignoreCase=&quot;false&quot; negate=&quot;true&quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;add input=&quot;{REQUEST_FILENAME}&quot; matchType=&quot;IsDirectory&quot; ignoreCase=&quot;false&quot; negate=&quot;true&quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;add input=&quot;{URL}&quot; pattern=&quot;^/favicon.ico$&quot; ignoreCase=&quot;false&quot; negate=&quot;true&quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/conditions&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;action type=&quot;Rewrite&quot; url=&quot;index.php?q={R:1}&quot; appendQueryString=&quot;true&quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/rule&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/rules&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/rewrite&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;defaultdocument&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;files&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;remove value=&quot;index.php&quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;add value=&quot;index.php&quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/files&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/defaultDocument&amp;gt;&lt;br /&gt;
&amp;lt;!-- HTTP Errors section should only be enabled if the &quot;Error Pages&quot;&lt;br /&gt;
&lt;br /&gt;
feature has been delegated as &quot;Read/Write&quot; at the Web Server level.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;httperrors&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;remove statusCode=&quot;404&quot; subStatusCode=&quot;-1&quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;error statusCode=&quot;404&quot; prefixLanguageFilePath=&quot;&quot; path=&quot;/index.php&quot; responseMode=&quot;ExecuteURL&quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/httpErrors&amp;gt;&lt;br /&gt;
&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&amp;lt;/system.webServer&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/configuration&amp;gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://wordpressnutsandbolts.blogspot.com/feeds/5970664550829841188/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://wordpressnutsandbolts.blogspot.com/2011/11/translate-htaccess-content-to-iis.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4541278785090749160/posts/default/5970664550829841188'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4541278785090749160/posts/default/5970664550829841188'/><link rel='alternate' type='text/html' href='http://wordpressnutsandbolts.blogspot.com/2011/11/translate-htaccess-content-to-iis.html' title='Translate .htaccess Content to IIS web.config'/><author><name>Binish Prabhakar</name><uri>http://www.blogger.com/profile/06321237526635911658</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4541278785090749160.post-7105922883809940345</id><published>2011-11-03T04:10:00.000-07:00</published><updated>2014-07-09T12:09:22.320-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Wordpress"/><title type='text'>How to redirect website to mobile browser friendly version</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;Mobile phones being smarter than ever before, ever wondered how some  websites redirect you to the mobile version to make it easier to  navigate. I use my Nokia E61i a lot for web browsing, while I am  traveling. So it was obvious that I had to try this interesting feature&amp;nbsp; &lt;br /&gt;
Now back to the topic. I did a lot of Google search and found some  very interesting websites which list down the process. Basically there  are two methods.&lt;br /&gt;
1) If using WordPress, redirect to mobile friendly theme&lt;br /&gt;
2) Redirect to a mobile version of your website&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;) If using WordPress, redirect to mobile friendly theme&lt;/b&gt;&lt;br /&gt;
This is one of the easiest method I found out yesterday.&lt;br /&gt;
There is a great plugin (&lt;a href=&quot;http://links.visibli.com/a4e331a64c962507/?web=2e4536&amp;amp;dst=http%3A//wordpress.org/extend/plugins/wptap-mobile-detector/&quot; target=&quot;&quot;&gt;WTap&lt;/a&gt;) which you need to install in your base website (e.g. here I did on www.abhizworld.com).&lt;br /&gt;
Then install a mobile theme as per your preference. You can find the themes &lt;a href=&quot;http://links.visibli.com/a4e331a64c962507/?web=2e4536&amp;amp;dst=http%3A//visionwidget.com/showcase/graphics/558-wordpress-mobile-themes-for-mobile-devices.html&quot; target=&quot;&quot;&gt;here&lt;/a&gt;. I am using the &lt;a href=&quot;http://links.visibli.com/a4e331a64c962507/?web=2e4536&amp;amp;dst=http%3A//wordpress.org/extend/themes/carrington-mobile&quot; target=&quot;&quot;&gt;Carrington theme&lt;/a&gt;. &lt;br /&gt;
After you have installed the plugin, you will get a “Mobile Detector” option in your WordPress Dashboard.&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEihnJlx0dDngHxUMex0CykJof45qxdDVkketP1MrXYkOpRoQTf05hnjgd-xZ1bUr2f4_XlGhjD9I8yxhX7o33rDkesm96U3_aa8PJTM4ho96BePcRO8mq30sXb1j91GsKZiZZNYKy6i4Dly/s1600/Mobile-detector.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEihnJlx0dDngHxUMex0CykJof45qxdDVkketP1MrXYkOpRoQTf05hnjgd-xZ1bUr2f4_XlGhjD9I8yxhX7o33rDkesm96U3_aa8PJTM4ho96BePcRO8mq30sXb1j91GsKZiZZNYKy6i4Dly/s1600/Mobile-detector.jpg&quot; /&gt;&amp;nbsp;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhsco79pVoanZKtmPeBUYURGSBZab1R7hy-Ox3io09RwR3NrVmDGKQz6I7Qhqe-OFKvVntKP18jGWwQpDQOaAefJdfZAqi6kdPC77PkbWej5nUOw94ln13-cQokmkUwYlab4vMZx4hT9FkW/s1600/WTap_Setting.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;220&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhsco79pVoanZKtmPeBUYURGSBZab1R7hy-Ox3io09RwR3NrVmDGKQz6I7Qhqe-OFKvVntKP18jGWwQpDQOaAefJdfZAqi6kdPC77PkbWej5nUOw94ln13-cQokmkUwYlab4vMZx4hT9FkW/s320/WTap_Setting.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;br /&gt;
This plug-in is so awesome that it gives you the flexibility to  define what you want to do for every device type. (a) You can select a  theme which you want to present for a mobile OR (b) redirect the user to  your mobile URL (e.g m.abhizworld.com).&lt;br /&gt;
As shown in the example above, I have redirected iPhone/iPad devices to  the Carrington mobile theme and for “Palm” devices, I redirect them to  my mobile website (m.abhizworld.com). Please note as soon as you  put/select any entry for a device, you have to click the update button  individually or else you will lose your changes you did until now &lt;br /&gt;
Once done, you are good to go!!!!&lt;br /&gt;
Another useful piece of information. I found out that my Nokia mobile  browser was not redirecting properly, even if I had the settings for  Nokia. Not to worry (did I tell you this plugin was awesome !). When you  click the “Mobile Detector”, there is an option to add custom devices.&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjRU0WyhThzmIgnOeZLseck1RqtpOh9LteBVk4FYKYaGUvftp4XdxJ_1ZvOP_sSvkUPjQ4LbxfQN_ktSYqTq0-69toQ_PwOKrY90Oav1a52Oo5Fx64TDvQsw7CIhS2RAxiOlmx56daPyn0z/s1600/Add_mobile_device.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjRU0WyhThzmIgnOeZLseck1RqtpOh9LteBVk4FYKYaGUvftp4XdxJ_1ZvOP_sSvkUPjQ4LbxfQN_ktSYqTq0-69toQ_PwOKrY90Oav1a52Oo5Fx64TDvQsw7CIhS2RAxiOlmx56daPyn0z/s1600/Add_mobile_device.jpg&quot; /&gt;&amp;nbsp;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;Here you can mention the device name (just a description) and the  “Mobile Device Agent” (this is important). Look at the example below.&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjtYIX9CUxxoHc-GT9wudGMQI5QXv7y6GScl7txBxw2LbGTgDe0YdbGaJ7-ygY5ZHop1_LbTqIBm7uC36yfsOmr1IVztZBJoRMSovo0vtDqU9A53nqhA03o1TdCmhM9twt5zkLCy8fuUs2k/s1600/Add_symbian_device.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;157&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjtYIX9CUxxoHc-GT9wudGMQI5QXv7y6GScl7txBxw2LbGTgDe0YdbGaJ7-ygY5ZHop1_LbTqIBm7uC36yfsOmr1IVztZBJoRMSovo0vtDqU9A53nqhA03o1TdCmhM9twt5zkLCy8fuUs2k/s320/Add_symbian_device.jpg&quot; width=&quot;320&quot; /&gt;&amp;nbsp;&lt;/a&gt;&lt;/div&gt;&lt;b&gt;2) Redirect to a mobile version of your website&lt;/b&gt;&lt;br /&gt;
Another method is to redirect your base website to your mobile website  URL by detecting which device is accessing your website. Download this &lt;a href=&quot;http://www.abhizworld.com/wp-content/uploads/2010/12/php-mobile-redirection.txt&quot;&gt;file here &lt;/a&gt; . Update the variable &lt;code&gt;$mobile=&quot;m.abhizworld.com&quot;;&lt;/code&gt; to something like&lt;br /&gt;
&lt;code&gt;$mobile=&quot;yourmobilesite.com&quot;;&lt;/code&gt;&lt;br /&gt;
If you are using wordpress, in your wordpress base directory, there is  index.php. Edit the file and add the above entry (i.e from &lt;code&gt;0)&lt;br /&gt;
{&lt;br /&gt;
header(&quot;location: $mobile&quot;);&lt;br /&gt;
exit;&lt;br /&gt;
}&lt;/code&gt;&lt;br /&gt;
&lt;code&gt; &lt;/code&gt;&lt;br /&gt;
&lt;code&gt;}&lt;br /&gt;
?&amp;gt;&lt;/code&gt;&lt;br /&gt;
Save the file and you are done!! You can call the php redirection script as well, it depends on you.&lt;br /&gt;
Now whenever someone accesses your website from a mobile device, they will be redirect to the mobile URL of your website!&lt;br /&gt;
&lt;i&gt;For this method credit goes to &lt;a href=&quot;http://links.visibli.com/a4e331a64c962507/?web=2e4536&amp;amp;dst=http%3A//www.stepforth.com/resources/web-marketing-knowledgebase/redirect-mobile-iphone-visitors-mobile-content/&quot; target=&quot;&quot;&gt;Stepforth&lt;/a&gt; for providing the easy to use script.&lt;/i&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;/div&gt;&lt;br /&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://wordpressnutsandbolts.blogspot.com/feeds/7105922883809940345/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://wordpressnutsandbolts.blogspot.com/2011/11/how-to-redirect-website-to-mobile.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4541278785090749160/posts/default/7105922883809940345'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4541278785090749160/posts/default/7105922883809940345'/><link rel='alternate' type='text/html' href='http://wordpressnutsandbolts.blogspot.com/2011/11/how-to-redirect-website-to-mobile.html' title='How to redirect website to mobile browser friendly version'/><author><name>Binish Prabhakar</name><uri>http://www.blogger.com/profile/06321237526635911658</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEihnJlx0dDngHxUMex0CykJof45qxdDVkketP1MrXYkOpRoQTf05hnjgd-xZ1bUr2f4_XlGhjD9I8yxhX7o33rDkesm96U3_aa8PJTM4ho96BePcRO8mq30sXb1j91GsKZiZZNYKy6i4Dly/s72-c/Mobile-detector.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4541278785090749160.post-1773484573196226261</id><published>2011-10-24T00:23:00.000-07:00</published><updated>2014-07-09T12:09:22.290-07:00</updated><title type='text'>How to create a sitemap page for WordPress blog</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;br /&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://wordpressnutsandbolts.blogspot.com/feeds/1773484573196226261/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://wordpressnutsandbolts.blogspot.com/2011/10/how-to-create-sitemap-page-for.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4541278785090749160/posts/default/1773484573196226261'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4541278785090749160/posts/default/1773484573196226261'/><link rel='alternate' type='text/html' href='http://wordpressnutsandbolts.blogspot.com/2011/10/how-to-create-sitemap-page-for.html' title='How to create a sitemap page for WordPress blog'/><author><name>Binish Prabhakar</name><uri>http://www.blogger.com/profile/06321237526635911658</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4541278785090749160.post-711336101161841654</id><published>2011-10-09T05:25:00.000-07:00</published><updated>2014-07-09T12:09:22.323-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Wordpress"/><title type='text'>To get the featured image url</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;The default image sizes of WordPress are &quot;thumbnail&quot;, &quot;medium&quot;,  &quot;large&quot; and &quot;full&quot; (the size of the image you uploaded). These image  sizes can be configured in the WordPress Administration &lt;a class=&quot;mw-redirect&quot; href=&quot;http://codex.wordpress.org/Settings_Media_SubPanel&quot; title=&quot;Settings Media SubPanel&quot;&gt;Media panel&lt;/a&gt; under Settings &amp;gt; Media. This is how you can use these default sizes with get_the_post_thumbnail():&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;get_the_post_thumbnail($id);&amp;nbsp;&lt;/pre&gt;&lt;pre&gt;// without parameter -&amp;gt; Thumbnail&lt;/pre&gt;&lt;pre&gt;get_the_post_thumbnail($id, &#39;thumbnail&#39;);&amp;nbsp;&lt;/pre&gt;&lt;pre&gt;// Thumbnail&lt;/pre&gt;&lt;pre&gt;get_the_post_thumbnail($id, &#39;medium&#39;);&lt;/pre&gt;&lt;pre&gt;// Medium resolution&lt;/pre&gt;&lt;pre&gt;get_the_post_thumbnail($id, &#39;large&#39;);&lt;/pre&gt;&lt;pre&gt;// Large resolution&lt;/pre&gt;&lt;pre&gt;get_the_post_thumbnail($id, array(100,100) );&lt;/pre&gt;&lt;pre&gt;// Other resolutions
&lt;/pre&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://wordpressnutsandbolts.blogspot.com/feeds/711336101161841654/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://wordpressnutsandbolts.blogspot.com/2011/10/to-get-featured-image-url.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4541278785090749160/posts/default/711336101161841654'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4541278785090749160/posts/default/711336101161841654'/><link rel='alternate' type='text/html' href='http://wordpressnutsandbolts.blogspot.com/2011/10/to-get-featured-image-url.html' title='To get the featured image url'/><author><name>Binish Prabhakar</name><uri>http://www.blogger.com/profile/06321237526635911658</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4541278785090749160.post-2367286794634055938</id><published>2011-10-05T03:17:00.000-07:00</published><updated>2014-07-09T12:09:22.296-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="HTML CSS"/><title type='text'>How to import font in css</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;br /&gt;
&lt;div class=&quot;panelNode panelNode-stylesheet contextUID=32267&quot;&gt;&lt;div class=&quot;cssSheet insertInto a11yCSSView &quot;&gt;&lt;div class=&quot;cssRule cssFontFaceRule &quot; role=&quot;presentation&quot;&gt;&lt;div class=&quot;cssHead focusRow &quot; role=&quot;listitem&quot;&gt;@font-face {&lt;span class=&quot; &quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot; &quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span class=&quot;cssPropName &quot;&gt;font-family&lt;/span&gt;&lt;span class=&quot;cssColon &quot;&gt;:&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;cssPropValue &quot;&gt;&quot;YanoneKaffeesatzRegular&quot;&lt;/span&gt;&lt;span class=&quot;cssSemi &quot;&gt;;&lt;/span&gt;&lt;span class=&quot; &quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot; &quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span class=&quot;cssPropName &quot;&gt;font-style&lt;/span&gt;&lt;span class=&quot;cssColon &quot;&gt;:&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;cssPropValue &quot;&gt;normal&lt;/span&gt;&lt;span class=&quot;cssSemi &quot;&gt;;&lt;/span&gt;&lt;span class=&quot; &quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot; &quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span class=&quot;cssPropName &quot;&gt;font-weight&lt;/span&gt;&lt;span class=&quot;cssColon &quot;&gt;:&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;cssPropValue &quot;&gt;normal&lt;/span&gt;&lt;span class=&quot;cssSemi &quot;&gt;;&lt;/span&gt;&lt;span class=&quot; &quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot; &quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span class=&quot;cssPropName &quot;&gt;src&lt;/span&gt;&lt;span class=&quot;cssColon &quot;&gt;:&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;cssPropValue &quot;&gt;url(&quot;font/yanonekaffeesatz-regular-webfont.eot?#iefix&quot;)  format(&quot;embedded-opentype&quot;),  url(&quot;font/yanonekaffeesatz-regular-webfont.woff&quot;) format(&quot;woff&quot;),  url(&quot;font/yanonekaffeesatz-regular-webfont.ttf&quot;) format(&quot;truetype&quot;),  url(&quot;font/yanonekaffeesatz-regular-webfont.svg#YanoneKaffeesatzRegular&quot;)  format(&quot;svg&quot;)&lt;/span&gt;&lt;span class=&quot;cssSemi &quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot; &quot; role=&quot;presentation&quot;&gt;}&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;cssRule cssFontFaceRule &quot; role=&quot;presentation&quot;&gt;&lt;div class=&quot;cssHead focusRow &quot; role=&quot;listitem&quot;&gt;@font-face {&lt;/div&gt;&lt;div class=&quot; &quot; role=&quot;group&quot;&gt;&lt;div class=&quot;cssPropertyListBox &quot; role=&quot;listbox&quot;&gt;&lt;div class=&quot;cssProp focusRow &quot; role=&quot;option&quot;&gt;&lt;span class=&quot; &quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;cssPropName &quot;&gt;font-family&lt;/span&gt;&lt;span class=&quot;cssColon &quot;&gt;:&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;cssPropValue &quot;&gt;&quot;SteelfishRegular&quot;&lt;/span&gt;&lt;span class=&quot;cssSemi &quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;cssProp focusRow &quot; role=&quot;option&quot;&gt;&lt;span class=&quot; &quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;cssPropName &quot;&gt;font-style&lt;/span&gt;&lt;span class=&quot;cssColon &quot;&gt;:&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;cssPropValue &quot;&gt;normal&lt;/span&gt;&lt;span class=&quot;cssSemi &quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;cssProp focusRow &quot; role=&quot;option&quot;&gt;&lt;span class=&quot; &quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;cssPropName &quot;&gt;font-weight&lt;/span&gt;&lt;span class=&quot;cssColon &quot;&gt;:&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;cssPropValue &quot;&gt;normal&lt;/span&gt;&lt;span class=&quot;cssSemi &quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;cssProp focusRow &quot; role=&quot;option&quot;&gt;&lt;span class=&quot; &quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;cssPropName &quot;&gt;src&lt;/span&gt;&lt;span class=&quot;cssColon &quot;&gt;:&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;cssPropValue &quot;&gt;url(&quot;font/steelfish_rg-webfont.eot?#iefix&quot;)  format(&quot;embedded-opentype&quot;), url(&quot;font/steelfish_rg-webfont.woff&quot;)  format(&quot;woff&quot;), url(&quot;font/steelfish_rg-webfont.ttf&quot;) format(&quot;truetype&quot;),  url(&quot;font/steelfish_rg-webfont.svg#SteelfishRegular&quot;) format(&quot;svg&quot;)&lt;/span&gt;&lt;span class=&quot;cssSemi &quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot; &quot; role=&quot;presentation&quot;&gt;}&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://wordpressnutsandbolts.blogspot.com/feeds/2367286794634055938/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://wordpressnutsandbolts.blogspot.com/2011/10/how-to-import-font-in-css.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4541278785090749160/posts/default/2367286794634055938'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4541278785090749160/posts/default/2367286794634055938'/><link rel='alternate' type='text/html' href='http://wordpressnutsandbolts.blogspot.com/2011/10/how-to-import-font-in-css.html' title='How to import font in css'/><author><name>Binish Prabhakar</name><uri>http://www.blogger.com/profile/06321237526635911658</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4541278785090749160.post-601973436211373875</id><published>2011-09-18T22:29:00.001-07:00</published><updated>2011-12-10T04:31:31.767-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Wordpress"/><title type='text'>The content limit function for wordpress</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;pre class=&quot;php&quot;&gt;&lt;span class=&quot;phpFunctionKeyword&quot;&gt;function&lt;/span&gt; the_content_limit&lt;span class=&quot;phpOperator&quot;&gt;(&lt;/span&gt;$max_char, $more_link_text &lt;span class=&quot;phpOperator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;phpString&quot;&gt;&#39;&lt;span class=&quot;phpOperator&quot;&gt;(&lt;/span&gt;more.&lt;span class=&quot;phpOperator&quot;&gt;.&lt;/span&gt;.&lt;span class=&quot;phpOperator&quot;&gt;)&lt;/span&gt;&#39;&lt;/span&gt;,&amp;nbsp;&lt;/pre&gt;&lt;pre class=&quot;php&quot;&gt;$stripteaser &lt;span class=&quot;phpOperator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;phpNumber&quot;&gt;0&lt;/span&gt;, $more_file &lt;span class=&quot;phpOperator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;phpString&quot;&gt;&#39;&#39;&lt;/span&gt;&lt;span class=&quot;phpOperator&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;phpOperator&quot;&gt;{&lt;/span&gt;
$content &lt;span class=&quot;phpOperator&quot;&gt;=&lt;/span&gt; get_the_content&lt;span class=&quot;phpOperator&quot;&gt;(&lt;/span&gt;$more_link_text,&amp;nbsp;&lt;/pre&gt;&lt;pre class=&quot;php&quot;&gt;$stripteaser, $more_file&lt;span class=&quot;phpOperator&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;phpText&quot;&gt;;&lt;/span&gt;
$content &lt;span class=&quot;phpOperator&quot;&gt;=&lt;/span&gt; apply_filters&lt;span class=&quot;phpOperator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;phpString&quot;&gt;&#39;the_content&#39;&lt;/span&gt;, $content&lt;span class=&quot;phpOperator&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;phpText&quot;&gt;;&lt;/span&gt;
$content &lt;span class=&quot;phpOperator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;phpFunction&quot;&gt;str_replace&lt;/span&gt;&lt;span class=&quot;phpOperator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;phpString&quot;&gt;&#39;&lt;span class=&quot;phpOperator&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;phpOperator&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;phpOperator&quot;&gt;&amp;gt;&lt;/span&gt;&#39;&lt;/span&gt;, &lt;span class=&quot;phpString&quot;&gt;&#39;&lt;span class=&quot;phpOperator&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;phpOperator&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;phpOperator&quot;&gt;&amp;gt;&lt;/span&gt;&#39;&lt;/span&gt;, $content&lt;span class=&quot;phpOperator&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;phpText&quot;&gt;;&lt;/span&gt;
$content &lt;span class=&quot;phpOperator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;phpFunction&quot;&gt;strip_tags&lt;/span&gt;&lt;span class=&quot;phpOperator&quot;&gt;(&lt;/span&gt;$content&lt;span class=&quot;phpOperator&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;phpText&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;phpKeyword&quot;&gt;
if &lt;/span&gt;&lt;span class=&quot;phpOperator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;phpFunction&quot;&gt;strlen&lt;/span&gt;&lt;span class=&quot;phpOperator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;phpScriptVar&quot;&gt;$_GET&lt;/span&gt;&lt;span class=&quot;phpOperator&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;phpString&quot;&gt;&#39;p&#39;&lt;/span&gt;&lt;span class=&quot;phpOperator&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;phpOperator&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;phpOperator&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;phpNumber&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;phpOperator&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;phpOperator&quot;&gt;{&lt;/span&gt;
&lt;span class=&quot;phpFunction&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;phpString&quot;&gt;&quot;&quot;&lt;/span&gt;&lt;span class=&quot;phpText&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;phpFunction&quot;&gt;echo&lt;/span&gt; $content;
&lt;span class=&quot;phpFunction&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;phpString&quot;&gt;&quot;&lt;span class=&quot;phpOperator&quot;&gt;&amp;lt;&lt;/span&gt;a href=&quot;&lt;/span&gt;&lt;span class=&quot;phpString&quot;&gt;&quot;the_permalink&lt;span class=&quot;phpOperator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;phpOperator&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;phpText&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;phpOperator&quot;&gt;&amp;lt;&lt;/span&gt;/p&lt;span class=&quot;phpOperator&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;phpOperator&quot;&gt;&amp;lt;&lt;/span&gt;p&lt;span class=&quot;phpOperator&quot;&gt;&amp;gt;&lt;/span&gt;&amp;nbsp;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot;php&quot;&gt;&lt;span class=&quot;phpString&quot;&gt;     &lt;span class=&quot;phpFunction&quot;&gt;echo&lt;/span&gt; &quot;&lt;/span&gt;&lt;span class=&quot;phpString&quot;&gt;&quot;&lt;span class=&quot;phpOperator&quot;&gt;&amp;gt;&lt;/span&gt;&quot;&lt;/span&gt;.&lt;span class=&quot;phpString&quot;&gt;&quot;Read More&lt;span class=&quot;phpOperator&quot;&gt;&amp;lt;&lt;/span&gt;/a&lt;span class=&quot;phpOperator&quot;&gt;&amp;gt;&lt;/span&gt;&quot;&lt;/span&gt;&lt;span class=&quot;phpText&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;phpFunction&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;phpString&quot;&gt;&quot;&quot;&lt;/span&gt;&lt;span class=&quot;phpText&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;phpOperator&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;phpKeyword&quot;&gt;
else&lt;/span&gt;if &lt;span class=&quot;phpOperator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;phpOperator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;phpFunction&quot;&gt;strlen&lt;/span&gt;&lt;span class=&quot;phpOperator&quot;&gt;(&lt;/span&gt;$content&lt;span class=&quot;phpOperator&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;phpOperator&quot;&gt;&amp;gt;&lt;/span&gt;$max_char&lt;span class=&quot;phpOperator&quot;&gt;)&lt;/span&gt; &amp;amp;&amp;amp;&lt;/pre&gt;&lt;pre class=&quot;php&quot;&gt;&lt;span class=&quot;phpText&quot;&gt;&lt;/span&gt; &lt;span class=&quot;phpOperator&quot;&gt;(&lt;/span&gt;$espacio &lt;span class=&quot;phpOperator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;phpFunction&quot;&gt;strpos&lt;/span&gt;&lt;span class=&quot;phpOperator&quot;&gt;(&lt;/span&gt;$content, &lt;span class=&quot;phpString&quot;&gt;&quot; &quot;&lt;/span&gt;, $max_char &lt;span class=&quot;phpOperator&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;phpOperator&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;phpOperator&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;phpOperator&quot;&gt;{&lt;/span&gt;
$content &lt;span class=&quot;phpOperator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;phpFunction&quot;&gt;substr&lt;/span&gt;&lt;span class=&quot;phpOperator&quot;&gt;(&lt;/span&gt;$content, &lt;span class=&quot;phpNumber&quot;&gt;0&lt;/span&gt;, $espacio&lt;span class=&quot;phpOperator&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;phpText&quot;&gt;;&lt;/span&gt;
$content &lt;span class=&quot;phpOperator&quot;&gt;=&lt;/span&gt; $content;
&lt;span class=&quot;phpFunction&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;phpString&quot;&gt;&quot;
&quot;&lt;/span&gt;&lt;span class=&quot;phpText&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;phpFunction&quot;&gt;echo&lt;/span&gt; $content;
&lt;span class=&quot;phpFunction&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;phpString&quot;&gt;&quot;&lt;span class=&quot;phpOperator&quot;&gt;.&lt;/span&gt;.&lt;span class=&quot;phpOperator&quot;&gt;.&lt;/span&gt;&quot;&lt;/span&gt;&lt;span class=&quot;phpText&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;phpFunction&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;phpString&quot;&gt;&quot;&amp;nbsp;&lt;span class=&quot;phpOperator&quot;&gt;&amp;lt;&lt;/span&gt;a href=&quot;&lt;/span&gt;&lt;span class=&quot;phpString&quot;&gt;&quot;&lt;span class=&quot;phpText&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;phpOperator&quot;&gt;echo &lt;/span&gt;the_permalink&lt;span class=&quot;phpOperator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;phpOperator&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;phpText&quot;&gt;;&lt;/span&gt;&amp;nbsp;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot;php&quot;&gt;&lt;span class=&quot;phpString&quot;&gt;&lt;span class=&quot;phpFunction&quot;&gt;echo&lt;/span&gt; &quot;&lt;/span&gt;&lt;span class=&quot;phpString&quot;&gt;&quot;&lt;span class=&quot;phpOperator&quot;&gt;&amp;gt;&lt;/span&gt;&quot;&lt;/span&gt;.$more_link_text.&lt;span class=&quot;phpString&quot;&gt;&quot;&lt;span class=&quot;phpOperator&quot;&gt;&amp;lt;&lt;/span&gt;/a&lt;span class=&quot;phpOperator&quot;&gt;&amp;gt;&lt;/span&gt;&quot;&lt;/span&gt;&lt;span class=&quot;phpText&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;phpFunction&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;phpString&quot;&gt;&quot;
&quot;&lt;/span&gt;&lt;span class=&quot;phpText&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;phpOperator&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;phpKeyword&quot;&gt;
else &lt;/span&gt;&lt;span class=&quot;phpOperator&quot;&gt;{&lt;/span&gt;
&lt;span class=&quot;phpFunction&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;phpString&quot;&gt;&quot;
&quot;&lt;/span&gt;&lt;span class=&quot;phpText&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;phpFunction&quot;&gt;echo&lt;/span&gt; $content;
&lt;span class=&quot;phpFunction&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;phpString&quot;&gt;&quot;&lt;span class=&quot;phpOperator&quot;&gt;&amp;lt;&lt;/span&gt;a href=&quot;&lt;/span&gt;&lt;span class=&quot;phpString&quot;&gt;&quot;&lt;span class=&quot;phpText&quot;&gt;;echo &lt;/span&gt;the_permalink&lt;span class=&quot;phpOperator&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;phpOperator&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;phpText&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;phpFunction&quot;&gt;echo&lt;/span&gt; &quot;&lt;/span&gt;&lt;span class=&quot;phpString&quot;&gt;&quot;&lt;span class=&quot;phpOperator&quot;&gt;&amp;gt;&lt;/span&gt;&quot;&lt;/span&gt;.&lt;span class=&quot;phpString&quot;&gt;&quot;Read More&lt;span class=&quot;phpOperator&quot;&gt;&amp;lt;&lt;/span&gt;/a&lt;span class=&quot;phpOperator&quot;&gt;&amp;gt;&lt;/span&gt;&quot;&lt;/span&gt;&lt;span class=&quot;phpText&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;phpFunction&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;phpString&quot;&gt;&quot;&quot;&lt;/span&gt;&lt;span class=&quot;phpText&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;phpOperator&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;phpOperator&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://wordpressnutsandbolts.blogspot.com/feeds/601973436211373875/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://wordpressnutsandbolts.blogspot.com/2011/09/content-limit-function-for-wordpress.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4541278785090749160/posts/default/601973436211373875'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4541278785090749160/posts/default/601973436211373875'/><link rel='alternate' type='text/html' href='http://wordpressnutsandbolts.blogspot.com/2011/09/content-limit-function-for-wordpress.html' title='The content limit function for wordpress'/><author><name>Binish Prabhakar</name><uri>http://www.blogger.com/profile/06321237526635911658</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4541278785090749160.post-7511778139574894929</id><published>2011-09-18T22:05:00.000-07:00</published><updated>2014-07-09T12:09:22.326-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Wordpress"/><title type='text'>How to get images from wordpress content or wordpress post??</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;Hi Friends, In this post I am going to write about getting images from  wordpress post content, I want this because I want to show post content  without images on home page for one of my client, So below is code by  which we can get all images one by one from content of post.&lt;br /&gt;
&lt;br /&gt;
// Start the Loop&lt;br /&gt;
&amp;lt;?php if (have_posts()) : ?&amp;gt;&amp;lt;?php while (have_posts()) : the_post(); ?&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
// Set the post content to a variable&lt;br /&gt;
$temppostcontent = $post-&amp;gt;post_content;&lt;br /&gt;
&lt;br /&gt;
// Define the pattern to search&lt;br /&gt;
$temppattern = &#39;~&amp;lt;img alt=&quot;&quot; /&amp;gt;]*\ /&amp;gt;~&#39;;&lt;br /&gt;
&lt;br /&gt;
// Run preg_match_all to grab all the images and save the results in $resultpics&lt;br /&gt;
preg_match_all( $temppattern, $temppostcontent, $resultpics );&lt;br /&gt;
&lt;br /&gt;
// Count the results&lt;br /&gt;
&amp;nbsp;$iNumberOfPics = count($resultpics[0]);&lt;br /&gt;
&lt;br /&gt;
// Check to see if we have at least 1 image&lt;br /&gt;
if ( $iNumberOfPics &amp;gt; 0 )&lt;br /&gt;
{&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Now here you would do whatever you need to do with the images&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // For this example I&#39;m just going to echo them&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; for ( $i=0; $i &amp;lt; $iNumberOfPics ; $i++ )&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; echo $resultpics[0][$i];&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; };&lt;br /&gt;
&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
// ...finish the loop, &lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://wordpressnutsandbolts.blogspot.com/feeds/7511778139574894929/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://wordpressnutsandbolts.blogspot.com/2011/09/how-to-get-images-from-wordpress.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4541278785090749160/posts/default/7511778139574894929'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4541278785090749160/posts/default/7511778139574894929'/><link rel='alternate' type='text/html' href='http://wordpressnutsandbolts.blogspot.com/2011/09/how-to-get-images-from-wordpress.html' title='How to get images from wordpress content or wordpress post??'/><author><name>Binish Prabhakar</name><uri>http://www.blogger.com/profile/06321237526635911658</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4541278785090749160.post-4807672338444101529</id><published>2011-09-07T07:11:00.000-07:00</published><updated>2014-07-09T12:09:22.308-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Wordpress"/><title type='text'>How to get the custom feild value of post or page in wordpress?</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;to get the custom feild value of post or page try with this code &lt;br /&gt;
get_post_meta($post_id, &#39;customfeildname&#39;, true);&lt;br /&gt;
&lt;br /&gt;
to set custom field value...&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj1H5UzP8T-KtQl2WdQNwzr06ob4N3pAtlqi55t5ccBh5woRBjbabibDx-NT2fjqmQTHLVJcQwR_V5aoYn1A_cVv6WTp18SnTYkKslMfZTsZCDdDI7wPU59tB4cVGgqJFg2UsZYe0HZR7u6/s1600/Untitled-3+copy.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;61&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj1H5UzP8T-KtQl2WdQNwzr06ob4N3pAtlqi55t5ccBh5woRBjbabibDx-NT2fjqmQTHLVJcQwR_V5aoYn1A_cVv6WTp18SnTYkKslMfZTsZCDdDI7wPU59tB4cVGgqJFg2UsZYe0HZR7u6/s320/Untitled-3+copy.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://wordpressnutsandbolts.blogspot.com/feeds/4807672338444101529/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://wordpressnutsandbolts.blogspot.com/2011/09/how-to-get-custom-feild-value-of-post.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4541278785090749160/posts/default/4807672338444101529'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4541278785090749160/posts/default/4807672338444101529'/><link rel='alternate' type='text/html' href='http://wordpressnutsandbolts.blogspot.com/2011/09/how-to-get-custom-feild-value-of-post.html' title='How to get the custom feild value of post or page in wordpress?'/><author><name>Binish Prabhakar</name><uri>http://www.blogger.com/profile/06321237526635911658</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj1H5UzP8T-KtQl2WdQNwzr06ob4N3pAtlqi55t5ccBh5woRBjbabibDx-NT2fjqmQTHLVJcQwR_V5aoYn1A_cVv6WTp18SnTYkKslMfZTsZCDdDI7wPU59tB4cVGgqJFg2UsZYe0HZR7u6/s72-c/Untitled-3+copy.png" height="72" width="72"/><thr:total>0</thr:total></entry></feed>