<?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>Radu Poenaru &#187; Others</title>
	<atom:link href="http://www.radupoenaru.com/category/my-work/others/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.radupoenaru.com</link>
	<description>CTO, Software engineer and Team leader</description>
	<lastBuildDate>Mon, 26 Jul 2010 19:52:21 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>How to add Syntax Highlight to WordPress</title>
		<link>http://www.radupoenaru.com/how-to-add-syntax-highlight-to-wordpress/</link>
		<comments>http://www.radupoenaru.com/how-to-add-syntax-highlight-to-wordpress/#comments</comments>
		<pubDate>Fri, 02 Jul 2010 10:32:39 +0000</pubDate>
		<dc:creator>Radu Poenaru</dc:creator>
				<category><![CDATA[Others]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Syntax Highlight]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://www.radupoenaru.com/?p=1403</guid>
		<description><![CDATA[How to add SyntaxHilight in a child theme for the Wordpress blog. THis way you'll be able to update your theme without losing the additional scripts that customise it. Or move to another theme while keeping your favorite scripts attached to it.<p>Post from: <a href="http://www.radupoenaru.com">Radu Poenaru's Weblog</a><br/><br/><a href="http://www.radupoenaru.com/how-to-add-syntax-highlight-to-wordpress/">How to add Syntax Highlight to WordPress</a></p>
]]></description>
			<content:encoded><![CDATA[<p><a title="WordPress, my favourite blogging system." href="http://www.radupoenaru.com/wp-content/uploads/2010/05/wordpress.png" rel="lightbox[1225]"><img style="border-right-width: 0px; margin: 10px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Adding child themes to WordPress, my favourite blogging system." border="0" alt="Adding child themes to WordPress, my favourite blogging system." align="left" src="http://www.radupoenaru.com/wp-content/uploads/2010/05/wordpress_thumb.png" width="150" height="150" /></a>I wrote quite a while ago about <a href="http://www.radupoenaru.com/implement-syntax-highlighting/" target="_blank">How to implement Syntax Highlight</a> in your WordPress blog. It used an forward, yet permanent approach: modify you’re theme’s <a href="http://www.radupoenaru.com/how-to-add-a-nice-jquery-slider/" target="_blank">header.php</a>. But is it enough?</p>
<p>Lately, I wanted to update my blog’s theme to the newest version. But hey! I had a lot of modifications such the one above that kept me from doing a smooth update: <a href="http://www.radupoenaru.com/bnr-exchange-rate/" target="_blank">BNR Slider,</a> custom images for RSS and Twitter, hints, Syntax Highlight and so on.</p>
<p>The newest solution that I come up with is using a child theme, feature provided by WordPress engine. Basically, you have a theme applied to you blog that you like. Instead of modifying it, you create a new folder in theme’s directory with a special name who’ll be applied OVER your base theme, customizing only the aspects you need. Assuming that your theme’s name is <strong>MyFavoriteTheme</strong>, you’ll have to create the child theme as <strong>MyFavoriteTheme-child</strong>. </p>
<p>In order to use your new theme, you’ll have to create in the<strong> MyFavoriteTheme-child</strong> folder two files:</p>
<ol>
<li>styles.css – required – who’ll mark your folder as a child theme </li>
<li>functions.php – optional – for our example is required, as we’ll write code inside of it </li>
</ol>
<p> <span id="more-1403"></span>
<p>First, you Really need to setup the styles. The content is simple and explained in <a href="http://codex.wordpress.org/Child_Themes" target="_blank">this straight-forward article</a>.</p>
<p>The most interesting part is the functions.php, where we’ll define code to add our Syntax Highlight classes. You’ll have to put all needed JavaScript files in the /scripts folder, in the root of the WordPress install, and the css files respectively in /styles folder. This is just for easy of migration from one theme to the other, if you get bored or want to change your current one.</p>
<p>Then, in the aforementioned functions.php from your <strong>MyFavoriteTheme-child</strong> folder you have to insert the following text:</p>
<pre class="brush: php">&lt;?php
$path_to_scripts = &quot;/scripts/&quot;;
$path_to_styles = &quot;/styles/&quot;;

function register_syntaxhighlight() {
  wp_enqueue_script('shcore',  $path_to_scripts.'shcore.js');

  wp_enqueue_script('shbrushcsharp', $path_to_scripts.'shBrushCSharp.js');
  wp_enqueue_script('shbrushcpp', $path_to_scripts.'shBrushCpp.js');
  wp_enqueue_script('shbrushcss', $path_to_scripts.'shBrushCss.js');
  wp_enqueue_script('shbrushobjc', $path_to_scripts.'shBrushObjC.js');
  wp_enqueue_script('shbrushjscript', $path_to_scripts.'shBrushJScript.js');
  wp_enqueue_script('shbrushphp', $path_to_scripts.'shBrushPhp.js');
  wp_enqueue_script('shbrushplain', $path_to_scripts.'shBrushPlain.js');
  wp_enqueue_script('shbrushruby', $path_to_scripts.'shBrushRuby.js');
  wp_enqueue_script('shbrushsql', $path_to_scripts.'shBrushSql.js');
  wp_enqueue_script('shbrushxml', $path_to_scripts.'shBrushXml.js');
  wp_enqueue_script('shbrushas3', $path_to_scripts.'shBrushAs3.js');
  wp_enqueue_script('shbrushjava', $path_to_scripts.'shBrushJava.js');
  wp_enqueue_script('shbrushSql', $path_to_scripts.'shBrushSql.js');

  wp_enqueue_script('shstarter', $path_to_scripts.'shstarter.js', array('shcore'));

  wp_enqueue_style('shcore',  $path_to_styles.'shcore.css');
  wp_enqueue_style('shThemeDefault', $path_to_styles.'shThemeDefault.css');
}

add_action('init', 'register_syntaxhighlight');

?&gt;</pre>
<p>The code explanation:</p>
<ol>
<li>First we set some global vars, to know where the directories are; </li>
<li>Then we create a new function in which we add one by one the scripts required for the site – you can add the ones that you use and when you’ll post some content that requires a new brush, the shCore will kindly alert you that one of the brushes is missing, specify also the name of it. This way you’ll load only the ones used and no more, keeping the webpage size low and quality high. </li>
<li>wp_enqueue_script assures that the script will be loaded once. So if it is already loaded by any other plugin or theme, you will not have it downloaded twice; </li>
<li>finally, we add an WordPress action, binding to the init hook and add there our code. </li>
</ol>
<p>After uploading your code to your WordPress install (be careful to names &#8211; Linux is case sensitive), you’ll have to select as theme the child theme, so your modification will be applied. Until you’ll select the child theme, you will not see any changes!</p>
<p>That’s it, folks! </p>
<p>Post from: <a href="http://www.radupoenaru.com">Radu Poenaru's Weblog</a><br/><br/><a href="http://www.radupoenaru.com/how-to-add-syntax-highlight-to-wordpress/">How to add Syntax Highlight to WordPress</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.radupoenaru.com/how-to-add-syntax-highlight-to-wordpress/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Create a simple HTML .MOV player</title>
		<link>http://www.radupoenaru.com/create-a-simple-html-mov-player/</link>
		<comments>http://www.radupoenaru.com/create-a-simple-html-mov-player/#comments</comments>
		<pubDate>Wed, 26 May 2010 13:05:25 +0000</pubDate>
		<dc:creator>Radu Poenaru</dc:creator>
				<category><![CDATA[Others]]></category>

		<guid isPermaLink="false">http://www.radupoenaru.com/?p=1304</guid>
		<description><![CDATA[As a Ruby developer, I work quite a lot with their “special” plugins called gems. The nice fact about the gems is that they bring lots of functionality. By example, there’s a gem for paginating a collection who takes just few parameters and not only that finds out how many objects the collection has, but<p>Post from: <a href="http://www.radupoenaru.com">Radu Poenaru's Weblog</a><br/><br/><a href="http://www.radupoenaru.com/create-a-simple-html-mov-player/">Create a simple HTML .MOV player</a></p>
]]></description>
			<content:encoded><![CDATA[<p><img style="border-right-width: 0px; margin: 10px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="This is how I added ui-icon to JQuery tabs" border="0" alt="This is how I added ui-icon to JQuery tabs" align="left" src="http://www.radupoenaru.com/wp-content/uploads/2010/05/jqueryui1.png" width="73" height="73" />
<p>As a <a href="http://www.radupoenaru.com/unibonn/" target="_blank">Ruby developer</a>, I work quite a lot with their “special” plugins called gems. The nice fact about the gems is that they bring lots of functionality. By example, there’s a gem for paginating a collection who takes just few parameters and not only that finds out how many objects the collection has, but also how to split them, generating the corresponding links and serving to the original container (that used to show the entire collection) only the collection part that is representative in the context of current page and items per page.</p>
<p>Before someone new to a specific gem starts thinking to implement it, usually searches on the net for examples. The most important gems are described and exemplified in <a href="http://railscasts.com" target="_blank">Railscasts.com</a>. The content is excelent, the quality is good, sound is nice but the format chosen for movies is Apple’s .MOV proprietary format. There are few plugins to install for playing the files with MediaPlayer, but frankly I wanted a quicker solution than go on some obscure websites and getting from there a creepy .exe installer.</p>
<p>So I’ve created a simple .mov player that will replace the <strong>33 MB </strong>of useless QuickTime Player (if you’re a Mac user, you have already this installed so you’ll not need my hack).</p>
<p><a href="http://www.radupoenaru.com/online-mov-player/">Go directly to the player &gt;</a></p>
<p>So let’s see some code!</p>
<p>First, I decided to use the Object method in order to play mov files. Apple provides a .cab file, who is able to play this files in browser. More documentation on its parameters you can find in their <a href="http://support.apple.com/kb/TA26486?viewlocale=en_US" target="_blank">Embedding</a> tutorial.</p>
<p>Don’t forget to add a link to JQuery library!</p>
<pre class="brush: html">&lt;script type=&quot;text/javascript&quot; src=&quot;http://code.jquery.com/jquery-1.4.2.min.js&quot;&gt;&lt;/script&gt;</pre>
<p>The html code is shown below and it is pretty straight forward:</p>
<pre class="brush: html">&lt;body&gt;
&lt;div class=&quot;media&quot;&gt;
  &lt;div class=&quot;navigationTabs&quot;&gt;
      &lt;input type=&quot;text&quot; id=&quot;txtURL&quot; style=&quot;width:75%&quot;/&gt;
      &lt;input type=&quot;button&quot; id=&quot;btnPlayMov&quot; value=&quot;Play&quot;/&gt;
      &lt;input type=&quot;button&quot; id=&quot;btnClearMov&quot; value=&quot;Clear&quot;/&gt;
      &lt;/div&gt;
      &lt;div id=&quot;divPlayer&quot;&gt;

http://media.railscasts.com/videos/188_declarative_authorization.mov

  &lt;/div&gt;
&lt;/div&gt;
&lt;/body&gt;</pre>
<p>The JavaScript is a little bit trickier as it involves JQuery.&#160; For a newbie, it is pretty hard to debug, but after a while you’ll just feel it:</p>
<pre class="brush: js">$(function() {
  // bind an onClick event for this second Flash container
  $(&quot;#btnPlayMov&quot;).click(function() {
    var _height = &quot;306px&quot;;
    var _width = &quot;400px&quot;;
    var _movie =  $('#txtURL').val();

    var _html = '<object width="' + _width +
          '" height="' + _height +
          '" classid = "clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" >';
    _html += '<param name="src" value="' + _movie + ' ">';
    _html += '<param name="scale" value="tofit">';
    _html += '<embed width="' + _width + '" height="' + _height + '" src="' + _movie + '" scale="tofit" pluginspage="http://www.apple.com/quicktime/download/"></embed>';
    _html += '</object>';

    $(&quot;#divPlayer&quot;).html(_html);
  });

  $(&quot;#btnClearMov&quot;).click(function() {
    $(&quot;#divPlayer&quot;).html(&quot;http://media.railscasts.com/videos/188_declarative_authorization.mov&quot;);
  })
})</pre>
<p>Not to mention that it works in all major browsers (IE 8, FireFox 3.6 and Chrome) !</p>
<p><a href="http://www.radupoenaru.com/online-mov-player/">Go directly to the player &gt;</a></p>
<p>Post from: <a href="http://www.radupoenaru.com">Radu Poenaru's Weblog</a><br/><br/><a href="http://www.radupoenaru.com/create-a-simple-html-mov-player/">Create a simple HTML .MOV player</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.radupoenaru.com/create-a-simple-html-mov-player/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
<enclosure url="http://media.railscasts.com/videos/188_declarative_authorization.mov" length="38117771" type="video/quicktime" />
		</item>
		<item>
		<title>Research on LASIK</title>
		<link>http://www.radupoenaru.com/research-on-lasik/</link>
		<comments>http://www.radupoenaru.com/research-on-lasik/#comments</comments>
		<pubDate>Thu, 22 Apr 2010 16:03:00 +0000</pubDate>
		<dc:creator>Radu Poenaru</dc:creator>
				<category><![CDATA[Others]]></category>
		<category><![CDATA[EyeStar]]></category>
		<category><![CDATA[LASIK]]></category>

		<guid isPermaLink="false">http://www.radupoenaru.com/?p=1237</guid>
		<description><![CDATA[When starting such an important process as LASIK surgery(on which your sight is affected) it is crucial to get as many information as you can. You might want to bing it, to Google it and also ask your friends about it. Also discuss with professionals! You never know when you will find someone who already had it and can give their own personal impression.<p>Post from: <a href="http://www.radupoenaru.com">Radu Poenaru's Weblog</a><br/><br/><a href="http://www.radupoenaru.com/research-on-lasik/">Research on LASIK</a></p>
]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.radupoenaru.com/my-own-lasik-experience/"><img align="left" alt="Presenting my own LASIK surgery experience" border="0" height="119" src="http://www.radupoenaru.com/wp-content/uploads/2010/05/lasik.png" style="border-width: 0px; margin: 10px; display: inline;" title="Presenting my own LASIK surgery experience" width="150" /></a>When starting such an <a href="http://www.radupoenaru.com/my-own-lasik-experience/">important process</a> as LASIK surgery (on which your sight is affected) it is crucial to get as many information as you can. You might want to bing it, to Google it and also ask your friends about it. Also <a href="http://www.radupoenaru.com/discussions-with-eyestar-patient-coordinators/">discuss with professionals</a>! You never know when you will find someone who already had it and can give their own personal impression.</p>
<p>I found a lot of information on the Softpedia forum, in an interesting article <a href="http://news.softpedia.com/news/How-To-Fix-The-Eyes-60721.shtml" target="_blank">How to &quot;Fix&quot; Your Vision?</a> and a very <a href="http://forum.softpedia.com/index.php?showtopic=39574&amp;hl=lasik" target="_blank">large list of discussions</a> (in Romanian). I read a lot of advices pros and cons like:</p>
<ul>
<li><a href="http://www.allaboutvision.com/visionsurgery/lasik_complication_1.htm" target="_blank">All about vision</a>: &ldquo;Choosing the right eye surgeon probably is the single most important step you can take to decrease any risks associated with LASIK. An experienced, reputable surgeon will make sure you are properly screened and let you know up front if you aren&#39;t a good candidate for LASIK eye surgery.&rdquo;</li>
<li>Presentation of LASIK on <a href="http://en.wikipedia.org/wiki/LASIK" target="_blank">Wikipedia</a></li>
<li>More about <a href="http://www.the-lasik-directory.com/lasik_technology.html" target="_blank">Lasik Technology</a></li>
<li>after the surgery I found out the FDA&rsquo;s opinion on Lasik &#8211; it can be fully read under <a href="http://www.fda.gov/default.htm">Home</a> &gt; <a href="http://www.fda.gov/MedicalDevices/default.htm">Medical Devices</a> &gt; <a href="http://www.fda.gov/MedicalDevices/ProductsandMedicalProcedures/default.htm">Products and Medical Procedures</a> &gt; <a href="http://www.fda.gov/MedicalDevices/ProductsandMedicalProcedures/SurgeryandLifeSupport/default.htm">Surgery and Life Support Devices</a> :&nbsp; <a href="http://www.fda.gov/medicaldevices/productsandmedicalprocedures/surgeryandlifesupport/lasik/default.htm" target="_blank">here</a> ( excerpt from their site: Food and Drug Administration is&nbsp; an agency within the <a href="http://www.hhs.gov">Department of Health and Human Services</a> and consists of centers and offices, which are listed in menu at left. The FDA is responsible for protecting the public health by assuring the safety, efficacy, and security of human and veterinary drugs, biological products, medical devices, our nation&rsquo;s food supply, cosmetics, products that emit radiation, and tobacco products.)</li>
</ul>
<p>Among others, FDA presents the main risk factors associated with this operation:</p>
<blockquote style="width: 90%;">
<ul>
<li><strong>Blepharitis.</strong> Inflammation of the eyelids with crusting of the eyelashes, that may increase the risk of infection or inflammation of the cornea after LASIK.</li>
<li><strong>Large pupils.</strong> Make sure this evaluation is done in a dark room. Although anyone may have large pupils, younger patients and patients on certain medications may be particularly prone to having large pupils under dim lighting conditions. This can cause symptoms such as glare, halos, starbursts, and ghost images (double vision) after surgery. In some patients these symptoms may be debilitating. For example, a patient may no longer be able to drive a car at night or in certain weather conditions, such as fog.</li>
</ul>
<ul>
<li><strong>Thin Corneas.</strong> The cornea is the thin clear covering of the eye that is over the iris, the colored part of the eye. Most refractive procedures change the eye&rsquo;s focusing power by reshaping the cornea (for example, by removing tissue).&nbsp; Performing a refractive procedure on a cornea that is too thin may result in blinding complications.</li>
</ul>
<ul>
<li><strong>Previous refractive surgery (e.g., RK, PRK, LASIK).&nbsp; </strong>Additional refractive surgery may not be recommended.&nbsp; The decision to have additional refractive surgery must be made in consultation with your doctor after careful consideration of your unique situation.</li>
</ul>
<ul>
<li><strong>Dry Eyes.</strong> LASIK surgery tends to aggravate this condition.</li>
</ul>
</blockquote>
<p>Because during the research I also looked for centers, I found out that in Istanbul there is a clinic named <a href="http://www.eyestar.us/eyestarus/eng/" target="_blank">EyeStar</a> or its <a href="http://www.eyestar.ro/" target="_blank">Romanian version</a>&nbsp; who uses the latest lasers(<a href="http://www.eyestar.us/eyestarus/eng/the_technology.htm" target="_blank">Wavelight Allgretto 400 hz eye- Q</a>) and technologies to improve vision:</p>
<blockquote>
<p>Our laser, the Wavelight Allegretto Wave Eye-Q 500Hz/400Hz. is the newest, fastest, and most advanced FDA-approved eye laser platform on the market. It is reputed for the most precise outcomes, and the highest level of safety and patient comfort.</p>
</blockquote>
<p>Another argument pro was that a former colleague ,with whom&nbsp; I&rsquo;ve worked in Alensa, had the same LASIK for myopia in this clinic and she was very happy about her choice. Also I liked very much their care for their clients: lifetime warranty for the operation, included transportation to and from the clinic, help in your native language (native English, German, Bulgarian, Japanese, French, Italian, Romanian, Russian, Turkish, Spanish).</p>
<p>Next, I&rsquo;ll present to you the <a href="http://www.radupoenaru.com/discussions-with-eyestar-patient-coordinators/">Discussions with Patient coordinators</a>.</p>
<p>Post from: <a href="http://www.radupoenaru.com">Radu Poenaru's Weblog</a><br/><br/><a href="http://www.radupoenaru.com/research-on-lasik/">Research on LASIK</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.radupoenaru.com/research-on-lasik/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to generate image_src for Facebook links in WordPress theme</title>
		<link>http://www.radupoenaru.com/how-to-generate-image_src-for-facebook-links-in-wordpress-theme/</link>
		<comments>http://www.radupoenaru.com/how-to-generate-image_src-for-facebook-links-in-wordpress-theme/#comments</comments>
		<pubDate>Thu, 18 Feb 2010 19:56:12 +0000</pubDate>
		<dc:creator>Radu Poenaru</dc:creator>
				<category><![CDATA[Others]]></category>
		<category><![CDATA[Facebook]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://www.radupoenaru.com/?p=1203</guid>
		<description><![CDATA[In this article I present a script that sets the first image in a post as default image for sharing links in Facebook.<p>Post from: <a href="http://www.radupoenaru.com">Radu Poenaru's Weblog</a><br/><br/><a href="http://www.radupoenaru.com/how-to-generate-image_src-for-facebook-links-in-wordpress-theme/">How to generate image_src for Facebook links in WordPress theme</a></p>
]]></description>
			<content:encoded><![CDATA[<p><img style="border-right-width: 0px; margin: 10px 20px 0px 10px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Generate WordPress article to be attached when using Facebook links: image_src tag" border="0" alt="Generate WordPress article to be attached when using Facebook links: image_src tag" align="left" src="http://www.radupoenaru.com/wp-content/uploads/2010/02/facebook2.png" width="124" height="155" />Sharing your article for free advertisement on Facebook is a fact. While using different Social Networks sharing tools I had a problem when sharing my articles on Facebook: sometimes the image that I intended to use to represent the article wouldn’t show in the list of the images who can be chosen. Why is that?</p>
<p>It bothered me some while I got the some free time to actually look into this, between <a href="http://www.radupoenaru.com/media-informatics-master/" target="_blank">exams</a>, <a href="http://www.radupoenaru.com/category/my-work/fit/" target="_blank">work</a> and <a href="http://www.radupoenaru.com/how-to-make-a-print-screen-on-microsoft-source-using-wpf/" target="_blank">master research</a>. After some wandering on the internet, I found <a href="http://wiki.developers.facebook.com/index.php/Facebook_Share/Specifying_Meta_Tags" rel="nofollow" target="_blank">here</a> the correct directions. What I learnt:<strong> <font color="#ff0000">Always search for the API! </font></strong></p>
<p>&#160;</p>
<blockquote style="width: 100%"><p>In order to make sure that the preview is always correctly populated, you should add the tags shown below to the &lt;head&gt; element in your HTML code. If you don&#8217;t tag your page, Facebook Share will grab the title of your page as specified in the &lt;title&gt; tag, and will create a summary description from the first text that appears in the body of your page. A list of thumbnails will all be selected from available images on your page. </p>
<p>You can control the exact title, description, and thumbnail that Facebook Share uses by adding the following meta tags to the &lt;head&gt; element in your page: </p>
<p>&lt;meta name=&quot;title&quot; content=&quot;title&quot; /&gt; &lt;meta name=&quot;description&quot; content=&quot;description &quot; /&gt; &lt;link rel=&quot;image_src&quot; href=&quot;thumbnail_image&quot; / &gt;</p>
</blockquote>
<p> <span id="more-1203"></span>
<p>Also, beware of this fact:</p>
<blockquote style="width: 100%"><p>The thumbnail_image is the URL to the image that appears in the Feed story. The thumbnail&#8217;s width or height must be at least 50 pixels, and cannot exceed 130&#215;110 pixels. The ratio of both height divided by width and width divided by height (w / h, h / w)<strong> cannot exceed 3.0</strong>. For example,<strong> an image of 126&#215;39 pixels will not be displayed</strong>, as the ratio of width divided by height is greater than 3.0 (126 / 39 = 3.23). Images will be resized proportionally. </p>
</blockquote>
<p>OK. so these are the Facebook requirements. How can we implement them?</p>
<p>So let’s get into some code.</p>
<p>First, I tried to modify the theme – adding the following code to the header.php file:</p>
<pre class="brush: php">$id =$post-&gt;ID;
$the_content =$wpdb-&gt;get_var(&quot;SELECT post_content FROM $wpdb-&gt;posts WHERE ID = $id&quot;);
$pattern = '!&lt;img.*?src=&quot;(.*?)&quot;!';
preg_match_all($pattern, $the_content, $matches);
echo '&lt;link $image_src=&quot;$matches['1'][0];&quot; $matches); $the_content, preg_match_all($pattern, /&gt;';</pre>
<p>While it is workable, from performace point of view isn&#8217;t very nice because you try to read at ANY page refresh the post and show the image. But what if you&#8217;re on the first page with lots of posts? Or in archive? The code that I settled in the final was placed in functions.php file in my current theme. It allows me to use triggers that output to the head of the page the desired content and also to do this only when a single post page is requested. The code is: </p>
<pre class="brush: php">function add_image_src(){

  global $post;
	// get the global variable post
  // if it exists and is only a single post
  if ($post){

    // pattern for recognizing first image in post
    $pattern = '!&lt;img.*?src=&quot;(.*?)&quot;!';
    preg_match_all($pattern, $post-&gt;post_content, $matches);

    //first image would be the representative image
    $image_src = $matches['1'][0];
    // extract it as Facebook wants it
    echo '&lt;link rel=&quot;image_src&quot; href=&quot;', $image_src,'&quot; /&gt;';
  }
}

// hooking to the head generation loop my function defined above
add_action('wp_head', 'add_image_src');</pre>
<p>Post from: <a href="http://www.radupoenaru.com">Radu Poenaru's Weblog</a><br/><br/><a href="http://www.radupoenaru.com/how-to-generate-image_src-for-facebook-links-in-wordpress-theme/">How to generate image_src for Facebook links in WordPress theme</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.radupoenaru.com/how-to-generate-image_src-for-facebook-links-in-wordpress-theme/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Technorati checks my blog</title>
		<link>http://www.radupoenaru.com/technorati-checks-my-blog/</link>
		<comments>http://www.radupoenaru.com/technorati-checks-my-blog/#comments</comments>
		<pubDate>Wed, 25 Nov 2009 07:36:44 +0000</pubDate>
		<dc:creator>Radu Poenaru</dc:creator>
				<category><![CDATA[Others]]></category>

		<guid isPermaLink="false">http://www.radupoenaru.com/technorati-checks-my-blog/</guid>
		<description><![CDATA[So I applied for Technorati enrollment and they gave me the KNQ3S98TZ58S token for verification. I have to just create a new blog entry and publish in it to verify my domain claim. That’s the price to get into their area. Enjoy! Post from: Radu Poenaru's WeblogTechnorati checks my blog<p>Post from: <a href="http://www.radupoenaru.com">Radu Poenaru's Weblog</a><br/><br/><a href="http://www.radupoenaru.com/technorati-checks-my-blog/">Technorati checks my blog</a></p>
]]></description>
			<content:encoded><![CDATA[<p>So I applied for Technorati enrollment and they gave me the KNQ3S98TZ58S token for verification. I have to just create a new blog entry and publish in it to verify my domain claim. That’s the price to get into their area.</p>
<p>Enjoy!</p>
<p>Post from: <a href="http://www.radupoenaru.com">Radu Poenaru's Weblog</a><br/><br/><a href="http://www.radupoenaru.com/technorati-checks-my-blog/">Technorati checks my blog</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.radupoenaru.com/technorati-checks-my-blog/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to add a nice jQuery slider</title>
		<link>http://www.radupoenaru.com/how-to-add-a-nice-jquery-slider/</link>
		<comments>http://www.radupoenaru.com/how-to-add-a-nice-jquery-slider/#comments</comments>
		<pubDate>Sun, 15 Nov 2009 17:30:06 +0000</pubDate>
		<dc:creator>Radu Poenaru</dc:creator>
				<category><![CDATA[Others]]></category>
		<category><![CDATA[BNR]]></category>
		<category><![CDATA[BNR exchange rate]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://www.radupoenaru.com/?p=961</guid>
		<description><![CDATA[This weekend fun was adding to my website the cool sliding control from Jérémie Tisseau website. As pretty it was, I immediately started thinking it as a container to my BNR exchange rate page. The coding worked well, with just few modifications.<p>Post from: <a href="http://www.radupoenaru.com">Radu Poenaru's Weblog</a><br/><br/><a href="http://www.radupoenaru.com/how-to-add-a-nice-jquery-slider/">How to add a nice jQuery slider</a></p>
]]></description>
			<content:encoded><![CDATA[<p><img style="border-right-width: 0px; margin: 10px 20px 10px 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="WordPress- How to add a nice jQuery slider" border="0" alt="WordPress- How to add a nice jQuery slider" align="left" src="http://www.radupoenaru.com/wp-content/uploads/2009/09/wordpress1.jpg" width="200" height="200" />&#160;</p>
<p>This weekend fun was adding to my website the cool sliding control from <a href="http://web-kreation.com/index.php/tutorials/nice-clean-sliding-login-panel-built-with-jquery/" target="_blank">Jérémie Tisseau website</a>. That pretty it was, I immediately started thinking it as a container to my <a href="http://www.radupoenaru.com/bnr-exchange-rate/">BNR exchange rate</a> page. The coded worked perfectly, with few modifications.</p>
<p><strong>Firstly</strong>, WordPress uses the $ operator for Prototype library, so if you want to add your jQuery library the invocation to WordPress Firebug will report the error “$ is not a function”. So here’s the fix: you’ll have to change any occurrence of the $ sign to jQuery. Just like in the following example:</p>
<p>&#160;</p>
<p>&#160;</p>
<pre class="brush: js">$(document).ready(function() {

	// Expand Panel
	$(&quot;#open&quot;).click(function(){
		$(&quot;div#panel&quot;).slideDown(&quot;slow&quot;);

	});	

	// Collapse Panel
	$(&quot;#close&quot;).click(function(){
		$(&quot;div#panel&quot;).slideUp(&quot;slow&quot;);
	});		

	// Switch buttons from &quot;Log In | Register&quot; to &quot;Close Panel&quot; on click
	$(&quot;#toggle a&quot;).click(function () {
		$(&quot;#toggle a&quot;).toggle();
	});		

});</pre>
<p>TO:</p>
<pre class="brush: js">jQuery(document).ready(function() {

	// Expand Panel
	jQuery(&quot;#open&quot;).click(function(){
		jQuery(&quot;div#panel&quot;).slideDown(&quot;slow&quot;);

	});	

	// Collapse Panel
	jQuery(&quot;#close&quot;).click(function(){
		jQuery(&quot;div#panel&quot;).slideUp(&quot;slow&quot;);
	});		

	// Switch buttons from &quot;Log In | Register&quot; to &quot;Close Panel&quot; on click
	jQuery(&quot;#toggle a&quot;).click(function () {
		jQuery(&quot;#toggle a&quot;).toggle();
	});		

});</pre>
</p>
<p><span id="more-961"></span></p>
<p>Secondly, you’ll have to add the scripts to your current theme path (all except jquery from js and all css files except style.css from styles directory), and their declaration in the header.php file:</p>
<pre class="brush: php">....

&lt;!-- Sliding effect --&gt;

&lt;!-- PNG FIX for IE6 --&gt;
&lt;!-- http://24ways.org/2007/supersleight-transparent-png-in-ie6 --&gt;

&lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;&lt;?php echo get_bloginfo('template_url') ?&gt;/slide.css&quot; media=&quot;screen&quot; /&gt;
&lt;script type=&quot;text/javascript&quot; src=&quot;&lt;?php echo get_bloginfo('template_url') ?&gt;/js/slide.js&quot;&gt;&lt;/script&gt;
&lt;!-- end Sliding effect --&gt;

&lt;?php wp_head(); ?&gt;</pre>
<p>Thirdly, you’ll have to&#160; add the code of the actual HTML elements to your webpage:</p>
<pre class="brush:html">&lt;!-- Panel --&gt;
&lt;div id=&quot;toppanel&quot;&gt;
  &lt;div id=&quot;panel&quot;&gt;
    &lt;div class=&quot;content clearfix&quot;&gt;
      &lt;div class=&quot;left&quot;&gt;
        &lt;h1&gt;Welcome to Web-Kreation&lt;/h1&gt;
        &lt;h2&gt;Sliding login panel Demo with jQuery&lt;/h2&gt;
        &lt;p class=&quot;grey&quot;&gt;You can put anything you want in this sliding panel: videos, audio, images, forms... The only limit is your imagination!&lt;/p&gt;
        &lt;h2&gt;Download&lt;/h2&gt;
        &lt;p class=&quot;grey&quot;&gt;To download this script go back to &lt;a href=&quot;http://web-kreation.com/index.php/tutorials/nice-clean-sliding-login-panel-built-with-jquery&quot; title=&quot;Download&quot;&gt;article »&lt;/a&gt;&lt;/p&gt;
      &lt;/div&gt;
      &lt;div class=&quot;left&quot;&gt;
        &lt;!-- Login Form --&gt;
        &lt;form class=&quot;clearfix&quot; action=&quot;#&quot; method=&quot;post&quot;&gt;
          &lt;h1&gt;Member Login&lt;/h1&gt;
          &lt;label class=&quot;grey&quot; for=&quot;log&quot;&gt;Username:&lt;/label&gt;
          &lt;input class=&quot;field&quot; type=&quot;text&quot; name=&quot;log&quot; id=&quot;log&quot; value=&quot;&quot; size=&quot;23&quot; /&gt;
          &lt;label class=&quot;grey&quot; for=&quot;pwd&quot;&gt;Password:&lt;/label&gt;
          &lt;input class=&quot;field&quot; type=&quot;password&quot; name=&quot;pwd&quot; id=&quot;pwd&quot; size=&quot;23&quot; /&gt;
                &lt;label&gt;&lt;input name=&quot;rememberme&quot; id=&quot;rememberme&quot; type=&quot;checkbox&quot; checked=&quot;checked&quot; value=&quot;forever&quot; /&gt;&#160; Remember me&lt;/label&gt;
              &lt;div class=&quot;clear&quot;&gt;&lt;/div&gt;
          &lt;input type=&quot;submit&quot; name=&quot;submit&quot; value=&quot;Login&quot; class=&quot;bt_login&quot; /&gt;
          &lt;a class=&quot;lost-pwd&quot; href=&quot;#&quot;&gt;Lost your password?&lt;/a&gt;
        &lt;/form&gt;
      &lt;/div&gt;
      &lt;div class=&quot;left right&quot;&gt;
        &lt;!-- Register Form --&gt;
        &lt;form action=&quot;#&quot; method=&quot;post&quot;&gt;
          &lt;h1&gt;Not a member yet? Sign Up!&lt;/h1&gt;
          &lt;label class=&quot;grey&quot; for=&quot;signup&quot;&gt;Username:&lt;/label&gt;
          &lt;input class=&quot;field&quot; type=&quot;text&quot; name=&quot;signup&quot; id=&quot;signup&quot; value=&quot;&quot; size=&quot;23&quot; /&gt;
          &lt;label class=&quot;grey&quot; for=&quot;email&quot;&gt;Email:&lt;/label&gt;
          &lt;input class=&quot;field&quot; type=&quot;text&quot; name=&quot;email&quot; id=&quot;email&quot; size=&quot;23&quot; /&gt;
          &lt;label&gt;A password will be e-mailed to you.&lt;/label&gt;
          &lt;input type=&quot;submit&quot; name=&quot;submit&quot; value=&quot;Register&quot; class=&quot;bt_register&quot; /&gt;
        &lt;/form&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt; &lt;!-- /login --&gt;  

    &lt;!-- The tab on top --&gt;
  &lt;div class=&quot;tab&quot;&gt;
    &lt;ul class=&quot;login&quot;&gt;
        &lt;li class=&quot;left&quot;&gt; &lt;/li&gt;
          &lt;li&gt;Hello Guest!&lt;/li&gt;
      &lt;li class=&quot;sep&quot;&gt;|&lt;/li&gt;
      &lt;li id=&quot;toggle&quot;&gt;
        &lt;a id=&quot;open&quot; class=&quot;open&quot; href=&quot;#&quot;&gt;Log In | Register&lt;/a&gt;
        &lt;a id=&quot;close&quot; style=&quot;display: none;&quot; class=&quot;close&quot; href=&quot;#&quot;&gt;Close Panel&lt;/a&gt;
      &lt;/li&gt;
        &lt;li class=&quot;right&quot;&gt; &lt;/li&gt;
    &lt;/ul&gt;
  &lt;/div&gt; &lt;!-- / top --&gt;

&lt;/div&gt; &lt;!--panel --&gt;</pre>
<p>Post from: <a href="http://www.radupoenaru.com">Radu Poenaru's Weblog</a><br/><br/><a href="http://www.radupoenaru.com/how-to-add-a-nice-jquery-slider/">How to add a nice jQuery slider</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.radupoenaru.com/how-to-add-a-nice-jquery-slider/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>How to add a Webslice</title>
		<link>http://www.radupoenaru.com/how-to-add-a-webslice/</link>
		<comments>http://www.radupoenaru.com/how-to-add-a-webslice/#comments</comments>
		<pubDate>Tue, 15 Sep 2009 16:41:00 +0000</pubDate>
		<dc:creator>Radu Poenaru</dc:creator>
				<category><![CDATA[Others]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[website]]></category>
		<category><![CDATA[Webslice]]></category>

		<guid isPermaLink="false">http://www.radupoenaru.com/how-to-add-a-webslice/</guid>
		<description><![CDATA[It is very nice and user-friendly to have Webslices on your website. It improves the user experience by allowing visitors to be up to date with the latest content that you provide, assuming that it is fitted to this presentation style<p>Post from: <a href="http://www.radupoenaru.com">Radu Poenaru's Weblog</a><br/><br/><a href="http://www.radupoenaru.com/how-to-add-a-webslice/">How to add a Webslice</a></p>
]]></description>
			<content:encoded><![CDATA[<div id="BNRExchange" class="hslice">
<div style="display: none" class="entry-title"><img id="image" alt="Radu Poenaru&#39;s weblog gives you BNR Exchange rates" src="http://www.radupoenaru.com/bnr/images/radupoenaru.jpg" width="128" height="128" />
<p>Cursul oficial BNR </p>
</p></div>
<p> <!--close entry-title -->
<p><a style="display: none" href="http://www.radupoenaru.com/bnr/bnr.php" rel="entry-content"></a><a style="display: none" href="http://www.radupoenaru.com/bnr/bnr.php" rel="Bookmark" target="_blank"></a><span style="display: none" class="ttl">5</span> </p>
<div id="updateTrigger" class="entry-content" runat="server"></div>
<p>   <a class="cboxelement" title="How to add a Webslice - Microsoft technology to enable subscribing to content" href="http://www.radupoenaru.com/wp-content/uploads/2009/09/96x96.png" rel="lightbox[935]"><img style="border-right-width: 0px; margin: 25px 25px 10px 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="How to add a Webslice - Microsoft technology to enable subscribing to content" border="0" alt="How to add a Webslice - Microsoft technology to enable subscribing to content" align="left" src="http://www.radupoenaru.com/wp-content/uploads/2009/09/96x96_thumb.png" width="96" height="96" /> </a>
<p>It is very nice and user-friendly to have <a href="http://www.radupoenaru.com/how-to-add-a-webslice/">Webslices</a> on your website. It improves the user experience by allowing visitors to be up to date with the latest content that you provide, assuming that it is fitted to this presentation style. Since my <a href="http://www.radupoenaru.com/bnr-exchange-rate/">BNR exchange rates page</a> was this kind, I pursued in <a href="http://www.radupoenaru.com/add-webslice-to-your-website/">adding a Webslice</a> especially for it.</p>
<p><a href="http://www.radupoenaru.com/how-to-add-a-webslice/">Adding a webslice</a> to your website is simple. After you read the <a href="http://msdn.microsoft.com/en-us/library/cc956167%28VS.85%29.aspx">main specifications</a> or <a href="http://www.radupoenaru.com/add-webslice-to-your-website/">my previous article</a>, you’ll understand the concept behind: first you signal to the browser that you have a special part of your website by setting to a container element the class “hslice”:</p>
<pre class="brush: xml">&lt;div id=&quot;BNRExchange&quot; class=&quot;hslice&quot;&gt;
  &lt;div style=&quot;display: none&quot; class=&quot;entry-title&quot;&gt;
    &lt;img id=&quot;image&quot; alt=&quot;Radu Poenaru's weblog gives you BNR Exchange rates&quot; src=&quot;http://www.radupoenaru.com/bnr/images/radupoenaru.jpg&quot; width=&quot;128&quot; height=&quot;128&quot; /&gt;
    &lt;p&gt;
       Cursul oficial BNR
    &lt;/p&gt;
  &lt;/div&gt;
  &lt;p&gt;
    &lt;a style=&quot;display: none&quot; href=&quot;http://www.radupoenaru.com/bnr/bnr.php&quot; rel=&quot;entry-content&quot;&gt;
    &lt;a style=&quot;display: none&quot; href=&quot;http://www.radupoenaru.com/bnr/bnr.php&quot; rel=&quot;Bookmark&quot; target=&quot;_blank&quot;&gt;
    &lt;span style=&quot;display: none&quot; class=&quot;ttl&quot;&gt;5&lt;/span&gt;
  &lt;/p&gt;
  &lt;div id=&quot;updateTrigger&quot; class=&quot;entry-content&quot; runat=&quot;server&quot; /&gt;
........ your content that you want surrounded by the green webslice part ..............
&lt;/div&gt;</pre>
</div>
<p><span id="more-936"></span></p>
<p>The id of the container must be the same for all the container who contain the same information – as in my case, the graph of the exchange rates must have the same Id on every page. </p>
<p>Very important to add is the link to the actual page who will generate the content, in my case a php file. Thus, you’re not obliged to use Microsoft’s languages, like C# or VB, but you can use anything – from plain HTML, JavaScript, PHP, Ruby on Rails – just to mention few.</p>
<p>Then you have to specific the refresh period of the page by using the ttl class, set at 5 minutes intervals in my case. </p>
<p>Another very interesting thing on this technology is that you can surround content with it, making clear to the user what he will use if he wants that Webslice’s content.</p>
<p>Post from: <a href="http://www.radupoenaru.com">Radu Poenaru's Weblog</a><br/><br/><a href="http://www.radupoenaru.com/how-to-add-a-webslice/">How to add a Webslice</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.radupoenaru.com/how-to-add-a-webslice/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>WordPress &#8211; Database backup and restore</title>
		<link>http://www.radupoenaru.com/wordpress-database-backup-and-restore/</link>
		<comments>http://www.radupoenaru.com/wordpress-database-backup-and-restore/#comments</comments>
		<pubDate>Sun, 13 Sep 2009 11:34:47 +0000</pubDate>
		<dc:creator>Radu Poenaru</dc:creator>
				<category><![CDATA[Others]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://www.radupoenaru.com/wordpress-database-backup-and-restore/</guid>
		<description><![CDATA[How to backup and restore your Wordpress' MySQL database in no time. From time to time, you’ll need to get a backup of your MySQL database and install it on a different machine.<p>Post from: <a href="http://www.radupoenaru.com">Radu Poenaru's Weblog</a><br/><br/><a href="http://www.radupoenaru.com/wordpress-database-backup-and-restore/">WordPress &ndash; Database backup and restore</a></p>
]]></description>
			<content:encoded><![CDATA[<p><img style="border-right-width: 0px; margin: 10px 20px 10px 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="WordPress- MySQL Database backup and restore" border="0" alt="WordPress- MySQL Database backup and restore" align="left" src="http://www.radupoenaru.com/wp-content/uploads/2009/09/wordpress1.jpg" width="200" height="200" />
<p>From time to time, you’ll need to get a <a href="http://www.radupoenaru.com/wordpress-database-backup-and-restore/">backup of your MySQL database and install</a> it on a different machine – as I needed when reinstalling my Windows 7. I wanted to do something simple, as the last time. But now the database sql file is 11 Mb as opposed to merely 2 MB last time.</p>
<p>But I thought that this would be a breeze for the <a href="http://www.radupoenaru.com/wordpress-database-backup-and-restore/">MySQL</a> interface that I use and enjoy – <a href="http://www.heidisql.com/?">HeidiSQL</a>. It’s free, easy to use and user friendly. I personally don’t like too much the phpMyAdmin interface from the <a href="http://vertrigo.sourceforge.net/">Vertrigo webserver</a> installation that I use for local development.</p>
<p> <span id="more-932"></span>
<p>After starting the import, I was happy – the HeidiSQL app runned so fast for the first 5000 statements … but wait! Starting with the 7000, it became very slow – probably no memory flush for queries ?</p>
<p>After waiting an hour and half, it got to around 7500 statements. Eager to start, I looked for a faster solution – the command line for importing large files. You’ll find out that in MySQL bin folder there is the core of the server : mysql.exe. You can call it with parameters, instructing it what to do.</p>
<p>After reading some help, I realised that what I looked for was :</p>
<pre class="brush: sql">mysql -u username -p database_name &lt; textfilewithsqlstatments.sql</pre>
<p>So you’ll have to provide the username for connecting to database – be careful to have enough rights to create tables, insert records and so on. Next, the database in which you want to import the content of the textfilewithsqlstatements. For Linux users, be careful to also check for any case sensitive issues that might appear.</p>
<p><strong>Also be very careful with the less than sign. Less than means import, while greater than means export!</strong></p>
<p>After pressing return key, you’ll be prompted for the password associated with the username provided. Then the import will start and everything is imported in <a href="http://www.radupoenaru.com/wordpress-database-backup-and-restore/">MySQL</a>, assuming that you didn’t misspelled or did some errors, case in which you might want to read again this post.</p>
<p>Enjoy!</p>
<p>Post from: <a href="http://www.radupoenaru.com">Radu Poenaru's Weblog</a><br/><br/><a href="http://www.radupoenaru.com/wordpress-database-backup-and-restore/">WordPress &ndash; Database backup and restore</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.radupoenaru.com/wordpress-database-backup-and-restore/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Add Webslice to your website</title>
		<link>http://www.radupoenaru.com/add-webslice-to-your-website/</link>
		<comments>http://www.radupoenaru.com/add-webslice-to-your-website/#comments</comments>
		<pubDate>Fri, 11 Sep 2009 17:25:00 +0000</pubDate>
		<dc:creator>Radu Poenaru</dc:creator>
				<category><![CDATA[Others]]></category>
		<category><![CDATA[Firefox 3]]></category>
		<category><![CDATA[Internet Explorer 8]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[Webslice]]></category>

		<guid isPermaLink="false">http://www.radupoenaru.com/how-to-add-a-webslice-to-your-website/</guid>
		<description><![CDATA[Webslice is a chunk of information, allowing you to stay up-to-date with the latest news without actually needing open a website. For example, my website provides a webslice for BNR exchange rates, allowing you to keep up with latest information available.<p>Post from: <a href="http://www.radupoenaru.com">Radu Poenaru's Weblog</a><br/><br/><a href="http://www.radupoenaru.com/add-webslice-to-your-website/">Add Webslice to your website</a></p>
]]></description>
			<content:encoded><![CDATA[<div id="BNRExchange" class="hslice">
<div style="display: none;" class="entry-title">     <img width="128" height="128" alt="Radu Poenaru's weblog gives you BNR Exchange rates" id="image" src="http://www.radupoenaru.com/bnr/images/radupoenaru.jpg" />
<p>        Cursul oficial BNR      </p>
</p></div>
<p>   <!--close entry-title -->
<p>     <a style="display: none;" rel="entry-content" href="http://www.radupoenaru.com/bnr/bnr.php">     </a>     <a target="_blank" style="display: none;" rel="Bookmark" href="http://www.radupoenaru.com/bnr/bnr.php">     </a>     <span style="display: none;" class="ttl">5</span>   </p>
<div id="updateTrigger" runat="server" class="entry-content">   </div>
<p>     <a href="http://www.radupoenaru.com/wp-content/uploads/2009/09/96x96.png">       <img style="border-right-width: 0px; margin: 25px 25px 10px 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Webslice - Microsoft technology to enable subscribing to content" border="0" alt="Webslice - Microsoft technology to enable subscribing to content" align="left" src="http://www.radupoenaru.com/wp-content/uploads/2009/09/96x96_thumb.png" width="96" height="96" />     </a>      You might ask: what is a Webslice? It is a chunk of information, allowing you to stay      <a href="http://www.radupoenaru.com/add-webslice-to-your-website/">       up-to-date     </a>      with the latest news without actually needing open a website. They are added to special toolbars (special because they usually require a specific version of a browser, like IE 8). But otherwise, the content inside itâ??s just plain old HTML. When a WebSlice is added to the toolbar, it will be represented as a clickable drop-down area, allowing you to click on it and then see a specially designed small-scale version of the website. For example, my website provides a webslice for      <a href="http://www.radupoenaru.com/bnr-exchange-rate/">       BNR exchange rates     </a>     , allowing you to keep up with latest information available.   </p>
<p>     Usually, while hovering to an area webslice-enabled, the browser will show a specific icon â?? developed by Microsoft and symbolizing this technology. There are few design guidelines that you need to follow, quoted from      <a href="http://msdn.microsoft.com/en-us/library/cc895600%28VS.85%29.aspx">       Microsoft website     </a>     :   </p>
</p></div>
<p> <span id="more-935"></span>
<ul>
<li>     The icon must be used in its entirety as shown in these guidelines.    </li>
<li>     The icon must appear by itself with minimum spacing (25% the height of the icon) between each side of the icon and any other graphical or textual elements.    </li>
<li>     The (green) color version of the icon is recommended. If the color version is not practicable, you may use a black &amp; white version of the icon.    </li>
<li>     The icon may not be distorted, warped, or displayed in any aspect ratio except the 1:1 ratio.    </li>
<li>     Do not flip or rotate the icon.    </li>
<li>     Do not use the icon as a repeating pattern or background element.    </li>
<li>     The icon must be represented at 100% opacity.    </li>
</ul>
<p>   Today, it is unimaginable that a Web site not to provide content updates through Really Simple Syndication (RSS) news feeds. This feature, that became quite obsolete yet omnipresent, requires a Web site to duplicate some content as a special XML file in a certain standardized format, called a feed. To this feed a news reader application can attach, download and check for updates. Opposite to this, a Web Slice enables users, in my case, to    <a href="http://www.radupoenaru.com/add-webslice-to-your-website/">     subscribe to exchange rates directly within a Web page   </a>   . Thus, a separate feed file is not required. This way, users can monitor the content changes and view only the important, the updated part of the Web page on which they are interested on directly from the    <strong>     Favorites   </strong>    bar (the improved    <strong>     Links   </strong>    toolbar) of Windows Internet Explorer 8.  </p>
<p>   The draw back is that Firefox doesnâ??t know by itself to read these Webslice, thus it requires a plug-in to do this. </p>
<p>Post from: <a href="http://www.radupoenaru.com">Radu Poenaru's Weblog</a><br/><br/><a href="http://www.radupoenaru.com/add-webslice-to-your-website/">Add Webslice to your website</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.radupoenaru.com/add-webslice-to-your-website/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>WordPress &#8211; How to Delete Existing Post Revisions</title>
		<link>http://www.radupoenaru.com/wordpress-how-to-delete-existing-post-revisions/</link>
		<comments>http://www.radupoenaru.com/wordpress-how-to-delete-existing-post-revisions/#comments</comments>
		<pubDate>Wed, 09 Sep 2009 10:24:00 +0000</pubDate>
		<dc:creator>Radu Poenaru</dc:creator>
				<category><![CDATA[Others]]></category>
		<category><![CDATA[Revision]]></category>
		<category><![CDATA[Revision management]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://www.radupoenaru.com/wordpress-how-to-delete-existing-post-revisions/</guid>
		<description><![CDATA[This is the second part of managing WordPress feature of post revisions, for the&#160; users who had disabled or turned off post revisions tracking or versions history feature. As you already know, this feature exists in WordPress (starting with WordPress 2.6). After disable it (of course, if you really need to do that), it also<p>Post from: <a href="http://www.radupoenaru.com">Radu Poenaru's Weblog</a><br/><br/><a href="http://www.radupoenaru.com/wordpress-how-to-delete-existing-post-revisions/">WordPress &#8211; How to Delete Existing Post Revisions</a></p>
]]></description>
			<content:encoded><![CDATA[<p><img style="border-right-width: 0px; margin: 10px 20px 10px 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="WordPress- managing Post Revisions tracking" border="0" alt="WordPress- managing Post Revisions tracking" align="left" src="http://www.radupoenaru.com/wp-content/uploads/2009/09/wordpress1.jpg" width="200" height="200" />
<p>This is the second part of managing WordPress feature of post revisions, for the&#160; <a href="http://www.radupoenaru.com/wordpress-how-to-delete-existing-post-revisions/#">users</a> who had <a href="http://www.radupoenaru.com/wordpress-managing-post-revisions-tracking/">disabled or turned off post revisions tracking or versions history feature</a>. As you already know, this feature exists in WordPress (starting with <a href="http://www.radupoenaru.com/wordpress-managing-post-revisions-tracking/#">WordPress 2.6</a>). After disable it (of course, if you really need to do that), it also make sense to also delete and remove all existing stored post revisions. By doing so, you’ll remove changes made on pages stored in the <a href="http://www.radupoenaru.com/wordpress-how-to-delete-existing-post-revisions/#">database</a> such that you’ll slim down the wp_posts table size´. This is&#160; especially recommended when there is already lots of revisions or changes inside.</p>
<p> <span id="more-931"></span>
<p>For this process , you will get your hands dirty in some SQL statements. For doing that, you’ll need to delete and remove all existing post <strong>revisions</strong> (not all posts!)entries from WordPress database Posts table. We’ll start simply, by logging into <a href="http://www.radupoenaru.com/wordpress-how-to-delete-existing-post-revisions/#">MySQL</a> command-line interface, <a href="http://www.mydigitallife.info/2005/10/19/using-phpmyadmin-for-effective-mysql-management-in-windows-xp/">phpMyAdmin</a>, SQLyog or other MySQL GUI tool. Next, select the respective WordPress database (just in case that you have on the same <a href="http://www.radupoenaru.com/wordpress-how-to-delete-existing-post-revisions/#">server</a> more than one database). </p>
<p>First time when I looked into this matter, a simple sql statement like the one below will do the trick. </p>
<pre class="brush:sql">DELETE FROM wp_posts WHERE post_type = &quot;revision&quot;;</pre>
<p>But hey, there are other information associated with this table, how I later found out, stored in other tables, eating space also in other areas of database.</p>
<p>Then I found out that all you have to do is to issue the next command (found on <a title="Delete WordPress 2.6 Revisions" href="http://blog.andreineculau.com/2008/07/delete-wordpress-26-revisions/">Andrei Neculau&#8217;s website</a> and modified a little by me for better visibility). But before is highly recommended&#160; to backup the database before performing the deletion SQL statements:</p>
<pre class="brush:sql">DELETE P,TR,PM
  FROM wp_posts P
    LEFT JOIN wp_term_relationships TR ON (P.ID = TR.object_id)
    LEFT JOIN wp_postmeta PM ON (P.ID = PM.post_id)
WHERE P.post_type = 'revision'</pre>
<p>After all post revisions are deleted, the users will no longer be able to verify the changes by phase or diff between versions. Thus, this process can be used also by an admin in order to ensure privacy or not letting authors or writers in the <a href="http://www.radupoenaru.com/wordpress-how-to-delete-existing-post-revisions/#">blog</a> knowing their posts have been edited.</p>
<p>Post from: <a href="http://www.radupoenaru.com">Radu Poenaru's Weblog</a><br/><br/><a href="http://www.radupoenaru.com/wordpress-how-to-delete-existing-post-revisions/">WordPress &#8211; How to Delete Existing Post Revisions</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.radupoenaru.com/wordpress-how-to-delete-existing-post-revisions/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
