DragonPrime - LoGD Resource Community
Welcome Guest
  • Good morning, Guest.
    Please log in, or register.
  • August 17, 2018, 07:55:23 AM
Home Forums News Downloads Login Register Advanced Search
* * *
DragonPrime Menu
Login
 
 
Resource Pages
Search

Pages: [1]   Go Down
  Print  
Author Topic: Badnaved Players v0.0.2  (Read 8660 times)
0 Members and 1 Guest are viewing this topic.
MarcTheSlayer
Mod God
*****
Offline Offline

Posts: 1745


View Profile
« on: September 28, 2009, 03:29:28 PM »

Badnaved Players v0.0.2

A link in the grotto that displays a simple page showing all players that currently have badnavs. A checkbox beside each name allows you to fix multiple players.

The grotto link displays a number so you can see at a glance how many players are stuck.

01/10/09 - v0.0.2
+ Made the count number bold, red and blink when more than zero.

Feedback, bugs, welcome. Smiley

Zip file attached.
« Last Edit: October 01, 2009, 03:59:45 PM by Afkamm » Logged

Check My Modules for the latest versions.
JollyGG
Mod God
*****
Offline Offline

Posts: 607


Jolly Good!


View Profile WWW
« Reply #1 on: September 29, 2009, 08:11:44 AM »

Only thing I did was change the nav around in the grotto to be

Code:
addnav('Navigation');
addnav(array('`b`^Badnaved Players (%s)`0`b',$count),'runmodule.php?module=badnaved_players');

so my staff can find it easier
Logged

Senior Staff Coder to: RPGLink
Supporter of: Forbidden Realm and LotGD4Adults2.
Released Modules: Here
MarcTheSlayer
Mod God
*****
Offline Offline

Posts: 1745


View Profile
« Reply #2 on: September 29, 2009, 09:38:19 AM »

Here's another way to make it stand out. Make the count number bold and red whenever it's more than zero. Smiley

Code:
addnav(array('Badnaved Players (%s)',($count==0?0:'`b`$'.$count.'`0`b')),'runmodule.php?module=badnaved_players');
Logged

Check My Modules for the latest versions.
programmer16
Militia
**
Offline Offline

Posts: 27


I love my computer; all my friends are inside it!


View Profile WWW
« Reply #3 on: September 30, 2009, 10:38:50 PM »

I'm not trying to sound mean or anything, but could you elaborate on the usefulness of this module? I've looked through the code, and I see two major pitfalls:

  • Just because someone is on the badnav.php page doesn't mean they're stuck. Try clicking two regular (non-OVERRIDE_FORCED_NAV) navs in rapid succession, and you'll end up on badnav.php. However, you likely won't be stuck; you'll just be at the first nav you clicked. This module would needlessly "fix" the navs of someone in that situation (and possibly annoy that player).
  • This module does not pick up broken navs due to coding errors (i.e. a page that loads with no navs).

Now to be fair, I will admit that in other situations, players can become stuck on the badnav.php page, just because the "Return to" or "Click here" links sometimes point to a bad page or are malformed themselves. Still, players would likely Petition for Help, because the link is right on the page (in my time, I have only seen one page that was messed up so badly it didn't have the Petition for Help link visible, and that was due to a bad module).

Anyway, like I said, I'm not trying to be mean, I'm just pointing out that this module is not a cure-all solution for broken/bad navs. Even as the DragonPedia says about badnavs, "Hacks and modules have been created for this, but can't seem to detect all occurances (sic)". As such, thanks for the effort, Afkamm! Smiley
Logged

I apologize for the long post, but it is simply in my nature to be thorough.
I also apologize for my excessive use of parenthetical statements (but they're just so awesome!)
MarcTheSlayer
Mod God
*****
Offline Offline

Posts: 1745


View Profile
« Reply #4 on: October 01, 2009, 03:58:27 PM »

I'm not advertising this as a cure-all solution to modules with bad links, though you brought up an interesting point regarding players that double click links by accident and get a badnav page, but not the white badnav page. Smiley

The SQL accounts table has a field called "restorepage". This stores the filename of the last core file you last viewed. ie: village.php, inn.php, gypsy.php etc.

If you double click by accident and get a badnav page (non white), the "restorepage" doesn't say badnav.php, but the filename of the last (or maybe current) file you were at. The only time badnav.php appears in this field is when the player is stuck on the white page.

Now I know there's a module (petitionfixnavs.php by Oliver Brendel) that hooks onto the petitions so navs can be fixed that way, but how often do people (superusers) check for new petitions, and yes there are petition count numbers at the top, but again who notices when the unhandled number changes? I believe it's important to fix white screen badnavs ASAP (it sucks for those people) and this module will help to bring those players to the attention of staff as soon as they enter the grotto. Smiley

I've altered the code so when there's more than zero the count number turns bold, red and blinks (Yes CSS1 allows you to make text blink lol). Thanks JollyGG. Cheesy

Do you think it would be useful for this module to send out a YoM to each player that has their navs fixed and maybe grab data from their account and open up a petition in their name with said data to try and figure out what caused the badnav?

Feedback, comments always welcome. Smiley
« Last Edit: October 01, 2009, 04:00:12 PM by Afkamm » Logged

Check My Modules for the latest versions.
Iori
Mod God
*****
Offline Offline

Posts: 832


View Profile WWW
« Reply #5 on: October 01, 2009, 07:01:34 PM »

Nothing too important, just like to mention that the "blink" property doesn't work on IE, safari or Chrome  Wink
Logged

MarcTheSlayer
Mod God
*****
Offline Offline

Posts: 1745


View Profile
« Reply #6 on: October 01, 2009, 07:21:00 PM »

Well they should because it's CSS1 which is how old now?

IE sucks and has its own blink tag, but the others have no excuse. Sad
Logged

Check My Modules for the latest versions.
programmer16
Militia
**
Offline Offline

Posts: 27


I love my computer; all my friends are inside it!


View Profile WWW
« Reply #7 on: October 01, 2009, 07:28:09 PM »

Do you think it would be useful for this module to send out a YoM to each player that has their navs fixed and maybe grab data from their account and open up a petition in their name with said data to try and figure out what caused the badnav?

That might be a nice addition.

I know for hardcore developers like me, I like to figure out exactly why errors occur. Ironically enough, I've edited Oliver Brendel's petitionfixnavs.php module where it displays the page URL at the bottom of every page, then when someone fixes navs through a petition, it emails the petitioner's accounts_output (and thus the page URL) where I can investigate the last page they loaded (also helps me track frequency of badnavs, even if I'm not aware the moment they occur). I realize that's more a hack than anything (it doesn't really help with a white page badnav), but I'm more concerned with the non-white page badnavs, which have been more prevalent on my site, what with buggy or conflicting modules.

Oh, and thanks for the clarification regarding the non-white page badnavs. I haven't really researched how the database handles badnavs, since I usually rush to fix them. Tongue

P.S. And yes, I overuse parenthetical comments (they're awesome! Tongue )
Logged

I apologize for the long post, but it is simply in my nature to be thorough.
I also apologize for my excessive use of parenthetical statements (but they're just so awesome!)
JollyGG
Mod God
*****
Offline Offline

Posts: 607


Jolly Good!


View Profile WWW
« Reply #8 on: October 01, 2009, 08:00:32 PM »


IE sucks

Hear hear! Tongue
Logged

Senior Staff Coder to: RPGLink
Supporter of: Forbidden Realm and LotGD4Adults2.
Released Modules: Here
MarcTheSlayer
Mod God
*****
Offline Offline

Posts: 1745


View Profile
« Reply #9 on: October 02, 2009, 01:40:15 PM »

... but I'm more concerned with the non-white page badnavs, which have been more prevalent on my site, what with buggy or conflicting modules.

Permadead and the badnav white screen are two things that hopefully will be changed in the near future. Instead of the player ending up stuck and having to contact staff, the problem gets automatically fixed (with a YoM/petition sent) allowing the player to keep playing. Smiley
Logged

Check My Modules for the latest versions.
Edward
Mod God
*****
Offline Offline

Posts: 592

Now... Who's a Llama?


View Profile
« Reply #10 on: October 02, 2009, 05:37:33 PM »

[...] Chrome  Wink

Chrome. Chrome?! CHROME!?
* Edward debates on whether or not to kick google, or head-wall...
Google is coming out with a new OS. But CSS1 is forgotten about. Wtf?!

[/off topic]
Logged
Pages: [1]   Go Up
  Print  
 
Jump to:  


*
DragonPrime Notices
Play LoGD on Dragonprime

Support Us
No funds raised yet this year
Your help is greatly appreciated!
Recent Topics
DragonPrime LoGD
Who's Online
37 Guests, 1 User
Aeolus
Home Forums News Downloads Login Register Advanced Search