Програмиране

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/

понеделник, март 1st, 2010 Joomla, Програмиране Няма коментари

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;
}

?>

понеделник, март 1st, 2010 Joomla, Програмиране Няма коментари

How to get page title for Joomla 1.5

This is the code:

<?php

$mydoc =& JFactory::getDocument();
$mytitle = $mydoc->getTitle();

?>

Tags: , , ,

петък, ноември 20th, 2009 Joomla, Програмиране Няма коментари

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

Tags: , , , , ,

неделя, ноември 8th, 2009 Joomla, Програмиране Няма коментари

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

петък, септември 25th, 2009 Програмиране Няма коментари

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

събота, септември 12th, 2009 Програмиране Няма коментари

Как да разрешим регистрация с еднакви 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;
}

и ги коментирайте.

Tags: , ,

How to get itemid in Joomla 1.5

just use

$Itemid = JRequest::getInt( ‘Itemid’);

Tags: ,

How to add a link to the manufacturer products for each product in the caregosy browse page in virtuemart?

To do this first read this post:

http://www.pcinvent.info/technology/programming/how-to-hack-manufacture-name-in-virtuemart-browse-page-template

where it is explained: How to hack Manufacture Name in Virtuemart Browse Page Template?

› Continue reading

Tags: ,

понеделник, юни 1st, 2009 Програмиране Няма коментари

Как да направим работещ google sitemap за Joomla сайтHow to create a working google sitemap for a Joomla website

Правилото е просто. Създаваме сайтмап във вида:

The rule is easy. We have to create a sitemap of type:

› Continue reading

Tags: , , , ,

сряда, февруари 25th, 2009 Програмиране Няма коментари