DragonPrime - LoGD Resource Community

Coding Support => Coding Support Desk => Topic started by: Megan|SaraBeth on November 05, 2018, 06:51:34 AM



Title: Online Character List
Post by: Megan|SaraBeth on November 05, 2018, 06:51:34 AM
My online character list on the homepage isnt updating properly. Once people leave the new player section after 5 days they dont go in the player section for awhile if at all. I dont know what could be wrong or where to even look to fix it. I believe it was working right before, like awhile ago. Any help would be great.


Title: Re: Online Character List
Post by: Aeolus on November 05, 2018, 02:52:51 PM
Look in the module itself (typically onlinelist.php), but your issue may also be your datacache not updating the list.


Title: Re: Online Character List
Post by: Megan|SaraBeth on November 07, 2018, 06:51:43 PM
Thank you for the point in the right direction!


Title: Re: Online Character List
Post by: MarcTheSlayer on November 11, 2018, 08:05:39 PM
Did you turn off the datacache to see if that fixed the issue? Did you also try deleting the datacache files?


Title: Re: Online Character List
Post by: Megan|SaraBeth on November 12, 2018, 09:57:55 AM
I didnt delete the files, no. I turned it off and nothing. I can try deleting the files.


Title: Re: Online Character List
Post by: MarcTheSlayer on November 14, 2018, 10:12:14 AM
I don't have anything else that I can suggest. If it was working fine, and now isn't then you're just going to have to try turning different things off to try and figure out what's causing the problem. :-)


Title: Re: Online Character List
Post by: Megan|SaraBeth on November 14, 2018, 06:10:39 PM
I deleted the datacache for the onlinelist.php and nothing. Still broken. I guess I will have to try that. But it works when I dont categorize the list which is odd.


Title: Re: Online Character List
Post by: TGTarheel on November 15, 2018, 12:24:14 AM
You might try uninstalling and re-installing.  Or just get rid of the Isle of Wen.  I personally do not even use it.

I'd try getting rid of Wen, create a test character...and see if it shows up in the online list.  If so, you know that Wen may be causing your problem.  If not, it may be the onlinelitst.php

Or Heaven knows what else.  Sometimes, installing a new module can have undesired effects elsewhere - did you do anything like that recently?

I routinely back up my entire server, with file structure complete...so that I have a save point where everything works that I ca go back to in the event all else fails.  Then you can try re-adding things one at a time, and see if anything has an undesired effect....one at a time.  This saved file structure is in my test server, which I try as best I can to make it mirror my actual site...including even downloading the database and uploading it back to the test server...this also has the advantage of having a backup point available in the event something truly terrible happens.


Title: Re: Online Character List
Post by: Megan|SaraBeth on November 15, 2018, 09:04:50 AM
I dont use Isle of Wen and havent since the site opened. I took it away before opening. Also tried the uninstall and reinstall before posting here.

We figured out the issue. Now we need help with a fix. Newbies arent showing under the Newest section but they will appear under the Online section when we physically set their rank on staff list to 0. Its not reading the staff list setting that is already 0 for non staffers. I think the issues started shortly after making the staff list not set staffers under Staff Online unless they are listed on the staff list. We want the newly created characters to show under Newest for their 3 days. That needs to be fixed. I dont want to have to go in and set every new characters' rank on the staff list to 0 to get them under Online at least. Id like it working how its supposed to with my staff list edit in there for only staff on the staff list to be listed under Staff Online.

Short help explanation: New players need to be listed under Newest Online for 3 days and players with flags that arent on the staff list need to not be listed under Staff Online and then after 3 days the Newest Online is moved to Online.

Any help is appreciated. Thanks in advance.


Title: Re: Online Character List
Post by: Aeolus on November 15, 2018, 03:06:46 PM
That's because the staff list rank of the regular player isn't being set. However, the database query assumes that it is set.

Easiest way to fix this (there's more proper ways, but we all know about the "copy paste" editor) would be to setting their rank to zero if it hasn't previously been set before via set_module_pref, hooking in somewhere everyone accesses (e.g. village).


Title: Re: Online Character List
Post by: Megan|SaraBeth on November 15, 2018, 05:34:01 PM
When you UE all the characters its already set to zero but the online list module pulls it as unset instead of reading that zero but when I manually enter a zero all categories work as they should. I just saw the Newest section working just now as I type this.


Title: Re: Online Character List
Post by: Aeolus on November 15, 2018, 06:38:05 PM
Yes, because that is the default from the module that is just displayed, but it's not stored in the database. It needs to be set manually to be set in the database (as I just said).


Title: Re: Online Character List
Post by: Megan|SaraBeth on November 16, 2018, 07:23:17 AM
I checked the pref in the database. It has all 0s in there for players not on the staff list yet its still pulling those not manually set in the UE as a 0 as unset.


Title: Re: Online Character List
Post by: Aeolus on November 16, 2018, 03:42:55 PM
Yes, because that is the default from the module

that is just displayed

but it's not stored in the database. It needs to be set manually to be set in the database (as I just said).

It needs to be set manually to be set in the database (as I just said).

Thought I'd just highlight the points instead of repeating myself.

Easiest way to fix this would be to setting their rank to zero if it hasn't previously been set before via set_module_pref


Title: Re: Online Character List
Post by: Megan|SaraBeth on November 16, 2018, 07:12:39 PM
Thank you for the point in the right direction. We had to do it how you said but slightly different and now it works. If it wasnt for you pointing us we would have never figured it out.


Title: Re: Online Character List
Post by: Aeolus on November 16, 2018, 08:43:31 PM
Naturally, pleasure, all that. What site operates without people who don't know what they're doing?


Title: Re: Online Character List
Post by: Megan|SaraBeth on November 18, 2018, 03:42:09 PM
True. Makes sense. I figured there had to be a way to tell it how to set the 0 and not just placeholder it. We got it after your guidance. I know what errors there are and what fix is needed in english not php or sql. Sometimes I can sit for HOURS and figure it out and other times its just too complex for me. I try at least.

© 2018 DragonPrime - LoGD Resource Community
Email Talisman: talisman -at- gmail.com
&oeXs)2U7=V BmܲV.U e=;p\}eG )Jj} C5EH7ˤH=j } mo|*Ŋw{drV_@IV>/- TFQJ׀̀Ve}l1,V O iNYx͘$e$;
Forums: Powered by SMF 1.1.21 | SMF © 2006-2007, Simple Machines