xvids Posted October 10, 2022 Share Posted October 10, 2022 Example Screenshot marked red - I want to display it in KVS theme. Quote Link to comment Share on other sites More sharing options...
Tech Support Posted October 15, 2022 Share Posted October 15, 2022 You can use this to display the first letter of the profile name: {{$replaceme|substr:0:1|strtoupper}} The $replaceme variable will be different in different contexts, but should define display name, for example it will be $item.display_name for list_members block. 1 Quote Link to comment Share on other sites More sharing options...
xvids Posted October 15, 2022 Author Share Posted October 15, 2022 The Screenshot have different color for each letter, About colors for each letter I was confuse, otherwise I was using this code: but Not colors, 🙃 {{if $lang.enable_profiles=='true'}} <div id="user"> {{if $smarty.session.user_id>0}} {{if $smarty.session.avatar_url!=''}} <img class="avatar" src="{{$smarty.session.avatar_url}}" alt="{{$data.user.display_name}}" style="border-radius: 50%;width: 40px;height: 40px;"/> {{else}} <div id="no-thumb">{{$smarty.session.display_name|substr:"0":"1"|strtoupper}}</div> {{/if}} {{else}} <img class="avatar" src="{{$config.statics_url}}/static/images/user.png" alt="Signup/Login" style="border-radius: 50%;width: 40px;height: 40px;"/> {{/if}} </div> {{/if}} 1 Quote Link to comment Share on other sites More sharing options...
Tech Support Posted October 17, 2022 Share Posted October 17, 2022 I have no idea how to use different colors as well... It is more like design question. 1 Quote Link to comment Share on other sites More sharing options...
wyranger Posted April 6 Share Posted April 6 On 10/15/2022 at 6:55 PM, Tech Support said: You can use this to display the first letter of the profile name: {{$replaceme|substr:0:1|strtoupper}} The $replaceme variable will be different in different contexts, but should define display name, for example it will be $item.display_name for list_members block. I'm also encountering this issue, just want to clarify, where exactly does this line of code is suppose to go? Quote Link to comment Share on other sites More sharing options...
Tech Support Posted April 8 Share Posted April 8 On 4/6/2024 at 6:00 PM, wyranger said: I'm also encountering this issue, just want to clarify, where exactly does this line of code is suppose to go? It is many places around theme template, everywhere where avatar is displayed. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.