Your ultimate PunBB resource!
You are not logged in.
## ## ## 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. ##
Offline
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
how come ya have to pay for it? :( how come it cant be free, cause that would be so cool.
Offline
where does it say you have to pay for it?
Offline
All my modifications are free...
Offline
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
Offline
Does this script work with the latest version of PunBB?
Offline
i guess that this doesnt work on version 1.2.11
can somebody remake that?
Offline
i've added to install_mod.php the 1.2.11 version, and when i want to install it, it shows me an error:
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
u mean this?
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 ![]()
Offline
i dont have acces to my DB
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 ![]()
Offline
not working on index page but working on viewtopic and userlist
Last edited by skoruppa (2006-05-09 08:18:25)
Offline
yeah, that's right. only works on userlist and viewtopic..
Offline
Is there any chance of fixing it Mediator?
Offline
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
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 ![]()
Offline
For to show current color of group (the field will be colored in background), just replace in step 6 this line :
<input type="text" name="group_color" size="9" maxlength="7" value="<?php echo $group['g_color'] ?>" tabindex="25" />
by this line :
<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).![]()
Offline
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:
// 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:
$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
there seems to be an error with this query
$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
$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:
<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
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
, '1.2.14'
Offline