Topic: How do you...

Get this;
http://i196.photobucket.com/albums/aa12/anticoncept/1-2.jpg

Or most likely this:
http://i196.photobucket.com/albums/aa12/anticoncept/2-1.jpg
^ How do I get the Admin-Mod-Artists-Member thing there? and I've tried the colored username thing but I don't think it does all this^
And btw the colored username group mod didn't work on the index with me.

So anyone can help me out to get like what the second image has?

And yes both of the forums are punbb.

smile

2 (edited by avantgarde 2007-09-22 20:33)

Re: How do you...

I don't know if this is the way slashTHREE did theirs, but we did it like this.

Open main.tpl, find:

<pun_main>

Add after:

        <div class="box">
          <h2 class="box2"><span>Group Legend</span></h2>
            <div class="inbox">
               <tr>
                     <ul>
                    <pun_include "group_legend.php">
                </ul>
               </tr>
            </div>
        </div>
<br />

Open a new file, name it group_legend.php, and paste this in to it:

<center><strong><font color="group'scolor>Group Name</center></strong>

Now save that and upload it to your /include/user/ folder.

And for the coloring the online, make sure you did the mod correctly, especially the part dealing with your functions.php

[img]http://i192.photobucket.com/albums/z314/avantgarde--/helplol.png[/img]

Re: How do you...

Thank you very much. smile

I installed the colored usergroup mod again, but again it doesn't works on the index [who's online list].

I think I know what the problem is,

In the README it says somewhere:

#
#---------[ 35. OPEN ]---------------------------------------------------
#

include/functions.php

#
#---------[ 36. FIND (line:78) ]---------------------------------------------------
#

$db->query('INSERT INTO '.$db->prefix.'online (user_id, ident, logged) VALUES('.$pun_user['id'].', \''.$db->escape($pun_user['username']).'\', '.$now.')') or error('Unable to insert into online list', __FILE__, __LINE__, $db->error());

#
#---------[ 37. REPLACE WITH ]---------------------------------------------------
#

$db->query('INSERT INTO '.$db->prefix.'online (user_id, ident, logged, color) VALUES('.$pun_user['id'].', \''.$db->escape($pun_user['username']).'\', '.$now.', \''.$db->escape($pun_user['g_color']).'\')') or error('Unable to insert into online list', __FILE__, __LINE__, $db->error());

#
#---------[ 38. FIND (line:118) ]---------------------------------------------------
#

$db->query('INSERT INTO '.$db->prefix.'online (user_id, ident, logged) VALUES(1, \''.$db->escape($remote_addr).'\', '.time().')') or error('Unable to insert into online list', __FILE__, __LINE__, $db->error());

#
#---------[ 39. REPLACE WITH ]---------------------------------------------------
#

$db->query('INSERT INTO '.$db->prefix.'online (user_id, ident, logged, color) VALUES(1, \''.$db->escape($remote_addr).'\', '.time().', \''.$pun_user['g_color'].'\')') or error('Unable to insert into online list', __FILE__, __LINE__, $db->error());

But when it says this:

#
#---------[ 36. FIND (line:78) ]---------------------------------------------------
#

$db->query('INSERT INTO '.$db->prefix.'online (user_id, ident, logged) VALUES('.$pun_user['id'].', \''.$db->escape($pun_user['username']).'\', '.$now.')') or error('Unable to insert into online list', __FILE__, __LINE__, $db->error());

It can't find that in my functions.php, what it does find is:

$db->query('INSERT INTO '.$db->prefix.'online (user_id, ident, logged) VALUES('.$pun_user['id'].', \''.$db->escape($pun_user['username']).'\', '.$pun_user['logged'].')') or error('Unable to insert into online list', __FILE__, __LINE__, $db->error());

And when it says this:

#
#---------[ 38. FIND (line:118) ]---------------------------------------------------
#

$db->query('INSERT INTO '.$db->prefix.'online (user_id, ident, logged) VALUES(1, \''.$db->escape($remote_addr).'\', '.time().')') or error('Unable to insert into online list', __FILE__, __LINE__, $db->error());

It doesn't find that either in my functions.php, it does finds:

$db->query('INSERT INTO '.$db->prefix.'online (user_id, ident, logged) VALUES(1, \''.$db->escape($remote_addr).'\', '.$pun_user['logged'].')') or error('Unable to insert into online list', __FILE__, __LINE__, $db->error());

And when I just replace that with that I should do in the readme, it still doesn't works. So I have no clue what to do.

smile

4 (edited by avantgarde 2007-09-28 20:20)

Re: How do you...

Find:

                // With MySQL/MySQLi, REPLACE INTO avoids a user having two rows in the online table
                switch ($db_type)
                {
                    case 'mysql':
                    case 'mysqli':
                        $db->query('REPLACE INTO '.$db->prefix.'online (user_id, ident, logged) VALUES('.$pun_user['id'].', \''.$db->escape($pun_user['username']).'\', '.$pun_user['logged'].')') or error('Unable to insert into online list', __FILE__, __LINE__, $db->error());
                        break;

                    default:
                        $db->query('INSERT INTO '.$db->prefix.'online (user_id, ident, logged) VALUES('.$pun_user['id'].', \''.$db->escape($pun_user['username']).'\', '.$pun_user['logged'].')') or error('Unable to insert into online list', __FILE__, __LINE__, $db->error());
                        break;
                }

Replace with:

                // With MySQL/MySQLi, REPLACE INTO avoids a user having two rows in the online table
                switch ($db_type)
                {
                    case 'mysql':
                    case 'mysqli':
                        $db->query('REPLACE INTO '.$db->prefix.'online (user_id, ident, logged, color) VALUES('.$pun_user['id'].', \''.$db->escape($pun_user['username']).'\', '.$now.', \''.$db->escape($pun_user['g_color']).'\')') or error('Unable to insert into online list', __FILE__, __LINE__, $db->error());
                        break;

                    default:
                        $db->query('INSERT INTO '.$db->prefix.'online (user_id, ident, logged, color) VALUES('.$pun_user['id'].', \''.$db->escape($pun_user['username']).'\', '.$now.', \''.$db->escape($pun_user['g_color']).'\')') or error('Unable to insert into online list', __FILE__, __LINE__, $db->error());
                        break;
                }
[img]http://i192.photobucket.com/albums/z314/avantgarde--/helplol.png[/img]

Re: How do you...

there is a legends mod posted somewhere on here or punnres because i downloaded it before.

Re: How do you...

avantgarde wrote:

Find:

                // With MySQL/MySQLi, REPLACE INTO avoids a user having two rows in the online table
                switch ($db_type)
                {
                    case 'mysql':
                    case 'mysqli':
                        $db->query('REPLACE INTO '.$db->prefix.'online (user_id, ident, logged) VALUES('.$pun_user['id'].', \''.$db->escape($pun_user['username']).'\', '.$pun_user['logged'].')') or error('Unable to insert into online list', __FILE__, __LINE__, $db->error());
                        break;

                    default:
                        $db->query('INSERT INTO '.$db->prefix.'online (user_id, ident, logged) VALUES('.$pun_user['id'].', \''.$db->escape($pun_user['username']).'\', '.$pun_user['logged'].')') or error('Unable to insert into online list', __FILE__, __LINE__, $db->error());
                        break;
                }

Replace with:

                // With MySQL/MySQLi, REPLACE INTO avoids a user having two rows in the online table
                switch ($db_type)
                {
                    case 'mysql':
                    case 'mysqli':
                        $db->query('REPLACE INTO '.$db->prefix.'online (user_id, ident, logged, color) VALUES('.$pun_user['id'].', \''.$db->escape($pun_user['username']).'\', '.$now.', \''.$db->escape($pun_user['g_color']).'\')') or error('Unable to insert into online list', __FILE__, __LINE__, $db->error());
                        break;

                    default:
                        $db->query('INSERT INTO '.$db->prefix.'online (user_id, ident, logged, color) VALUES('.$pun_user['id'].', \''.$db->escape($pun_user['username']).'\', '.$now.', \''.$db->escape($pun_user['g_color']).'\')') or error('Unable to insert into online list', __FILE__, __LINE__, $db->error());
                        break;
                }

Doesn't work. There's also a 2nd thing to do, what do I do with that?

Re: How do you...

#
#---------[ 36. FIND (line:78) ]---------------------------------------------------
#

$db->query('INSERT INTO '.$db->prefix.'online (user_id, ident, logged) VALUES('.$pun_user['id'].', \''.$db->escape($pun_user['username']).'\', '.$now.')') or error('Unable to insert into online list', __FILE__, __LINE__, $db->error());

#
#---------[ 37. REPLACE WITH ]---------------------------------------------------
#

$db->query('INSERT INTO '.$db->prefix.'online (user_id, ident, logged, color) VALUES('.$pun_user['id'].', \''.$db->escape($pun_user['username']).'\', '.$now.', \''.$db->escape($pun_user['g_color']).'\')') or error('Unable to insert into online list', __FILE__, __LINE__, $db->error());

#
#---------[ 38. FIND (line:118) ]---------------------------------------------------
#

$db->query('INSERT INTO '.$db->prefix.'online (user_id, ident, logged) VALUES(1, \''.$db->escape($remote_addr).'\', '.time().')') or error('Unable to insert into online list', __FILE__, __LINE__, $db->error());

#
#---------[ 39. REPLACE WITH ]---------------------------------------------------
#

$db->query('INSERT INTO '.$db->prefix.'online (user_id, ident, logged, color) VALUES(1, \''.$db->escape($remote_addr).'\', '.time().', \''.$pun_user['g_color'].'\')') or error('Unable to insert into online list', __FILE__, __LINE__, $db->error());

For that, you need to replace both the DB things under

            case 'mysql':
            case 'mysqli':

and

            default:
[img]http://i192.photobucket.com/albums/z314/avantgarde--/helplol.png[/img]

8 (edited by winger 2007-09-30 13:25)

Re: How do you...

The coloring works now, but not on the 'Online Today' List, is that possible? To make it colored in the online today list?

Re: How do you...

winger wrote:

The coloring works now, but not on the 'Online Today' List, is that possible? To make it colored in the online today list?

I'm sure it is, I just haven't figured out how.

[img]http://i192.photobucket.com/albums/z314/avantgarde--/helplol.png[/img]