How to display a Power User's details in profiles they create

SteveX
SteveX
@ultrajam
7 years ago
2,584 posts
Are there any examples or functions for displaying the power user's home profile details in the profiles they create?

Thanks :)


--
¯\_(ツ)_/¯ Education, learning resources, TEL, AR/VR/MR, CC licensed content, panoramas, interactive narrative, sectional modules (like jrDocs), lunch at Uni of Bristol. Get in touch if you share my current interests or can suggest better :)

updated by @ultrajam: 12/21/17 03:45:24AM
michael
@michael
7 years ago
7,717 posts
Try:
{$_u = jrCore_db_get_item('jrUser', $_user_id)}
{debug}

--edit--
oops, clicked wrong button.

I setup a power user who created some profiles. This code was put in the profile_header.tpl file and displayed while looking at 'power-three'

The profiles were:
power
power-one
power-two
power-three

Where "power" was the home profile.
power.jpg
power.jpg  •  69KB


updated by @michael: 09/21/17 09:47:07PM
SteveX
SteveX
@ultrajam
7 years ago
2,584 posts
Thanks Michael, but does that work when the power user's home profile might not be on the Power quota?

I think I might need to save the Power profile_id to each of the created profiles as profile_power_creator


--
¯\_(ツ)_/¯ Education, learning resources, TEL, AR/VR/MR, CC licensed content, panoramas, interactive narrative, sectional modules (like jrDocs), lunch at Uni of Bristol. Get in touch if you share my current interests or can suggest better :)
michael
@michael
7 years ago
7,717 posts
should do, the logic is "On the current profile, get the $_user_id of the owner of this profile." from the returned info, the info on the profile_url is not that of the profile currently being viewed, its of the profile connected to the user account of the person who created the current profile being viewed.
SteveX
SteveX
@ultrajam
7 years ago
2,584 posts
Wouldn't that only work if all power users signed up directly into the quota?

I'm thinking of a situation where multiple users are linked to a power profile, and can each then create multiple profiles out of the power profile.


--
¯\_(ツ)_/¯ Education, learning resources, TEL, AR/VR/MR, CC licensed content, panoramas, interactive narrative, sectional modules (like jrDocs), lunch at Uni of Bristol. Get in touch if you share my current interests or can suggest better :)
michael
@michael
7 years ago
7,717 posts
oh, ok. back to testing.....
michael
@michael
7 years ago
7,717 posts
So your logic is:
* a user signs up to a non Power User profile under the user_name 'power'
* admin creates a profile 'CommunityPower' which is in a quota that is a Power User enabled and able to create say 10 profiles
* admin then links 'power' to the profile 'CommunityPower' and should see the + button to create new profiles when visiting /communitypower because that profile is a power user profile.

seams reasonable, but its not working for me like that. When I visit the /communitypower profile there is no + button.

am I mis-understanding?
updated by @michael: 09/22/17 02:42:49AM
SteveX
SteveX
@ultrajam
7 years ago
2,584 posts
That sounds like what I had in mind, but you are right, there is no + button so I'm going to have to rethink that or avoid it altogether by not allowing profiles to be shared.


--
¯\_(ツ)_/¯ Education, learning resources, TEL, AR/VR/MR, CC licensed content, panoramas, interactive narrative, sectional modules (like jrDocs), lunch at Uni of Bristol. Get in touch if you share my current interests or can suggest better :)

Tags