This is a script that can pull information from the memberlist to use as an auto claim list. The example I am going to use here is Occupation, but this script is set up in a way that you can have multiple "categories" to create different lists. Like Clubs or Schools or Factions or whatever.
Add the structure to your memberlist. This should be added to the memberlist row HTML template. You can put it at the bottom and add a
The script will pull the
This allows you to put them on different pages if you like, or call specific categories to a particular tab in a guidebook for example. I would recommend putting the script only on the pages you want to use it and not in your wrapper or on every page so that members don't accidentally call it for some reason.
This script will pull everything from a category and sort it alphabetically first by the Header, then the Subheader, followed by the character's name. In the script, there is an option for you to select a special position to show above the others, for example if you want the Owner tag to be the top and THEN alphabetize the rest by name. This is the sample loaded into the script. You can see that it is set so that the CategoryName Occupation will prioritize the Owner position first.
Using the example of Occupation, the memberlist code might look like:
Then, you could have a webpage setup that just has div id="Occupation" and the script on it.
The HTML that will appear on the page automatically is:
Please note: The Name field is the only one that will bring HTML over from the memberlist. The styling was intended to be done off of the above structure. You can change it if you match the other fields to
Please be sure to include jquery if it doesn't work:
Using a dropdown for users to select options can help make sure there aren't duplicate sections from spelling differences. You can also use fields that can show on the profile but only be changed by admin if you want to have full control over it, but that means you updating their profile as needed.
The reason only the name field includes the HTML is to prevent people from messing it up too bad on their end but also so it will pull the link to the profile as well as the prefix/suffix, eliminating the need to make another function just to pull the member group. Which is the fancy way of saying I was too lazy to use the script to recreate the link and usergroup. Haha!
If you want to add it to a post but don't want to have the script on every page, open the script in notepad, remove the script tags, save as
If you want an uncategorized section, I would give it a name and have then have members add that to the
If you want it to sort by position and then name, then... I didn't do that.
Find:
And replace with:
If you want to have a little more style control and you want to be able to include the person's answer in the html for CSS targeting, for example
You can also look at this area to make changes to the way the HTML is spat out by the script as well, if you want. *This code will not pull for the name field. Only the Header, Subheader, and Position fields, but you could probably figure it out.*
Find: