News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Ultimate Profile

Started by JovanT, March 12, 2009, 12:14:40 PM

Previous topic - Next topic

djohns

I guess, the buddy list is still broken?

djohns

I was able to use punjabilokvirsa's solution Reply #2804:

http://www.simplemachines.org/community/index.php?topic=298641.msg3254823#msg3254823

It would be nice if the mod author would include punja's solution in the regular code.  I thought it would be in the most recent Ultimate Profile update since punja's solution came out more than a year ago, but apparently not.

I'm running SMF 2.04.  I did have to uninstall UP then delete everyone's buddy list, then reinstall and change the 2 lines of code in buddy.php to get things working. 

Now to see whether the forum users find additional problems. 

Skaty

Quote from: Skaty on January 28, 2013, 10:09:37 PM
Quote from: hcfwesker on January 26, 2013, 06:48:20 PM
I'll look into the avatar resizing thingy.


There is some coding i think :D

Any progress on this ?

melanie1986

this question was raised quite a few pages back and I never found the answer. As I am a novice at doing this sort of thing, on punjabilokvirsa's solution Reply #2804: what is the actual (name) files that need to be changed?

hcfwesker

Quote from: melanie1986 on February 12, 2013, 05:34:16 PM
this question was raised quite a few pages back and I never found the answer. As I am a novice at doing this sort of thing, on punjabilokvirsa's solution Reply #2804: what is the actual (name) files that need to be changed?

Sources/Buddies.php

Next time, please leave a link to the page or actual post you're referring to in the topic.  I almost gave up and left after clicking the 3rd random page guessing where the right "Reply#" was.

Find
$buddies = explode(',', $user_profile[$_GET['u']]['buddy_list']);
Change to:
$buddies = array_filter(explode(',', $user_profile[$_GET['u']]['buddy_list']));

Then run the query http://www.simplemachines.org/community/index.php?topic=298641.msg3254823#msg3254823

melanie1986

sorry  ??? but it was up there a few posts up^^^ :D, but thank you, that should help :)

melanie1986

everything works! well almost everything  ::)

The only issue now is our old buddies from the default SMF theme. None of those show up. Do you know how to fix that?

Dhayzon

#3027
very nice customized

  ;D ;D ;D ;D


Biology Forums

Very nicely done. I like your website's theme too!

Well done.

melanie1986

looks gr8 dhayzon :D :D

but I hope someone can answer my question please!  :-X

Sakurachan

It works fine for me on SMF 2.0.4. ;P

melanie1986

Noooooooo *facepalm*

My question was, how do I fix it so that all the buddies show up from before we installed the "Ultimate Profile" ?

I had about 40 or so previously, but they do not show up on the new profile?? only those new ones I add now.

Biology Forums

Quote from: melanie1986 on March 03, 2013, 01:52:58 PM
Noooooooo *facepalm*

My question was, how do I fix it so that all the buddies show up from before we installed the "Ultimate Profile" ?

I had about 40 or so previously, but they do not show up on the new profile?? only those new ones I add now.

You'll have to edit the source files so that they point to the old database table that stores information about forum buddy's, as opposed to the new database table created by this mod for buddy storage information.

melanie1986

can you give me a quick 101 on how to do that please :D

Biology Forums



function get_extension($filename)
{
return substr(strrchr($filename, '.'), 1);
}

function is_buddy($memID, $buddyID)
{
global $smcFunc, $buddy_list, $modSettings;

// When buddy list if off, everybody is your friend ;)
if (!isset($modSettings['enable_buddylist']) || $modSettings['enable_buddylist'] == '0')
return true;

if (!is_array($buddy_list)) {
$request = $smcFunc['db_query']('', '
SELECT buddy_list
FROM {db_prefix}members
WHERE id_member = {int:id_member}',
array(
'id_member' => $memID,
)
);
list($buddy_list) = $smcFunc['db_fetch_row']($request);

$buddy_list = explode(',', $buddy_list);
}

if (in_array($buddyID, $buddy_list))
return true;
else
return false;
}


I think this would be the code to change, although I am not totally sure since I do not use SMF 2.x. That's the extent of what I know.

melanie1986

thank you Liam :D

I'll copy that and make sure I don't make a mess of it :)

Dhayzon

#3036
how to get the comments of all users in this way

to place it in a php block SimplePortal


Skaty

any way to resize these avatars ?


smitch6

how do you create new albums pls?
Friendly, reliable web hosting at affordable prices
www.normanboatforum.co.uk l www.PatTesterSuffolk.co.uk

Kindred

Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Advertisement: