<?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>Tvinky's blog &#187; Site info</title>
	<atom:link href="http://www.tvinky.com/category/site_info/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.tvinky.com</link>
	<description></description>
	<lastBuildDate>Mon, 18 Apr 2011 16:47:49 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>No new posts, thinking about blog total remaking</title>
		<link>http://www.tvinky.com/2010/03/14/no-new-posts-thinking-about-blog-total-remaking/</link>
		<comments>http://www.tvinky.com/2010/03/14/no-new-posts-thinking-about-blog-total-remaking/#comments</comments>
		<pubDate>Sun, 14 Mar 2010 21:53:58 +0000</pubDate>
		<dc:creator>Tvinky</dc:creator>
				<category><![CDATA[Site info]]></category>

		<guid isPermaLink="false">http://www.tvinky.com/?p=933</guid>
		<description><![CDATA[Yeah, haven&#8217;t posted there anything new last few months   I&#8217;m thinking about total blog remaking, still don&#8217;t know how to do:

Write own CMS from zero/null using some kind of frameworks
Or just remake WP theme and begin everything from scratch (removing all posts)

]]></description>
			<content:encoded><![CDATA[<p>Yeah, haven&#8217;t posted there anything new last few months <img src='http://www.tvinky.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' />  I&#8217;m thinking about total blog remaking, still don&#8217;t know how to do:</p>
<ul>
<li>Write own CMS from zero/null using some kind of frameworks</li>
<li>Or just remake WP theme and begin everything from scratch (removing all posts)</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.tvinky.com/2010/03/14/no-new-posts-thinking-about-blog-total-remaking/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Vienas ikgadējās rutīnas mazāk</title>
		<link>http://www.tvinky.com/2009/07/12/vienas-ikgadejas-rutinas-mazak/</link>
		<comments>http://www.tvinky.com/2009/07/12/vienas-ikgadejas-rutinas-mazak/#comments</comments>
		<pubDate>Sun, 12 Jul 2009 14:28:39 +0000</pubDate>
		<dc:creator>Tvinky</dc:creator>
				<category><![CDATA[From life]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Site info]]></category>

		<guid isPermaLink="false">http://www.tvinky.com/?p=773</guid>
		<description><![CDATA[Iekš &#8220;About me&#8221; sadaļas katru savu dzimšanas dienu man nācās atjaunot savu vecumu. Risinājums ar PHP būtu ļoti vienkāršs, bet WP man neļauj pa tiešo lapā likt to iekšā. Negribēju ilgi meklēt Internetā un radu citu risinājumu.
Tātad, izveidoju php failu: getYear.php:
&#60;?php
//Esošo pilno gadu ievietojam mainīgajā
$dateNow = date(&#8221;Y&#8221;);
//Atņemam no mainīgā manu dzimšanas gadu un izvadām
print $dateNow-1987;
?&#62;
Sakarā [...]]]></description>
			<content:encoded><![CDATA[<p>Iekš &#8220;<a href="http://www.tvinky.com/about/" target="_blank">About me</a>&#8221; sadaļas katru savu dzimšanas dienu man nācās atjaunot savu vecumu. Risinājums ar <a href="http://php.net/" target="_blank">PHP</a> būtu ļoti vienkāršs, bet WP man neļauj pa tiešo lapā likt to iekšā. Negribēju ilgi meklēt Internetā un radu citu risinājumu.</p>
<p>Tātad, izveidoju php failu: getYear.php:</p>
<p><span style="text-decoration: line-through;">&lt;?php</span></p>
<p><span style="text-decoration: line-through;">//Esošo pilno gadu ievietojam mainīgajā<br />
$dateNow = date(&#8221;Y&#8221;);</span></p>
<p><span style="text-decoration: line-through;">//Atņemam no mainīgā manu dzimšanas gadu un izvadām<br />
print $dateNow-1987;<br />
?&gt;</span></p>
<p>Sakarā ar kļūdu, kods tika palabots uz šādu:</p>
<p>&lt;?php<br />
$yearNow = date(&#8221;Y&#8221;); //pilns gads (4 cipari)<br />
$monthNow = date(&#8221;n&#8221;); //1 &#8211; 12<br />
$dayNow = date(&#8221;j&#8221;); //1 &#8211; 31</p>
<p>//Ja tagad ir Janvāris un datums ir &gt;=18 vai arī tagad ir kāds cits mēnesis<br />
//kas ir tālāks par Janvāri &#8211; tad man ir (jau bija) dzimšanas diena<br />
if (($monthNow == 1 &amp;&amp; $dayNow &gt;=18) || ($monthNow &gt; 1))<br />
//Atņemu no esošā gada, savu dzimšanas gadu<br />
print $yearNow &#8211; 1987;<br />
else<br />
//Citādi, tagad varbūt ir Janvāris, bet vēl nav 18. datums<br />
//atņemu dzimšanas gadu + 1, lai sanāk pareizi gadi<br />
print $yearNow &#8211; 1988;<br />
?&gt;</p>
<p><span id="more-773"></span></p>
<p>Izlaižot šādu failu caur PHP interpretatoru, iegūsim 22 (jo 2009-1987 = 22). Tālāk iemetu šo failu iekš saita root direktorijas un man vajadzēja šo informāciju ievietot pie visa pārējā teksta. Lai to izdarītu pielietoju Ajax noob skillu.</p>
<p>Uzrakstīju mazu JavaScript failu: myJS.js:<br />
var XMLHttpRequestObject = false;</p>
<p>if (window.XMLHttpRequest) {<br />
XMLHttpRequestObject = new XMLHttpRequest();<br />
}else if (window.ActiveXObject) {<br />
XMLHttpRequestObject = new ActiveXObject(&#8221;Microsoft.XMLHTTP&#8221;);<br />
}</p>
<p>function getData(dataSource, divID)<br />
{<br />
if (XMLHttpRequestObject) {<br />
var obj = document.getElementById(divID);<br />
XMLHttpRequestObject.open(&#8221;GET&#8221;, dataSource);</p>
<p>XMLHttpRequestObject.onreadystatechange = function()<br />
{<br />
if (XMLHttpRequestObject.readyState == 4 &amp;&amp; XMLHttpRequestObject.status == 200) {<br />
obj.innerHTML = XMLHttpRequestObject.responseText;<br />
}<br />
}<br />
XMLHttpRequestObject.send(null);<br />
}</p>
<p>}</p>
<p>(Jā, es zinu, ka ar jQuery tas būtu ātrāk un īsāk, bet nāktos ielādēt lielāku kodu no kura es 99% neizmantotu)</p>
<p>Caur WP rediģējot header sadaļu pirms paša &lt;/head&gt; pievienoju skriptu:</p>
<p>&lt;script type=&#8221;text/javascript&#8221; src=&#8221;/myJS.js&#8221;&gt;&lt;/script&gt;</p>
<p>Un pārtaisīju arī &lt;body&gt; tagu mazliet uz -&gt; &lt;body onload=&#8217;getData(&#8221;/getYear.php&#8221;, &#8220;myYears&#8221;)&#8217;&gt;</p>
<p>Pēc tam devos rediģet lapu &#8220;About me&#8221;&#8230; Pārslēdzos no &#8220;Visual&#8221; uz &#8220;HTML&#8221; un pievienoju nepieciešamajā vietā šādu tagu:</p>
<p>&lt;noscript&gt;&lt;b&gt;[You must enable JavaScript in your browser to see how old I am at this moment <img src='http://www.tvinky.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> ]&lt;/b&gt;&lt;/noscript&gt; &lt;span id=&#8221;myYears&#8221;&gt;&lt;/span&gt;</p>
<p>Plusi:</p>
<ul>
<li>Pielietojot PHP iegūsim servera iestatīto gadu, respektīvi &#8211; ja lietotājs mainīs savā datorā gadu, es nepalikšu jaunāks vai vecāks</li>
<li>Tipa Ajax FTW Web 2.0 <img src='http://www.tvinky.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </li>
<li><em>Pačakarējos</em> &#8211; vēlāk noderēs skills</li>
</ul>
<p>Mīnusi:</p>
<ul>
<li>Bez JS atbalsta neuzzināsiet cik esmu vecs <img src='http://www.tvinky.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' />  (noscript paziņos, ja vajag JS support)</li>
<li>Lieka ķēpa ar JS un PHP, jo varētu to vienkārši ievietot ar PHP</li>
<li>Neverot pat &#8220;About me&#8221; sadaļu ielādējas mans JS un palaiž funkciju bezjēgā (mēģināju likt ar PHP pārbaudi if ($_GET['page_id'] == 2) un tad pievienot, bet diemžēl kaut, kas nesanāca)</li>
<li>Kāmēr neielādējas visa lapa, neparādās mani gadi. (Gan jau var iztikt bez onload=&#8221;",  bet domāju, ka nav tik traģiski ja parādās arī vēlāk)</li>
</ul>
<p>Principā viss izveidotais ir vairāk mīnuss nekā pluss, jo Ajax pat nav uzlikts, lai pārbauda ik sekundi vai kādu laika sprīdi &#8211; vai gads ir mainījies. (Tas pat būtu muļķīgi, vai kāds tur vispār tajā lapā sēdētu un gaidītu ? <img src='http://www.tvinky.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> ) Viss šis varētu aizvietoties ar vienkāršu php kodu, kurš atņem no esošā gada manu dzimšanas gadu&#8230;</p>
<p>Tas arī viss, tagad ieejot &#8220;About me&#8221; sadaļā JS (Ajax) izplēš no PHP faila iegūto gadu un ieliek to &lt;span&gt; tagā.</p>
<p>Ja kāds zina:</p>
<ul>
<li>Kā iekš WP lapas var izmantot PHP kodu;</li>
<li>Ielādēt JS/Ajax kodu tikai nepieciešamajā man lapā;</li>
</ul>
<p>dodat ziņu komentāros vai e-pastā.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tvinky.com/2009/07/12/vienas-ikgadejas-rutinas-mazak/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Wordpress 2.8</title>
		<link>http://www.tvinky.com/2009/06/11/wordpress-2-8/</link>
		<comments>http://www.tvinky.com/2009/06/11/wordpress-2-8/#comments</comments>
		<pubDate>Thu, 11 Jun 2009 21:53:02 +0000</pubDate>
		<dc:creator>Tvinky</dc:creator>
				<category><![CDATA[Site info]]></category>
		<category><![CDATA[blog]]></category>
		<category><![CDATA[update]]></category>
		<category><![CDATA[upgrade]]></category>
		<category><![CDATA[wp 2.8]]></category>

		<guid isPermaLink="false">http://www.tvinky.com/?p=678</guid>
		<description><![CDATA[Vakar pārgāju uz jauno WP versiju 2.8. Arī www.xlab.lv pārcēlām uz 2.8 versiju &#8211; pagaidām viss gludi. Zemāk varam apskatīties, kas jauns šajā versijā.

]]></description>
			<content:encoded><![CDATA[<p>Vakar pārgāju uz jauno WP versiju 2.8. Arī <a href="http://www.xlab.lv/" target="_blank">www.xlab.lv</a> pārcēlām uz 2.8 versiju &#8211; pagaidām viss gludi. Zemāk varam apskatīties, kas jauns šajā versijā.</p>
<p style="text-align: center;"><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="600" height="420" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="src" value="http://v.wordpress.com/Pu3T4X8l" /><embed type="application/x-shockwave-flash" width="600" height="420" src="http://v.wordpress.com/Pu3T4X8l"></embed></object></p>
]]></content:encoded>
			<wfw:commentRss>http://www.tvinky.com/2009/06/11/wordpress-2-8/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>I&#8217;m 22 now</title>
		<link>http://www.tvinky.com/2009/01/18/im-22-now/</link>
		<comments>http://www.tvinky.com/2009/01/18/im-22-now/#comments</comments>
		<pubDate>Sat, 17 Jan 2009 23:02:12 +0000</pubDate>
		<dc:creator>Tvinky</dc:creator>
				<category><![CDATA[From life]]></category>
		<category><![CDATA[Site info]]></category>
		<category><![CDATA[18.01.1987]]></category>
		<category><![CDATA[birthday]]></category>
		<category><![CDATA[books]]></category>
		<category><![CDATA[domain]]></category>
		<category><![CDATA[donate]]></category>

		<guid isPermaLink="false">http://www.tvinky.com/?p=381</guid>
		<description><![CDATA[ 
I&#8217;m 22 now!!!

Today is my birthday. I haven&#8217;t celebrated my birthday since I was 17 years old and I don&#8217;t know why. Maybe something interesting will happen today &#8211; if so, I&#8217;ll write about it. 
I have also added PayPal donate button to my blog. If you want to make me smile &#8211; feel free to donate. Even [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: center;"> </p>
<p style="text-align: center;">I&#8217;m 22 now!!!</p>
<p style="text-align: center;"><img class="alignnone" title="Birthday cake" src="http://farm4.static.flickr.com/3334/3205040596_3abb5e8a07.jpg?v=0" alt="" width="459" height="340" /></p>
<p>Today is my birthday. I haven&#8217;t celebrated my birthday since I was 17 years old and I don&#8217;t know why. Maybe something interesting will happen today &#8211; if so, I&#8217;ll write about it. </p>
<p>I have also added <a href="https://www.paypal.com/lv" target="_blank">PayPal</a> donate button to my blog. If you want to make me smile &#8211; feel free to donate. Even 1$ is a lot to me. I don’t belive that someone will donate, but if someone wants to do it, the plan for spending this money is:</p>
<ul>
<li>Pay for domain name</li>
<li>Buy book&#8217;s:<a href="http://www.pragprog.com/titles/ktuk/ubuntu-kung-fu" target="_blank"></a></li>
</ul>
<ol>
<li><a href="http://www.amazon.co.uk/CCNA-Companion-Networking-Academy-Program/dp/1587131102" target="_blank">Cisco Networking Academy Program CCNA 1 and 2</a></li>
<li><a href="http://www.pragprog.com/titles/ktuk/ubuntu-kung-fu" target="_blank">Ubuntu Kung Fu</a></li>
<li>I&#8217;m also interested in Ruby on Rails, Java Script, Ajax book&#8217;s</li>
</ol>
<ul>
<li>Invest in other free/open projects which soon will be online</li>
</ul>
<p>P.S If you don&#8217;t have PayPal account and want to donate &#8211; <a href="http://www.tvinky.com/contacts/" target="_self">you can contact with me</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tvinky.com/2009/01/18/im-22-now/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Unlucky domain registration&#8230;</title>
		<link>http://www.tvinky.com/2008/10/28/unlucky-domain-registration/</link>
		<comments>http://www.tvinky.com/2008/10/28/unlucky-domain-registration/#comments</comments>
		<pubDate>Tue, 28 Oct 2008 20:42:02 +0000</pubDate>
		<dc:creator>Tvinky</dc:creator>
				<category><![CDATA[Site info]]></category>
		<category><![CDATA[domain]]></category>
		<category><![CDATA[epic fail]]></category>
		<category><![CDATA[register]]></category>
		<category><![CDATA[ttl]]></category>

		<guid isPermaLink="false">http://www.tvinky.com/?p=104</guid>
		<description><![CDATA[As I am a fan of Revision3 screencasts and as they advertise GoDaddy.com for domain registration so I thought that I could try this way. I went to http://www.godaddy.com/ and singed up. Entered my interested domain name and clicked to search for it. Luckily domain name was not used and I clicked to buy it [...]]]></description>
			<content:encoded><![CDATA[<p>As I am a fan of <a href="http://revision3.com/" target="_blank">Revision3</a> screencasts and as they advertise GoDaddy.com for domain registration so I thought that I could try this way. I went to http://www.godaddy.com/ and singed up. Entered my interested domain name and clicked to search for it. Luckily domain name was not used and I clicked to buy it and then it started &#8211; banners, suggestions and other stuff. I think I clicked 3 times, to get to checkout, because there were so many questions asking me: &#8220;Maybe you want to register tvinky.info and other domains too ?&#8221; etc&#8230; I clicked to pay with PayPal and got this: &#8220;ERROR : Enter PayPal account friendly identifier&#8221;. There was an empty field for friendly identifier information, but I didn&#8217;t understand what they want from me. I also tried to ask this question to Google and <a href="http://www.google.lv/search?hl=lv&amp;q=ERROR+%3A+Enter+PayPal+account+friendly+identifier&amp;btnG=Google+mekl%C4%93%C5%A1ana&amp;meta=" target="_blank">found</a> out, that I&#8217;m not alone <img src='http://www.tvinky.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>One of my friends suggested to use http://www.europeregistry.com/ for domain registration, so next I tried this way. Signed up, entered my information and searched for domain. Fortunately there were no banners and other stuff. Site showed message: &#8220;1 In Progress Order(s)&#8221; and friend of mine sad that it could take even 24h. After 3 days of waiting, I got nothing and the message changed to &#8220;0 In Progress Order(s)&#8221;&#8230;</p>
<p>I was disappointed  a little bit about this epic fail and went back to GoDaddy, but this time instead of using PayPal, I chose to enter credit card information. I was shocked! After two minutes I had my domain registered and running. I went to &#8220;domain manager&#8221; link and changed ARecord IP address to hosting IP address. After one hour when <a href="http://en.wikipedia.org/wiki/Time_to_live" target="_blank">TTL</a> was over, the domain started to work perfectly.</p>
<p>From this time it will be easier to remember my blog domain name.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tvinky.com/2008/10/28/unlucky-domain-registration/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Hi!</title>
		<link>http://www.tvinky.com/2008/10/23/hi/</link>
		<comments>http://www.tvinky.com/2008/10/23/hi/#comments</comments>
		<pubDate>Thu, 23 Oct 2008 09:40:57 +0000</pubDate>
		<dc:creator>Tvinky</dc:creator>
				<category><![CDATA[Site info]]></category>
		<category><![CDATA[begining]]></category>
		<category><![CDATA[bloging]]></category>
		<category><![CDATA[ideas]]></category>

		<guid isPermaLink="false">http://tvinky.tups.lv/?p=56</guid>
		<description><![CDATA[So here we are&#8230; My first post&#8230;
I have been reading Latvian blogs for years, but not for a long time started to interest about making my own blog. All the time when I found something interesting or learned something that could be interesting for others &#8211; I thought that it would be great to show [...]]]></description>
			<content:encoded><![CDATA[<p><em>So here we are&#8230; My first post&#8230;</em></p>
<p>I have been reading Latvian <a href="http://en.wikipedia.org/wiki/Blog" target="_blank">blogs</a> for years, but<strong> </strong>not for a long time started to interest about making my own blog. All the time when I found something interesting or learned something that could be interesting for others &#8211; I thought that it would be great to show it to others.</p>
<p><em>Someone maybe want to know why I didn&#8217;t started bloging sooner, or why am I bloging in English&#8230; </em></p>
<ul>
<li>Fact which was stopping me from bloging was my wish to make my own <a href="http://en.wikipedia.org/wiki/Content_management_system" target="_blank">CMS</a> system in which to blog. But because in my University Computer science programm we have 80% high level maths, 5% social knowledge and 15% was somehow involving with IT, the only time which I had free I spent learning maths&#8230; I didn’t want to fail with learning.</li>
<li>With goal to learn better English, I choose bloging in the English language. Also I&#8217;m a little interested to travel around the world &#8211; and as we know, English is great to know traveling.</li>
</ul>
<p><em>P.S</em></p>
<p>I also want to say thanks to <a href="http://tups.lv/blog/" target="_blank">Aivars</a> who is owner of hosting on which my blog is working now. And of course, if someone has any suggestions or see some mistakes, I would be glad to <a href="/contacts/" target="_self">be informed</a> about it.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tvinky.com/2008/10/23/hi/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

