Resource icon

Custom Usergroups Widget 0.25

No permission to download

JayX

Active member
Yes, it's a great add-on concept, I just wasn't having any luck with it. Perhaps I'd made a mistake installing though? :)
 

Brogan

XenForo moderator
Staff member
Please post in English, as per the forum rules.

The conversation feature should be used when conversing in other languages.

Posts deleted.
 

time

Active member
@Nobita.Kun @Brogan
Using this syntax:
Code:
<xen:if is="{$user.homepage}">
<div class="userTitle">{xen:string censor, $user.customFields.{customFieldId}}</div>
</xen:if>
The following templates contained errors and were not saved: wf_custom_usergroups: 1) Line 30: Template syntax error.
HTML:
<xen:require css="wf_custom_usergroups.css" />
<xen:if is="{$widget.options.displayMode} == 'avatarOnly'">
    <ul class="followedOnline">
        <xen:foreach loop="$users" value="$user">
            <li title="{$user.username}<xen:if hascontent="true"> - <xen:contentcheck>{xen:if '{$widget.options.order} == "message_count"', '{xen:phrase messages}: {xen:number $user.message_count}', '{xen:helper usertitle, $user}'}</xen:contentcheck></xen:if>" class="Tooltip user-{$user.user_id}">
                <xen:avatar user="$user" size="m" img="true" class="_plainImage" />
            </li>
        </xen:foreach>
    </ul>
<xen:elseif is="{$widget.options.displayMode} == 'avatarOnlyBigger'" />
    <ul class="avatarHeap">
        <xen:foreach loop="$users" value="$user">
            <li title="{$user.username}<xen:if hascontent="true"> - <xen:contentcheck>{xen:if '{$widget.options.order} == "message_count"', '{xen:phrase messages}: {xen:number $user.message_count}', '{xen:helper usertitle, $user}'}</xen:contentcheck></xen:if>" class="Tooltip user-{$user.user_id}">
                <xen:avatar user="$user" size="m" />
            </li>
        </xen:foreach>
    </ul>
<xen:else />
    <div class="avatarList">
        <ul>
            <xen:foreach loop="$users" value="$user">
                <li class="user-{$user.user_id}">
                    <xen:avatar user="$user" size="m" img="true" />
                    <xen:username user="$user" rich="true" />
                    <xen:if is="{$widget.options.order} == 'message_count'">
                        <xen:if is="{$user.homepage}">
                            <div class="userTitle"><a href="{xen:string censor, $user.homepage, 'x'}" rel="nofollow" target="_blank" itemprop="url">{xen:string censor, $user.homepage}</a></div>
                        </xen:if>
<xen:if is="{$user.homepage}">
<div class="userTitle">{xen:string censor, $user.customFields.{customFieldId}}</div>
</xen:if>
                    <xen:elseif is="{$widget.options.order} == 'register_date'" />
                        <xen:if is="{$user.homepage}">
                            <div class="userTitle"><a href="{xen:string censor, $user.homepage, 'x'}" rel="nofollow" target="_blank" itemprop="url">{xen:string censor, $user.homepage}</a></div>
                        </xen:if>
<xen:if is="{$user.homepage}">
<div class="userTitle">{xen:string censor, $user.customFields.{customFieldId}}</div>
</xen:if>
                    <xen:else />
                        <xen:if is="{$user.homepage}">
                            <div class="userTitle"><a href="{xen:string censor, $user.homepage, 'x'}" rel="nofollow" target="_blank" itemprop="url">{xen:string censor, $user.homepage}</a></div>
                        </xen:if>
<xen:if is="{$user.homepage}">
<div class="userTitle">{xen:string censor, $user.customFields.{customFieldId}}</div>
</xen:if>
                    </xen:if>
                </li>
            </xen:foreach>
        </ul>
    </div>
</xen:if>
 

truonglv

Formerly Nobita.Kun
@Nobita.Kun @Brogan


The following templates contained errors and were not saved: wf_custom_usergroups: 1) Line 30: Template syntax error.
HTML:
<xen:require css="wf_custom_usergroups.css" />
<xen:if is="{$widget.options.displayMode} == 'avatarOnly'">
    <ul class="followedOnline">
        <xen:foreach loop="$users" value="$user">
            <li title="{$user.username}<xen:if hascontent="true"> - <xen:contentcheck>{xen:if '{$widget.options.order} == "message_count"', '{xen:phrase messages}: {xen:number $user.message_count}', '{xen:helper usertitle, $user}'}</xen:contentcheck></xen:if>" class="Tooltip user-{$user.user_id}">
                <xen:avatar user="$user" size="m" img="true" class="_plainImage" />
            </li>
        </xen:foreach>
    </ul>
<xen:elseif is="{$widget.options.displayMode} == 'avatarOnlyBigger'" />
    <ul class="avatarHeap">
        <xen:foreach loop="$users" value="$user">
            <li title="{$user.username}<xen:if hascontent="true"> - <xen:contentcheck>{xen:if '{$widget.options.order} == "message_count"', '{xen:phrase messages}: {xen:number $user.message_count}', '{xen:helper usertitle, $user}'}</xen:contentcheck></xen:if>" class="Tooltip user-{$user.user_id}">
                <xen:avatar user="$user" size="m" />
            </li>
        </xen:foreach>
    </ul>
<xen:else />
    <div class="avatarList">
        <ul>
            <xen:foreach loop="$users" value="$user">
                <li class="user-{$user.user_id}">
                    <xen:avatar user="$user" size="m" img="true" />
                    <xen:username user="$user" rich="true" />
                    <xen:if is="{$widget.options.order} == 'message_count'">
                        <xen:if is="{$user.homepage}">
                            <div class="userTitle"><a href="{xen:string censor, $user.homepage, 'x'}" rel="nofollow" target="_blank" itemprop="url">{xen:string censor, $user.homepage}</a></div>
                        </xen:if>
<xen:if is="{$user.homepage}">
<div class="userTitle">{xen:string censor, $user.customFields.{customFieldId}}</div>
</xen:if>
                    <xen:elseif is="{$widget.options.order} == 'register_date'" />
                        <xen:if is="{$user.homepage}">
                            <div class="userTitle"><a href="{xen:string censor, $user.homepage, 'x'}" rel="nofollow" target="_blank" itemprop="url">{xen:string censor, $user.homepage}</a></div>
                        </xen:if>
<xen:if is="{$user.homepage}">
<div class="userTitle">{xen:string censor, $user.customFields.{customFieldId}}</div>
</xen:if>
                    <xen:else />
                        <xen:if is="{$user.homepage}">
                            <div class="userTitle"><a href="{xen:string censor, $user.homepage, 'x'}" rel="nofollow" target="_blank" itemprop="url">{xen:string censor, $user.homepage}</a></div>
                        </xen:if>
<xen:if is="{$user.homepage}">
<div class="userTitle">{xen:string censor, $user.customFields.{customFieldId}}</div>
</xen:if>
                    </xen:if>
                </li>
            </xen:foreach>
        </ul>
    </div>
</xen:if>
Code:
<xen:require css="wf_custom_usergroups.css" />
<xen:if is="{$widget.options.displayMode} == 'avatarOnly'">
    <ul class="followedOnline">
        <xen:foreach loop="$users" value="$user">
            <li title="{$user.username}<xen:if hascontent="true"> - <xen:contentcheck>{xen:if '{$widget.options.order} == "message_count"', '{xen:phrase messages}: {xen:number $user.message_count}', '{xen:helper usertitle, $user}'}</xen:contentcheck></xen:if>" class="Tooltip user-{$user.user_id}">
                <xen:avatar user="$user" size="m" img="true" class="_plainImage" />
            </li>
        </xen:foreach>
    </ul>
<xen:elseif is="{$widget.options.displayMode} == 'avatarOnlyBigger'" />
    <ul class="avatarHeap">
        <xen:foreach loop="$users" value="$user">
            <li title="{$user.username}<xen:if hascontent="true"> - <xen:contentcheck>{xen:if '{$widget.options.order} == "message_count"', '{xen:phrase messages}: {xen:number $user.message_count}', '{xen:helper usertitle, $user}'}</xen:contentcheck></xen:if>" class="Tooltip user-{$user.user_id}">
                <xen:avatar user="$user" size="m" />
            </li>
        </xen:foreach>
    </ul>
<xen:else />
    <div class="avatarList">
        <ul>
            <xen:foreach loop="$users" value="$user">
                <li class="user-{$user.user_id}">
                    <xen:avatar user="$user" size="m" img="true" />
                    <xen:username user="$user" rich="true" />
                    <xen:if is="{$widget.options.order} == 'message_count'">
                        <xen:if is="{$user.homepage}">
                            <div class="userTitle"><a href="{xen:string censor, $user.homepage, 'x'}" rel="nofollow" target="_blank" itemprop="url">{xen:string censor, $user.homepage}</a></div>
                        </xen:if>
                        <xen:if is="{$user.customFields.facebook}">
                            <div class="userTitle">{xen:string censor, $user.customFields.facebook}</div>
                        </xen:if>
                    <xen:elseif is="{$widget.options.order} == 'register_date'" />
                        <xen:if is="{$user.homepage}">
                            <div class="userTitle"><a href="{xen:string censor, $user.homepage, 'x'}" rel="nofollow" target="_blank" itemprop="url">{xen:string censor, $user.homepage}</a></div>
                        </xen:if>
                        <xen:if is="{$user.customFields.facebook}">
                            <div class="userTitle">{xen:string censor, $user.customFields.facebook}</div>
                        </xen:if>
                    <xen:else />
                        <xen:if is="{$user.homepage}">
                            <div class="userTitle"><a href="{xen:string censor, $user.homepage, 'x'}" rel="nofollow" target="_blank" itemprop="url">{xen:string censor, $user.homepage}</a></div>
                        </xen:if>
                        <xen:if is="{$user.customFields.facebook}">
                            <div class="userTitle">{xen:string censor, $user.customFields.facebook}</div>
                        </xen:if>
                    </xen:if>
                </li>
            </xen:foreach>
        </ul>
    </div>
</xen:if>
Replace all your content of template by that
 

time

Active member
Code:
<xen:require css="wf_custom_usergroups.css" />
<xen:if is="{$widget.options.displayMode} == 'avatarOnly'">
    <ul class="followedOnline">
        <xen:foreach loop="$users" value="$user">
            <li title="{$user.username}<xen:if hascontent="true"> - <xen:contentcheck>{xen:if '{$widget.options.order} == "message_count"', '{xen:phrase messages}: {xen:number $user.message_count}', '{xen:helper usertitle, $user}'}</xen:contentcheck></xen:if>" class="Tooltip user-{$user.user_id}">
                <xen:avatar user="$user" size="m" img="true" class="_plainImage" />
            </li>
        </xen:foreach>
    </ul>
<xen:elseif is="{$widget.options.displayMode} == 'avatarOnlyBigger'" />
    <ul class="avatarHeap">
        <xen:foreach loop="$users" value="$user">
            <li title="{$user.username}<xen:if hascontent="true"> - <xen:contentcheck>{xen:if '{$widget.options.order} == "message_count"', '{xen:phrase messages}: {xen:number $user.message_count}', '{xen:helper usertitle, $user}'}</xen:contentcheck></xen:if>" class="Tooltip user-{$user.user_id}">
                <xen:avatar user="$user" size="m" />
            </li>
        </xen:foreach>
    </ul>
<xen:else />
    <div class="avatarList">
        <ul>
            <xen:foreach loop="$users" value="$user">
                <li class="user-{$user.user_id}">
                    <xen:avatar user="$user" size="m" img="true" />
                    <xen:username user="$user" rich="true" />
                    <xen:if is="{$widget.options.order} == 'message_count'">
                        <xen:if is="{$user.homepage}">
                            <div class="userTitle"><a href="{xen:string censor, $user.homepage, 'x'}" rel="nofollow" target="_blank" itemprop="url">{xen:string censor, $user.homepage}</a></div>
                        </xen:if>
                        <xen:if is="{$user.customFields.facebook}">
                            <div class="userTitle">{xen:string censor, $user.customFields.facebook}</div>
                        </xen:if>
                    <xen:elseif is="{$widget.options.order} == 'register_date'" />
                        <xen:if is="{$user.homepage}">
                            <div class="userTitle"><a href="{xen:string censor, $user.homepage, 'x'}" rel="nofollow" target="_blank" itemprop="url">{xen:string censor, $user.homepage}</a></div>
                        </xen:if>
                        <xen:if is="{$user.customFields.facebook}">
                            <div class="userTitle">{xen:string censor, $user.customFields.facebook}</div>
                        </xen:if>
                    <xen:else />
                        <xen:if is="{$user.homepage}">
                            <div class="userTitle"><a href="{xen:string censor, $user.homepage, 'x'}" rel="nofollow" target="_blank" itemprop="url">{xen:string censor, $user.homepage}</a></div>
                        </xen:if>
                        <xen:if is="{$user.customFields.facebook}">
                            <div class="userTitle">{xen:string censor, $user.customFields.facebook}</div>
                        </xen:if>
                    </xen:if>
                </li>
            </xen:foreach>
        </ul>
    </div>
</xen:if>
Replace all your content of template by that
no results
 

truonglv

Formerly Nobita.Kun
no results
:oops: This is serialize data. So you want to using customFields.
Open the file: Nobita_UserGroupWidget_Extend_WidgetRenderer_UserGroups
Find that line:
Code:
$users = $userModel->getUsers($userGroupsConditions, $userGroupsFetchOptions);
Insert below:
PHP:
foreach($users as &$user)
        {
            $user['customFields'] = @unserialize($user['custom_fields']);
        }
After you done. Code look like:
PHP:
$users = $userModel->getUsers($userGroupsConditions, $userGroupsFetchOptions);
       
        foreach($users as &$user)
        {
            $user['customFields'] = @unserialize($user['custom_fields']);
        }
Oke. Now you can using {$user.customFields.facebook}
 

time

Active member
with the code below, the addon only working with Administrative group.

HTML:
<xen:require css="wf_custom_usergroups.css" />
<xen:if is="{$widget.options.displayMode} == 'avatarOnly'">
    <ul class="followedOnline">
        <xen:foreach loop="$users" value="$user">
            <li title="{$user.username}<xen:if hascontent="true"> - <xen:contentcheck>{xen:if '{$widget.options.order} == "message_count"', '{xen:phrase messages}: {xen:number $user.message_count}', '{xen:helper usertitle, $user}'}</xen:contentcheck></xen:if>" class="Tooltip user-{$user.user_id}">
                <xen:avatar user="$user" size="m" img="true" class="_plainImage" />
            </li>
        </xen:foreach>
    </ul>
<xen:elseif is="{$widget.options.displayMode} == 'avatarOnlyBigger'" />
    <ul class="avatarHeap">
        <xen:foreach loop="$users" value="$user">
            <li title="{$user.username}<xen:if hascontent="true"> - <xen:contentcheck>{xen:if '{$widget.options.order} == "message_count"', '{xen:phrase messages}: {xen:number $user.message_count}', '{xen:helper usertitle, $user}'}</xen:contentcheck></xen:if>" class="Tooltip user-{$user.user_id}">
                <xen:avatar user="$user" size="m" />
            </li>
        </xen:foreach>
    </ul>
<xen:else />
    <div class="avatarList">
        <ul>
            <xen:foreach loop="$users" value="$user">
                <li class="user-{$user.user_id}">
                    <xen:avatar user="$user" size="m" img="true" />
                    <xen:username user="$user" rich="true" />
                 
                </li>
            </xen:foreach>
        </ul>
    </div>
</xen:if>
 

truonglv

Formerly Nobita.Kun
with the code below, the addon only working with Administrative group.

HTML:
<xen:require css="wf_custom_usergroups.css" />
<xen:if is="{$widget.options.displayMode} == 'avatarOnly'">
    <ul class="followedOnline">
        <xen:foreach loop="$users" value="$user">
            <li title="{$user.username}<xen:if hascontent="true"> - <xen:contentcheck>{xen:if '{$widget.options.order} == "message_count"', '{xen:phrase messages}: {xen:number $user.message_count}', '{xen:helper usertitle, $user}'}</xen:contentcheck></xen:if>" class="Tooltip user-{$user.user_id}">
                <xen:avatar user="$user" size="m" img="true" class="_plainImage" />
            </li>
        </xen:foreach>
    </ul>
<xen:elseif is="{$widget.options.displayMode} == 'avatarOnlyBigger'" />
    <ul class="avatarHeap">
        <xen:foreach loop="$users" value="$user">
            <li title="{$user.username}<xen:if hascontent="true"> - <xen:contentcheck>{xen:if '{$widget.options.order} == "message_count"', '{xen:phrase messages}: {xen:number $user.message_count}', '{xen:helper usertitle, $user}'}</xen:contentcheck></xen:if>" class="Tooltip user-{$user.user_id}">
                <xen:avatar user="$user" size="m" />
            </li>
        </xen:foreach>
    </ul>
<xen:else />
    <div class="avatarList">
        <ul>
            <xen:foreach loop="$users" value="$user">
                <li class="user-{$user.user_id}">
                    <xen:avatar user="$user" size="m" img="true" />
                    <xen:username user="$user" rich="true" />
                
                </li>
            </xen:foreach>
        </ul>
    </div>
</xen:if>
What groups you selected? And are you sure other people set facebook field??
 

time

Active member
HTML:
<xen:require css="wf_custom_usergroups.css" />
<xen:if is="{$widget.options.displayMode} == 'avatarOnly'">
    <ul class="followedOnline">
        <xen:foreach loop="$users" value="$user">
            <li title="{$user.username}<xen:if hascontent="true"> - <xen:contentcheck>{xen:if '{$widget.options.order} == "message_count"', '{xen:phrase messages}: {xen:number $user.message_count}', '{xen:helper usertitle, $user}'}</xen:contentcheck></xen:if>" class="Tooltip user-{$user.user_id}">
                <xen:avatar user="$user" size="m" img="true" class="_plainImage" />
            </li>
        </xen:foreach>
    </ul>
<xen:elseif is="{$widget.options.displayMode} == 'avatarOnlyBigger'" />
    <ul class="avatarHeap">
        <xen:foreach loop="$users" value="$user">
            <li title="{$user.username}<xen:if hascontent="true"> - <xen:contentcheck>{xen:if '{$widget.options.order} == "message_count"', '{xen:phrase messages}: {xen:number $user.message_count}', '{xen:helper usertitle, $user}'}</xen:contentcheck></xen:if>" class="Tooltip user-{$user.user_id}">
                <xen:avatar user="$user" size="m" />
            </li>
        </xen:foreach>
    </ul>
<xen:else />
    <div class="avatarList">
        <ul>
            <xen:foreach loop="$users" value="$user">
                <li class="user-{$user.user_id}">
                    <xen:avatar user="$user" size="m" img="true" />
                    <xen:username user="$user" rich="true" />
              
                </li>
            </xen:foreach>
        </ul>
    </div>
</xen:if>
with the above code, I think I deleted facebook. (no facebook, no homapage)

You can see the images below

1. Administrative group

1.jpg


2.jpg


2. Registered group

3.jpg


4.jpg
 

truonglv

Formerly Nobita.Kun
Of couse! This Addon will get all users have in secondary groups 'Registered'. If you want to using for primary groups. Please using older version Addon
 

time

Active member
This Addon will not get all users have in secondary groups 'Registered' .

I chose group 'Registered' , but there are not any members of this group show

Registered group

3.jpg
4.jpg
 

truonglv

Formerly Nobita.Kun
This Addon will not get all users have in secondary groups 'Registered' .

I chose group 'Registered' , but there are not any members of this group show

Registered group

View attachment 55240
View attachment 55239
Are you sure your forums have any users in 'Registered' secondary groups? With 'Registered' group is primary for all users include Admin or Moderator and You also can set same groups for a user (primary and secondary).
Finaly... Please make sure anything you to do
 
Top