How to redirect your-site.com to www.your-site.com
Enter this code in your .htaccess file after the
RewriteEngine On line:
RewriteCond %{HTTP_HOST} ^your-site\.com [NC,OR]
RewriteCond %{HTTP_HOST} ^(www\.)?blablabla\.bg[NC]
RewriteRule (.*) http://www.your-site.com/$1 [L,R=301]
Redirect 301 /home http://www.your-site.com/
How to create a 404 redirect page in Joomla
Copy the error.php file from your-site/templates/system to your template main directory.
Then just open the error.php file from your Joomla template and edit it.
If you want to redirect to a sitemap on your site for example use this code at the top of the error.php file before everything in the file write:
<?php
defined( ‘_JEXEC’ ) or die( ‘Restricted access’ );
if (($this->error->code) == ‘404′) {
header(’Location: http://www.yoursite.com/sitemap’);
exit;
}
?>
How to get page title for Joomla 1.5
This is the code:
<?php $mydoc =& JFactory::getDocument(); $mytitle = $mydoc->getTitle(); ?>
How to style the Joomla search module and component?
If you want to change the look of the Joomla search module and Joomla search component:
Copy the file:
/components/com_search/views/search/tmpl/default.php
to
/templates/my_template/html/com_search/search/default.php
Now make a few changes in that file and refresh your site.
In a similar fashion, you can also override the Search Module layout file. Copy the file:
/modules/mod_search/tmpl/default.php
to
/templates/my_template/html/mod_search/default.php
How to add additional field in the Joomla article administrator page
To add custom article submission field:
Files needed to edit:
i. jos_content table in joomla database
ii. root/components/com_content/views/article/tmpl/default.php
iii. root/components/com_content/views/article/tmpl/form.php
iv. root/administrator/components/com_content/models/article.xml
v. root/administrator/components/admin.content.html.php
vi. root/administrator/components/config.xml
vii. root/libraries/joomla/database/table/content.php › Continue reading
Add and extra field to Jcomments
Let’s add two additional fields in the form of comments: Town (City) and AcceptTerms (I agree with the rules). the user will need to check. › Continue reading
Как да разрешим регистрация с еднакви email-и в Joomla 1.5
Отворете
your-site/libraries/joomla/database/table/user.php
намерете тези редове:
$xid = intval( $this->_db->loadResult() );
if ($xid && $xid != intval( $this->id )) {
$this->setError( JText::_( ‘WARNREG_EMAIL_INUSE’ ) );
return false;
}
и ги коментирайте.
Hack for a problem with the search module in Joomla 1.5.11
If you don’t want all your search results to open on the front page of your website just use this hack. After it they will open on a separate page.
Just open your-site/components/com_search/controller.php
Find this part: › Continue reading
