Setting Up a Development Server

When developing a theme or tweaking a Drupal Web site, a local Web server is very handy to speed up the process of developing and testing. Several software distributions that come preconfigured with Apache, PHP, and MySQL are available their use largely simplifies the setup of a Web server. These packages usually have a straightforward installation routine download the package, extract the files, and click the Start server button. Of course, there are many ways to install a server only a few of...

Control Panel

Control Panel is a module that creates a series of icons for the administration of your Drupal installation. It matches the administrative URL from a menu onto a graphical icon. A control panel can be built from any Drupal menu. With the Control Panel module, a full-page option is created and can serve as an alternative to the administrative home page (Figure 8.13). To implement this approach, replace the existing link to the Admin page with a link to the control panel. You may also choose to...

Images Hosted Offsite

If you want to insert an image occasionally and do not want to install image-related modules, you can use an offsite hosting service, such as Flickr, to house your images. Flickr encourages you to display images from their hosting service in your site. It has two requirements (1) You must have permission to include the photo in your own work (whether it is your own photo or an image that is available for use under a Creative Commons license) and (2) you must link the photo back to Flickr's Web...

Granting and Revoking Permissions

To change the permissions available to each user, you may click on the link edit permissions next to the name of the role. To see the full matrix of all permissions for all roles, navigate to Administer, User management, Permissions. The role summary page also contains a text link to this page. The programming team for every module has made some decisions about the default permissions for its module. In most cases, all permissions are not enabled when a new module is installed. In Figure 7.7,...

Configuring Document Root and Virtual Hosts

If you're unhappy with the default document root (the place where your Web server files are located), you can change it by modifying Apache's configuration file. To do so, you typically have to locate httpd.conf, as it is the main configuration file. Use Table A.1 to find the file location for your setup. Use the MAMP control panel (Preferences Apache) or In the configuration file, look for a line beginning with DocumentRoot. The path that follows this directive (in double quotes) is the...

Theme garden

Our mission is to show Drupal Themes (Drupal 6) where to buy the best drupal hosting Bythemegarden - Posted on March 26th, 2008 There are many of you looking to buy the best quality Drupal shared hosting or the best quality Drupal hosting of some other web hosting type. If you are still reading this, you might be the one. What actually are you looking for We will try to help you to choose among the top quality Drupal web hosting providers and make you satisfied with your choice. Why don't we...

Image Module

The Image module is the oldest image-related modules in Drupal. It has been an integral part of many I can't believe it's Drupal Web sites, including the online arts community at http www.terminus1525.ca. This module allows users to upload images to Drupal. Images of predefined sizes are automatically created and can be integrated into the site. Specifically, images can be posted individually, included in stories, and grouped into galleries using taxonomy terms. To include a single image per...

Task Based Navigation

Regardless of the type of Web site you have created, there will be some tasks that you need to perform on a regular basis. These tasks may range from creating a simple blog entry to undertaking a more complex series of tasks, such as editing, reviewing, and publishing content submitted by multiple Web site authors. Drupal provides a navigation block for users who are logged into the Web site that contains links to Create Content, Administer the site, and Logout from the site. This block...

Installing Drupaland Common Hurdles to Its Installation

Once your Web server is working, installing Drupal is usually a fairly easy task. You may encounter some small hurdles when setting up the CMS, but these can be overcome quickly. As we walk through the installation process, you will get to know some of them. 1. Download Drupal. Go to http drupal.org and select Drupal 6 in the download section. Unpack it and copy the contents of the Zip file to your document root (or wherever you want Drupal to be located). When copying the package, make...

Task Based Organization

From the very beginning of your Drupal installation, you will be working with task-based organization. Your Web site might include tasks such as adding new content, moderating comments, searching or filtering the content, and viewing recently updated content. Figure 1.11 shows the task-based menu that Drupal provides to help organize these actions. You may also have a set of tasks that are available to different roles within your team of authenticated users. Task-based organization is...

Displaying Content

When designing your Web site's page layout, you must consider how content will be displayed on each page. The decisions you make at this point may affect the way you build your content types later on. Adding more fields to your content type allows you to have greater control over how the information is displayed. For example, the front page of your Web site may have a simple list of titles, each of which leads to a full story alternatively, you may have a more complicated list, where the link...

Page Content Drupal Messages and Help Text

Content is the most important part of your Web site. You must tell Drupal where to insert content into the page template This is done with a simple variable, content. You may place this variable anywhere in the template file page.tpl.php. From this simple variable, Drupal may present a single node, or a list of nodes, or whatever else Drupal may prepare as the content for any given page. You must also print the title for this content using the variable title. It is different than the variable...

Adding Block Editing Capabilities to a Theme

If you have chosen a different parent theme as your subtheme, you will not have access to the Zen Edit block function. Moving the functionality from the Zen theme to your own theme is not difficult, however, and requires only careful copying and pasting. Follow these steps to merge the necessary Zen functions into your own theme 1. Open the Zen theme file template.php and copy the contents of the function zen_preprocess_block. 2. Open your own theme's file template.php and look for the function...

Converting a Drupal x Theme to a Drupal x Theme

Drupal themes have changed radically from version 5 to version 6 however, there is no reason to change the design of page that is displayed to Web site visitors when you upgrade the theme from one version of Drupal to another. Keeping this point in mind, you should find it a relatively quick task to upgrade a theme with only a few minor changes to your current theme files. Work through the following checklist to create a Drupal 6 theme 1. Create an information file for your theme. This file...

Horizscrollhtml

The horizscroll.html file contains the HTML code that allows the JavaScript code from horizscroll.js to attach its behavior. It also contains all variables for the data source. lt xml version 1.0 gt lt DOCTYPE html PUBLIC - W3C DTD XHTML 1.0 Strict EN lt html xml lang Men lang en gt lt head gt lt meta http-equiv Content-Type content text html charset utf-8 gt lt link rel stylesheet href horizscroll.css type text css gt lt script src jquery.js lt script src drupal.js lt script src horizscroll.js...

Custom Error

One of the disadvantages of using the built-in Drupal error-handling techniques is that the error pages are actual nodes in the database. As a consequence, they may show up in search results pages. An alternative to this approach to error handling is to use the Custom Error module. This module can be downloaded from the project page at http drupal.org project customerror. Instructions explaining how to install modules can be found in Appendix A. Once the Custom Error module is installed, you...

Calling the Server with Xml HttpRequest

You almost certainly have heard of AJAX, a term coined in 2005 for the process of loading data within the lifetime of a Web site. AJAX makes it possible to develop Web sites that change their content dynamically without needing to preload all possible content or resorting to reloading the page. AJAX, which stands for Asynchronous JavaScript and XML, is based on the XmlHttpRequest technology introduced by Microsoft in Internet Explorer. XmlHttpRequest was originally created to facilitate the...

Disqus

Disqus pronounced discuss is a service and tool for facilitating web comments and discussions. The Disqus comment system can be plugged into any Web site, blog, or application. It makes commenting easier and more interactive, while connecting Web sites and commenters to create a thriving discussion community. Disqus makes it easier for people to comment and track their contributions on a single profile, which they can display as a comment blog. After all, there really is no difference between a...

Structure of the preprocessblock Function

The function preprocess_block receives a copy of all ofvariables prepared by Drupal for blocks vars . This list includes everything its ID, the module that created the block, the region where the block should appear, and the title of the block . In addition to blocks, special preprocess functions are available for pages, blocks, and nodes. To obtain a full list of all variables created by this block, issue the following PHP command inside the preprocess function to print the variables to the...

Applying a Separate Administrative Theme

Content managers and Web site administrators may be accustomed to having a visually distinct management area within the Web site that looks very different to the public Web site. By default, Drupal uses the same theme for both the administrative and public versions of a Web site. This behavior is unlike that of other Web publishing platforms. For example, WordPress uses an administrative dashboard with a distinct view site link near the top of the page. In Joomla , the administrative area is...