<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <title>Snipplr</title>
    <description>Recent snippets posted on Snipplr.com</description>
    <link>https://snipplr.com/</link>
    <lastBuildDate>Wed, 10 Jun 2026 11:09:53 +0000</lastBuildDate>
    <item>
      <title>(PHP) WordPress YouTube Z-Index Fix - paulgrenwood</title>
      <link>https://snipplr.com/view/57789/wordpress-youtube-zindex-fix</link>
      <description>&lt;p&gt;WordPress allows you to embed videos so easily using oEmbed. You can easily add videos to your post just pasting their URL to your post. WordPress handles all the object and embed HTML for you. But this code is missing wmode parameter which is necessary for CSS z-index to work.&#13;
&#13;
&#13;
Here I will show you how to filter the HTML for the embedded video and add this parameter so easily. For this we will use the oembed_dataparse filter which is run when a user adds a video to the post. Place the following code in your theme's functions.php file:&lt;/p&gt;</description>
      <pubDate>Fri, 12 Aug 2011 19:38:19 UTC</pubDate>
      <guid>https://snipplr.com/view/57789/wordpress-youtube-zindex-fix</guid>
    </item>
    <item>
      <title>(PHP) Display Current Year with PHP - paulgrenwood</title>
      <link>https://snipplr.com/view/27339/display-current-year-with-php</link>
      <description>&lt;p&gt;&lt;/p&gt;</description>
      <pubDate>Fri, 29 Jan 2010 18:30:15 UTC</pubDate>
      <guid>https://snipplr.com/view/27339/display-current-year-with-php</guid>
    </item>
    <item>
      <title>(JavaScript) Show Most Recent Flickr Uploads - paulgrenwood</title>
      <link>https://snipplr.com/view/22484/show-most-recent-flickr-uploads</link>
      <description>&lt;p&gt;This code will display the most recent uploads from Flickr for any account. Replace the â€œ35591378@N03â€³ (the Whitehouse account) in the code below with the ID of the account you are fetching from. Use http://idgettr.com/ if you need help finding it. Alter the â€œ9â€³ in the loop to show more or less than 10.&lt;/p&gt;</description>
      <pubDate>Wed, 04 Nov 2009 11:22:52 UTC</pubDate>
      <guid>https://snipplr.com/view/22484/show-most-recent-flickr-uploads</guid>
    </item>
    <item>
      <title>(PHP) Randomize Background Image - paulgrenwood</title>
      <link>https://snipplr.com/view/21986/randomize-background-image</link>
      <description>&lt;p&gt;Set up and array of filenames, which correspond to the file names of the images you are trying to randomize.&lt;/p&gt;</description>
      <pubDate>Tue, 27 Oct 2009 16:14:28 UTC</pubDate>
      <guid>https://snipplr.com/view/21986/randomize-background-image</guid>
    </item>
    <item>
      <title>(CSS) Select List Item only if it Doesn't Contain another List (and is top level) - paulgrenwood</title>
      <link>https://snipplr.com/view/20707/select-list-item-only-if-it-doesnt-contain-another-list-and-is-top-level</link>
      <description>&lt;p&gt;&lt;/p&gt;</description>
      <pubDate>Tue, 06 Oct 2009 08:55:57 UTC</pubDate>
      <guid>https://snipplr.com/view/20707/select-list-item-only-if-it-doesnt-contain-another-list-and-is-top-level</guid>
    </item>
    <item>
      <title>(PHP) Cleaning Variables - paulgrenwood</title>
      <link>https://snipplr.com/view/20469/cleaning-variables</link>
      <description>&lt;p&gt;Variables that are submitted via web forms always need to be cleaned/sanitized before use in any way, to prevent against all kinds of different malicious intent.&lt;/p&gt;</description>
      <pubDate>Wed, 30 Sep 2009 08:54:37 UTC</pubDate>
      <guid>https://snipplr.com/view/20469/cleaning-variables</guid>
    </item>
    <item>
      <title>(JavaScript) Use Firebug in Any Browser - paulgrenwood</title>
      <link>https://snipplr.com/view/20466/use-firebug-in-any-browser</link>
      <description>&lt;p&gt;Just include this script on the site and youâ€™ll get a Firebug console that pops up for debugging in any browser. Not quite as full featured but itâ€™s still pretty helpful! Remember to remove it when you are done.&lt;/p&gt;</description>
      <pubDate>Wed, 30 Sep 2009 08:51:42 UTC</pubDate>
      <guid>https://snipplr.com/view/20466/use-firebug-in-any-browser</guid>
    </item>
    <item>
      <title>(PHP) How to Code a Signup Form with Email Confirmation - paulgrenwood</title>
      <link>https://snipplr.com/view/20418/how-to-code-a-signup-form-with-email-confirmation</link>
      <description>&lt;p&gt;&lt;/p&gt;</description>
      <pubDate>Tue, 29 Sep 2009 10:30:19 UTC</pubDate>
      <guid>https://snipplr.com/view/20418/how-to-code-a-signup-form-with-email-confirmation</guid>
    </item>
    <item>
      <title>(HTML) Placing a Flickr Slideshow - paulgrenwood</title>
      <link>https://snipplr.com/view/20166/placing-a-flickr-slideshow</link>
      <description>&lt;p&gt;&lt;/p&gt;</description>
      <pubDate>Wed, 23 Sep 2009 16:41:46 UTC</pubDate>
      <guid>https://snipplr.com/view/20166/placing-a-flickr-slideshow</guid>
    </item>
    <item>
      <title>(HTML) Country Select HTML - paulgrenwood</title>
      <link>https://snipplr.com/view/20165/country-select-html</link>
      <description>&lt;p&gt;&lt;/p&gt;</description>
      <pubDate>Wed, 23 Sep 2009 16:40:08 UTC</pubDate>
      <guid>https://snipplr.com/view/20165/country-select-html</guid>
    </item>
    <item>
      <title>(PHP) Custom Fields - SEO Your Title Tag - paulgrenwood</title>
      <link>https://snipplr.com/view/20160/custom-fields--seo-your-title-tag</link>
      <description>&lt;p&gt;Search Engine Optimisation, or SEO is something that a lot of bloggers get obsessed about, whilst others think itâ€™s a load of rubbish. Iâ€™m halfway between the two â€“ whilst I believe that you can change certain things to better SEO your content, such as adding H1, H2 etc tags in the appropriate places, I personally donâ€™t think you should get too carried away with it. One of the things you can do though is change your title tag, and this custom field trick will let you set a custom field and itâ€™ll appear as your title tag. Add the code below to your header.php file:&lt;/p&gt;</description>
      <pubDate>Wed, 23 Sep 2009 16:05:36 UTC</pubDate>
      <guid>https://snipplr.com/view/20160/custom-fields--seo-your-title-tag</guid>
    </item>
    <item>
      <title>(PHP) Custom Fields - Display a thumbnail (and auto resize it) - paulgrenwood</title>
      <link>https://snipplr.com/view/20159/custom-fields--display-a-thumbnail-and-auto-resize-it</link>
      <description>&lt;p&gt;Whilst there are a number of ways of displaying thumbnails, this is still my favourite (even if it does require the most work!). First, upload timthumb to /wp-content/themes/yourtheme/ and create an image 250px by 250px with your siteâ€™s logo and upload it to yourtheme/images/. This is the image that will be displayed if no custom field is displayed. Then, for every thumbnail, youâ€™ll need to create it in Photoshop and upload it to your blog. Next, create a custom field â€˜Imageâ€™ with the path of the image as the value of the custom field. Now for the code:&lt;/p&gt;</description>
      <pubDate>Wed, 23 Sep 2009 16:04:25 UTC</pubDate>
      <guid>https://snipplr.com/view/20159/custom-fields--display-a-thumbnail-and-auto-resize-it</guid>
    </item>
    <item>
      <title>(PHP) Custom Fields - Create a Post Series - paulgrenwood</title>
      <link>https://snipplr.com/view/20157/custom-fields--create-a-post-series</link>
      <description>&lt;p&gt;This is something that I wished Iâ€™d thought of a long time ago â€“ show other posts in the same series using not a plugin but custom fields. All youâ€™ve got to do for this trick to work is create a custom field â€˜Seriesâ€™ with a link to each other post in the series. Each post must be a seperate custom field. Then, use the code below to display all the other posts in the same series!&lt;/p&gt;</description>
      <pubDate>Wed, 23 Sep 2009 16:03:35 UTC</pubDate>
      <guid>https://snipplr.com/view/20157/custom-fields--create-a-post-series</guid>
    </item>
    <item>
      <title>(PHP) Allow Visitors to Email Posts to Their Friends - paulgrenwood</title>
      <link>https://snipplr.com/view/20156/allow-visitors-to-email-posts-to-their-friends</link>
      <description>&lt;p&gt;Allow Visitors to Email Posts to Their Friends&lt;/p&gt;</description>
      <pubDate>Wed, 23 Sep 2009 16:02:57 UTC</pubDate>
      <guid>https://snipplr.com/view/20156/allow-visitors-to-email-posts-to-their-friends</guid>
    </item>
    <item>
      <title>(PHP) Add Custom Bookmark Links - paulgrenwood</title>
      <link>https://snipplr.com/view/20155/add-custom-bookmark-links</link>
      <description>&lt;p&gt;&lt;/p&gt;</description>
      <pubDate>Wed, 23 Sep 2009 16:02:12 UTC</pubDate>
      <guid>https://snipplr.com/view/20155/add-custom-bookmark-links</guid>
    </item>
    <item>
      <title>(PHP) Add a "Share on Facebook" Link - paulgrenwood</title>
      <link>https://snipplr.com/view/20154/add-a-share-on-facebook-link</link>
      <description>&lt;p&gt;&lt;/p&gt;</description>
      <pubDate>Wed, 23 Sep 2009 16:01:06 UTC</pubDate>
      <guid>https://snipplr.com/view/20154/add-a-share-on-facebook-link</guid>
    </item>
    <item>
      <title>(PHP) Zip Files on the Fly - paulgrenwood</title>
      <link>https://snipplr.com/view/20153/zip-files-on-the-fly</link>
      <description>&lt;p&gt;&lt;/p&gt;</description>
      <pubDate>Wed, 23 Sep 2009 16:00:14 UTC</pubDate>
      <guid>https://snipplr.com/view/20153/zip-files-on-the-fly</guid>
    </item>
    <item>
      <title>(PHP) Validate Email Address - paulgrenwood</title>
      <link>https://snipplr.com/view/20152/validate-email-address</link>
      <description>&lt;p&gt;E-mail validation is perhaps the most used validation in web forms, this code will validate email address and also optionally check the MX records of the domain provided in email address to make email validation more robust.&lt;/p&gt;</description>
      <pubDate>Wed, 23 Sep 2009 15:59:47 UTC</pubDate>
      <guid>https://snipplr.com/view/20152/validate-email-address</guid>
    </item>
    <item>
      <title>(PHP) Truncate Text at Word Break - paulgrenwood</title>
      <link>https://snipplr.com/view/20149/truncate-text-at-word-break</link>
      <description>&lt;p&gt;This function will truncate strings only at word breaks which can be used to show a teaser for complete article without breaking words.&lt;/p&gt;</description>
      <pubDate>Wed, 23 Sep 2009 15:58:39 UTC</pubDate>
      <guid>https://snipplr.com/view/20149/truncate-text-at-word-break</guid>
    </item>
    <item>
      <title>(PHP) Resize Images on the fly - paulgrenwood</title>
      <link>https://snipplr.com/view/20148/resize-images-on-the-fly</link>
      <description>&lt;p&gt;Creating thumbnails of the images is required many a times, this code will be useful to know about the logic of thumbnail generation.&lt;/p&gt;</description>
      <pubDate>Wed, 23 Sep 2009 15:58:09 UTC</pubDate>
      <guid>https://snipplr.com/view/20148/resize-images-on-the-fly</guid>
    </item>
    <item>
      <title>(PHP) Prepend http to a URL - paulgrenwood</title>
      <link>https://snipplr.com/view/20147/prepend-http-to-a-url</link>
      <description>&lt;p&gt;Some times you need to accept some url as input but users seldom add http:// to it, this code will add http:// to the URL if itâ€™s not there.&lt;/p&gt;</description>
      <pubDate>Wed, 23 Sep 2009 15:57:32 UTC</pubDate>
      <guid>https://snipplr.com/view/20147/prepend-http-to-a-url</guid>
    </item>
    <item>
      <title>(PHP) Parse JSON Data - paulgrenwood</title>
      <link>https://snipplr.com/view/20145/parse-json-data</link>
      <description>&lt;p&gt;With most of the popular web services like Twitter providing their data through APIs, it is always helpful to know how to parse API data which is sent in various formats including JSON, XML etc.&lt;/p&gt;</description>
      <pubDate>Wed, 23 Sep 2009 15:56:33 UTC</pubDate>
      <guid>https://snipplr.com/view/20145/parse-json-data</guid>
    </item>
    <item>
      <title>(PHP) List Directory Contents - paulgrenwood</title>
      <link>https://snipplr.com/view/20144/list-directory-contents</link>
      <description>&lt;p&gt;&lt;/p&gt;</description>
      <pubDate>Wed, 23 Sep 2009 15:55:52 UTC</pubDate>
      <guid>https://snipplr.com/view/20144/list-directory-contents</guid>
    </item>
    <item>
      <title>(PHP) isset instead of strlen - paulgrenwood</title>
      <link>https://snipplr.com/view/20143/isset-instead-of-strlen</link>
      <description>&lt;p&gt;This snippet uses isset() instead strlen() to verify a PHP variable (in this example $username) is set and is at least six characters long.&lt;/p&gt;</description>
      <pubDate>Wed, 23 Sep 2009 15:55:18 UTC</pubDate>
      <guid>https://snipplr.com/view/20143/isset-instead-of-strlen</guid>
    </item>
    <item>
      <title>(PHP) Human Readable Random String - paulgrenwood</title>
      <link>https://snipplr.com/view/20142/human-readable-random-string</link>
      <description>&lt;p&gt;This code will create a human readable string that will look more close to dictionary words, useful for captchas.&lt;/p&gt;</description>
      <pubDate>Wed, 23 Sep 2009 15:54:43 UTC</pubDate>
      <guid>https://snipplr.com/view/20142/human-readable-random-string</guid>
    </item>
    <item>
      <title>(PHP) Get Real IP Address of Client - paulgrenwood</title>
      <link>https://snipplr.com/view/20141/get-real-ip-address-of-client</link>
      <description>&lt;p&gt;This function will fetch the real IP address of the user even if he is behind a proxy server.&lt;/p&gt;</description>
      <pubDate>Wed, 23 Sep 2009 15:54:14 UTC</pubDate>
      <guid>https://snipplr.com/view/20141/get-real-ip-address-of-client</guid>
    </item>
    <item>
      <title>(PHP) Generate Random String - paulgrenwood</title>
      <link>https://snipplr.com/view/20140/generate-random-string</link>
      <description>&lt;p&gt;If you donâ€™t need human readable string, then use this function instead, which will create a random string you can use for user idâ€™s etc.&lt;/p&gt;</description>
      <pubDate>Wed, 23 Sep 2009 15:53:33 UTC</pubDate>
      <guid>https://snipplr.com/view/20140/generate-random-string</guid>
    </item>
    <item>
      <title>(PHP) Force File Download - paulgrenwood</title>
      <link>https://snipplr.com/view/20139/force-file-download</link>
      <description>&lt;p&gt;Provide files to the user by forcing them to download.&lt;/p&gt;</description>
      <pubDate>Wed, 23 Sep 2009 15:53:04 UTC</pubDate>
      <guid>https://snipplr.com/view/20139/force-file-download</guid>
    </item>
    <item>
      <title>(PHP) Encode Email Address - paulgrenwood</title>
      <link>https://snipplr.com/view/20138/encode-email-address</link>
      <description>&lt;p&gt;With this snippet, you can encode any email address into HTML entities so that spam bots do not find it.&lt;/p&gt;</description>
      <pubDate>Wed, 23 Sep 2009 15:52:24 UTC</pubDate>
      <guid>https://snipplr.com/view/20138/encode-email-address</guid>
    </item>
    <item>
      <title>(PHP) Convert URLs within String to Links - paulgrenwood</title>
      <link>https://snipplr.com/view/20137/convert-urls-within-string-to-links</link>
      <description>&lt;p&gt;This function converts URLs and e-mail addresses within a string into clickable hyperlinks.&lt;/p&gt;</description>
      <pubDate>Wed, 23 Sep 2009 15:51:21 UTC</pubDate>
      <guid>https://snipplr.com/view/20137/convert-urls-within-string-to-links</guid>
    </item>
    <item>
      <title>(PHP) Convert Strings into Clickable URL - paulgrenwood</title>
      <link>https://snipplr.com/view/20136/convert-strings-into-clickable-url</link>
      <description>&lt;p&gt;&lt;/p&gt;</description>
      <pubDate>Wed, 23 Sep 2009 15:50:39 UTC</pubDate>
      <guid>https://snipplr.com/view/20136/convert-strings-into-clickable-url</guid>
    </item>
    <item>
      <title>(CSS) Sprite with Inline Images - paulgrenwood</title>
      <link>https://snipplr.com/view/20133/sprite-with-inline-images</link>
      <description>&lt;p&gt;&lt;/p&gt;</description>
      <pubDate>Wed, 23 Sep 2009 15:45:29 UTC</pubDate>
      <guid>https://snipplr.com/view/20133/sprite-with-inline-images</guid>
    </item>
    <item>
      <title>(CSS) Remove Vertical TextArea Scollbar in IE - paulgrenwood</title>
      <link>https://snipplr.com/view/20132/remove-vertical-textarea-scollbar-in-ie</link>
      <description>&lt;p&gt;IE adds a vertical scrollbar to textarea input fields regardless of the height of content in it. You can fix that with this simple CSS trick.&lt;/p&gt;</description>
      <pubDate>Wed, 23 Sep 2009 15:43:09 UTC</pubDate>
      <guid>https://snipplr.com/view/20132/remove-vertical-textarea-scollbar-in-ie</guid>
    </item>
    <item>
      <title>(CSS) Remove Active Link Borders - paulgrenwood</title>
      <link>https://snipplr.com/view/20131/remove-active-link-borders</link>
      <description>&lt;p&gt;Some browsers like Firefox and IE add a dotted outline border over the link user clicked. It is a useful accessibility feature that lets user know which link he clicked or is in focus. But sometimes you need to get rid of this, hereâ€™s the CSS you need to use.&lt;/p&gt;</description>
      <pubDate>Wed, 23 Sep 2009 15:42:29 UTC</pubDate>
      <guid>https://snipplr.com/view/20131/remove-active-link-borders</guid>
    </item>
    <item>
      <title>(CSS) Print Page Breaks - paulgrenwood</title>
      <link>https://snipplr.com/view/20130/print-page-breaks</link>
      <description>&lt;p&gt;While most of the internet users prefer to read content online but some of your users might like to print your article. With CSS you can control the page breaks within content just add this CSS class to your stylesheet and add this class to any tag which you would like to print on next page.&lt;/p&gt;</description>
      <pubDate>Wed, 23 Sep 2009 15:41:43 UTC</pubDate>
      <guid>https://snipplr.com/view/20130/print-page-breaks</guid>
    </item>
    <item>
      <title>(CSS) Perfect Full Page Background Image - paulgrenwood</title>
      <link>https://snipplr.com/view/20129/perfect-full-page-background-image</link>
      <description>&lt;p&gt;This is a very tall order, and we are going to be pulling out all kinds of different stuff to make it happen. First of all, because the image needs to scale, a traditional CSS background-image is already disqualified. That leaves us with an inline image. This inline image is going to be placed on the page inside of a bunch of wrappers, each necessary for accomplishing all our goals. WORKS WITH IE7+&lt;/p&gt;</description>
      <pubDate>Wed, 23 Sep 2009 15:41:04 UTC</pubDate>
      <guid>https://snipplr.com/view/20129/perfect-full-page-background-image</guid>
    </item>
    <item>
      <title>(CSS) Highlight Text Input Fields - paulgrenwood</title>
      <link>https://snipplr.com/view/20128/highlight-text-input-fields</link>
      <description>&lt;p&gt;This CSS trick lets you highlight the input field currently in focus. This trick does not work in IE though.&lt;/p&gt;</description>
      <pubDate>Wed, 23 Sep 2009 15:39:44 UTC</pubDate>
      <guid>https://snipplr.com/view/20128/highlight-text-input-fields</guid>
    </item>
    <item>
      <title>(CSS) Highlight Links that Open in a New Window - paulgrenwood</title>
      <link>https://snipplr.com/view/20127/highlight-links-that-open-in-a-new-window</link>
      <description>&lt;p&gt;This piece of CSS code will highlight links that open in a new window so that user knows before hand that link will pop open in a new tab or window.&lt;/p&gt;</description>
      <pubDate>Wed, 23 Sep 2009 15:38:57 UTC</pubDate>
      <guid>https://snipplr.com/view/20127/highlight-links-that-open-in-a-new-window</guid>
    </item>
    <item>
      <title>(CSS) Equal Height Columns - paulgrenwood</title>
      <link>https://snipplr.com/view/20126/equal-height-columns</link>
      <description>&lt;p&gt;&lt;/p&gt;</description>
      <pubDate>Wed, 23 Sep 2009 15:37:56 UTC</pubDate>
      <guid>https://snipplr.com/view/20126/equal-height-columns</guid>
    </item>
    <item>
      <title>(CSS) Detect Screen Size &amp; Apply CSS - paulgrenwood</title>
      <link>https://snipplr.com/view/20124/detect-screen-size--apply-css</link>
      <description>&lt;p&gt;I needed today to format the content differently according to the screen resolution of the user. So I thought that just by detecting the screen width using the screen.width property, I could change the stylesheet using jQuery. And so it was. Check the example and continue reading.&lt;/p&gt;</description>
      <pubDate>Wed, 23 Sep 2009 15:33:51 UTC</pubDate>
      <guid>https://snipplr.com/view/20124/detect-screen-size--apply-css</guid>
    </item>
    <item>
      <title>(CSS) CSS Dropdown Menu - paulgrenwood</title>
      <link>https://snipplr.com/view/20123/css-dropdown-menu</link>
      <description>&lt;p&gt;&lt;/p&gt;</description>
      <pubDate>Wed, 23 Sep 2009 15:28:03 UTC</pubDate>
      <guid>https://snipplr.com/view/20123/css-dropdown-menu</guid>
    </item>
    <item>
      <title>(CSS) Cross Browser Opacity - paulgrenwood</title>
      <link>https://snipplr.com/view/20122/cross-browser-opacity</link>
      <description>&lt;p&gt;Though CSS3 standard includes the opacity property, but not every browser supports it, hereâ€™s the CSS trick for cross browser transparency.&lt;/p&gt;</description>
      <pubDate>Wed, 23 Sep 2009 15:26:27 UTC</pubDate>
      <guid>https://snipplr.com/view/20122/cross-browser-opacity</guid>
    </item>
    <item>
      <title>(CSS) Cross Browser Minimum Height - paulgrenwood</title>
      <link>https://snipplr.com/view/20121/cross-browser-minimum-height</link>
      <description>&lt;p&gt;Internet Explorer does not understand the min-height property but hereâ€™s the CSS trick to accomplish that in IE.&lt;/p&gt;</description>
      <pubDate>Wed, 23 Sep 2009 15:25:47 UTC</pubDate>
      <guid>https://snipplr.com/view/20121/cross-browser-minimum-height</guid>
    </item>
    <item>
      <title>(CSS) Change Text Highlight Color - paulgrenwood</title>
      <link>https://snipplr.com/view/20120/change-text-highlight-color</link>
      <description>&lt;p&gt;&lt;/p&gt;</description>
      <pubDate>Wed, 23 Sep 2009 15:24:14 UTC</pubDate>
      <guid>https://snipplr.com/view/20120/change-text-highlight-color</guid>
    </item>
    <item>
      <title>(CSS) Attribute-Specific Icons - paulgrenwood</title>
      <link>https://snipplr.com/view/20118/attributespecific-icons</link>
      <description>&lt;p&gt;CSS Attribute selectors are very powerful giving you many options to control styles of different elements e.g. you can add an icon based on the href attribute of the a tag to let the user know whether link points to an image, pdf, doc file etc.&lt;/p&gt;</description>
      <pubDate>Wed, 23 Sep 2009 15:15:30 UTC</pubDate>
      <guid>https://snipplr.com/view/20118/attributespecific-icons</guid>
    </item>
  </channel>
</rss>
