Jump to content

creating a link to profile...


Ocean West

Recommended Posts

Posted

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 ..

 

.

Posted

why would you have a link to edit your own profile in all posts? All they have to do is go to the top of the forum, click their name and then edit topic. Can be done from everywhere on the forum...

Posted

 

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. 

Posted

.

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>

 

 

.

Posted

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. 

Posted

OW, you can use the rules app coupled with the forums expansion pack to remind them to update their profile when you use your custom action. The rules LITE you can download for free, but the expansion pack requires a purchase. If you buy it, I'll help you create the rule.

 

Posted

Kevin i was looking at that - will it know if they filled in their custom profile fields?  (about 3 or 4 field ) and is it something i could setup like - every 90 days on log in require them to review their profile?

Posted

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.

Posted

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.

Archived

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

  • Recently Browsing   0 members

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