Tuesday 17 January 2012

joomla add script and css in module

$document =& JFactory::getDocument();
$document->addStyleSheet(JURI::root().'media/system/css/calendar.css');
$document->addScript(JURI::root().'media/system/js/calendar_shift1.js');
$document->addScript(JURI::root().'media/system/js/validation.js');

joomla default error message popup, joomla error message popup , joomla username password not matching error message

ADD in head



 <?php
JHTML::_('behavior.mootools');
JHTML::_('behavior.modal');
?>
<?php
if ($this->getBuffer('message')) : ?>
<script type="text/javascript">
window.addEvent('domready', function() {
var myel = new Element('a',{'href':'#error_info'});
SqueezeBox.fromElement(myel,{
handler:'adopt',
adopt:'error_info',
});
});
</script>
<?php endif; ?>


ADD after body

<div style="display:none;">
<div id="error_info"><jdoc:include type="message" />
</div>

change password(admin) drupal

UPDATE users SET pass = MD5('newpassword') WHERE uid=1

Thursday 12 January 2012

redirect a site on www using .htaccess

RewriteEngine On
RewriteCond %{HTTP_HOST} !^(www\.urbankingsinc\.com)?$
RewriteRule (.*) http://www.urbankingsinc.com/store/$1 [R=301,L]