Category Archives: mambo/joomla

Joomla 1.5 optimisation: removing mootools.js and caption.js

Following solution allowed me to remove 74KB of useless data included by default. These scripts are useless for unregistered users, who have no need to edit articles.

It is selective removal of scripts included in joomla 1.5 by default and it leaves rest of  js  included.
The workaround I’ve seen in forums just removed all js and it caused some problems with joomgallery which required its own scripts to be pretty.:)

paste after “<jdoc:include type=”head” />” in the index.php of template:

// — remove js scripts (mootools.js and caption.js).
$user =& JFactory::getUser();
if ($user->get(‘guest’) == 1) {

BTW, to remove META GENERATOR,  comment
"$strHtml .= $tab.’<meta name=”generator” content=”‘.$document->getGenerator().’” />’.$lnEnd;"
in this file:

cp1251 codepage problems

При переносе сайта на mambo с кодировкой cp1251 на срвер c mysql utf8 возникает проблема с переконвертацией.
Требуется явно указать кодировку:

в файл /includes/database.php
перед строчкой $this->_table_prefix = $table_prefix;
вставляем код

$this->_cursor = mysql_query( “set session character_set_server=cp1251;”, $this->_resource );
$this->_cursor = mysql_query( “set session character_set_database=cp1251;”, $this->_resource );
$this->_cursor = mysql_query( “set session character_set_connection=cp1251;”, $this->_resource );
$this->_cursor = mysql_query( “set session character_set_results=cp1251;”, $this->_resource );
$this->_cursor = mysql_query( “set session character_set_client=cp1251;”, $this->_resource );