MyBB Community Forums

Full Version: Style Usernames
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5 6 7 8 9 10 11 12
Hm...
I can't reproduce this problem.

Maybe you use invalid CSS style in group settings?
Please paste there your code.
im only using <font color="#color code">Group Name</font> in my groups
Version 1.8:
* fix announcements compatibility with Google SEO (by Kretol)
Hey! I am currently using this plugin on my MyBB Board and it works great! However, if a guest replies to a topic, the plugin will omit the guest's name on the index page and any forum depths. The guest's name is shown on any topic list within forums and within the UserCP though. Any idea on how to fix that? o:

This is what I've tried so far (changes made in styleUsernames.php)
I found this part:
/**
     * Style usernames on forums list
     * 
     * @param array &$forum Reference to forum data
     */
    public function buildForumbits(&$forum)
    {
        $this->cache['users'][$forum['lastposteruid']] = $forum['lastposter'];
        $forum['lastposter'] = "#STYLE_USERNAMES_UID{$forum['lastposteruid']}#";
    }

and replaced it with:
/**
     * Style usernames on forums list
     * 
     * @param array &$forum Reference to forum data
     */
    public function buildForumbits(&$forum)
    {
        global $forum;

        if ($forum['username'])
        {
            $this->cache['users'][$forum['uid']] = $forum['username'];
            $forum['username'] = "#STYLE_USERNAMES_UID{$forum['uid']}#";
        }
    
        if ($forum['lastposteruid'] != 0)
        {
            $this->cache['users'][$forum['lastposteruid']] = $forum['lastposter'];
            $forum['lastposter'] = "#STYLE_USERNAMES_UID{$forum['lastposteruid']}#";
        }
    }

It shows guest usernames on the index and forum depths pages; however, the colors for registered users are gone then. And I'm quite clueless now, because the thing is that guest usernames are shown in the lastposter column within forums, but not in the lastposter column on the index and forum depths. ^^

I know, this topic has last been used quite a while ago, but I'm having my fingers crossed that someone might have a clue on what to do. (:
Version 1.9
* add style usernames on guests


I added plugin to mods DB, it's avaiting validation.
You can download new version directly from github.

Download
https://github.com/lukasamd/MyBB-Style_U...master.zip
That was fast, thanks for that! (:
It does show guest usernames now; but instead of showing the group color on the registered ones, it only shows #000000 as the hex code, both on the index and forum depths. o:
Hello, give me screenshoot.
Alright, I tested a little further and I got it to work. I uploaded the older file again and I put the following:

/**
     * Style usernames on forums list
     * 
     * @param array &$forum Reference to forum data
     */
    public function buildForumbits(&$forum)
    {
        if ($forum['lastposteruid'] != 0)
        {
            $this->cache['users'][$forum['lastposteruid']] = $forum['lastposter'];
            $forum['lastposter'] = "#STYLE_USERNAMES_UID{$forum['lastposteruid']}#";
        }
        else
        {
            $forum['lastposter'] = "{$forum['lastposter']}";
        }
    }

Thanks for your help though! I appreciate it a lot! (:
(2014-06-05, 12:06 AM)Julz Wrote: [ -> ]Alright, I tested a little further and I got it to work. I uploaded the older file again and I put the following:

/**
     * Style usernames on forums list
     * 
     * @param array &$forum Reference to forum data
     */
    public function buildForumbits(&$forum)
    {
        if ($forum['lastposteruid'] != 0)
        {
            $this->cache['users'][$forum['lastposteruid']] = $forum['lastposter'];
            $forum['lastposter'] = "#STYLE_USERNAMES_UID{$forum['lastposteruid']}#";
        }
        else
        {
            $forum['lastposter'] = "{$forum['lastposter']}";
        }
    }

Thanks for your help though! I appreciate it a lot! (:
how it use in my forum
Pages: 1 2 3 4 5 6 7 8 9 10 11 12