Follow along with the video below to see how to install our site as a web app on your home screen.
Бележка: This feature may not be available in some browsers.
mizarck каза:я кача и напиша адреса и ми казва че такава страница несъществува
IMPORTANT NOTES
To complete the installation you need to change your <root_dir>/includes/mambo.php and <root_dir>/modules/mod_login.php files.
Please, MAKE A BACKUP OF THESE FILES BEFORE ANY CHANGES!!!
On mod_login.php you need to change the call when users click on "Create one" link for create a new account on your site.
You just need to change this file if you want to use integration with payment systems.
Look on the file for the piece of code below and edit the line in red font, from "option=com_registration" to "option=com_acctexp".
if ( $registration_enabled ) {
?>
<tr>
<td>
<?php echo _NO_ACCOUNT; ?>
<a href="<?php echo sefRelToAbs( 'index.php?option=com_acctexp&task=register' ); ?>">
<</a>
</td>
</tr>
<?php
}
On mambo.php, first look in the begining of the file for a series of require_once instructions.
Between the last instruction and the comments stating "Class to support ..." insert (only) the lines in red, as I show below:
require_once( $mosConfig_absolute_path . "/includes/mamboxml.php" );
if (file_exists( $mosConfig_absolute_path . "/administrator/components/com_acctexp/includes/login.validate.php" ) ) {
include_once( $mosConfig_absolute_path . "/administrator/components/com_acctexp/includes/login.validate.php" );
}
/**
* Class to support function caching
Next, look for the function login, on the same file, and change it according to the code below. Remember, code that must be inserted are in RED - just a few lines including comments.
function login() {
global $acl;
$usercookie = mosGetParam( $_COOKIE, 'usercookie', '' );
$sessioncookie = mosGetParam( $_COOKIE, 'sessioncookie', '' );
$username = trim( mosGetParam( $_POST, 'username', '' ) );
$passwd = trim( mosGetParam( $_POST, 'passwd', '' ) );
if (!$username || !$passwd) {
echo "<script> alert(\""._LOGIN_INCOMPLETE."\"); window.history.go(-1); </script>\n";
exit();
} else {
$passwd = md5( $passwd );
$this->_db->setQuery( "SELECT id, gid, block, usertype"
. "\nFROM #__users"
. "\nWHERE username='$username' AND password='$passwd' AND block='0'"
);
$row = null;
if ($this->_db->loadObject( $row )) {
if ($row->block == 1) {
echo "<script>alert(\""._LOGIN_BLOCKED."\"); window.history.go(-1); </script>\n";
exit();
}
// Hack for integration with Account Expiration Component
// check if the user account has not been expired
// IMPORTANT: Remove this line BEFORE uninstall the component
loginValidate($username);
// End of code for Account Expiration Control Component
// fudge the group stuff
$grp = $acl->getAroGroup( $row->id );
$row->gid = 1;
if ($acl->is_group_child_of( $grp->name, 'Registered', 'ARO' )) {
// fudge Authors, Editors and Publishers into the Special Group
$row->gid = 2;
}
$row->usertype = $grp->name;
$session =& $this->_session;
$session->guest = 0;
$session->username = $username;
$session->userid = intval( $row->id );
$session->usertype = $row->usertype;
$session->gid = intval( $row->gid );
$session->update();
$lifetime = time() + intval( $this->getCfg( 'lifetime' ) );
setcookie( "usercookie", $session->getCookie(), $lifetime, "/" );
} else {
echo "<script>alert(\""._LOGIN_INCORRECT."\"); window.history.go(-1); </script>\n";
exit();
}
}
}
\fena каза:То си пише, това е като мод за phpbb пише да едитнеш 2 файла, правиш го и после има настройки, правиш си акаунт в epay, защото Paypal не се подържа в България