Arabiyat.com is a Saudi-Arabic online magazine which provides high profile interviews and background stories on the "who's who" of the Arab world. Arabiyat International is a Jeddah (SA) based Internet agency who developed the new portal in Drupal in cooperation with Morningtime Digital from Munich, Germany. The initial goal was to lay the foundation for a portal that could potentially grow from 1,000 to 50,000 nodes, which made Drupal the clear choice for the project.

Arabiyat.com has a special section for women and employs multiple blog authors to write original content. The news portal has long been active since the late 1990's, starting from scratch and evolving through several different CMS systems. The Internet was introduced to the Kingdom of Saudi Arabia in 1999, and Arabiyat International was an early pioneers, which came up with the first fully integrated Arabic magazine on the internet in the year 2000.

Morningtime Digital developed the Drupal backbone and was responsible for the migration from the Vivvo CMS. All content is created by Arabiyat Intl.

Migration from Vivvo CMS to Drupal

The existing platform was built on the wonderful Vivvo CMS. It was decided to migrate Vivvo CMS's content to Drupal using the Drupal node API, instead of writing SQL-to-SQL scripts. We wanted Drupal to do its magic on importing content. Looking for a solution, I stumbled upon two lifesavers: the Table Wizard and Migrate modules.

Drupal is capable of connecting to multiple databases at once. In settings.php we added the following lines (example):

$db_url['default'] = 'mysqli://root@localhost/arabiyat_drupal';
$db_url['vivvo']   = 'mysqli://root@localhost/arabiyat_vivvo';

Drupal runs on the 'default' database while allowing you to use the Drupal database layer API to interact with the extra 'vivvo' database. Using the Table Wizard module it is now possible load specific tables into a Views, so Drupal knows about the Vivvo table rows and columns.

The Vivvo CMS is structured in a way similar to Drupal, with articles (nodes), comments, users and categories (taxonomy terms). The data from the table wizard can be used by the migrate module to map Vivvo content to Drupal. This can be quite tricky though, because not everything is automated. We needed to clean up and prepare Vivvo tables with several custom SQL queries.

But after that, through trial and error we discovered the correct migration mappings. You can save such mappings for later use, which made importing and re-importing a piece of cake! The Drupal batch API takes care of proper imports. The Vivvo content is saved through Drupal's API's, which allowed us to actually import external images into respective CCK fields, then save them through the filefield API into the proper /sites/default/files folders.

If you ever need to migrate an existing CMS to Drupal, be sure to check out Table Wizard and Migrate! They make a deadly accurate combination.

Extending the News Portal

Part of the job was extending the current portal's feature set. New layouts and a design were created to support new features such as user blogs and books.

The website's foundation is built on the divine couplet Views + CCK. Combined with the powerful Panels module, the Arabiyat homepage was rebuilt to look more like a proper Web magazine.

The Arabiyat website now holds nearly a thousand nodes. About half of them are editor's articles, interviews and background stories. The other half consists of user blog entries. The Arabiyat website's permission system was configured to allow blog authors to have control over their own node's comments, using the usercomment module.

One thing we initially felt was missing in Drupal was a way to control node add access rights on a per category basis. For instance, certain users should only be allowed to add content to the 'Health' category. Our categories are set up as taxonomy terms. Luckily, there is a module for that, and it's called Term Permissions. The Term Permissions module shows access configuration on the 'edit term' page, for both user roles and individual users. Morningtime extended Term Permissions with an experimental sub-module called term_permissions_advanced, which moves the taxonomy access rights to a user tab accessible by admins.

Another important feature for Arabiyat is the use of the Drupal Books module. We extended it with BookMadeSimple, Advanced Book Blocks and the Outline Designer to ease working with books.

Arab Community and Facebook

Being a German company, Arabiyat was our first client from the Arab world. We learned a lot from the collaboration. It turns out that Facebook and Twitter are equally popular and widespread as in the "West". Arabiyat.com has its own Facebook fanpage with over 1,500 members. For this reason we implemented the Facebook Connect module. It both helps users to login at Arabiyat.com, but also enables users to invite their friends and post their comments back to Facebook.

Working with RTL languages and Drupal

The Arabic language is read from right to left. We needed to find a solution that allows non-Arabic people to use the site admin system, as we can't read Arabic at all! Turns out there's a module for that called Admin Language that allows users to select a language for the admin section.

Other than that, it was an interesting experience to build our first RTL website. We bumped into several issues and bugs in Drupal modules that work fine for LTR languages. We ended up solving a CSS bug in the Vertical Tabs module, now part of D7 core, and pointed out another Javascript RTL bug in the popular Admin Menu module.

Working with URL aliases was also a new experience. Although modern browsers support foreign scripture, like Arabic, Greek or Chinese, it doesn't look pretty when URL encoded. A major issue was how to deal with taxonomy term URLs. We didn't want to use the boring taxonomy/term/x format, but there was no existing way to add a custom URL. That's where the Term Fields module jumps in. Term fields are like CCK fields for taxonomy terms. You can add several widgets. We used a text field to enter a custom English name for each Arabic taxonomy term. The term fields can be used as tokens in the Pathauto module. Another problem solved!

Mobile website

Finally, we tried to build a mobile version of Arabiyat: www.arabiyat.mobi. Standing on the shoulders of giants we implemented the awesome Mobile Tools module, combined with WURFL and Browscap for device detection. The Panels module is used to serve an alternative mobile homepage through custom PHP visibility rules (running device detection through WURFL). Though the mobile section is extemely simple, it serves its purpose and should be considered a version 1.0 alpha.

On a final note, I have to acknowledge that Arabiyat.com is built on the performance-optimized Pressflow Drupal distribution from Four Kitchens.

For further information

Morningtime Digital Agency
Drupal Development and Design
Mathijs Koenraadt (CEO)
info (@) morningtime.com or please use my Drupal contact form

Comments

bgogoi’s picture

##We needed to clean up and prepare Vivvo tables with several custom SQL queries.

has anyone else tried this? Perhaps the developers can pastebin some cleanup code examples.