3 out of 4 members use OSTraining at least once a week. You can build great websites. We can help.   Plans from $4 per month

| 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 ...

| Joomla

Would you like to be able to update your Joomla site and automatically send that update to Twitter, Facebook, Linkedin, MySpace, Ning and dozens of other sites?

This tutorial will show you how.

Our first part will be to create an RSS feed to export all our new posts. From there we'll use Twitterfeed.com and Ping.fm to distribute the posts to all our social networks.

Creating an RSS Feed

First we'll use Ninja RSS Syndicator to create our RSS feed. (it has the unusual name because it's developed by a company based in Japan).

  • Step 1: Go to Joomla.org and download Ninja RSS.
  • Step 2: Download Ninja RSS onto your desktop, and you'll see a file called ninjarss_unzipme.zip. Extract that package and you should see a new folder with a component and module inside.
  • Step 3: Go to Administrator >> Extensions >> Install / Uninstall and upload com_ninjarss.zip.
  • Step 4: Go to Components >> Ninja RSS Syndicator >> Feeds and click "New".
  • Step 5: If you want to produce a feed of your whole site, simply enter a title and click save. Otherwise, scroll down and fill in the information requested. Most importantly, you can choose to hide certain sections, categories or articles:

    hidesections

  • Step 6: Save the feed, and you should see a screen like this:

    feed url

  • Step 7: Copy the entry in "Feed URL" and save it into a text editor. This will be the feed that is sent to Twitter and Facebook.

Sending your Feed to Twitter and Facebook

  • Step 8: We're going to use a service called Twitterfeed to send our news automatically to both Twitter and Facebook. The first step is to visit Twitterfeed.com and register.
  • Step 9: Login to Twitterfeed and click "Create New Feed".
  • Step 10: You'll see a box like the one below. Enter the title, and then paste the RSS feed from Step 6:
  • feed url

  • Step 11: Click "test rss feed" to make sure everything is OK. If it is, click "Continue to Step 2".
  • Step 12: This next part allows you to send your feed to Twitter and Facebook amongst other options:

    feed url

  • Step 13: Twitter and Facebook will allow you to authenticate your accounts and link them to Twitterfeed directly from this page. You can also add "UTM" tags which are designed for Google Analytics. They will show in your analytics results, so you can see how much traffic has been sent from Twitter or Facebook. (Click here for instructions on using Google Analytics with Joomla).

    feed url

  • Step 14: The final step is a really powerful feature here that many people overlook ... Ping.fm. If you create an account and authenticate it here with Twitterfeed, you can then pass on your updates to Linkedin.com, MySpace.com, Ning.com and dozens of others. There is a full list available here.

| Security

Happy New Year - How's your patches?

It's about the middle of January of 2010 and in the news, Google was hacked by unknown's from China and Google is considering a few options, including a complete pull out of China. A large search engine in China (not Google) was defaced by the Iranian cyber thugs, Adobe was appartently targeted in the same attack as Google. And in other news the new BREECH report came out from the ITRC showing that overall while breeches were lower than the year before, the number of exposed records was higher. And as I write this article, this just came across my desk:

"Hackers have stolen the login credentials for more than 8,300 customers of New York's Suffolk County National Bank after breaching its security and accessing a server that hosted its online banking system. "
source: http://www.theregister.co.uk/2010/01/12/bank_server_breached/

What does this have to do with your Joomla site? Everything. Today I am discussing patching and patch management with you. For the purpose of this article I am going to refer to my personal favorite work on patching from ProjectQuant - Measuring and Optimizing Patch Management: an Open Model. A must read in my opinion.

Read more ...

| Drupal
One of things we often do for our training clients is simplify the admin area for them. There is a module that allows users to manage their site via a clean, dropdown menu. It has proven so popular that companies such as Acquia provide it by default to all their customers:
Here's how to install it:
  • Step 1: Click here to download the latest version of "Admin Menu". Choose the top link under "Recommended releases".
  • Step 2: Extract the files into a folder on your desktop. The folder will be called "admin_menu"
  • Step 3: Login to your site's files via FTP and navigate to /sites/default/. If there isn't a folder called /modules/ here, create one.
  • Step 4: Upload the "admin_menu" folder to /sites/default/modules/
  • Step 5: Go to Administer >> Modules >> Administration menu and check the box.  
  • Step 6: Click 'Save Configuration" at the very bottom of the screen.
  • Step 7: Go to Administer >> Site configuration >> Administration menu and there are some settings you can edit.

Once you've followed those seven steps, your dropdown menu should appear at the top of the page.

Drupal Admin Menu

| Drupal

What is a WYSIWYG Editor and Why Do You Need It?

So your site users don't have to use code. Its as simple as that.

WYSIWYG stands for "What You See Is What You Get" ... if you select some text and click the "bold" button, that text will be bold. If you select some text and click the "italic" button, that text will be in italics. There's no messing around with HTML. That will be a relief to some of you and more particularly ... your clients and site visitors.

Installing the WYSIWYG Module

First of all, we're going to install a WYSIWYG module that will allow Drupal to install a range of different editors.

  • Step 1: Click here to download the latest version of "WYSIWYG". Choose the top link under "Recommended releases".
  • Step 2: Extract the files into a folder on your desktop. The folder will be called "wysiwyg"
  • 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 "wysiwyg" folder to /sites/all/modules/
  • Step 5: Go to Administer >> Site building >> Modules. Check the box next to "Wysiwyg" and click Save Configuration.
  • Step 6: Go to Administer >> Site configuration >> Wysiwyg and you should see a screen with several suggested editors. One option is TinyMCE and that is the example we will use:
Adding a WYSIWYG Editor to Your Drupal Site

Installing TinyMCE

Now we're going to install the TinyMCE editor itself:

  • Step 7: Click on the "Download" link or go directly to http://tinymce.moxiecode.com/download.php
  • Step 8: Download the latest TinyMCE to your desktop and extract the files. The folder will be called "tinymce 2". Rename this to simply "tinymce"
  • Step 9: Login to your site's files via FTP and navigate to /sites/all/. If there isn't a folder called /libraries/ here, create one.
  • Step 10: Upload the "wysiwyg" folder to /sites/all/libraries/
  • Step 11: Go back to Go to Administer >> Site configuration >> Wysiwyg and screen we saw before should now look like this:
Adding a WYSIWYG Editor to Your Drupal Site
  • Step 12: Save these settings and now when you go to edit an article, you should see a fully-fledged editor:
Adding a WYSIWYG Editor to Your Drupal Site

| Drupal

Why Block Spam Comments?

MollomIf you site is new, this might not be too much of a problem. However, as your site grows, it will increasingly be seen as a valuable target for spammers. If they succeed in placing links on your site, they may get a couple of benefits:

  • Search engines may rank the spammer's site more highly
  • Unsuspecting users may click on the link and visit the spammer's site.
Perhaps the best solution available for Drupal sites is Mollom - a module created by Drupal's founder. It automatically filters out spammers who try to register, comment or contact you.

Install Mollom to Your Drupal Site

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

Setting Up and Enabling Mollom

  • Step 6: Go to Mollom.com and create an account.
  • Step 7: Once you have logged in to Mollom.com, click "Manage sites" in the upper right menu.
  • Step 8: Select "Add subscription" to create a new key pair for your website (or "edit subscription" to access a subscription for an existing site tied to your account).
  • Step 9: Go back to your Drupal site and visit Administer >> Site configuration >> Mollom.
  • Step 10: Enter the key pair that you created in Step 8.

Once the module is active you can log back in to Mollom.com in future weeks to track how much spam has been prevented on your site.

| Drupal

Why Add a Sitemap?

I'll be honest and say that I don't believe sitemaps improve your ranking in search engines. However, they do make sure more pages get indexed and that they get indexed more quickly. This article presents evidence that the difference is astounding:

  • Google with a sitemap: 14 minutes
  • Google without a sitemap: 1375 minutes
  • Yahoo with a sitemap: 245 minutes
  • Yahoo without a sitemap: 1773 minutes

How to Add a Sitemap to Your Drupal Site

  • Step 1: Click here to download the latest version of "XML Sitemap". Choose the top link under "Recommended releases".
  • Step 2: Extract the files into a folder on your desktop. The folder will be called "xmlsitemap"
  • Step 3: Login to your site's files via FTP and navigate to /sites/default/. If there isn't a folder called /modules/ here, create one.
  • Step 4: Upload the "xmlsitemap" folder to /sites/default/modules/
  • Step 5: Go to Administer >> Modules >> Administration menu and check the box next to "XML sitemap" and click "Save Configuration".
  • Step 6: After saving you'll presented with more options. Checking all the boxes would be a good choice.
Drupal Sitemap

Submitting the Sitemap to Search Engines

Drupal Sitemap

| Drupal

In this tutorial we'll show you how to place a Twitter feed inside a block. You can then display that Twitter feed anywhere around your theme. There are many different Twitter options out there but most have a couple of limitations:

  • They post tweets as nodes rather than in a block.
  • If they post to a block, they require very complex setups normally involving creating Views.

Thanks to Expedition Post, we're going to suggest a much simpler way to show tweets in a block on your site. They've created a script that is very cleverly called "Twitter Block".

Installing Twitterblock to Your Drupal Site

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

Placing Your Twitter Feed in a Block

Now that Twitter Block is set up, we'll go and place it on our site:

  • Step 6: Go to Administer >> Site building >> Blocks. Scroll down to find Twitter Block.
  • Step 7: Click "Configure" next to the block and enter your Twitter username and password:
  • Drupal twitterblock Module
  • Step 8: Click "Save Block", publish the block and check to see how it looks on your site:

  • Drupal twitterblock Module

| Drupal

In this tutorial we'll show you how to place an RSS feed inside a block. You can then display that RSS feed anywhere around your theme. We don't need any extra modules this week as we'll be using the core Aggregator Module:

Setting up the Aggregator Module

First of all, we're going to set up the Aggregator module so that it can handle the RSS feeds for us.

  • Step 1: Go to Administer >> Site building >> Modules. Check the box next to "Aggregator" and click Save Configuration.
  • Step 2: Go to Administer >> click "By module" at the top.
  • Step 3: Find the "Aggregator" area right at the top and then click on "Feed aggregator":

  • Drupal Aggregator Module

  • Step 4: Click "Add Feed" along the top and enter the address of your RSS feed:

  • Drupal Aggregator Module

  • Step 5: Click "Save" and then "update items". That will load the latest articles from your RSS feed.

Placing the RSS Feed in a Block

Now that Aggregator is handling the RSS feeds for us, we'll go and place it into a block on our site:

  • Step 6: Go to Administer >> Site building >> Blocks. Scroll down to find the block with the same name as the feed your created in Step 4. Aggregator has automatically created this for you.
  • Step 7: More than likely, you will need to click "Configure" next to the block and choose a new title. Aggregator creates a default title of "[feed name] feed latest items".
  • Step 8: Publish the block and check to see how it looks on your site:

  • Drupal Aggregator Module

| Joomla
These are the best extensions we use to create Joomla sites. The only criteria for this list is that they are all completely free and run on the latest version of Joomla.
  1. Joomla Content Editor (JCE). Far better than the normal content editor.
  2. Mass Content. Allows you to create large numbers of articles very quickly.
  3. Lazy Backup. Emails you a daily back up of your entire database.
  4. Joomlapack. Makes it simple to back up and also move a Joomla site.
  5. XMap. Makes creating sitemaps very, very easy.
  6. Jumi. Allows you to paste any kind of code into Joomla. Normally the editor makes a mess of Javascript, PHP and other code.
  7. eXtplorer. You can edit all your files directly from inside Joomla.
  8. K2. If you want something more sophisticated than Section / Category / Article, you need K2. The next version promises to be even better.
  9. Metamod. Much more flexibility for modules. You can set start and finish dates, show different modules for different countries and much more.
  10. Sobi2. Capable of handling almost any kind of directory. Need a listing of staff members? a business yellow pages? Sobi2 can handle it.

| Joomla

tracks Joomla site searches

This tutorial will show you how to add a contact form to the front of your Joomla site. This will allow people to contact you easily and quickly without having to navigate through to a dedicated "Contact Us" page.

  • Step 1: Click here to download the Rapid Contact module. Login to the Administrator area of your Joomla site.
  • Step 2: Go to the Administrator area of your Joomla site and click on Extensions >> Install / Uninstall
  • Step 3: Upload the Rapid Contact module.
  • Step 4: Go to Extensions >> Module Manager then find and open the Rapid Contact module.
  • Step 5: On the right-hand side, under "Module Parameters" enter all the details you'd like to use on the contact form. Click "Apply" and check the contact form on the front of your site.

A note of caution: contact forms are susceptible to spam. If you find yourself receiveing spam emails from this form, go to "Module Parameters" and right at the bottom you will be select and enable a spam-blocking question.

| Joomla

Joomla Related ArticlesThis tutorial will show you how to create a list of related articles for your Joomla website.

You can see an example on the right-hand side of this site in the "Related Articles" module. Joomla is analysing the keywords in the current article and automatically listing other articles that have the most matching keywords. Related articles lists are:

  • ... good for Search Engine Optimization because the search engines can find accurate and descriptive links to other pages on your site.
  • ... good for your users because they can find other articles similar to the one they're already reading ... which is good for you because they may stay on your site longer

In order to create our list, we're going to need three extensions: a component, a module and a plugin. Let's get them up and running on our Joomla site:

  • Step 1: Click here to download the latest version of the "FJ Related" component.
  • Step 2: Click here to download the latest version of the "FJ Related Articles Plus" module.
  • Step 3: Click here to download the latest version of the "Add Keywords" plugin.
  • Step 4: Go to the administrator area of your site, Extensions >> Install / Uninstall and upload all three.
  • Step 5: Go to Extensions >> Plugin Manager and enable the "System - Add Keywords" plugin.
  • Step 6: Go to Extensions >> Module Manager and enable the "Related Articles" module.

Once you've followed those six steps, your related articles list should start working.

A note of caution: the "Add Keywords" plugin will automatically generate keywords for all your articles. You don't have to do anything. However, to reduce the amount of work your site has to do, it may not create the keywords automatically. Have patience and the links will show reasonably quickly.

3 out of 4 members use OSTraining at least once a week. You can build great websites. We can help.   Plans from $4 per month