Summer Sale: You can get 1 year of the Everything Club for $59! Save $85!
  Offer ends in
Join today and get access to 1,000's of books and videos. Learn WordPress, Drupal, Magento, Joomla and more! Sign up today!

| Drupal

This week's tutorial explains how to add metadata to your Drupal site. By default, Drupal has no fields for metadata. Check the source code at http://drupal.org and you'll see what I mean. To fix that issue, we recommend a module called Nodewords.

Installing Nodewords to Your Drupal Site

  • Step 1: Visit http://drupal.org/project/nodewords to download the latest version of "Nodewords".
  • Step 3: Extract the files into a folders on your desktop. The folder will be called "nodewords".
  • Step 4: Login to your site's files via FTP and navigate to /sites/all/. If there isn't a folder called /modules/ here, create one.
  • Step 5: Upload the "nodewords" folder to /sites/all/modules/
  • Step 6: Go to Administer >> Site building >> Modules. You'll need to check only the first two of the four boxes if you'd like to add regular metadata:

    Enable Drupal Nodewords

  • Step 7: Go and create a new node. When you do, you should notice a new area labelled "Meta tags" and you'll be able to add metadata to all your nodes:

    metadata

  • Step 8: You can also give the search engines information about how this page should be crawled, by using the "Robots" checkboxes. These are the messages you can send to Google or Yahoo: robots
    • NOARCHIVE ... don't store a cache version of this page in your search results.
    • NOFOLLOW ... don't give any value to the outbound links on this page.
    • NOINDEX ... don't index this page in search results.
    • NOODP ... don't use any information from DMOZ.org to describe this site.
    • NOSNIPPET ... don't show any of this text on this page in your search results.
    • NOYDIR ... don't use any information from Yahoo Directory to describe this site.

Configuring Nodewords

The default Nodewords settings might not be to everyone's taste. There is no short cut to the Nodewords editing page, unless you to to Administer >> By Module >> Nodewords >> Meta tags. There you can choose global settings for your site's metatdata.

| Joomla

Following on from other newsletters where we showed you how to set up Joomla on a Mac and also how to develop locally and moving your site to a live server, this week we're going to walk you through installing Joomla locally, on a P.C..

We're going to use WAMP for this tutorial.

WAMP stands for "Windows, Apache, MySQL, PHP" which are the different elements that allow you to run Joomla on your computer.

Here's how you do it:

Step 1: Install WAMP

  1. WAMP ServerDownload WAMP to your computer.
  2. Run through the WAMP installation process.
  3. In your taskbar, down the by the date in the bottom-right hand corner of your screen, look for the WAMP icon. Click on that icon.
  4. You should see a popup. Click "Start All Services" and then click "Localhost."
  5. Hopefully you'll see a white screen with the Wampserver logo in the top-left corner.

Step 2: Download Joomla

  1. Joomla DownloadGo to Joomla.org and click on the black button saying "Download Joomla. Get the Latest Version". Find the line saying ".... Full Package" and click on the "ZIP" text.
  2. The file you download should have a long name such as Joomla_1.5.15-Stable-Full_Package.zip

Step 3: Move Joomla to WAMP

  1. Click on the WAMP icon in your taskbar again and now click "www directory". This will take you to the folder where WAMP stores its websites.
  2. Move your Joomla folder from Step 2 into this directory.
  3. Extract the Joomla folder.
  4. It will be confusing to keep accessing the website through a folder called /Joomla_1.5.15-Stable-Full_Package/ so rename the folder to something simple such as /joomlatest/

Step 4: Set up our database

  1. Click on the WAMP icon in your taskbar again and now click "phpMyAdmin". This will take you to the software where Joomla's databases are managed.
  2. Find the field labelled "Create new database" and enter "joomlatest". Click "Create".
  3. Hopefully you'll see the name "joomlatest" appear in the left column.

Step 5: Install Joomla

  1. In your browser, visit this address: http://localhost/joomlatest
  2. You'll see the the normal Joomla installation screen. Click through screen 1, 2 and 3.
  3. On screen 4, these will be your settings:
    • Host Name: Localhost
    • Username: root
    • Password: [leave this blank]
    • Database: joomlatest
  4. On screen 5, enter your site name plus a username, email and password.

6: Delete/rename installation directory

  1. Hopefully you still have your Joomla folder open. If not, click on the WAMP icon in your taskbar again and then on "www directory".
  2. Rename the installation folder to something such as /installation-back/
  3. Click "Site" on the final installation screen or visit http://localhost/joomlatest.

You should now have a shiny new installation of Joomla on your P.C. where you can develop your website securely in your local environment.

Video Showing How to Install Joomla Locally on a P.C.

| Development

Debugging PHP applications has always been a bit of a challenge, as the environment is so distributed. At the minimum, there is a web server, the PHP interpreter, and the web browser. While there are tools that add debugging environments to PHP (such as XDebug), you don’t always have access to install them on the server you’re working with.

Fortunately, you can gain some reasonable debugging capabilities through FirePHP. When you want to dump objects or variables back to your browser without having to do so in your HTML, FirePHP is ready for the task. It can also be used to handle code traces and PHP errors.

FirePHP is both a Firebug extension and a PHP library. When the PHP library is in place, special HTTP headers containing JSON objects are created. Firebug reads the HTTP headers, decodes the JSON, then shows the variables in the console. Since the output body is unaffected, it is extremely useful for debugging XML, JSON, PDFs, images, or other non-HTML output generated in PHP.

Read more ...

| Joomla

Today's security topic is inspired by a recent exercise I went through - testing a server for PCI compliance. For those who are not aware PCI is a security standard for accepting credit cards.

According the website for PCI they state their mission as follows:

"The PCI Security Standards Council’s mission is to enhance payment account data security by driving education and awareness of the PCI Security Standards. The organization was founded by American Express, Discover Financial Services, JCB International, MasterCard Worldwide, and Visa, Inc."

Read more ...

| Security

Today's security topic is inspired by a recent exercise I went through - testing a server for PCI compliance. For those who are not aware PCI is a security standard for accepting credit cards.

According the website for PCI they state their mission as follows:

"The PCI Security Standards Council’s mission is to enhance payment account data security by driving education and awareness of the PCI Security Standards. The organization was founded by American Express, Discover Financial Services, JCB International, MasterCard Worldwide, and Visa, Inc."

Read more ...

| Development

Something I have run into frequently during module development is the need to allow multiple instances of that module on a single page. Joomla!, of course, handles 99% of the work involved, but there are a few tricky aspects to making this work. One is the need to eliminate styling conflicts, especially in themed modules. If you only use generic classes and then load multiple theme/color stylesheets, the end result can be unpredictable to say the least.

Read more ...

| Joomla

This tutorial will show you how to take an RSS feed and import it into your  Joomla site. Each item on the RSS feed will become a separate Joomla article. We use this technique for a couple purposes:

  • Distributing our content to other Joomla sites. For example, we use this technique to showing these tutorials on Alledia.com.
  • Importing blogs and news on a particular topic from other sites. This way people can read them all in one place.

We're going to use a component called 4RSS from 4RSS.com.

Installing and Configuring 4RSS

  • Go to the 4RSS page on the Joomla Extensions Directory and download the file.
  • You'll see a file on your desktop with a name very similar to com_4ss_1.3.06.zip
  • Go to the administrator area of your Joomla site, then Extensions >> Install / Uninstall.
  • Click "Browse" to locate the package file and then click "Upload File and Install".
  • Go to Components >> 4RSS
  • Click "New" in the top-right corner and you'll see a screen like the one below:

    rssimport

These are the settings you'll need to enter:

  • RSS Feed Title: This is just for your own use. It will never show on the front-end.
  • Feed Post URL: The address of the RSS feed you want to import.
  • Section / Category: Where the new articles will be created.
  • KeyWord: If you'd only like to import articles that mention a particular keyword, insert it here.
  • Frontpage: Do you want to publish these to the frontpage of your site?
  • Include link to original: Highly recommended to click "Yes" in nearly all circumstance. This will insert a link back to the article's original location with the text "read full article". You don't want search engines to get confused as to which page is the original.
  • Screen for Duplicates: Should 4RSS check to see whether any feeds have already been imported? Again, "Yes" is highly recommended.

Importing the RSS Feeds

Now that you're set up, there are two ways to import feeds:

  • Manually: In Components >> 4RSS, select the feeds you want to import and then click "Post" in the top-right corner.
  • Automatically: In Components >> 4RSS you can click the "4RSS CRON" tab. This is a little trickier and will depend on your server for the correct setup. Each hosting company will have a different place to setup cron jobs so you will need to check with them. The developer's support forum may be able to help. One common entry that may work is:

Php -q/home/......./public_html/administrator/com_4rss/cronjob_4rss/cronjob.php > /dev/null 2>&1

| WordPress

This tutorial will show you how to take an RSS feed and import it into your Wordpress site. Each item on the RSS feed will become a separate Wordpress post. We use this technique for a couple purposes:

  • Distributing our content to other Wordpress sites.
  • Importing blogs and news on a particular topic from other sites. This way people can read them all in one place.

We're going to use a plugin called FeedWordPress.

Installing and Configuring FeedWordPress

  • WP RSS ImportStep 1: Go to the FeedWordPress page on Wordpress.org and download the file.
  • Step 2: Extract the files into a folder on your desktop. The folder will be called, unsurprisingly "feedwordpress"
  • Step 3: Login to your site's files via FTP and navigate to /wp-content/plugins/.
  • Step 4: Upload the "feedwordpress" folder to  /wp-content/plugins/.
  • Step 5: Go to wp-admin >> Plugins and click "Activate" under "FeedWordPress".
  • Step 6: Once you've enabled it, you'll see a new tab on the sidebar called "Syndication". Click the first link called "Syndication". You'll see a screen like below:
  • Step 7: Enter your RSS feed into the box called "Add new source" and click "Syndicate"
  • Step 8: FeedWordPress will check the feed and if it's valid, you can click "Use this Feed" to import the posts.
WP RSS Import

Importing the RSS Feeds

Now that you're set up, there are two ways to import feeds:

  • Manually: If you'd like to manually import feeds, go the "Syndication" link, check the feeds and click "Update Checked".
  • Automatically: If you'd like to manually import feeds, go the "Feed and Updates" link and FeedWordPress will show you how to give you instructions to set-up a cron job.

| Drupal

This tutorial was requested by a student who is learning the Drupal basics. They turned on "Clean URLs" in the Drupal admin area and were surprised to see that the URLs remained largely unchanged:

  • Old: /?q=node/3
  • New: /node/3

The student's comment was:

"that's still a silly address for my About Us page. I want the address to be /about-us/."

We also tried to help them by turning on the Path module in the Drupal core. That allowed them to create URLs like /about-us/ however they still needed to think about it and ask their users to create a path every time. They wanted something that would create great URLs automatically.

The solution is the "Pathauto" module and let's show you how to set it up:

Installing Pathauto to Your Drupal Site

In fact, we're going to install two modules because Pathauto also requires the "Token" module.

  • Step 1: Go to Administer >> Site configuration >> Clean URLs to check that they are enabled.
  • Step 2: Click here to download the latest version of "Pathauto" and click here for "Token".
  • Step 3: Extract the files into a two folders on your desktop. One  folder will be called "pathauto" and the other "token".
  • Step 4: Login to your site's files via FTP and navigate to /sites/all/. If there isn't a folder called /modules/ here, create one.
  • Step 5: Upload the "sections" folder to /sites/all/modules/
  • Step 6: Go to Administer >> Site building >> Modules. You'll need to check four boxes:

    Enable Drupal Pathauto

  • Step 7: Go and create a new node. When you do, you should notice a new area labelled "URL path settings". If you leave "Automatic alias" checked, the address of the page will likely be your Page title in this format:
    /content/your-page-title/

    Enable Drupal Pathauto

Configuring Pathauto

The default Pathauto setting might not be to everyone's taste:

  • You may want to use underscores _ instead of dashes as this student did.
  • You may want to remove /content/ so that you really can have pages with the address /about-us/ rather than /content/about-us/
To change the settings, go to Administer >> Site building >> URL aliases >> Automated Alias Settings:

Drupal Pathauto Settings

| Joomla

It's no secret that Joomla's default editor lacks quite a few features. We often recommend that people upgrade to Joomla Content Editor (JCE). You can click here to find full instructions how to install JCE, including a video.

What we're going to cover in this tutorial are 5 really great features of JCE that people often don't realise are there:

1) Cut and Paste Images Into Different Folders

One common complaint about Joomla's default Media Manager is that you can't move images around. Once you've uploaded an image to one location, you'll need to delete it and re-upload it if you want it in a different folder. JCE allows you to do that:

  • Click on the "Image" button in the JCE editor:

    JCE Image Button

  • You'll see a pop-up screen with the title "Image Manager". Select an image and look on the right-hand side for the pair of scissors. Click this button:

    JCE Image Button

  • You can now browse to another folder and click the "Paste" button, also on the right-hand side:

    JCE Image Button

2) Upload Images in Bulk

A second complaint about the Media Manager is that images have to be uploaded one-by-one. JCE offers the ability to upload in bulk.

  • As in Part 1, click on the image button in the JCE Editor.
  • Click on the "upload" button on the middle-right of the screen:

    JCE Bulk Upload

  • Keep clicking "Add" to select more images from your desktop.
  • When you're ready, click "Upload" and all your images will be uploaded.

    JCE Bulk Upload

3) Link Directly to Any File in Your Media Manager

With the basic Joomla editor you're faced with difficult time linking to any documents that you've uploaded. A lot of people find this a problem because they need to allow their visitors to download PDF, Word and other files. With the basic editor you actually need to know the exact location of the file if you want link to it:

Joomla Basic Editor

With JCE, this process is much easier:

  • Select some text in your article. This is likely to be something such as "Click here to download the PDF". The click the link button in JCE:

    Joomla Basic Editor

  • You'll see a pop-up screen with the title "Advanced Link". In the top-right hand corner, you'll see a small button that will allow you to browse all the files inside the /images/stories/ folder:

    Joomla Basic Editor

  • Select the file you want to link to and then click "Insert". JCE will automatically generate a link to that file for you.

4) Different Editing Options for Different Users

The JCE Editor is a very powerful tool with a lot of options. In fact, it can sometimes have too many options. You can easily imagine some non-technical users getting a little intimidated for 4 rows of buttons like this:

JCE Layout Changes

JCE allows you to add or remove these features, depending on what your users need.

  • Go to Components >> JCE Administrator >> Groups.
  • Here you can create different groups and assign varied features to different users. We'll use the existing "Default" group as an example.
  • Click on "Default" and then the "Layout" tab at the top.
  • The top box called "Available Plugins / Buttons" is the list of disabled features. The bottom box called "Current Editor Layout" is the list of active features. You can drag and drop individual features or even entire rows of features between these two boxes:

    JCE Layout Changes

  • We use this to make article submission much easier for our guests. For example, on Alledia.com we give writers these options:

    JCE Layout Changes

  • If you have a user who is really clumsy, you might decide to restrict their options even more :)

    JCE Layout Changes

5) Restricting Users to their Own Upload Folders

An important security feature that many people need is the ability to restrict users to their own upload folder. They don't want John to be able to browse around the site and see all the documents that Jane has uploaded. They don't want one client being able to find files destined for another client. JCE can do that too.

  • Go to Components >> JCE Administrator >> Groups.
  • Again, click on the existing "Default" group as an example.
  • Click the "Editor Parameters" tab and scroll to the bottom where you'll see "File Directory Path".
  • In this field you'll be able to choose the settings for people's folders. Some instructions are available in the yellow pop-up box:

    JCE Layout Changes

  • The setting I often use is images/stories/$username This will automatically create a folder for each person based on their username and they'll only be able to upload to that folder.
  • Finally, this setting only works inside JCE so you 'll need to unpublish the normal Joomla image button. Go to Extensions >> Plugin Manager and disable the plugin called "Editor Button - Image".

We just had this wonderful email from one of our Joomla training clients. Paulo and his team came to the class knowing nothing about Joomla, but on a

"Just wanted to share our success. :)

Back in December 10,11 we (my coworkers and I) went to a Joomla Training and we had nothing. I think I even told you that we needed the website up by the end of January, and you're like... "that's gonna be hard". Well... it was, but we did it. :)

I'm still implementing more functionality to the site and giving more power to the editors, but we have the site up and running beautifully, with 277 articles, 25 sections, 88 categories, and around 40 editors. The church purchased CommunityACL and It really works well. Every user has access to only their areas and JCE lets them have access to only their folder in the server.

So, that's it... We did it.

Check out: http://www.fba.org

Thanks!

Paulo"

| Development

Long-time users of Joomla are quite familiar with content plugins. When you want to take some user-entered text and reformat it into something else, there’s nothing quite as handy as having a content plugin ready to do your bidding.

However, Joomla 1.5 brought some subtle behavior changes. In Joomla 1.0, content plugins act on both articles entered through the Article Manager, as well as HTML entered in user created modules. When a Joomla 1.0 content plugin is recoded for 1.5, the original effect still takes place on content items, but module output is left unchanged.

What happened? Content plugins in Joomla 1.5 are designed to only act on articles managed through the Article Manager. This will seem inconvenient to people used to the old behavior, but there is a good reason for this change. While many content plugins reformat user-entered HTML, others add markup near the article title or just after an article is output. Also, some content plugins are designed to do additional tasks when articles are saved. These actions do not make sense within the context of a module, so content plugins no longer run on them.

While this good in that it enforces consistency, it also poses a problem. Now that content plugins only work on articles, how do you reformat markup coming from modules? Fortunately, there are a couple of workarounds in Joomla 1.5 achieving similar (if not better) results.

Read more ...

| Drupal

This tutorial was written after a request in one of this week's Drupal classes: "How do I show different Drupal themes on different pages?". The answer is a module called "Sections":

Installing Sections to Your Drupal Site

  • Step 1: Click here to download the latest version of "Sections".
  • Step 2: Extract the files into a folder on your desktop. The folder will be called "sections".
  • Step 3: Login to your site's files via FTP and navigate to /sites/all/. If there isn't a folder called /modules/ here, create one.
  • Step 4: Upload the "sections" folder to /sites/all/modules/
  • Step 5: Go to Administer >> Site building >> Modules. Check the box next to "Sections" and click Save Configuration.

Showing Different Drupal Themes on Different Pages

Now that Sections is set up, we'll be able to use it to place different themes on different pages:

  • Step 6: Go to Administer >> Site building >> Themes. Make sure that all the themes you want to use are enabled.
  • Step 7: Go to Administer >> Site building >> Sections and click "Add Sections".
  • Step 8: Give the section a name, click "enabled" and choose the theme you want to use.
  • Step 9: At the bottom of the page you'll see an area called "Page specific visibility settings". This is the same option you have with Blocks. Enter the pages you'd like this theme to appear on, click save and you're done!

| Security

"Congressional Web Site Defacements Follow the State of the Union"
- Praetorian Prefect

An interesting problem that we as the US have is our denial of Cyberwar. While this post isn't exactly about that, it's close. Last Wednesday night during or after the President's State of the Union Address, several congressional websites were hacked by Red Eye Crew. Why is this of interest? According to Praetorian Prefect, they were all running Joomla!

Read more ...

| Development

Because of it ubiquitous nature, automatic emailing is something that many clients expect. People want to be notified immediately of changes on their sites -- when a new article has been submitted, or a blog comment has been posted. Joomla! already provides some of this functionality out of the box by notifying administrators when a user has registered on their site. You, however, may find yourself needing to implement emailing in your own components. As you may have already guessed, Joomla! provides a very helpful class for this: JMail.

Read more ...

| Development

If you've worked with any kind of database-driven web application, you know that HTML forms are the foundation of the user's interaction with the database. Applications use forms to take input from the user and store it or use it to manipulate existing data. Unfortunately, HTML forms can potentially be quite tedious to write. In this article, we will look at a handful of helpful functions that Joomla! provides to save you time preparing your forms.

Read more ...

Join today and get access to 1,000's of books and videos. Learn WordPress, Drupal, Magento, Joomla and more! Sign up today!