<?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>BMo-design Demos</title>
	<atom:link href="http://software.bmo-design.de/feed" rel="self" type="application/rss+xml" />
	<link>http://software.bmo-design.de</link>
	<description>Webdesign, Internetseiten, Online-Shops, Flashgames, CD-Rom Präsentationen</description>
	<lastBuildDate>Tue, 05 Mar 2013 09:17:40 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
		<item>
		<title>A little fix for MooFlow V0.2</title>
		<link>http://software.bmo-design.de/a-little-fix-for-mooflow-v0-2</link>
		<comments>http://software.bmo-design.de/a-little-fix-for-mooflow-v0-2#comments</comments>
		<pubDate>Sun, 20 May 2012 09:34:16 +0000</pubDate>
		<dc:creator>BMo</dc:creator>
				<category><![CDATA[MooTools]]></category>

		<guid isPermaLink="false">http://software.bmo-design.de/?p=364</guid>
		<description><![CDATA[Hi, I really love the script MooFlow from Tobias Wetzel (http://www.outcut.de/MooFlow/). The code is really good work but I found a little problem if you change the resize &#8220;factor&#8221; of the image. I fixed that and want to share my insights with<span class="ellipsis">&#8230;</span> <a href="http://software.bmo-design.de/a-little-fix-for-mooflow-v0-2"><div class="see-more">See more &#8250;</div><!-- end of .see-more --></a>]]></description>
				<content:encoded><![CDATA[<p>Hi,<br />
I really love the script MooFlow from Tobias Wetzel (<a title="MooFlow 0.2" href="http://www.outcut.de/MooFlow/" target="_blank">http://www.outcut.de/MooFlow/</a>).</p>
<p>The code is really good work but I found a little problem if you change the resize &#8220;factor&#8221; of the image.</p>
<p>I fixed that and want to share my insights with you.</p>
<p>Demo: <a title="Demo MooFlow Fix" target="_blank" href="http://jsfiddle.net/BMoDesign/sAF8L/embedded/result,js,html,css/">http://jsfiddle.net/BMoDesign/sAF8L/embedded/result,js,html,css/</a></p>
<p>I changed the process and the glideTo function.</p>
<p>&nbsp;</p>
<pre>    glideTo: function(index) {
       <span style="color: #800080;"> if (this.index &lt; index) this.isback = false; if (this.index &gt; index) this.isback = true;</span>
        this.index = index;
        this.aniFx.start(this.aniFx.get(), index * -this.foc);
        if (this.cap) this.cap.set('html', this.getCurrent().title);
    },
    process: function(x) {
        var z, W, H, zI = this.iL,
            foc = this.foc,
            f = this.factor,
            sz = this.sz,
            oW = this.oW,
            offY = this.offY,
            div, elh, elw,
           <span style="color: #800080;"> isback = this.isback;</span>

            this.master.images.each(function(el) {
                div = el.div.style;
                elw = el.width;
                elh = el.height;
                if (x &gt; -foc * 6 &amp;&amp; x &lt; foc * 6) {
                    with(Math) {
                        z = sqrt(10000 + x * x) + 100;
                        H = round((elh / elw * f) / z * sz);
                        W = round(elw * H / elh);
                        if (H &gt;= elw * 0.5) {
                            W = round(f / z * sz);
                        }
                        div.left = round(((x / z * sz) + sz) - (f * 0.5) / z * sz) + 'px';
                        div.top = round(oW * 0.4 - H) + offY + 'px';
                    }
                    el.con.style.height = H * 2 + 'px';
                    div.width = W + 'px';
                    <span style="color: #800080;">if (isback==true)</span>
<span style="color: #800080;">                        div.zIndex = x &lt;= -foc ? zI++ : zI--;</span>
<span style="color: #800080;">                    else</span>
<span style="color: #800080;">                        div.zIndex = x &lt; 0 ? zI++ : zI--;</span>
                    div.display = 'block';
                } else {
                    div.display = 'none';
                }
                x += foc;
            });
    }</pre>
]]></content:encoded>
			<wfw:commentRss>http://software.bmo-design.de/a-little-fix-for-mooflow-v0-2/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Wir bauen einen Autocompleter für WordPress Magic Fields</title>
		<link>http://software.bmo-design.de/wir-bauen-einen-autocompleter-fur-wordpress-magic-fields</link>
		<comments>http://software.bmo-design.de/wir-bauen-einen-autocompleter-fur-wordpress-magic-fields#comments</comments>
		<pubDate>Thu, 22 Mar 2012 10:34:10 +0000</pubDate>
		<dc:creator>BMo</dc:creator>
				<category><![CDATA[wordpress]]></category>
		<category><![CDATA[Admin]]></category>
		<category><![CDATA[Autocomplete]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Magic Fields]]></category>

		<guid isPermaLink="false">http://software.bmo-design.de/?p=336</guid>
		<description><![CDATA[Sorry, this post only exists in german. I am looking for someone who wants to translate it. In Onlineshops und Seiten, auf denen täglich viele Artikel gepostet werden, erspart der Einsatz eines Autocompleters viele Mühen. In vielen meiner Seiten verwende<span class="ellipsis">&#8230;</span> <a href="http://software.bmo-design.de/wir-bauen-einen-autocompleter-fur-wordpress-magic-fields"><div class="see-more">See more &#8250;</div><!-- end of .see-more --></a>]]></description>
				<content:encoded><![CDATA[<p><em>Sorry, this post only exists in german. I am looking for someone who wants to translate it.</em></p>
<p>In Onlineshops und Seiten, auf denen täglich viele Artikel gepostet werden, erspart der Einsatz eines Autocompleters viele Mühen. In vielen meiner Seiten verwende ich das glorreiche Tool <a href="http://magicfields.org/getting-started/" target="_blank" rel="nofollow">&#8220;Magic Fields 2.0&#8243;</a> um mit Custom Fields zu arbeiten. Ich habe nun herausgefunden, wie sich der jQuery Autocompleter relativ einfach mit Magic Fields verknüpfen lässt. Hier meine Anleitung.</p>
<ol>
<li>in unserem Theme benötigen wir eine neue Javascript-Datei, eine CSS-Datei und die &#8220;functions.php&#8221; des Themes.</li>
<li>Die Javascript-Datei nenne ich &#8220;adminJS.js&#8221; und die CSS-Datei &#8220;adminCSS.css&#8221;.</li>
<li>beginnen wir mit der adminJS.js:Zuerst lade ich das aktuelle Autocompleter jQuery Script von <a title="JQuery UI" href="http://jqueryui.com/download" target="_blank" rel="nofollow">jQuery UI</a> herunter. Wichtig, es reicht das Autocompleter script. Zusätzlich muss man core, widget und position herunter laden. Kopieren Sie <strong>nur</strong> das Autocompleter Script aus der heruntergeladenen JavaScript Datei heraus in die adminJS.js</li>
<li>Darunter schrieben wir unseren Code zum starten des Ajax Requests:
<pre>    //BMo Functions
    /*
    ---
    description: ...
    authors:
    - Benedikt Morschheuser (http://software.bmo-design.de) 2011
    requires:
    - jQuery
    */
    (function($) {
       $(document).ready(function(){
         var initMFAutocomplete = function() {
           //initalisiert Autocompleter für Magic Fields
           var lastXhr;
           var locURL = jQuery(location).attr('href').split('wp-admin')[0];
           $(".text_field_mf input").autocomplete({
             source: function( request, response ) {
               var term = request.term;
               //http://codex.wordpress.org/AJAX_in_Plugins
               var data = {
                 action: 'jsonAutocomplete',
                 term: term,
                 field: $(this.element).attr("name").split('[')['1'].split(']')[0]
              };
              lastXhr = $.post(ajaxurl, data, function( anwser, status, xhr ) {
              if ( xhr === lastXhr ) {
                response(anwser);
              }
             });
           }
         });
       };//Aufruf der Funktionen
       initMFAutocomplete();
      });
    })(jQuery);</pre>
</li>
<li>In die adminCSS.css kommt das heruntergeladene jQueryUI CSS Framework. Bei mir &#8220;jquery-ui-1.8.18.custom.css&#8221;. Die Bilder benötigen wir nicht.</li>
<li>Nun wird es spannend. Die functions.php muss ergänzt werden. Als ersten benötigen wir die Scripts, als zweites muss die Ajax/JSON Antwort gebaut werden. Beginnen wir mit dem Einbinden der Scripts. Dafür verwenden wir folgenden Code:
<pre>function load_custom_wp_admin_scripts(){
    wp_enqueue_style('admin_css', get_template_directory_uri() . '/adminCSS.css');
	wp_enqueue_script('jquery-ui-core');
	wp_register_script('admin_js', get_template_directory_uri() . '/adminJS.js', array('jquery'), '1.0' );
	wp_enqueue_script('admin_js');
}
add_action('admin_enqueue_scripts', 'load_custom_wp_admin_scripts');</pre>
</li>
<li>Danach folgt der Code für den Ajax Request. Damit das ganze auch sicher ist, setze ich auf die WordPress wp_ajax_&#8230; Funktion. Diese muss gleich heißen wie die action in unserem JavaScri, also &#8220;jsonAutocomplete&#8221;. Danach initalisieren wir eine Query auf die Posts, hier kann bei Bedarf auch ein Custo Post Type mitgegeben werden. Wir verarbeiten den Feldnamen des Custom Fields und holen dessen Werte aus der Datenbank.
<pre>//ajax - falls user eingeloggt ist
add_action( 'wp_ajax_jsonAutocomplete', 'jsonAutocomplete' );
function jsonAutocomplete() {
   if(!isset($_POST['action']))
		die();

	$action = $_POST['action'];
        $term = $_POST['term'];
	$field = esc_attr($_POST['field']);

	if($action=="jsonAutocomplete"&amp;&amp;isset($field)){
		$the_query = new WP_Query();
                
                $checkArray=array(); //zum prüfen auf duplicate

		$out=array();
		// The Loop
		while ( $the_query-&gt;have_posts() ) : $the_query-&gt;the_post();//http://www.rarst.net/images/query_functions.png
                   $obj = get_post_meta(get_the_ID(), $field,1);
                   if($obj!=""&amp;&amp;in_array($obj, $checkArray)==false&amp;&amp;strstr($obj,$term)!=false){//ist nicht leer und kein duplikat und term kommt irgendwie in obj vor
                      array_push($checkArray,$obj);
                      array_push($out,array( 'id' =&gt; get_the_ID(),"label"=&gt; $obj, "value"=&gt; $obj));
                  }
                endwhile;

		// Reset Post Data
		wp_reset_postdata();
		//wp_reset_query();

		if(!empty($out)){
			// generate the response
			$response = json_encode( $out );

			// response output
			header( "Content-Type: application/json" );
			echo $response;
		}
	}

    // IMPORTANT: don't forget to "exit"
    exit;
}</pre>
</li>
<li>Fertig, sollte nun bei allen MagicField Textfeldern (inputs) funktionieren. Möchte man andere Felder hinzufügen, muss man gegebenenfalls den selector in der JS Datei anpassen:  $(&#8220;.text_field_mf input&#8221;).</li>
</ol>
<p><img class="aligncenter size-large wp-image-345" title="autocompleter Magic Fields" alt="" src="http://software.bmo-design.de/wp-content/uploads/autocompleter-Magic-Fields-650x214.png" width="550" height="181" /></p>
<p>Im Anhang die wichtigsten Code-Ausschnitte. Ich freu mcih über Kommentare.</p>
<p>Download the zip: <a href="http://software.bmo-design.de/wp-content/uploads/MAGIC-FIELDS-AUTOCOMPLETER.zip">MAGIC FIELDS AUTOCOMPLETER</a></p>
]]></content:encoded>
			<wfw:commentRss>http://software.bmo-design.de/wir-bauen-einen-autocompleter-fur-wordpress-magic-fields/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>How to add a YouTube video into WordPress 3</title>
		<link>http://software.bmo-design.de/how-to-add-a-youtube-video-into-wordpress-3</link>
		<comments>http://software.bmo-design.de/how-to-add-a-youtube-video-into-wordpress-3#comments</comments>
		<pubDate>Wed, 25 Jan 2012 11:47:18 +0000</pubDate>
		<dc:creator>BMo</dc:creator>
				<category><![CDATA[wordpress]]></category>
		<category><![CDATA[iframe]]></category>
		<category><![CDATA[integration]]></category>
		<category><![CDATA[youtube]]></category>

		<guid isPermaLink="false">http://software.bmo-design.de/?p=249</guid>
		<description><![CDATA[Since WordPress and YouTube changed the possibility to embed videos it is not as easy as before. YouTube has an new iframe integration code: &#60;iframe width="560" height="315" src="http://www.youtube.com/embed/..." frameborder="0" allowfullscreen&#62;&#60;/iframe&#62; but WordPress prohibits the inclusion of iframes in the standard configuration. I found an easy way to change this.<span class="ellipsis">&#8230;</span> <a href="http://software.bmo-design.de/how-to-add-a-youtube-video-into-wordpress-3"><div class="see-more">See more &#8250;</div><!-- end of .see-more --></a>]]></description>
				<content:encoded><![CDATA[<p>Since WordPress and YouTube changed the possibility to embed videos it is not as easy as before. YouTube has an new iframe integration code:</p>
<p><code>&lt;iframe width="560" height="315" src="http://www.youtube.com/embed/..." frameborder="0" allowfullscreen&gt;&lt;/iframe&gt;</code></p>
<p>but WordPress prohibits the inclusion of iframes in the standard configuration.</p>
<p>I found an easy way to change this.</p>
<ol>
<li>You have to change your function.php, so go to &#8220;Appearance&#8221; -&gt; &#8220;Editor&#8221; and open the function.php in the integrated wordpress editor. But be careful and if you&#8217;re don&#8217;t know what you are doing, I advise you to make a backup or ask someone.</li>
<li>Look in the code if there is already a row in which the filter &#8220;add_filter(&#8216;tiny_mce_before_init&#8217;, &#8230;); is applied. If not, add the following code:<br />
<code>/*Add iframe to TinyMCE*/<br />
function fb_change_mce_options($initArray) {<br />
$ext = ' iframe[align|longdesc|name|width|height|frameborder|scrolling|marginheight|marginwidth|src]';<br />
if ( isset( $initArray['extended_valid_elements'] ) ) {<br />
$initArray['extended_valid_elements'] .= ',' . $ext;<br />
} else {<br />
$initArray['extended_valid_elements'] = $ext;<br />
}<br />
return $initArray;<br />
}<br />
add_filter('tiny_mce_before_init', 'fb_change_mce_options');<br />
</code></li>
<li>That&#8217;s it. Now you can use the new Youtube integration code by posting it into an articles html.</li>
</ol>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://software.bmo-design.de/how-to-add-a-youtube-video-into-wordpress-3/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>How to integrate Google+ into your WordPress plugin</title>
		<link>http://software.bmo-design.de/how-to-integrate-google-plus-into-your-wordpress-plugin</link>
		<comments>http://software.bmo-design.de/how-to-integrate-google-plus-into-your-wordpress-plugin#comments</comments>
		<pubDate>Mon, 03 Oct 2011 13:18:47 +0000</pubDate>
		<dc:creator>BMo</dc:creator>
				<category><![CDATA[wordpress]]></category>
		<category><![CDATA[google plus]]></category>
		<category><![CDATA[integration]]></category>
		<category><![CDATA[plugin]]></category>

		<guid isPermaLink="false">http://software.bmo-design.de/?p=165</guid>
		<description><![CDATA[A guideline for wordpress plugin developers. Now that the Google+ Button is available to use, I had the idea to integrate it into my WordPress Plugin. A little bit of linklove can not be wrong and SEO is important, also to spread an<span class="ellipsis">&#8230;</span> <a href="http://software.bmo-design.de/how-to-integrate-google-plus-into-your-wordpress-plugin"><div class="see-more">See more &#8250;</div><!-- end of .see-more --></a>]]></description>
				<content:encoded><![CDATA[<p>A guideline for wordpress plugin developers.</p>
<p>Now that the<a title="get your Google+ Button" href="http://www.google.com/webmasters/+1/button/" rel="nofollow" target="_blank"> Google+ Button</a> is available to use, I had the idea to integrate it into my WordPress Plugin. A little bit of linklove can not be wrong and SEO is important, also to spread an open source product.<br />
Here you can read about what to do so.</p>
<p><img title="Add Google + to WordPress" src="http://software.bmo-design.de/wp-content/uploads/Bildschirmfoto-2011-10-03-um-14.43.01.png" alt="Add Google + to WordPress image" width="1019" height="69" /></p>
<p>First of all, the +-Button consists of two parts:</p>
<ul>
<li>The plusone.js script in the html head.<br />
&lt;script type=&#8221;text/javascript&#8221; src=&#8221;https://apis.google.com/js/plusone.js&#8221;&gt;&lt;/script&gt;</li>
<li>And the button place holder<br />
&lt;g:plusone size=&#8221;small&#8221; count=&#8221;false&#8221; href=&#8221;http://your-domain-to-like.com&#8221;&gt;&lt;/g:plusone&gt;</li>
</ul>
<p>Both parts can easily integrated with standard wordpress functions.</p>
<p>To add the script into the wp-admin head you can use this code:</p>
<pre>function set_admin_header() {
  //admin Header
  wp_deregister_script(array('plusone'));
  wp_register_script( 'plusone', 'https://apis.google.com/js/plusone.js');
  if (function_exists('wp_enqueue_script')) {
    wp_enqueue_script('plusone');
  }
}
add_action('admin_init', 'set_admin_header');//admin_init, admin_head is to late</pre>
<p>For integration in a plugin-class, use this instead:</p>
<pre>$classObj = new myClass();
add_action('admin_init'   , array($classObj,'set_admin_header'));</pre>
<p>&nbsp;</p>
<p>Then you need to integrate the button into the plugins overview / wordpress installed plugins list.</p>
<pre>/* Add a link to plugins page */
function set_plugin_links($links, $file) {
  $plugin = plugin_basename(__FILE__);
  if ($file == $plugin) {
    return array_merge( $links, array(
      '&lt;g:plusone size="small" count="false" href="http://your-domain-to-like.com"&gt;&lt;/g:plusone&gt;'
    ));
  }
  return $links;
}
add_filter( 'plugin_row_meta', 'set_plugin_links', 10, 2 );</pre>
<p>For integration in a plugin-class, use:</p>
<pre>$classObj = new myClass();
add_filter( 'plugin_row_meta', array($classObj,'set_plugin_links'), 10, 2 );</pre>
<p>After all, replace &#8220;http://your-domain-to-like.com&#8221; in my code with your url.</p>
<p style="text-align: center;"><img class="aligncenter size-full wp-image-235" title="google + integration in my wordpress plugin list" src="http://software.bmo-design.de/wp-content/uploads/Bildschirmfoto-2011-11-22-um-18.28.32.png" alt="" width="982" height="689" /></p>
<p> I hope I could help you with my short tutorial. If so, please click on my + button <img src='http://software.bmo-design.de/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://software.bmo-design.de/how-to-integrate-google-plus-into-your-wordpress-plugin/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
