Changing Joomla's Date Format to American Format

For one reason or another, American's preferred date format (e.g., February 25, 2010) is not an option within Joomla.

I know there's many people who use Joomla who are not in the U.S., but for those of you who are, if you'd like to change the date format in Joomla to the American format, this one's for you.

You can see the date format appear in a number of different places, but one common place you'll see it is in an article's date created information:

qt2_shot_1

The date format you see in the above image is Joomla's default date format, which is the international date format.

I'll show you two ways you can change this date format: 1) By editing one of Joomla's core files, and 2) installing a US language pack.

Here's how to change the international date format to Month Day, Year (while also removing the time stamp) by editing one of Joomla's core files.

1) Using your ftp software, such as Filezilla, navigate to the en-GB.ini file, which is in this location: your root directory/languages/en-GB/en-GB.ini

2) Open the en-GB.ini file with your plain text editor and look for this line of code towards the top of the file:

DATE_FORMAT_LC2=%A, %d %B %Y %H:%M

3) That's Linux date format code, and you'll need to change it to this:

DATE_FORMAT_LC2=%B %d, %Y

4) Once you make that change, save the en-GB.ini file and upload it back to the en-GB directory.

5) Go back to the front of your site and refresh the page. You should see this date format now:

qt2_shot_2

Now, here's an important note to keep in mind: when you make this change, you're editing a core Joomla file. When you upgrade Joomla, there's a chance that there will be a new language directory, a new en-GB directory, or a new en-GB.ini file.

If that's the case, when you upgrade, your date change will be lost, since the en-GB.ini file that you edited will be overwritten by the new one in the Joomla upgrade package.

If you're fine with potentially needing to make this simple change each time you upgrade, then you're fine.

If you want to avoid that, there's another way to make this change: install the American Language pack by Dave Morgan.

Here's how:

1) Go to this page and download the language pack by clicking on the download link:

English Language pack

2) Install it in Joomla by going to Extensions>Install Uninstall.

Click on Browse, find the language pack file you downloaded, and double click on it when you find it.

Then click on Upload and Install on the Extension Manager page.

3) After it's been successfully installed, go to Extensions>Language Manager.

4) Check the radio button next to English(United States) and then click on the Defualt icon in the upper right of the page to make this language pack your default language pack.

5) Then, go to the front of your site and refresh the page, or navigate to a page that has a date showing and you should see a date format like this:

qt2_shot_3

If you want to edit how that date format is appearing, such as taking the time stamp off, go to language/en-US and open the en-US.ini file. Change the date format for LC2 in a similar way that I described above for editing the en-GB.ini file.

For example, if you wanted to remove the time stamp, you would delete the %H:%M on the line of code for the DATE_FORMAT_LC2 within the en-US.ini file. Currently, that line of code is on line 11 of that file.

When you update Joomla, your date format changes will remain in tact as long as the core Joomla team doesn't create a new language directory named en-US as a new option.

Joomlashack University loves CMS Expo

CMS ExpoCMS Expo IV is ON for this May 3-5th in Chicago, and it's bigger, better, and busier than ever! Joomlashack University is very proud to sponsor this amazing and can't-miss event.

Not only is CMS Expo a hotbed of the world's leading Joomla experts, developers, and trainers, the conference has expanded to include learning tracks and presentations on a wide range of the world's best open source Content Management Systems.

Read more: Joomlashack University loves CMS Expo

How to put modules in Joomla articles

One of the handiest tools you can have in your Joomla toolbox is the ability to put the contents of a module right into the body of an article. (The article you're reading now is using this method. See the message in the box right above this sentence? That's actually content from a module being loaded right into this article.)

This can be a significant timesaver, since you can create a module one time in the Module Manager and then simply place it into any number of articles on your site.

That means you wouldn't have to set up that content individually in every article: you do the work once and then simply tell Joomla where you want that module to appear.

To show you how to do this, I'll show you an example of using this method to put a newsletter sign up form right in an article.

Here's a look at the end result:

qt_scrnshot_1

Here's how to do this:

1) In Joomla go to Extensions>Module Manager. Then click on New to create a new module.

2) Select Custom HTML from the list of available modules. (You can put other types of modules in articles, but for this example I'll show you how to do this with a custom HTML module.)

3) Name your module. In this example, I named the module "Newsletter sign up."

4) Set show title to "No."

5) For the module Position (and here's the key of this trick), put your cursor in the field next to "Position" and type in a new position name. In this example, I've called the new position "newsletter."

qt_scrnshot_2

6) For the menu assignment, you can leave it set to All.

7) In the Custom Output area, enter in whatever content you want to have in this module. In this example, I've got some code entered that's creating the iContact newsletter sign up form:

qt_scrnshot_3

8) When you're done, save the module.

9) Go into the Article Manager (Components>Article Manager) and open up an article where you'd like to put this module.

10) Wherever you want the module to be, type in this syntax (which is sometimes referred to as the "loadposition syntax") :

qt_scrnshot_5

Replace "newmoduleposition" with the name of the new module position you created when you typed in the new position name in the custom HTML module.

For my example, this is how my article with the newsletter module in it looks when opened up in Joomla:

qt_scrnshot_4

11) Save the article and check how it looks on the front of your site. That's it!

Now, whatever article on your site that you want to have this module appear in, all you have to do is enter in the loadposition syntax and it will appear.


Testing a Server for PCI Compliance

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: Testing a Server for PCI Compliance

Will that be cash or credit?

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: Will that be cash or credit?

New Lessons in Joomlashack's Online Joomla Training University

New Lessons in Joomlashack's Online Joomla Training University

We've just released over 50 minutes of new video lessons in the Intermediate course in Joomlashack University.

In the Blogging With Joomla learning module, you'll find two new videos:

Read more: New Lessons in Joomlashack's Online Joomla Training University

How to Use Dynamic CSS in Your Joomla Extension

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: How to Use Dynamic CSS in Your Joomla Extension

New Intermediate Online Joomla Training at Joomlashack

New Intermediate Online Joomla Training at Joomlashack

Take your Joomla skills to the next level with our Intermediate Joomla Course from Joomlashack University, the leading online Joomla training course.

When we launched Joomlashack University back in October, we knew Joomla beginners would flock to our rich library of step-by-step videos and written tutorials. And then they did in droves. But what to do when they're ready for more?

The Intermediate Joomla Course

With our first crop of students ready to move into new learning territory, we've loaded the Intermediate course with over 2.5 hours of new video tutorials, including:

Read more: New Intermediate Online Joomla Training at Joomlashack

Importing RSS Feeds Into Joomla Articles

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 other sites in our network.
  • 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

5 Useful JCE Features That People Miss

It's no secret that Joomla's default editor TinyMCE lacks quite a few features. We often recommend that people upgrade to Joomla Content Editor (JCE). You can click here to find full instructions on 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 Joomlashack.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".