vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.6 Template Modifications (https://vborg.vbsupport.ru/forumdisplay.php?f=192)
-   -   Profile Enhancements - Customizable Roster (Member List) (https://vborg.vbsupport.ru/showthread.php?t=141311)

Sarcoth 03-05-2007 10:00 PM

Customizable Roster (Member List)
 
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)

Sarcoth 03-06-2007 03:16 PM

The following link is a post on my forums with directions on how to update profiles. Feel free to use it on your forums as well.

[How to] update your Character Profile

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

[How to] Add a Class Statistics Counter

I'm attaching instructions on how to add a Class Statistics Counter to your Vanguard Roster. You could easily do something similiar for any game, but you would need to alter the class names within the code.

anywares 03-06-2007 03:30 PM

Hmmm not sure ILL need it, but a very nice mod. Im sure some users will find it very helpfull :)

ZomgStuff 03-06-2007 09:04 PM

Wow this will come in VERY handy for me! Thanks!

ZomgStuff 03-06-2007 09:53 PM

Hm, no usernames are showing up!

Sarcoth 03-06-2007 10:03 PM

Rename showroster_usergroupbits to showroster_usergroupbit (drop the "s" at the end). I updated it above. Sorry about that, my bad.

I also cleaned the usergroupbit template up a bit. There was some uneeded code there. I'm going to work on cleaning up the showroster.php as time permits.

GrossKopf 03-07-2007 12:41 AM

Nevermind.. answer was at the bottom :)

Sarcoth 03-07-2007 08:37 PM

I'm guessing it is working for those of you that installed it. I haven't heard any other problems.

I'll make more updates here once I add more to it. Future additions will mainly be for Vanguard guilds.

turnipofdoom 03-08-2007 01:41 PM

I'm in the process of troubleshooting why I get a no-permission error when attempting to view the roster to see if the setup works. As of right now, it's not working for me.

Sarcoth 03-08-2007 03:27 PM

Make sure you have Enable Forum Leaders set to Yes.

Admincp > vBulletin Options > General Settings

Or, you can probably remove the following code from the showroster.php.

Code:

if (!$vbulletin->options['forumleaders'])
{
        print_no_permission();
}

Another problem might be whether or not a usergroup can view the Forum Leader page. I'll have to check the Usergroup permission for that. Removing the following code may fix that problem as well.

Code:

if (!($permissions & $vbulletin->bf_ugp_forumpermissions['canview']))
{
        print_no_permission();
}

Let me know how it works out.

Shana 03-08-2007 04:30 PM

Awesome; installing.

Edit: // Well it seems like it works but it only shows groups that are in the 'Forum Leaders' list. Anyway to make it show only those that appear on Members List? Everything else works smoothly

Sarcoth 03-08-2007 05:19 PM

Shana - Sorry, but right now I have it using the same list as the Forum Leaders. Thanks for pointing that out to me though, I updated Step #5 above. I originally had Memberlist there, but I should have had Forum Leaders.

This may not be ideal for your site, but for mine I changed 'Viewable on Show Groups' to No for all usergroups except for the ones I wanted to appear on the Roster.

Sarcoth 03-08-2007 06:03 PM

I removed some unneeded code from the showroster.php file. Redownloading the file is optional. Just copy it over your old showroster.php file.

Shana 03-08-2007 06:32 PM

Yeah, I did the 'Viewable on Show Group's thing. I don't mind that- just wondering if there's anyway to make it not only show those on Forum Leaders. Like, show those that are on Viewable on Show Groups only.

turnipofdoom 03-08-2007 06:51 PM

Hmmm, removal of those two snippets of code, or one of them, results in just a blank white page for me as opposed to the vBulletin error. I'm going to dig a bit more to see if I can't come up with the reason for the errors I'm getting.

Sarcoth 03-09-2007 01:23 PM

I updated the SHOWROSTER template; removed some extra unneeded code there. It may cause an error if you aren't using the newest showroster.php file that I uploaded yesterday.

I'll have some new updates next week.

1) A counter will be added for each group.
2) Vanguard guilds will have a lot more additional code. The code should be easily adaptable for EQ1 and EQ2 guilds as well, but it will be left up to you to figure it out.

Check out the link to my guilds roster if you want to see where I have it right now.

http://vanguard.sacredhaven.org/forums/showroster.php

oglsmm 03-09-2007 03:42 PM

Very nice mod. I used to to create one for FFXI.

My only question: How do I make it so that only the Members of the Linkshell can view the List?

I can't find anywhere to restrict who can see the forum leaders section.

Sarcoth 03-09-2007 04:30 PM

Sadly this isn't an option for UserGroup management, but there are a few ways you can accomplish this. Rather than upload a whole new showroster.php file, I'll give you the best and quickest way I can think of.

Open your SHOWROSTER template and replace it with the following code.
Code:

$stylevar[htmldoctype]
<html dir="$stylevar[textdirection]" lang="$stylevar[languagecode]">
<head>
$headinclude
<title>$vboptions[bbtitle] - $vbphrase[show_roster]</title>
</head>
<body>
$header
$navbar

<if condition="(is_member_of($bbuserinfo, 5, 6, 9, 10))">$usergroups<else /><center>You do not have permission to view this page! Turn back now or you will be beheaded!</center></if>

$footer
</body>
</html>

Update the numbers in ($bbuserinfo, 5, 6, 9, 10) to whatever usergroups you want to have access to that area. You can also upgrade the warning message to whatever you prefer.

I hope this helps.

Thanks for clicking install.

oglsmm 03-09-2007 09:46 PM

That worked great. Thanks a lot. This really is a great MOD for Guild sites. I've been looking for one forever, and finally there is one :p

One last question, is it possible to make the list sortable by the custom fields?

dbirosel 03-10-2007 05:43 PM

What if i want to add them manually to the list? I don't want them to edit there member profile and get automatically to a usergroup. Is it possible for me to add them manually and of course easier?

dbirosel 03-10-2007 06:07 PM

<a href="http://www.caraudiojunkyard.com/forum/showroster.php" target="_blank">www.caraudiojunkyard.com/forum/showroster.php</a>

Those who did not input anything on the field, how can they be invisible?

turnipofdoom 03-11-2007 02:42 AM

This did not appear to be compatable with the version of php I'm currently running, I ended up going with RosterMaster standalone (what I wouldn't give for it to be vB integrated.) Ah well, thanks, though, for creating this for the gaming community. We need more mods like this for games other than "that Blizzard one."

dbirosel 03-11-2007 03:09 PM

I want to change the filename and variables to "donationlist". If it's possible, how do i accomplish this?

Sarcoth 03-12-2007 01:48 PM

Quote:

Originally Posted by oglsmm
That worked great. Thanks a lot. This really is a great MOD for Guild sites. I've been looking for one forever, and finally there is one :p

One last question, is it possible to make the list sortable by the custom fields?

There is, but I'm not quite there yet. I plan to add this in the future though.


Quote:

Originally Posted by dbirosel
What if i want to add them manually to the list? I don't want them to edit there member profile and get automatically to a usergroup. Is it possible for me to add them manually and of course easier?

You can create or edit the fields so they can't be editable by the user. There is a selection for that. Go to Admincp > User Profile Fields > User Profile Field Manager. Click on Edit next to the fields you want to change and select 'No' for 'Field Editable by User'. You can then enter the data for each user by going to their user profiles; where you edit their membergroups.


Quote:

Originally Posted by dbirosel
Those who did not input anything on the field, how can they be invisible?

I hadn't thought about doing that since I'm rather strict. I gave all my members a deadline of two weeks. If they don't have it updated I'm removing them from the guild. I like to keep track of who updated their data. Not sure I'm going to go that route with this mod. I'm sure there is a way to do it though.


Quote:

Originally Posted by turnipofdoom
This did not appear to be compatable with the version of php I'm currently running, I ended up going with RosterMaster standalone (what I wouldn't give for it to be vB integrated.) Ah well, thanks, though, for creating this for the gaming community. We need more mods like this for games other than "that Blizzard one."

Sorry that didn't work for you. What version of PHP are you running?

Sarcoth 03-12-2007 01:55 PM

Quote:

Originally Posted by dbirosel (Post 1200870)
I want to change the filename and variables to "donationlist". If it's possible, how do i accomplish this?

There is an easy way and a harder way. You'll have to figure out the harder way on your own because it would take also updating the .php file. Follow all my steps above except rename the showroster.php to donationlist.php.

For Step 3, I would put 'Donation List' in for your text.

The .php file refers to the templates, not the other way around. So there shouldn't be any need to change anything else. If you have a problem let me know and I'll look into it some more for you.

sheryarpatel 03-13-2007 11:28 PM

hey nice mod
is their anyway that the data can be organized like form highest player level to the lowest or something like that?

Sarcoth 03-14-2007 11:01 AM

Quote:

Originally Posted by sheryarpatel (Post 1202923)
hey nice mod
is their anyway that the data can be organized like form highest player level to the lowest or something like that?

That question was already asked and is something I'm working on. :) I need to get something else done first though.

JeffreySmith 03-14-2007 01:32 PM

Hi, great mod man. really I mean it. Thanks.

But my problem is this:

The order that the usergroups show up in.

I currently have the following usergroup order:
1. admin ID 6
2. enlisted ID 12
3. officers ID 11

What I need:

1. admin ID 6
2. OFFICERS ID 11
3. enlisted ID 12

I would be fine in leaving it the way it is, but knowing my clan they are gonna want the Officer usegroup listed above the Enlisted guys.

Any ideas?

Thanks so much

Jeff

PS: The roster is located at: http://dmclanforum.com/showroster.php

Sarcoth 03-14-2007 03:12 PM

Jeff, I had the same problem. The groups are organized alphabetically. The way I got around it was renaming the groups a little.

My groups were originally: Guild Leader, Member, Officer, Recruit. I wanted Officer to be second, so I decided to rename it Guild Officer.

In your case, I would recommend renaming DM Enlisted to DM Member. Another option would be taking DM off the DM Enlisted. Not sure it will work for you, but that's the best advice I can recommend for that one. Sorry.

Please click install. :)

Sarcoth 03-15-2007 06:15 PM

Jeff, I found an answer for you while playing with some of the code.

This change will allow you to sort the groups by their groupid.

Open showroster.php

Find:
Code:

$t = strtoupper($user['title']);
Replace with:
Code:

$t = strtoupper($user['usergroupid']);
Then upload the updated showroster.php to your site.

FYI - Anyone that wants support, you need to click Install.

sheryarpatel 03-15-2007 11:30 PM

Quote:

Originally Posted by Sarcoth (Post 1203222)
That question was already asked and is something I'm working on. :) I need to get something else done first though.

woot ok can't wait for the changes :up:

JeffreySmith 03-20-2007 02:16 AM

Awesome, your da MAN! Thanks for the support my friend.

I clicked installed too.

Sarcoth 03-22-2007 12:17 PM

I've attached instructions on how to add a Class Statistics Counter to those Vanguard Rosters. You could easily do something similiar for any game, but you would need to alter the class names within the code.

Class Statistics Counter

hellbringer80 03-24-2007 07:47 PM

Hey sacroth, thanks for this mod, am using and lovin it. One question, I see on your demo site you have the groups organized, I have a group for ever rank in my clan kind of like what you have. However I need to order them by a mysql column that I made titled orderid... Is there anyway to order them in a different way then what they are. I tried adding a "ORDER BY orderid ASC" type code to the end of the mysql query you have set in the php file for showroster.php however you already have a order in alphabetical order that I just don't understand because I don't code with vB, only custom. If you could help me out on this, I would greatly appreciate it.

grecostimpy 03-24-2007 11:21 PM

I only get a blank white page unfortunately....

Here's what I did, I'm using your hack (brilliant, BTW) to display our member's Ebay Usernames from a custom profile field.

Here's what I did:

I uploaded showroster.php to my forum's root

I created a custom profile field called Ebay Usernames (field5)

I created a custom phrase (GLOBAL) with the varname: show_roster Text: Users on Ebay

I created the SHOWROSTER template exactly as shown in the instructions...no changes

I created the showroster_usergroup as shown below:

Code:

<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<tr>
        <td class="tcat" colspan="2">$user[title]</td>
</tr>
<tr>
        <td class="thead">$vbphrase[user_name]</td>
        <td class="thead">Ebay<br>Username</td>

       
$usergroupbits
</table>
<br />

I then created the template for showroster_usergroupbit as shown below:

Code:

<tr>
       
        <td class="$bgclass">
                <a href="member.php?$session[sessionurl]u=$user[userid]">$user[musername]</a>
        </td>
       
        <td class="$bgclass">$user[field5]</td>


</tr>

I then set View Forum Leaders to Yes (and changed all usergroups to show on the Forum Leader's list)

Any ideas why this would not be working? All I get is a blank white page.

Note: When I go into Vbulletin Options and disable the Forum Leader's Page, I get the permission error as opposed to the blank white page.

I know this is bit outside the scope you originally intended it, but I think its a great way to display custom profile fields.

Thanks for your help!

m002.p 03-25-2007 09:25 PM

Hi,

Im having a problem inserting an image into the "showroster_usergroupbit" template.

This is what I enter:

Quote:

<td align="center" class="$bgclass" nowrap="nowrap">$user[field10]
<img src="forum/images/flags/$post[field10].gif"></td>
The image doesnt seem to display even when the code works elsewhere.

Can you spot the problem?

Thanks in advance!

SgtOliver 03-26-2007 10:38 AM

Anyone know how I can include the persons avatar in this list? I have tried adding

Code:

<td><img src="$user[avatarurl]" $user[avatarsize] alt="<phrase 1="$user[username]">$vbphrase[xs_avatar]</phrase>" border="0" style="border:1px solid $stylevar[tborder_bgcolor]; border-top:none" /></td>

Sarcoth 03-26-2007 01:06 PM

Quote:

Originally Posted by hellbringer80 (Post 1211283)
Hey sacroth, thanks for this mod, am using and lovin it. One question, I see on your demo site you have the groups organized, I have a group for ever rank in my clan kind of like what you have. However I need to order them by a mysql column that I made titled orderid... Is there anyway to order them in a different way then what they are. I tried adding a "ORDER BY orderid ASC" type code to the end of the mysql query you have set in the php file for showroster.php however you already have a order in alphabetical order that I just don't understand because I don't code with vB, only custom. If you could help me out on this, I would greatly appreciate it.

Look at post #30 above. I think you may be able to get this to work by changing $user['title'] to $user['orderid'].

grecostimpy - I've only seen blank pages when something in the PHP file doesn't call up the correct template files. Double-check the names of your templates. I'll see if I can figure out any other problems that may be causing it.

m002.p - I'm not too keen on images in this hack, but try removing forum/ from that code.

SgtOliver - I'll look into it.

Sarcoth 03-26-2007 01:53 PM

Quote:

Originally Posted by SgtOliver (Post 1212612)
Anyone know how I can include the persons avatar in this list? I have tried adding

Code:

<td><img src="$user[avatarurl]" $user[avatarsize] alt="<phrase 1="$user[username]">$vbphrase[xs_avatar]</phrase>" border="0" style="border:1px solid $stylevar[tborder_bgcolor]; border-top:none" /></td>

I tested a few things but I couldn't get it to work. I can't really spend much time on it, sorry. I would suggest looking over the memberlist.php and using code from there. There will be a lot of if statements involved with it for sure. I'll try to get back to this eventually though. I'm interested in making it work.

Sarcoth 03-26-2007 02:29 PM

grecostimpy - I've looked over your process a dozen times and I don't see anything wrong with it. The only thing I can think of is that one of the templates are spelled incorrectly; typo maybe. Double check and let me know.


All times are GMT. The time now is 10:35 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.02880 seconds
  • Memory Usage 1,866KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (9)bbcode_code_printable
  • (10)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete