forum.coppermine-gallery.net

Support => cpg1.4.x Support => Older/other versions => cpg1.4 modpack by Stramm => Topic started by: Mannie on July 04, 2007, 07:38:38 am

Title: Buddy List issues
Post by: Mannie on July 04, 2007, 07:38:38 am
Hi,
At my site http://art.spliffcanvas.net i still got some problems with the buddylist. When i add buddies it shows myself as active friends. And i can't seem to delete them. Hope that can be fixed to

Thanks in advance
Title: Re: Buddy List issues
Post by: Stramm on July 04, 2007, 07:58:32 am
can post 2-3 testuser accounts?
Title: Re: Buddy List issues
Post by: Mannie on July 04, 2007, 02:09:22 pm
ok
sent the info in pm to you
Title: Re: Buddy List issues
Post by: Stramm on July 04, 2007, 04:29:03 pm
I see that there's something weird with your buddylist. And I'd say it's something with the mysql table.
I've checked with a CPG bridged to SMF and on my testbed it worked without a problem. And without beeing able to replicate that issue I can give you advice but not a real solution. For a start I'd delete the buddy table and run update.php again. Cause as it looks like the buddy id and the user id somehow get mixed
Title: Re: Buddy List issues
Post by: Mannie on July 04, 2007, 04:47:52 pm
ok, that seems to have done the trick.
Now i only need to figure out how to get this theme working with the modpack. Allready looked at those instructions, but i cannot figure it out yet.
Title: Re: Buddy List issues
Post by: Mannie on July 04, 2007, 04:57:31 pm
ok, think i got that to ;)
thanks
Title: Re: Buddy List issues
Post by: Mannie on July 04, 2007, 05:01:17 pm
hmm guess i was to soon.
When accepting it showed the right user. after it shows me again ?
Title: Re: Buddy List issues
Post by: Stramm on July 04, 2007, 05:08:31 pm
got it.. however I need to setup a test environment (where no joins are possible). Then I can fix this. Guess somewhen this weekend.
Title: Re: Buddy List issues
Post by: Stramm on July 04, 2007, 05:14:16 pm
Hmm, maybe you want to test the fix before the weekend. But it's utterly untested. Just what I think needs to be changed.

in udb_base.inc.php find
Code: [Select]
if($view=="1") $sql = "SELECT id, buddy_block, buddy_id, since FROM {$CONFIG['TABLE_BUDDY']} buddy_id=".(USER_ID)." AND buddy_block='YES' ";
if($view=="2") $sql = "SELECT id, since, buddy_from as buddy_id FROM {$CONFIG['TABLE_BUDDY_REQ']} WHERE buddy_to=".(USER_ID)." ";
if($view=="3") $sql = "SELECT id, since, buddy_to as buddy_id FROM {$CONFIG['TABLE_BUDDY_REQ']} WHERE buddy_from=".(USER_ID)." ";
if($view=="0") $sql = "SELECT id, buddy_ok, buddy_block, buddy_id, since FROM {$CONFIG['TABLE_BUDDY']} WHERE buddy_ok='YES' AND buddy_id = ".(USER_ID)." ";
and replace with
Code: [Select]
if($view=="1") $sql = "SELECT id, buddy_block, buddy_id, since FROM {$CONFIG['TABLE_BUDDY']} WHERE user_id=".(USER_ID)." AND buddy_block='YES' ";
if($view=="2") $sql = "SELECT id, since, buddy_from as buddy_id FROM {$CONFIG['TABLE_BUDDY_REQ']} WHERE buddy_to=".(USER_ID)." ";
if($view=="3") $sql = "SELECT id, since, buddy_to as buddy_id FROM {$CONFIG['TABLE_BUDDY_REQ']} WHERE buddy_from=".(USER_ID)." ";
if($view=="0") $sql = "SELECT id, buddy_ok, buddy_block, buddy_id, since FROM {$CONFIG['TABLE_BUDDY']} WHERE buddy_ok='YES' AND user_id = ".(USER_ID)." ";
Title: Re: Buddy List issues
Post by: Mannie on July 04, 2007, 05:31:50 pm
i think that works. Changed and refresh the page changed it to the right buddy.
Thank you
Title: Re: Buddy List issues
Post by: Stramm on July 05, 2007, 06:39:16 pm
Note: This fix isn't included into the modpack up to 1.4.12 v1. Later versions will contain it.
Title: Re: Buddy List issues
Post by: Mannie on July 05, 2007, 06:50:05 pm
i noticed, so i just copied that file back ;)

The other fix was fine in the new version ;)