XF 1.4 Help me make more than one line of icons in user info?

Alexander Firth

Active member
I'm asking this here because I think this may be covered under general XF coding knowledge. Using AD credits and the shop add-on gives a mini 'inventory' in the user-info in each post, like this:

invdemo.webp

However, there is only one line. Adding another will displace the end icon. I'd like to make it so users can have multiple lines of these.

I believe these two templates are relevant:

Code:
<xen:if is="is_array({$icons})">
    <xen:if is="{$icons.icons}">
    <xen:require css="adcredit_shop_inventory_mini.css" />
    <p class="muted">{xen:phrase adcredit_inventory}:</p>
    <div class="adcredit_inventoryIcons">
        <xen:foreach loop="$icons.icons" value="$icon">
        <div class="icon">
            <a class="Tooltip" title="{$icon.title}" data-tipclass="iconTip"><img src="{$icon.image_url}" style="max-width: 16px;"></a>
        </div>
        </xen:foreach>
    </div>
    </xen:if>
</xen:if>

and

Code:
{xen:helper clearfix, '.adcredit_inventoryIcons'}

.adcredit_inventoryIcons div.icon {
    float: left;
    width: 15%;
    text-align: center;
    height: 17px;
    line-height: 17px;
    padding-top: 4px;
}

.adcredit_inventoryIcons div.icon a {
    display: inline-block;

}

Any idea what I'd have to change?

https://youthdebates.org/forums/threads/two-quick-updates.18325/
 
Last edited:
It's using a % so it'll shift everything onto one line. You can use something like this in extra.css:

Code:
.message .adcredit_inventoryIcons div.icon {
width: 35px;
}
Hm, it'll still only display a maximum of 6 icons - even if a user has more. I don't expect you to know a fix for this because it's a 3rd party add on, but might you know where I should be looking? A template? The XML file? The add-on developers are ignoring me (and my reports of legitimate bugs elsewhere in the add-on) on XF threads, PMs and their own ticket system. Feeling a little frustrated :/
 
The post you linked to only had 6 loading in the html itself, so if that user did have more it's possibily a setting for the plugin itself however I don't use it so I'm not much help past that.
 
The post you linked to only had 6 loading in the html itself, so if that user did have more it's possibily a setting for the plugin itself however I don't use it so I'm not much help past that.
Okay, there's nothing I can find in the admin panel so I'll have to wait for my ticket to be updated. Many thanks for your help, really appreciate it.
 
Top Bottom