Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.6 > vBulletin 3.6 Template Modifications

Reply
 
Thread Tools
Customizable Roster (Member List) Details »»
Customizable Roster (Member List)
Version: 1.1.3, by Sarcoth Sarcoth is offline
Developer Last Online: Mar 2017 Show Printable Version Email this Page

Category: Profile Enhancements - Version: 3.6.5 Rating:
Released: 03-05-2007 Last Update: 04-21-2007 Installs: 114
DB Changes Uses Plugins Template Edits
Additional Files  
No support by the author.

Customizable Roster (Member List)
[How to] get a working Guild/Clan Roster

Note: This modification is now discontinued - this means that while it will remain available for download and use, support will no longer be provided as the thread is no longer monitored. Please see the 3.7 release of this modification for future updates here.

Introduction:

This Mod started off as a [How to] template modification. I have since added in permission control and an installer. Those that install this Mod will need to make adjustments to two templates and one phrase depending on what you want displayed. I'll include instructions for each step as well as optional changes you can make at your decretion.

Click the following link for a Guild Roster preview: http://vanguard.sacredhaven.org/forums/showroster.php

You'll notice that I use the "Extra Profile Fields Page" by Wired1. It isn't needed for the Roster, but I think it makes the field updates look nicer for the users.


Installation:

Step 0: If you are upgrading from a previous version, save a copy of your old showroster.php and rename your showroster templates (I recommend giving them an underscore prefix; Example: _SHOWROSTER).

Step 1: Download the attached showrosterXXX.zip file.

Step 2: Upload the files to their correct directories.
Upload the showroster.php to the /forum/ directory.
Upload the bitfield_showroster.xml to the /forum/includes/xml/ directory.
Upload the spacer.gif to the /forum/images directory if you plan to use avatars.
Step 3: Admincp > Plugin & Products > Manage Products > Add/Import Product
Import the product-showroster.xml file.
Step 4: Admincp > Languages & Phrases > Phrase Manager > Phrase Type: ShowRoster > showroster_title --> Edit
Change this to whatever you want as the title of your roster.
Step 5: Admincp > User Profile Fields > Add New/Update User Profile Field
Add all the Profile Fields you plan to use and keep track of their number(s) (i.e. field6, field7, etc.).
Step 6: Admincp > Styles & Templates > Expand > ShowRoster Templates > showroster_header
This template contains the headers for each of your columns. Add/Edit/Remove columns to your preference. Be sure to update the colspan to the number of columns you have.
Step 7: Admincp > Styles & Templates > Expand > ShowRoster Templates > showroster_userbits
This template gets the data from each of the fields you want to have viewed on your roster. Add/Edit/Remove columns and/or the nowrap="nowrap" to your preference. Be sure to update each of the field#'s to match the fields from Step 5.
Step 8: Admincp > Usergroups > Usergroup Manager > Edit Usergroup
  • Set "Access - Should this usergroup have access to the Showroster page?" to Yes for whatever groups you want to have permissions to access the showroster page.
  • Set "Viewable - Should this usergroup be viewable on the Showroster page?" to Yes for the groups you want to have appear on the showroster page.
All instructions are included in the instructions.txt and optional.txt.

Enjoy!!!


Versions:

v1.1.3 - April 22, 2007
  • Added 'Who's Online' plugin to the installer (Thanks m002.p).
  • Made an update to the optional.txt file for changing the default sort.

v1.1.2 - April 20, 2007
  • Added sorting to the roster. This is optional and will work without adding the sorting features.

v1.1.1 - April 19, 2007
  • Small update. Just added total member count.

v1.1 - April 5, 2007 (Mod Revamp)
  • Revamped everything. There is now an installer to do most of the work for you.
  • The installer adds two new fields to your usergroup table. This allows you to set permissions for the showroster rather than using the showgroups permissions.
  • Removed a few options from the optional.txt file since they are now a part of the mod.

v1.03 - April 2, 2007
  • Added some code back to the showroster.php so join date, last activity, and usernames HTML markups could be used.
  • Changed $user[username] to $user[musername] in the showroster_userbits template. This will allow HTML markups to the usernames again.
  • Added instructions on how to change which usergroups appear on the Roster.
  • Added optional.txt to the zip for optional changes.

v1.01 - March 27, 2007
  • Changed a few variable names.
  • Changed template names.
  • Removed a lot of unneeded code from the showroster.php.
  • Added the ability to include user avatars.
  • Added a counter to keep track of how many users in each usergroup.

v1.01 - March 9, 2007
  • Removed a lot of unneeded code from the SHOWROSTER template.
  • Fixed a couple code problems.

v1.0 - March 6, 2007 (Initial Release)

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #232  
Old 09-04-2007, 10:20 AM
m002.p's Avatar
m002.p m002.p is offline
 
Join Date: Jan 2007
Location: Worcester
Posts: 240
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I believe it is possible to set it up like that regarding your first point. It would simply require the table / td code to be rewritten to display it the other way round than as default.

Your second point may not be easily done as Sarcoths hack is basically like showgroups.php and feeds information straight from what usergroups you have set. However, this doesnt mean to say its impossible as I think the code in the two templates can be modded to so the table displays differently.

If i get some free time before Sarcoth does, ill try look into it, but cant promise anything due to a busy work schedule at this time...
Reply With Quote
  #233  
Old 11-12-2007, 08:46 PM
sheryarpatel's Avatar
sheryarpatel sheryarpatel is offline
 
Join Date: Nov 2005
Location: Lahore
Posts: 14
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

compatible with 3.6.8?
Reply With Quote
  #234  
Old 11-15-2007, 03:02 AM
Bludysky Bludysky is offline
 
Join Date: Nov 2007
Posts: 5
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I don't mind that this is grouped by forum usergroups, but I would like the users in those usergroups sorted by their character Class and then Character Name.

So in SQL it would be ORDER BY usergroup, class, name I.E. two of those would be custom fields. Its way too rusty with PHP these days, anyone want to give me a hand with some additional sorting of this?
Reply With Quote
  #235  
Old 11-16-2007, 11:00 AM
m002.p's Avatar
m002.p m002.p is offline
 
Join Date: Jan 2007
Location: Worcester
Posts: 240
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by sheryarpatel View Post
compatible with 3.6.8?
Yes it is compatible mate, there are no reported issues.
Reply With Quote
  #236  
Old 11-16-2007, 04:43 PM
Bludysky Bludysky is offline
 
Join Date: Nov 2007
Posts: 5
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Bludysky View Post
I don't mind that this is grouped by forum usergroups, but I would like the users in those usergroups sorted by their character Class and then Character Name.
Never mind.. I broke down and looked up the stupid custom sort function... If anyone else would like to order by custom fields so that you have your users broken down by usergroups (as it is by default), and then arranged by a custom field (I use character class/profession), and then alphabetical by character name (as defined by a custom field, this is not the same as the normal username) the following code will work.

Below the print_users function, create a seperate function:

PHP Code:
function myCmpName($a$b){

    if(
$a['field6'] == $b['field6']){
        return 
strnatcasecmp($a['field7'],$b['field7']);
    }
    else{
        return 
strnatcasecmp($a['field6'],$b['field6']);
    }


In my case, field6 is the character class, and field7 is the user defined character name. You may change these fields to any # you wish according to what fields you wish to sort by. In my case field6 is the first level to sort by, and field7 is the second.

*NOTE* If you want to arrange by the actual vBulletin username/login, I believe you can replace the above ['field7'] with ['username']

Now, scroll down until you see the chunk of code:
PHP Code:
        foreach ($groupcache AS $users) {
            
//if ($usersort == 'username') { ksort($users); } else { krsort($usersort); }
            
ksort($users); // Alphabetically Sort Users 
Replace that with:
PHP Code:
        foreach ($groupcache AS $users) {
            
//if ($usersort == 'username') { ksort($users); } else { krsort($usersort); }
            //ksort($users); // Alphabetically Sort Users
            
usort($usersmyCmpName); 
That will give you a roster that looks something like:

GUILD ROSTER

Council:

Bian - Druid
Irk - Druid
Lila - Necro
Aaler - Ranger
Fina - Ranger
Taje - Warrior

Members:

Aamoon - Bard
Beats - Bard
Eyo - Bard
Yian - Bard
Kabb - Berzerker
Vash - Berzerker
Bin - Cleric
Fye - Cleric
Hika - Cleric
Laur - Cleric


etc etc etc.

Hope thats clear, and that i didn't forget to add anything
Reply With Quote
  #237  
Old 12-08-2007, 05:06 PM
Foxtrotelite Foxtrotelite is offline
 
Join Date: Mar 2007
Posts: 56
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I like that idea bludysky. Is there a way to do that and set the order you want classes to be in? By this I mean like a ranking structure such as:

Council:

Bian - GEN
Irk - LTG
Lila - MG
Aaler - BG
Fina - BG

Members:

Aamoon - COL
Beats - LTC
Eyo - MAJ
Yian - CPT
Kabb - 1LT
Vash - PVT
and so on

Or even just a way to be able to move names up and down on the roster in the order you want them to be displayed in.

Thanks
Reply With Quote
  #238  
Old 12-15-2007, 11:27 PM
Bludysky Bludysky is offline
 
Join Date: Nov 2007
Posts: 5
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Well I suppose you could do that by adjusting the myCmpName function. To do a more complex compare and sort. Would be a bit tricky and would be somewhat slow'ish though I would think. Instead of just doing a compare between two fields, you could do some switch statements to sort them into the right classes, and then do a compare on the name. At least I think that would work.
Reply With Quote
  #239  
Old 01-02-2008, 01:13 PM
boxerman boxerman is offline
 
Join Date: Jun 2007
Location: UK
Posts: 58
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks! jsut what i needed
Reply With Quote
  #240  
Old 01-04-2008, 03:22 PM
Foxtrotelite Foxtrotelite is offline
 
Join Date: Mar 2007
Posts: 56
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Bludysky View Post
Well I suppose you could do that by adjusting the myCmpName function. To do a more complex compare and sort. Would be a bit tricky and would be somewhat slow'ish though I would think. Instead of just doing a compare between two fields, you could do some switch statements to sort them into the right classes, and then do a compare on the name. At least I think that would work.
Thanks for the reply, although I have no idea how to do any of that
Reply With Quote
  #241  
Old 01-06-2008, 02:21 PM
Brundlefly Brundlefly is offline
 
Join Date: Oct 2007
Posts: 21
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Foxtrotelite View Post
I like that idea bludysky. Is there a way to do that and set the order you want classes to be in? By this I mean like a ranking structure such as:

Council:

Bian - GEN
Irk - LTG
Lila - MG
Aaler - BG
Fina - BG

Members:

Aamoon - COL
Beats - LTC
Eyo - MAJ
Yian - CPT
Kabb - 1LT
Vash - PVT
and so on

Or even just a way to be able to move names up and down on the roster in the order you want them to be displayed in.


Thanks
I had a need for something similiar what your asking for here. Instead of the text for the rank I used the rank image, then I named those specific ranks (In User Profile field) with a number of the order I wanted them displayed by. Then when sorted they will fall in the roster by the number order. Its sort of a headache but it looks nice.

My Roster

You'll need to modify your showroster.php and include something similiar to the below.

After
Code:
$usercount++;
Add the below, modified to your ranks

Code:
$classurl = 'images/spacer.gif';
if ($user[field9] == '1 - Area General') { $classurl = 'forum/images/custom/AGEN.gif'; }
if ($user[field9] == '2 - Brigade General') { $classurl = 'forum/images/custom/BGEN.gif'; }
if ($user[field9] == '3 - General') { $classurl = 'forum/images/custom/GEN.gif'; }
if ($user[field9] == '4 - Lieutenant General') { $classurl = 'forum/images/custom/LTG.gif'; }
if ($user[field9] == '5 - Colonel') { $classurl = 'forum/images/custom/COL.gif'; }
if ($user[field9] == '6 - Lieutenant Colonel') { $classurl = 'forum/images/custom/LTC.gif'; }
if ($user[field9] == '7 - Major') { $classurl = 'forum/images/custom/MAJ.gif'; }
if ($user[field9] == '8 - Captain') { $classurl = 'forum/images/custom/CPT.gif'; }
if ($user[field9] == '9 - Lieutenant') { $classurl = 'forum/images/custom/LT.gif'; }
if ($user[field9] == '10 - Sergeant') { $classurl = 'forum/images/custom/SGT.gif'; }
if ($user[field9] == '11 - Corporal') { $classurl = 'forum/images/custom/CPL.gif'; }
if ($user[field9] == '12 - Private 1st Class') { $classurl = 'forum/images/custom/PFC.gif'; }
$classimage = '<img src="'.$classurl.'" border="0" alt="'.$user[field9].'">';
In your showroster_userbits templates you need to add the below where you want it to fall in the roster and add a column heading in the showroster_header

Code:
<td class="$bgclass" nowrap="nowrap" align="center">$classimage1</td>
Of course make sure you include those images. Its been awhile since I did this and i'm not that savy. But, I hope this helps
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 06:39 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.05381 seconds
  • Memory Usage 2,337KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (3)bbcode_code
  • (3)bbcode_php
  • (4)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete