inherit
260808
0
May 16, 2024 20:14:10 GMT -8
bluevyse
5
April 2020
bluevyse
|
Post by bluevyse on Feb 28, 2023 16:09:39 GMT -8
Current Code: {foreach $[shoutbox_post.created_by.custom_field]}
{if $[shoutbox_post.created_by.custom_field.name] == "Alias"}
$[shoutbox_post.created_by.custom_field.value]
{/if}
{/foreach}
($[shoutbox_post.created_by]) : $[shoutbox_post.message] Of course there is a member's custom field called Alias and if not filled out it should appear (account) : post and if it is filled out it should appear Alias (account) : post It seems simple enough, but it only shows the alias for the currently logged in player. For example, logged in as user1: Alias (user1) : post (user2) : post (user3) : post but if logged into user2 it shows: (user1) : post Alias (user2) : post (user3) and so on so forth. Is it something with how the profile field is set up? I have the field set up like so:
|
|
inherit
Official Code Helper
65613
0
1
Oct 22, 2024 1:56:19 GMT -8
Chris
"'Oops' is the sound we make when we improve"
9,017
December 2005
horace
RedBassett's Mini-Profile
|
Post by Chris on Feb 28, 2023 18:07:32 GMT -8
Current Code: {foreach $[shoutbox_post.created_by.custom_field]}
{if $[shoutbox_post.created_by.custom_field.name] == "Alias"}
$[shoutbox_post.created_by.custom_field.value]
{/if}
{/foreach}
($[shoutbox_post.created_by]) : $[shoutbox_post.message] Of course there is a member's custom field called Alias and if not filled out it should appear (account) : post and if it is filled out it should appear Alias (account) : post It seems simple enough, but it only shows the alias for the currently logged in player. For example, logged in as user1: Alias (user1) : post (user2) : post (user3) : post but if logged into user2 it shows: (user1) : post Alias (user2) : post (user3) and so on so forth. Is it something with how the profile field is set up? I have the field set up like so: OK, here are my observations:- Data owner can always read his/her own data, so when you're not on a page with mini-profiles or not on a full-profile page all you will see is your own data which follows you.
- Go to a full-profile page that is not your own, and you see your own as well as the owner of the profile available in the shoutbox
- Go to a page with a list of posts (a thread or a list of search results), then only mini-profiles that are present on that page will have the custom field data available in the shoutbox
* using the paginator to go to another page with a mini-profile missing from the originally loaded page will not work unless you manually refresh the page. Pagination loads new posts but does not rerender the shoutbox
Since a custom field asks when it should be made available during the creation process and only offers the options of profile, mini-profile, or both, it makes sense that it behaves as described above. If the mini-profile or profile is not currently on the page, that data is unfortunately unavailable (as designed).
|
|
inherit
260808
0
May 16, 2024 20:14:10 GMT -8
bluevyse
5
April 2020
bluevyse
|
Post by bluevyse on Mar 1, 2023 15:26:25 GMT -8
Okay, so one can't put Alias's in the shoutbox because the mini-profile custom fields are not available when the mini-profiles are not loaded onto the page. Is there any sort of work around to make it so one can have alias's show when they're shouting vs their username (ie character name for RPs).
|
|
inherit
Official Code Helper
65613
0
1
Oct 22, 2024 1:56:19 GMT -8
Chris
"'Oops' is the sound we make when we improve"
9,017
December 2005
horace
RedBassett's Mini-Profile
|
Post by Chris on Mar 1, 2023 16:01:31 GMT -8
I don't use the shoutbox all that often but depending on your forum access permissions are configured, there is a guest name field in the shoutbox that could be of use. One simply has to logout and use that field to assume another name then switch back to login status when done.
Does that work for you?
|
|
inherit
260808
0
May 16, 2024 20:14:10 GMT -8
bluevyse
5
April 2020
bluevyse
|
Post by bluevyse on Mar 5, 2023 17:35:20 GMT -8
Well, it would be a bit silly to logout anytime one wanted to use the chatbox. However, it could be a solution.
I was thinking a solution could be to add a mini-profile that was hidden before each message with $[shoutbox_post.created_by.miniprofile] , but that still didn't work. Even unhiding the mini-profile just showed the default profile without any custom fields filled out, so that's interesting to me.
Another thing I've pondered is maybe to have the display names be the aliases and then from there, have the custom profile field be the character name and just do a switcheroo on the miniprofile so display name is now the custom field and vice versa.
|
|
#e61919
Support Staff
224482
0
1
Nov 22, 2024 17:59:24 GMT -8
Scott
“Asking for help isn't giving up... it's refusing to give up.”
24,521
August 2015
socalso
|
Post by Scott on Mar 10, 2023 9:30:12 GMT -8
bluevyse - if you just want members to use an alias only for the shoutbox, perhaps the solution would be to use a chat option other than the shoutbox, like cbox for instance. You can install this on the forum and have your members sign up/sign in using their alias. (Note, I'm not promoting cbox, it's just the first one that came to mind. You can use a chat option that works best for you, and that can be used with our service.)
|
|