Skip to content

Custom view of the user's level in the list of all and individual channels #586

@SAGOnly

Description

@SAGOnly

Hi,
I didn't find any discussion forum on Clipbucket, so I'll write it here if it will interfere here, please delete.
It is a custom view of the user level in the list of all channels and even in the selected channel of the individual user.

open file /styles/cb_28/layout/blocks/channels.html
search for row no. 4 and 5

row 4 <h2>{display_clean(User::getInstance($user.userid)->get('username'))}</h2>
row 5 </a>

insert after the tag
<div class="userlevelchannelall">{display_clean(User::getInstance($user.userid)->get('user_level_name'))}</div>

and customize in theme style
light.css

.userlevelchannelall {
border: 1px solid #d9d9d9;
background: :#f7f7f7;
color: #000;
font-size: 11px;
text-align: center;
font-family: Arial, Helvetica, sans-serif;
padding: 5px 0px 5px 0px;
margin: -30px 0px 0px 0px;
}

or light.min.css
.userlevelchannelall{border:1px solid #d9d9d9;background:#f7f7f7;color:#000;font-size:11px;text-align:center;font-family:Arial,Helvetica,sans-serif;padding:5px 0px 5px 0px;margin:-30px 0px 0px 0px;}

dark.css

.userlevelchannelall {
border: 1px solid #393939;
background: #2a2c37;
color: #fff;
font-size: 11px;
text-align: center;
font-family: Arial,Helvetica,sans-serif;
padding: 5px 0px 5px 0px;
margin: -30px 0px 0px 0px;
}

or dark.min.css
.userlevelchannelall{border:1px solid #393939;background:#2a2c37;color:#fff;font-size:11px;text-align:center;font-family:Arial,Helvetica,sans-serif;padding:5px 0px 5px 0px;margin:-30px 0px 0px 0px;}

open file /styles/cb_28/layout/blocks/view_channel/channel_header.html
search for row no. 62 to 64

row 62 <div class="avatar">
row 63 <img class="img-responsive img-circle" src="{$userquery->getUserThumb($user)}">
row 64 </div>

replace for

row 62 <div class="avatar">
row 63 <img class="img-responsive img-circle" src="{$userquery->getUserThumb($user)}">
row 64 <div class="userlevelchannelselect">{display_clean(User::getInstance($user.userid)->get('user_level_name'))}</div>
row 65 </div>

and customize in theme style
light.css

.userlevelchannelselect {
border: 1px solid #333;
background: #efefef;
color: #000;
font-size: 11px;
text-align: center;
font-family: Arial, Helvetica, sans-serif;
padding: 2px 0px 2px 0px;
margin: -6px 0px 0px 111px;
width: 166px;
}

or light.min.css
.userlevelchannelselect{border:1px solid #333;background:#efefef;color:#000;font-size:11px;text-align:center;font-family:Arial,Helvetica,sans-serif;padding:2px 0px 2px 0px;margin:-4px 0px 0px 111px;width:166px;}

dark.css

.userlevelchannelselect {
border: 1px solid #333;
background: #efefef;
color: #000;
font-size: 11px;
text-align: center;
font-family:Arial, Helvetica, sans-serif;
padding: 2px 0px 2px 0px;
margin: -6px 0px 0px 111px;
width: 166px;
}

or dark.min.css
.userlevelchannelselect{border:1px solid #333;background:#efefef;color:#000;font-size:11px;text-align:center;font-family:Arial,Helvetica,sans-serif;padding:2px 0px 2px 0px;margin:-6px 0px 0px 111px;width:166px;}

Image
Image
Image
Image

If someone would like to filter and search by user level in the channel list
1. enable display of user categories in administration
2. override all user categories according to user levels

and
open file /styles/cb_28/layout/blocks/my_account/account_settings.html
search for row no. 28 to 36

row 28 {if config('enable_user_category')=='yes'}
.            <div class="form-group">
.               <label for="category">{lang code='category'}</label>
.              {ANCHOR place=$signup_fields.cat.anchor_before}
.             {$signup_fields.cat.class='form-control'}
.            {$formObj->createField($signup_fields.cat)}
.           {ANCHOR place=$signup_fields.cat.anchor_after}
.      </div>
row 36 {/if}

and delete this entire block.

Image
Image
Image

Have a nice day
Scotty

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions