Setup the drupal module

Configuring and running the Account Management System by using the Drupal Module

 

Introduction

The AMS Drupal Module is an expansion of the older Ryzom Core Drupal Module. It allows you to easily add the entire account & ticketing system into your drupal website by adding an AMS block to your page as will be shown in this article.

If you want information about the design, take a look at the page AMS Design Info

Location of the drupal_module code

You should have 2 AMS related folders located at code/ryzom/tools/server, namely:

  • ryzom_ams (the system)
  • ryzom_ams_docs (documentation)

The drupal module is located at: ryzom_ams/drupal_module/ryzommanage

Installing & configuring Drupal

If you haven't downloaded and installed drupal yet, you should do it now!

Download can be found at: https://drupal.org/download

The drupal module is made to work on Drupal 7! Keep this in mind and try to install and download the correct drupal version!

Next install drupal on a location of choice (for simplicity we use /home/username/mydrupalsite) , you will later add this location to your apache site list.

Installing drupal isn't hard at all, perhaps the following page might help https://drupal.org/documentation/install

Complete the Ryzommanage module

The ryzommanage module isn't complete, not all functionality is packed in the module itself (for example the ams_lib isn't included, this because else we have to be consistent to update the lib in the module every time we change something)!

  • You have to copy manually the ams_lib folder located at ryzom_ams/ams_lib and place it in the ryzommanage module at ryzom_ams/drupal_module/ryzommanage
  • You also have to copy the inc/ and func/ directory located at ryzom_ams/www/html and place them also at ryzom_ams/drupal_module/ryzommanage

    IMPORTANT: Don't replace the files that are already in the modules inc/func folders, this is because at this moment they use another version.

normally you now should have the following files/dirs in your ryzommanage module:

  • config.php
  • ryzommanage.info
  • ryzommanage.module
  • ryzommanage.install
  • templates (folder)
  • inc (folder containing the files of the modules and the new added files of the www/html)
  • func (folder containing the files of the modules and the new added files of the www/html)
  • autoload (folder)
  • ams_lib (folder)

Add the module to drupal

After your drupal website is installed, you can easily add the module by copying the folder ryzom_ams/drupal_module/ryzommanage, to /home/username/mydrupalsite/sites/all/modules.

That's the location where all your non-drupal-core modules should be placed!

Preparing packages

You will need the same packages installed as enlisted on the Setup the AMS page.

Configuring Apache

For current Ubuntu versions you can just edit the file default in /etc/apache2/sites-available/.

Change the path to where you installed the drupal website!

drupal entry in apache

Listen 40917
<VirtualHost *:40917>
    <Directory "/home/username/mydrupalsite">
    Options -Indexes FollowSymLinks MultiViews
    IndexOptions FancyIndexing FoldersFirst NameWidth=*
    AllowOverride All
    Order allow,deny
    Allow from all
    </Directory>
    ServerAdmin admin@localhost
    DocumentRoot /home/username/mydrupalsite
    ServerName localhost
</VirtualHost>

Change the configuration settings

This again, is comparable to the explanation in Setup the AMS except that in the drupal module's config.php file we used the drupal function variable_get(), you should only edit the second parameter.

Run the install.php script

Currently this has to be done like described in the Setup the AMS page, though in the future we will let the ryzommanage.install do it's job!

Importing the users of the shard is not possible if you use the drupal_module, this because drupal uses another password hash

Stuff you need to do on the website itself

Enable the module

Now enable the module, by logging in to your drupal website with the admin account and go to the module admin panel. At the bottom you will find our ryzom plugin, enable it!

Setup extra settings

By going to the configuration tab of the drupal admin panel, you will find 'Ryzom Server Integration' which holds a few settings.

Setup the block on a page

Now go to the Structure tab of the admin panel, click blocks and set the "Ryzom Manage User Block" as Header and the "Ryzom AMS Block" as Content.

Normally the "Ryzom AMS Block" is configured to be only shown on the /ams page.

The result