Iekš “About me” 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:
<?php
//Esošo pilno gadu ievietojam mainīgajā
$dateNow = date(”Y”);
//Atņemam no mainīgā manu dzimšanas gadu un izvadām
print $dateNow-1987;
?>
//Ja tagad ir Janvāris un datums ir >=18 vai arī tagad ir kāds cits mēnesis
//kas ir tālāks par Janvāri – tad man ir (jau bija) dzimšanas diena
if (($monthNow == 1 && $dayNow >=18) || ($monthNow > 1))
//Atņemu no esošā gada, savu dzimšanas gadu
print $yearNow – 1987;
else
//Citādi, tagad varbūt ir Janvāris, bet vēl nav 18. datums
//atņemu dzimšanas gadu + 1, lai sanāk pareizi gadi
print $yearNow – 1988;
?>
Today is my birthday. I haven’t celebrated my birthday since I was 17 years old and I don’t know why. Maybe something interesting will happen today – if so, I’ll write about it.
I have also added PayPal donate button to my blog. If you want to make me smile – 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:
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 and then it started – banners, suggestions and other stuff. I think I clicked 3 times, to get to checkout, because there were so many questions asking me: “Maybe you want to register tvinky.info and other domains too ?” etc… I clicked to pay with PayPal and got this: “ERROR : Enter PayPal account friendly identifier”. There was an empty field for friendly identifier information, but I didn’t understand what they want from me. I also tried to ask this question to Google and found out, that I’m not alone
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: “1 In Progress Order(s)” and friend of mine sad that it could take even 24h. After 3 days of waiting, I got nothing and the message changed to “0 In Progress Order(s)”…
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 “domain manager” link and changed ARecord IP address to hosting IP address. After one hour when TTL was over, the domain started to work perfectly.
From this time it will be easier to remember my blog domain name.