samerton / NamelessMC

A complete Minecraft-related PHP website package. Please note this is an old repository, a link to the new repo is in the readme
https://github.com/NamelessMC/Nameless
MIT License
39 stars 17 forks source link

Litebans #33

Closed Kyle1264x closed 9 years ago

Kyle1264x commented 9 years ago

http://www.spigotmc.org/conversations/litebans-integration.49689/

Move this here, for email notifications

samerton commented 9 years ago

I'll move over my reply to here.

You'll need to replace all contents of the file, so your final file will look something like this

Kyle1264x commented 9 years ago

As for the nav bar, should it show up? Because you gave me a changed nav bar code.

Kyle

On May 28, 2015, at 6:17 AM, samerton notifications@github.com wrote:

I'll move over my reply to here.

You'll need to replace all contents of the file, so your final file will look something like this

— Reply to this email directly or view it on GitHub.

samerton commented 9 years ago

The Infractions link can be found in the bottom-right of the page, next to the copyright notice. You'll need to enable it in the Pages section of the admin panel first though. Would you like a modified navbar which includes the Infractions link up there, instead of in the footer?

Kyle1264x commented 9 years ago

Nah. That's fine. Leme get to school and I'll add the code Kyle

On May 28, 2015, at 7:16 AM, samerton notifications@github.com wrote:

The Infractions link can be found in the bottom-right of the page, next to the copyright notice. You'll need to enable it in the Pages section of the admin panel first though. Would you like a modified navbar which includes the Infractions link up there, instead of in the footer?

— Reply to this email directly or view it on GitHub.

Kyle1264x commented 9 years ago

Testing now

Kyle1264x commented 9 years ago

Added the code, Infractions page does work. But it seems as if its only registering the "who the staff is" if theyre opp'd or console. http://prntscr.com/7ac6ps

Kyle1264x commented 9 years ago

Also for the overview in the mod cp, you should have it show like Applications: #

Denied Open Accepted Reports:#

samerton commented 9 years ago

I think the missing staff members are caused by the package being unable to query Mojang's servers to get the username from their UUID. This won't happen if they've already registered on the website, however I'll look into it.

As for the ModCP overview, I'll add that.

Kyle1264x commented 9 years ago

All my staff have registered on my website, Ive made sure of that.

Kyle1264x commented 9 years ago

And the few that havent i've registered them for them. It also looks like theyre switched around, Some of my staff are getting kicked instead of doing the kicking. and such

samerton commented 9 years ago

Strange, I'll continue to look into it.

Kyle1264x commented 9 years ago

Sounds good

Kyle

On May 28, 2015, at 8:30 AM, samerton notifications@github.com wrote:

Strange, I'll continue to look into it.

— Reply to this email directly or view it on GitHub.

samerton commented 9 years ago

Can you try the following:

Replace the code of pages/infractions.php with this code Replace the code of inc/classes/Infractions.php with this code

Kyle1264x commented 9 years ago

http://apexnetwork.org/infractions/

Looks like that fixed it, I'll continue looking for bugs

samerton commented 9 years ago

The pagination on that page seems pretty broken, I'll fix that now.

Kyle1264x commented 9 years ago

I just banned myself http://prntscr.com/7adu01 says im unbanned when im banned

samerton commented 9 years ago

Can you replace the contents of inc/classes/Infractions.php with this code for debugging purposes; it doesn't contain any fixes.

Kyle1264x commented 9 years ago

http://prntscr.com/7adx0h http://prntscr.com/7adx61

Kyle1264x commented 9 years ago

http://prntscr.com/7adxhl

Kyle1264x commented 9 years ago

My staff found a bug on the website If they're in the moderator group their picture of their head doesn't load

Kyle

On May 28, 2015, at 10:43 AM, samerton notifications@github.com wrote:

Can you replace the contents of inc/classes/Infractions.php with this code for debugging purposes; it doesn't contain any fixes.

— Reply to this email directly or view it on GitHub.

samerton commented 9 years ago

Can you replace the contents of:

inc/classes/Infractions.php with this code pages/infractions.php with this code

samerton commented 9 years ago

Can't reproduce the issue with your moderator heads missing. Can you temporarily enable custom displaynames (at the bottom of the "General Settings" AdminCP tab), navigate to the Users tab in the AdminCP, edit a user whose avatar isn't working, and check their "Minecraft Username" field is filled in.

Kyle1264x commented 9 years ago

Just replaced the contents, same problem as before, Marking them as unbanned when their banned. Just tested on an online user and they also tried to join back http://prntscr.com/7aelld http://prntscr.com/7aely5

Kyle1264x commented 9 years ago

Just tested with the username thing, whenever theyre put into the Moderator group it removes their name it seems. And it sets as their display name

Kyle1264x commented 9 years ago

All bans are an issue, someone was just temp banned, http://prntscr.com/7aephf same issue, should be a week

samerton commented 9 years ago

The debug code I sent you earlier showed that your database value is different to mine; how recent is your LiteBans version?

Kyle1264x commented 9 years ago

the most recent version

Kyle1264x commented 9 years ago

Just re-updated the plugin, i'll try now

Kyle1264x commented 9 years ago

Still showing as unbanned

samerton commented 9 years ago

The problem is your database value for "active" seems to be empty, whereas it should be either 0 or 1. I'll send some more code over soon.

Kyle1264x commented 9 years ago

Here are the tables in my database http://prntscr.com/7aesmd

samerton commented 9 years ago

Can you replace the contents of your inc/classes/Infractions.php with this code

Kyle1264x commented 9 years ago

http://prntscr.com/7aey2w

Kyle1264x commented 9 years ago

Would you like my database for this? I can download it off phpmyadmin or send you snippets

samerton commented 9 years ago

Could you take a screenshot of the bans table within your database?

Kyle1264x commented 9 years ago

here are the most recent bans: http://prntscr.com/7aeyxt

heres the bar: http://prntscr.com/7aez2p

samerton commented 9 years ago

The issue here seems to be with the database values; your "active" values are set as 0 when they should be 1, which means they're set as unbanned.

Kyle1264x commented 9 years ago

They are banned though. Like if they try to join in, it says theyre banned http://prntscr.com/7af416 http://prntscr.com/7af462 http://prntscr.com/7af49y

Kyle1264x commented 9 years ago

If i need to i can just flush my database

samerton commented 9 years ago

Can you replace the contents of:

inc/classes/Infractions.php with this code pages/infractions.php with this code

Kyle1264x commented 9 years ago

Im guessing debugging?

Kyle1264x commented 9 years ago

http://prntscr.com/7af6ft

Banned two people permanently

Kyle1264x commented 9 years ago

http://prntscr.com/7af6ro from the table

samerton commented 9 years ago

Interestingly, the database shows an active value as "1" whereas the query isn't picking up any value at all. Can you navigate to the Bans table "structure" tab in phpMyAdmin and let me know what the "type" is set to for the "active" column?

Kyle1264x commented 9 years ago

http://prntscr.com/7afams

samerton commented 9 years ago

Can you replace the contents of:

inc/classes/Infractions.php with this code pages/infractions.php with this code

Kyle1264x commented 9 years ago

Added, what would you like from those?

samerton commented 9 years ago

Wondering if that would have fixed the issue, however I think I may know what's happening. The problem is, the querying library in the package doesn't support the database query I'll need. I'll keep working on it though.

Kyle1264x commented 9 years ago

Got it, just let me know if you need me to do anything

Kyle1264x commented 9 years ago

If you need me to, i can drop the database and start from a clean slate