Security Tips
Almost all of you still use admin as the master account... I don't and I hope Joomla 1.6 will make you specify a username during install.

That being said I login and make a brand new super admin, log out, log back in with that new user, go into user manager, and make admin a registered user and then disable the account.

The next security measure I make is I get my hostmask (im comcast customer)  .*.comcast.net is my hostmask... I am about to have business class services installed in my home so it will be a static ip as static ips will work for my next trick...

<Limit GET>
Order Deny,Allow
Deny from all
Allow from .wa.comcast.net
Allow from .sbcglobal.net
</Limit>

Put that into an .htaccess inside the administrator directory (replacing my hostmask with your own) and it requires anyone to have access to www.joomlamafia.com/administrator to have to have the same ISP in the same state as i, and the other location I work from have their ISP... and if I want access i have to first ssh/sftp into the site and edit the .htaccess to add in another ISP if I was out of town like I was this past week staying at a hotel.
 
How to include modules in Content item (for Joomla 1.5.x)

Step 1: Set up the module

Let's first create a module for use with this example.

  1. Go to "Extensions - Module Manager". Look for the module "Main Menu". Check the box besides the title, and choose "Copy" from the menu
  2. You will see a new module called "Copy of Main Menu" appearing below the original "Main Meu".
  3. Click on "Copy of Main Menu". First make sure Enabled is set at 'Yes'.
  4. Now, for the field "Position", first take a look at the entire list of the module positions in the pulldown menu. Then choose a new module name and just type it in there. Yes, just manually type it in, since it will not be in the pulldown selection list. This is a combobox that allows you to add new items by typing the new item in the entry field. In this example, I've chosen the new module name to be user201 as shown below..
  5. In the field "Menu Assignment", for Menus, make sure you select "All":
  6. Save the module.

Step 2: Create the content page

We will now create a content item for containing the module.

  1. Go to Article Manager and create a new article.
  2. In the article, enter the following:
  3. This is a test to include a module inside a content page.


  4. Note that the module name after loadposition has to match the module position you have created in Step 1.
  5. That's it! Save the article. We're all set!

Step 3: Let's test it

Now load the article. Did you see the "Main Menu" appearing inside that article similar to the following?

Note: If you wish to put this as the front page, go to menu item Manager - Main Menu, create a menu item linked to this content page, then move it to the first item. The page with the embedded module (for example, it could be a slideshow module) will become the front page.

 
PDF Display Fix in IE7

This solves the PDF problem in Joomla! 1.5 where any PDF file fails to display correctly in IE7. The usual symptom is that the pop-up window is empty.

There are 2 steps:

  1. Creata a new file called browser_detection.php and upload it to your Joomla! site.
  2. Edit icon.php in 2 places and upload it to your Joomla! site.

STEP 1

Create a php file called browser_detection.php. You can do this in any text editor or Dreamweaver. Copy, paste and save the following in to your new file:

<?php

/*
Script Name: Simple 'if' PHP Browser detection
Author: Harald Hope, Website: http://TechPatterns.com/
Script Source URI: http://TechPatterns.com/downloads/php_browser_detection.php
Version 2.0.2
Copyright (C) 29 June 2007

Modified 22 April 2008 by Jon Czerwinski
Added IE 7 version detection

This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
Foundation; either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

Get the full text of the GPL here: http://www.gnu.org/licenses/gpl.txt

Coding conventions:
http://cvs.sourceforge.net/viewcvs.py/phpbb/phpBB2/docs/codingstandards.htm?rev=1.3
*/


/*
the order is important, because opera must be tested first, and ie4 tested for before ie general
same for konqueror, then safari, then gecko, since safari navigator user agent id's with 'gecko' in string.
note that $dom_browser is set for all modern dom browsers, this gives you a default to use, unfortunately we
haven't figured out a way to do this with actual method testing, which would be much better and reliable.

Please note: you have to call the function in order to get access to the variables, you call it by this:

browser_detection('browser');

then put you code that you want to use the variables with after that.

*/


function browser_detection( $which_test ) {

// initialize the variables
$browser = '';
$dom_browser = '';

// set to lower case to avoid errors, check to see if http_user_agent is set
$navigator_user_agent = ( isset( $_SERVER['HTTP_USER_AGENT'] ) ) ? strtolower( $_SERVER['HTTP_USER_AGENT'] ) : '';

// run through the main browser possibilities, assign them to the main $browser variable
if (stristr($navigator_user_agent, "opera"))
{
$browser = 'opera';
$dom_browser = true;
}

/*
Test for IE 7 added
April 22, 2008
Jon Czerwinski
*/

elseif (stristr($navigator_user_agent, "msie 7"))
{
$browser = 'msie7';
$dom_browser = false;
}

elseif (stristr($navigator_user_agent, "msie 4"))
{
$browser = 'msie4';
$dom_browser = false;
}

elseif (stristr($navigator_user_agent, "msie"))
{
$browser = 'msie';
$dom_browser = true;
}

elseif ((stristr($navigator_user_agent, "konqueror")) || (stristr($navigator_user_agent, "safari")))
{
$browser = 'safari';
$dom_browser = true;
}

elseif (stristr($navigator_user_agent, "gecko"))
{
$browser = 'mozilla';
$dom_browser = true;
}

elseif (stristr($navigator_user_agent, "mozilla/4"))
{
$browser = 'ns4';
$dom_browser = false;
}

else
{
$dom_browser = false;
$browser = false;
}

// return the test result you want
if ( $which_test == 'browser' )
{
return $browser;
}
elseif ( $which_test == 'dom' )
{
return $dom_browser;
// note: $dom_browser is a boolean value, true/false, so you can just test if
// it's true or not.
}
}

/*
you would call it like this:

$user_browser = browser_detection('browser');

if ( $user_browser == 'opera' )
{
do something;
}

or like this:

if ( browser_detection('dom') )
{
execute the code for dom browsers
}
else
{
execute the code for non DOM browsers
}

and so on.......


*/

?>


Upload browser_detection.php to the folder libraries/joomla/utilities/ on your site.


STEP 2

  • Find the file icon.php in the folder components/com_content/helpers/. Note: Make a copy of this file so you can restore it if needed.
  • Under the <?php tag on line 1 create a space and copy and paste this code:
 require_once("libraries/joomla/utilities/browser_detection.php");

 

  • Replace this line of code on line 58
 $attribs['onclick'] = "window.open(this.href,'win2','".$status."'); return false;";

with the following code:

    $user_browser = browser_detection('browser');
if ($user_browser == 'msie7') {
$attribs['target'] = '_blank';
} else {
$attribs['onclick'] =
"window.open(this.href,'win2','".$status."'); return
false;"
;
}
Save and upload the file to components/com_content/helpers/.

Note: Your browser's cache may need to be cleaned before you can see the PDF working.

 
Automatic Joomla Updates

Please see this article

 
Joomla 1.5.5 SEF Upgraded

SEF core Upgraded in Joomla 1.5.5

Many agree, one of the most important features of Joomla! 1.5 is improved SEF URLs. A number of bugs with SEF Content URLs were fixed in this release, including issues related to Section List links, Breadcrumbs, Article Archives, Page Titles, and Article links in various Modules. A goal for the Joomla! 1.5.5 release was to correct those errors. In addition to the bug fixes, an improvement to Category Blog SEF URLs is now available in Joomla! 1.5.5.

Prior to Joomla! 1.5.5, Category Blog Article SEF URLs followed this pattern: http://example.com/menu-item-alias/nn-category-alias/nn-article-alias.html

With Joomla! 1.5.5, the URL no longer includes the nn-category-alias node, as this pattern shows: http://example.com/menu-item-alias/nn-article-alias.html

Existing Joomla! 1.5 Web sites should experience no problem due to this SEF URL enhancement. The Joomla! Bug Squad tested to ensure existing SEF URLs for Category Blog Articles continue to navigate to the correct page. No problems were discovered during this testing.

To help ensure all SEF URL fixes produced intended results, the Bug Squad introduced automated testing for SEF URLs. While this initial testing is far from exhaustive, it has proven to be valuable. Expanded automated URL testing will be an integral part of ensuring SEF URLs continue to provide consistent results for future releases.

The Bug Squad would like to thank Louis Landry for developing the SEF URL Content patch. With these fixes, many errors on the Joomla! 1.5 Tracker were corrected and the SEF URLs for Content are now working, as intended.

 
Intro to SEO (Search Engine Optmization)

The Importance of Google PageRank: A Guide For Small Business Executives

If you’ve spent time (or are simply curious) about online marketing, then the topic of search engine optimization (SEO) usually comes up. And, no discussion of search engine anything is complete these days without some mention of Google. This article provides a brief overview of how Google ranks search results with a look at their PageRank™ algorithm (a key component). I’m not a search engine expert (that’s the bad news). The good news is that I know enough to describe Google PageRank in relatively simple terms (such that you can impress your friends and family with your new-found knowledge).

Quick Intro To SEO (Search Engine Optimization)

Put quite simply, SEO is the process of optimizing your website for the search engines (like Google). By “optimizing”, I mean attempting to make it such that searches for specific phrases rank your website higher in the search results than other websites. There are lots of good reasons to want to rank higher, but for businesses, the primary reason is to generate good leads for your offering. Millions of people use Google every day looking for a product, service or information. Some of these people might be potential clients looking for your particular offering. There are two ways for you to show up on the results page when users are doing a search. The first is paid advertising (I’ll talk about this in a future article) and the second is what is known as “organic” (or “natural”) search. The natural search results are listed free and are dependent on Google’s estimation of how relevant and credible your website is. Natural search results are my favorite kind, because you don’t have to pay money for them, and they often works better than paid advertising. I liken this to the difference between getting mentioned in a magazine article and purchasing an ad in that same magazine.

If you can rank high on the free (organic) search results for Google, it’s like getting tens of thousands of dollars worth of free advertising in the most relevant trade magazines for your industry, every time a new issue comes out. I’m not sure about you, but that’s pretty interesting to me. It’s a great way to grow your business and find new clients. So, how do you get all this free, effective advertising in the search engines? Well, to do that you need to understand the Google algorithm and how it determines who gets listed.

Google’s Search Algorithm

First, let’s establish a simple example which we can use to frame our discussion. Let’s assume you are the partner in a boutique strategy consulting firm. Lets further say that your specialization is advising technical founders of high-growth, venture-backed companies on how to be better at selling. Now, you could probably identify a number of search phrases that your potential clients might use when interested in this particular topic. Users may search for something like “technical sales consultant to founder”. Or, they may just start by looking for content (instead of consulting) and search on “successful technical selling”. In either case, Google has an algorithm that figures out which websites of the hundreds of millions out there should be displayed in rank order on the results page. These are the organic (i.e. non-paid) results. You want to rank high on these results. [Author’s note: If you do actually search Google on “successful technical selling”, you’ll find that my OnStartups.com blog ranks #1].

Though Google’s algorithm is extremely sophisticated, it boils down to something like this:

Search Ranking = Relevance * PageRank

Relevance is basically the measure of how your website (or more accurately one of your web pages) matches the search phrase the user has entered. Measuring relevance is a relatively sophisticated process, but it boils down to some fundamentals like the title of the page, words on the page and how frequently they occur, etc. So, if your home page has things like “technical selling”, it drives up the relevance for this particular search. The reason my blog article is ranked #1 on Google for “successful technical selling” is in no small part because of the title OF ONE OF MY ARTICLES (“Successful Selling Tips For The Technically Gifted”). Basically, Google figures out what your page is “about” by looking at it’s content (and by looking at other sites with similar content that are linking to yours). It then uses this to figure out how relevant you are for a particular search phrase.

PageRank is an independent measure of Google’s perception of the quality/authority/credibility of an individual web page. It does not depend on any particular search phrase. For the public (you and me), Google conveniently reports this as a number from 0-10 (10 being the best). So, assuming for a second that your web page and your competitors web-page has the same relevance – then whoever has the higher PageRank gets the better ranking – and shows up at the top of the results page. This is why PageRank is so important. Your relevance is based on your content (if you’re a consulting company specializing in technical selling, your relevance for stainless steel monkey wrench searches is going to be understandably low). Your PageRank is what counts.

How PageRank Is Calculated

There has been a lot written and a lot debated about Google’s PageRank, but on one point there is near unanimous agreement. PageRank is primarily determined by how many other web pages are linking into you. Google considers this kind of inbound a link a vote of confidence. But, here’s the trick: Not all inbound links are created equal. Web pages with more credibility that link to you have more “value” to your PageRank than those with less credibility. How is this credibility determined? Why, by their PageRank, of course! So, let’s take an example. Lets say you have your Uncle Charlie link to you from his blog to your small business website. Let’s also say that Uncle Charlie’s blog has a Page Rank of 3 (this is being a little generous because all Uncle Charlie writes about is his dog Sparky and he has limited inbound links). This link from Uncle Charlie will certainly help you – a little bit. It will help you more if you can find 100 such Uncle Charlie websites with a PageRank of 3 and get them to link to you.

0-3: New sites or sites with very minimal links
4-5: Popular sites with a fair amount of inbound links
6: Very popular sites that have hundreds of links, many of them quality links
7-10: Usually media brands (NYTimes.com), big companies or A-list bloggers.

Now, it’s important to note that PageRank is believed to be calculated on a logarithmic scale. What this roughly means is that the difference between PR4 and PR5 is likely 5-10 times than the difference between PR3 and PR4. So, there are likely over a 100 times as many web pages with a PageRank of 2 than there are with a PageRank of 4. This means that if you get to a PageRank of 6 or so, you’re likely well into the top 0.1% of all websites out there. If most of your peer group is straggling around with a PR2 or PR3, you’re way ahead of the game.

What’s Your PageRank?

There are two ways to figure out what your approximate PageRank is. One, you can download the Google Toolbar (the PageRank feature is not turned on by default, so you’d have to enable it after installation).

The other way is to use the Google PageRank Calculator page on this website. It’s quick, free and requires no registration. Check it out. If you have a PR6 or higher, I’ll be very impressed.

Quick recap: Organic search is like free advertising. It’s worth the investment to try and get a high ranking by the major search engines. To rank high you should do two things: First, make sure your site has the right relevant content for the types of searches your potential clients are conducting. Second, try to get the highest PageRank possible. To do this, you need to get as many inbound links from as many high PageRank web pages as possible.

 
Firefox 3.0 Tabs Trick

Too many tabs? Here is a neat little trick/hack I discovered that will let you open a Firefox window nested within a tab in an existing Firefox window.

The Trick

The trick is simple, simply enter this in your address bar

chrome://browser/content/browser.xul

FireFox Tab Trick

For added convenience, you can bookmark this link and place it in your bookmark toolbar for quick access. This works because the Mozilla Gecko engine renders the entire UI (not just the webpage) in the same way. So the UI is really just another thing for Firefox to render.

Advantages

  • This can really help you organize your tabs by grouping related tabs together in a single tab.
  • You can hide an entire browser session a few levels deep and if your boss walks by, simply switch to another tab at the top level. Your tabs will be hidden and the only thing that will be displayed in the parent tab are the words “Mozilla Firefox” (most of the time).
  • Prank/confuse co-workers

Disadvantages

  • Having recursive Firefox windows open will reduce screen estate — especially if you have many toolbar add-ons.
  • Some shortcuts won’t work as expected. For example, double clicking on the tab bar to open a new tab in a sub-window will open new tabs in the root (highest parent) window as well.
  • There are a few other quirks. The address bar doesn’t update when you switch sub-tabs. And the title in the tab gets updated weirdly.
  • Restoring a closed tab containing sub windows will (most often) not restore the tabs previously open.

This should work on older versions of Firefox but I only tested it on Firefox 3 Let me know if it works in Firefox 1.x or 2.x

 
URL Tips

Tips and Tricks for your URLs

http://www.joomlamafia.com/index.php?tp=1 <= Gives you your template with its content, and outlines each module Position

tmpl=component <= uses the /templates/system/component.php or the override in your own template

format=feed|raw|html|pdf <= creates output for the mentioned format

 


Page 1 of 3

Please Take The Poll

New Site
 
 
JoomlaMafia has readers from all over the world and in many languages. If you create a translation of one of our posts and link to it than please let us know so we can add a link back to the translation at the original post.