<?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>blog.mogosanu.ro &#187; $var = &#8220;PHP/MySQL&#8221;</title>
	<atom:link href="http://blog.mogosanu.ro/category/var-php-mysql/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.mogosanu.ro</link>
	<description>the tutorial blog</description>
	<lastBuildDate>Sat, 03 Apr 2010 07:26:32 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Cod PHP scris corect</title>
		<link>http://blog.mogosanu.ro/general/cod-php-scris-corect/</link>
		<comments>http://blog.mogosanu.ro/general/cod-php-scris-corect/#comments</comments>
		<pubDate>Fri, 08 Jan 2010 10:50:16 +0000</pubDate>
		<dc:creator>bogdanmogo</dc:creator>
				<category><![CDATA[$var = "PHP/MySQL"]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[coding]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://blog.mogosanu.ro/?p=176</guid>
		<description><![CDATA[1. Adaugarea de comentarii la cod
Pentru o buna intelegere a scriptului trebuie adaugat un comentariu principal (care contine diverse informatii despre script) si comentarii la partile de cod unde este necesar.
Iata un sample dintr-un script din CodeIgniter:

/**
* CodeIgniter
*
* An open source application development framework for PHP 4.3.2 or newer
*
* @package      [...]]]></description>
			<content:encoded><![CDATA[<h2>1. Adaugarea de comentarii la cod</h2>
<p>Pentru o buna intelegere a scriptului trebuie adaugat un comentariu principal (care contine diverse informatii despre script) si comentarii la partile de cod unde este necesar.</p>
<p>Iata un sample dintr-un script din CodeIgniter:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #009933; font-style: italic;">/**
* CodeIgniter
*
* An open source application development framework for PHP 4.3.2 or newer
*
* @package         CodeIgniter
* @author          ExpressionEngine Dev Team
* @copyright       Copyright (c) 2006, EllisLab, Inc.
* @license         http://codeigniter.com/user_guide/license.html
* @link            http://codeigniter.com
* @since           Version 1.0
* @filesource
*/</span>
&nbsp;
<span style="color: #990000;">define</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'CI_VERSION'</span><span style="color: #339933;">,</span>    <span style="color: #0000ff;">'1.6.3'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">/*
* ------------------------------------------------------
*  Load the global functions
* ------------------------------------------------------
*/</span>
&nbsp;
<span style="color: #b1b100;">require</span><span style="color: #009900;">&#40;</span>BASEPATH<span style="color: #339933;">.</span><span style="color: #0000ff;">'codeigniter/Common'</span><span style="color: #339933;">.</span>EXT<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">/*
* ------------------------------------------------------
*    Is there a valid cache file?  If so, we're done...
* ------------------------------------------------------
*/</span>
&nbsp;
<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$EXT</span><span style="color: #339933;">-&gt;</span>_call_hook<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'cache_override'</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">===</span> <span style="color: #009900; font-weight: bold;">FALSE</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
    <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$OUT</span><span style="color: #339933;">-&gt;</span>_display_cache<span style="color: #009900;">&#40;</span><span style="color: #000088;">$CFG</span><span style="color: #339933;">,</span> <span style="color: #000088;">$URI</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">==</span> <span style="color: #009900; font-weight: bold;">TRUE</span><span style="color: #009900;">&#41;</span>
   <span style="color: #009900;">&#123;</span>
        <span style="color: #990000;">exit</span><span style="color: #339933;">;</span>
   <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">/*
* ------------------------------------------------------
*  Close the DB connection if one exists
* ------------------------------------------------------
*/</span>
<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #990000;">class_exists</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'CI_DB'</span><span style="color: #009900;">&#41;</span> AND <span style="color: #990000;">isset</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$CI</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">db</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
    <span style="color: #000088;">$CI</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">db</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">close</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>Un alt stil de a scrie codul este (desi unii spun ca aceasta varianta nu este corecta):</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$EXT</span><span style="color: #339933;">-&gt;</span>_call_hook<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'cache_override'</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">===</span> <span style="color: #009900; font-weight: bold;">FALSE</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$OUT</span><span style="color: #339933;">-&gt;</span>_display_cache<span style="color: #009900;">&#40;</span><span style="color: #000088;">$CFG</span><span style="color: #339933;">,</span> <span style="color: #000088;">$URI</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">==</span> <span style="color: #009900; font-weight: bold;">TRUE</span><span style="color: #009900;">&#41;</span>
         <span style="color: #990000;">exit</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #990000;">class_exists</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'CI_DB'</span><span style="color: #009900;">&#41;</span> AND <span style="color: #990000;">isset</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$CI</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">db</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #000088;">$CI</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">db</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">close</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<h2>2. Denumirea variabilelor si a functiilor</h2>
<p>O buna practica este denumirea variabilelor si a functiilor cu <em>underscore</em> intre cuvinte sau cuvintele sa inceapa cu litera mare (CamelCase). Nu este indicat ca variabilele sa aiba denumiri foarte lungi. De asemenea numele unei variabile sau a unei functii trebuie sa fie sugestiv.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">function</span> ShowTitle<span style="color: #009900;">&#40;</span> <span style="color: #000088;">$name</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #b1b100;">return</span> <span style="color: #990000;">strip_tags</span><span style="color: #009900;">&#40;</span> <span style="color: #000088;">$name</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>sau</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">function</span> show_title<span style="color: #009900;">&#40;</span> <span style="color: #000088;">$name</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #b1b100;">return</span> <span style="color: #990000;">strip_tags</span><span style="color: #009900;">&#40;</span> <span style="color: #000088;">$name</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>Asa nu:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$k</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;&quot;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// variabilele dintr-un singur caracter</span>
         <span style="color: #666666; font-style: italic;">//sunt folosite de obicei pentru loop-uri</span>
&nbsp;
<span style="color: #000088;">$variabilatitlu234</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;&quot;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// nu este sugestiv</span>
                     <span style="color: #666666; font-style: italic;">// nu sunt folosite underscores sau stilul CamelCase</span></pre></div></div>

<h2>3. Indentarea si gruparea codului</h2>
<p>Intotdeauna este necesara o indentare si o grupare corecta, pentru a distinge inceputul unei functii, a unui ciclu sau a altor pasi din script.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"> 	<span style="color: #000000; font-weight: bold;">var</span> <span style="color: #000088;">$zip_data</span> 	<span style="color: #339933;">=</span> <span style="color: #0000ff;">''</span><span style="color: #339933;">;</span>
	<span style="color: #000000; font-weight: bold;">var</span> <span style="color: #000088;">$directory</span> 	<span style="color: #339933;">=</span> <span style="color: #0000ff;">''</span><span style="color: #339933;">;</span>
 	<span style="color: #000000; font-weight: bold;">var</span> <span style="color: #000088;">$entries</span> 	<span style="color: #339933;">=</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span>
 	<span style="color: #000000; font-weight: bold;">var</span> <span style="color: #000088;">$file_num</span> 	<span style="color: #339933;">=</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span>
	<span style="color: #000000; font-weight: bold;">var</span> <span style="color: #000088;">$offset</span>	<span style="color: #339933;">=</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #000000; font-weight: bold;">function</span> CI_Zip<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		log_message<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'debug'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;Zip Compression Class Initialized&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span></pre></div></div>

<p>Desigur nu este indicat sa abuzam de tab-uri sau de linii goale. Nu facem decat sa incarcam scriptul cu blank-uri care cresc dimensiunea fisierului.</p>
<h2>4. Limitarea numarului de caractere de pe o linie</h2>
<p>De ce sa avem ecrane laterale, cand putem avea doar ecrane pe verticala? De exemplu: este mult mai usor de citit un query SQL care nu se intinde mult pe o singura linie.</p>
<h2>5. Capitalizarea sintaxei SQL</h2>
<p>Datorita faptului ca unele query-urile SQL sunt mai lungi, ne este greu sa gasim anumite elemente din query. Pentru a usura operatiunea de cautare este bine sa capitalizam cuvintele specifice limbajului SQL.</p>
<p>Asa nu:</p>

<div class="wp_syntax"><div class="code"><pre class="mysql" style="font-family:monospace;"><span style="color: #990099; font-weight: bold;">select</span> id<span style="color: #000033;">,</span> name<span style="color: #000033;">,</span> title<span style="color: #000033;">,</span> slug<span style="color: #000033;">,</span> author<span style="color: #000033;">,</span> category<span style="color: #000033;">,</span> views<span style="color: #000033;">,</span> <span style="color: #000099;">date_add</span><span style="color: #000033;">,</span> date_mod <span style="color: #990099; font-weight: bold;">from</span> news <span style="color: #990099; font-weight: bold;">where</span> category <span style="color: #CC0099;">=</span> <span style="color: #008080;">1</span> <span style="color: #990099; font-weight: bold;">order by</span> <span style="color: #000099;">date_add</span> <span style="color: #990099; font-weight: bold;">desc</span></pre></div></div>

<p>Iata varianta corecta:</p>

<div class="wp_syntax"><div class="code"><pre class="mysql" style="font-family:monospace;"><span style="color: #990099; font-weight: bold;">SELECT</span>  id<span style="color: #000033;">,</span> name<span style="color: #000033;">,</span> title<span style="color: #000033;">,</span> slug<span style="color: #000033;">,</span> author<span style="color: #000033;">,</span>
        category<span style="color: #000033;">,</span> views<span style="color: #000033;">,</span> <span style="color: #000099;">date_add</span><span style="color: #000033;">,</span> date_mod
    <span style="color: #990099; font-weight: bold;">FROM</span> news
    <span style="color: #990099; font-weight: bold;">WHERE</span> category <span style="color: #CC0099;">=</span> <span style="color: #008080;">1</span>
    <span style="color: #990099; font-weight: bold;">ORDER BY</span> <span style="color: #000099;">date_add</span> <span style="color: #990099; font-weight: bold;">DESC</span></pre></div></div>

<h2>6. Repetarea unor bucati de cod</h2>
<p>Unul din principalele motive pentru care folosim functii este acela de a nu repeta bucati de cod. Datorita functiilor vom face mai usor anumite modificari asupra unor parti din cod, dar vom avea si o dimensiune mai mica a scriptului.</p>
<p>&#8212;&#8212;&#8212;&#8212;</p>
<p>Resurse:</p>
<p>1. <a href="http://codeigniter.com/user_guide/general/styleguide.html" target="_blank">CodeIgniter User Guide</a></p>
<p>2. <a href="http://net.tutsplus.com/tutorials/html-css-techniques/top-15-best-practices-for-writing-super-readable-code/" target="_blank">Top 15+ Best Practices for Writing Super Readable Code</a></p>
<p>3. <a href="http://www.devshed.com/c/a/PHP/Writing-Clean-and-Efficient-PHP-Code/" target="_blank">Writing Clean and Efficient PHP Code</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.mogosanu.ro/general/cod-php-scris-corect/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Wordpress RSS Feed Output Error</title>
		<link>http://blog.mogosanu.ro/var-php-mysql/wordpress-rss-feed-output-error/</link>
		<comments>http://blog.mogosanu.ro/var-php-mysql/wordpress-rss-feed-output-error/#comments</comments>
		<pubDate>Thu, 08 Oct 2009 12:03:23 +0000</pubDate>
		<dc:creator>bogdanmogo</dc:creator>
				<category><![CDATA[$var = "PHP/MySQL"]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[feed]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[rss]]></category>
		<category><![CDATA[xml]]></category>

		<guid isPermaLink="false">http://blog.mogosanu.ro/?p=75</guid>
		<description><![CDATA[Dupa instalarea blog-ului am incercat sa vizualizez feed-ul RSS. Eroare!
M-am uitat in codul sursa si am observat ca tag-ul &#60;?xml era pe randul 2. Dupa ce m-am chinuit sa gasesc blank-ul care se afla pe randul 1, am zis sa ma folosesc totusi de cunostintele mele de programare si sa elimin blank-ul.
Am deschis fisierul feed-rss2.php [...]]]></description>
			<content:encoded><![CDATA[<p>Dupa instalarea blog-ului am incercat sa vizualizez <a title="mogosanu.ro RSS Feed" href="http://blog.mogosanu.ro/feed/" target="_blank">feed-ul RSS</a>. Eroare!</p>
<p>M-am uitat in codul sursa si am observat ca tag-ul &lt;?<a title="XML" href="http://blog.mogosanu.ro/?s=xml">xml</a> era pe randul 2. Dupa ce m-am chinuit sa gasesc blank-ul care se afla pe randul 1, am zis sa ma folosesc totusi de cunostintele mele de programare si sa elimin blank-ul.</p>
<p>Am deschis fisierul <strong>feed-rss2.php</strong> din directorul <strong>/wp-includes/</strong> si am adaugat dupa:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #990000;">header</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Content-Type: '</span> <span style="color: #339933;">.</span> feed_content_type<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'rss-http'</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">'; charset='</span> <span style="color: #339933;">.</span> get_option<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'blog_charset'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">true</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$more</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">1</span><span style="color: #339933;">;</span></pre></div></div>

<p>urmatorul cod:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$out</span> <span style="color: #339933;">=</span> <span style="color: #990000;">ob_get_contents</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$out</span> <span style="color: #339933;">=</span> <span style="color: #990000;">str_replace</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\r</span>&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\t</span>&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot; &quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;&quot;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$input</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #990000;">ob_end_clean</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>La fel se procedeaza si cu celelalte fisiere pentru <a title="mogosanu.ro RSS Feed" href="../feed/" target="_blank">feed</a>.</p>
<p>Codul meu incarca toata pagina intr-un buffer, apoi inlocuieste toate <a href="http://en.wikipedia.org/wiki/Newline" target="_blank">newline-urile</a> si tab-urile cu un spatiu.</p>
<p>Sa fiti atenti totusi sa dati refresh cu CTRL+F5, pentru ca altfel browserul va incarca pagina <a title="XML" href="../?s=xml">xml</a> din cache.</p>
<p>O alta problema a wordpress-ului, pe care nu am inteles-o este de ce fisierul wp-config.php nu se termina cu tag-ul <strong>?&gt;</strong></p>
<p>Este indicat sa verificati si acest fisier, sa nu aiba blank-uri.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.mogosanu.ro/var-php-mysql/wordpress-rss-feed-output-error/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Widget twitter pentru Wordpress</title>
		<link>http://blog.mogosanu.ro/var-php-mysql/widget-twitter-pentru-wordpress/</link>
		<comments>http://blog.mogosanu.ro/var-php-mysql/widget-twitter-pentru-wordpress/#comments</comments>
		<pubDate>Thu, 08 Oct 2009 08:56:14 +0000</pubDate>
		<dc:creator>bogdanmogo</dc:creator>
				<category><![CDATA[$var = "PHP/MySQL"]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[.css {}]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[twitter]]></category>
		<category><![CDATA[widget]]></category>

		<guid isPermaLink="false">http://bogdan.mogosanu.ro/?p=56</guid>
		<description><![CDATA[Vorbeam zilele trecute cu @VladGrigorescu, care ma ruga sa-i propun un widget wordpress pentru a-i afisa mesajele  de pe twitter.
Dupa cateva cautari si testari am ramas la Twitter Wordpress Sidebar Widget creat de Sarah Isaacson.
Pluginul este unul foarte simplist, care ofera exact facilitatile de care ai nevoie pentru a-ti afisa mesajele twitter pe blog.
Cam asa [...]]]></description>
			<content:encoded><![CDATA[<p>Vorbeam zilele trecute cu <a title="Vlad Grigorescu" href="http://twitter.com/VladGrigorescu" target="_blank">@VladGrigorescu</a>, care ma ruga sa-i propun un widget wordpress pentru a-i afisa mesajele  de pe twitter.</p>
<p>Dupa cateva cautari si testari am ramas la <a href="http://www.velvet.id.au/twitter-wordpress-sidebar-widget/" target="_blank">Twitter Wordpress Sidebar Widget</a> creat de <a href="http://velvet.id.au" target="_blank">Sarah Isaacson</a>.</p>
<p>Pluginul este unul foarte simplist, care ofera exact facilitatile de care ai nevoie pentru a-ti afisa mesajele twitter pe blog.</p>
<p>Cam asa arata widget-ul in menu-ul de WP Admin:</p>
<p><img class="aligncenter size-full wp-image-57" title="scr_widget_twt" src="http://bogdan.mogosanu.ro/wp-content/uploads/2009/10/scr_widget_twt.gif" alt="scr_widget_twt" width="266" height="334" /></p>
<p>Un lucru foarte bun cu acest widget este ca nu trebuiesc furnizate datele de login in contul de twitter. El se foloseste de <a href="http://search.twitter.com/" target="_blank">search-ul</a> furnizat de twitter pentru a cauta mesajele tale.</p>
<p>Din pacate widgetul are si cateva minusuri, cum ar fi:</p>
<p>- nu stie sa afiseze cod html introdus in campul &#8220;Text to display between tweet and timestamp&#8221;.</p>
<p>- daca mesajul din twitter este prea lung si depaseste in latime dimensiunea widgetului nu stie sa faca slice textului.</p>
<p style="text-align: center;"><img class="aligncenter size-full wp-image-58" style="border: 1px solid black;" title="scr_wigdet_twt_err" src="http://bogdan.mogosanu.ro/wp-content/uploads/2009/10/scr_wigdet_twt_err.gif" alt="scr_wigdet_twt_err" width="482" height="139" /></p>
<p style="text-align: left;">UPDATE:  Un alt widget care afiseaza mesajele de pe twitter direct pe blog poate fi gasit <a href="http://theodin.co.uk/blog/javascript/tweetable-jquery-plugin.html" target="_blank">aici</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.mogosanu.ro/var-php-mysql/widget-twitter-pentru-wordpress/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

