PDA

View Full Version : Site Improvements for Forum Mafia.



SuperJack
February 29th, 2016, 05:18 AM
Just want to list a few suggestions that would improve our forum mafia games.
Any ideas?

Vote counter: A tool, added to posts. Counting the current vote count up to that post.

Player Vote tool: A tool which collects a list of all votes made by that player or made on that player.

Game clock: A clock built into the site, that on a forum mafia game, will countdown to the day/night end. [So it's easily views on any page]

ISO tool: A tool that let's you easily gather all of a players posts for a topic page. So it's easily viewable and portable.

Night chats/dead chats: some form of easy way to crate night chats or dead chats on the forum without having to use external websites.

Cryptonic
February 29th, 2016, 06:31 AM
OK to all if you can do em, except night/dead chat is unreasonable

SuperJack
February 29th, 2016, 10:13 AM
OK to all if you can do em, except night/dead chat is unreasonable

If there was a simpler way to make and use them. Would be nice.

Cryptonic
February 29th, 2016, 10:18 AM
If there was a simpler way to make and use them. Would be nice.

It's way more simple to make a QT than to have to set permissions over and over.

But I do like the other ideas. Would be handy in a game.

SuperJack
February 29th, 2016, 10:31 AM
It's way more simple to make a QT than to have to set permissions over and over.

But I do like the other ideas. Would be handy in a game.

True. But switching the websites is that little irritation that gets to me.

SuperJack
February 29th, 2016, 10:40 AM
The idea is to get a group of these ideas.
Then make this public.

And the next step is finding someone who can do it.

May require a fundraiser, for a new license and maybe to pay a freelancer coder to implement them.

So basically:
1. Initial Plan and suggestions.
2. Public plan and suggestions.
3. Fundraiser if needed.

Cryptonic
February 29th, 2016, 10:42 AM
True. But switching the websites is that little irritation that gets to me.

Yea, I fully agree.

Hmm, maybe there is a plugin that would allow there to be more highly-private groups, where you can only see the content if you're invited to the group. Although, admin+smod would be able to see them still, so not sure if that could work. Hmmm

Cryptonic
February 29th, 2016, 10:44 AM
We could also make some Subforums that are password-restricted, and just change the password for each M-FM, S-FM. Then give Password to host and they can give it out as needed.

That's a lot easier than changing permissions every game, just gotta change the password.

Con could be that it might clutter board, but I would give it all away in a smaller subforum so it stays hidden from the main page.

SuperJack
February 29th, 2016, 11:09 AM
I don't know how capable vbullitin is. But even if vbullitin has no way around it, I'm sure there would be some way to fix something.

Firebringer
February 29th, 2016, 11:21 AM
Just want to list a few suggestions that would improve our forum mafia games.
Any ideas?

Vote counter: A tool, added to posts. Counting the current vote count up to that post.

Player Vote tool: A tool which collects a list of all votes made by that player or made on that player.

Game clock: A clock built into the site, that on a forum mafia game, will countdown to the day/night end. [So it's easily views on any page]

ISO tool: A tool that let's you easily gather all of a players posts for a topic page. So it's easily viewable and portable.

Night chats/dead chats: some form of easy way to crate night chats or dead chats on the forum without having to use external websites.

1) Yes, definitely would be nice for VCA.

2) Perhaps also showing what post they voted who and when the vote changed. If this somehow also showed day/night that would be awesome but might make it complicated.

3) Yes!!!!! I hate Alphaomega shit or w/e everyone uses. If we can get this to also link to game so it locks game at end of days that would be awesome too.

4) Some added features to an ISO tool would obviously be:
Full posts of players, not fragments.
Last activity of player, showing when last time they voted.
Highlighting players dead/replaced. This might be impractical don't know.

5) would be nice, but I don't think we will be getting this in near future.

Brendan
February 29th, 2016, 11:49 AM
Oops could probably do all of these in a couple of weeks or really a few days if he wanted to. Ask him nicely.

Cryptonic
February 29th, 2016, 11:54 AM
Oops could probably do all of these in a couple of weeks or really a few days if he wanted to. Ask him nicely.

Yes, Oops is great at that kind of stuff on this site. Pay him monies, too. USD goes a long way vs the Canadian peso.

Firebringer
February 29th, 2016, 12:08 PM
If we could also fix multiquoting so that it doesn't add those to your post each and everytime you post. THat would be great too.

Cryptonic
February 29th, 2016, 12:14 PM
If we could also fix multiquoting so that it doesn't add those to your post each and everytime you post. THat would be great too.

absolutely not

Firebringer
February 29th, 2016, 12:15 PM
absolutely not

why?

Cryptonic
February 29th, 2016, 12:25 PM
why?

cause then I would lose the ability to laugh @ people failing multi-quotes

Multi-quote isn't a quick post tool, should clear the cookies automatically when you do full reply to thread.

But obviously I am being sarcastic, would be nice if quick reply cleared the cookies as well.

Orpz
February 29th, 2016, 04:52 PM
I like these ideas, but I'm not sure you'd be able to get money for a freelancer coder. Our best bet is to ask oops or Glip to code it in. I think Oops did the current vote counter, and it's really good.

Helz
February 29th, 2016, 04:59 PM
I really love the idea of attaching a post counter to games. It is such a huge pain in the ass to go through an entire game and quantify players activity level. Creating that would help get rid of the lurk to win nonsense that poisons some games.

Also to create a separate section for the dead chats it could be done pretty simply. We could just create a side url for it outside of our VBullitin but still under our domain and attach some kind of simple forum to it while not listing created threads. Then you will have to know the URL to access the thread and nobody will every have to touch any permissions. Pretty much the same as we currently do with other web sights. It might have a few vulnerabilities to a person who is smart enough though..

I would also suggest that most of these things already exist. I bet its just a matter of finding it and addressing bugs.

Brendan
March 1st, 2016, 12:24 PM
Moved to Site Discussion

Orpz
March 1st, 2016, 12:26 PM
I think a tagging tool would be very beneficial as well.

For example, @Brendan would send Brendan an alert saying he was mentioned in this post.

Cryptonic
March 1st, 2016, 12:31 PM
I think a tagging tool would be very beneficial as well.

For example, @Brendan would send Brendan an alert saying he was mentioned in this post.

There are several plugins for this already for vb4

Like this one: https://www.vbulletin.org/forum/showthread.php?t=242733

Sen
March 1st, 2016, 03:26 PM
I have an ISO script, although it fails to catch some users whose names don't follow the same format as most of the others. Still, should be an easy fix, and the issue only exists because I've been too lazy to work on it.
I'll see if I can get myself to spend an hour tweaking it during the week.
http://i.imgur.com/MmPtAQf.png

A Player Vote tool was something I was considering working on, but never got to it. It would basically be a matter of requesting each page of the thread and looking for vote tags, then simply checking for the author of said post. Then you'd save the information and the last post checked in a cookie to avoid having to send unnecessary requests on future checks. Something like that.

Whatever the case, having a built-in tool which automatically does the things you mention would be nice.

Helz
March 2nd, 2016, 03:01 PM
The best tool I have seen is the one Mafia Universe uses. It lets you request an automated post that shows votes, posts in that game and time left. The real benifit of it is that its tagged into the thread so you can go back and reference it later.

ika
March 2nd, 2016, 11:38 PM
can you uploard that plugin to somethign so i can download it sen?

Sen
March 3rd, 2016, 12:34 AM
can you uploard that plugin to somethign so i can download it sen?


// ==UserScript==
// @name Mafia Filter
// @icon http://www.sc2mafia.com/forum/favicon.ico
// @description ♥
// @namespace SmVzdXMgd2FzIGEgZnVja2luZyB6b21iaWUu
// @include http://www.sc2mafia.com/forum/showthread.php/*
// @version 1.6.6
// @run-at document-end
// @grant none
// ==/UserScript==

var
names = [],
posts = document.getElementsByClassName( 'postcontainer' ),
postCount = posts.length,
users = getUsersFrom( posts );

names.sort( function(a, b){ return a.toLowerCase().localeCompare( b.toLowerCase() ); } );
addMenu();

function addMenu() {
var menu = document.createElement( 'li' );

menu.innerHTML = '<h6><a class="popupctrl" href="javascript:void(0);">Filter</a></h6></li>';
menu.addEventListener( 'click', showMenu, false );
menu.setAttribute( 'class', 'popupmenu' );
menu.setAttribute( 'id', 'filtergmenu' );
document.getElementById( 'votecounter' ).parentNode.insertBefore( menu, document.getElementById( 'votecounter' ) );
menu.appendChild( createMenu() );
}

function showMenu( event ) {
if( document.getElementById( 'hidemenu' ).style.display === 'block' )
document.getElementById( 'hidemenu' ).style.display = 'none';
else
document.getElementById( 'hidemenu' ).setAttribute( 'style', "display : block; left : -37px; top : -126px;" ); // POSITION
}

function hideMenu( event ) {
document.getElementById( 'hidemenu' ).setAttribute( 'style', "display : none" );
}

function selectUser( user ){
var current = -1;
while( ++current < postCount )
posts[ current ].style.display = '';
var name = names[ user ];
current = -1;
while( ++current < postCount)
if( posts[ current ].innerHTML.indexOf( '<span class="' + users[ name ] + '>' + name + '<' ) == -1 )
posts[ current ].style.display= 'none';
}

function showAll() {
var current = -1;
while( ++current < postCount )
posts[ current ].style.display = '';
}

function search() {
var
user = prompt ( 'Enter username (case sensitive).' ),
current = -1;

if( user == null )
return;
while( ++current < postCount)
if( posts[ current ].innerHTML.indexOf( '>' + user + '</span>' ) == -1)
posts[ current ].style.display = 'none';
}

function createMenu() {
var
totalNames = names.length,
current = -1,
u = document.createElement( 'ul' ),
l = document.createElement( 'li' ),
a = document.createElement( 'a' ),
t = document.createTextNode( 'ALL' );

u.setAttribute( 'class', 'popupbody' );
u.setAttribute( 'id', 'hidemenu' );
u.setAttribute( 'style', 'display : none;' );
a.setAttribute( 'style', 'text-align : center; color : #00ff00;' );
a.setAttribute( 'href', 'javascript: void( 0 );' );
a.addEventListener( 'click', showAll, false );
a.appendChild( t );
l.appendChild( a );
u.appendChild( l );
l = document.createElement( 'li' );
a = document.createElement( 'a' );
a.setAttribute( 'style', 'text-align : center; color : #ffff00;' );
a.setAttribute( 'href', 'javascript: void( 0 );' );
a.addEventListener( 'click', search, false );
t = document.createTextNode( 'Other' );
a.appendChild( t );
l.appendChild( a );
u.appendChild( l );
while( ++current < totalNames ) {
l = document.createElement( 'li' );
a = document.createElement( 'a' );
a.setAttribute( 'style', 'text-align : center;' );
a.setAttribute( 'href', 'javascript: void( 0 );' );
a.addEventListener( 'click', ( function( I ) { return function() { selectUser( I ) }; } )( current ), false);
t = document.createTextNode( names[ current ] );
a.appendChild( t );
l.appendChild( a );
u.appendChild( l );
}
return u;
}


function getUsersFrom( data ) {
var
u = { },
current = 0,
currentUserType = -1,
playerClass='',
playerClasses = ['vip', 'registereduser', 'respected', 'donor', 'patron', 'moderator', 'keeper', 'admin', 'supermoderator', 'fmmvp', 'benefactor', 'warden'],
classCount = playerClasses.length,
inner = '',
user = '';

while( ++currentUserType < classCount ) {
current = -1,
playerClass = playerClasses[ currentUserType ] + '"';
while( ++current < postCount ) {
inner = data[ current ].innerHTML;
if( inner.indexOf( 'span class="' + playerClass + '>' ) )
user = inner.substring( inner.indexOf( playerClass + '>' ) + ( ( playerClass.length ) + 1 ), inner.indexOf( '<', inner.indexOf( playerClass + '>' ) ) );
if( user )
if( user.indexOf( '!' ) == -1 ) {
if( u [ user ] )
continue;
u[ user ] = playerClass;
names[ names.length ] = user;
}
}
}
return u;
}

As it is right now, it won't work with users with weird formatting in their names (ie; the ones whose names are just a bold and color tag instead of an user group).

ika
March 3rd, 2016, 05:17 PM
And how do I upload this to my chrome?

Sen
March 3rd, 2016, 05:26 PM
And how do I upload this to my chrome?
Use Tampermonkey. Make a new script and paste that.

ika
March 3rd, 2016, 10:36 PM
Use Tampermonkey. Make a new script and paste that.

got it but it does it only per page?

is it possible to have it be the entire thread?

Cryptonic
March 3rd, 2016, 11:06 PM
I can tell u the html code formatting for the user groups if that helps you, Sen.

Sen
March 4th, 2016, 12:06 AM
I can tell u the html code formatting for the user groups if that helps you, Sen.
Thanks, although the issue is with names that don't follow the general rules for user groups; it's just a matter of adding some special rules for the exceptions.

Most users names follow the format: <span class="userGroupName">Player Name</span>
Yet there are a few weird ones that are like <span class="userGroupName"><b>Player Name</b></span> (NoctiZ falls into this category), and then some others which are <span style="color:#COLOR!;">Player Name</span> (FM accounts, and a couple of normal accounts).

It's just a matter of adding a couple extra lines to catch those names, but I hate working with markup languages, and JS isn't my favorite either, so anytime I think about fixing it, my mind immediatly comes up with a thousand other activities which suddenly sound like a better use of my time. lol

Makaze
April 29th, 2016, 08:41 AM
Thanks, although the issue is with names that don't follow the general rules for user groups; it's just a matter of adding some special rules for the exceptions.

Most users names follow the format: <span class="userGroupName">Player Name</span>
Yet there are a few weird ones that are like <span class="userGroupName"><b>Player Name</b></span> (NoctiZ falls into this category), and then some others which are <span style="color:#COLOR!;">Player Name</span> (FM accounts, and a couple of normal accounts).

It's just a matter of adding a couple extra lines to catch those names, but I hate working with markup languages, and JS isn't my favorite either, so anytime I think about fixing it, my mind immediatly comes up with a thousand other activities which suddenly sound like a better use of my time. lol

Try using Node.textContent (https://developer.mozilla.org/en-US/docs/Web/API/Node/textContent) with String.prototype.trim() (https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/Trim) instead of Node.innerHTML. That way it doesn't matter what HTML they use because it only grabs the text.

EDIT: There is a slight complication with certain staff accounts like Cryptonic who have an actual script tag in their username block. In that case, remove the script tag before parsing. This code seems to work (just grabbing the username of the first post on the page for proof of concept):


var username = document.getElementsByClassName('userinfo')[0].getElementsByClassName('username')[0];

username.getElementsByTagName('script')[0].remove();
console.log(username.textContent.trim()); // spits out "Cryptonic" on this page of this thread and "SuperJack" on the first page

Quick
May 29th, 2016, 08:45 AM
Cryptonic has told me about something I think would be very cool to "fix". I think it would be cool if the vote counter counted the votes in order, rather than random order, or whatever order is in place now. Also, I highly second an ISO tool. At MafiaScum you can ISO up to 3 people at a time. Really good tool to see if someone or group never brings up or talks to someone.

Klingoncelt
May 30th, 2016, 05:23 PM
Cryptonic has told me about something I think would be very cool to "fix". I think it would be cool if the vote counter counted the votes in order, rather than random order, or whatever order is in place now. Also, I highly second an ISO tool. At MafiaScum you can ISO up to 3 people at a time. Really good tool to see if someone or group never brings up or talks to someone.

this.