Wednesday, February 25, 2009

Custom routing in RoR


The index.html.erb view sample


The resources in config/routes.rb


The user_pages.rb controller


The results



Added a feature in Bizonnet, My Pages or List of my SMS Business Location. After the user logged in, they can view,edit or destroy the added pages. And the system will list all the created pages created by them. If the pages spanning way beyond 10 pages, the system will automatically trigger Pagination helper, so the user can flip thru the list of pages using the helpers.

I'm using http://domain.com/users/:user_id/pages/:id format. So in the config/routes.rb I have to modify it.

It's so tired..and I need a new haircut by today. Bye

Tuesday, February 24, 2009

RoR Search Engine


The sample controller. Now I can search on 3 different join tables, Tags,Category and Pages



The library

CakePHP Search Controller



Sample controller for typical search in CakePHP

Monday, February 23, 2009

TREE Category Management

Category Tree is very important tool while doing web development. You can create unlimited categories using this technique.


The Tree helper in app/helpers/application.rb


Using it in view


The output while editing page


A very simple Tree Category Management

Thursday, February 19, 2009

Jaring Biz-on-Net



Jaring Biz-on-Net Portal features
1. Tagging for each business
2. Tag Cloud
3. Google Map pointing
4. Auto geocoding using normal address
5. User Management System

Thanks to:
1. Ruby On Rails
2. MySQL
3. Webbring Proxy Apache
4. VMWARE Enterprise
5. Linux Centos

I got this task around 7 days ago and must be finished by today. Thanks for Ruby On Rails, you are life saver. Using the available plugins, make the build from scratch is much easier.

Friday, February 13, 2009

RESTful Authentication




If you are like me, you'll probably finished reading these books

1. Practical Rails Social Networking Sites
2. Simply Rails 2
3. Advanced Rails Recipes
4. Agile Web Development With RoR 2nd Edition

And none of them give an example for complete user management & authentication system. Before you write your own system, follow this tutorial.

http://railsforum.com/viewtopic.php?pid=74245#p74245


The tutorial is so great, my auth system now have these features
1.user registration form
2. manage user roles
3. roles management
4. role checking
5. forgot password mechanism
6. email activation code
7. login/logout

Sunday, February 8, 2009

Video Conversion using Pazera CLI


Thumbnails generated by FFMPEG


The magic command

It works, using WINE and PAZERA free command line video conversion.

Demo site
http://social.jobber.my/videos

Pazera
http://www.download.com/Pazera-Free-FLV-to-AVI-Converter/3000-2194_4-10786669.html