Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Echtrae

Pages: [1]
1
Coding / Re: add user to additional member group
« on: September 28, 2008, 03:20:55 am »
I'm not saying that this is the only way to do this, but this is how I handled it.

	
function 
onUse()

	
{

	
	
global 
$db_prefix$ID_MEMBER$item_info;

	
	


	
	
$result db_query("SELECT additionalGroups

	
	
	
FROM 
{$db_prefix}members

	
	
	
WHERE ID_MEMBER = 
{$ID_MEMBER}"__FILE____LINE__);

	
	
$row mysql_fetch_assoc($result);

	
	
$groups explode(",",$row['additionalGroups']);

	
	
if(!
in_array($item_info[1],$groups))

	
	
{

	
	
	
if(
count($groups) > 1)

	
	
	
	
$groups[] = $item_info[1];

	
	
	
elseif((
count($groups) == 1) AND ($groups[0] != ""))

	
	
	
	
$groups[] = $item_info[1];

	
	
	
else

	
	
	
	
$groups[0] = $item_info[1];

	
	
	
	


	
	
	
$add_grps implode(",",$groups);

	
	
	
$result db_query("UPDATE {$db_prefix}members

	
	
	
	
SET additionalGroups = '
{$add_grps}'

	
	
	
	
WHERE ID_MEMBER = 
{$ID_MEMBER}"__FILE____LINE__);

	
	
}

	
	
return 
'Added Member Group!';

	
}



It seems to work so far.

2
Bugs / Post Related Issues
« on: September 21, 2008, 05:03:18 am »
I've found two bugs with this mod.

Bug #1: The name chosen for the credits don't show in the post side.  What shows is credit, instead of the unit chosen.

Bug #2: The mod still accrues credits even for boards that don't add to the post count.  This should at the very least be an option settable in the admin panel.

Pages: [1]