Attention:

Support Rules and Guidelines
Before you post your support topic, please remember to:
  • Read the support forum rules.
  • Check the wiki and use search to see if your problem can be answered there first.
  • Link your board please, and make sure that the problem on your board is visible to guests or provide a test account.
  • Do not post Board Wrappers and CSS unless requested. With a board link, this is not necessary.
  • Be as descriptive as you can and use as many details as possible when describing your problem.
  • Please briefly mark any links to forums that may not be work-safe.
This will help ensure your support issue will be attended to in a quick and efficient manner.

  ClosedNew TopicNew Poll

 Help with scripts in webpages [SOLVED] , auto-claims doesn't like this one group
#
I'm using a script in place of the more typical forum thread for things like member/faceclaims and whatnot, and have managed to get it to sort in the following ways. Having to edit only one line of code to add a member to more than one list at a time is amazing and I love it and could rave all day about it.

I am having one minor issue, though, that only seems to be an issue on the page that sorts by member group, and then only the group "Brothers of the Black Phoenix", which doesn't appear at all although it should be appearing after those in the faction "Hell" are displayed.

There is one character in that group, Farsot. His info shows up fine on the pages that sort by species and playerm where he shows up as part of Admin Tara's characters and the Angel species as he should. I've double-checked that the "brothers of the black phoenix" under affiliations and the one that I have in the character list are spelled the same, including casing, and they are, but it seems to just vanish on the page that sorts by group.

Sorted by member
Sorted by species
Sorted by group

I can post the code in my webpages if needed, chrome's "inspect" feature isn't showing any errors in the console.
PM
#
This appears to be related to your iterating function somehow. Adjusting the fourth object in the affiliations object to 'Brothers of the Black Phoenix' results in a correct sorting, but obviously, you lose the group 'Hell'. Similarly, if you append a fifth object in the players object, the group 'Brothers of the Black Phoenix' appears and sorts correctly. I think your for-in loop is being constrained to going only four deep by the first for-in loop for the players list. I'd recommend adapting it to use a generic for loop, a la for (var i = 0; i < whoPlays.players.length; i++)

EDIT:
Whoops, I was only half-right -- blame it on allergies :b

It is related to iterations, but since you're using different variations of the same script for each page, you can fix this just by adjusting this line in the script on the species page:
CODE
for (var thisPlayer in whoPlays.players)


to:

CODE
for (var thisPlayer in whoPlays.affiliations)


This post has been edited by Dusty: Dec 22 2017, 09:16 PM
PM
#
I can't believe I missed that. Was the first thing I changed on the other pages lol.

Thank you, this can be marked as solved.
PM
#
This topic has been solved. If you need anymore help please post a new thread. Thanks for choosing Jcink services.

signature
email: admin@jcink.com :: blog: John C.
0 User(s) are reading this topic (0 Guests and 0 Anonymous Users)
0 Members:
Share this topic:
« Next Oldest | General Support | Next Newest »

Options ClosedNew TopicNew Poll