Tutoriels for adapted MSLFriends to XOOPS 2.0.13.2 :
1 – Open "modules\system\templates\system_userinfo.html" and ad this line where you want
<input type="button" value="<{$lang_favoris}>" onclick="location='<{$xoops_url}>/modules/MLSFriends/index.php?op=add&friendid=<{$user_uid}>'" />
2 - Open "userinfo.php" at line 89 move line under this }
they must be look so :
if ( is_object($xoopsUser) && $isAdmin ) {
$xoopsTpl->assign('lang_editprofile', _US_EDITPROFILE);
$xoopsTpl->assign('lang_deleteaccount', _US_DELACCOUNT);
}
$xoopsTpl->assign('user_uid', $thisUser->getVar('uid'));
And after this line
$xoopsTpl->assign('lang_avatar', _US_AVATAR);
add this line :
$xoopsTpl->assign('lang_favoris', _US_FAVORIS);
3 - Open "language\english\user.php" and add this line where you want
define('_US_FAVORIS', 'Add favorite');
define in your language ,add friend,add favorite,ect...
4 - Get to module MSLFriend and remove index.html
5 - Open index.php and edit this line :
line 39
if (!$xoopsUser) {redirect_header('/index.php',5,_PROFILE_LOGON);exit();} else {
by this line
if (!$xoopsUser) {redirect_header('../../index.php',5,_PROFILE_LOGON);exit();} else {
After line 102 imput this line:
$xoopsMailer->assign('X_VIEW_MEMBER', $xoopsUser->uid());
LIne 120 remplace this
redirect_header("/index.php",3,_PROFILE_MA_SELECTNG);
by this line
redirect_header("../../index.php",3,_PROFILE_MA_SELECTNG);
After line 144 ,imput this line
$xoopsMailer->assign('X_VIEW_MEMBER', $xoopsUser->uid());
At line 150 remplace thi line
redirect_header('/modules/profile/userinfo.php?uid='.$friendid,5,_MLS_INTEREST_SENT);
by this line
[email]redirect_header('../../userinfo.php?uid='.$friendid,5,_MLS_INTEREST_SENT);[/email]
6 - Open "myfavorytes.php" and edit line
At line 33 remplace this line
if (!$xoopsUser) {redirect_header('/index.php',5,_PROFILE_LOGON);exit();} else {
by this line
if (!$xoopsUser) {redirect_header('../../index.php',5,_PROFILE_LOGON);exit();} else {
At line 74,75,76 remplace this lines
by this 3 lines
At line 108 remplace this
$userarray["output"][] = "/userinfo.php?uid=".$thisUser->getVar('uid');
By this line
$userarray["output"][] = "../../userinfo.php?uid=".$thisUser->getVar('uid');
At line 142 remplace this line
include_once XOOPS_ROOT_PATH."/class/pagenav.php";
by this line
include_once "../../class/pagenav.php";
At line 148 remplace this line
include XOOPS_ROOT_PATH."/footer.php";
by this line
include "../../footer.php";
7 - Open "blocks\MLSfriends.php" and edit line
After line 30 add this line
if ($xoopsUser) {
At line 48 remplace this line
by this line
At line 52,53 add 2 slash per line so :
//$profile_handler =& xoops_gethandler('profile');
//$fields =& $profile_handler->loadFields();
At line 64 change this line
by this line
At line 69 change this line
by this line
At line 90 change this line
$block[$n]['delete'] = "/modules/MLSFriends/index.php?op=deladm&friendid=".$fuid;
by this line
$block[$n]['delete'] = "../index.php?op=deladm&friendid=".$fuid;
At end texte before this } add a new } they must be look so
}
}
?>
8 - Open "language\english\mail_template\favorite.tpl and interest.tpl
search this tags {X_VIEW_MEMBER} and remplace by this
{X_SITEURL}/userinfo.php?uid={X_VIEW_MEMBER}
So now your MSLFriends module work on XOOPS 2.0.13.2 ,but not function send pm ,msql table is differente look
$member_handler =& xoops_gethandler('member'); // Only to active members
$thisUser =& $member_handler->getUser($friendid);
if (!is_object($thisUser) || !$thisUser->isActive()) {
redirect_header("../../index.php",3,_PROFILE_MA_SELECTNG);
exit();
}
$image = "MLS_interest.gif"; // Show a nice picture in the PM inbox
$subject = $xoopsUser->getVar('uname')._MLS_INTERESTED;
$time = time();
$text = sprintf(_MLS_INTERESTED_BODY, $xoopsUser->uname());
$sql = "INSERT INTO ".$xoopsDB->prefix("priv_msgs")." (msg_id, msg_image, subject, from_userid, to_userid, msg_time, msg_text, read_msg) VALUES ($image, $subject, $uid, $friendid, $time, $text, 0,0,0,0)";
$req1=mysql_query($sql) or die($xoopsDB->error()); // Quick & Dirty way to send a PM
for the moment i have not found a solution,but i continue to search ,and if i found what is wrong and how to resolve this ,i post my solution
PS: forgive me for my bad english
best regards