Drupal + Formulize. A Step-by-Step Guide to Integrating Drupal with XOOPS/ImpressCMS, and installing and using the Formulize module



Similar documents
Montefiore Portal Quick Reference Guide

HowTo. Planning table online

Using Internet or Windows Explorer to Upload Your Site

Welcome to Collage (Draft v0.1)

This installation guide will help you install your chosen IceTheme Template with the Cloner Installer package.

Content Management System

My Secure Backup: How to reduce your backup size

Installing buzztouch Self Hosted

Introduction to Open Atrium s workflow

Lets Get Started In this tutorial, I will be migrating a Drupal CMS using FTP. The steps should be relatively similar for any other website.

EBOX Digital Content Management System (CMS) User Guide For Site Owners & Administrators

Community Edition 3.3. Getting Started with Alfresco Explorer Document Management

How To Set Up Dataprotect

CEFNS Web Hosting a Guide for CS212

enter the administrator user name and password for that domain.

owncloud Configuration and Usage Guide

5. At the Windows Component panel, select the Internet Information Services (IIS) checkbox, and then hit Next.

Using SSH Secure Shell Client for FTP

uc\wjones Step 1. Logging In Go to the URL (Website address) below:

Instructions for using VPN and accessing your files remotely

REDUCING YOUR MICROSOFT OUTLOOK MAILBOX SIZE

Technote 20 Using MSIE to FTP into an AcquiSuite

How To Sync With Outlook With Google Apps On Your Gmail On Your Pc Or Macintosh Outlook On Your Android Or Ipo On Your Ipo (For A Macintosh) On Your Computer Or Ipok (For An Ipo) On A

Livezilla How to Install on Shared Hosting By: Jon Manning

MASTER DRUPAL 7 MODULE DEVELOPMENT

Click the "Connect" button. You should now see the following screen:


We begin with a number of definitions, and follow through to the conclusion of the installation.

I. Delivery Flash CMS template package II. Flash CMS template installation III. Control Panel setup... 5

FireBLAST Marketing Solution v2

Site Maintenance Using Dreamweaver

OET Cloud Services Getting Started Guide

Administrator Instructions for Link2CDMS Contractor Document Management System

Simple, Secure User Guide for OpenDrive Drive Application v for OS-X Platform May 2015

Welcome to EMP Monitor (Employee monitoring system):

User Guide. Version R91. English

HELP DESK MANUAL INSTALLATION GUIDE

Enterprise Data Integration (EDI)

2011 ithemes Media LLC. All rights reserved in all media. May be shared with copyright and credit left intact.!

Create e-commerce website Opencart. Prepared by : Reth Chantharoth Facebook : rtharoth@yahoo.

VIP Help Desk Web Application User Guide Version 3.0

Client Configuration Guide

System Administration and Log Management

Drupal Site Administration Guide. Cal Poly Specific Information

Advanced Digital Imaging

How To Backup A Database On A Microsoft Powerpoint 3.5 (Mysqldump) On A Pcode (Mysql) On Your Pcode On A Macbook Or Macbook (Powerpoint) On

CHARTER BUSINESS custom hosting faqs 2010 INTERNET. Q. How do I access my ? Q. How do I change or reset a password for an account?

MiraCosta College now offers two ways to access your student virtual desktop.

Project management integrated into Outlook

Installation Guide. Research Computing Team V1.9 RESTRICTED

Windows Intune Walkthrough: Windows Phone 8 Management

All the materials and/or graphics included in the IceThemetheme folders MUST be used ONLY with It TheCityTheme from IceTheme.com.

FTP Service Reference

How to Add Users 1. 2.

NetSuite OpenAir Mobile for Android User Guide Version 1.3

Faith Lutheran College, Redlands. Install and Setup Office 365

Quick Start Guide. Hosting Your Domain

ewebextra OfficeMate Integration User s Guide

Link and Sync Guide for Hosted QuickBooks Files

USER GUIDE CLOUDME FOR WD SENTINEL

Welcome to PowerClaim Net Services!

USER GUIDE CLOUDME FOR WD SENTINEL

Technical Support Set-up Procedure

Finance Reporting. Millennium FAST. User Guide Version 4.0. Memorial University of Newfoundland. September 2013

SITE MANAGEMENT INTRODUCTION DEFINING A SITE

E-LEARNING STUDENT S MANUAL

Chapter 28: Expanding Web Studio

Salesforce-Wrike Integration Setup Manual

Getting Started with WebSite Tonight

Setting Up a Dreamweaver Site Definition for OIT s Web Hosting Server

AT&T Voice DNA User Guide

uilding a Branch Website using Wordpress

Dwebs IIS Log Archiver Installation and Configuration Guide for Helm 4

Installing Drupal on Your Local Computer

Timeless Time and Expense Version 3.0. Copyright MAG Softwrx, Inc.

Titan Apps. Drive (Documents)

Direct Mail Tutorial

Setting Up Your FTP Server

Intellect Platform - The Workflow Engine Basic HelpDesk Troubleticket System - A102

ewebextra OfficeMate Integration User s Guide

LEARNING RESOURCE CENTRE. Guide to Microsoft Office Online and One Drive

Installing Booked scheduler on CentOS 6.5

Thank you for deciding to read this book. I have written this book for you to learn Joomla! 1.5 as fast as possible.

Talk Internet User Guides Controlgate Administrative User Guide

Xythos on Demand Quick Start Guide For Xythos Drive

E-Commerce Installation and Configuration Guide

Online Client Portal Client User Guide

Encryption. How do I send my encryption key?

How to Use JCWHosting Reseller Cloud Storage Solution

Google Drive lets you store and share all your stuff, including documents, videos, images and other files that are important to

Learn how to create web enabled (browser) forms in InfoPath 2013 and publish them in SharePoint InfoPath 2013 Web Enabled (Browser) forms

Page1. Tera Doty-Blance

How to Setup, Install & Run a Website on your Local Computer. For WordPress - on an Offline Server - WAMP

Drupal Training. Create Content Creating content is the fundamental basis for building the UCSD School of Medicine's website.

SIMIAN systems. Sitellite Desktop User Manual. Sitellite Professional Edition

Document From MAXIMUM BUSINESS INFORMATION TECHNOLOGY ON A. OwnCloud User Manual. TO I Cafe`

Open Source Content Management System JOOMLA

How to use SURA in three simple steps:

Business mail 1 MS OUTLOOK CONFIGURATION... 2

OxyClassifieds Installation Handbook

Transcription:

Drupal + Formulize A Step-by-Step Guide to Integrating Drupal with XOOPS/ImpressCMS, and installing and using the Formulize module May 16, 2007 Updated December 23, 2009

This document has been prepared by Freeform Solutions. It is licensed under a Creative Commons license (attribution non-commercial no derivatives). To read this license, please visit this webpage: http://creativecommons.org/licenses/by-nc-nd/2.5/ca/ Table of Contents Introduction... 3 Why?... 3 Is this the CCK in sheep's clothing?...3 System Requirements... 3 Installation... 4 Part 1. Install Drupal... 4 Part 2. Install XOOPS or ImpressCMS...4 Part 3. Install Formulize...4 Part 4. Integrate Drupal and XOOPS/ImpressCMS...5 Theory (how does this work?)... 6 But wait, isn't that a huge headache?...6 Displaying something from Formulize in Drupal...6 Making a Form...6 Making a Custom "Screen"...7 Making the Screen Appear in Drupal...7 Cool, but how do I make applications with this?...8 What's Next?... 8 2

Introduction Drupal is a popular website content management system. Formulize is rapid application development toolkit, built as a module for the XOOPS and ImpressCMS object oriented website platform. This document explains how you can install XOOPS or ImpressCMS and integrate it with a Drupal installation. With that done, you can then build applications in Formulize, and have them appear as nodes inside your Drupal website. Why? Formulize is a powerful rapid application development toolkit. Unlike other RAD platforms or frameworks, Formulize is almost all "point-and-click"; you can build complex applications with multiple screens and custom behaviours, using mostly your mouse and little or no PHP code. Formulize focuses the design decisions and planning at the business logic layer, and it gives you a graphical user interface in your web browser for managing that business logic. This approach enforces standardization across different applications, and can make maintenance more efficient since all your applications are built in the same way on the same underlying system. As the RAD moniker implies, it can also let you build applications really fast. Is this the CCK in sheep's clothing? No. The CCK is an excellent and innovative tool that lets you extend and customize the types of content you manage in the Drupal content management system. Formulize gives you powerful tools for managing different types of data. Formulize is kind of like a CMS for data, that lets you create full applications with their own business logic. It is conceivable that some of the concepts and capabilities embodied in Formulize could be migrated to the CCK, or the Drupal core, but since 2007, there really hasn t been any movement in that direction. System Requirements Drupal 5.1 or higher (should work with 4.7 too) Download from: http://www.drupal.org XOOPS or ImpressCMS Download from: http://www.xoops.org Download from: http://www.impresscms.org Formulize Download from: http://www.freeformsolutions.ca/formulize A MySQL host (if your Drupal installation is not using one already) (Should be available from your web hosting provider already) 3

Note: Drupal and XOOPS/ImpressCMS must be installed on the same server for this to work, or you must be accepting remote includes on the server where XOOPS/ImpressCMS is installed. If safe mode is enabled on your web server, this means you probably need both systems in the same domain or subdomain. Installation Part 1. Install Drupal 1. Install Drupal. Follow all the normal procedures for doing this. Consult the Drupal docs for more information. Part 2. Install XOOPS or ImpressCMS 1. Create a MySQL database. Note the database name, and the username and password for accessing the database. 2. Upload or unpack the files into a folder on your domain, it could be any folder, it doesn't matter which just don't put it in the same folder as Drupal! (So if Drupal is at the root of your domain, make sure you put the other system in a subfolder.) 3. In a web browser, go to the location where you put the files. ie: if you placed them in a folder called "formulize" on yourdomain.com, then go to this location: http://www.yourdomain.com/formulize 4. The installation wizard should appear in your web browser. Follow the steps on the screen. You will be asked to enter the database name, username and password you recorded earlier. 5. During the installation process, you will be prompted to create a username and password for the first webmaster account. Once the installation process is complete, login using this username and password. 6. Go to the Administration area, by clicking the link in the User Menu after you login, and follow the instructions there (you will be asked to delete the install folder and make mainfile.php read only) Part 3. Install Formulize 1. Upload or unpack Formulize to the /modules/ folder in your XOOPS/ImpressCMS installation. Consult the Formulize readme for more information. All the Formulize files should be contained inside a folder called "formulize". ie: when you're done, you should have a folder called /modules//formulize/ and inside that folder are all the files for the Formulize module. 2. Login to XOOPS/ImpressCMS with the webmaster account you created during the install. 3. Go to the Administration side and select the Modules area. 4. Locate the yellow Formulize icon near the bottom of the page, and click the install icon to the right of that. You will be prompted to install the Formulize module. 5. Follow the other steps as outlined in the Formulize readme. 4

Part 4. Integrate Drupal and XOOPS/ImpressCMS 1. Open up the index.php file at the root of your Drupal installation, and add one line to it, around line 15, after Drupal has bootstrapped itself: require_once "[root path]/[xoops/icms folder]/mainfile.php"; Replace [root path] with the root path to the web folder on your server, for instance, "var/www/yourdomain.com". Replace [xoops/icms folder] with the name of the folder where XOOPS or ImpressCMS is installed. The point here is to include the mainfile.php from the root of your XOOPS/ImpressCMS installation, wherever that is. 2. You need to make three other changes to the XOOPS or ImpressCMS system files. Exactly where you make the changes can vary from installation to installation, depending on the version of the software you are using. Fortunately, all the changes are very simple and are outlined below: In include/common.php, right after the session_start() function, add this line: if($user->uid) { $_SESSION['xoopsUserId'] = $user->uid; } That ensures that when a Drupal user is logged in, the corresponding user in XOOPS/ImpressCMS is also logged in (see below for more details). In class/xoopssecurity.php, find the checkreferer function, and add this as the first line in that function: return true; This ensures that database submissions initiated from Drupal will not be rejected. In class/database/mysqldatabase.php, add a fourth parameter, 'true', to the mysql_pconnect and mysql_connect functions, to ensure that XOOPS and Drupal can connect to the same MySQL host if necessary. 3. Lastly, if you are not running PHP in 'safe mode', then you may need to do one more thing, depending on the version of the software you are using. If you are running PHP in 'safe mode', then you can skip this step. You can tell if you are running in safe mode or not by checking the output of the phpinfo() function. If you are running in safe mode, open the mainfile.php at the root of your XOOPS/ImpressCMS installation, and try to locate an if condition that looks like this: if ( XOOPS_CHECK_PATH &&!@ini_get('safe_mode') ) { If that is present, then you need to comment out that entire if condition. This is necessary so that references from Drupal to include files are not rejected. To comment out the if condition, simply put a slash and asterisk before the 'if' and put an asterisk and slash after the closing brace. ie: /* if ( XOOPS_CHECK_PATH &&!@ini_get('safe_mode') ) { } */ // all the code that is inside the condition goes here 5

Theory (how does this work?) The idea behind this integration approach is that Drupal is your main website and handles all presentation of content, and is the main place where users create accounts and login. Meanwhile, Formulize is an independent application, which can feed content to Drupal (more on actually doing that below). There is an implicit assumption that the user table in Drupal and the user table in XOOPS/ImpressCMS/Formulize are parallel. User number 23 in Drupal should correspond to user 23 in the other system. If your Drupal site already exists, you may need to take an export of your Drupal user table and alter that data for importing into your XOOPS/ImpressCMS user table, via phpmyadmin or some similar tool. The same principle applies to the roles in Drupal and the groups in XOOPS/ImpressCMS. Permissions in XOOPS/ImpressCMS are applied to groups, which contain users, in much the same way that users can be assigned roles in Drupal. To make the administration of your Drupal site and your Formulize application as straight forward as possible, it would be wise to have parallel groups in XOOPS/ImpressCMS for each role in Drupal, and ensure that the groups and roles have the same users in them. But wait, isn't that a huge headache? It could be, absolutely. But Drupal's hook system is going to come to the rescue. Freeform Solutions intends to create a module for Drupal that will have hooks in it that listen for user events and role events. Whenever anyone creates an account or updates their account, or whenever a new role is created or a user is added or removed from a role, the module will update the other system s own database and ensure that your user tables and roles/groups are kept perfectly synchronized. Displaying something from Formulize in Drupal Here's how you can create a form in Formulize and display it in Drupal. This demonstrates the essence of how you get Formulize applications to appear in Drupal. Making a Form 1. Login to XOOPS/ImpressCMS and go to the Administration side, and go to the Formulize admin area (usually done by clicking on the yellow Formulize icon). 4. Click on the icon beside where it says "Create a form". Give it a name and allow more than one entry per user in this form. 5. Then add some elements to the form. It doesn't matter what they are. Just a few will do. 6. Then go to the main Formulize admin area, and click on the "Modify Form Access Permissions" icon. 6

7. Once in this area, select the Registered Users and Anonymous Users groups, and select the form that you made. (A Group is like a Role in Drupal.) Click the button to show the permissions for those groups for that form. 8. Give both groups view_form, add_own_entry, update_own_entry and delete_own_entry permissions. 9. Lastly, go to the XOOPS or ImpressCMS System Admin->Groups area, and make sure Registered Users and Anonymous Users have access to Formulize (the "Forms" module). With that done, you now have a form you can use. If you go to the front page of your XOOPS/ImpressCMS system, you should be able to access it through the Forms entry in the main menu, assuming you haven't altered the default block layout. Try it out there to see how it works. If you don't like the way the default list of entries screen looks, don't worry, you can change that. In fact, you have to create a custom "list of entries" screen for this form in order to access this form easily from inside Drupal. To make a custom screen, do this: Making a Custom "Screen" 1. In the Formulize admin area, click the link for the Settings page, for the form you made. It has the icon with the letter and @ symbol on it. 2. At the bottom of the page is a section called Defined Screens for This Form. Select List of Entries in this form and click the Add it now! button. 3. On this page, you can alter everything about the list of entries screen. You can change the default view, you can change the text on the buttons, turn the buttons off, create new buttons with special effects, and control where all that stuff appears on the screen if you want to make a custom template. Experiment with the options if you want, but to get something to appear inside Drupal, you don't need any options in particular. You just need to save the screen so that one exists, and then we can make a node in Drupal that will display the screen. 4. Note the SID number for your screen after you've saved it. Making the Screen Appear in Drupal 1. In your Drupal site, click Create Content. Add a new Page node. 2. In the body of the page, type this: <?php $formulize_screen_id = 1; include XOOPS_ROOT_PATH. "/modules/formulize/index.php";?> 3. Set the input format to PHP code, optionally give the node a menu entry of its own, and save it. 7

You should now have a page in your Drupal site that displays a screen created in Formulize. (Screen number 1 if you use the exact code above. Use a different number to display a different screen.) You can update information in the form, and all the data should be saved appropriately, and the information should be visible appropriately as well. Keep in mind that anonymous users, ie: users who are not logged in, all share access to the same set of entries. Also remember that Formulize will try to login the user in its own user table that has the same user ID as the user currently logged in through Drupal. Cool, but how do I make applications with this? By creating a series of customized screens, you can make any sort of data input/output application that your site needs. For instance, a simple project management tool might have a screen where people input projects and tasks on those projects. Then it might also have a screen where people could view the tasks that are assigned to them, and perhaps another screen where managers could see a list of tasks that are overdue. It is fairly easy to create that kind of application using Formulize, simply by making the forms that you need for the data containers, plus the various screens you need for people to interact with. By using the powerful "Save Current View" feature, and then limiting your custom screen to just those views, you can have several variations of one screen that are all easily accessed through the "Current View" drop down list. What's Next? Freeform Solutions intends to streamline this whole process with Formulize 4. A companion Drupal module will make the integration with Formulize as easy as creating normal nodes in Drupal, and the synchronization of users and groups will be automatic. No hacking of the Drupal core will be required either. We hope you found this introductory "proof-of-concept" interesting and exciting. You can stay in touch with the development of Formulize, and get support for using Formulize, through: http://www.freeformsolutions.ca/formulize Thanks for reading, good luck with your websites! 8