Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Events
Videos
Audiobooks
Packt Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds

How-To Tutorials

7019 Articles
article-image-product-cross-selling-and-layout-using-panels-drupal-and-ubercart-2x
Packt
25 Mar 2010
7 min read
Save for later

Product Cross-selling and Layout using Panels with Drupal and Ubercart 2.x

Packt
25 Mar 2010
7 min read
Product cross-selling Product cross-selling is a very powerful policy that you might be familiar with. For instance Amazon.com was one of the early adopters of recommendation systems in a very sophisticated manner, and it boosted its online selling rates by hundreds of millions of dollars. If we move on to more algorithmic complexity, a more sophisticated example is Netflix, an online movie rental service, and the core of its business is its recommendation system and the hype that surrounds it. Finally, the most recent and simplest to implement is Last.fm with a very elegant and efficient recommendation algorithm. By adopting Drupal and Ubercart, things become pretty straightforward, as you have good modules that encapsulate the complexity of recommendation algorithms and require little configuration, and you may as well provide to your end customers a great consumer experience. In addition to that, do not forget the powerful and robust taxonomy mechanism that Drupal implements in its core and the site-wide content tagging it provides, so the relevant items and items that could be used in conjunction could be categorized. So now without further delay, we will go through all these interesting possibilities that our Drupal online shop could offer. Using taxonomies As we have already mentioned, taxonomies are the core of the Drupal system and grasping the high-level implementation can save us a lot of trouble most of the time. Taxonomies often help us create references for our Drupal system nodes, differentiate between them, and create easy-to-use, intuitive, and searchable views on our content. Therefore, in our example, the basic idea is to create a taxonomy not only for products that can be sold as groups (as we already have Ubercart product kit for that), but rather for the products administrator to be able to tag all these relevant products in a way that high-revenue electronic shops like ExpanSys and PixMania have adopted. To achieve this we do not need any new module installation but rather the plain old Drupal taxonomy system. We will make two taxonomies: one for product mangers, which they can edit while they add new products, and another in which users can free tag your content. These free taxonomy vocabularies are also referred as folksonomies. Furthermore, everyday practice has shown that relevant taxonomy blocks can really boost your site traffic, page views, and eventually conversions that translate to purchases. The vocabularies that we will alter are the following: Community Tagging. We need this particular free tagging vocabulary to allow our end users to tag the products of our site in order to provide non-intuitive connections. Product Types. This stands for an internal tagging vocabulary with predefined terms namely offer, best price, and new product and will help create the corresponding views in order to perform product promotion in your online electronics shop. To create the new vocabularies and change the existing one, we take the following steps: Navigate to Administer | Content management | Taxonomy. Click on Add vocabulary. Fill in the name as "Community Tagging" and provide a short description. Choose Product and Product Kit as the Content types that will be associated for tagging. In the Settings pane choose Tags to allow free tagging and Multiple select. Finally choose Not in Sitemap for XML Sitemap. To add another taxonomy for product visibility options and positioning, go back to the taxonomy page and again click on Add vocabulary. Add the name "Product Type" along with a short description and click on Product and Product Kit in the Content types section. Finally add a priority 1.0 to the XML sitemap element and click on the Save button. Navigate to your newly created vocabulary terms and add the terms "offer", "best price", and "new product". This is an example of a user-defined term-tagging procedure on one of our products. Use Taxonomies for Navigation and MenusYou can also use Drupal's system pages using the taxonomy view module for category listings. The end of the URL should look like this: taxonomy/term/1 or taxonomy/term/2.Note that taxonomy URLs always contain one or more Term IDs at the end of the URL. These numbers, 1 and 2 above, tell the Drupal engine which categories to display. Now combine the Term IDs above in one URL using a comma as a delimiter: taxonomy/term/1, 2. The resulting listing represents the boolean AND operation. It includes all nodes tagged with both terms. To get a listing of nodes using either taxonomy term 1 OR 2, use a plus sign as the operator: taxonomy/term/1+2 Using recommendation systems Recommendation systems have existed a long time and make a crucial contribution in some of the most successful online shops. In this section we will focus on examples of implicit data collection of the customer's activities that include the following: Observing the items that a user views in an online store. Analyzing item/user viewing time. Keeping a record of the items that a user purchases online. Obtaining a list of items that a user has listened to or watched on his or her computer. Analyzing the user's social network and discovering similar likes and dislikes. Having these data and customer behavior in our account, it is then easy to find the optimal item suggestions that fit people's profiles. We can then provide sections like "customers who bought this book also bought" on Amazon.com suggestions. Further to our discussion we will install recommendation API and two other modules that depend on it. The Ubercart-oriented module is the Ubercart Recommender module. This module collects data through the Drupal Core Statistics module about user purchases and provides suggestions about other products that could be relevant to the returning customer. All recommendation systems assign special weights in their recommendation algorithm to purchased products since this generates returned value and we have a fully converted customer. In order to handle suggestions to users that have not made any purchases yet from our online shop we will also use the Browsing History Recommender and Relevant Content modules. You can find more information about the algorithms and the recommendation procedure implemented in the Drupal Recommender API at http://mrzhou.cms.si.umich.edu/recommender. Next we provide a synopsis of the added value and the functionality of each module: Browsing History Recommender: This module adds two blocks in your site "Users who browsed this node also browsed" and "Recommended for you". To calculate the recommendations, this module uses Drupal statistics and in particular the history data and keeps track of 30 days of users' node browsing activity. The "Recommended for you" block provides personalized node recommendations based on a user's node browsing history. Relevant Content: This module provides two ways of referencing content relevant to the node in sight. Both of these methods provide configuration to filter for specific content types and vocabularies, limit the maximum size of the result, and provide some header text. The result in both cases is a list of nodes that the module considers most relevant, based on the categorization of the current page. You can configure multiple blocks with individual settings for node type, vocabulary, maximum result size, and optional header text. Ubercart Products Recommender: This module actually adds two extra block in our blocks section, one named "Customers who ordered this product also ordered", which performs a cross check between orders of customers that bought the particular product in sight and another named "Recommended for you", which provides personalized products recommendations based on a user's purchasing history. To configure your online shop to provide content-related recommendations we need to perform the following administration steps: Download Recommender from Drupal.org by navigating here:http://mrzhou.cms.si.umich.edu/recommender Unzip the file in your site's modules directory. Navigate to the modules administration screen and activate this module. Follow the preceding procedure for the following modules also:http://drupal.org/project/relevant_contenthttp://drupal.org/project/history_rec andhttp://drupal.org/project/uc_rec After you have uploaded and installed all modules you will be able to see the following blocks in your blocks page (Administer | Site building | Blocks). Although these modules have configuration screens, they do need extra configuration or property change actions and can be assigned to your theme regions as they are from the blocks section. You can find a very thorough discussion about all recommendation modules on Drupal at http://groups.drupal.org/node/12347.
Read more
  • 0
  • 0
  • 3304

article-image-content-management-modules-php-nuke
Packt
24 Mar 2010
10 min read
Save for later

Content Management Modules In PHP-Nuke

Packt
24 Mar 2010
10 min read
Each of these modules handles a different type of content, as is hinted at by their name, and each offers a different amount of functionality for visitors to interact with the content. We will see all of this, and also see how each module organizes the content it manages. Content The Content module, as the name suggests, simply handles content. The Content module is handy for adding general pieces of information to your site, which are not particularly time-sensitive or intended to generate discussion. The 'content' of the Content module is called a content page, and content pages may be organized into categories. Note that these categories have nothing to do with the categories created for news stories. In fact, several of the modules in this article will organize their content into 'categories', and there will be no relation between the categories of one module and the categories of another module. A content page consists of some main page text, a title, a subtitle, a header and footer, and another field, called the signature. The display of a single content page may be split easily across several web pages, with PHP-Nuke providing Next and Previous page links automatically. Content pages are ideal for holding general pieces of HTML text that need to be organized into groups or categories. Using the Content module to handle such information means that you do not have to create a new module just to display things like site policy or privacy policy documents on your site. Content pages are not searched by the Search module. There are no comment features or ratings available for Content content, and only the administrator may add pages; there is no place for user-submitted content here. In versions of PHP-Nuke prior to 7.5, there was a module called Sections, which was almost identical in functionality to Content, with the addition of an image for the categories. From PHP-Nuke 7.5, the Sections module is no longer shipped with the standard installation of PHP-Nuke, and we will not consider it any further. Like the other modules, the Content module is not activated by default, if you didn't activate the Content module before, do so now. Time For Action—Creating a Content Category We are going to use the Content module to add site 'policy' documents, in this case a site Privacy Policy. Log in as administrator. To access the Content administration area, click on the Content link in the Administration block, or click on the Content icon in the Modules menu: In the Add a New Category panel, enter the text Site Documents into the Title field. Enter the following text into the Description field: Here you will find a collection of documents about the site. Click the Add button. When the page reloads, there isn't much evidence that your category has been entered, but if you scroll down the screen to the Edit Category panel, you will find the category in the Category drop-down box: What Just Happened? We just added a content category. They are added from the Content Manager area of the administration area. The disconcerting thing is that it's difficult to tell if your category has been added successfully; there is no list of the content categories displayed in the Content Manager area. You will have to look in the drop-down box in the Edit Category panel to confirm that your category has indeed been added. Now we have a category, let's add some pages. Time For Action—Adding a Content Page In the Content Manager area of the administration area, scroll down to find the Add a New Page panel. Enter the title of the page into the Title textbox. In our case, this page will be titled Privacy Policy. Select Site Documents from the Category drop-down box. Enter the Dinosaur Portal Privacy Policy into the Sub-Title field. Next comes the Header Text. Enter the following into that field:This policy applies to all web sites and email services provided by the Dinosaur Portal. By using these web sites you consent to the general terms and conditions of usage and to the terms of this privacy policy. The Page Text field contains the body of the page. We'll enter the following: <h2>Collection of your Personal Information</h2><p>We will ask you when we need information that personally identifies you (personal information) or allows us to contact you. Generally, we request this information when you are registering before ordering products from theDinosaurPortal.com, downloading or viewing limited-access content, entering a contest, ordering email newsletters. In each circumstance we try to limit the information we request to the minimum required to deliver the service to you. We also use various standard technologies such as cookies to track user activity on our sites.</p><!--pagebreak--><h2>Use of your Personal Information</h2><p>We use your personal information for the following purposes...</p> There are two fields remaining, Footer Text and Signature. We'll enter this for the Footer Text:If you require any further assistance, please contact contact@thedinosaurportal.com and this for the Signature:the DINOSAUR PORTAL – Just because you've never seen one, doesn't mean they've all died out... Click the Send button. When the page reloads, the details of our first page are visible in the Content Manager panel, confirming its creation: Now click on the Content link in the Modules block, or go straight to http://localhost/nuke/modules.php?name=Content. You will see the list of content categories: Click on the Site Documents link, and you will see the list of content pages in this category: Clicking on the Privacy Policy link will take us to our document: Click the Next Page link to see the rest of the document: What Just Happened? We just added a content page, and then viewed the page. We assigned the content page to the Site Documents category when we created the page. It is possible to create content pages that do not belong to any category. The current list of content pages is shown in a table in the Content Manager area; we saw this screenshot at the end of step 11. When you visit the front page of the Content module, the list of categories is displayed. Only the categories that have content pages associated with them are displayed. Also, if there are any content pages not associated with a category, their titles will be listed here. Clicking on a category takes you to a list of the content pages associated with that category. This list is ordered by the date on which the pages were entered; the content page created first is displayed at the top of the list and so on. For each content page, the text entered into its Title field is displayed in this list, along with the Sub-Title in brackets. Clicking on the title of a content page will take you to display of the page itself. The following diagram shows this navigation hierarchy: Note that there is no direct link to go back from the content page to its 'parent' category. You will have to use the Back button of your browser to do this. You can get back to the list of all categories by clicking the Content link in the Modules block, but you will still need to click again on the category to display the list of content pages it contains. Returning to our privacy content page, we see that our content page has been split into two pages. This is done by inserting the text into the Page Text field, which forces PHP-Nuke to break the page at that point. The contents of the Page Text field form the body of a content page, with the Title and Sub-Title always displayed at the top. The Next Page pager is automatically provided by PHP-Nuke, and with that you can navigate through the pages of the content page. On the first page, the Header Text is displayed before the Page Text starts, and on the final page, the Footer Text is displayed at the end of the Page Text, followed by the Signature text. A copyright notice, including the site name, follows the Signature, and then there is the date the page was created, followed by the number of times the page has been read. Since we were still logged in as an administrator, at each part of this journey there are panels allowing you to edit the details of either the category or the content pages. For example, there is a panel for altering the category on the page displaying that category's content pages, in addition to a 'content page editing' panel on each page of the content itself: Any of these links can be used to change the object in question. Of course, these links are visible only to an administrator. No visitor will be able to see these links or access their functionality. Deactivating a page makes it invisible to a visitor from the list of available content pages, and the page will not be displayed even if the visitor manages to enter the URL of the content page. The administrator will be able to see a list of deactivated pages on the front page of the Content module (http://localhost/nuke/modules.php?name=Content) or in the Content Manager area of the administration area. Currently, our Privacy Policy document is at the URL http://localhost/nuke/modules.php? name=Content&pa=showpage&pid=1. To view this page, the visitor need not go through the entire Content 'hierarchy' if they are provided with a direct link. We could, for example, add a link to the Privacy Policy in the footer of our page, from the Web Site Configuration menu. The link would point to the above URL, and the reader would be taken directly to our document. The pid value of the query string is the unique identifier for this piece of content in the same way as we saw the story ID when looking at stories. This value will not change with subsequent modifications of the content page, or even moving it to another category. The Content Block The Content block is part of the standard PHP-Nuke installation, but isn't loaded. You can load this block from Blocks area of the administration area by selecting Content from the Filename dropdown, and choosing a title for the block as usually done for file blocks. Once the block is activated, it will display a list of the titles of all active content pages, with links to view each content page in full. Note that the Content block will still display the list of titles present in the content pages even if the user does not have read access to the Content module. Managing Categories Categories can be edited or deleted through the Edit Category panel in the Content Manager area. Simply select a category from the drop-down box and click the Edit button to go to the Edit Category page. Here you can edit the title and description of the category, or delete the category. Note that deleting the category does not delete the content pages associated with that category. All pages in a deleted category are preserved, but no longer belong to any category (they belong to the None category!). Special Administrator You can create a special administrator with rights to only the Content module in the Edit Admins menu of the Administration Menu. Restricting Access Access to the Content module is done on a 'whole module' basis. The visitor either sees nothing or everything. You cannot configure individual categories or content pages to be viewed by certain user groups. Points and Prizes There are no activities in the Content module that contribute any points towards a user's point score.
Read more
  • 0
  • 1
  • 3939

article-image-drupal-6-performance-optimization-using-db-maintenance-and-boost-part-1
Packt
23 Mar 2010
8 min read
Save for later

Drupal 6 Performance Optimization Using DB Maintenance and Boost: Part 1

Packt
23 Mar 2010
8 min read
These are not required modules, but rather are recommended modules to add to your Drupal performance arsenal. The way this article will work is that we'll outline the purpose of each module, install and configure it, and then use it on a specific topic, for example, within your site. This will give you some practice using contributed Drupal modules and also a look at the variety of performance based modules that are available from the Drupal project community. Using the DB Maintenance module The DB Maintenance module can be used to optimize your MySQL database tables. Depending on the type of database you are running, the module allows you to use a function called OPTIMIZE TABLE, which troubleshoots and then optimizes various errors in your MySQL tables. For MyISAM tables, the OPTIMIZE TABLE will repair your database tables if they have deleted rows. For BDB and InnoDB types of tables the function will rebuild the entire table. You can use this module in tandem with phpMyAdmin to determine if you do or do not need to optimize your database tables. The benefit of this module is that it allows you to keep your database optimized and defragmented, similar to keeping your computer hard drive optimized and defragmented so that it runs faster, and you can do all this from the Drupal administrative interface. The project page where you can download the module is here: http://drupal.org/project/db_maintenance. Download the module tar.gz and extract it to your desktop. Then, upload the files through FTP, or upload and extract using a cPanel utility if your host provides this. The module should go in your /sites/all/modules directory. Once you upload and extract the module folder, enable the module on your modules admin page and save your configuration. We'll use the version that's recommended for Drupal 6.x, which is 6.x-1.1. You can try out the beta version, but you should not run this beta version on a production level website unless you've tested it sufficiently in a sandbox environment. Once you save your module configuration, you'll notice that the module adds a link to its settings and configuration page under your main Site configuration section. Go to Site configuration | DB maintenance to access the configuration admin screen for the module. The DB maintenance screen will contain a checkbox at the top allowing you to log OPTIMIZE queries. If you check this box, your watchdog log entries module will log all table optimization entries and give you detailed information on the tables that were optimized. At the time of writing this article, the 1.1 version of the DB Maintenance module contained bugs that caused glitches with the method of adding this module's queries to the recent log entries or prevented this entirely. You may also experience these glitches. The module's developers are aware of the issues because they have been posted to the issue queue at http://drupal.org/ on the module project page. Let's go ahead and check this box. You can then select the frequency with which you would like to run the optimization. The choices are daily, Run during every cron, Hourly, Bi-Hourly, Daily, Bi-Daily, Weekly, Bi-Weekly, Monthly, and Bi-Monthly. You can also click on the Optimize now link to force the optimization to occur immediately without scheduling in advance. We'll click on this link for the purpose of this demo, but in future you may want to schedule the optimization. We'll then run a cron job through the Status report, or a module such as Poormanscron, and the tables will be optimized. Next, you can select the tables in your Drupal database that you want to optimize. A nice feature of this module is that it allows you to multi select database tables, only select a few tables, or just one table. This gives you the same flexibility and functionality as your phpMyAdmin tool, but you can run everything from within your Drupal interface. It's like a phpMyAdmin lite version right in your Drupal site. This is a preferred option for those developers who may not have immediate access to a client's phpMyAdmin or a host's database management utility. Choose a selection of tables that you want to optimize, or select all the tables. For this demo I'm going to optimize all of my content type tables, so I'll select all of those. I'll also optimize my block tables: blocksblocks_rolescontent_type_blogcontent_type_bookcontent_type_forumcontent_type_pagecontent_type_photocontent_type_pollcontent_type_storycontent_type_webform Once you've selected the tables you want to optimize, click on the Optimize now link. As with any module or optimization enhancement that you make to your Drupal site, it is good practice to run a full backup of your MySQL database before performing any maintenance, including optimizing tables using the DB Maintenance module. This way you will have a full backup of your data if you run into any issues that the module could potentially create. It's better to play it safe and perform the backup first. Once you click on the Optimize now link, you should receive a message notifying you that the Database tables are optimized. This concludes our discussion and walkthrough of using the DB Maintenance module. Let's now turn to the Boost module and use it to speed up our site page and content loads. Using the Boost module We' re going to turn our attention to the Boost module in this section. Boost is a contributed module that allows you to run incredibly advanced static page caching on your Drupal site. This caching mechanism will help to increase performance and scalability on your site, especially if it gets heavy traffic and anonymous page visits, and it is on a shared hosting environment. This is usually the first contributed performance-based module to turn to for help when you host your Drupal site on a shared server. Developers running Drupal sites on shared servers and running sites that serve predominantly anonymous Drupal users will definitely want to try out this module. It's also a fun module to use from a technical standpoint because you can see the results immediately, as you configure it. The Drupal project page for the module is here: http://drupal.org/project/boost. There is a wealth of detailed information about the module on this project page, including announcements about upcoming conference presentations that focus on the Boost module, testimonials, install instructions, and links to documentation and associated modules that you may want to run alongside Boost. It is very popular and has quite a following in the Drupal development community. I definitely recommend reading about this module and all of its install and configuration instructions in detail before attempting to use it. The install paragraph suggests reading through the module README.txt file before running the install for details on how the module works. There are also detailed instructions and documentation on the module here: http://drupal.org/node/545664. Note that the one requirement to use this module is that your Drupal site must have clean URLs configured and enabled. It's a good idea to make sure you are running clean URLs on your site before you start installing and configuring Boost. Additionally, there are some recommended modules that the developers encourage you to install in tandem with the Boost module. We will install two of these modules: Global Redirect and Transliteration. The Global Redirect module runs a number of checks on your website including the following: Checks the current URL for a Drupal path alias and does a 301 redirect to the URL if it is not being used. Checks the current URL for a trailing / and removes the slash if it's present in Drupal URLs. Checks if the current URL is the same as the site's front page and redirects to the front page if it locates a match. Checks to see if you are using clean URLs. If you do have clean URLs enabled, this module ensures URLs are accessed using the clean URL method rather than an unclean method (for example, ?q=user). Checks access to the URL. If a user does not have permissions to view the URL, then no redirects are allowed. This helps to protect private URL aliases. Checks to ensure the alias matches the URL it is aliasing. So, if you have a URL alias such as /about and this directs to node/23, then a user on your site can access the page using either of those URLs. The Transliteration module removes white space and non-ASCII characters in your URLs. For example, it will try and add underscores to fill white space in a URL. Installing and enabling these two modules will help remove glitches and errors in your site's path structure. If you haven't already, we'll also take the time now to install the Poormanscron module and set up and configure automatic cron runs instead of having to continue running cron manually. We'll return to installing and configuring Poormanscron later in this article, but just keep it on your radar for now. Let's go ahead and install the Boost module and take a closer look at some of its features.
Read more
  • 0
  • 0
  • 3410

article-image-story-management-php-nuke
Packt
23 Mar 2010
12 min read
Save for later

Story Management with PHP-Nuke

Packt
23 Mar 2010
12 min read
The Story Story In PHP-Nuke, a story is a general-purpose, piece of content. Maybe the story is an announcement, a press release or news item, or a piece of commentary or opinion, or maybe a tutorial article. The possibilities are almost endless! With PHP-Nuke driving your site, the stories that appear on your site are not restricted to ones written by you. Users of the site—either registered or unregistered visitors, or other administrators—can write and submit stories to your site. The process of a story appearing on the site is known as publishing the story. Of course this does not mean that your site is a free-for-all—stories submitted by users and others do not necessarily get published automatically—they are submitted for moderation by an administrator, and once approved, appear on your site. In this way, the content on your site grows itself through your community, but always (if you want) under your control. PHP-Nuke keeps track of such things as the author of the story, the date when the story first appeared on the site, and the number of times the story has been read, and also allows users to vote on the quality of the story. An impressive feature of PHP-Nuke stories is that users can comment on a posted story to build an open, topical discussion within your site. You will see community-contributed stories when you visit any typical PHP-Nuke site; for example, on phpnuke.org itself, PHP-Nuke users and developers submit stories describing their latest PHP-Nuke add-on, or drawing attention to the latest theme that they've designed. The 'story' engine in PHP-Nuke is provided by the News module. The total story functionality is actually spread across a number of modules, including Submit News, Stories Archive, Search, Topics, Your Account, and Surveys. We will explore all of these in this article. The Story Publication Process The path taken by a story from writing to publication depends upon who submits the story. The super user or an administrator with permissions for the News module can post a story through the administration area of the site. In this case, the publication process is simple, and the story appears on the site immediately, or can be scheduled for publication on a particular date. Since the super user and any other administrators with the appropriate privileges are trusted (they have full power over stories, so they had better be trustworthy), there is no need to moderate or approve the text in the story, and the story is ready to go. Registered and unregistered visitors can post stories through the Submit News module. When a story is submitted through this route, the publication process is lengthier. The visitor enters the story through a form in the Submit News module. The story administrator is notified that a new story has been submitted. The story administrator checks over the story, editing, rejecting (deleting), or approving it. The administrator is also able to add notes to the story. If the story is rejected, that is the end of the process, and the story is not published. If the story is approved, it is either published to the site immediately, or can be scheduled for publication on a particular date. Once the story is published to the site, the administrator can edit it further if needed. For a visitor, once they submit their story to the site they have no more control over the story. Finding and Interacting with Stories Stories on the site can be accessed in a number of ways, from a number of different places on the site. A limited number of stories can appear on the homepage, with older stories gradually moving down the list as newer stories are posted. Stories can be retrieved by date from the Stories Archive module. The text in the story is also searchable from the Search module, so that specific stories can be located easily. Stories are organized into topics, and by browsing the list of topics from the Topics module stories can be tracked down. Stories are not the end of content, they are actually the beginning. Comments can be posted about stories, and comments can be posted to these comments creating a discussion about the story. The quality of submitted comments can be assessed by users of the site and rated accordingly. The quality or value of the story itself can be voted on by users, links to related stories can be created, and you can view a special printer-friendly version of the story for printing, or even send the story to a friend. So many features... did I mention that you can also attach a poll to the story so that readers can participate in a survey related to the content of the story? So many features... Organizing Stories When you have even a reasonable number of stories on your PHP-Nuke site (and you will have—that's why you're reading this article series!), you will be in need of some organization for this content. PHP-Nuke provides two ways of organizing story content: Topics: what it's about Categories: what type of story it is Topics Topics define what a story is about. By organizing your stories into topics, stories about similar subjects will be grouped together for easy browsing and reading, and also to make it easier for people to contribute their stories to the right place. When you're reading through a number of dinosaur-related stories, the sudden appearance of a story about cars would be rather off-putting (unless it was actually about fossil fuels or dinosaurs eating/driving cars). PHP-Nuke does indeed offer organization of stories into topics, and before we can think of adding stories, we need to set up some topics for our stories. A topic has an associated image that is displayed on the site whenever you view a story that belongs to that topic, or whenever you are browsing the list of topics. The image overleaf shows a 'teaser' of a story displayed on our site; the topic image is shown to the right-hand side of the story: The Read More… link will take the visitor to the remainder of the story. Note that this arrangement of the story text and the topic image appearing to the right of the story is just the default layout due to the basic theme. When we come to look at creating our own themes, we will see how the topic image can be made to appear elsewhere relative to the story text. By default, there is a single topic called PHP-Nuke. This has its own image, which should only be used for the PHP-Nuke topic. Categories As topics define what a story is about, categories define the 'type' of story. A category could be something like a weblog entry, a security announcement, or a press release. There is one category defined by default, Article. This category has the following properties: You cannot change this category's name or delete it. Any story of type Article automatically appears on the homepage. Users can only submit stories of type Article. Compared to topics, categories do not have particularly extensive support in PHP-Nuke. Planning the Dinosaur Portal Topics and Categories Before we move on to looking at managing topics and categories, we'll quickly discuss the kind of topics and categories that we would like for organizing our stories on the Dinosaur Portal. These are not set in stone, and after we create them, we can edit or delete them, or even add new ones. First of all, there will probably be stories about the Dinosaur Portal itself that will contain general information about the site, such as new features that have been added to it, or warnings about planned site downtime (or apologies about unplanned site downtime!). We will also have stories about dinosaurs, fossils, and dinosaur hunting; these can be the other topics on the site. What types of story will we have? In addition to the standard article, we can have new theories, technologies, or discoveries, maybe even tutorials (for example, how to identify fossils, or how to avoid being eaten when dinosaur hunting). There will also be stories about Project Chimera, but we can't reveal what that is just yet. Thus a story about a controversial new dinosaur extinction theory could be given the 'dinosaur' topic, and the 'new theory' category. This isn't an exhaustive list, but it is enough to give an idea of the topic-category split. Topic Management Before we do anything else, we'll create our topics. For each topic, we'll add the images first. After we create our topics, we'll look at how to modify them, and the consequences of deleting topics. Before we get started creating our topics, we will add the topic images. To do this, you will need to copy all the files from the topics folder in the Ch06 folder of the code download to the images/topics/ folder in the root of your PHP-Nuke installation. You should have these files: thedinosaurportal.gif, dinosaurs.gif, fossils.gif, and dinosaurhunting.gif, in addition to files called index.html, phpnuke.gif, and AllTopics.gif, which were already present in the folder. The images/topics folder is the place where PHP-Nuke will look for the topic icons. When adding image files to the images/topics folder, ensure that only alphanumeric characters or the underscore are used in your filename, or else PHP-Nuke will fail to pick up the filename when displaying the list of topic images. Note also that the total length of the filename and its extension must not exceed twenty characters, or PHP-Nuke will truncate the name when it stores a record of the filename. In this case, your topic image will not be displayed, because PHP-Nuke has not stored the correct name of the file. Also, if your image has an extension of more than three characters (such as jpeg) then it will be missed by PHP-Nuke. The AllTopics.gif file in the images/topics folder does not correspond to a single topic, but is the image used when displaying the lists of topics. This file can be replaced by an image of your own. Time For Action—Creating New Topics Log in to your site as the administrator. From the Modules Administration menu, click on the Topics icon: You will come to the Topics Manager area. Scroll down to the Add a New Topic panel The first topic we create will be Dinosaur Hunting. Enter the text dinosaurhunting in the Topic Name field, enter Dinosaur Hunting into the Topic Text field, and select the file dinosaurhunting.gif from the Topic Image drop-down box: Click on the Add Topic button. When the screen refreshes, the newly created topic will be displayed in the Current Active Topics panel: This process can be repeated for our other topics: Topic Text   Topic Name   Topic Image   Fossils   fossils fossils.gif Dinosaurs   dinosaurs dinosaurs.gif What Just Happened? The Topics Manager, reached through the Topics icon in the administration menu, is the area from where we can add, edit, or delete topics. The Topics Manager has two panels, one showing the Current Active Topics, and the other being the Add a New Topic panel. A topic requires three pieces of data: A topic name, which is a short piece of text with no spaces. This is mostly used internally by PHP-Nuke. The topic name is usually the same as the topic text, but in lower case and with no spaces. The topic text, which is the title of the topic. The topic image, the name of which is selected from the list of files in the images/topics folder. You can use the same image for more than one topic if you choose. Once you have saved a topic, clicking on its image in the Current Active Topics panel takes you to the Edit Topic area, from where you can edit or delete your topic. You may have noted that we haven't created the Dinosaur Portal topic. We'll do that now by editing the existing default topic, since we would like this to be the default topic for the portal anyway. Time For Action—Editing Topics We will edit the default topic to get the Dinosaur Portal topic: In the Topic Manager area, click on the PHP-Nuke topic icon in the list of Current Active Topics. When the page loads, enter the details as shown below: Click on the Save Changes button to complete your editing. When the page reloads, you will need to click on the Topics icon again to return to the Topic Manager area, since you will be returned to the page for editing the topic. What Just Happened? We just edited the properties of an already existing topic. To get at a topic's properties, you click on its icon in the list of Current Active Topics in the Topic Manager area. The possible topic icons are again picked from the images/topics folder and displayed in a drop-down list for you to choose. Once you are done making changes to the topic, clicking on the Save Changes button updates the topic. Note that there is no cancel button, and if you decide to make no changes here, you can click on the Topics icon in the Modules Administration menu to return to the Topic Manager area, or use the back button on your browser. Deleting a Topic It is possible to delete topics by clicking on the Delete link next to the Save Changes button. However, deleting a topic will delete all the stories that belong to that topic. Fortunately, there is a confirmation screen before the topic is deleted: Since the Delete link is positioned so close to Save Changes, it's probably good that there is this screen. There is no turning back after you click on Yes on this screen. Your topic is gone, and so are all the stories, and any comments attached to those stories. Note that the image associated with the topic is not deleted, and it still remains on the server, and can be used for another topic if wished.
Read more
  • 0
  • 0
  • 2839

article-image-installation-drupal-and-ubercart-2x
Packt
23 Mar 2010
4 min read
Save for later

Installation of Drupal and Ubercart 2.x

Packt
23 Mar 2010
4 min read
You don't have to be an expert programmer or a system administrator in order to complete the following process. We'll first give you a brief explanation of the underlying technologies, and then we'll continue with a step-by-step guide. At the end of this article, you'll have the online store installed on your local or remote machine and you'll be ready to make all the required customizations to the frontend and the backend, depending on your needs. Minimum requirements for Ubercart installation In order to successfully install and use your online store, your system must meet the following requirements: Operating system: Drupal works fine in almost every operating system. Actually, you can transfer your Drupal installation from one operating system to another within minutes and no customization is required at all. All you have to do is to move the files and the database without altering any configuration files. For example, you can install Drupal on your local Windows or Mac computer, do all the customizations there, and then upload it to a Linux server to go live. Web server: The web server is the software that accepts HTTP requests from browsers and delivers web pages to the users of our site. The most popular web server is Apache and we'll use it for our installation. It's secure, extensible, fast, and easy to customize. If you're not an expert in another web server, there is no reason to think of any other solution, because most of the available information and support is about Apache. Database: The purpose of the database is to store, organize, manage, and retrieve all the data of our website in a structured way. When referring to data, we mean not only the content that you put in your pages, but also every piece of information that Drupal uses for all its functions. In this book, we're using MySQL as a database. Today, it's the #1 open source database, and it's used in millions of websites and applications, from small personal web pages to enterprise systems with millions of users.The MySQL database of a basic installation contains about 50 tables and every new installed module creates one or more new tables. If you check your database after the installation of Ubercart, you'll find that there are 100 tables in your database. These tables contain data such as pages, products, images, categories, orders, payments, caching information for your pages, theming information, comments from your visitors, menus, user information, and so on. PHP: PHP is a scripting language, ideal for web development. It began as a small personal project, but soon became a very popular scripting language. Drupal is written in PHP, so it's absolutely necessary and there is no alternative to it.Some PHP extensions are needed for our installation. We'll mention them briefly here, so you can consult your hosting provider or examine your local system to check that everything is fine. The easiest way to check your PHP parameters is to use phpinfo. It's a function that returns information about the PHP environment on your server. All you have to do is to create a blank file named phpinfo.php in your server and insert the following code using a text editor: <?php phpinfo (); ?> This is a small PHP script that runs the phpinfo function and displays the results on your screen. If you browse to phpinfo.php, you'll see a page with your PHP configuration. The basic PHP requirements are: PHP memory requirements: 1 6 MBs are enough for basic sites; however, 64 MBs are recommended for more complex installations. GD2 library: GD2 is an image manipulation library for PHP. Ubercart needs this library, so if we want to put images to our products, it has to be installed. Register Globals: This is actually a depreciated PHP feature, but some hosting providers with old systems still use it. It's a security risk, so it has to be disabled for Drupal to install. Safe mode: Drupal 6 doesn't support PHP's safe mode, because it causes problems to file uploads, so it also has to be turned off.
Read more
  • 0
  • 0
  • 2086

article-image-creating-voice-track-audacity-13
Packt
23 Mar 2010
2 min read
Save for later

Creating a Voice Track with Audacity 1.3

Packt
23 Mar 2010
2 min read
Recording voice tracks With your material—script, story, or notes—you're ready to go, right? We shall start with a standard manual recording session. The simple voice track This is the simplest recording session. When you're ready, carry out the steps below: Open any Audacity project that you created previously (if it isn't already open) on your computer. Take a deep breath, and then click on the Record button, as seen in the next screenshot, and start speaking aloud your script. Immediately, you'll see the project view portion of your Audacity window change. A voice track will appear, showing your recording, live! The left (L) and right (R) channels show the volume of your voice (shown in the bars in the upper-right-hand of the previous screenshot). The digital interpretation of your voice is shown in the audio track portion of the project view (the blue "lines", or sound waves, that you see on your screen). Don't let this make you nervous; just focus on delivering a great voice track. Keep reading your script or sample piece as naturally as possible. When you're done, click on the Stop button. As soon as you click on the Stop button, you'll see that the recording stops, all activity in Audacity stops, and recording is over. Save your track to the project folder so that you'll be ready to start editing it. From the main menu, select File and then Save Project. Recording TipKeep any paper (your notes or script) in a place that won't interrupt the recording session when you lip the pages—preferably away from the microphone, or already spread out in front of you so that you can refer to them without touching them. We will learn how to "silence" these sounds later on, but having a clean initial recording always makes it a little easier. That's it, you've just completed your first recording session with Audacity! It really is as simple as that. But, as with the first time I used the software, I know there are likely things that you would like to change. So let's discuss some additional techniques for recording voice tracks.
Read more
  • 0
  • 0
  • 3755
Unlock access to the largest independent learning library in Tech for FREE!
Get unlimited access to 7500+ expert-authored eBooks and video courses covering every tech area you can think of.
Renews at €18.99/month. Cancel anytime
article-image-recording-interview-skype-using-audacity-13
Packt
23 Mar 2010
4 min read
Save for later

Recording an Interview with Skype using Audacity 1.3

Packt
23 Mar 2010
4 min read
In a previous article we described everything that you need to know about recording voice tracks. In this article by Bethany Hiitola, author of Getting started with Audacity 1.3, we will learn all the details of using third-party internet telephony software such as Skype to record telephone interviews. We will also cover how to set up a timed recording. Recording an interview with Skype If you are interested in doing more than solo podcasts with Audacity, you can always try creating interview podcasts. You can record these live in your office with your computer's internal microphone, or with additional microphones. However, you can't always perform an interview from the comfort of your office due to conflicting schedules and the location of your interviewee. Hence, let's learn how to record an interview using your phone and your computer. First you'll need to install another software that allows you to make phone calls using your computer. The program we are going to use for this example is Skype. However, you could use other software that does the same thing for your Internet telephony set-up. Download and install Skype Skype is software that allows us to make voice calls over the Internet, particularly to other users of Skype. Some numbers (such as toll-free numbers) are free of charge, while calls to landlines and mobile phones may require a small fee. For details on pricing for Skype credits for landline and cell calls go to: http://www.skype.com/. Let's briefy discuss how to download and install Skype. First, go to http://www.skype.com/ and download the appropriate version of the software for your computer. Once the installation package has been downloaded to your computer, double-click on it to begin the installation. For Mac computers, a .DMG file is downloaded. All you need to do is uncompress that file and drag-and-drop the Skype package to the Application folder. For any Windows device, an .exe file is downloaded. Double-click on that file to begin the installation. For Linux, there are multiple distributions available. If you aren't already prompted to do so, start the Skype application and follow the on-screen instructions to sign up for a new Skype account. Once you have registered and signed in, the main Skype screen is displayed, which should look similar to the next screenshot: Set up Skype for your telephone interview For our project, we've been using the computer's internal microphone, so there shouldn't be any additional set up in either Skype or Audacity. However, to be sure you may want to check the recording input devices in Audacity to make sure that you can record both sides of the interview. To do this, use the following steps: In the Audacity window, go to the main menu, and then select Audacity and then Preferences. When using a computer running the Microsoft Windows or Linux operating systems, you can find these preferences from the main menu. Select File and then Preferences. In the Audacity Preferences window, select Devices. Check the Device settings under Recording. Particularly if you are using multiple inputs, it may be best to select Stereo Mixer or similar input. If there are many devices listed with the Recording | Device drop-down menu, perform a few interview tests with a friend on Skype prior to the recording session, to determine which of the connected devices will actually be doing the recording. You might also want to turn off all notifcations in Skype. These are all of the alert sounds for events such as contacts logging in and out, incoming call alerts, and so on. To do this, follow the steps shown below: Open Skype and log in. From the main menu, select Skype and then Preferences. Select the Notifcations tab. Be sure to uncheck the Play Sound checkbox. This will make sure that all sounds are suspended and won't interrupt your recording session.
Read more
  • 0
  • 0
  • 7897

article-image-drupal-6-performance-optimization-using-db-maintenance-and-boost-part-2
Packt
23 Mar 2010
5 min read
Save for later

Drupal 6 Performance Optimization Using DB Maintenance and Boost: Part 2

Packt
23 Mar 2010
5 min read
Testing your Boost configuration Now we're going to test out our Boost configuration and make sure everything is working with our initial basic settings and the .htaccess configuration that we're running. Log out of your website in your current browser or open up another web browser so that you can browse around your site as an anonymous user. The main thing we want to check on is that our static HTML type files (our Drupal pages or nodes) are being cached and stored in the cache directory we have specified in the module configuration. If we chose to use a GZIP compression, we will want to check to make sure the ZIP files are being generated and stored. Also, run your Status report and view your log entries to check to see if any errors related to the module configuration are being thrown. You should start noticing a performance boost on your site immediately, as you browse around your site. Start clicking around and opening different nodes on your site and admire the faster performance! You should notice it. If we check the cache directory on our site, we should notice that the Boost module has started writing HTML files to our cache directory. In the directory you should now see the following folders: /cache/normal/variantcube.com/fire/node Boost has automatically created a new folder called /node where it will store the cached HTML versions of the Drupal pages it loads. For example, if we look into our /node directory, we should see a bunch of HTML files that have been cached while we've browsed anonymously on our site. You can almost see this happen in real time if you browse to a page and then immediately refresh your remote server/ site window in your FTP client (while in the /node folder). I see the following files corresponding to their Drupal nodes: 201_.html202_.html203_.html206_.html208_.html These correspond to: node/201node/202node/203node/206node/208 Also, at the root of our /fire directory, we should see any non-node pages (for example, pages created using Drupal Views module). In our case, our main Photo gallery View page has been cached: photo_gallery.html. This page corresponds to our photo_gallery View page. You can immediately see the power and flexibility of this module by inspecting your cache directory. You should notice a performance increase on all of these cached pages because the pages that are loading are now your Boost-powered HTML pages. So, multiple clicking on one Drupal node should demonstrate how quickly your pages are now loading. The module has created another folder in your /fire/cache directory called perm. The /perm folder contains your CSS and JS files as they are cached. If you look in this folder, you'll see paths to the following folders: /cache/perm/variantcube.com/fire/files/css/cache/perm/variantcube.com/fire/files/js If you look in your CSS directory, you should see cached versions of your CSS files, and if you look in your /js directory, you should see a cached version of your JavaScript. Another method of checking the module is working correctly is to view source on your pages (by viewing source in your web browser) and see if the following code is being added to your HTML output: <!-- Page cached by Boost @ 2009-10-23 13:56:03, expires @ 2009-10-23 14:56:03 --> So the actual HTML source in the web browser will tell you that you are viewing a cached version of the page rather than a dynamically generated version of the page. It also tells you when this cached page version will expire—based on our configuration, basically one hour after it's been loaded depending on our Boost module settings. Everything appears to be working fine with our initial Boost installation and configuration. Sit back and behold the power of Boost! Boost and Poormanscron Checking our Status report will show us that we're running an incorrect version of Poormanscron. Boost is optimized to work with the latest dev or 2.0 branch of Poormanscron. So let's go ahead and install the latest version so that our cron runs will work correctly with Boost. Visit the Poormanscron project page and download the 6.x.-2.0-beta1 release and extract and upload it to our /sites/all/modules directory. Then run your Status report again to check to make sure the Boost warning has disappeared. You may need to run your update.php script, as this module update will make changes to your database schema. Run update.php and then refresh your Status report. In your Status report, you should now see the Boost row state: Boost Installed correctly, should be working if properly configured. Configuring Poormanscron The updated 2.x-beta1 version of Poormanscron is the precursor module to the eventual Drupal 7 core cron functionality. In Drupal 7, the functionality of the Poormanscron module will be part of the default core processes. For this reason the beta1 version does not give you a module configuration page. It will just run cron automatically, based on a setting on your Site information page. Go here to see that setting: Site configuration | Site information. Now you have an automatically run cron setting that you can select from. We'll use the default 1 hour cron run. This is a nice preview of some of the new built-in functionality of Drupal 7 core.
Read more
  • 0
  • 0
  • 1445

article-image-organizing-your-content-effectively-using-joomla-15
Packt
23 Mar 2010
8 min read
Save for later

Organizing your Content Effectively using Joomla 1.5

Packt
23 Mar 2010
8 min read
Building on the example site It's time to make room for growth. Your client has a big pile of information on ugly art that they want to present to the public. You are asked to design a site framework that makes it easy to add more content, while at the same time keeps it easy for visitors to quickly find their way through the site. Can you do that? You most certainly can! Joomla! allows you to build sites of all sorts and sizes, whether they consist of just a few pages or thousands of them. If you plan ahead and start with a sound basic structure, you'll be rewarded with a site that's easy to maintain and extend. In this article, we'll review the site you've just built and look at the different ways the content can be structured—and rearranged, if need be. Grouping content: A crash course in site organization To lay the groundwork for your site, you won't use Joomla!. The back of a napkin will do fine. Draw up a site map to lay out the primary content chunks and their relationships. View your site from a user's perspective. What do you think your visitors will primarily look for, and how can you help them find things fast and easily? Designing a site map To create a site map, first collect all information you plan on having on your website and organize it into a simple and logical format. As site maps come, this is a very basic one. For the most part, it's just one level deep. Introducing Ugly Paintings and Mission are basic web pages (articles). Activities is a section that allows the visitor to browse two other categories. Contact Us is a contact form page. This structure was good enough for a basic website, but it won't do if SRUP wants to expand their site. Time for action – create a future proof site map Let's make some room for growth. Imagine your client's planning to add an indefinite amount of new content, so there's a need for additional content containers. They have come up with the following list of subjects they want to add to their site: News items A few pages to introduce the founding members of SRUP Reviews on ugly art Facts on ugly paintings (history, little known facts, and so on) What's the best way to organize things? Let's figure out which content fits which type of container. Step 1: You'll probably want to create a separate News section. News should be a top level item, a part of the site's main menu.     Step 2: The information on the SRUP founders fits in a new section 'About SRUP'.   Step 3: Both Reviews and Facts can be categories in a new general section on 'Ugly Paintings'. The existing article 'Introducing Ugly Paintings' could be moved here (or dropped).     What just happened? You've laid a solid foundation for your site—on paper. Before you actually start using Joomla! to create sections and categories, create a structure for the content that you have in mind. Basically, no matter how big or small your website is, you'll organize it just like the example you've just seen. You'll work from top to bottom, from the primary level to the lower levels, defining content groups and their relations. Bear in mind, though, that there will certainly be more than one way to organize your information. Choose an organization that makes sense to you and your visitors, and try to keep things lean and clean. A complex structure will make it harder to maintain the content, and eventually—when building menus—it will make it harder to design clear and simple navigation paths for your visitors. Tips on choosing sections It can be useful to choose sections based on the main intentions people have when they come to the site. What are they here for? Is it to Browse Products or to Join a Workshop? Common choices for sections are: Products, Catalog, Company, Portfolio, About Us, Jobs, News, and Downloads. Try not to have more than five to seven sections. Once you have more than that, readers won't be able to hold them all in their heads at once when they have to choose which one to browse. Transferring your site map to Joomla! Let's have a closer look at our new site map and identify the Joomla! elements. This—and any—Joomla! site is likely to consist of five types of content. The following are the content types in our SRUP site map:   Obviously, the top level item will be the home page. The main content groups we can identify as sections and categories. This small site has four sections, three of which contain two categories. Each of the categories hold actual content: this is what will end up in Joomla! as articles. In this site map, there is one article that doesn't really belong in any category: the Mission Statement page. Every site will have one or two of those independent articles. In Joomla!, you can add these as uncategorized articles. Finally, there's one item that represents a very different type of content. In the site map above, a grey background indicates an item containing special functionality. In this case this is a contact form. Other examples are guest books, order forms, photo galleries. Basically, that's all there is to a Joomla! site. When you've got your site outlined like this, you won't meet any surprises while building it. You can transform any amount of content and functionality into a website, step by step.   How do you turn a site map into a website? If you've got your site blueprint laid out, you probably want to start building! Now, what should be the first step? What's the best, and fastest, way to get from that site map on the back of your napkin to a real-life Joomla! site? In this book, we'll work in this order: Organize: Create content containers.You've seen that much of the site map we just created consists of content containers: sections and categories. In this article, we'll focus on these containers. We'll create all necessary containers for our example site. Add content: Fill the containers with articles.Next, we'll add articles to the sections and categories. Articles are the "classic content" that most web pages are made of. We should also check for articles that do not belong in any category. Instead of assigning them to a section and a category, we'll add them as Uncategorized content.. Put your contents on display: Create the home page and content overview pages.Next, you'll want to guide and invite visitors. You can achieve this using two special types of pages in the site map, the home page and Joomla!'s section/category overview pages ("secondary home pages"). Make everything findable: Create menus.The top level items in your site map will probably end up as menu items on the site. To open up your site to the world you'll create and customize menus helping visitors to easily navigate your content. And what about the special content stuff? You'll notice that in the above list we've summed up all sorts of "classic content", such as articles, home pages, overview pages, and menus linking it all. We haven't yet mentioned one essential part of the site map, the special goodies. On a dynamic website you can have more than just plain old articles. You can add picture galleries, forms, product catalogues, site maps, and much, much more. It's important to identify those special pages from the beginning, but you'll add them later using Joomla!'s components and extensions. That's why we'll first concentrate on building a rock-solid foundation; later we'll add all of the desired extras. Let's start with step one now, and get our site organized! Creating content containers: Sections and categories To create a section, navigate to Content | Section Manager | New. To make a new category, you'll use the Category Manager instead. Just add a title for your new section or category and click on Save. You've created a perfectly workable section or category with the default settings (or parameters as Joomla! likes to call them). Time for action – create a new section and a category Your client was happy with the initial site structure you designed, but now their website is evolving, there's a need for more content containers. Let's add a news section first: Navigate to Content | Section Manager and click on New. In the Section: [New] screen, fill out the Title field. In this example, type News: Leave the other values unchanged; click on Save. You're taken to the Section Manager. The News section is now shown in the section list. Now, add a category to the new section. We'll call this category General News: Navigate to Content | Category Manager and click on New. In the Title field, type General News. In the Section field, select News. Click on Save. You're done!
Read more
  • 0
  • 0
  • 4610

article-image-starting-windows-workflow-foundation
Packt
19 Mar 2010
5 min read
Save for later

Starting with Windows Workflow Foundation

Packt
19 Mar 2010
5 min read
Installing WinFX A successful installation of .NET Framework 2.0 is the first thing we need to use Windows WF. You need to have the latest version, because older ones don't work with the latest bits. On http://msdn.microsoft.com/winfx/, click Get the Beta. You need at least, the WinFX Runtime Components along with the Visual Studio 2005 Extensions for Windows WF. Of course, for the latest item you must have a running Visual Studio installation (Express editions won't work). These extensions to the integrated development environment (IDE) are necessary because, although it is possible to create the workflow in code, it makes easier to manage the XML and code-behing files Windows WF uses for its work.Downloading the entire Windows SDK to check other new technologies such asWindows Presentation or CommunicationFoundations is also suggested (formerly known as Avalon and Indigo, respectively). Why Workflows? Until now, flowcharts and process schemes were done separately from code, just as a way to organize ideas before writing the actual code. But when the task was finished, the scheme remained just as documentation. Also, the capacity of older computers made impossible to retain all the information of a workflow in memory, and it was difficult totranslate from an easy-readable format for human to machine code. Windows WF tries to solve all these problems, making workflow technology available to every single programmer that uses the .NET Framework, and thereby making it general enough to be used in different situations. That seems the natural step from the interoperability concepts in the Framework; if it can execute code written in a bunch of languages, then why not have a tool that translates a conceptual idea of how a work is to be done in real, compliable code? Windows WF can be used for document management (for that special task it will be integrated into Office12), business cycles, or page flow (by making use of ASP.NET). There are lots of reasons as to why a developer would choose writing a workflow instead of writing the code. First of all, for programmers, workflows are easier to understand than code, because workflows provide a visual representation of the process. Consequently, code becomes harder to maintain and adapt to new areas. For example, adding a step in the middle of a scheme because we need to have an additional agreement with the user because of newer laws can be real pain for coders, but an easy step forworkflow users. In addition, Windows WF provides a way to extend existing workflows without need of recompiling, so general frameworks can be developed and then customized to fit in different areas. Basic Concepts Layers in Windows WF: The first one is the code that uses the workflow, because a workflow is not an application, but instead a set of actions that is executed asynchronously by the engine provided by Windows WF. That's the key to being able to use a workflow in such a variety of scenarios. The interface that allows communication between that engine and the executing process is called the Hosting Layer, which provides some extra services apart from Communication (send an receive events and data from and to the workflow), like Persistence (which allows saving the state of the workflow in a storage media to restore it later) or Tracking (so the actual code running the workflow can log the execution of it). Finally, we find the Runtime Layer, which actually executes the workflow and manages the core services. One different with the other two layers is that Runtime Layer is not extensible, while more services can be added to the Hosting Service. Apart from these layers, Windows WF comes with an integrated designer that by default integrates smoothly in Visual Studio 2005, but which can be used outside it, so any developer could add drag-and-drop support to its own application. Activities and the minimal units in Windows WF: Each activity receives some parameters from the developer, executes it actions, and then the flow is transferred to the next activity. Some examples are Code or IfElse activities. As developers, we can create new activities and use it in our own code or create an ActivityLibrary for selling. We can get new activities at no cost on its official website www.windowsworkflow.net. There are two main kinds of workflows: 1.       Sequential: Its actions are executed in some predefined order with a beginning and an end. Examples of sequential workflows may include installations. 2.       State machines: These workflows don't have a path, but it's represented as a set of states and transitions between states. Examples are a web shop: you may need approval for mailing, the user could pay via credit card or with a cheque, and each user is in one state and may go to any order depending on previous questions.
Read more
  • 0
  • 0
  • 2875
article-image-how-choose-open-source-content-management-system
Packt
19 Mar 2010
10 min read
Save for later

How to Choose an Open Source Content Management System

Packt
19 Mar 2010
10 min read
I want to define a couple of important concepts before going into the detail of this topic. What is a Content Management System (CMS)?A CMS is a system that manages a website's content, without requiring any HTML knowledge, to link pages and to control how the pages look. A CMS makes it much easier for users to create, edit, and publish the content on a website. What is the scope of the document that covers CMS?CMS is available in commercial and Open Source licenses. It can be written using different languages such as PHP, Perl, ASP, JSP, etc. To help limit the scope of this document, I will only cover open source CMS that are written in PHP. What is the definition of content?Content can mean different things to different people. It can mean news, articles, Blogs, Wikis, forum posts, picture galleries, source codes, file managements for download, product for e-commerce and so on. And finally... How do I choose the best Open Source CMS for me?With my observations from the many people that visit opensourceCMS.com, the "How to choose an Open Source CMS" question is the most frequently asked, however there is no single simple answer! Below are my recommendations on the processes that I would normally use in selecting an Open Source CMS. Your criteria:One of the most basic steps involved in a CMS selection effort is to determine your requirements.  The following bullet points may assist you in the determination process. Content or Purpose: Defining the purpose of your content is just as important as defining the content itself. Is your content tailored for interaction, forums or for you to express yourself like Blogs and articles? Entry format: Content includes text, images, video; audio, XML, PDF, HTML, spreadsheets, etc. How should the content be stored: In flat files or in databases? Support: For open source projects, the community support is very important. How helpful is it? How active is it? Add-ons: There is rarely a CMS available that will match exactly what you need, so it is very important to have as many add-on options available for your chosen CMS as possible. Hands-on:With the above understanding of your requirements, this is where the rubber hits the road, so to speak. The fun begins with some hands-on experimenting with Content Management Systems, and oodles of research. opensourceCMS.com is the only site of its class that lets you play with a whole array of open source CMS with full administrator privileges before you do the installation on your own site. There are several categories of CMS at the site to choose from: Portal, Blogs, e-Commerce, Groupware, Forums, e-Learning, Image Galleries, Wiki, Lite and Miscellaneous. As you are experimenting with different CMS packages you might notice each has its own strengths and weaknesses. Some might prefer PHP-Nuke style, some might like the Mambo way of managing articles using section and category, others might love the way Drupal uses the concept of Taxonomy to organize information amongst others like Wiki, Blogs etc. You will also find CMS like eZ Publish and Xaraya, which comes with choices of multiple personalities for you to choose when you do the install. The most important thing is choosing a CMS package that fits the way you want to organize your content. It might take you a little bit of effort to learn how a particular CMS works. For example, when I started out learning about CMS I cut my teeth with PHP-NUKE and learned the way it organizes information using the concept of modules and blocks. I later learned about how insecure it is; our site was hacked and defaced a few times. So we set out to look for another CMS and found PHPWebSite; it looks very nice and it works similarly to PHP-NUKE but it didn't perform to our expectation on the version that we looked at, so we were forced to start our search again for another suitable CMS. This time we tried Mambo. Mambo does things different from PHP-NUKE and PHPWebSite. It took me a few weeks of reading forum posts, news, and articles to learn the way Mambo organizes things. Once we got the basics understanding of Mambo, we started customizing just as easy as PHP-NUKE, or even better! Research:Where should I begin? Read as much as you can on the forum posting of your particular chosen CMS at opensourceCMS.com or at the CMS project home site.  Comparison. You can visit CMSMatrix.com do a comparison on features of different CMS packages that you tentatively want to take a look at. CMS Rating  As I was doing research on different CMS packages, I figured that I would need some way to give me a starting point to determine where to start. That is when I decided to develop a dynamic list of CMS ratings based on visitors' ratings, voted for by visitors of opensourceCMS. I created a composite of all the ratings into a list sorted by category and by rating score in a descending order. You can find the CMS rating list here. CMS top hits.  One other tool that I use to help me decide on which CMS to choose is by looking at the hits statistics on a particular CMS demo at the opensourceCMS.com site. So I decided to develop a CMS Top Hits list.  This list is a dynamic collection of the statistics of the daily hits counted by the visitors to the CMS demo. One other figure that I found very useful beside the hits count is the 'Ratio'.  The Ratio is calculated based on this formula: Ratio = (number of hits) / (number of days since this CMS was listed at the site).  By using this indicator all CMS has a fair chance comparing to other CMS that might be listed at the site for a longer time.  You can find the CMS Top Hits list here How about other kind of CMS? As I was studying the world of CMS I found that there are many CMS packages available out there on the net.  Beside the usual category that you might find at opensourceCMS.com, there are: CMS Framework, KMS, Directory, Calendar, etc.  There are too many to name here!  You can find a collection of my research on different kinds of CMS from my site at OngETC.com Is it secure? You might want to visit www.osvdb.org to see how much vulnerabilities your chosen CMS had and how quickly it was patched.  You might not want to pick a particular CMS that it is particularly insecure. Try again? You might have discovered that you sometimes have to abandon the CMS you have chosen for some reason(s) and go back to the hands-on point and try out a different CMS.  Plug-ins:Next, decide what features and functions you would like to use on your site.  The following questions might help you to decide: Do you want to store your content in flat files or databases?  Will there be a need for an event calendar?  Will there be a need for an upload/download area?  What about an image gallery?  How about a poll or survey tool?  Will you be needing multi language support or translation function?  How about WYSIWYG (What You See Is What You Get) editor for content? Is security and permission important to you?  How do you want to set permission and assign access to your content? Components and modules are "plug-ins" that typically provide add-ons to the core system.  Sometimes there are presets of add-ons installed as a part of the base system and sometimes you will have to install them separately.  This can vary greatly from one system to the next.  More established systems like Mambo will have a lot of community support which translates to a wide variety of components, modules and plug-ins.  You will soon find out that some of the features you want, might not be available as part of the core or add-ons.  You might have to buy a commercial add-on product, pay a 3rd party developer to do it for you or learn enough to develop your own. It helps to list all the things you need and use that as your shopping list to test against and to experiment with.  The key word here is experiment because that's the best way to understand how useful it might be. The LookLastly, once you determine the base system and the add-on features to use, it is time to decide on how your site will look.  Most systems utilize templates or skin and CSS (cascading style sheets) that allow you to tailor the look of your site.  It's up to your imagination!  Even if you are not a graphic or template designer, there are many free or commercial templates that you can acquire and tailor to fit your taste. You can download these and add them to your site which can really give it a complete makeover.  Some of the CMS have a "template chooser" that lets you pick different "skins" for your site.  At last...In Summary, this article started out by defining 'what is a CMS?'  'What is the scope of this article?'  'How content definition could be differed in people mind?' 'How do you decide which CMS is best for you?' We also looked at what criteria to use to define your requirements.  With your tentative set of requirements, this article suggests where to go to do some hands-on experiments to gain more understanding about different choices of CMS, and how to fine tune or expand your criteria.  We also shared a little of our experience when we went through the process of choosing a CMS. Once you identify a CMS that you like, then it would be worth while to do a lot of reading regarding your choices, whether at opensourceCMS.com, or at the CMS project home site and any additional affiliate sites that you can find.  You might consider doing a search on Google about your particular CMS to see what else you might find.  The point is doing as much reading as you can afford! With knowledge from all the reading you have done, it is time to decide on what additional feature-sets you want and find out whether it is available on the core system; pre-built plug-ins, and freely available open source or commercial plug-ins. Finally you will need to decide on a template for your site.  You might develop yourself, download some open source templates, or buy from a professional commercial template designer. That should give a good overview of the whole lifecycle in choosing an open source CMS and give a brief glimpse into some things for consideration.  Now is the time to load your content to your site and ready for the debut to the world! By Chanh Ong Chanh Ong is a Computer Specialist. Chanh has many years experience in various computer platforms and operating system, programming languages, system administration, DBA and etc.     Content Management Books from Packt Packt publishes a range of books on various Open Source Content Management Systems, including Joomla!, Mambo, Plone, TYPO3, DotNetNuke, OpenCMS, XOOPS and many more. For more information, please visit: www.PacktPub.com/content-management  
Read more
  • 0
  • 0
  • 7295

article-image-alfresco-enterprise-content-management-author-interview
Packt
19 Mar 2010
10 min read
Save for later

Alfresco Enterprise Content Management - Author Interview

Packt
19 Mar 2010
10 min read
  Hello Munwar. Thank you for taking time off your busy schedule to answer some of our questions. 1.      From specializing in Digital Electronics and Advanced Communications to authoring Alfresco Enterprise Content Management Implementation – talk us through the journey! Though I completed my masters in digital electronics, my work has been always with software engineering. I worked as the chief architect and manager of engineering teams for 15 years in the areas of system software and Internet applications for customers in the United States, Japan, Germany, and India. For the past ten years, I have been implementing various content management systems. I started with multi-million dollar implementations of proprietary software and faced all kinds of challenges including vendor lock-in, rigid code base and expensive upgrades. I co-founded CIGNEX in 2000 with an idea of making open source work for the enterprises. Since then, we have successfully delivered more than 50 CMS applications using various open source technologies and got featured in IDC. Unlike most other open source CMS which offered only the web content management, Alfresco provided a wide range of solutions to Enterprise customers with an impressive roadmap. This excited us a lot and we started implementing Alfresco in many enterprises. As part of our implementation we also train our customers so that they are equipped with all the information required to manage their systems. I have trained many users, administrators, and developers in Alfresco.  I decided to author a book on Alfresco, based on the requests I have received from David Barnes of Packt Publishing and John Powell, CEO of Alfresco. 2.      How is Alfresco different from Documentum and some other Enterprise Content Management systems? What does the Alfresco team mean when they say that Alfresco aspires to be "Documentum fast and free"? Alfresco is unique and different. It is the first new Enterprise Content Management system built in over five years, based on open source and open standards. There are literally hundreds of open source content management systems on the market, but none address the requirement of enterprises small, medium and large to manage, share, control and reuse content across the company. Alfresco is different when compared to other ECM systems with the following specification: Enterprise features (scalability, security and failsafe plus the power to manage any form of unstructured data not just web content) Super fast Simple (to install, to use, to customize) With low costs John Newton who is the co-founder of Alfresco, was the co-founder of Documentum who knows this space pretty well.  His goal is to build a real Open Source ECMS that is 10 times faster and free.  I think he and his team achieved the goal pretty successfully.  3.      Tell us something about CIGNEX and Mike Walker and their contributions towards writing of the book. CIGNEX is the leading provider of open source Enterprise Content Management (ECM) solutions for businesses and government agencies.  Mike is the Vice President, in-charge of consulting at CIGNEX.  His organization is among the very first to successfully deliver ECM projects using Alfresco. Our consulting team at CIGNEX presented me the various flavors of Alfresco implementations that I would not have possible imagined, with real-life examples as they work on the Production projects. Mike (reviewer of the book) made sure that the information in the book is relevant to someone who is seriously considering Alfresco to deploy an ECM application. Starting from our CEO, Navin to a developer at CIGNEX, everyone contributed to the book one way or the other. My sales and presales team at CIGNEX, Amit, Candace, Harish, and Jarred helped me understand what customers are looking at.  I have learnt a lot through numerous discussions with them. I am thankful to my team at CIGNEX.   4.      At CIGNEX you have trained many users, administrators, and developers in Alfresco. How much has training helped you in writing this book? In June 2006, I have spent significant time creating Alfresco training for Users and Administrators. The training material had about 325 PAGES and 48 LAB EXERCISES, covering the latest features of Alfresco. I have got a good feedback from the attendees and over a period of time the quality of the training material improved. Thanks to Dr. Paul Holmes-Higgin (VP of Engineering, Alfresco) for his idea of running Portable Alfresco on a USB Drive.  I created and delivered the training material in a keychain (1 GB USB drive) which attracted many attendees as they do not have to install it on their computers. Training also helped me to define my writing style. I started by showing the reader how to do something - a step-by-step example. I explained how that process worked. Then, I explained what other options are available, and how they fit into the overall picture. I hope this helps the reader "generalize" from this example. Now, at CIGNEX we offer 4 various training programs in Alfresco (a) Foundation training for the beginners (b) Developer training (c) Workflow and Customization and (d) Web Content Management   5.      John Powell, CEO Alfresco has written a foreword acknowledging your book. Were you in touch with the engineers and developers at Alfresco during the writing of this book? John Powell was kind enough to write a foreword for this book. Everyone who read it enjoyed it. You must read it to know how big minds (John Powell-CEO and John Newton-CTO of Alfresco) think and create world's most successful companies. The good decision I made when I started writing the book during August 2006 is to work on the upcoming version of Alfresco (1.4 then).  This requires significant amount of understanding of the upcoming features which are not completely documented (as the Alfresco engineering team was developing it).  Thanks to Alfresco team who helped me getting the documentation and updating the Alfresco wiki. Alfresco released 2.0 beta recently with web content management features.  Due to the extra care we took in planning the book, the content of the book is relevant to the recent latest release. 6.      Who is the book aimed at? This book is designed for content managers, system administrators or developers who want to install and use Alfresco in their teams or businesses. Because Alfresco is free many teams can install and experiment with its ECM features without any upfront cost, often without management approval. This book also aimed at business users to make decisions to migrate from the existing proprietary ECM to standards based open source ECM. This book is particularly suitable for IT consultants who want or need to set up a flexible enterprise content management system for their clients, be that for demonstration, development, or as a mission-critical platform. This book gets you to that result quickly and effectively. 7.      Which chapter of the book did you enjoy writing the most? Which one do you think is most exciting? I enjoyed writing all the chapters and the most exciting one is Chapter 13, Implementing Imaging and Forms processing. This chapter helps you to implement an end-to-end solution by collecting the paper documents, and forms; transforming them into accurate, retrievable information; and delivered into an organization's business applications. The information then, is full-text searchable, and goes through the various approval workflows, based on the organization's defined business process management. By the end of this chapter you will have learned how to: Connect scanner to network drive, and map it to the Alfresco's space Specify a business rule to automatically extract metadata from the scanned document Define and execute a workflow process for scanned documents Bulk upload scanned documents into the Alfresco repository Integrate OCR utilities such as Kofax and eCopy into Alfresco This chapter provides solutions closer to your business requirements such as Order fulfillment, Claims processing, Underwriting, Loan origination, Contracts management, Accounts payable managing checks and invoices. 8.      Can you install Alfresco both on Windows as well as Linux Operating Systems? Have you explained the installation techniques in the book? You can install Alfresco both on Windows as well as Linux operating systems.  You can install Alfresco to use a wide range of databases such as Oracle, MySQL, Microsoft SQL Server.  You can install on variety of application servers such as Tomcat, JBoss. I have dedicated a chapter (Chapter 2. Installation) and included the information about the architecture, various installation options, and the key terminologies used. By reading this chapter you will be well equipped with the information to make a choice on the suitable operating system, database, application server, and other software required for your installation. 9.      In Chapter 3: Planning, you talk about Follow Best Practices to implement a project using open-source software. Give us a sneak preview about it. Most of the Enterprise Content Management projects fail not because of technology, but because of lack of proper planning. Planning is the most critical phase of any implementation project. During this phase, most of the decisions are made to customize specific features in a particular way. You define the security framework, custom-content types, folder structure, categories, workflow, reporting, business rules, and collaboration. During planning phase, you will scope your implementation, prioritize the requirements, and finalize the project plan. This chapter provides you information required for your planning exercise before implementing your system using Alfresco. 10.  Can you explain in brief Roles in Alfresco and its importance? Alfresco security model is flexible and allows you to choose either built-in security or external security model defined by your organization via systems such as LDAP and Active Directory.  The following is the list of default roles supported out-of-the-box by Alfresco: Consumer: Read spaces and content Editor: Consumer + edit existing content Contributor: Consumer + add new content Collaborator: Editor + Contributor Coordinator: Full Control Apart from knowing the roles, the most important thing to know is the methods to extend the security model and to provide effective collaborative spaces.  There is a full chapter in the book dedicated to this Security Model. 11.  When can we expect yet another book from Munwar Shariff? This is my second book. My first book is Plonelive, a python-based open source content management system called Plone. When I was writing Plonelive, I never imagined that I am going to write another book.  Book writing is a very involved exercise and requires a lot of discipline. I have a full-time job as a CTO and VP of Business Development at CIGNEX and I have two kids at home with whom I spend lot of time.  I am also contributing to the book's blog site http://alfrescobook.blogspot.com. >Whenever we (as a company) feel there is big need for "documentation" for a specific open source content management system or an open source enterprise portal, we might consider writing a book. I never know when that is going to happen. Thanks Munwar! I would also take this opportunity to congratulate you on the release of Alfresco Enterprise Content Management Implementation.   Share This Article Save to del.icio.us      
Read more
  • 0
  • 0
  • 1594

article-image-best-way-create-round-cornered-boxes-css
Packt
19 Mar 2010
5 min read
Save for later

The Best Way to Create Round Cornered Boxes with CSS

Packt
19 Mar 2010
5 min read
The best way to create round cornered boxes with CSS. Boxes with round corners have become synonymous with WEB 2.0 and the future of website design. Forget AJAX, don’t worry about SEO, put content on the back burner, what really excites people is nice rounded boxes. Why is this so? I’ll tell you why… When website layout was done purely with nested tables, creating a box of content with curved corners was tricky. Not impossible, but perhaps more effort than could be justified (or charged for). Using tables, the curved box would be sliced and diced into many smaller images with a top-left corner image, a top-right corner image and so on until you had a perfectly rectangular space in the middle of the clutter of tiny images where the content would sit. It would be at this point that the client would ask for corners with a larger radius, or in a slightly different shade and the whole image slicing would start again. And don’t even talk about drop shadows. CSS did bring some relief from the slicing of images. With CSS you can assign a whole image as a background to an area of content, and position the content nicely on top of it. The background image could of course be an image of a box with rounded corners. Perfect? Well not quite. If you had fixed size content then a fixed size background image would be fine, but content never stays the same for long. Words are altered, font sizes are changed and before you know it the content exceeds the length of the beautifully rounded box it is sitting on. Yuck. There have been some inspired, yet ridiculous methods of overcoming the problems of changing content size within a rounded box, some of which create the corners with client-side code, adding a new DIV to the DOM for every pixel in a mathematically calculated corner. Clever? Yes. Bloated, slow and somewhat ridiculous? Yes to that too. What is needed is the neatest, fastest, most flexible way of creating rounded boxes that can hold varying amounts of content. And this is where I offer my most elegant of solutions. To achieve such simplicity and elegance there is one small prerequisite, and that is that our box is of fixed width. This is no great trouble because it is very sensible to allow boxes to grow vertically rather than horizontally. Columns and vertical scrolling are good practice. Rows and horizontal scrolling are a big no no. And so to the method of creating the easiest and most efficient rounded boxes. Step 1 In Photoshop or your favourite graphics editing package, create the round cornered box you need making it the exact required width and any average height. You should now have an image that looks like figure (a). Notice the shading and drop shadow too. Figure (a) Step 2 Divide the image into 2 parts, a top and a bottom, making the top part as tall as any title line you way want to add to the box. Your 2 images will look like figure (b). Figure (b) Step 3 Increase the canvas size of the bottom portion of the box to a large value making sure it is tall enough to cope with any content it may need to hold. Don’t worry that the bottom image looks far larger than you will need most of the time. Your 2 images will now look like figure (c). Figure (c) That’s all there is to do on the graphics side, now on to the CSS. On your webpage add this HTML: {literal} <div id=box1> <div class=boxtop> <div class=topcontent>My First Box</div> </div> <div class=boxbottom> <div class=maincontent>With some content</div> </div> </div> And to your CSS file add these definitions, obviously changing style parameters to suit your requirements: .boxtop{ /*make this the same size as the top image*/ display:block; width:267px; height:48px; /*set the image as a background*/ background-position:left top; background-repeat:no-repeat; background-image:url(images/top.gif); } .topcontent{ /*set the font style for the box title*/ font-family:arial; font-size:16pt; color:white; /*shift the title down a bit and center it*/ padding-top:10px; text-align:center; } .boxbottom{ /*make this the same width as the bottom image*/ /*don’t set the height as this needs to be flexible*/ display:block; width:267px; /*set the image as a background*/ background-position:left bottom; background-repeat:no-repeat; background-image:url(images/bottom.gif); } .maincontent{ /*set the font style for the main content*/ color:white; font-family:arial; font-size:12pt; display:block; /*align the main content nicely*/ padding-left:20px; padding-bottom:40px; padding-right:30px; } {/literal} Incredibly, that’s all there is to it. You now have a rounded box with shading and a drop shadow that only uses 2 images and a small amount of CSS, and the whole thing is wonderfully cross-browser compatible. To see the final effect take a look at this page here www.eveshamsolutions.co.uk/cornersdemo.html. Feel free to view the source code and pinch the images to play with. If you use this technique don't forget to mention where you found it, if only in the source code :-)
Read more
  • 0
  • 0
  • 1809
article-image-making-complete-yet-small-linux-distribution
Packt
19 Mar 2010
9 min read
Save for later

Making a Complete yet Small Linux Distribution

Packt
19 Mar 2010
9 min read
Making a complete yet small Linux distribution There's an endless list of actively maintained Linux distributions on (Distrowatch). With modern Open Source applications demanding more and more resources, the most popular Linux distros are also the most resource hungry. Zenwalk (http://www.zenwalk.org/) and Vector Linux (http://vectorlinux.com/) are two Linux distros that promise the ease-of-use of a modern desktop Linux distro but keep the resource utilization in check. So how do they do it? In this discussion with Jean-Philippe Guillemin of Zenwalk and Robert Lange of Vector Linux, I try to understand what it takes to make a distro that's equally capable of running on the first generation of Pentiums as well as the latest. Mayank Sharma: Any advantages of choosing Slackware ( http://www.slackware.com/) as base? [Both distros are based on Slackware Linux.] Robert Lange: I think slackware gives you the ideal base to work from. The most note-worthy advantages are simplicity of design, lack of dependency hell and easy configuration.Jean-Philippe Guillemin: There are some advantages, and also some disadvantages. Of course it depends on the goals of a project, so what I'm going to tell you applies to Zenwalk but may not apply to other projects. Let's begin with goals, then we'll talk about advantages, and finally about disadvantages. The main goal of the Zenwalk project is to build a "rational GNU/Linux operating system". That means that the system is designed to be very simple and responsive, with one application for a given task. The main advantage of Slackware as a starting point to build a GNU/Linux OS with this kind of objective is that Slackware is a pure Linux/Unix system, without bloated subsystems, very simple and flexible. It is one of the last systems of this kind. You can guess that such a "pure" system is ideal when you want to build your own vision of desktop, hardware management and administration tools. The main disadvantage of Slackware as a base system is implied by the main advantage. It is the amount of work needed to transform it into a desktop OS. With most other "major" Linux systems , 80% of the work is already done. It seems simpler to me to build a desktop derivative from one of these big Linux distributions because the desktop system is already nearly finished, but it would give less freedom.   MS: Talking of Slackware, do you contribute upstream? Any changes you'd like to see up there? RL: The short answer is no. Slackware really doesn't appreciate so called forks in its design philosophy so even if offered I highly doubt that there would be any level of acceptance. However, we make the changes that we apply to the system available in our FTP repository. JP: Not really. I sometimes contact Patrick Volkerding [Slackware maintainer] when I need information about something I don't understand in Slackware or to get some news about him. I also ask for his opinion when I am about to decide for a structural change in Zenwalk. I want Zenwalk to remain Slackware compatible, although the fork is really huge now. The only contribution to Slackware was Zenwalk's Xorg 7.X system that Pat plans to use as a base to build his own version. At the moment, Pat is working to update the base toolchain (glibc, gcc, etc). When he has finished this on Slackware's side, we will have to rebuild nearly everything in Zenwalk on this new environment. Apart from this awaited modernization of the toolchain, I wouldn't change anything in Slackware as that's not really important for Zenwalk. We are independent now and the only important condition is to maintain application compatibility between the two projects. MS: Any new distribution that you think would make a good base, if you were to start afresh today? Any particular reasons? RL: There is at least to my knowledge nothing new in what I call the absolute base in a linux distro. 99% percent are based on Debian, Redhat/Fedora, Gentoo and Slackware. The exception being Linux from Scratch (http://www.linuxfromscratch.org/). I don't think I would make any different choice today then I made almost nine years ago. JP: Easy question. To start a new project I would not use anything else than Slackware. At least Linux From Scratch (http://www.packtpub.com/article/Linux_From_Scratch) would be an option, or maybe Zenwalk itself ;). MS: What's the lowest hardware configuration that people have managed to run Vector on? What would you suggest as the minimum config for a usable system? RL: It depends on what version of Vector you are talking about. Our very early versions would run on an i486 machine with 32 MB RAM although X, the Graphical User Interface (GUI) would be pretty slow. Todays 5.x versions have run on Pentium 166's with 128 megs of RAM. To have a pleasant experience we suggest at least a Pentium 2 with 128 megs of RAM. The X GUI is the system hog. If you want to run a console based system a Pentium 100 with 24 MB of RAM would probably work. JP: Zenwalk can be run on a Pentium 2 processor, assuming that you have enough RAM to support X window applications. 256MB is enough to drive such an old box with acceptible usability. The minimum recommended configuration for true responsiveness is a Pentium III system with 512MB RAM.  MS: What other software are essential? I mean components like Window Managers, multimedia players, office applications, etc. Which are the ones that you've included and how have they helped you with your purpose? RL: We try to give our users the basics from most computing categories. The Window Manager we liked the most up till recently was IceWM in combination with the roxfiler system, which allowed for a very light weight X system with much of the same functionality that say Windows 98 users were used to. We have recently jumped on the Xfce 4 bandwagon as its the perfect desktop for lower spec computers but still offers many of the configuration options that only GNOME and KDE users were able to get. The browser market has always been a problem for old computers. Mozilla, Opera and Firefox are RAM eaters, but we offer dillo as an alternate and it does a reasonable job. Office chores are handled by Abiword, which is a great program for low spec machines. Xmms has been our mutimedia player along with Mplayer and GMplayer. JP: The Window Manager and file browser are essential and mandatory parts of the desktop system. We use a customized version of XFCE along with the Thunar file manager. We provide one mainstream application for each task with the Zenwalk desktop. Quoting my friend Claus Futtrup, our Zenwalk columnist, as late as December 2005 the most critical applications for a desktop user were : No 1 : Email client, rated critical by 62% of users, No 2 : Productivity, rated critical by 51%, and No 3 : Web browser, rated critical by 50%. Apart from the applications, one very important aspect is "Desktop integration". All applications should use the same widgets, same color theme, same icons, etc. This is important because icons and windows layout must be consistent to keep the usability as smooth as possible, especially widgets layout and icons. We achieve this by providing exclusively GTK+2 (http://en.wikipedia.org/wiki/GTK+) based applications. MS: I'd appreciate if you could list or briefly explain some of the key issues of assembling a distro that's capable of running on slower hardware. Do you strip kernels, or use the stock ones? RL: The key is to keep things as simple as possible. The less background processes you have running the more memory is required for executing programs. We use a very vanilla kernel with as much modularized as possible to keep its resident size to a minimum. Compile code optimized for i586 that seems the best for compatibility and speed on a wide range of hardware. Pay attention to the init process since you want as much control as possible over what does and does not get loaded and pass this on to the user. JP: Let me first clarify that Zenwalk is not designed for use on old hardware (for example there is no ISA (Industry Standard Architecture) bus support in Zenwalk). Zenwalk is designed to provide the optimal responsiveness that you can expect from a GNU/Linux operating system. The entire system is tuned towards this target. The kernel is configured in a very uncommon way as would be in an embedded system with preemptive processus and IO schedulers, installed libraries are kept to a minimum. We also use only one graphical toolkit for this particular reason, GTK+2. We avoid using bloated subsystems and prefer simple low level systems like udev or inotify for devices polling - we developed our own alternative automount system. Using Xfce, which is a feature-rich yet light desktop environment with its Thunar file manager also helps to improve the responsiveness. There are many other enhancements, but I can't sum three years of research here in a few lines :) MS: How long has it been since you've been rolling out the distros? Why do you think people still use them, despite hardware becoming cheaper? RL: Its been eight or nine years now. I think its the simplicity and speed that keeps them coming back for more. We have also developed a substantial online user community that is second to none in being a friendly place that new users can join the Linux ranks without fear. JP: The project started three years ago. Our user base really began to grow significantly one year ago. At that time the project was mature enough to compete with major GNU/Linux distributions. I really believe that our user base is growing because people find something unique in Zenwalk. For example, in as little as 20 minutes utilizing a very easy setup, the users obtain a true modern working environment ready to use with only the best application for each need. Thus, Zenwalk is usually considered as one of the fastest GNU/Linux systems available. People can run it with blazingly good performance on modern, and also semi-modern computers.
Read more
  • 0
  • 0
  • 2853

article-image-enlighten-your-desktop-elive
Packt
19 Mar 2010
9 min read
Save for later

Enlighten your desktop with Elive

Packt
19 Mar 2010
9 min read
Enlighten your desktop with Elive Unless you're an old Linux user, you've only probably used the KDE, GNOME or Xfce desktop environments. But since the time when these desktops were in their infancy, the Enlightenment desktop environment has been impressing users. Bringing this mature, visually appealing environment to new Linux users is what the Elive distribution is all about. On its website, Elive claims to be more than a simple Linux distro, rather a work of art. I might be a little biased but that's probably true. One look at Elive's graceful and charming environment and you are sold. And unlike today's 3D visualization, Elive can run efficiently on older systems as well with a gamut of desktop applications. Its got detailed documentation Wiki and an active forum to answer questions. Elive's been in development for several years now and in fact is so popular that its developer, Samuel "Thanatermesis" F. Baggen, works on it full time. In this month's article, Samuel explains his reasons for spinning Elive and how the distro has evolved over the years. Mayank Sharma: Please tell us a little about yourself and your interest in computers in general and Linux in particular. Samuel Baggen: When I was 12 years old I got my first computer -- an 8086 with MS-DOS command line. Shortly after I got that system, the monopoly of Microsoft swept in and introduced Windows. A simple front-end of MS-DOS in graphical mode, which took a lot of memory for computers (especially my little PC). I grew very tired of Windows and wanted to go back to the command line after some years, but it seemed I was going against the grain. The majority of the systems were using Windows and all the applications too were written for Windows. It seemed I had no other option except Windows. When I was 18 years old, a friend of mine started telling me about this thing called "Linux" -- an ingenious system without errors, reboots, problems or viruses. It was much faster, efficient, and finally free of charge... an unbelievable thing. Then I started using Linux, reading the documentation and learning how to use its very powerful command-line system. I needed to spend some serious time learning the graphical system, but when I got the GUI running, it didn't appeal to me. I tried many window-managers, but I was never satisfied. There was one that piqued my curiosity...Enlightenment. I promised myself to take a better look at this curious window-manager between my time working at the command line. Soon I found a system called Knoppix -- a Linux system that worked directly from the CD-ROM without installing. I really liked the system and the many others that came after, but I found they were all just a simple copy of the standard Knoppix, with the background and the name changed. I couldn't find any with Enlightenment. So I chose to make a very different modification of Knoppix that included Enlightenment. The resulting system was called Tezcatlipotix, but I couldn't put it to the public because it contained copy-written music, video clips, and other commercial applications too. I decided to share my vision with the public, so I started working on Elive. My goal was to make a liveCD that was very different, easy to use, intuitive, and most importantly ran Enlightenment. I tailored it for my tastes and for practical functionality. For example, Elive won't use icons on the desktop, even if Enlightenment 17 adds a feature to include desktop icons.   MS: But what was it about Enlightenment that made you spin a distribution around it? SB: I was very disappointed by the other window-managers. Most are slow, unattractive, non-functional, but most importantly I felt they were counter-intuitive and lacked practicality. I firmly believe that you don't have to emulate Microsoft Windows, to achieve a responsive and functional system. You all are more than welcome to test the easy, usable and lightning fast responsiveness of Elive.   MS: Break down Elive for us technically. Why choose Debian as base? Do you bundle non-free software like MP3 codecs, etc? Does Elive have a repository of its own? SB: Yes, Elive has it own repository with more than 400 Elive specific packages. Some are just rebuilt with minor changes like tweaking their default configuration files, or including skins, etc. Everyone knows why you'd choose Debian as a base system, this is no secret. It's package management is pristine, it's the most stable, secure and trustworthy system available. If a thing such as an MP3 codec is not free, but free to redistribute, Elive includes it. MP3's are heavily used by everyone, whether in your MP3 player, or for internet streaming. Elive is a usable product that is practical in this day and age. We want everyone to have readily access to their MP3's as soon as the system boots.   MS: Are you a one-man development house as well? Do you get any contributions from users? Talking of which, how's Elive's user community? SB: Yes, I'm the only developer of Elive. It's a tremendous amount of work and very time consuming. Yet I realize that If I'm to have total control over my vision of Elive, then this must be the case, so that no one can say, "Don't do this or that!" I have full discretionary power, but Elive is made for the public, so user suggestions are pertinent to Elive's development. On the other hand, I receive much help from a small community of people in many ways. Translations, system tests, benchmarks (very important, without tests and bug reporting, the systems won't work correctly), and also some coding for miscellaneous things. The community helps design art, applications, and PHP code for the Elive website. Support also comes from Elive users who make a donation for the Elive stable downloads and the new Bonus Discs. This is very important. Without this collaboration, Elive wouldn't exist because developing Elive is my full-time profession.   MS: What are these Bonus discs? SB: This is a new feature of Elive. Put simply it consists of a CD that you insert in your Elive system and it's directly launched. The Bonus Disc then installs the package. For example, the first (and currently the only one available) is the Bonus Disc for OpenOffice. You just burn the iso and put it in your Elive system. The Bonus Disc installs OpenOffice automatically, prompting only for language preferences. With this bonus disk you have a very easy and fast way to properly install OpenOffice with the menus having the GTK look. I have more bonus-disks planned for the future, especially for games. I'm hard pressed to find time to make them, but they will come sooner or later.   MS: On the website you say Elive's more of a distro than a Live CD. Could you explain this a little? SB: Yes, I continue to stress this fact because of the misconception that Elive is just a Live CD. The name alone causes some to think otherwise. Some people think, Elive is "Enlightenment Live". The install button is a little hard to find for some users for the first time :) Elive started as a Live CD, but actually it's more a complete system than a live CD. This is why I have moved from Knoppix to Morphix, and after that to DSS (Debased Scripts Set). Elive has a very good installer with nice internal features, and it's own repository with more than 400 packages. Elive in the liveCD mode is just the pure Elive system with virtual changes to make it all work in live mode. Which means installing Elive to the hard disk, installs a clean system without any trace of the live CD elements. Elive is a system for day to day usage. Its goal is to be a system that's ready to use, and quick and easy to work with. There are many users who have used Elive day-to-day as their main system for years.   MS: You can't read a review of Elive without the reviewer mentioning the Elive Panel. Is that something you wrote? What areas of Elive does the panel control? Have you written more such custom tools for Elive? SB: Yes, I wrote Elpanel as a central control center for managing the entire Elive system. Elpanel has menus icons to control the look and feel of the system, do some user configurations and general administration. The icons launch a separate, but integrated Elpanel menu, with animations that tempt the eye. I have written many tools for Elive, some are visible applications, but most are shell scripts for auto-configurations, etc.   MS: How has Elive evolved over the years? Do you still recommend using ReiserFS? SB: I have tried to make the system easier to use overall. The hardware recognition has gotten a lot better. Some users say that it's better than some of the bigger distributions :) I have also added most of the things that users have requested between releases. Since so many users have laptops, it's mostly Wifi drivers and such, adding which is truly a daunting task. As for the filesystem, yes, I personally continue recommending Reiserfs (version 3). In my experience it's the best, but I don't want to get into that discussion here because many people like to debate about things (flame wars). It's just my personal preference.   MS: You've just released Elive 1.0. What are the highlights of this release? SB: It's very stable system that's ready for day to day usage. Elive 1.0 has been rigorously tested, has great drivers, nice auto configurations, and enhancements for the end-user. The Elpanel application is always getting better and better. There are many more things that are listed on the Elive website.   MS: What are you working on for the next Elive release? SB: On top of my list are, new kernel, more drivers (especially more Wifi implementations), and the very much sought after Enlightenment 17 in Elive Gem 1.0. Mayank Sharma is a freelance writer from New Delhi, India. He is blown away by the power of Free and Open Source Software and its usefulness to developing nations. Check out his blog at http://www.geekybodhi.net/         Share This Article Save to del.icio.us      
Read more
  • 0
  • 0
  • 3741
Modal Close icon
Modal Close icon