n0mDePlume
Member
I'm in the middle of creating a style without avatars to be used for my board (it's a serious effort for an 8M post big board), and I'm looking for advice on what would be the best way to make it clean and sharable.
It turns out that getting rid of avatars is mostly repetitive but easy template editing, and some minor CSS changes to get rid of "margin-left" padding.
However I do have questions on the following issues:
1. What's the best way to replace the lists of avatars and nothing else for stuff like followers and online staff?
Right now I just copied the sidebar code that lists all online users as text links, but it's not perfect. For example in the code that displays avatars of all followed users online, I replaced it as follows:
One glitch is that there's an extra comment at the end of this list. I'm a programmer who doesn't know much PHP, especially with these "xen" statements, so is there a quick way to find how many users are in $onlineUsers.records so that I can suppress the comma at the end of the list?
2. Is it possible to disable avatars by global variable, such as one linked to a checkbox in the style properties? I have no previous experience with XenForo styles. The problem I see is that there are a lot of "margin-left" values in the CSS that need to be changed, and I don't have a clue about how to make conditionals in CSS.
3. Would it be possible/useful to allow avatars to be disabled as part of responsive design, to save bandwidth on mobile devices? I've had user feedback that XenForo is much more painful for some mobile users than VB 3.8.
4. What's the best way to share my code here? Upload the style as a free resource?
Should I try to implement it using the template replacement system so that it could be applied to different styles? I've never used that.
Thanks for any help!
It turns out that getting rid of avatars is mostly repetitive but easy template editing, and some minor CSS changes to get rid of "margin-left" padding.
However I do have questions on the following issues:
1. What's the best way to replace the lists of avatars and nothing else for stuff like followers and online staff?
Right now I just copied the sidebar code that lists all online users as text links, but it's not perfect. For example in the code that displays avatars of all followed users online, I replaced it as follows:
Code:
<xen:foreach loop="$onlineUsers.records" value="$user">
<xen:if is="{$user.followed}">
<!-- OLD
<li title="{$user.username}" class="Tooltip"><xen:avatar user="$user" size="s" img="true" class="_plainImage" /></li>
-->
<!-- NEW BEGIN-->
<a href="{xen:link members, $user}"
class="username{xen:if '!{$user.visible}', ' invisible'}">{$user.username}</a>,
<!-- NEW END END -->
</xen:if>
</xen:foreach>
One glitch is that there's an extra comment at the end of this list. I'm a programmer who doesn't know much PHP, especially with these "xen" statements, so is there a quick way to find how many users are in $onlineUsers.records so that I can suppress the comma at the end of the list?
2. Is it possible to disable avatars by global variable, such as one linked to a checkbox in the style properties? I have no previous experience with XenForo styles. The problem I see is that there are a lot of "margin-left" values in the CSS that need to be changed, and I don't have a clue about how to make conditionals in CSS.
3. Would it be possible/useful to allow avatars to be disabled as part of responsive design, to save bandwidth on mobile devices? I've had user feedback that XenForo is much more painful for some mobile users than VB 3.8.
4. What's the best way to share my code here? Upload the style as a free resource?
Should I try to implement it using the template replacement system so that it could be applied to different styles? I've never used that.
Thanks for any help!