Palestine
|
Addon
Title: |
Username Color |
Version: |
- |
Author: |
- |
Author URL: |
- |
Description: |
How to color username |
Discuz! X Version: |
X2.5 |
Language(s): |
- |
Create Date: |
|
Last Update: |
|
Screenshot: |
- |
Demo
First of all you should decide what the color every group will use:
How to set a group color
Then we have to hack existing template!
First :-
1- Open viewthread_node.htm file
if you use default style it founded in template\default\forum
other template\yourstyle\forum
find- <strong><a href="home.php?mod=space&uid=$post[authorid]" target="_blank" class="xi2">$post[author]</a></strong>
Copy the Code replace with- <strong><a href="home.php?mod=space&uid=$post[authorid]" target="_blank" class="xi2"{if $post[groupcolor]} style="color: $post[groupcolor]"{/if}>$post[author]</a></strong>
Copy the Code 2- in same file
search- <div class="authi"><a href="home.php?mod=space&uid=$post['authorid']" target="_blank" class="xw1">$post[author]</a>$authorverifys</div>
- </div>
Copy the Code replace with- <div class="authi"><a href="home.php?mod=space&uid=$post['authorid']" target="_blank" class="xw1"{if $post[groupcolor]} style="color: $post[groupcolor]"{/if}>$post[author]</a>$authorverifys</div>
- </div>
Copy the Code 3- open forumdisplay_list.htm file in same dic
find- <!--{if $thread['authorid'] && $thread['author']}-->
- <a href="home.php?mod=space&uid=$thread[authorid]" c="1">$thread[author]</a><!--{if !empty($verify[$thread['authorid']])}--> $verify[$thread[authorid]]<!--{/if}-->
Copy the Code replace with- <!--{if $thread['authorid'] && $thread['author']}-->
- <a href="home.php?mod=space&uid=$thread[authorid]" c="1"{if $groupcolor[$thread[authorid]]} style="color: $groupcolor[$thread[authorid]];"{/if}>$thread[author]</a><!--{if !empty($verify[$thread['authorid']])}--> $verify[$thread[authorid]]<!--{/if}-->
Copy the Code Done
after this usergroup color will apply on username
P.S.
this functionality was got from x3 but was shorten.
if you want to have a full functionality, just update to x3 (it have this built-in already)
[Edited by vot]
|
This post contains more resources
You have to Login for download or view attachment(s). No Account? Register
x
Related collections:
- · Tricks|Threads: 23, Subscribe: 3
|