Jump to content

creating a link to profile...


Ocean West

Recommended Posts

how do you create a link in a post to the "edit profile" page so all the reader has to do is click the link  and when clicked it goes to "their" profile?

​.

Think have to use " $member->member_id . "-" . $member->name " somehow in between yourdomain.com/profile/ ID - Name /edit/ for href ..

Like to know also ..

 

.

Link to comment
Share on other sites

 

how do you create a link in a post to the "edit profile" page so all the reader has to do is click the link  and when clicked it goes to "their" profile?

​You could do it from within templates and construct the necessary URL, but since it needs the user ID I’m afraid you can’t offer one URL which would work for every user. 

Link to comment
Share on other sites

.

There are 2 ways that I figured out .. I've added it with a button class, to test it easily on a Pages sidebar Block

1st one is to go to a normal edit profile page .. the 2nd one is the popup window edit profile ..

There should be an if statement around them that only loggedIn() members could see the buttons, I didn't add them here .. I'm still confused with that ( security .. csrf .. log in .. etc )

At least the links work  :)

 

1.

{{$member = \IPS\Member::loggedIn();}}
<a href='{url="app=core&module=members&controller=profile&do=content&id=$member->member_id&do=edit"}' class="ipsButton ipsButton_fullWidth ipsButton_verySmall ipsButton_light">{lang="profile_edit"}</a>

 

2.

<a href='{expression="\IPS\Member::loggedIn()->url()->setQueryString( 'do', 'edit' )"}' data-ipsDialog data-ipsDialog-modal='true' data-ipsDialog-title='{lang="profile_edit"}' class="ipsButton ipsButton_fullWidth ipsButton_verySmall ipsButton_light">{lang="profile_edit"}</a>

 

 

.

Link to comment
Share on other sites

as moderator or administrator i wanted to create a saved actions to remind them to update their profile - and provide them a simple link, when any user reads it and clicks it they see their "own profile" - instead of trying to explain how to navigate to that area. 

Link to comment
Share on other sites

Sure. I don't have any built in conditions that will check the member profile fields at the moment, but there is a multi-purpose "PHP Code" condition to fill that gap. We can just check their custom profile fields using a PHP snippet. We could attach a custom data field to the member in rules that we can use to store the date of their last profile review, and then just check if that date is more than 90 days ago when the rule is invoked.

Link to comment
Share on other sites

Sure. I don't have any built in conditions that will check the member profile fields at the moment, but there is a multi-purpose "PHP Code" condition to fill that gap. We can just check their custom profile fields using a PHP snippet. We could attach a custom data field to the member in rules that we can use to store the date of their last profile review, and then just check if that date is more than 90 days ago when the rule is invoked.

​I would also be really interested in this rule to ensure our members are regularly keeping their profile up to date. For me I guess I would look more generally at has there profile information been saved/updated in the last 90 days for example.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...