Page 10 of 11

Posted: Thu May 20, 2004 10:18 am
by grillish
yes, I have it running on phpBB 2.0.8. It works, but i had problems under the installation and had to edit the yellow-card txt-file i order to set it up.

My problem;
after installing YellowCard mod (the latest version), all users have 1-2 extra lines with 'air' under their username.
Does anyone know how to fix this minor problem?

Posted: Wed Jul 21, 2004 5:39 pm
by Lord 0f The Lanyards
in viewtopic is there a way to make it show the amount of warnings people have?

Posted: Wed Jul 21, 2004 10:03 pm
by Lord 0f The Lanyards
also is there a way i can link this mod to the jail mod by dr_dlp, like if they get 3 warnings they are banned for a week...

Posted: Tue Aug 24, 2004 1:52 pm
by Vamp
I have a yellow card 1.4.11 installed, but the cards not show.
I can only give cards by ACP
This is the code i changed.
Anyone can help me?
Sorry for my english

viewtopic.php

Code: Select all

#-----[ FIND ]------------------------------------------------ 
# 
$order_sql = ( 
# 
#-----[ IN-LINE FIND ]---------------------------------------- 
# 
f.auth_attachments

# 
#-----[ IN-LINE AFTER, ADD ]---------------------------------- 
# 
, f.auth_ban, f.auth_greencard, f.auth_bluecard  

##---[ MY CODE]------

, f.auth_attachments, f.auth_ban, f.auth_greencard, f.auth_bluecard  ORDER BY p.post_id ASC";


# 
#-----[ FIND ]------------------------------------------------ 
# 
$sql = "SELECT t.topic_id, t.topic_title

# 
#-----[ IN-LINE FIND ]---------------------------------------- 
# 
" . $count_sql

# 
#-----[ IN-LINE BEFORE, ADD ]--------------------------------- 
# 
, f.auth_ban, f.auth_greencard, f.auth_bluecard

##---[ MY CODE]------
 f.auth_attachments, f.auth_ban, f.auth_greencard, f.auth_bluecard" . $count_sql . "

# 
#-----[ FIND ]------------------------------------------------ 
# 
$sql = "SELECT u.username

# 
#-----[ IN-LINE FIND ]---------------------------------------- 
#
u.user_allowsmile

# 
#-----[ IN-LINE AFTER, ADD ]---------------------------------- 
#
, u.user_warnings, u.user_level

##---[ MY CODE]------
, u.user_allowsmile, u.user_warnings, u.user_level, u.user_level, u.user_ou_sig, u.user_ou_avatar, u.user_allow_viewonline,.....

# 
#-----[ FIND ]------------------------------------------------ 
# 
$s_auth_can .= ( ( $is_auth['auth_vote']

# 
#-----[ AFTER, ADD ]------------------------------------------ 
#
$s_auth_can .= ( $is_auth['auth_ban'] ) ? $lang['Rules_ban_can'] . "<br />" : ""; 
$s_auth_can .= ( $is_auth['auth_greencard'] ) ? $lang['Rules_greencard_can'] . "<br />" : ""; 
$s_auth_can .= ( $is_auth['auth_bluecard'] ) ? $lang['Rules_bluecard_can'] . "<br />" : ""; 

##---[ MY CODE]------
$s_auth_can .= ( ( $is_auth['auth_vote'] ) ? $lang['Rules_vote_can'] : $lang['Rules_vote_cannot'] ) . '<br />';
$s_auth_can .= ( $is_auth['auth_ban'] ) ? $lang['Rules_ban_can'] . "<br />" : ""; 
$s_auth_can .= ( $is_auth['auth_greencard'] ) ? $lang['Rules_greencard_can'] . "<br />" : ""; 
$s_auth_can .= ( $is_auth['auth_bluecard'] ) ? $lang['Rules_bluecard_can'] . "<br />" : ""; 
attach_build_auth_levels($is_auth, $s_auth_can);

# 
#-----[ FIND ]------------------------------------------------ 
# 
$delpost = '';
}
}

# 
#-----[ AFTER, ADD ]------------------------------------------ 
#
........

##---[ MY CODE]------
			$delpost_img = '';
			$delpost = '';
		}
	}
if($poster_id != ANONYMOUS && $postrow[$i]['user_level'] != ADMIN) 
{ 
	$current_user = str_replace("'","\'",$postrow[$i]['username']);
	if ($is_auth['auth_greencard']) 
	{ 
	      $g_card_img = ' <input type="image" name="unban" value="unban" onClick="return confirm(\''.sprintf($lang['Green_card_warning'],$current_user).'\')" src="'. $images['icon_g_card'] . '" alt="' . $lang['Give_G_card'] . '" >'; 
	} 
	else 
	{
		$g_card_img = ''; 
	}
	$user_warnings = $postrow[$i]['user_warnings'];
//	$card_img = ($user_warnings) ? (( $user_warnings < $board_config['max_user_bancard']) ? sprintf($lang['Warnings'], $user_warnings) : $lang['Banned'] ) : '';
// these lines will make a icon apear beside users post, if user have warnings or ar banned
// used instead of the previous line of code, witch shows the status as a text
//  ------ From here --- do not include this line
 $card_img = ($user_warnings) ? '<img src="'.(( $user_warnings < $board_config['max_user_bancard']) ? 
		$images['icon_y_card'] . '" alt="'. sprintf($lang['Warnings'], $user_warnings) .'">' : 
		$images['icon_r_card'] . '" alt="'. $lang['Banned'] .'">') : '';
//  ----- To this line --- Do not included this line
// 
// You may also included several images, instead of only one yellow, these lines below will produce several yellow images, depending on mumber of yellow cards
//  ------ From here --- do not include this line
$card_img = ($user_warnings >= $board_config['max_user_bancard'])  ? '<img src="'.$images['icon_r_card'] . '" alt="'. $lang['Banned'] .'">' : '';
for ($n=0 ; $n<$user_warnings && $user_warnings < $board_config['max_user_bancard'];$n++)
{
$card_img .= ($user_warnings) ? '<img src="'.(( $user_warnings < $board_config['max_user_bancard']) ? 
$images['icon_y_card'] . '" alt="'. sprintf($lang['Warnings'], $user_warnings) .'">' : 
$images['icon_r_card'] . '" alt="'. $lang['Banned'] .'">') : '';
}
//  ----- To this line --- Do not included this line

	if ($user_warnings<$board_config['max_user_bancard'] && $is_auth['auth_ban'] )
	{ 
		$y_card_img = ' <input type="image" name="warn" value="warn" onClick="return confirm(\''.sprintf($lang['Yellow_card_warning'],$current_user).'\')" src="'. $images['icon_y_card'] . '" alt="' . sprintf($lang['Give_Y_card'],$user_warnings+1) . '" >'; 
     		$r_card_img = ' <input type="image" name="ban" value="ban"  onClick="return confirm(\''.sprintf($lang['Red_card_warning'],$current_user).'\')" src="'. $images['icon_r_card'] . '" alt="' . $lang['Give_R_card'] . '" >'; 
	}
	else
	{
		$y_card_img = '';
		$r_card_img = ''; 
	} 
} else
{
	$card_img = '';
	$g_card_img = '';
	$y_card_img = '';
	$r_card_img = '';
}

	if ($is_auth['auth_bluecard']) 
	{ 
		if ($is_auth['auth_mod']) 
		{ 
			$b_card_img = (($postrow[$i]['post_bluecard'])) ? ' <input type="image" name="report_reset" value="report_reset" onClick="return confirm(\''.$lang['Clear_blue_card_warning'].'\')" src="'. $images['icon_bhot_card'] . '" alt="'. sprintf($lang['Clear_b_card'],$postrow[$i]['post_bluecard']) . '">':' <input type="image" name="report" value="report" onClick="return confirm(\''.$lang['Blue_card_warning'].'\')" src="'. $images['icon_b_card'] . '" alt="'. $lang['Give_b_card'] . '" >'; 
		} 
   		else 
		{ 
			$b_card_img = ' <input type="image" name="report" value="report" onClick="return confirm(\''.$lang['Blue_card_warning'].'\')" src="'. $images['icon_b_card'] . '" alt="'. $lang['Give_b_card'] . '" >';
			
   		}
	} else $b_card_img = '';

// parse hidden filds if cards visible
$card_hidden = ($g_card_img || $r_card_img || $y_card_img || $b_card_img) ? '<input type="hidden" name="post_id" value="'. $postrow[$i]['post_id'].'">' :'';


	$post_subject = ( $postrow[$i]['post_subject'] != '' ) ? $postrow[$i]['post_subject'] : '';

# 
#-----[ FIND ]------------------------------------------------ 
# 
'DELETE' =>

# 
#-----[ AFTER, ADD ]------------------------------------------ 
#

'USER_WARNINGS' => $user_warnings,
'CARD_IMG' => $card_img,
'CARD_HIDDEN_FIELDS' => $card_hidden,
'CARD_EXTRA_SPACE' => ($r_card_img || $y_card_img || $g_card_img || $b_card_img) ? ' ' : '',


##---[ MY CODE]------
		'DELETE_IMG' => $delpost_img,
		'DELETE' => $delpost,

		'USER_WARNINGS' => $user_warnings,
		'CARD_IMG' => $card_img,
		'CARD_HIDDEN_FIELDS' => $card_hidden,
		'CARD_EXTRA_SPACE' => ($r_card_img || $y_card_img || $g_card_img || $b_card_img) ? ' ' : '',

		'L_MINI_POST_ALT' => $mini_post_alt,

# 
#-----[ FIND ]------------------------------------------------ 
# 
'U_MINI_POST' =>

# 
#-----[ AFTER, ADD ]------------------------------------------ 
#
'U_G_CARD' => $g_card_img, 
'U_Y_CARD' => $y_card_img, 
'U_R_CARD' => $r_card_img, 
'U_B_CARD' => $b_card_img,
'S_CARD' => append_sid("card.".$phpEx),


##---[ MY CODE]------
		'U_MINI_POST' => $mini_post_url,
		'U_G_CARD' => $g_card_img, 
		'U_Y_CARD' => $y_card_img, 
		'U_R_CARD' => $r_card_img, 
		'U_B_CARD' => $b_card_img,
		'S_CARD' => append_sid("card.".$phpEx),

		'U_POST_ID' => $postrow[$i]['post_id'])


viewtopic_body.tpl

Code: Select all

# 
#-----[ FIND ]------------------------------------------------ 
# 
{postrow.POSTER_NAME}</b>

# 
#-----[ IN-LINE FIND ]------------------------------------------------ 
# 
{postrow.POSTER_NAME}</b>

# 
#-----[ IN-LINE AFTER, ADD]------------------------------------------- 
# 
<br />{postrow.CARD_IMG}

##---[ MY CODE]------
#
</a><b>{postrow.POSTER_NAME}</b><br />{postrow.CARD_IMG}</span><br />.....


# 
#-----[ FIND ]------------------------------------------------ 
# 
{postrow.U_MINI_POST}

# 
#-----[ BEFORE, ADD]------------------------------------------ 
#

<!-- Start add - Yellow card admin MOD -->
<form method="post" action="{postrow.S_CARD}">
<!-- End add - Yellow card admin MOD -->
# 
#-----[ FIND ]------------------------------------------------ 
# 
{postrow.U_MINI_POST}

# 
#-----[ BEFORE, ADD]------------------------------------------ 
#

<!-- Start add - Yellow card admin MOD -->
<form method="post" action="{postrow.S_CARD}">
<!-- End add - Yellow card admin MOD -->

# 
#-----[ FIND ]------------------------------------------------ 
# 
{postrow.IP_IMG} 

# 
#-----[ IN-LINE FIND ]---------------------------------------- 
# 
{postrow.IP_IMG} 

# 
#-----[ IN-LINE AFTER, ADD]----------------------------------- 
#
{postrow.U_R_CARD}{postrow.U_Y_CARD}{postrow.U_G_CARD}{postrow.U_B_CARD}{postrow.CARD_EXTRA_SPACE}{postrow.CARD_HIDDEN_FIELDS}

# 
#-----[ AFTER, ADD]------------------------------------------- 
#

<!-- Start add - Yellow card admin MOD -->
</form>
<!-- End add - Yellow card admin MOD -->


##---[ MY CODE]------
#
			<tr>
<!-- Start add - Yellow card admin MOD -->
<form method="post" action="{postrow.S_CARD}">
<!-- End add - Yellow card admin MOD -->
				<td width="100%"><a href="{postrow.U_MINI_POST}"><img src="{postrow.MINI_POST_IMG}" width="12" height="9" alt="{postrow.L_MINI_POST_ALT}" title="{postrow.L_MINI_POST_ALT}" border="0" /></a><span class="postdetails">{L_POSTED}: {postrow.POST_DATE}<span class="gen">&nbsp;</span>&nbsp; &nbsp;{L_POST_SUBJECT}: {postrow.POST_SUBJECT}</span></td>
				<td valign="top" nowrap="nowrap">{postrow.CARD_IMG} {postrow.QUOTE_IMG} {postrow.EDIT_IMG} {postrow.DELETE_IMG} {postrow.IP_IMG} {postrow.U_R_CARD}{postrow.U_Y_CARD}{postrow.U_G_CARD}{postrow.U_B_CARD}{postrow.CARD_EXTRA_SPACE}{postrow.CARD_HIDDEN_FIELDS}</td>
<!-- Start add - Yellow card admin MOD --> 
</form> 
<!-- End add - Yellow card admin MOD --> 
			</tr>


This is what´s happen.
Image

Posted: Mon Sep 27, 2004 3:40 pm
by Tiger8559
where can i download the latest version of this mod for phobb version 2.0.10?

Posted: Mon Nov 01, 2004 4:31 pm
by Bradman
Get it from Neils site, http://mods.db9.dk

I'm having a few problems with this mod also. When I had 2.0.4 the then current version of this mod worked perfectly. Now I have 2.0.10 and the current mod version and have a few problems. I'm not gonna waste time posting them here, unless of course someone who has it working is interested in chatting about it.

Posted: Mon Nov 22, 2004 1:21 pm
by ihrm
[deleted]

Posted: Wed Mar 16, 2005 9:30 am
by Blisk
where it shows up how many yellow card user have?

Posted: Fri Apr 22, 2005 4:16 pm
by fjl
Are the forum permissions the only ACP controls for this mod? Where can I set how many warnings a poster gets before being banned? Thsi mod works but I don't know if I was supposed to get some additional ACP menu for this mod. All I got was being able to decide who can ban and unban in the Forum Permissions ACP. Did I perhaps install this wrong?

Posted: Sun Apr 24, 2005 2:19 am
by fjl
How can I move the yellow cards from being above the avatar to the bottom like under the word "Location?"

Posted: Mon Apr 25, 2005 1:34 am
by UseLess
Greetings,

General settings for the mod are done in the general config section of the ACP, or where you select which forum the reports for posts being reported will be posted to.

Move the code you added to 'viewtopic_body.tpl' so it's below the location, just look for {L_LOCATION} or similar and put it below that.

Posted: Sat Apr 30, 2005 9:17 pm
by GruntsMilitary
Hello,

First of all, this is a fantastic mod and I'm using it actively in my own forum.

However, I would like to allow only ONE of my moderators to warn/ban members in my forum. I want to restrict this access from other moderators to keep things better organized and under control. Unfortunatley, it appears that once a user is set to "Is Moderator", they automatically have access to warn and ban members. Is there something I can edit to allow me to specify a single user rather than all moderators?

I know I could install a "junior admin" mod, but I'd like to avoid this if at all necessary.

Any help would be appreciated, thank you!

Posted: Tue May 17, 2005 5:04 pm
by Bull_UK
Hi,
I've tried posting this at Niels' web site but I get a debug error during the update of the search index so I'm trying here to see if anyone can help.

I've been messing with this for a good few hours and just can't work it out. All I want is to swap the blue card icon for some text such as "report post".

I've think found the area in vewtopic.php I need to be looking in

Code: Select all

	if ($is_auth['auth_bluecard']) 
	{ 
		if ($is_auth['auth_mod']) 
		{ 
			$b_card_img = (($postrow[$i]['post_bluecard'])) ? ' <input type="image" name="report_reset" value="report_reset" onClick="return confirm(\''.$lang['Clear_blue_card_warning'].'\')" src="'. $images['icon_bhot_card'] . '" alt="'. sprintf($lang['Clear_b_card'],$postrow[$i]['post_bluecard']) . '">':' <input type="image" name="report" value="report" onClick="return confirm(\''.$lang['Blue_card_warning'].'\')" src="'. $images['icon_b_card'] . '" alt="'. $lang['Give_b_card'] . '" >'; 
		} 
   		else 
		{ 
			$b_card_img = ' <input type="image" name="report" value="report" onClick="return confirm(\''.$lang['Blue_card_warning'].'\')" src="'. $images['icon_b_card'] . '" alt="'. $lang['Give_b_card'] . '" >';
			
   		}
	} else $b_card_img = '';
and I think I need something like

Code: Select all

if ($is_auth['auth_bluecard']) 
	{ 
		if ($is_auth['auth_mod']) 
		{ 
			$b_card_img = (($postrow[$i]['post_bluecard'])) ? ' <input type="image" name="report_reset" value="report_reset" onClick="return confirm(\''.$lang['Clear_blue_card_warning'].'\')" src="'. $images['icon_bhot_card'] . '" alt="'. sprintf($lang['Clear_b_card'],$postrow[$i]['post_bluecard']) . '">':' <input type="image" name="report" value="report" onClick="return confirm(\''.$lang['Blue_card_warning'].'\')" src="'. $images['icon_b_card'] . '" alt="'. $lang['Give_b_card'] . '" >'; 
		} 
   		else 
		{ 
			$b_card_img = ' <input type="WHAT HERE" name="report" value="report" onClick="return confirm(\''.$lang['Blue_card_warning'].'\') $lang['MY REPORT POST VARIABLE IN lamgmain.php']>';
			
   		}
	} else $b_card_img = '';

I feel like I'm really close but I cant quite finish it... can anyone help

Thanks in advance

Posted: Tue May 17, 2005 7:39 pm
by Dagon
The easy way is to open up an image editor, make an icon that says report post, and give it the same name as the blue card, and over write the existing blue card icon with it. Done deal. lol

Image

Posted: Wed May 18, 2005 9:15 am
by Bull_UK
Dagon wrote: The easy way is to open up an image editor, make an icon that says report post, and give it the same name as the blue card, and over write the existing blue card icon with it. Done deal. lol

Image


I was looking into doing that but I have 2 themes (the default subsilver and a dark version called subblack downloaded from here) and my graphical skills are awful so I figured it'd be easier just to use text and let css take care of colour matching. I've tried using the colour grab tool in photoshop to match the tones of the buttons already there but they never look right.

Basically my graphical skills are awful :roll: