SafeInSanity
Junior Member
Falling in love with Proboards again!
Posts: 424
inherit
23917
0
Feb 27, 2020 11:29:13 GMT -8
SafeInSanity
Falling in love with Proboards again!
424
May 2004
wiki
|
Post by SafeInSanity on Dec 30, 2015 14:32:57 GMT -8
Hi, I would like to request a mini profile template code/hack to add these important buttons to all user's mini profiles: "Follow User", "PM User", "View Profile" .
Proboard's current default mini profile is not social at all and I do not like it.
Thank you.
|
|
inherit
187476
0
May 18, 2020 16:00:31 GMT -8
Star's Legacy
1,019
December 2012
starshinelegacy
|
Post by Star's Legacy on Dec 30, 2015 18:27:46 GMT -8
SafeInSanity , [/b] > Members > Custom Profile Fields. From there make a Field Name for each button you want. They are all link based so you will need to select the type as Text Field then clicking (View/Edit) and selecting URL (plain text). From there you need to code the button. Go to Admin > Structure > Layout Templates > Mini-Profile. Take this code and place it where ever you want it to show for each button on the profile. {foreach $[user.mini_custom_field]} {if $[user.mini_custom_field.name] == "CUSTOM PROFILE FIELD NAME"} <span class="$[user.mini_custom_field.content_class]"> <center><font size="3"><a href="$[user.mini_custom_field.value]">THE NAME YOU WANT TO DISPLAY</a></font></center> </span> {/if} {/foreach} The 'CUSTOM PROFILE FIELD NAME' must be exactly the same as you put under the Admin panel or it will not work. ~ Let me know if you get stuck or if something does not work out correctly. ^^[/ul]
|
|
SafeInSanity
Junior Member
Falling in love with Proboards again!
Posts: 424
inherit
23917
0
Feb 27, 2020 11:29:13 GMT -8
SafeInSanity
Falling in love with Proboards again!
424
May 2004
wiki
|
Post by SafeInSanity on Dec 30, 2015 18:50:32 GMT -8
Thanks, I'll give it a shot
|
|
inherit
187476
0
May 18, 2020 16:00:31 GMT -8
Star's Legacy
1,019
December 2012
starshinelegacy
|
Post by Star's Legacy on Dec 30, 2015 18:51:44 GMT -8
|
|
inherit
\o/ ^o^ /o_ /o\
16464
0
Jul 22, 2024 13:57:10 GMT -8
pawl
29,621
November 2003
pollo
Pink Stars
|
Post by pawl on Jan 18, 2016 19:03:36 GMT -8
As a slight aside, I'm not sure that will work for a 'Follow Member' link, as there doesn't appear to be a direct URL for the action. I'm having a quick play to see if I can find one, however. As regards the request in general SafeInSanity, there is a much easier way of adding default links into the miniprofile. The variable $[user.pm_href] will give you a PM link, like so: <a href="$[user.pm_href]" target="_blank" title="PM Member">Send PM</a>The text in red would decide whether the link should open in a new tab ( "_blank") or in the same one ( "_parent") The text in green is what would display if you hovered over the link. The text in purple is what would display in the miniprofile itself. A simple link of <a href="/user/$[user.id]" target="_parent" title="Member Profile">Visit Profile</a> would do the same for the member's profile. That link seems a little redundant however, when you can simply click their display name above their avatar. edit: Okay, I may have been mistaken regarding the follow link. There is this variable in the Mini-Profile template: $[user.follow_button.href]So the following link should work for a 'follow' button in your mini profile... <a href="$[user.follow_button.href]" target="_blank" title="Follow Member">Follow Member</a>Now you'll want to check that it works, but you'll also want to pay attention to how it works. I don't know if it will require a change in page, or if it will simply run in the background. There also isn't a way to check if the member is already being followed - if they are I don't know if clicking again (being as you can't change or remove the text when they're being followed, as there's no way to check in the miniprofile template) will result in unfollowing the member, or simply doing nothing. If I can be bothered I'll have a play myself, but it's 3:30am and I lack the mental focus to do it right now. =P
|
|
SafeInSanity
Junior Member
Falling in love with Proboards again!
Posts: 424
inherit
23917
0
Feb 27, 2020 11:29:13 GMT -8
SafeInSanity
Falling in love with Proboards again!
424
May 2004
wiki
|
Post by SafeInSanity on Jan 23, 2016 10:52:26 GMT -8
haha ... thanks a lot pawl! That's pretty cool. Sounds a bit easier.
|
|