<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
<title>Snipplr - cyberhobo</title>
<link>http://snipplr.com/users/cyberhobo</link>
<description>Recent snippets posted on Snipplr.com</description>
<language>en-us</language>
<pubDate>Wed, 22 May 2013 22:50:49 GMT</pubDate>
<item>
<title>(PHP) Force Geo Mashup to use a different home URL (add a slash)</title>
<link>http://snipplr.com/view/67846/force-geo-mashup-to-use-a-different-home-url-add-a-slash/</link>
<description><![CDATA[ <p>Some hosting configurations do uncontrollable redirects and other oddities that play havoc with Geo Mashup maps. Most commonly the home URL redirects improperly unless a slash is added at the end. This code attempts to add the slash just for Geo Mashup. Put it in a theme functions.php or in mu-plugins.</p> ]]></description>
<pubDate>Sun, 21 Oct 2012 02:45:24 GMT</pubDate>
<guid>http://snipplr.com/view/67846/force-geo-mashup-to-use-a-different-home-url-add-a-slash/</guid>
</item>
<item>
<title>(JavaScript) WordPress Geo Mashup Mapstraction Custom Markers</title>
<link>http://snipplr.com/view/64680/wordpress-geo-mashup-mapstraction-custom-markers/</link>
<description><![CDATA[ <p>Some common custom javascript for customizing geo mashup map markers for Mapstraction map providers (any other than Google v2). The marker images used are 24 x 24 pixels, anchored at the bottom center, with no shadow. You'd put images in `wp_content/plugins/geo-mashup-custom/images` to work with this snippet.</p> ]]></description>
<pubDate>Fri, 20 Apr 2012 10:23:34 GMT</pubDate>
<guid>http://snipplr.com/view/64680/wordpress-geo-mashup-mapstraction-custom-markers/</guid>
</item>
<item>
<title>(PHP) Load a javascript library (MarkerWithLabel) in a Geo Mashup map frame template</title>
<link>http://snipplr.com/view/64303/load-a-javascript-library-markerwithlabel-in-a-geo-mashup-map-frame-template/</link>
<description><![CDATA[ <p>This is very close to the default map frame template that comes with Geo Mashup, but it registers and queues the external library.</p> ]]></description>
<pubDate>Tue, 03 Apr 2012 05:03:36 GMT</pubDate>
<guid>http://snipplr.com/view/64303/load-a-javascript-library-markerwithlabel-in-a-geo-mashup-map-frame-template/</guid>
</item>
<item>
<title>(JavaScript) Load KML attachments for all geo mashup map markers</title>
<link>http://snipplr.com/view/64271/load-kml-attachments-for-all-geo-mashup-map-markers/</link>
<description><![CDATA[ <p>By default KML is only loaded for a selected marker. This bit of  [custom javascript](http://code.google.com/p/wordpress-geo-mashup/wiki/Documentation#Custom_JavaScript) will load it for all markers.</p> ]]></description>
<pubDate>Sun, 01 Apr 2012 10:43:07 GMT</pubDate>
<guid>http://snipplr.com/view/64271/load-kml-attachments-for-all-geo-mashup-map-markers/</guid>
</item>
<item>
<title>(HTML) Fix for Addthis menu appearing at page top</title>
<link>http://snipplr.com/view/51091/fix-for-addthis-menu-appearing-at-page-top/</link>
<description><![CDATA[ <p>If you use hidden text spans inside link buttons instead of an image tag, addthis menus seem to attach to the page top instead of the link. For some reason a strong tag used the same way works.</p> ]]></description>
<pubDate>Fri, 25 Mar 2011 04:51:30 GMT</pubDate>
<guid>http://snipplr.com/view/51091/fix-for-addthis-menu-appearing-at-page-top/</guid>
</item>
<item>
<title>(PHP) Geo Mashup global map of the current category</title>
<link>http://snipplr.com/view/44389/geo-mashup-global-map-of-the-current-category/</link>
<description><![CDATA[ <p>This code would go in a category template, outside the loop. In a more general template, you'd want to put it inside a check for `is_category()`.</p> ]]></description>
<pubDate>Fri, 19 Nov 2010 03:22:59 GMT</pubDate>
<guid>http://snipplr.com/view/44389/geo-mashup-global-map-of-the-current-category/</guid>
</item>
<item>
<title>(PHP) Geo Mashup post query contextual map</title>
<link>http://snipplr.com/view/37962/geo-mashup-post-query-contextual-map/</link>
<description><![CDATA[ <p>Geo Mashup contextual maps display the results of a WordPress query, so they can be very useful in combination with the WordPress `query_posts` function. This example maps post with an example tag, but any call to `query_posts` could be substituted. This is code that would go in a WordPress template.</p> ]]></description>
<pubDate>Wed, 28 Jul 2010 02:51:41 GMT</pubDate>
<guid>http://snipplr.com/view/37962/geo-mashup-post-query-contextual-map/</guid>
</item>
<item>
<title>(PHP) Conditional Geo Mashup map template code</title>
<link>http://snipplr.com/view/29558/conditional-geo-mashup-map-template-code/</link>
<description><![CDATA[ <p>This template code will work only in the WordPress Loop to include a map if the Geo Mashup plugin is active and the current post has a location.</p> ]]></description>
<pubDate>Wed, 10 Mar 2010 15:26:24 GMT</pubDate>
<guid>http://snipplr.com/view/29558/conditional-geo-mashup-map-template-code/</guid>
</item>
<item>
<title>(PHP) Global Geo Mashup map centered on current post</title>
<link>http://snipplr.com/view/28178/global-geo-mashup-map-centered-on-current-post/</link>
<description><![CDATA[ <p>Use this code in a WordPress template with the Geo Mashup plugin (see URL) to include a global map within a post or page, centered on that post or page's location, with marker highlighted.</p> ]]></description>
<pubDate>Thu, 11 Feb 2010 11:53:59 GMT</pubDate>
<guid>http://snipplr.com/view/28178/global-geo-mashup-map-centered-on-current-post/</guid>
</item>
<item>
<title>(jQuery) Toggle next element on click</title>
<link>http://snipplr.com/view/23071/toggle-next-element-on-click/</link>
<description><![CDATA[ <p>Make elements with the "toggle-next" class show/hide the following element when clicked.</p> ]]></description>
<pubDate>Fri, 13 Nov 2009 12:47:04 GMT</pubDate>
<guid>http://snipplr.com/view/23071/toggle-next-element-on-click/</guid>
</item>
<item>
<title>(PHP) WordPress is_child_of: Is this a child of page x?</title>
<link>http://snipplr.com/view/20847/wordpress-ischildof-is-this-a-child-of-page-x/</link>
<description><![CDATA[ <p>This makes template code that applies to children of a particular page much more readable, especially if you can use a page path instead of an ID: `if ( is_child_of( 'topic/subtopic' ) ) :`.</p> ]]></description>
<pubDate>Thu, 08 Oct 2009 15:25:09 GMT</pubDate>
<guid>http://snipplr.com/view/20847/wordpress-ischildof-is-this-a-child-of-page-x/</guid>
</item>
<item>
<title>(JavaScript) Disable and enable a text input in Firefox</title>
<link>http://snipplr.com/view/19181/disable-and-enable-a-text-input-in-firefox/</link>
<description><![CDATA[ <p>I just noticed in Firefox 3.5.2 that setting `disabled = true` for a focused text input seems to make it impossible to re-focus after setting `disabled = false`. The solution is to blur it before disabling.</p> ]]></description>
<pubDate>Wed, 02 Sep 2009 12:49:15 GMT</pubDate>
<guid>http://snipplr.com/view/19181/disable-and-enable-a-text-input-in-firefox/</guid>
</item>
<item>
<title>(jQuery) Encode HTML entities</title>
<link>http://snipplr.com/view/18967/encode-html-entities/</link>
<description><![CDATA[ <p>Found at the source link - stealing and indexing :)</p> ]]></description>
<pubDate>Fri, 28 Aug 2009 14:46:57 GMT</pubDate>
<guid>http://snipplr.com/view/18967/encode-html-entities/</guid>
</item>
<item>
<title>(jQuery) Get the selected value from a select box</title>
<link>http://snipplr.com/view/18961/get-the-selected-value-from-a-select-box/</link>
<description><![CDATA[ <p>It's not obvious from the jQuery documentation that `val()` will work to get the currently selected value of a select box (in 1.3.2 at least).</p> ]]></description>
<pubDate>Fri, 28 Aug 2009 08:44:14 GMT</pubDate>
<guid>http://snipplr.com/view/18961/get-the-selected-value-from-a-select-box/</guid>
</item>
<item>
<title>(PHP) WordPress: in subcatory?</title>
<link>http://snipplr.com/view/18874/wordpress-in-subcatory/</link>
<description><![CDATA[ <p>Usually use in a template with `in_category()`, like `if ( in_category( 3 ) || in_subcategory( 3 ) ) { ...`. Tested in WP 2.8.4.</p> ]]></description>
<pubDate>Wed, 26 Aug 2009 15:15:48 GMT</pubDate>
<guid>http://snipplr.com/view/18874/wordpress-in-subcatory/</guid>
</item>
<item>
<title>(jQuery) Simple tabs with jQuery Core (not jQuery UI)</title>
<link>http://snipplr.com/view/18559/simple-tabs-with-jquery-core-not-jquery-ui/</link>
<description><![CDATA[ <p>Sometimes I want simple tabs without all the packaging of jQuery UI with a theme. This does the job with just jQuery 1.2.6, and should work with later versions.</p> ]]></description>
<pubDate>Wed, 19 Aug 2009 13:02:49 GMT</pubDate>
<guid>http://snipplr.com/view/18559/simple-tabs-with-jquery-core-not-jquery-ui/</guid>
</item>
<item>
<title>(PHP) WordPress: Get the root page ID</title>
<link>http://snipplr.com/view/18408/wordpress-get-the-root-page-id/</link>
<description><![CDATA[ <p>Get the ID of the root (oldest ancestor, parent without parents) page relative to the current page in a WordPress page template.

Can be helpful for use with wp\_list\_pages() to create navigation markup.</p> ]]></description>
<pubDate>Mon, 17 Aug 2009 17:49:20 GMT</pubDate>
<guid>http://snipplr.com/view/18408/wordpress-get-the-root-page-id/</guid>
</item>
<item>
<title>(jQuery) jQuery: select first and/or last list items</title>
<link>http://snipplr.com/view/18407/jquery-select-first-andor-last-list-items/</link>
<description><![CDATA[ <p>Select the first and last item in an unordered list. As an example, I add a CSS class to each.

In WordPress, it's not so easy to get wp\_list\_pages() to generate these classes. jQuery provides an easy out for javascript-enabled clients.</p> ]]></description>
<pubDate>Mon, 17 Aug 2009 17:14:01 GMT</pubDate>
<guid>http://snipplr.com/view/18407/jquery-select-first-andor-last-list-items/</guid>
</item>
<item>
<title>(PHP) Wordpress: Does a page have children?</title>
<link>http://snipplr.com/view/18393/wordpress-does-a-page-have-children/</link>
<description><![CDATA[ <p>There's no has\_children() function in WP 2.8.4, but get\_children() returns false if the post/page has no children, so it can serve the same purpose in a page template. 

Outside a page template you'd have to add a global declaration for the $post variable.</p> ]]></description>
<pubDate>Mon, 17 Aug 2009 11:20:03 GMT</pubDate>
<guid>http://snipplr.com/view/18393/wordpress-does-a-page-have-children/</guid>
</item>
</channel>
</rss>