MyBlogPlanner

Archive for the ‘joomla’ Category

How to add external javascript and stylesheet in joomla component

Thursday, September 17th, 2009

This is very easy step you can add external javascript or css in head tag of the page.  According to seo you cannot add javascript/css  in the middle of the page.

So here is the code snippet.

$document =& JFactory::getDocument();

$document->addStyleSheet($stylesheeturl.’styles.css’);

$document->addScript($jsurl.’scripts.js’);

Have a happy w3c validate page :)

Auto Login Joomla function

Wednesday, May 27th, 2009

One of my client always like to sent mail to his members with updates of the website to make them participate. For long time he was demanded me a auto login system in joomla.

Today at last we got the solution how we can do it. I am sharing this with you hope that may help a lot of people.

function FnAutoLogin($ActivateID)
{

global $mainframe;
$db = JFactory::getDBO();
$Password =  FnGenerateNewPassword(’9′); // Generating joomla password

//Fetching User Details according to Activation ID start

$query = “select * from #__users where activation=’”.$ActivateID.”‘”;
$db->setQuery( $query );
$UserDetailsInArray = $db->loadObjectList();

//Fetching User Details according to Activation ID end

if(isset($UserDetailsInArray[0]))
{
$TempPassword = $UserDetailsInArray[0]->password;   // Storing user actual password

$query1 = “update #__users set password=’”.$Password.”‘ where activation =’”.$id.”‘”; //Updating temporary password
$db->setQuery( $query1 );
if($db->query())
{
//                      User Login start

$usersipass[’username’] = $UserDetailsInArray[0]->username;
$usersipass[’password’] = ‘9′;
$mainframe->login($usersipass);

//                      User Login end
$query1 = “update #__users set password=’”.$TempPassword.”‘, block=0 where activation =’”.$ActivateID.”‘”; //Update user actual password againand redirect to your appropriate page you like :)
$db->setQuery( $query1 );
if($db->query())
{
$Msg = ‘Please upload your picture to see your profile.’;
$mainframe->redirect( ‘index.html’,$Msg);
}
}
}
else
{
echo ‘You don\’t have account yet? <a href=”/join.html”>Join Us Today </a>’;
}
}

Hope this will help a lot of developer to make auto login system in joomla. :)



Create New joomla password function

Monday, April 27th, 2009

Let me show you how you can create joomla password function

Here is the exmaple how you can create joomla 1.5.x password function.

function FnGenerateNewPassword($Password)
{
jimport(’joomla.user.helper’);

$salt        = JUserHelper::genRandomPassword(32);
$crypt        = JUserHelper::getCryptedPassword($Password, $salt);
$password    = $crypt.’:’.$salt;
return  $password;

}

Hope this will help you in some program. :)


Drawing component module

Monday, December 1st, 2008

Hi All itcslive introducing a new module for email drawing.

Feature:

This module wil help user to subscribe any drawing image to his email.

I am sharing this module with all give your comment how this is benifit for you.

Drawing Component

Drawing Module

Justforjoomla review

Friday, October 10th, 2008

Joomla1.5 is basically the higher version of joomla 1.0 and the open source content management system.It is one of the most successful cms system here internet world.
If you want see my joomla1.5 cms website you can check it here in this url.
http://subikar.justforjoomla.com

You are thinking why I am writing all this stuff to here. Am I wasting my time ?
Nopes :)
Actually every one has a dream now a days have one personal website but without investing money. So I will ask them to have your website just today like me. Go to http://www.Justforjoomla.com and have your cms website today.