You will need to create a component to handle the input.
The actual login code is very simple. Here is an example from the component that we developed for Joomla 1.5.
function login($username, $password, $remember = false) {
if ($username && $password) {
$mainframe =& JFactory::getApplication();
return $mainframe->login(
array('username'=>$username, 'password'=>$password),
array('remember'=> $remember, 'silent'=>true)
);
}
return false;
}
, PHP : http://www.fijiwebdesign.com/products/joomla-php-pages.html
, , URL- Joomla. :
example.com/index.php?option={com_component}&template=component&no_html=1
{com_component} - .
Joomla PHP Component :
example.com/index.php?option=com_php&Itemid={itemid}&template=component&no_html=1
Itemid - Itemid , PHP-. PHP PHP.
& template = component & no_html = 1 , HTML, no_html , - HTML.
, , , , JSON XML, Flex URLLoader . TRUE, FALSE.
:
, , . , Joomla, Flash-. .
, Joomla, , .
, Joomla:
$User =& JFactory::getUser();
if (!$User->guest) {
// user is logged in
} else {
// user is not logged in
}
:
$Session =& JFactory::getSession();
$sessid = $Session->getId();
:
session_name();
Joomla Flash:
$User =& JFactory::getUser();
$Session =& JFactory::getSession();
echo json_encode((object) array('user'=>$User, 'session'=>$Session, 'name'=>session_name ());
, . Flash- Flash Joomla, - ExternalInterface (http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/flash/external/ExternalInterface.html).
Flex . , cookie . cookie , , .
ExternalInterface cookie JavaScript .
cookie , Flex .
BlazeDS Joomla, BlazeDS, .
, Joomla, Flash, flashvars, ExternalInterface.