Joomla Mafia 1.5.x Tutorials Tips Tricks More | Guides
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.

 


Page 1 of 4

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.