News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

How is fetchMember working?

Started by Xarkurai, October 04, 2011, 04:24:07 PM

Previous topic - Next topic

Xarkurai

Hello,

recently I've been screwing around with some stuff and I've bumped on the  ssi_fetchMember.
I'm not quite sure how this is working.
When you simply call the ssi it displays the name and avatar of that member.

But can you actually call certain things such as the name only, the member link, etc,.. ?

Thanks in advance.
Useful paid mod: Badge Awards - Award members for actions

rtil

yes. do a var_dump on $context['user']. you will see all the things you can include on a page.

Suki

Indeed the info by default for that function is the link, the "blurb"  and the avatar.

however, this function can display all the info from a member:

$user = ssi_fetchMember(1, 'return');

// then do a var_dump();  on $user:

var_dump($user);

and you will see a list of all the data from the user with ID1
Disclaimer: unless otherwise stated, all my posts are personal and does not represent any views or opinions held by Simple Machines.

Xarkurai

That's awesome.
And how exactly do I echo this?
I've been trying things like: echo $user['user']['signature']; 
But that doesn't turn out right :P.
Useful paid mod: Badge Awards - Award members for actions

Suki

something like this:

$user = ssi_fetchMember(1, 'return');

echo $user['signature'];


should work, this will show the signature from the user with ID 1
Disclaimer: unless otherwise stated, all my posts are personal and does not represent any views or opinions held by Simple Machines.

Xarkurai

Nope, that ain't working either.
That's why its so weird.

It is different like the other SSI coding.
Useful paid mod: Badge Awards - Award members for actions

Suki

ahh I just posted that from memory, let me do some test.
Disclaimer: unless otherwise stated, all my posts are personal and does not represent any views or opinions held by Simple Machines.

Mick.

Sunday,
$context['signature'];

Maybe?

Xarkurai

Also tried that before and no results on it.
I tried quite a lot. It appears to be a tricky one :D.
Useful paid mod: Badge Awards - Award members for actions

Mick.

Add this on the top of the code :

global $context, $txt, $user_info, $id_member;


Sorry im on my android. Can't test lol

Mick.


Xarkurai

That is working with groups :D
still figuring out how to echo this stupid signature. ^^
Useful paid mod: Badge Awards - Award members for actions

Advertisement: