Huskerdust 625 Share Posted May 25, 2019 I don't want a fancy schmancy member list, as I'm using mine as a quick face claim list. I have everything as I want it at the moment, except one thing. I'd like to be able to sort by Face Claim in the dropdown that says "by member name, total post, etc." That is it. I tried looking over Kit's amazing tutorial but it gave me a lot more than I needed and I wasn't sure how to parse it down to the singular thing I need for this. Any help? Please? EDIT: here is the list right now: https://mayday.jcink.net/index.php?&act=Members&photoonly=&name=&name_box=all&max_results=50&filter=ALL&sort_order=asc&sort_key=name&st=0 (using kit's cheat for 50 per page) Reality is an illusion. Link to comment Share on other sites More sharing options...
Kit the Human 759 Share Posted May 26, 2019 (edited) I don't think the code will work with a table because it needs to rearrange blocks, which a table doesn't allow. If you want to use a table, I recommend this tablesorter instead! EDIT to add... I'll do a guide on this in a couple of days 🙂 Edited May 26, 2019 by Kit the Human 1 PSI: an Occult Investigations RP Roleplay Architects: Grab a friend (or many friends!) and just write. You can also find me at: Link to comment Share on other sites More sharing options...
Huskerdust 625 Author Share Posted May 27, 2019 Thanks, Kit! I appreciate it. Reality is an illusion. Link to comment Share on other sites More sharing options...
Kit the Human 759 Share Posted May 28, 2019 Proof of concept for you https://kit89.jcink.net/index.php?act=Members Probably telling you how to suck eggs, but create a copy of your templates to make sure you can revert if you're not happy. Add the following to the top of the member list header template <script type="text/javascript" src="https://files.jcink.net/uploads/kit89/jquery_tablesorter_min.js"></script> <script> $(function() { $("#memberlist").tablesorter(); }); </script> Obviously rehost the script. Find <table width="100%" border="0" cellspacing="1" cellpadding="4"> And give it an id of member-list and a class of tablesorter. So: <table id="memberlist" class="tablesorter" width="100%" border="0" cellspacing="1" cellpadding="4"> Find <tr class="member-list-header"> And turn it into a thead. So: <thead> <tr> <th class="pformstrip" width="30%">Name</th> <th class="pformstrip" align="center" width="20%">Face Claim</th> <th class="pformstrip" align="center" width="10%">Group</th> <th class="pformstrip" align="center" width="10%">Posts</th> </tr> </thead> Now wrap <% MEMBERLIST_ROWS %> into a tbody: <tbody> <% MEMBERLIST_ROWS %> </tbody> Save and it should be working. This is my member list header <script type="text/javascript" src="https://files.jcink.net/uploads/kit89/jquery_tablesorter_min.js"></script> <script> $(function() { $("#memberlist").tablesorter(); }); </script> <form action='index.php' method='post'> <input type='hidden' name='act' value='Members' /> <div align="left"><!-- |pages| --></div> <br /> <div style="background: #ebeafa; padding: 20px; margin: 5px 0; border: 3px solid #f6f6fb; outline: 1px solid #acaaba; text-align: center"> Click on the headings to change the sort order! </div> <div class='tableborder' id='member-list'> <div class="maintitle">Member List</div> <table id="memberlist" class="tablesorter" width="100%" border="0" cellspacing="1" cellpadding="4"> <thead> <tr> <th class="pformstrip" width="30%">Name</th> <th class="pformstrip" align="center" width="20%">Face Claim</th> <th class="pformstrip" align="center" width="10%">Group</th> <th class="pformstrip" align="center" width="10%">Posts</th> </tr> </thead> <tbody> <% MEMBERLIST_ROWS %> </tbody> </table></div> <div style="margin: 2px 0; padding: 2px; text-align: center"> <div class="row3"><strong>Show matches with photo only? <!-- |photoonly_checkbox| --></strong></div> <div class='pformstrip'> <select class="forminput" name="name_box"> <option value="begins">Name begins with</option> <option value="contains" selected="selected">Name contains</option> </select> <!-- |search_input| --> </div> <div class='darkrow1'> Showing <!-- |group_dropdown| --> by <!-- |sortby_dropdown| --> in <!-- |order_dropdown| --> with <!-- |max_dropdown| --> results per page <input type="submit" value="Go" class="forminput" /> </div> </div> And my row <tr> <td class="row4"><!-- |member_name| --></td> <td class="row4" align="center"><!-- |field_17| --></td> <td class="row4" align="center"><!-- |group| --></td> <td class="row4" align="center"><a href='index.php?act=Search&CODE=getalluser&mid=<!-- |id| -->&type=posts' title='<!-- |last_post| -->'><!-- |posts| --></a></td> </tr> Hope that helps! 1 PSI: an Occult Investigations RP Roleplay Architects: Grab a friend (or many friends!) and just write. You can also find me at: Link to comment Share on other sites More sharing options...
Huskerdust 625 Author Share Posted June 3, 2019 I can't seem to get this working... Reality is an illusion. Link to comment Share on other sites More sharing options...
Kit the Human 759 Share Posted June 3, 2019 This bit is really important. Your table headers need to be outside the tbody and inside a thead. Reread my table code to see how it ought to look. <thead> <tr> <th class="pformstrip" width="30%">Name</th> <th class="pformstrip" align="center" width="20%">Face Claim</th> <th class="pformstrip" align="center" width="10%">Group</th> <th class="pformstrip" align="center" width="10%">Posts</th> </tr> </thead> 1 PSI: an Occult Investigations RP Roleplay Architects: Grab a friend (or many friends!) and just write. You can also find me at: Link to comment Share on other sites More sharing options...
Huskerdust 625 Author Share Posted June 5, 2019 YAY! I got it working! The problem was how I was saving the JS file. >.> So it was a dumb on my end. A real dumb dumb. But thank you, thank you so much for helping me out! 1 Reality is an illusion. Link to comment Share on other sites More sharing options...
Kit the Human 759 Share Posted June 5, 2019 You're most welcome! Glad you got it working! 1 PSI: an Occult Investigations RP Roleplay Architects: Grab a friend (or many friends!) and just write. You can also find me at: Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now