Posts tagged WordPress
BNR exchange rate
0
In this global crisis, nothing is more useful than a good chart to watch your money as investment. That’s why I created a special page which collects freely available exchange rates from BNR (National Romanian Bank) and presents them in a graphical form. This way, the viewers of my website will always be on the edge with exchange rates, as soon as BNR posts them (usually around 13:00 GMT+2).
The main challenges were:
- Building a php script to parse XML, inserting the exchange rates into database. The lack of experience and debugging tools made a huge difference in development time. But all is working now.
- Creating a php script that will daily update the exchange rates, so the users will have the fresh rates at their disposal as soon as possible.
- Design the page that hosts the chart and provide create the appropriate data structure which will feed the chart with data.
- learn to use a very interesting framework of representing data as charts – Google Visualisations
Next steps:
- Offer the posibility to choose among all 30 currencies for which the BNR provides exchange rates.
- implement AJAX for smooth behavior of refreshing the page while user chooses a different currency.
Enjoy!
cPanel: using Cron Jobs
0
First – what is a cron job? It is a piece of software which can be run at specific times by the cron service. By example, one could set a cron job to update his application exchange rates from a server every day at a specific hour so its application will be up to date.
I used it because the Romanian National Bank doesn’t have a proper page to check for exchange rates – they present just the numbers, but no trends, no charts – nothing visual. Too bad for them! For me it is actually a good way to refresh my PHP / MySQL and apache management skills. Because this Cron stuff is actually new for me, I composed a small tutorial in order to be easy for me to remember and for you, my dear readers, to get quickly the information required for a quick start. So let’s get going with our ..
Cron Jobs quick Tutorial
Google Visualizations
0While working on my idea of presenting on this website also the Romanian National Bank exchange rates (very useful in this crisis time), I end up in choosing a form of visualization.
One might argue that text is good enough, but for me frankly graphs and charts are the best. So I started looking on the internet for free and customizable charting tools.
From the plethora of choices on the web I will present just a few:
1. An interesting tutorial on how to build a chart of your own – it’s the easy way to get exactly what you need done as it should be. It is quite old, but still actual, as Macromedia MX programming is still supported in Adobe CS3
2. OpenFlashChart GWT Library – very interesting, free library and highly customizable. But it comes with a big drawback : it has approx 375 Kb .. quite big for my requirements.
3. Origamy Flash graph component – amazingly nice and costly . 99$ ..
4. Google visualization – free, fast, light and with a ton of settings. They have pies, tables, charts … with really lots of settings. The added traffic isn’t much … around 30 kb per graph ( and I measured biggest one – Annotated time line ).
Choosing hosting for WordPress
2
One of the most important questions in launching a website is the hosting.
When moving to private hosting, I realized that I don’t need all features of the premium hosting plans, just a reliable hosting with basic tools to help me do my tasks easier, without too much investment. Also I wanted to continue using WordPress and reuse the content already created in my old website.
The requirements of WordPress from my hosting were pretty small:
- PHP 4.3 or greater
- MySQL 4.0 or greater
- The mod_rewrite Apache module
- What they don’t mention on website Required WordPress space: At least 10 Mbytes of space on server
URL Rewrite = mod_rewrite
0SEO tools and mod_rewrite were out for a while. They do amazing things, like enabling humans to have a crisp view about the contents of a link. Unfortunately, until IIS 7 Microsoft didn’t had nothing comparable as default, but some companies struggled to offer this basic service.The two options were the rather cheap IISRewrite and the free ISAPI Rewrite Filter.
Mr Thomas Deml, Lead Program Manager in the IIS team, responsible for Security, Performance, Shared Hosting, presents in his overview about how SEO can be added to your application in his breakout session in MIX 09
Come learn SEO best practices and proven techniques that can boost the position of a Web site in search results pages.
Instead of having www.blabla.com/index.aspx?q=cats you can create a redirect to same page, but have instead the link www.blabla.com/search/cats. This enables the search engines to operate more efficiently in serving their customers (which can be also your customers, by the way) more accurate responses to their needs.
Language switcher
0Copyright : You can use the code below on your website as long as you keep a post with a link to my WordPress (http://radupoenaru.wordpress.com/) website on your WordPress website.
Since I moved my presentation site to WordPress hosting, I searched for a simple plugin or widget to allow me to have content in many languages. The basic idea is that if I wrote all in English, my older relatives ( whom learned French and Russian when Communism ruled ) wouldn’t be able to read it.
So where to find this precious tool? Initially I searched the plugins offered in WordPress specialized area, some were nice and interesting. But another problem arises – since it is a free hosting, you just can’t ask for these plugins, nor install them by yourself. Even the most popular ones, tried, tested and proven reliable by users weren’t integrated in WordPress hosting website.
Since it is the era of internationalization I believe that the builders thought that all of us learned already English.
Next I was thinking how to overcome this. And I came up with the idea presented below – use tags as switchers for different language articles.
For easy switching between languages, I added a HTML placeholder in Administration area -> Design ->Text widget and I placed him in the first position – feel free to add it as you like.
The text inside the widget is :
<table border="0" width="100%"> <tr> <td align="center" width="50%"> <a href="http://radupoenaru.wordpress.com/tag/English"> <img border="0" src="http://radupoenaru.files.wordpress.com/2008/10/en.jpg" alt="Select only posts in English language" /></a> </td> <td align="center" width="50%"> <a href="http://radupoenaru.wordpress.com/tag/Romana"> <img border="0" src="http://radupoenaru.files.wordpress.com/2008/10/ro.jpg" alt="Selecteaza doar mesajele in limba Româna" /></a> </td> </tr> </table>
I used a table just for effect, to evenly space the flag pictures.
I use the images below, uploaded in this message, because WordPress doesn’t allow media uploading separately – only included in a page.
The simplest way to do this was to include a language tag in the tags collection of each post. I use "English" for English posts and "Romana" for Romanian posts. So the main thing you should set after is one of the tags for each article in either Romana or English.