[BETA]Black Card Mod (Addon for Yellow Card Mod)

A place for MOD Authors to post and receive feedback on MODs still in development. No MODs within this forum should be used within a live environment! No new topics are allowed in this forum.
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

IMPORTANT: MOD Development Forum rules

On February 1, 2009 this forum will be set to read only as part of retiring of phpBB2.

[BETA]Black Card Mod (Addon for Yellow Card Mod)

Postby DVX_Rune » Thu May 15, 2003 6:28 am

[BETA]Black Card Mod (Addon for Yellow Card Mod)

This is an ADDON for the Yellow card mod. This adds a fifth card - the black card. The black card has it's own permissions settings that can be set so that users have a "vote to ban" against any offending users. Once clicked, the banner's user_id is recorded along with the user_id of the poster they're voting to ban (this way they can vote once and only once against a certain poster). When the admin-set black card limit is reached by any offending poster, they're automatically added to the banlist (banned). Admin are exempt from being voted against. ;)

Love to get some help finding any bugs that are (probably) in there so anyone that has the yellowcard mod installed, give this one a try. If you don't have the yellowcard mod installed ... that'd be quite a bit of work to install 'em both ... but it'd be appreciated. :lol: There's no MySQL installer yet. I'm fairly new to this and I use MySQL-Front to do database changes (read: I'm a wuss) ... so if I wrote a db installer I'd probably screw up your database. 8O So maybe you should just do it manualy for the time being. :oops:

This is my first mod, so ... be gentle. :cry:

;)

black_card.zip

P.S. Thanks Niels for the original Yellow Card mod and to Netclectic for helping me with that last code hurdle. ;)
Last edited by DVX_Rune on Fri Nov 04, 2005 1:01 am, edited 1 time in total.
DVX_Rune
Registered User
 
Posts: 124
Joined: Tue Jul 30, 2002 3:49 am

Postby DVX_Rune » Thu May 15, 2003 6:40 am

P.S. I plan on making a stand-alone "Vote to Ban" mod in the (hopefully near) future that'll put a "Vote to Ban" button in the View Profile screen instead. But one car wreck at a time. :lol:
DVX_Rune
Registered User
 
Posts: 124
Joined: Tue Jul 30, 2002 3:49 am

Postby Antony » Thu May 15, 2003 10:01 am

Does this mean on large boards big groups of people will just ban everyone? :roll:
Antony
Registered User
 
Posts: 529
Joined: Wed Feb 12, 2003 9:06 am

Postby DVX_Rune » Thu May 15, 2003 1:54 pm

Does this mean on large boards big groups of people will just ban everyone? :roll:

This isn't the "I get picked last for gym class kickball" mod. :roll:

The admin sets the limit - if you want to set the banvote limit to 10 on a 500 member board ... sure, that's exactly what you're going to get - a group of people being elitists. :roll: Personally I have mine set to 30 votes of the 59 members (and keep in mind that's over half the members ... even the ones that are never around anymore, so getting 30 banvotes is going to take 30 seriously p'd off people and more than just a "clique" of people). Set it to 99/100 if you want so that the whole board minus the one being voted against has to unanimously vote to ban.

But if you have 99 out of 100 members voting to ban someone ... either that person deserves to be banned, or your forum is filled 99% with jerks. This mod doesn't provide for elitist groups unless the admin sets it that way.

Also, to prevent "voting with the crowd", there's no way to see that someone has any banvotes against them unless you place one against them (or unless you're the one being voted against). I want people to banvote when they feel it's warranted, not just because others did. This mod doesn't magically turn your memebers into a pitchfork and torch toting mob unless they're like that already. And if they are - with the mod they'd gang up and ban someone, without the mod they'd gang up and harrass someone. That's a member problem, not a mod flaw. And to fix/prevent that, you can either warn your members about such actions and/or set the banvote limit high.
DVX_Rune
Registered User
 
Posts: 124
Joined: Tue Jul 30, 2002 3:49 am

Postby netclectic » Thu May 15, 2003 2:36 pm

I suppose it could make quite an interesting game if you set it low and let battle commence! :P

You could do it once a month or something, see who's left at the end, clear out the ban list and start again. :)
Defend the game:
Image
User avatar
netclectic
Former Team Member
 
Posts: 4439
Joined: Wed Mar 13, 2002 3:08 pm
Location: Omnipresent

Postby DVX_Rune » Thu May 15, 2003 2:41 pm

heh ... make it forum specific and have a "Survivor" forum. ;)


Actually that probably wouldn't be that much more difficult. Add EVERYONE to a "group", give that group private access to a forum, then when someone votes they don't get banned, just removed from that group. Maybe I'll make that an "extra feature" of the stand-alone version. :lol:
DVX_Rune
Registered User
 
Posts: 124
Joined: Tue Jul 30, 2002 3:49 am

Postby netclectic » Thu May 15, 2003 2:50 pm

Sounds like a plan ;)
Defend the game:
Image
User avatar
netclectic
Former Team Member
 
Posts: 4439
Joined: Wed Mar 13, 2002 3:08 pm
Location: Omnipresent

Postby DVX_Rune » Fri May 16, 2003 12:13 am

Being the nice guy that I am 8) :wink: ... I consolidated the install instructions for those that have neither mod and want to install both. This way you don't have to open the same file 2 or 3 times to add one more line each time:

yellow_and_black_card_mods_combo.txt
Last edited by DVX_Rune on Fri Nov 04, 2005 1:02 am, edited 2 times in total.
DVX_Rune
Registered User
 
Posts: 124
Joined: Tue Jul 30, 2002 3:49 am

Postby vze3k59w » Fri May 16, 2003 12:53 am

cause i just kick ass, im gonna make an install script for all you mysql noobs :wink:
User avatar
vze3k59w
Registered User
 
Posts: 485
Joined: Fri May 09, 2003 1:09 am

Postby DVX_Rune » Fri May 16, 2003 12:59 am

Image

Image
DVX_Rune
Registered User
 
Posts: 124
Joined: Tue Jul 30, 2002 3:49 am

Postby PHPbuddy » Fri May 16, 2003 10:14 pm

nice mod....
~~~Hi~~~
PHPbuddy
Registered User
 
Posts: 136
Joined: Sat Oct 12, 2002 1:32 pm

Postby DVX_Rune » Sun May 18, 2003 5:46 am

thanks! 8O :D
DVX_Rune
Registered User
 
Posts: 124
Joined: Tue Jul 30, 2002 3:49 am

Postby DVX_Rune » Thu May 22, 2003 4:58 pm

update:

1) changed card.php changes - commented out the email notification.
ie. now the default is that no message is sent to the one being banvoted alerting them to the vote. ...
Update:
Code: Select all
#
#-----[ OPEN ]------------------------------------------
#
card.php

#
#-----[ FIND ]------------------------------------------
#
         $e_temp="ban_votewarning";
         $e_subj=$lang['Ban_votewarning'];

#
#-----[ REPLACE WITH ]------------------------------------------
#
// uncomment these next two lines to allow an email notification to be sent to the one voted against
//            $e_temp="ban_votewarning";
//            $e_subj=$lang['Ban_votewarning'];



2) inserted a check to disallow self-banvoting.
ie. you can no longer place a banvote against yourself.
Update:
Code: Select all
#
#-----[ OPEN ]------------------------------------------
#
card.php

#
#-----[ FIND ]------------------------------------------
#
      //check for previous banvote against THIS poster by THIS user
#
#-----[ BEFORE, ADD ]------------------------------------------
#
   if ( $userdata['user_id']==$poster_id )
   {
         $message = $lang['BanVote_self'];
         $message .= '<br /><br />' . sprintf($lang['Click_return_topic'], '<a href="javascript:history.back(1)">', '</a>');
         message_die(GENERAL_MESSAGE, $message);
   } else
   {
   
#
#-----[ FIND ]------------------------------------------
#
}

if ( $mode == 'block' )
#
#-----[ BEFORE, ADD ]------------------------------------------
#
   }

3) Rephrased ban_votewarning.tpl email file to not include banvoter's name.
Update:
REPLACE OLD language\lang_english\email\ban_votewarning.tpl file with new one or ...
Code: Select all
#
#-----[ OPEN ]------------------------------------------
#
language\lang_english\email\ban_votewarning.tpl
#
#-----[ FIND ]------------------------------------------
#
Hello, {WARNED_POSTER}

Your account on {SITENAME} has recived a ban vote.
You have now a total of {BAN_VOTEWARNINGS} ban votes, if you somehow receive more than {max_user_votebancard} your account will be blocked.

The reasons for this are numerous, this warning is received because of this post:
{POST_URL}
that you made.

Here are a reminder of some of the terms you accepted when you registered, we kindly ask you to respect them in the future

Quote:
"You agree not to post any abusive, obscene, vulgar, slanderous, hateful, threatening, sexually-orientated or any other material that may violate any applicable laws. Doing so may lead to you being immediately and permanently banned"

If you don't see why you've recived this warning you could try contact {WARNER}, who gave the warning, explaining your post,
and that you don't understand why this warning is given.


{EMAIL_SIG} 
#
#-----[ REPLACE WITH ]------------------------------------------
#
Hello, {WARNED_POSTER}

Your account on {SITENAME} has recived a ban vote.
You have now a total of {VOTEBANWARNINGS} ban votes, if you somehow receive more than {TOTAL_VOTEBANWARN} your account will be blocked.

The reasons for this are numerous, but this ban vote was issued from this post:
{POST_URL}
that you made, but this may or may not be the reason behind the banvote.

This vote does not reflect the opinions or views of the administrators or moderators of this forum unless of course they were the one to personally place the banvote themselves (though generally speaking, you would receive a warning or be straight-out banned by these people, not receive a banvote).

{EMAIL_SIG} 
DVX_Rune
Registered User
 
Posts: 124
Joined: Tue Jul 30, 2002 3:49 am

Postby DVX_Rune » Thu May 22, 2003 5:19 pm

DOH!

Also added instructions to the INSTALL.TXT file to cover the language\lang_english\lang_main.php changes that I had previously omitted from the instructions. :x

Code: Select all
#
#-----[ OPEN ]------------------------------------------
#
#    (make sure to edit this file for every language your admin uses).
language/lang_english/lang_main.php

#
#-----[ FIND ]------------------------------------------
#
// That's all Folks!
// -------------------------------------------------

#
#-----[ BEFORE, ADD ]------------------------------------------
#
$lang['Give_BK_card']='Vote to ban this user';
$lang['Already_banvoted'] = 'You have already placed a banvote against this member!';
$lang['Ban_update_black'] = 'The user has recieved a ban vote, and has now a total of %d votes of a maximum %d votes';
$lang['Ban_votewarning'] = 'You\'ve recieved a ban vote';
$lang['user_already_banned'] = 'The selected user is already banned';
$lang['Black_card_warning'] = 'You are about to give the user:%s a black card, this will issue a vote to ban the user, are you sure ?';
$lang['VoteWarnings'] = 'Ban Votes : %d'; //shown beside users post, if any ban votes given to the user
$lang['BanVote_self'] = 'You can not vote to ban yourself<BR>Obviously you have unresolved issues';

DVX_Rune
Registered User
 
Posts: 124
Joined: Tue Jul 30, 2002 3:49 am

Postby Carpe Diem » Mon May 26, 2003 3:53 pm

Thank you, very nice idea!
One question... are all these updates included in the downloadable file? I have not downloaded or installed anything yet...

Thx in advance.
User avatar
Carpe Diem
Registered User
 
Posts: 580
Joined: Tue Dec 10, 2002 11:19 pm

Next

Return to [2.0.x] MODs in Development

Who is online

Users browsing this forum: No registered users and 8 guests