formats

Tip: Change default page to open

This is not really a Joomla tip, but could be handy anyway.

Say you want visitors to go page “filename.html” instead of “index.html” after entering your domain…
Add this to your .htaccess:
Code:

1
DirectoryIndex filename.html index.cgi index.pl default.htm
DirectoryIndex filename.html index.cgi index.pl default.htm

In this example first filename.html will be opened, then index.cgi, index.pl and at last default.htm.

 
 Share on Facebook Share on Twitter Share on Reddit Share on LinkedIn
No Comments  comments 
formats

Howto convert joomla 1.0.x templates to 1.5.x

For making your “old” Joomla 1.0.x working in native mode in Joomla 1.5.x, please follow the next steps:

Replace the head of your document with the code below. Replace all of the top code in your index.php code down to the tag with the following:
Code:

1
2
3
4
5
6
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $this->language; ?>" lang="<?php echo $this->language; ?>" dir="<?php echo $this->direction; ?>" >
<head>
<jdoc:include type="head" />
<link rel="stylesheet" href="<?php echo $this->baseurl ?>/templates/<?php echo $this->template ?>/css/template.css" type="text/css" />
</head>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $this->language; ?>" lang="<?php echo $this->language; ?>" dir="<?php echo $this->direction; ?>" >
<head>
<jdoc:include type="head" />
<link rel="stylesheet" href="<?php echo $this->baseurl ?>/templates/<?php echo $this->template ?>/css/template.css" type="text/css" />
</head>

Replace all php codes relating to modules.
This is an example of an old code
Code:

1
<?php mosLoadModules ( 'header', -3 ); ?>
<?php mosLoadModules ( 'header', -3 ); ?>

Replace with this

Code:

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

Replace the mainbody code from
Code:

1
<?php mosMainBody(); ?>
<?php mosMainBody(); ?>

to
Code:

1
<jdoc:include type="component" style="xhtml" />
<jdoc:include type="component" style="xhtml" />

Rename the template_css.css file in your /css folder to template.css

A more extensive tutorial is over here.

 
 Share on Facebook Share on Twitter Share on Reddit Share on LinkedIn
No Comments  comments 
formats

Custom Joomla 404; file not found page

In the original Joomla 1.5.x 404 page not found file, I missed a search option. So I added the search form to the original. It is possible to redirect your 404 to a article in joomla, but the downside is: you have a searchable 404.

Create a file called error.php in your default template, like so: website_root/templates/own_template/error.php and paste the next code in to it.

Code:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
<?php
/**
* @copyright Copyright (C) 2005 - 2008 Open Source Matters. All rights reserved.
* @license GNU/GPL, see LICENSE.php
* Joomla! is free software. This version may have been modified pursuant
* to the GNU General Public License, and as distributed it includes or
* is derivative of works licensed under the GNU General Public License or
* other free or open source software licenses.
* See COPYRIGHT.php for copyright notices and details.
*/
 
// no direct access
defined( '_JEXEC' ) or die( 'Restricted access' );
 
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $this->language; ?>" lang="<?php echo $this->language; ?>" dir="<?php echo $this->direction; ?>">
<head>
<title><?php echo $this->error->code ?> - <?php echo $this->title; ?></title>
<link rel="stylesheet" href="<?php echo $this->baseurl; ?>/templates/system/css/error.css" type="text/css" />
</head>
<body>
<div align="center">
<div id="outline">
<div id="errorboxoutline">
<div id="errorboxheader"><?php echo $this->error->code ?> - <?php echo $this->error->message ?></div>
<div id="errorboxbody">
<p><strong>You may not be able to visit this page because of:</strong></p>
<ol>
<li>An out-of-date bookmark/favourite</li>
<li>A search engine that has an out-of-date listing for this site</li>
<li>A mis-typed address</li>
<li>You have no access to this page</li>
<li>The requested resource was not found</li>
<li>An error has occurred while processing your request.</li>
</ol>
<p><strong>Please try a (new) search on our website:</strong></p>
<p>
<form action="index.php" method="post">
<div class="search">
<input name="searchword" id="mod_search_searchword" maxlength="20" alt="Search" class="inputbox" size="30" value="search..." onblur="if(this.value=='') this.value='search...';" onfocus="if(this.value=='search...') this.value='';" type="text"> <input value="Search" class="button" onclick="this.form.searchword.focus();" type="submit">
</div>
<input name="task" value="search" type="hidden">
<input name="option" value="com_search" type="hidden">
</form>
</p>
<p><strong>Or just try <a href="<?php echo $this->baseurl; ?>/index.php" title="Go to the home page">the home page.</strong></a></p>
<p>If difficulties persist, please contact the system administrator of this site.</p>
<div id="techinfo">
<p><?php echo $this->error->message; ?></p>
<p>
<?php if($this->debug) :
echo $this->renderBacktrace();
endif; ?>
</p>
</div>
</div>
</div>
</div>
</div>
</body>
</html>
<?php
?>
<?php
/**
* @copyright Copyright (C) 2005 - 2008 Open Source Matters. All rights reserved.
* @license GNU/GPL, see LICENSE.php
* Joomla! is free software. This version may have been modified pursuant
* to the GNU General Public License, and as distributed it includes or
* is derivative of works licensed under the GNU General Public License or
* other free or open source software licenses.
* See COPYRIGHT.php for copyright notices and details.
*/

// no direct access
defined( '_JEXEC' ) or die( 'Restricted access' );

?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $this->language; ?>" lang="<?php echo $this->language; ?>" dir="<?php echo $this->direction; ?>">
<head>
<title><?php echo $this->error->code ?> - <?php echo $this->title; ?></title>
<link rel="stylesheet" href="<?php echo $this->baseurl; ?>/templates/system/css/error.css" type="text/css" />
</head>
<body>
<div align="center">
<div id="outline">
<div id="errorboxoutline">
<div id="errorboxheader"><?php echo $this->error->code ?> - <?php echo $this->error->message ?></div>
<div id="errorboxbody">
<p><strong>You may not be able to visit this page because of:</strong></p>
<ol>
<li>An out-of-date bookmark/favourite</li>
<li>A search engine that has an out-of-date listing for this site</li>
<li>A mis-typed address</li>
<li>You have no access to this page</li>
<li>The requested resource was not found</li>
<li>An error has occurred while processing your request.</li>
</ol>
<p><strong>Please try a (new) search on our website:</strong></p>
<p>
<form action="index.php" method="post">
<div class="search">
<input name="searchword" id="mod_search_searchword" maxlength="20" alt="Search" class="inputbox" size="30" value="search..." onblur="if(this.value=='') this.value='search...';" onfocus="if(this.value=='search...') this.value='';" type="text"> <input value="Search" class="button" onclick="this.form.searchword.focus();" type="submit">
</div>
<input name="task" value="search" type="hidden">
<input name="option" value="com_search" type="hidden">
</form>
</p>
<p><strong>Or just try <a href="<?php echo $this->baseurl; ?>/index.php" title="Go to the home page">the home page.</strong></a></p>
<p>If difficulties persist, please contact the system administrator of this site.</p>
<div id="techinfo">
<p><?php echo $this->error->message; ?></p>
<p>
<?php if($this->debug) :
echo $this->renderBacktrace();
endif; ?>
</p>
</div>
</div>
</div>
</div>
</div>
</body>
</html>
<?php
?>
 
 Share on Facebook Share on Twitter Share on Reddit Share on LinkedIn
No Comments  comments 
formats

Tip: Securing images, cache and media folder

Preventing listing directory contents and executing scripts from directories such as images, media, cache, you can place an .htaccess file in them. The .htaccess file in each of those directories should contain the following code:

Updated to version 1.1

Code:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
##########
# This is a .htaccess file for the Joomla images, media and cache directories
# For updates please visit http://locutusweb.asw15.org
# VERSION 1.1
#
# DISCLAIMER: We are not responsible for data loss and/or damage to your website what so ever
# @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
##########
 
########## Begin - Don't list directory contents
IndexIgnore *
Options All -Indexes
########## End - Don't list directory contents
 
########## Begin - Secure directory by disabling script execution
AddHandler cgi-script .php .php2 .php3 .php4 .php5 .php6 .php7 .php8 .pl .py .jsp .asp .htm .html .shtml .sh .cgi
Options -ExecCGI
########## End - Secure directory by disabling script execution
 
########## Begin - Deny direct access to .htaccess
# Uncomment following lines if don't have them in your webroots .htaccess
#<Files .htaccess>
#order allow,deny
#deny from all
#</Files>
########## End - Deny direct access to .htaccess
##########
# This is a .htaccess file for the Joomla images, media and cache directories
# For updates please visit http://locutusweb.asw15.org
# VERSION 1.1
#
# DISCLAIMER: We are not responsible for data loss and/or damage to your website what so ever
# @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
##########

########## Begin - Don't list directory contents
IndexIgnore *
Options All -Indexes
########## End - Don't list directory contents

########## Begin - Secure directory by disabling script execution
AddHandler cgi-script .php .php2 .php3 .php4 .php5 .php6 .php7 .php8 .pl .py .jsp .asp .htm .html .shtml .sh .cgi
Options -ExecCGI
########## End - Secure directory by disabling script execution

########## Begin - Deny direct access to .htaccess
# Uncomment following lines if don't have them in your webroots .htaccess
#<Files .htaccess>
#order allow,deny
#deny from all
#</Files>
########## End - Deny direct access to .htaccess
 
 Share on Facebook Share on Twitter Share on Reddit Share on LinkedIn
No Comments  comments 
formats

Tip: Hardening your Joomla site by .htaccess Version 2.4 and 2.6

I added some extra security stuff to my .htaccess to harden my Joomla install. Blocked some common bad bots, made some files invisible and some rules used by exploits. The list is quite long and could slow down your site, but I have never seen that. Please note, this is not a substitute for not upgrading core or 3rd party extensions. Read more…

 
 Share on Facebook Share on Twitter Share on Reddit Share on LinkedIn
No Comments  comments 
formats

WAMP

Do want to build your own small webserver on (any) windows? I recommend Apache Friends: http://www.apachefriends.org/en/index.html For the record: WAMP: Windows (operating system), Apache (webserver), Mysql (database) and PHP (Scripting language)It’s perfect for creating a local server for testing purposes, ofcourse you can set your server world wide open, but please be aware that webserver security is a speciality!!! You are warned!

A small tip to get those nifty URL’s: Make sure you have the following in your httpd.conf. Replace “C:/www” with the directory under your
DocumentRoot where you placed .htaccess file. Once you’ve copied the lines below into Apache configuration file restart web server and URL rewriting should work.

1
2
3
4
5
6
7
8
9
10
11
12
13
<Directory>
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory "C:/www">
Options Indexes Includes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
Allow from all
</Directory><Files ~ "^\.ht">
Order allow,deny
Deny from all
</Files>
<Directory>
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory "C:/www">
Options Indexes Includes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
Allow from all
</Directory><Files ~ "^\.ht">
Order allow,deny
Deny from all
</Files>
 
 Share on Facebook Share on Twitter Share on Reddit Share on LinkedIn
No Comments  comments 
formats

Compare CPU performance

Totally lost in those different CPU’s? This is a nice chart: http://www.cpubenchmark.net/cpu_list.php

 
Tags: , ,
 Share on Facebook Share on Twitter Share on Reddit Share on LinkedIn
No Comments  comments 
formats

Bill Gates is also human!?

I stumbled over this email of Bill Gates and reading it gave me a warm feeling I’m not alone on this stuff…

Bill Gates

—- Original Message —-

From: Bill Gates
Sent: Wednesday, January 15, 2003 10:05 AM
To: Jim Allchin
Cc: Chris Jones (WINDOWS); Bharat Shah (NT); Joe Peterson; Will Poole; Brian Valentine; Anoop Gupta (RESEARCH)
Subject: Windows Usability Systematic degradation flame

I am quite disappointed at how Windows Usability has been going backwards and the program management groups don’t drive usability issues.

Let me give you my experience from yesterday.

I decided to download (Moviemaker) and buy the Digital Plus pack … so I went to Microsoft.com. They have a download place so I went there.

The first 5 times I used the site it timed out while trying to bring up the download page. Then after an 8 second delay I got it to come up. Read more…

 
 Share on Facebook Share on Twitter Share on Reddit Share on LinkedIn
No Comments  comments 
formats

LG Arena KM900

This new year I wanted to start to tickle myself a little bit. I was looking for a smartphone with WIFI. I looked at the still delicious IPhone, but I found it too expensive for the way I mistreat my phones. I liked the Nokia 5800 express music, but I went for the LG Arena KM900 as I found it more advanced with a better screen resolution, specifications and user reviews.
LG Arena
I must say I am very satisfied with my Arena. Please keep in mind as of Januari 2010 the Arena is 1/4 of the price of a IPhone. I like the S-class user interface. Also the phone part is good. The media player is simple, but with it’s Dolby mobile sound system a delight for your ears. Also typing messages is getting used to but work (for me) better than those #$@$%#@ T9 dictionaries. Okay, now the negative stuff: the standard internet apps suck. the browser is slow and clicking a link in most cases don’t work  . Never got the standard email client working with gmail. I won’t put any energy to it since I read on the internet it can only hold the 100 (oldest) messages.
The good news is that browsing with Opera Mini installs and works like a breeze: direct and fast. You can download it here for free:http://www.opera.com/mini/download/ Also the Gmail app of google makes mobile life fun: http://www.gmail.com/app (don’t forget to exit the program via it’s own menu. If you don’t leave that way it won’t remember you login.

 
 Share on Facebook Share on Twitter Share on Reddit Share on LinkedIn
No Comments  comments 
© Locutus-Web Services
credit