Special 2018 Offer! Get access to everything at OSTraining for one year! Only $59!
  Offer ends in 1
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

| Joomla

This tutorial is the answer to two questions we've been asked repeatedly:

  1. How can I automatically link keywords to the appropriate websites?
  2. How can I use internal links for links on my site?

Essentially they're looking to change a link from http://www.cnn.com to http://www.ostraining.com/link/cnn/. The link still goes to the CNN website, but it first goes to a url on the webmaster's own site.

Why Would People Want to Automatically Link Keywords to Pages?

This is what Wikipedia, the New York Times, Techcrunch and many other websites do in order to keep visitors browsing around their site. It also has substantial SEO benefits. To find out more, see Session 25 of our SEO class: Understanding Internal Linking.

Why Would People Want Internal URLs for Links?

  1. Statistics. They want to be able to count how many time a link has been clicked on.
  2. SEO. Some webmasters are worried about leaking their Google Page Rank to other sites. I am not a big believer in this technique, but I know several people who consider this to be important.
  3. Affiliates. People running affiliate programs want to protect their affiliate links:

    • They think internal urls are more likely to be clicked than a url that looks like this: http://www.anrdoezrs.net/click-2660093-10423359
    • Some people deliberately avoid clicking on affiliate links
    • There are even rumored to be some computer-based viruses that are capable of inserting the spammer's affiliate ID into links to popular affiliate programs when people are browsing.

How to Create Internal URLs for Outbound Links

  1. Go to Administrator >> Components >> Weblinks
  2. Click "Categories" and then "New". Create a category for the kind of link you'd like to add. In this case, it will be "Media"
  3. Click "Links" and then "New". Add entries for the websites you'd like people to visit:
  4. bbc

  5. If you're using Search Engine Friendly URLs, the URLs created will look like this: /weblinks/media/keyword/. If you're not, the URLs will be in this format: /index.php?view=weblink&catid=2:media&id=keyword&option=com_weblinks&Itemid=48

Automatically Add Links to Keywords

We're going to use a small plugin called the "Weblinks Content Plugin":

  1. Download the plugin from http://joomlacode.org/gf/project/weblinks/
  2. Go to Extensions >> Plugin Manager and enable the plugin.

That's it. Now every time you mention an entry in your Weblinks component it will be automatically linked. For example, these are our three recommendations for Joomla hosting companies: Rochen, Bluehost, Hostgator or even the example we gave earlier: BBC.

As people click on these links, you can see how many times they've clicked by going to Components >> Weblinks and looking at the "Hits" column:

count

| Joomla

The hottest new extension in Joomla is K2.

Why? Normal Joomla articles provide you with a Title and Body. K2 gives you the flexibility to add much more information. Last week in Part 1 we covered the main administrator parts of K2:

  • Installing K2
  • The K2 dashboard
  • K2 categories
  • K2 fields and field groups
  • K2 items

If you haven't done so already, I highly recommend that you go back and read Part 1 first. This week we're going to focus on the frontend of K2.

K2 Frontend

After Part 1, we should have a several categories, fields and items already inside K2. There are two items that we haven't covered yet, and they really affect the frontend of the site: users and tags.

K2 Users

Each user can have their own profile through K2. That information will appear at the bottom of each article they write, together with details of the other articles they've written. This is Chris, the author of the Canon EOS Rebel article:

Chris Profile Page

  • Administrators: People who are Managers, Administrator or Super Administrators can upload their information by going to Components >> K2 >> Users
  • Front-end users: When you uploaded the original K2 package, it included a module called "K2 Login". Go to Extensions >> Module Manager and publish that module to allow front-end users to manage their profile.

One downside is that you can't create user fields currently, without writing a custom plugin. There is only:

  • Name
  • Email
  • Gender
  • Avatar
  • Website
  • Description

That stands in contrast to a really powerful feature of K2's user system:

K2 User Groups

K2 allows you to have different authors for different categories of your site. If you'd like to have a "Digital Reporter" who submits only review of cameras, you can go to Components >> K2 >> User Groups >> New and create that group from the screen below:

K2 User Groups

So you could create several different levels of users. To give just three simple examples:

  • Contributors: They can add items in particular categories.
  • Copy Editors: They can edit and publish items in particular categories.
  • Senior Editors: They can add, edit, publish and control items in all categories.

If you use the "K2 Login" module, people can submit articles from the front-end without needing to write from the admin.

K2 Tags

K2 also has the option to add keyword tags to items. These are common in blogs and also is in catalogs so people can easily find related products. On your items, it will look like this:

K2 Tags

These tags can be added easily: when you're submitting an item:

entertags

K2 Menu Links

Let's start seeing how our items look. Go to Menus >> Main Menu >> New and click K2. You'll see a screen like this:

K2 Menu Items

  • Item: Link to just one single K2 item.
  • Categories: Link to items form one or more categories at the same time.
  • Tag: You can add keywords to the bottom of each item.
  • User Page (blog): You can have a list of all the items written by one author
  • Latest items: This one explains itself :)

We've been looking at http://demo.getk2.org as an example. If you look there you'll see examples of those different kinds of layouts:

K2 Layout Options

  • "Product" = Item
  • "Blog Entry" = Item
  • "Category Layout"and "Product Categories" = Categories
  • "Latest items" = Latest Items

An Overview of K2 - the Missing Documentation (Part 2)

Hopefully we've given you a taster of K2 and how you can use it to create articles with far more information and features.

We've taken you through all the basic aspects of K2. There's enough material for many more tutorials, including how to add video, photos, photo galleries, attachments and much more, but hopefully these two tutorials have been enough for you to catch the K2 bug!

    | Drupal

    This week's tutorial is the first of a two-parter. We've had several students in our classes looking to build websites with multiple content authors ... blogs, newspapers, university sites and more. A common request is to improve Drupal's default handling of nodes.

    This week we'll show you how to give each person their own control panel for their nodes. This will allow them to much more easily see, understand and update the content they've submitted. Without it they'd be reduced to searching and guessing their way through the site to find their content.

    Next week we'll focus on how to create a workflow and allow nodes to pass through several approval steps before publication.

    In order to give each person their own control we're going to use a module called "Workspace":

    Installing Workspace to Your Drupal Site

    • Step 1: Visit http://drupal.org/project/workspace to download the latest version of "Workspace".
    • Step 2: Extract the files into a folders on your desktop. The folder will be called "workspace".
    • 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 "workspace" folder to /sites/all/modules/
    • Step 5: Go to Administer >> Site building >> Modules and enable Workspace. You'll need to check only one box.
    • Step 6: When your users login they'll see a link in the admin menu called "My Workspace". When they click on it they'll see a screen like this:

    Drupal Workspace Module

    From this screen your users will be able to search for all their nodes, just as you search through them from Administer >> Content Management >> Content.

    | Joomla


    Full Class on this topic

    The hottest new extension in Joomla is K2.

    Why? Normal Joomla articles provide you with a Title and Body. K2 gives you the flexibility to add much more information. For example, this is part of a K2 article about a camera called the Canon EOS Rebel:

    K2 Additional Information

    Beyond just an article, you can add information about:

    • Price
    • Weight
    • Color
    • A link for more information

    You can also add tags, videos, photo galleries, comments and more.

    That is the essential benefit of K2 ... you can create articles with far more information and features.

    Installing K2

    • Go to http://getk2.org and download the file.Download K2
    • You'll see a file on your desktop with a name very similar to K2_v2.2.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 >> K2

    The K2 Dashboard

    When you go to Components >> K2 you should see a screen like this one below:

    K2 Dashboard

    You'll mainly be working from the top menu, so these are the links to concentrate on:

    K2 Menu

    • Dashboard: Will take you right back to the screen you're looking at.
    • Items: That's K2's name for articles. That's where you'll add all your content.
    • Categories: Joomla places articles into Sections and Categories. K2 only has categories but you can have as many levels as you like.
    • Tags: These are the small keywords you can add at the bottom of each item.
    • Comments: K2 has its own comments system. Here you'll find all the comments written on your site.
    • Users: A list of all your K2 writers.
    • User Groups: Here you can control which categories and which features your writers have access to.
    • Extra Fields: Remember the Price, Weight, Color for the camera? Those are fields.
    • Extra Field Groups: If you have a lot of fields, you can organize them here.

    Understanding K2

    When you're getting started with K2, I'm going to recommend that you work in this order:

    1. Categories
    2. Extra Fields / Extra Fields Groups
    3. Items
    4. Other features ...

    This Missing Documentation tutorial will take you through Steps 1, 2 and 3. Next week in Part 2 we'll cover the other features.

    Step 1: K2 Categories

    The reason we're starting with categories is that otherwise we won't have anywhere to put our items. If you create an item called "Canon EOS Rebel" you need a category called "Cameras" to put it into. There isn't an "Uncategorized" option as with Joomla.

    Our aim for this tutorial is to build a site similar to K2's demo. The K2 demo has multiple different categories. We're going to focus on the Catalog. Let's start recreating that set up:

    • Click "Categories"
    • Click "New" and you'll see a screen like the one below:

    K2 New Categories

    • Enter your "Title" for the first category. In this case it will be "Catalog".
    • The "Title Alias" is just same as with Joomla. It will be the URL of this page if you have Search Engine Friendly URLs.
    • "Parent Category", "Inherit parameter options from category" and the other options can wait until we have more of K2 set up.
    • For now just enter a description for your category or click "Image" to upload an image for this category. Both of these are identical to normal  Joomla which allows a description and image for each category.
    • Click "Save and New" and move on.
    • Create more 4 categories called "Digital", "Climbing", "Bikes" and "Snowboard". Make sure to choose "Catalog" from the "Parent Category" dropdown.
    • By the time you're finished you should be able to click "Save" and see a category tree like this:

    K2 Category Tree

    We're going to re-create the K2 demo site so we need to do something else also. The demo site has a blog and a magazine layout. Go ahead and create a category called "Blog" and also one called "Magazine". K2 is big enough to handle products, blogs, magazines and more in just one installation:

    K2 Category Tree

    Step 2: K2 Groups

    Now that we have organization for our articles, we can start to add information to them. A product page is going to need different information than a blog or magazine page. That's where groups come in. We're going to recreate the same fields that we saw with the Canon EOS Rebel.

    • Click "Extra Field Groups".
    • Click "New".
    • Enter "Additional Info" and click "Save.
    • Click "Extra Fields"
    • Click "New" and you'll see a screen like the one below:

    K2 New Fields

    We're going to recreate the fields we saw for the camera:

    • Price
    • Weight
    • Color
    • A link for more information

    For all of them, we need to select "Additional Info" from the "Create New Group" dropdown.

    • For Price, Weight and Color you can choose "Text Field" and click "Save".
    • For the "More info" link you can simply choose "Link". You might also want to choose "External link" for "Link Text" and "Lightbox popup" for "Open in".

    Hopefully when you're done, you'll see a screen like this:

    K2 New Fields

    Next we're going to bring Step #1 and Step #2 together and apply those fields to some of our categories:

    • Click "Categories"
    • Click "Catalog"
    • Under "Associated "Extra Fields Group" choose "Additional Info".
    • Open up "Digital". This time we're going to "Inherit parameter options from category" and choose "Catalog". That means that we can automatically update this category when we change "Catalog". We don't have to open it up and make individual changes to each category.
    • Repeat the process for "Climbing", "Bikes" and "Snowboard".

    Step 3: K2 Items

    Now we're all set up. We have categories and information for our items. Let's go and write them:

    • Click "Items"
    • Click "New" and you'll see this screen:

    K2 New Item

    Now you can really start to see the power of K2! Image, Image galleries, videos, extra fields, attachments and more!

    • Enter "Canon EOS Rebel" into the "Title" field.
    • Choose "Digital" from the "Category" dropdown.
    • From there you're free to add as much information about this product as you want:
      • Content: write your article (or copy and paste from the K2 demo)
      • Image: upload an image that will go at the top of the page
      • Image Gallery: to have an image slideshow you'll need to install and enable the Simple Image Gallery plugin from http://www.joomlaworks.gr, the makers of K2.
      • Video: to add videos, install and enable the AllVideos plugin also from from http://www.joomlaworks.gr.
      • Extra Fields: you should see Price, Weight and the other fields we added.
      • Attachments: you can upload a document for people to download.
    • Click "Save" and repeat the process for more items ...

    An Overview of K2 - the Missing Documentation (Part 1)

    Hopefully we've given you a taster of K2 and how you can use it to create articles with far more information and features.

    Looking at the top menu, you can see that we haven't covered Tags, Comments, User, User Groups. We also haven't show you how to control the frontend layout of your K2 site. All of that and more is in Part 2 of our K2 documentation!

    K2 Menu

    | Development

    Session storage is a very important aspect of web applications. In its simplest form, a PHP session allows data to be stored temporarily on the server and accessed throughout a user's time on the site. When that user leaves the site or is inactive for a certain amount of time, the data is destroyed. While anonymous sessions are common, sessions are usually associated with user logins. When a correct username/password combination is entered, a session is created around that user's access information and then read and checked every time that user loads a page. As a developer, you can access this session functionality to enhance your extensions.

    Read more ...

    | Drupal

    Would you like to be able to update your Drupal site and automatically send those updates 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 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

    There are at least three ways you export an RSS feed from your Drupal site. We'll break the options into easy, medium and hard:

    Easy: You can just use Drupal's default feed. Simply add rss.xml to site's address. For example the main Drupal.org feed is at http://drupal.org/rss.xml. The downside is that you don't have much control of the feed's content. Whatever is on your site's frontpage will be included.

    Medium: A module called "Syndication" will give you more control"

    • Drupal RSS FeedsStep 1: Visit http://drupal.org/project/syndication to download the latest version of "Syndication".
    • Step 3: Extract the files into a folders on your desktop. The folder will be called "syndication".
    • 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 "syndication" folder to /sites/all/modules/
    • Step 6: Go to Administer >> Site building >> Modules and enable "Syndication".
    • Step 7: In your admin menu you should now see an option called "RSS Feeds". Click on this menu link and you'll be able to create custom feeds based on either particular taxonomies or on particular blogs from the Blogs module.

    Hard: You can use the "Views" module to completely customize your RSS feed. Full instructions are here.

    Whichever route you use, the key is to end up with a URL for your feed at the end. Keep that safe and we'll use in a few minutes.

    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.

      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.

    | Joomla

    Video Showing How To Edit a Joomla Template

    Learning to Edit a Joomla Template

    Seeing Your Template Code

    This tutorial will show you how to start editing Joomla templates. I'd recommend starting with a plain Joomla installation - a test site. Don't try this for the first time on your live site! If you need help installing Joomla on your computer we have intsructions for both the P.C. and the Mac. We're going to be using the default rhuk_milkyway template.

    We'll start by looking at the index.php file. It is located here: / templates / rhuk_milkway / index.php. Every template has this file and it places all of the different elements on the page.  

    • Go to Administrator >> Extensions >> Template Manager and open the rhuk_milkyway template.
    • Click "Edit HTML" in the top-right corner. You'll see the code that controls your template's output.
    • Backup! Select all of the code and copy it into a text editor. Save the file somewhere safe.

    Editing Your Template Code

    This is a little trick that will swap the modules in the left and right-hand columns.

    • Scroll down in the code until you see:

      < jdoc:include type="modules" name="left" style="rounded" / > (I've inserted a space at the beginning and end to stop the code from working here)

    • This line of code tells Joomla to show all the module in the "left" position.
    • Then scroll down until we see:

      < jdoc:include type="modules" name="right" style="xhtml" / >

    • Let's do the reverse of what we did earlier and change name="right" to name="left"
    • Click "Apply" and check the front of your site.

    Joomla Template Change

    Seeing Your CSS Code

    Next we'll look at the CSS file which controls the color, fonts, images and much more for your template. There was only one index.php file but often there are many CSS files. Each one controls a different aspect or style of the template - for example, one might control the red variation of the template, another green variation and a third the blue. Template designers split them into different files so you don't have to load them all each time - you don't have to load the green and blue code if you're only using the blue code.

    However, 99% of the time Joomla designers put all of the most important code into template.css (fairly logically named). It is located in this folder: / templates / rhuk_milkway / css /.

    • Go to Administrator >> Extensions >> Template Manager and open the rhuk_milkyway template.
    • Click "Edit CSS" in the top-right corner.
    • Scroll down until you find the template.css file and open it up.
    • Backup! As above, select all of the code and copy it into a text editor. Save the file somewhere safe.

    Editing Your CSS Code Part 1

    First, let's change part of our site's style. We'll modify the design of links on our site:

    • Scroll down in the code until you see:

      a:link, a:visited {
      text-decoration: none;
      font-weight: normal;
      }

    • This line of code tells Joomla how to style the links on your site.
    • Let's change that code so that our links will be underlined:

      a:link, a:visited {
      text-decoration: underline;
      font-weight: normal;
      }

    • Click "Apply" and check the front of your site.
    Joomla Template Change

    Editing Your CSS Code Part 2

    Next we'll move the search box from the top-left to the top-right:

    • Scroll down in the template.css code until you see:

      #search {
      float: right;
      width:320px;
      margin-top: -20px;
      margin-right: 30px;
      height: 40px;
      overflow: hidden;
      text-align:right;
      }

    • Let's change that code so that our search box will move to the left:

      #search {
      float: left;
      width:320px;
      margin-top: -20px;
      margin-right: 30px;
      height: 40px;
      overflow: hidden;
      text-align:right;
      }

    • Click "Apply" and check the front of your site:

    Joomla Template Change

    Great, I've Got That ... What Next?

    If you're feeling confident after these first steps, see if you can follow our tutorial on changing the logo on a Joomla template.

    | 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

    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