PunBB Resource

Your ultimate PunBB resource!

Keywords:

    (Extended)

You are not logged in.


Login to move these ads to the bottom of the page

#1 2005-03-19 21:17:58

Mediator
Member
Registered: 2005-03-19
Posts: 56

Colored Usergroups 1.0.2

Code:

##
##
##        Mod title:  Usergroup Coloring 
##
##      Mod version:  1.0.2 
##   Works on PunBB:  1.2.3,1.2.4 
##     Release date:  3-18-05 
##           Author:  Caleb Champlin (Mediator) [med_mediator@hotmail.com] 
##
##      Description:  Adds coloring to the usernames of group members. 
##
##       Affects DB:  Yes 
##
##   Affected files:  index.php 
##                    userlist.php 
##                    admin_groups.php 
##                    extern.php 
##                    viewtopic.php 
##                    include/functions.php 
##                    profile.php 
##
##            Notes:        None     
##
##     Generated By:  Auto Read-Me(by Caleb Champlin) - http://www.rscheatnet.com/Auto_Readme.zip
##
##       DISCLAIMER:  Please note that 'mods' are not officially supported by
##                    PunBB. Installation of this modification is done at your
##                    own risk. Backup your forum database and any and all
##                    applicable files before proceeding.
##

Download here

Offline

 

#2 2005-04-08 14:31:59

Antz
Guest

Re: Colored Usergroups 1.0.2

This looks nice but im not really sure when it says to upload it, how would i do that, im newb to this stuff

Thanks alot if you can help

 

#3 2005-04-21 19:52:26

bamfan28
New member
Registered: 2005-04-21
Posts: 2

Re: Colored Usergroups 1.0.2

how come ya have to pay for it? :( how come it cant be free, cause that would be so cool.

Offline

 

#4 2005-04-21 23:14:44

Connorhd
Member
Registered: 2005-01-15
Posts: 202

Re: Colored Usergroups 1.0.2

where does it say you have to pay for it?

Offline

 

#5 2005-04-22 13:38:43

Mediator
Member
Registered: 2005-03-19
Posts: 56

Re: Colored Usergroups 1.0.2

All my modifications are free...

Offline

 

#6 2005-04-22 15:25:46

gizzmo
Member
From: Earth, Milkyway Galaxy
Registered: 2004-08-04
Posts: 266

Re: Colored Usergroups 1.0.2

all modifications should be free, cuz it a mod for a free script. if they wana sell it tham make your own script and not a mod


Gizzmo

Offline

 

#7 2005-11-20 22:01:48

programming-designs
Member
Registered: 2005-11-20
Posts: 32
Website

Re: Colored Usergroups 1.0.2

Does this script work with the latest version of PunBB?

Offline

 

#8 2005-11-21 10:26:50

Mark
Moderator
From: North West England
Registered: 2005-06-06
Posts: 1252
Website

Re: Colored Usergroups 1.0.2

yes.


Cant find something you want? try searching
Also try the wiki
MSN - mark@21s6.com

Offline

 

#9 2006-05-01 00:42:08

ShadeX
Member
Registered: 2006-04-30
Posts: 14

Re: Colored Usergroups 1.0.2

i guess that this doesnt work on version 1.2.11 hmm can somebody remake that?

Offline

 

#10 2006-05-01 04:56:28

ShadeX
Member
Registered: 2006-04-30
Posts: 14

Re: Colored Usergroups 1.0.2

i've added to install_mod.php the 1.2.11 version, and when i want to install it, it shows me an error:

Code:

File: /var/www/virtual/darknetteam.cba.pl/forum.darknetteam.cba.pl/install_mod.php
Line: 24

PunBB reported: Unable to add column "g_color" to table

Database reported: SQL logic error or missing database (Errno: 1)

why? and what can i do with it?

Offline

 

#11 2006-05-01 05:01:20

elbekko
Moderator
From: Leuven, Belgium
Registered: 2006-01-31
Posts: 1422

Re: Colored Usergroups 1.0.2

What's the query in install_mod.php?


FluxBB
dictionary.com on programming: The most fun you can have with your clothes on (although clothes are not mandatory).

Offline

 

#12 2006-05-01 05:03:18

ShadeX
Member
Registered: 2006-04-30
Posts: 14

Re: Colored Usergroups 1.0.2

u mean this?

Code:

function install()
{
    global $db, $db_type, $pun_config;


    $db->query("ALTER TABLE ".$db->prefix."groups ADD g_color VARCHAR(10) NOT NULL") or error('Unable to add column "g_color" to table', __FILE__, __LINE__, $db->error());
    $db->query("ALTER TABLE ".$db->prefix."online ADD color VARCHAR(10) NOT NULL") or error('Unable to add column "color" to table', __FILE__, __LINE__, $db->error());


    $db->close();
}

i'm a newb in this and i dont know what r u talkin about big_smile

Offline

 

#13 2006-05-01 05:12:14

elbekko
Moderator
From: Leuven, Belgium
Registered: 2006-01-31
Posts: 1422

Re: Colored Usergroups 1.0.2

It should work =/ Make sure the column isn't already in the DB


FluxBB
dictionary.com on programming: The most fun you can have with your clothes on (although clothes are not mandatory).

Offline

 

#14 2006-05-01 05:15:54

ShadeX
Member
Registered: 2006-04-30
Posts: 14

Re: Colored Usergroups 1.0.2

i dont have acces to my DB hmm i cant check it...
i dont know why it doesnt work.. i must run install_mod first or i must first do the other things? (such as replace something..)

sorry for my english smile

Offline

 

#15 2006-05-09 08:18:15

skoruppa
Member
Registered: 2005-10-18
Posts: 25

Re: Colored Usergroups 1.0.2

not working on index page but working on viewtopic and userlist

Last edited by skoruppa (2006-05-09 08:18:25)

Offline

 

#16 2006-05-14 13:42:27

hardcase
Member
Registered: 2006-05-08
Posts: 11

Re: Colored Usergroups 1.0.2

yeah, that's right. only works on userlist and viewtopic..

Offline

 

#17 2006-05-14 13:43:27

hardcase
Member
Registered: 2006-05-08
Posts: 11

Re: Colored Usergroups 1.0.2

Is there any chance of fixing it Mediator?

Offline

 

#18 2006-05-15 07:00:42

Mediator
Member
Registered: 2005-03-19
Posts: 56

Re: Colored Usergroups 1.0.2

This is a terrible time to ask me todo anything coding wise, not only have I vowed to not work on any mods (Except for security fixes) until 1.3 comes out, I have finals all this week so I am going to be pretty busy. If I have some freetime I'll take a look.

Offline

 

#19 2006-05-21 06:36:06

coxis
Member
Registered: 2006-01-18
Posts: 15

Re: Colored Usergroups 1.0.2

I don't know, i've been installing this for some time (some many changes) and then nothing, nothing changed on 1.2.10 with manually upgrades to 1.2.11 sad

Offline

 

#20 2006-06-22 13:39:10

nicolas2k10
Member
Registered: 2006-06-14
Posts: 25

Re: Colored Usergroups 1.0.2

For to show current color of group (the field will be colored in background), just replace in step 6 this line :

Code:

<input type="text" name="group_color" size="9" maxlength="7" value="<?php echo $group['g_color'] ?>" tabindex="25" />

by this line :

Code:

<input type="text" name="group_color" size="9" maxlength="7" value="<?php echo $group['g_color'] ?>" tabindex="25" style="background-color: <?php echo $group['g_color'] ?>" />

(just "style" added).

wink

Offline

 

#21 2006-07-04 06:20:29

Laffo
Guest

Re: Colored Usergroups 1.0.2

I've been playing around trying to get the coloured names to appear on the index.

On index.php, around line 42 change the sql code to:

Code:

// Print the categories and forums
$result = $db->query('SELECT c.id AS cid, c.cat_name, f.id AS fid, f.forum_name, f.forum_desc, f.redirect_url, f.moderators, f.num_topics, f.num_posts, f.last_post, f.last_post_id, f.last_poster, '.$db->prefix.'groups.g_color AS color FROM '.$db->prefix.'categories AS c INNER JOIN '.$db->prefix.'forums AS f ON c.id=f.cat_id LEFT JOIN '.$db->prefix.'forum_perms AS fp ON (fp.forum_id=f.id AND fp.group_id='.$pun_user['g_id'].') Left Join '.$db->prefix.'users ON '.$db->prefix.'users.username = f.last_poster
Left Join '.$db->prefix.'groups ON '.$db->prefix.'users.group_id = '.$db->prefix.'groups.g_id WHERE fp.read_forum IS NULL OR fp.read_forum=1 ORDER BY c.disp_position, c.id, f.disp_position', __FILE__, __LINE__, $db->error());

then make line 112 like:

Code:

$last_post = '<a href="'.makeurl("p", $cur_forum['last_post_id'], format_time($cur_forum['last_post'])).'#p'.$cur_forum['last_post_id'].'">'.format_time($cur_forum['last_post']).'</a> <span class="byuser">'.$lang_common['by'].' <span  style="color:'.$cur_forum['color'].'">'.pun_htmlspecialchars($cur_forum['last_poster']).'</span></span>';

Just playing around with viewforum now

 

#22 2006-07-28 06:46:27

tomfluff
New member
Registered: 2006-07-27
Posts: 3

Re: Colored Usergroups 1.0.2

there seems to be an error with this query

Code:

$result = $db->query('SELECT user_id, ident, color FROM '.$db->prefix.'online WHERE idle=0 ORDER BY ident', true) or error('Unable to fetch online list', __FILE__, __LINE__, $db->error());

or this line

Code:

$users[] = '<a href="'.$pun_config['o_base_url'].'/profile.php?id='.$pun_user_online['user_id'].'"><span style="color: '.$pun_user_online['color'].'">'.pun_htmlspecialchars($pun_user_online['ident']).'</span></a>';

in extern.php because the color is not showing up the parsed source reads:

Code:

<span style="">TomFluff</span>

there is no value in the style element?

i have tried fiddling around but it didn't seem to work, maybe the query is wrong?

Offline

 

#23 2006-10-21 08:03:49

ricketh?
Member
From: England
Registered: 2006-09-17
Posts: 38
Website

Re: Colored Usergroups 1.0.2

Has anybody found a fix to showing the colours in all the places they don't already show?

Offline

 

#24 2006-10-21 08:24:41

Mark
Moderator
From: North West England
Registered: 2005-06-06
Posts: 1252
Website

Re: Colored Usergroups 1.0.2

what places dont they show?


Cant find something you want? try searching
Also try the wiki
MSN - mark@21s6.com

Offline

 

#25 2007-01-19 05:31:39

Zimmer92
Member
Registered: 2006-08-01
Posts: 166

Re: Colored Usergroups 1.0.2

Means that you already ran install_mod.php, just upload all the files you have to edit and you should be fine.
If not, open up Install_mod.php and add in the array of versions it should work on

Code:

, '1.2.14'

Offline

 

Board footer

Based on PunBB
© Copyright 2002–2005 Rickard Andersson

© Copyright 2004–2006 Kristoffer Jansson

User contributed files are property of their respective owners.