<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>AB-WebLog.com&#187; widget</title>
	<atom:link href="http://www.ab-weblog.com/en/tag/widget/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.ab-weblog.com/en</link>
	<description>Andreas Breitschopp</description>
	<lastBuildDate>Wed, 18 Mar 2015 09:47:48 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Flags Widget as Easy to Use WordPress Plug-In</title>
		<link>http://www.ab-weblog.com/en/flags-widget-as-easy-to-use-wordpress-plug-in/</link>
		<comments>http://www.ab-weblog.com/en/flags-widget-as-easy-to-use-wordpress-plug-in/#comments</comments>
		<pubDate>Sun, 30 Oct 2011 19:21:52 +0000</pubDate>
		<dc:creator>Andreas Breitschopp</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[country]]></category>
		<category><![CDATA[flag]]></category>
		<category><![CDATA[plug-in]]></category>
		<category><![CDATA[widget]]></category>

		<guid isPermaLink="false">http://www.ab-weblog.com/en/?p=347</guid>
		<description><![CDATA[Some minutes ago I’ve released my second WordPress plug-in: A simple plug-in that displays flag icons that link to other language versions of your blog. This plug-in combines my widget for displaying language selection flags in menu and footer with many &#8230; <a href="http://www.ab-weblog.com/en/flags-widget-as-easy-to-use-wordpress-plug-in/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Some minutes ago I’ve released my second WordPress plug-in: A simple plug-in that displays <a title="Flags Widget" href="http://www.ab-weblog.com/en/wordpress-plug-ins/flags-widget/">flag icons</a> that link to other language versions of your blog.</p>
<p>This plug-in combines my <a title="Widget for Displaying Language Selection Flags in Menu and Footer" href="http://www.ab-weblog.com/en/widget-for-displaying-language-selection-flags-in-menu-and-footer/">widget for displaying language selection flags in menu and footer</a> with many additional options and settings in one clean WordPress plug-in.</p>
<p>The <a title="Flags Widget" href="http://www.ab-weblog.com/en/wordpress-plug-ins/flags-widget/">installation and configuration</a> is very easy. Just have a look und let me know your thoughts!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ab-weblog.com/en/flags-widget-as-easy-to-use-wordpress-plug-in/feed/</wfw:commentRss>
		<slash:comments>31</slash:comments>
		</item>
		<item>
		<title>Most Important Social Widgets as Easy to Use WordPress Plug-In</title>
		<link>http://www.ab-weblog.com/en/most-important-social-widgets-as-easy-to-use-wordpress-plug-in/</link>
		<comments>http://www.ab-weblog.com/en/most-important-social-widgets-as-easy-to-use-wordpress-plug-in/#comments</comments>
		<pubDate>Fri, 09 Sep 2011 22:05:24 +0000</pubDate>
		<dc:creator>Andreas Breitschopp</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[Facebook]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[plug-in]]></category>
		<category><![CDATA[Twitter]]></category>
		<category><![CDATA[widget]]></category>

		<guid isPermaLink="false">http://www.ab-weblog.com/en/?p=240</guid>
		<description><![CDATA[Some minutes ago I&#8217;ve released my first WordPress plug-in: it displays the most important social widgets of Facebook, Twitter and Google+ below your posts. Now the question is: Why yet another social widgets plug-in as there are already a lot &#8230; <a href="http://www.ab-weblog.com/en/most-important-social-widgets-as-easy-to-use-wordpress-plug-in/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Some minutes ago I&#8217;ve released my first WordPress plug-in: it displays the most important <a title="Social Widgets" href="http://www.ab-weblog.com/en/wordpress-plug-ins/social-widgets/">social widgets of Facebook, Twitter and Google+ </a>below your posts.</p>
<p><em>Now the question is:</em><br />
Why yet another social widgets plug-in as there are already a lot of them?</p>
<p>The answer is that I&#8217;ve searched for a simple and easy to user plug-in and all plug-ins I&#8217;ve found were way to complicated: I did not want to have countless of social networks supported with hundreds of options &#8211; just a simple plug-in covering the most important social widgets without needing to configure anything!</p>
<p><em>And that&#8217;s my new plug-in:</em><br />
<a title="Social Widgets" href="http://www.ab-weblog.com/en/wordpress-plug-ins/social-widgets/">Install it</a>, activate it and the social widgets are displayed below your posts immediately &#8211; without doing any configuration.</p>
<p><em>What social widgets plug-in do you use?</em></p>
]]></content:encoded>
			<wfw:commentRss>http://www.ab-weblog.com/en/most-important-social-widgets-as-easy-to-use-wordpress-plug-in/feed/</wfw:commentRss>
		<slash:comments>105</slash:comments>
		</item>
		<item>
		<title>Widget for Displaying Language Selection Flags in Menu and Footer</title>
		<link>http://www.ab-weblog.com/en/widget-for-displaying-language-selection-flags-in-menu-and-footer/</link>
		<comments>http://www.ab-weblog.com/en/widget-for-displaying-language-selection-flags-in-menu-and-footer/#comments</comments>
		<pubDate>Wed, 03 Aug 2011 18:37:27 +0000</pubDate>
		<dc:creator>Andreas Breitschopp</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[blog]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[multilingual]]></category>
		<category><![CDATA[multisite]]></category>
		<category><![CDATA[plug-in]]></category>
		<category><![CDATA[widget]]></category>

		<guid isPermaLink="false">http://www.ab-weblog.com/en/?p=32</guid>
		<description><![CDATA[After I decided to use the WordPress Multisite feature for my multilingual blog (see this post), I wanted to display language selection flags inside the menu and in the footer. It turned out that especially the integration of images on &#8230; <a href="http://www.ab-weblog.com/en/widget-for-displaying-language-selection-flags-in-menu-and-footer/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>After I decided to use the WordPress Multisite feature for my multilingual blog (<a title="Multilingual Blog in WordPress: qTranslate, WPML or Multisite Feature" href="http://www.ab-weblog.com/en/multilingual-blog-in-wordpress-qtranslate-wpml-or-multisite-feature/">see this post</a>), I wanted to display language selection flags inside the menu and in the footer.</p>
<p>It turned out that especially the integration of images on the right side of the (by default black) menu area was not very easy in the &#8220;Twenty Eleven&#8221; theme. Therefore I decided to just create a simple widget that displays the flags in a DIV which is placed above all other content and this way can easily be positioned with relative coordinates directly from within the admin widget interface.</p>
<p>Therefore you can define these settings in the admin area:</p>
<p><a href="http://www.ab-weblog.com/en/files/flags_widget_admin.png"><img class="aligncenter size-full wp-image-33" title="Flags Widget (Admin Interface)" src="http://www.ab-weblog.com/en/files/flags_widget_admin.png" alt="Flags Widget (Admin Interface)" width="262" height="252" /></a></p>
<ul>
<li>Flag position offset (left): the relative offset of the X coordinate of the DIV.</li>
<li>Flag position offset (top): the relative offset of the Y coordinate of the DIV.</li>
<li>Flag icon URL (en): the flag icon URL for the English flag (first uploaded, of course).</li>
<li>Flag icon URL (de): the flag icon URL for the German flag (first uploaded, of course).</li>
</ul>
<p>Obviously this can be easily extended with more or other languages if needed.</p>
<p>And here is the widget source code:</p>
<pre class="brush: php; gutter: true">&lt;?php
/**
 * Flags_Widget Class
 */
class Flags_Widget extends WP_Widget {
	/** constructor */
	function Flags_Widget() {
		parent::WP_Widget(false, $name = 'Flags_Widget');
	}

	/** @see WP_Widget::widget */
	function widget($args, $instance) {
		extract($args);
		?&gt;
			&lt;div style="position: relative;"&gt;
				&lt;div style="left: &lt;?php echo $instance['flags_position_left']; ?&gt;px; top: &lt;?php echo $instance['flags_position_top']; ?&gt;px; position: absolute; z-index: 10000 !important;"&gt;
					&lt;?php echo '&lt;a href="/en/"&gt;&lt;img src="' . $instance['flag_en'] . '" width="20" height="16" title="English" alt="English" /&gt;'; ?&gt;&lt;/a&gt;  
					&lt;?php echo '&lt;a href="/de/"&gt;&lt;img src="' . $instance['flag_de'] . '" width="20" height="16" title="Deutsch" alt="Deutsch" /&gt;&lt;/a&gt;'; ?&gt;
				&lt;/div&gt;
			&lt;/div&gt;
		&lt;?php
	}

	/** @see WP_Widget::update */
	function update($new_instance, $old_instance) {
		$instance = $old_instance;
		$instance['flags_position_left'] = strip_tags($new_instance['flags_position_left']);
		if (!is_numeric($instance['flags_position_left'])) $instance['flags_position_left'] = '0';
		$instance['flags_position_top'] = strip_tags($new_instance['flags_position_top']);
		if (!is_numeric($instance['flags_position_top'])) $instance['flags_position_top'] = '0';
		$instance['flag_en'] = strip_tags($new_instance['flag_en']);
		$instance['flag_de'] = strip_tags($new_instance['flag_de']);
		return $instance;
	}

	/** @see WP_Widget::form */
	function form($instance) {
		$flags_position_left = esc_attr($instance['flags_position_left']);
		if ($flags_position_left == '') $flags_position_left = '0';
		$flags_position_top = esc_attr($instance['flags_position_top']);
		if ($flags_position_top == '') $flags_position_top = '0';
		$flag_en = esc_attr($instance['flag_en']);
		$flag_de = esc_attr($instance['flag_de']);
		?&gt;
			&lt;p&gt;
				&lt;label for="&lt;?php echo $this-&gt;get_field_id('flags_position_left'); ?&gt;"&gt;&lt;?php _e('Flag position offset (left):'); ?&gt;&lt;/label&gt;
				&lt;input class="widefat" id="&lt;?php echo $this-&gt;get_field_id('flags_position_left'); ?&gt;"
					name="&lt;?php echo $this-&gt;get_field_name('flags_position_left'); ?&gt;" type="text" value="&lt;?php echo $flags_position_left; ?&gt;" /&gt;
				&lt;label for="&lt;?php echo $this-&gt;get_field_id('flags_position_top'); ?&gt;"&gt;&lt;?php _e('Flag position offset (top):'); ?&gt;&lt;/label&gt;
				&lt;input class="widefat" id="&lt;?php echo $this-&gt;get_field_id('flags_position_top'); ?&gt;"
					name="&lt;?php echo $this-&gt;get_field_name('flags_position_top'); ?&gt;" type="text" value="&lt;?php echo $flags_position_top; ?&gt;" /&gt;
				&lt;label for="&lt;?php echo $this-&gt;get_field_id('flag_en'); ?&gt;"&gt;&lt;?php _e('Flag icon URL (en):'); ?&gt;&lt;/label&gt;
				&lt;input class="widefat" id="&lt;?php echo $this-&gt;get_field_id('flag_en'); ?&gt;"
					name="&lt;?php echo $this-&gt;get_field_name('flag_en'); ?&gt;" type="text" value="&lt;?php echo $flag_en; ?&gt;" /&gt;
				&lt;label for="&lt;?php echo $this-&gt;get_field_id('flag_de'); ?&gt;"&gt;&lt;?php _e('Flag icon URL (de):'); ?&gt;&lt;/label&gt;
				&lt;input class="widefat" id="&lt;?php echo $this-&gt;get_field_id('flag_de'); ?&gt;"
					name="&lt;?php echo $this-&gt;get_field_name('flag_de'); ?&gt;" type="text" value="&lt;?php echo $flag_de; ?&gt;" /&gt;
			&lt;/p&gt;
		&lt;?php
	}
} // class Flags_Widget
add_action('widgets_init', create_function('', 'return register_widget("Flags_Widget");'));
?&gt;</pre>
<p>I wanted to keep it simple and therefore all together in one file. Otherwise you should at least put the CSS styles inside an external style sheet file, of course.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ab-weblog.com/en/widget-for-displaying-language-selection-flags-in-menu-and-footer/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>
<!-- WP Super Cache is installed but broken. The path to wp-cache-phase1.php in wp-content/advanced-cache.php must be fixed! -->