1
daviddu54
Adapted MSLFriends to xoops 2.0.13.2
  • 2006/8/9 13:11

  • daviddu54

  • Just popping in

  • Posts: 22

  • Since: 2006/8/1 2


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&amp;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
$userarray["output"][] = "<a href='/userinfo.php?uid=".$thisUser->getVar('uid')."'>".$thisUser->getVar('uname')."</a>";
if(
$thisUser->getVar('user_avatar') && "blank.gif" != $thisUser->getVar('user_avatar')){
$userarray["output"][] = "<a href='/userinfo.php?uid=".$thisUser->getVar('uid')."'>

by this 3 lines
$userarray["output"][] = "<a href='../../userinfo.php?uid=".$thisUser->getVar('uid')."'>".$thisUser->getVar('uname')."</a>";
if(
$thisUser->getVar('user_avatar') && "blank.gif" != $thisUser->getVar('user_avatar')){
$userarray["output"][] = "<a href='../../userinfo.php?uid=".$thisUser->getVar('uid')."'>


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
$block[0]['link'] = "<a href='/modules/profile/myfavorites.php?type=admirers'>More &#8250;&#8250;</a>";

by this line
$block[0]['link'] = "<a href='../myfavorites.php?type=admirers'>More &#8250;&#8250;</a>";


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
$block[$n]['avatar'] = "<a href='/userinfo.php?uid=".$thisUser->getVar('uid')."'>

by this line
$block[$n]['avatar'] = "<a href='../../../userinfo.php?uid=".$thisUser->getVar('uid')."'>


At line 69 change this line
$block[$n]['realname'] = "<a href='/userinfo.php?uid=".$thisUser->getVar('uid')."'>".$thisUser->getVar('uname')."</a>";

by this line
$block[$n]['realname'] = "<a href='../../../userinfo.php?uid=".$thisUser->getVar('uid')."'>".$thisUser->getVar('uname')."</a>";


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

2
daviddu54
Re: Adapted MSLFriends to xoops 2.0.13.2
  • 2006/8/11 17:50

  • daviddu54

  • Just popping in

  • Posts: 22

  • Since: 2006/8/1 2


Hello i'm back with a solution for the last problem

so for resolve send interest function problem ,you must open your data base ,erase your xoops_priv-msgs table and remplace by this table ,and all work as well


CREATE TABLE `xoops_priv_msgs` (
`msg_id` mediumint(8) unsigned NOT NULL auto_increment,
`msg_image` varchar(100) default NULL,
`subject` varchar(255) NOT NULL default '',
`from_userid` mediumint(8) unsigned NOT NULL default '0',
`to_userid` mediumint(8) unsigned NOT NULL default '0',
`msg_time` int(10) unsigned NOT NULL default '0',
`msg_text` text NOT NULL,
`read_msg` tinyint(1) unsigned NOT NULL default '0',
`from_delete` tinyint(1) unsigned NOT NULL default 0,
`from_save` tinyint(1) unsigned NOT NULL default 0,
`to_delete` tinyint(1) unsigned NOT NULL default 0,
`to_save` tinyint(1) unsigned NOT NULL default 0,
PRIMARY KEY (`msg_id`),
KEY to_userid (`to_userid`),
KEY inbox (`to_userid`,`read_msg`),
KEY outbox (`from_userid`, `read_msg`),
KEY prune (`msg_time`, `read_msg`, `from_save`, `to_delete`)
) TYPE=MyISAM;




@+

3
internal27
Re: Adapted MSLFriends to xoops 2.0.13.2
  • 2006/8/11 20:36

  • internal27

  • Just popping in

  • Posts: 18

  • Since: 2006/8/11


Hi,

This seems like a great fix! I've been trying to locate a way to make it work. However, I have XOOPS 2.0.14, and this fix is already outdated for the new version... there is no:

"2 - Open "userinfo.php" at line 89 move line under this }
they must be look so :"

or

"3 - Open "language\english\user.php" and add this line where you want"

in the new version these files are missing...

Since that seems like the only thing necessary to change in the new version (the rest of the fix involves the MSLFriends module itself, what do you think needs to be changed in XOOPS 2.0.14 to make it work?

Thank you in advance, I really appreciate it!

4
daviddu54
Re: Adapted MSLFriends to xoops 2.0.13.2
  • 2006/8/11 22:48

  • daviddu54

  • Just popping in

  • Posts: 22

  • Since: 2006/8/1 2


Hi ,i don't understand your problem ,i have looking XOOPS 2.0.14 ,but i don't see much difference ,and file are not missing ,i think your version is corrupted !!! or you have XOOPS 2.2

for editing file you can use PSpad ,this is a great freeware for editing files

look this is what you need to have in your userinfo.php line 85 to line 93

$myts =& MyTextSanitizer::getInstance();
if ( 
is_object($xoopsUser) && $isAdmin ) {
    
$xoopsTpl->assign('lang_editprofile'_US_EDITPROFILE);
    
$xoopsTpl->assign('lang_deleteaccount',_US_DELACCOUNT);
}
$xoopsTpl->assign('user_uid'$thisUser->getVar('uid'));
$xoopsTpl->assign('lang_allaboutuser'sprintf(_US_ALLABOUT,$thisUser->getVar('uname')));
$xoopsTpl->assign('lang_avatar'_US_AVATAR);
$xoopsTpl->assign('lang_favoris'_US_FAVORIS);



@+

5
internal27
Re: Adapted MSLFriends to xoops 2.0.13.2
  • 2006/8/16 14:25

  • internal27

  • Just popping in

  • Posts: 18

  • Since: 2006/8/11


Thanks alot! It was my mistake, last time I was doing it I was tired and was looking at the wrong directory! When I looked at it again, I was able to change all the code fine. Now, everything works. Thank you again for the hack.

Regards

P.S. Is there any way to make User Info profiles searchable(such as the name, interest fields, etc...)?

6
daviddu54
Re: Adapted MSLFriends to xoops 2.0.13.2
  • 2006/8/17 2:15

  • daviddu54

  • Just popping in

  • Posts: 22

  • Since: 2006/8/1 2


i am not sur to have undestood your question !
can you explain exactly what you need?

A propos: i have found another bug about "send interest" yes,indid people can spam every profil,this function have no security and your inbox can get quick full ,but don't make soucy ,i have found a solution if u will

i explain you what i have doing

so you have 2 link in modules mslfriends
my favorite and my admirer ,i have rename it "my friends list" and "who are my friends" and i have build 2 new links "my love" and "who love me"
after this i have created 1 file more for display the hack and modify the index.php (add function)
and i have added 2 entry in database for registrer who love me

so now we have security versus spam pm ,and send interest can be send by pm or email (i have added one more option)

are you interested by this hack?
next operation display "who love me" and "who are my friends" hits and last personne in user info

7
internal27
Re: Adapted MSLFriends to xoops 2.0.13.2
  • 2006/8/18 3:13

  • internal27

  • Just popping in

  • Posts: 18

  • Since: 2006/8/11


Hi,

I mean, Is there any way to search User Info profile fields (i.e. name, interests, ICQ, location, etc...) What needs to be done to do this? Thank you.

Regards!

8
daviddu54
Re: Adapted MSLFriends to xoops 2.0.13.2
  • 2006/8/18 19:45

  • daviddu54

  • Just popping in

  • Posts: 22

  • Since: 2006/8/1 2


hi
you can do this with xoopsmembers modules

so tomorrow i post here my new module "mylove" this adaptation of module mysoulmate,but with more security and option i just need to translate in english now

9
wcrwcr
Re: Adapted MSLFriends to xoops 2.0.13.2
  • 2006/8/18 22:19

  • wcrwcr

  • Home away from home

  • Posts: 1114

  • Since: 2003/12/12


Hi daviddu54

Great news indeed
That module is very interesting and I?m shure it?ll be very useful on that new version.

May I suggest you only one thing?

Why change the mod?s name?

Don?t you think that keeping the original?s name just adding a "xoops 2.0.13.2 compatible" it?ll be more easy for users to find it, etc???

Anyway, congrats for your hard work and just was only a humble opinion, ok?

Regards,
Wilson

10
daviddu54
Re: Adapted MSLFriends to xoops 2.0.13.2
  • 2006/8/19 0:53

  • daviddu54

  • Just popping in

  • Posts: 22

  • Since: 2006/8/1 2


hi all

i am very proud to present my module "my love" version 1.0
this module is based on mylatinsoulmate without bug ,and with more option
i have rename it because i have made very much working on this module and the last version don't work

so lets go upload file HERE

1: unzip file
2: send file on your ftp
3: edit file modules/system/templates/system_userinfo.html and add this both buttons where you want
<input type="button" value="Add to my love list" onclick="location='<{$xoops_url}>/modules/mylove/index.php?op=interest&amp;friendid=<{$user_uid}>'" />
<
input type="button" value="Add to my friends list" onclick="location='<{$xoops_url}>/modules/mylove/index.php?op=add&amp;friendid=<{$user_uid}>'" />


4: update your system module
5: install my love module
6: check right access and block right

finnish enjoy

PS: if you found an error in english language please post correction here

Login

Who's Online

79 user(s) are online (51 user(s) are browsing Support Forums)


Members: 0


Guests: 79


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Jul 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits