Mika Tuupola

Technology guy with passion for advertising.

  • weblog
  • projects
  • cv

Rails

Mephisto Sitemap Plugin With Engines Support

08 October 2008

I made quick fix to Mephisto Sitemap plugin. Now it works with lates Mephisto 0.8 (Drax). All old plugins got broken when Mephisto changed to Rails Engines based plugin system.

Install by issuing the following command in your Mephisto root.

script/plugin install 
http://svn.appelsiini.net/svn/rails/plugins/mephisto_sitemap/

After installing remember to restart you WEBrick or Mongrel.

Why Fortumo Will Be Success?

27 September 2007

Fortumo has good change to be next Estonian success. It does not provide anything new. Instead it provides something old but in brilliant package.

Fortumo is web application for easily creating SMS services. It is built with Ruby on Rails.

Easy way

For technically challenged Fortumo provides three ready made applications. Simplest one replies back with predefined text. Slightly more advanced version forwards sent message to email address of your choice. Third one is JavaScript shoutbox widget which you can embed to any webpage. Shouts in this case are sent with text message.

Continue reading

Mephisto Google Sitemaps Plugin

16 August 2007

Since I recently restructured my site I wanted to make changes quickly visible to Google. Sitemaps can help with this. I searched for Mephisto plugin. Found Sitemap Generator by Joseph Moore and Auto Generated Sitemaps by Greg Benedict.

Both were great but required manually editing Rails routes. They also did not use Mephistos plugin facilities which enable configuring through admin interface.

Based from two previous examples Mephisto Sitemap was born. Installing is as simple as:

script/plugin install http://svn.appelsiini.net/svn/rails/plugins/mephisto_sitemap/

Restart you WEBrick or mongrel and youre set to go. Routes are automatically added to poing to your <mephisto_root>/sitemap.xml.

Now sit back and wait for you increased Google fame!

Changing Hostname of Mephisto Blog

05 July 2007

Recently I was developing a new website under Mephisto and multisite config. I developed site under temporary hostname. Below are the steps needed to change hostname of running Mephisto instance.

Lets assume old host of the site was dev.example.com. New host will be www.example.com.

In table sites update column host to have value example.com. Also update Apache config to understand the new hostname. Now Mephisto is ready to answer in new hostname.

Articles containing images or other assets still have old hostname in their url. They can be easily changed with MySQL’s REPLACE command. Four columns have to be updated in contents table:

UPDATE contents SET body = REPLACE; UPDATE contents SET body_html = REPLACE; UPDATE contents SET excerpt_html = REPLACE; UPDATE contents SET excerpt = REPLACE;

Last thing to change is the name of asset directory under mephisto folder.

 >cd /www/mephisto/public/assets 
 >mv dev.example.com www.example.com

Thats it. Fire up you browser. Clear caches from Mephisto admin and check everything is ok.

UPDATE: There still seems to be problem with new assets being uploaded to wrong folder. Temporary fix for this is to make a symlink:

 >cd /www/mephisto/public/assets 
 >ln -s www.example.com example.com

I’m sure there is a better way.

ThickBox Macro For Mephisto - jQuery and Rails

26 March 2007

Some people consider it to be heretic to use jQuery with Ruby on Rails. Since I am big fan of jQuery I decided to do it anyway.

With filtered_column_thickbox_macro you can display single or multiple images with Lightbox effect. Macro uses Cody Linley’s ThickBox plugin. Code is based on Based on Christian Lim’s Lightbox Image Gallery Filter.

Installation

Install by issuing command (in one line):

script/plugin install http://svn.appelsiini.net/svn/rails/plugins/filtered_column_thickbox_macro/

Script will copy needed Javascript, CSS and image files into your public folder. It does not overwrite any existing files. So if you rely in specific version of jQuery library it will be safe.

Continue reading

I'm back, this time armed with Textpattern

17 September 2005

Since there will be some changes in my life which I wanted to document (you know, so I will remember them later) it became mandatory that I ditch my old homebrewn system and change something easier to use. This way I won’t have the excuse of it’s so complicated for not writing. I looked into several different softwares…

WordPress: Everyone uses it, written in PHP – the language of my choice. But it just does not feel elegant. If it does not feel right it just does not feel right.

Typo: Propably the most hip blogging system at the moment. Written using Ruby on Rails. Utilises AJAX in several places. The downside? Installation, definetily installation. It was like compiling PHP in 2002 – trial and error. In the end I just could not make it work properly with ~username/ style URLs. Then I gave up.

Serendipity: Written by several of the best PHP developers on earth. The code itself is superior but what Serenpidity really needs is a couple of designer guys and a user interface specialist onboard with the developer team.

Texpattern: This is what I finally chose to use main reason being usage of Textile for post formatting. Textile together with somewhat different aproach to admin interface gives Textpattern an elegant overall feeling. The permalink style is similar to my old permalinks so I will not loose my google status. It is not all good though. The template system is a bit awkward and the PHP code itself is really not my style. But hey! It Works™ and I don’t have to maintain the code.



@tuupola