News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

loadMemberData & loadMemberContext

Started by mickjav, November 20, 2024, 06:04:15 PM

Previous topic - Next topic

mickjav

I am building a topic message type system, which I'm attempting to make it look like the messages in the forum.

I've got it working but not sure if I'm using the below correctly or maybe as it's multiple entry should I use the query to get the data to display the member details rather than:

Global variable $memberContext

    loadMemberData(0);
    loadMemberContext(0);

it works perfectly until I try and view it on my mobile, then it displays errors for each item used.

Any help advice would be much appreciated.

Mick

Arantor

loadMemberData and loadMemberContext need to be given the user id that you're trying to use - not zero.

You can pass an array to loadMemberData to load multiple at once but loadMemberContext wants a single user id at a time.
Holder of controversial views, all of which my own.


mickjav

Quote from: Arantor on November 20, 2024, 06:55:28 PMloadMemberData and loadMemberContext need to be given the user id that you're trying to use - not zero.

You can pass an array to loadMemberData to load multiple at once but loadMemberContext wants a single user id at a time.

Thanks, I'll try using the array for loadmemberdata and move the loadmembercontext to the loop and load for each member.

mickjav

Well, finally got the last bit of my fan forum sorted.

Just wanted to say a big thanks for the help to those who help with this and other problems I had.

On to the gallery section next lol

thanks mick

Advertisement: