PDA

View Full Version : Profile Enhancements - Customizable Roster (Member List)


Pages : [1] 2

Sarcoth
03-05-2007, 10:00 PM
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 (https://vborg.vbsupport.ru/showthread.php?t=180432).

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 (https://vborg.vbsupport.ru/showthread.php?t=123253)" 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 (http://vanguard.sacredhaven.org/forums/showthread.php?t=3612)

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

[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.

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.

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.
$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
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.


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.


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.


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
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
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:
$t = strtoupper($user['title']);

Replace with:
$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
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 (https://vborg.vbsupport.ru/showpost.php?p=1197225&postcount=2)

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:


<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:

<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:

<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

<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
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
Anyone know how I can include the persons avatar in this list? I have tried adding

<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.

m002.p
03-26-2007, 02:35 PM
I have tried removing forum, but the directory "images" is within it, so its needed in order to display.

May I ask, why are you not so keen on images in this hack?

I mean your hack is brilliant but I wanted to add the IM icons and an xfire icon too which of course requires an image as well as makes it look better than just pure text.

However I would understand the authors wish if so...

EDIT: After including the full link to the image and not including "$post[field10].gif" the image displayed. Any ideas if that code mentioned above is incorrect or is unsupported?

hellbringer80
03-26-2007, 03:08 PM
I changed it to orderid, and all it does is put every user in one group and messed it all up =/

m002.p
03-26-2007, 04:00 PM
When researching further into this, I believe that a particular variable needs to be customised in the showroster.php file.

Only thing is, looking at the code im not sure where it is located.

Could this be something to do with the other issues above also?

Sarcoth
03-26-2007, 05:01 PM
moo2.p - By keen, I didn't mean I wasn't interested in putting images in it. I was hoping to eventually do that as well. I just meant I haven't tried it yet so I didn't know an answer. I'll see what I can find out about the $post variable. I haven't used it before so not sure what it is. Can you tell me another page where it is used?

hellbringer80 - What table is the orderid located in?

m002.p
03-26-2007, 05:29 PM
Sorry, I didnt understand properly before. Ok well.. This variable will post a particular field or image so to speak like $post[field10] etc.

The variable is also used in templates such as "postbit_legacy"

Do a search to see the uses, but here are some examples:

$post[musername]
$post[usertitle]
$post[avatarurl]
$post['joindate']
$post[signature]

Hope this helps...

Out of interest, do you have xfire? I would be happy to help you on this one if needed :)

Regards

Matt

hellbringer80
03-26-2007, 05:43 PM
orderid is int he groups table

Sarcoth
03-26-2007, 06:07 PM
moo2 - NP. Sadly, no chat programs here at work and I really don't use any of them cept for MSN a couple times a week. I rarely have time for them since I'm usually playing Vanguard when I'm at home. :) I need to work today, so not sure I'll get to work on this much more till tomorrow. I'll be sure to check into it though.

hellb - I'm guessing you mean the usergroup table right? Not sure why it isn't working. Can you export your usergroup table (.sql) when you get a chance and send it to me. You can rename it to .txt. I think that will help me figure this out. I'll look into it more today if I get the time else tomorrow.

m002.p
03-26-2007, 06:13 PM
Ok no problem Sacroth. Keep me informed on how it goes as I think adding images to it would be a good step for a clan roster.

Thanks for your time

Sarcoth
03-26-2007, 06:50 PM
Hi,

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

This is what I enter:

<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!

Just out of curiousity, what is field10 set to and what's in it?

m002.p
03-26-2007, 08:05 PM
field10 is set to the country of a user. Like UK, Germany, France etc

This is linked to a image (.gif) on the server which means using $post[field10].gif will result in it displaying the members country flag on the roster :)

grecostimpy
03-26-2007, 08:52 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.

I triple checked.....unfortunately, they are all good.

Edit: Figured it out...see two posts down.

m002.p
03-26-2007, 09:58 PM
Ok ive managed to understand the variant and add images. This is my example below:

www.sog-team.co.uk/forum/showroster.php

This is the information contained in the templates:

showroster_usergroup

<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<tr>
<td class="tcat" colspan="8">$user[title]</td>
</tr>
<tr>
<td class="thead">$vbphrase[user_name]</td>
<td align="center" class="thead">Real Name</td>
<td align="center" class="thead">Country</td>
<td align="center" class="thead">Flag</td>
<td align="center" class="thead">Games</td>
<td align="center" class="thead">Contact</td>
<td align="center" class="thead">Xfire</td>


$usergroupbits
</table>
<br />

showroster_usergroupbit

<tr>

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

<td align="center" class="$bgclass" nowrap="nowrap">$user[field12]</td>
<td align="center" class="$bgclass" nowrap="nowrap">$user[field10]
</td>
<td align="center" class="$bgclass" nowrap="nowrap"><img src="images/flags/$user[field10].gif"></td>
<td align="center" class="$bgclass" nowrap="nowrap">$user[field8]</td>
<td align="center" class="$bgclass" nowrap="nowrap"><a href="private.php?$session[sessionurl]do=newpm&amp;u=$user[userid]" rel="nofollow"><img src="images/imagesblue/sendpm.gif" Border=0></a>
<a href="sendmessage.php?$session[sessionurl]do=mailmember&amp;u=$user[userid]" rel="nofollow"><img src="images/imagesblue/email.gif" Border=0></a>
<td align="center" class="$bgclass" nowrap="nowrap"><if condition="$user[field14]"><a href="xfire:add_friend?user=$user[field14]"><IMG STYLE="border: none;" SRC="images/misc/icon_xfire.gif"></a></if></td>



</tr>

And of course in order to do that (add images) you need to user the "$user" variant opposed to "$post" even though it could be added to the php file

Hope that helps

grecostimpy
03-26-2007, 11:03 PM
OK...I figured it out.

I had ALL of my usergroups included on the View Forum Leaders. (Namely because I want all my users to show on this special page if they filled out the custom field irregardless of their usergroup).

Problem is, there's too many to list...so the white page.

When I took the biggest usergroup off of the View Forum Leaders...the page started displaying perfectly.

So...two things:


Is there a way to not display users who do not have the custom profile field filled out? (Filter them out) This way, only the users whohave a value in the field show on the page and users who have not filled out the custom profile field are ignored
Can we have it so it displays 50 or so users, then starts a new page (a la the memberlist)

Sarcoth
03-27-2007, 11:55 AM
field10 is set to the country of a user. Like UK, Germany, France etc

This is linked to a image (.gif) on the server which means using $post[field10].gif will result in it displaying the members country flag on the roster

Are your gif files in the same format as the country names?

Meaning. If Germany is their country, are you referring to Germany.gif?

EDIT: I just saw your second post. That's exactly what I was going to be suggesting as long as the files were in the same format as the country name. Otherwise, I was going to put some code in the PHP file that would make the whole word lowercase. Glad you got it working.

Sarcoth
03-27-2007, 12:05 PM
OK...I figured it out.

I had ALL of my usergroups included on the View Forum Leaders. (Namely because I want all my users to show on this special page if they filled out the custom field irregardless of their usergroup).

Problem is, there's too many to list...so the white page.

When I took the biggest usergroup off of the View Forum Leaders...the page started displaying perfectly.

Well that's something I never expected. How many users do you have?


Is there a way to not display users who do not have the custom profile field filled out? (Filter them out) This way, only the users whohave a value in the field show on the page and users who have not filled out the custom profile field are ignored


I can definitely do that, should be very easy. How many profile fields are you using and I'm guessing you only want them filtered out if all the fields are blank? Meaning, if they even fill in one of the fields, they'll be on the list.



Can we have it so it displays 50 or so users, then starts a new page (a la the memberlist)


Sorry, that's not the direction I'll be going with the the roster.

grecostimpy
03-27-2007, 02:34 PM
Thanks Sarcoth,

I'd like it to only show users who have entered anything into field5. (so if nothing was entered in field5, they would not be included)

Thanks a lot for your assistance!

Sarcoth
03-27-2007, 03:05 PM
I'd like it to only show users who have entered anything into field5. (so if nothing was entered in field5, they would not be included)

Open the showroster.php file and find:
if (sizeof($groupcache) >= 1)
{
ksort($groupcache); // alphabetically sort usergroups
foreach ($groupcache AS $users)
{
ksort($users); // alphabetically sort users
$usergroupbits = '';
foreach ($users AS $user)
{
exec_switch_bg();
$user = process_showgroups_userinfo($user);

($hook = vBulletinHook::fetch_hook('showgroups_user')) ? eval($hook) : false;
eval('$usergroupbits .= "' . fetch_template('showroster_usergroupbit') . '";');
}

($hook = vBulletinHook::fetch_hook('showroster_usergroup')) ? eval($hook) : false;
eval('$usergroups .= "' . fetch_template('showroster_usergroup') . '";');
}
}

Change to:
if (sizeof($groupcache) >= 1)
{
ksort($groupcache); // alphabetically sort usergroups
foreach ($groupcache AS $users)
{
ksort($users); // alphabetically sort users
$usergroupbits = '';
foreach ($users AS $user)
{
if ($user['field5'] != '') {
exec_switch_bg();
$user = process_showgroups_userinfo($user);

($hook = vBulletinHook::fetch_hook('showgroups_user')) ? eval($hook) : false;
eval('$usergroupbits .= "' . fetch_template('showroster_usergroupbit') . '";');
}
}

($hook = vBulletinHook::fetch_hook('showroster_usergroup')) ? eval($hook) : false;
eval('$usergroups .= "' . fetch_template('showroster_usergroup') . '";');
}
}

Let me know how that works.

SgtOliver
03-27-2007, 04:17 PM
I managed to get the users avatar working in mine using https://vborg.vbsupport.ru/showthread.php?t=83150

I am using this for more of an "About Us" page http://www.goblinarmy.com/community/aboutus.php

My showroster_usergroup

<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<tr>
<td class="tcat" colspan="3">$user[title]</td>
</tr>
<tr>
<td class="thead">Member</td>
<td class="thead">Biography</td>
<td class="thead">Favorites</td>


$usergroupbits
</table>
<br />


My showroster_usergroupbit

<tr height=150>

<td class="$bgclass">
<a href="member.php?$session[sessionurl]u=$user[userid]">$user[musername]</a><br>$user[usertitle]<br>
<if condition="$vbulletin->userinfo['avatarid']">
<img src="$user[avatarpath]" alt="$bbuserinfo[username]'s Avatar" border="0" />
<else />
<if condition="$vbulletin->userinfo['hascustomavatar']">
<if condition="$vbulletin->options['usefileavatar']">
<img src="$vboptions[avatarurl]/avatar$user[userid]_$user[avatarrevision].gif" title="$user[username]'s Avatar" alt="Avatar" border="0" />
<else />
<img src="image.php?u=$user[userid]&amp;dateline=$avatar[dateline]" title="$user[username]'s Avatar" alt="Avatar" border="0" />
</if>
<else />
<img src="$stylevar[imgdir_misc]/noavatar.gif" alt="guestavatar.gif" title="No Avatar Specified" border="0" />
</if>
</if>
</td>



<td class="$bgclass"><b>Real name:</b><br>
$user[field14]<br><br>
<b>Location:</b><br>
$user[field2]<br><br>
<b>Ocupation:</b><br>
$user[field4]<br><br>
<b>Interests:</b><br>
$user[field3]</td>


<td class="$bgclass"><b>Map:</b><br>
$user[field13]<br><br>
<b>Second Map:</b><br>
$user[field15]<br><br>
<b>Weapon:</b><br>
$user[field11]<br><br>
<b>Sec Weapon:</b><br>
$user[field12]</td>






</tr>

Sarcoth
03-27-2007, 05:18 PM
That great SgtOliver. The funny thing is I have been working on it since yesterday and just got it work about an hour ago but went out to lunch. I'll post my changes here for you anyhow. Use them if you are interested.

Open the showroster.php file.

***************************

Find:
require_once('./global.php');

Below it add:
require_once(DIR . '/includes/functions_user.php');

***************************

Find:

($hook = vBulletinHook::fetch_hook('showgroups_user')) ? eval($hook) : false;
eval('$usergroupbits .= "' . fetch_template('showroster_usergroupbit') . '";');


Above it add:

$avatarurl=fetch_avatar_url($user[userid]);

if (!$avatarurl) {
$avatarurl = 'images/spacer.gif';
} else {
$avatarurl = $vbulletin->options['bburl'] . '/' . $avatarurl[0];
}

$avatarimage='<img src="'.$avatarurl.'" border="0">';


***************************

Add a column for the Avatar header to your showroster_usergroup template.
<td class="thead">Avatar</td>

***************************

Add a column for the Avatar image to your showroster_usergroupbit template.
<td class="$bgclass">$avatarimage</td>

***************************

You would also have to make some table adjustments (ie. colspan) to get it all even again.

The spacer.gif image I am using is attached if you want to use that as well.

That's it.

m002.p
03-27-2007, 08:27 PM
Thanks Sacroth.

I have another question, how do you create the title for the page like the one in your demo "Clan Roster"?

Ie the title you have "Sacred Haven - Vanguard Guild Roster"

Sarcoth
03-27-2007, 08:30 PM
I updated the hack to version 1.02 for anyone that is interested.

I am planning to add the ability to sort the columns but I'm concerned what effect that will have on the current design. I like the current usergroup/user look of it. If that doesn't flow with sorting, I may have to make a separate hack for it.

BTW, please pay close attention to the fact that I changed the names of some variables. You do not need to do this upgrade if you are happy with your current version. If you update, follow all the steps over again so you don't miss anything.

Thank you to all those that have installed this hack.

m002.p
03-27-2007, 08:32 PM
Great "First Install" :D

Sarcoth
03-27-2007, 08:33 PM
Thanks Sacroth.

I have another question, how do you create the title for the page like the one in your demo "Clan Roster"?

Ie the title you have "Sacred Haven - Vanguard Guild Roster"

Here's the code I use for my SHOWROSTER template. You'll have to make adjustments depending on the template you are using. BTW, that's my real guild roster too. Makes a great demo I think. :)

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

<table width="100%" cellpadding="0" cellspacing="0" border="0">
<td width="9" height="6"><img width="9" height="6" border="0" src="images/Darkness/darkness/a4.gif"></td>
<td width="100%" height="6" background="images/Darkness/darkness/a5.gif"></td>
<td width="9" height="6"><img width="9" height="6" border="0" src="images/Darkness/darkness/a6.gif"></td>
</table>

<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<tr align="center">
<td class="tcat">Sacred Haven - $vbphrase[show_roster]</td>
</tr>
</table>

<table width="100%" cellpadding="0" cellspacing="0" border="0">
<td width="9" height="6"><img width="9" height="6" border="0" src="images/Darkness/darkness/a1.gif"></td>
<td width="100%" height="6" background="images/Darkness/darkness/a2.gif"></td>
<td width="9" height="6"><img width="9" height="6" border="0" src="images/Darkness/darkness/a3.gif"></td>
</table><BR>

$usergroups (or $rosterheader)

$footer
</body>
</html>

Brian31fl
03-27-2007, 08:36 PM
can u make it where its shows differant groups than forum leaders?

Sarcoth
03-27-2007, 08:38 PM
can u make it where its shows differant groups than forum leaders?

What do you mean Brian? I'm willing to give you help with almost anything on this. I'm having a lot of fun with the coding. Learning something new everytime someone asks me a question. :)

Also, check back to the following post in case that answers your question.

https://vborg.vbsupport.ru/showpost.php?p=1204306&postcount=30

Brian31fl
03-27-2007, 08:46 PM
What do you mean Brian? I'm willing to give you help with almost anything on this. I'm having a lot of fun with the coding. Learning something new everytime someone asks me a question. :)

Also, check back to the following post in case that answers your question.

https://vborg.vbsupport.ru/showpost.php?p=1204306&postcount=30

basicly i want the roster to show differant usergroups then whats on the forum leaders page is it possable to do that?

m002.p
03-27-2007, 08:54 PM
the new mod doesnt seem to be functioning Sacroth. The page doesnt display (ie the usergroup bits) :S

Sarcoth
03-27-2007, 08:56 PM
Oh. Yes, it is possible. That is something I am working on as well. I forgot to mention that in post #61. My goal is to steer away from the showgroups and include a new group. I could probably get it working with a few code adjustments in the .php file, but I'd rather get it done the right way. Sounds like something I should focus on next and just put sorting off a little longer.

I'll send out an update message when I get that one done.

Sarcoth
03-27-2007, 08:58 PM
the new mod doesnt seem to be functioning Sacroth. The page doesnt display (ie the usergroup bits) :S

Did you follow the new steps? I'll verify everything when I get home. Time for me to go.

Brian31fl
03-27-2007, 09:00 PM
Oh. Yes, it is possible. That is something I am working on as well. I forgot to mention that in post #61. My goal is to steer away from the showgroups and include a new group. I could probably get it working with a few code adjustments in the .php file, but I'd rather get it done the right way. Sounds like something I should focus on next and just put sorting off a little longer.

I'll send out an update message when I get that one done.

okay thanks would like to see that :) since i want my forum leaders and guild roster seperate.

thanks for the fast reply

grecostimpy
03-27-2007, 09:04 PM
Let me know how that works.

PERFECT! Thank you so much!

Only problem is it still crashes (white screens) when I try to include all usergroups.

Hmmmm....we'll get it figured out!

Sarcoth
03-27-2007, 09:40 PM
PERFECT! Thank you so much!

Only problem is it still crashes (white screens) when I try to include all usergroups.

Hmmmm....we'll get it figured out!

Try upgrading to the new version. Maybe we'll get lucky and that will have fixed the problem. I removed a bunch of code and maybe part of it was causing the white screen on your forums. I wish I could generate the same problem as you for testing.

Sarcoth
03-27-2007, 09:56 PM
Pay close attention to the following changes if you do upgrade to the new version. I would recommend just going through all the steps again and copying the updated templates.

Templates were renamed:

SHOWROSTER stayed the same.
showroster_usergroup was renamed to showroster_header
showroster_usergroupbit was renamed to showroster_userbits


Variables in templates were renamed:

In SHOWROSTER: $usergroups was renamed to $rosterheader
In showroster_header: $usergroupbits was renamed to $rosterbits


Sorry for any confusion but I'm trying to fork away from the showgroups page.

grecostimpy
03-27-2007, 11:11 PM
Templates were renamed:

SHOWROSTER stayed the same.
showroster_usergroup was renamed to showroster_header
showroster_usergroupbit was renamed to showroster_userbits



FYI: In the instructions you have it renamed to showroster_rosterbits. Mine was not working until I realized the difference.

Unfortunately, still getting the white screen of death on large usergroups....my main registered users group (which is the one it fails on) only has around 1,800 users. Any ideas?

grecostimpy
03-27-2007, 11:20 PM
...also...(sorry for so many requests)

Since the php file changed, could you show what edits I would need to make to only show users who have filled out custom profile field 5 again (I tried myself, but could not make it work)

Sarcoth
03-28-2007, 12:03 AM
FYI: In the instructions you have it renamed to showroster_rosterbits. Mine was not working until I realized the difference.

Unfortunately, still getting the white screen of death on large usergroups....my main registered users group (which is the one it fails on) only has around 1,800 users. Any ideas?

Ahhh, thanks for pointing that out. I apologize for the typo. :)

1,800 users. Really not sure why it would be failing. I'll see if I can come up with a way to page it out for you, but that is probably a bit above my knowledge right now. I'll see if I can figure it out.

...also...(sorry for so many requests)

Since the php file changed, could you show what edits I would need to make to only show users who have filled out custom profile field 5 again (I tried myself, but could not make it work)

NP. I'm actually enjoying this.

Find:
foreach ($users AS $user) {
exec_switch_bg();
$usercount++;
$avatarurl=fetch_avatar_url($user[userid]);
if (!$avatarurl) {
$avatarurl = 'images/spacer.gif';
} else {
$avatarurl = $vbulletin->options['bburl'] . '/' . $avatarurl[0];
}
$avatarimage='<img src="'.$avatarurl.'" border="0">'; //Use $avatarimage in userbits to display avatars
eval('$rosterbits .= "' . fetch_template('showroster_userbits') . '";');
}

Change to: foreach ($users AS $user) {
if ($user['field5'] != '') {
exec_switch_bg();
$usercount++;
$avatarurl=fetch_avatar_url($user[userid]);
if (!$avatarurl) {
$avatarurl = 'images/spacer.gif';
} else {
$avatarurl = $vbulletin->options['bburl'] . '/' . $avatarurl[0];
}
$avatarimage='<img src="'.$avatarurl.'" border="0">'; //Use $avatarimage in userbits to display avatars
eval('$rosterbits .= "' . fetch_template('showroster_userbits') . '";');
}
}

grecostimpy
03-28-2007, 12:25 AM
Thanks Sarcoth....

As for the large usergroups...

I'm wondering if something similar can be done as what was with the Timeslip database. It created custom profile fields for all users and then only showed users who had them filled out. Not sure how they got around the white screens, but perhaps someone can chime in?

Again...thanks for all of your help. You truly are a great supporter of your product!

ssslippy
03-28-2007, 02:26 AM
ok what code should I replace to pick the usergroups manually, is this possible. Would be much easier for me as I need to have multiple rosters.

ssslippy
03-28-2007, 02:31 AM
Ahhh, thanks for pointing that out. I apologize for the typo. :)

1,800 users. Really not sure why it would be failing. I'll see if I can come up with a way to page it out for you, but that is probably a bit above my knowledge right now. I'll see if I can figure it out.



NP. I'm actually enjoying this.

Find:
foreach ($users AS $user) {
exec_switch_bg();
$usercount++;
$avatarurl=fetch_avatar_url($user[userid]);
if (!$avatarurl) {
$avatarurl = 'images/spacer.gif';
} else {
$avatarurl = $vbulletin->options['bburl'] . '/' . $avatarurl[0];
}
$avatarimage='<img src="'.$avatarurl.'" border="0">'; //Use $avatarimage in userbits to display avatars
eval('$rosterbits .= "' . fetch_template('test_showroster_userbits') . '";');
}

Change to: foreach ($users AS $user) {
if ($user['field5'] != '') {
exec_switch_bg();
$usercount++;
$avatarurl=fetch_avatar_url($user[userid]);
if (!$avatarurl) {
$avatarurl = 'images/spacer.gif';
} else {
$avatarurl = $vbulletin->options['bburl'] . '/' . $avatarurl[0];
}
$avatarimage='<img src="'.$avatarurl.'" border="0">'; //Use $avatarimage in userbits to display avatars
eval('$rosterbits .= "' . fetch_template('test_showroster_userbits') . '";');
}
}

Slight error in this code, you have 'test_showroster_userbits' and it should be 'showroster_userbits'

Sarcoth
03-28-2007, 02:50 AM
ok what code should I replace to pick the usergroups manually, is this possible. Would be much easier for me as I need to have multiple rosters.

That's my primary project for this hack right now. I'll let you know once I have it working.

Slight error in this code, you have 'test_showroster_userbits' and it should be 'showroster_userbits'

Thanks for pointing that out. I use a test_ page for making changes. I forgot to drop the prefix before posting the code.

ssslippy
03-28-2007, 05:49 AM
Ive got the code here. Ill leave it up to u to make it so u can like make these changes inside the admin panel.
$users = $db->query_read_slave("
SELECT user.*, usergroup.usergroupid, usergroup.title, user.options, usertextfield.*, userfield.*,
IF(displaygroupid=0, user.usergroupid, displaygroupid) AS displaygroupid, infractiongroupid
FROM " . TABLE_PREFIX . "usergroup AS usergroup
LEFT JOIN " . TABLE_PREFIX . "user AS user ON(user.usergroupid = usergroup.usergroupid OR FIND_IN_SET(usergroup.usergroupid, user.membergroupids))
LEFT JOIN " . TABLE_PREFIX . "userfield AS userfield ON(userfield.userid = user.userid)
LEFT JOIN " . TABLE_PREFIX . "usertextfield AS usertextfield ON(usertextfield.userid=user.userid)
WHERE (usergroup.usergroupid = 161 or usergroup.usergroupid = 168 or usergroup.usergroupid = 145 or usergroup.usergroupid = 170 or usergroup.usergroupid = 164)
");

Ive got a working example here http://immortal-guild.net/forums/showrostervanguard.php, i still have to change my usergroup ids so i can sort them by that.

Sarcoth
03-28-2007, 01:07 PM
Ive got the code here. Ill leave it up to u to make it so u can like make these changes inside the admin panel.
WHERE (usergroup.usergroupid = 161 or usergroup.usergroupid = 168 or usergroup.usergroupid = 145 or usergroup.usergroupid = 170 or usergroup.usergroupid = 164)

Ahhhh, I didn't put () after the WHERE, which is why my tests were not working. Thanks Ssslippy. I'll get around to testing soon. My FTP appears to be down at the moment. Either that or my work realized I was doing a lot of FTP and blocked the port. Oh well.

Sarcoth
03-28-2007, 05:18 PM
Removed this post to prevent confusion.

Enjoy!!!

Brian31fl
03-28-2007, 10:53 PM
edit is now working can be seen here http://sacred-dragoons.com/forums/showroster.php
now to figure how to arrange the usergoup to show the right ones in order

Brian31fl
03-28-2007, 11: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:
$t = strtoupper($user['title']);

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

Then upload the updated showroster.php to your site.

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


never mind i solved it with this small change that was posted a while ago seems to be working great good job buddy

grecostimpy
03-29-2007, 12:02 AM
You guys are going to love this...I hope.

I've only tested this in my test site so far, so use at your own risk. It is working for me though, so you shouldn't have any issues. I'll keep testing it for the rest of the day and wait for some brave souls to test it out. After that, I'll put the whole hack together in a nice install file for your enjoyment.

Here is what you need to do.

Step 1: Download the attached showrosterpermissions.zip file.

Step 2: Copy the new showroster.php to the /forum/ directory.

Step 3: Copy the bitfield_showroster.xml to the /forum/includes/xml/ directory.

Step 4: Admincp > Plugin & Products > Manage Products > Add/Import Product
Import the showroster.xml file.

Step 5: 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 see the showroster page.
Set "Viewable - Should this usergroup be viewable on the Showroster page?" to Yes for the groups you want to show on the showroster page.


ZIP file is attached. I am anxiously awaiting your feedback.

Enjoy!!!

Awesome!

Still white screens on large usergroups though. :(

Sarcoth
03-29-2007, 12:05 AM
Brian - Great to hear!

As soon as I get all the code together, I'll start up a new hack thread in the Mod forum. I'll keep supporting this one here for those that wish to only make design template changes. The new one will be using the install found in post #83 above. I have a lot more things I want to add to it before posting it though.

Sarcoth
03-29-2007, 12:07 AM
Awesome!

Still white screens on large usergroups though. :(

greco - Do you happen to have that problem with the actually showgroups page?

grecostimpy
03-29-2007, 02:21 AM
greco - Do you happen to have that problem with the actually showgroups page?


Yes, if I try to include a large usergroup, it white screens as well. I guess the roster page uses the same basic setup (hence the issue on both)?

grecostimpy
03-29-2007, 02:29 AM
OK Sarcoth...this was not a problem with your hack. My php was not allotting enough memory to perform this task. Once I upp'ed it to 32M, it works fine now.

Thanks for all your help once again.

Sarcoth
03-29-2007, 02:11 PM
OK Sarcoth...this was not a problem with your hack. My php was not allotting enough memory to perform this task. Once I upp'ed it to 32M, it works fine now.

Thanks for all your help once again.

Awesome, great news!!! You are welcome and glad I could help.

gator777
03-29-2007, 02:26 PM
With your last version, I was able to display these entries...

<td class="$bgclass" nowrap="nowrap">$user[onlinestatus]</td>
<td class="$bgclass" nowrap="nowrap">$user[lastonline]</td>

But now they don't show up. What do I need to do/add to get these to show up in the showroster_userbits template?

Thanks in advance for your help!

Sarcoth
03-29-2007, 05:39 PM
With your last version, I was able to display these entries...

<td class="$bgclass" nowrap="nowrap">$user[onlinestatus]</td>
<td class="$bgclass" nowrap="nowrap">$user[lastonline]</td>

But now they don't show up. What do I need to do/add to get these to show up in the showroster_userbits template?

Thanks in advance for your help!

Ahhh, sorry about that. I didn't know anyone was using it. I put the code back in and will be sure to include it in the new version.

Updated showroster.php is attached below.

gator777
03-29-2007, 06:32 PM
It worked great, and thanks for all your hard work. :D

You see what I did with it [here (http://www.the-armory.net/forum/showroster.php)]

Sarcoth
03-29-2007, 06:35 PM
It worked great, and thanks for all your hard work. :D

You see what I did with it [here (http://www.the-armory.net/forum/showroster.php)]

You're welcome. Too bad your site is blocked from .mil. I'll check it out later from home.

gator777
03-29-2007, 07:08 PM
You're welcome. Too bad your site is blocked from .mil. I'll check it out later from home.
LOL, yea, I am retired .mil, so I know.

Also, the number count does not appear next to the usergroup name in the heading as shown on your site. Maybe I did something wrong. :D

Brian31fl
03-29-2007, 07:47 PM
now only if i could get the tables to line up properly :(
i did some template edits to get the roster to show up like this seen here.http://sacred-dragoons.com/forums/showroster.php


here are the new edits

open showroster_header

and over write code with this

<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<tr>
<td class="tcat" colspan="9">$user[title]</td>
</tr>
<tr>
<td class="thead"><center>$vbphrase[user_name]</center></td>
<td class="thead"><center>Character Name</center></td>
<td class="thead"><center>Character Class</center></td>
<td class="thead"><center>Character Level</center></td>
<td class="thead"><center>Character Sex</center></td>
<td class="thead"><center>Avatars</center></td>

$rosterbits
</table>
<br />

then open the template showroster_userbits

and overwrite code to this
<tr>

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

<td class="$bgclass" nowrap="nowrap"><center>$user[field6]</center></td>
<td class="$bgclass" nowrap="nowrap"><center>$user[field8]</center></td>
<td class="$bgclass" nowrap="nowrap"><center>$user[field10]</center></td>
<td class="$bgclass" nowrap="nowrap"><center>$user[field11]</center></td>
<td class="$bgclass"><center>$avatarimage</center></td>

</tr>

this is not a required change it was a personal preferance of mine.

Sarcoth
03-29-2007, 07:50 PM
LOL, yea, I am retired .mil, so I know.

Also, the number count does not appear next to the usergroup name in the heading as shown on your site. Maybe I did something wrong. :D

showroster_header updated in post #1. Thanks for spotting it.

<td class="tcat" colspan="9">$user[title] &nbsp; ($usercount)</td>

Sarcoth
03-29-2007, 07:51 PM
now only if i could get the tables to line up properly :(

Brian, html and tables are my top skills. Link me your showroster and post the code for your _header and _userbits. I'll get that working for you in no time.

Brian31fl
03-29-2007, 07:56 PM
bump check the post above it was edited with the information

Sarcoth
03-29-2007, 08:08 PM
bump check the post above it was edited with the information

Ohhh, I thought you meant line up in regards to header vs. rows. You mean they don't all have the same column width. That's easy enough. Just edit the _header template. Copy the following.

<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<tr>
<td class="tcat" colspan="9">$user[title] &nbsp; ($usercount)</td>
</tr>
<tr>
<td class="thead" width="15%"><center>$vbphrase[user_name]</center></td>
<td class="thead" width="20%"><center>Character Name</center></td>
<td class="thead" width="15%"><center>Character Class</center></td>
<td class="thead" width="15%"><center>Character Level</center></td>
<td class="thead" width="15%"><center>Character Sex</center></td>
<td class="thead" width="20%"><center>Avatars</center></td>

$rosterbits
</table>
<br />

I also updated the counter in the group title for you (&nbsp; ($usercount)). Take it out if you don't like it.

Brian31fl
03-29-2007, 08:16 PM
thanks buddy like my skin for my guild site ?

Sarcoth
03-29-2007, 08:26 PM
thanks buddy like my skin for my guild site ?

Yes. I especially like the runed side and bottom borders.

BTW, don't forget to upload that spacer.gif file to your /forum/images/ folder. That will get rid of those little red x image errors.

Brian31fl
03-29-2007, 09:26 PM
oh okay didnt see them i use firefox yeah i started doing that theme during my xmas vaction and still keep improving it btw great job on the guild hack

m002.p
03-30-2007, 06:50 PM
Hi again Sacroth, ive upgaded to your new 1.02 with success bar the username display. You have changed the variable $user[musername] to $user[username]. I use colour coded usernames so this new variable I dont like :( could I request you add the old one too?

Thanks & GJ

EDIT: I noticed the showroster.php you added above for Gator included the $user[musername] variable. I tried this by overwriting the current on server only to get a db error mentioning that this is unrecognised in the db :s

WHERE (usergroup.showrosterviewpermissions = 1)

If you want I can post the whole message ;)

Thanks

Sarcoth
04-02-2007, 01:48 PM
Hi again Sacroth, ive upgaded to your new 1.02 with success bar the username display. You have changed the variable $user[musername] to $user[username]. I use colour coded usernames so this new variable I dont like :( could I request you add the old one too?

Thanks & GJ

EDIT: I noticed the showroster.php you added above for Gator included the $user[musername] variable. I tried this by overwriting the current on server only to get a db error mentioning that this is unrecognised in the db :s

WHERE (usergroup.showrosterviewpermissions = 1)

If you want I can post the whole message ;)

Thanks

moo2 - I'm not sure I understand. I'm going to go ahead and update the hack and you can try that. See if that fixes your problem. I have it all working on my test site. I'll help you if I can.

Sarcoth
04-02-2007, 03:20 PM
I just updated the showroster hack with various changes. Please don't upgrade to it if you used the permissions installer. It isn't making use of the permissions. That will be introduced in my variation hack I plan to release soon. If you have any problems with this hack or my permissions test from last week, let me know and I'll do my best to help.

grecostimpy
04-02-2007, 11:47 PM
Still using the permissions version...working great!

lulanglo
04-03-2007, 03:09 PM
Hi Sarcoth,
really nice roster, I am trying to modifie the code to our guild need and i would like to have an icon instead of the name of the class, I am not a Vbulletin guru do you think you could help me ?

I created a Single-Selection Menu user profile field with a selection of 8 classes, what I am trying to do is do a if condition and show the right class icon acording to the selection.

here is what I tried but i cant get it to work :(

<td class="$bgclass" nowrap="nowrap">
<if condition="$user[field6] = warrior "><img src="images/classes/warrior_icon.gif" alt="Warrior" /><else />$user[field6]</if></td>

the icon is showing up but the problem is, it showing up even if field6 does not equal warrior...... and how can i do multiple statement ? like if it warrior show warrior_icon.gif and the same for 8 different class ?

Thank you.

Sarcoth
04-03-2007, 06:38 PM
Hi Sarcoth,
really nice roster, I am trying to modifie the code to our guild need and i would like to have an icon instead of the name of the class, I am not a Vbulletin guru do you think you could help me ?

I created a Single-Selection Menu user profile field with a selection of 8 classes, what I am trying to do is do a if condition and show the right class icon acording to the selection.

here is what I tried but i cant get it to work :(

<td class="$bgclass" nowrap="nowrap">
<if condition="$user[field6] = warrior "><img src="images/classes/warrior_icon.gif" alt="Warrior" /><else />$user[field6]</if></td>

the icon is showing up but the problem is, it showing up even if field6 does not equal warrior...... and how can i do multiple statement ? like if it warrior show warrior_icon.gif and the same for 8 different class ?

Thank you.

Try this instead.

Open the showroster.php file.

Find:

$usercount++;

Below it add:

$classurl = 'images/spacer.gif';
if ($user[field9] == 'Warrior') { $classurl = 'images/classes/warrior.gif'; }
if ($user[field9] == 'Bard') { $classurl = 'images/classes/bard.gif'; }
$classimage = '<img src="'.$classurl.'" border="0" alt="'.$user[field9].'">';

Add more if { } lines for additional classes and change the $classurl path to match the location and names of your images.

Then go to the showroster_userbits template.

Use this instead of the code you are using:

<td class="$bgclass" nowrap="nowrap">$classimage</td>

I don't see the need for a conditional here here as long as you list all the class if statements in the .php file. Since you already supply the user with a drop down with all the classes, they can't enter their own.

I hope that helps. I tested it and worked for me. :)

lulanglo
04-05-2007, 04:01 PM
thank you very much ! :)

Is there a easy way to change how the roster is sorted ?

right now it sorted by group, admin,moderator,member, etc...

I would like to have them sort by class,race,lvl, etc.. better have a drop down to change the sort type.

ill start working on something :) havent touch php in year, I am really rusty hehe :D

cerulean
04-05-2007, 04:11 PM
Are you able to have multiple Guilds in this?

Also is there a way to input the information from the screen and not through the code?

Sarcoth
04-05-2007, 05:58 PM
Upgrade is complete.

Enjoy!

Sarcoth
04-05-2007, 06:30 PM
Are you able to have multiple Guilds in this?

Also is there a way to input the information from the screen and not through the code?

If you create a field for the guild name, I don't see why not. Would take some coding to get them to sort separately though. You could always code a different showroster.php for each guild too. Then just use the field with the guild name filtered for each page.

Would take some additional work, but it is doable. Good luck.

m002.p
04-05-2007, 07:40 PM
First install again!!!

Fantastic work mate all my problems are solved.

This is what i did with your great work:

http://www.sog-team.co.uk/forum/showroster.php

Approve? lol

Thanks a bunch & the hard work paid off :)

Matt

Sarcoth
04-05-2007, 07:57 PM
Looks awesome moo2.p. I'm glad you like it.

JBMoney
04-06-2007, 03:46 PM
Is there a way to set this so that it uses a vbulletin style template OTHER than the default?

Sarcoth
04-06-2007, 08:00 PM
Is there a way to set this so that it uses a vbulletin style template OTHER than the default?

My roster uses my specialized forum template, not the default. It looks like moo2.p is using his specialized forum template as well. What are you trying to do?

JBMoney
04-06-2007, 09:07 PM
Maybe a better choice of words is simply style.

I'd like to use a style other than my forum's default style. I haven't seen a place where I can change the style for this page.

Sorry for the misstatement.

m002.p
04-06-2007, 09:11 PM
nps dude... ^ easy mistake ;)

@Sarcoth - Thanks mate, really enjoyed working closely with your great coding ability on this one ;) trial and error they say lol

cerulean
04-06-2007, 09:21 PM
How can I change the sort so it isnt by username but by say Field11?

Sarcoth
04-07-2007, 06:01 AM
How can I change the sort so it isnt by username but by say Field11?

Please remember to click installed.

Right now it is by group title and then username, so I'm assuming you want to keep the group and then do field11 in place of username.

Open the showroster.php.

Find:

$u = strtoupper($user['username']);

Replace with:

$u = strtoupper($user['field11']);

That's it. :)

Sarcoth
04-07-2007, 06:07 AM
Maybe a better choice of words is simply style.

I'd like to use a style other than my forum's default style. I haven't seen a place where I can change the style for this page.

Sorry for the misstatement.

I'm sorry JB, I'm still not sure what you mean. I'm more than willing to help if I can.

Are you trying to change the layout of the showroster.php page?

@ moo2.p - I'm working hard to get the coding for sorting put in this as well. I am hoping to have that included in the next update. I came up with a good way to handle it today and now just need to get the code together.

m002.p
04-07-2007, 07:31 PM
@JB > if you mean the showroster.php forum style, you need to edit the templates for the particular style you have not the default style templates. Like Sarcoth im not understanding what you mean but im sure we could help ;)

@Sarcoth > im looking forward to the release it has helped me learn alot more about variables & coding. I like my roster now thanks to your work but doesnt mean to say i wont install it and see whats new :)

Good Job.. are you planning to release any other hacks clan or guild related? lol

Matt

Sarcoth
04-07-2007, 10:15 PM
@ moo2.p - Well, I got the sorting to work on my test server. I need to play with it a bit more so it looks nice and then I'll get it added to my live version so others can see it in action. I should have it ready for release on Monday or Tuesday.

I'm always up for making new things useable for my guild site, but I don't have any idea's right now. The roster has always been a biggy for me.

Sarcoth
04-08-2007, 03:05 PM
I've gotten the sorting put together for the most part. I still need to work out a few parts of the code. Take a look at my test example on my guild site. Let me know if the sorting interests you.

Showroster Sort Testing (http://vanguard.sacredhaven.org/forums/test_showroster.php)

The sorting bar is just beneath the ShowRoster Title. I'll get the color for that changed later as well so it stands out more.

m002.p
04-08-2007, 05:22 PM
yea i like that alot mate. I would utilize that for my site also.

Good job and keep up the good work!

JBMoney
04-09-2007, 02:50 PM
Are you trying to change the layout of the showroster.php page?

My main forums use a certain style.

My gaming forum use a different style.

I'd like the roster to use the style that the gaming forum uses, not the style that the main forums use.

How can I set that or customize it?

Sarcoth
04-09-2007, 05:19 PM
Sorry guys. I'm going to have a delay on getting an update out. I also won't be active her for about a week. Something has come up and I'll be on travel till next week.

@JBMoney - Can you give us a link to your site for an idea of what you mean. I'm not quite sure how you are using two different styles. I'll try to help you when I get back.

cerulean
04-09-2007, 05:40 PM
I see your Mod relies on a file that is downloaded from another area. I would like to use this program to its full extent but our site is not WOW. Any easy way to convert this or give the way this file looks so we can use it.

JBMoney
04-09-2007, 06:40 PM
Sorry, I don't know any other way to describe it. At my place, different sub-forums use different styles. I thought that was pretty common in vb world. I didn't want to use my forum's default style for the game roster.

e.g. the default, http://bressler.org/forum/index.php
e.g. a subforum, http://bressler.org/forum/forumdisplay.php?f=10
e.g. gaming forum, http://bressler.org/forum/forumdisplay.php?f=8

If there's not a way to set it dynamically, I can just strip out and replace $header in the SHOWROSTER template. Fortunately, so far, the difference is limited to mostly the banner. Just means I'll have to change that template by hand every time I change styles.

JBMoney
04-09-2007, 07:18 PM
Great mod, btw!

I'm using it in conjunction with 'Extra Profile Fields Page v.2.1.0', which gives me a separate place for folks to enter their character info. Only a small % of my members are involved with the gaming guild, so it keeps those form fields from being combined with the general info form fields.

odie3
04-10-2007, 01:09 AM
I wonder if I could use this some how for our roster but we play First Shooter games [BF2:PR and sometimes Americas Army]....

Brian31fl
04-13-2007, 04:50 AM
I wonder if I could use this some how for our roster but we play First Shooter games [BF2:PR and sometimes Americas Army]....

yeah you can you just have to make the profile fields you need.... I have a guildwars guild site and i use this for that ill show an exsample altho its an older version havent had time to mess with the new 1 but i do have it downloaded.
http://sacred-dragoons.com/forums/showroster.php

m002.p
04-13-2007, 11:30 AM
Hey nps Sarcoth, there is only so much you can do ;)

I also have a question;

Could it be possible to add a total member count?

$usercount is used for catergory totals, but what about an absolute total of all catergories? It could be displayed next to the showroster title....

Sarcoth
04-13-2007, 02:52 PM
I see your Mod relies on a file that is downloaded from another area. I would like to use this program to its full extent but our site is not WOW. Any easy way to convert this or give the way this file looks so we can use it.

Cerulean - What file do you mean? This Mod has no connection to WoW or any other game, it should be useable for just about any site or for any reason. I use it for my Vanguard: Saga of Heroes guild. My Mod can work well with the Extra Profile Field hack if that is what you mean. I think using that hack will make it easier to use this Mod if you are using profile fields.

Sarcoth
04-13-2007, 02:55 PM
Sorry, I don't know any other way to describe it. At my place, different sub-forums use different styles. I thought that was pretty common in vb world. I didn't want to use my forum's default style for the game roster.

e.g. the default, http://bressler.org/forum/index.php
e.g. a subforum, http://bressler.org/forum/forumdisplay.php?f=10
e.g. gaming forum, http://bressler.org/forum/forumdisplay.php?f=8

If there's not a way to set it dynamically, I can just strip out and replace $header in the SHOWROSTER template. Fortunately, so far, the difference is limited to mostly the banner. Just means I'll have to change that template by hand every time I change styles.

The good news, I understand what you mean now. I'll look into this for you soon as I get back from my travel. I'm sure there is a way to do it. Just figuring it out is the key. :)

Great mod, btw!

I'm using it in conjunction with 'Extra Profile Fields Page v.2.1.0', which gives me a separate place for folks to enter their character info. Only a small % of my members are involved with the gaming guild, so it keeps those form fields from being combined with the general info form fields.

Thanks. Yea, that I think is the best way to do it when you are using profile fields.

Sarcoth
04-13-2007, 02:57 PM
I wonder if I could use this some how for our roster but we play First Shooter games [BF2:PR and sometimes Americas Army]....

This game be used for any game or site that would like to display a roster with profile fields. I think it has a lot of use. I don't see why you couldn't use it for a FPS game.

Sarcoth
04-13-2007, 02:59 PM
moo2.p - Yea, that would be easy to do. I'll give you a file update next week when I get back. I'll make sure to have that in the next upgrade as well. I always meant to have it in there, but kept getting side-tracked with other options.

lulanglo
04-13-2007, 03:34 PM
Hey Sarcoth !

I really love the sort feature you have on your roster how did you do it ?

another thing i like is the joined date, I am trying to use $user[joindate] but i end up with the unix date, how did you format it ?

Cheer!

cerulean
04-13-2007, 04:32 PM
Cerulean - What file do you mean? This Mod has no connection to WoW or any other game, it should be useable for just about any site or for any reason. I use it for my Vanguard: Saga of Heroes guild. My Mod can work well with the Extra Profile Field hack if that is what you mean. I think using that hack will make it easier to use this Mod if you are using profile fields.






Main Settings
SQL Debug Output on off
Debug Mode on off
SQL Window on off
Min CP Version
Min GP version
Min PvPLog version
Roster Main Language deDE -enUS- esES frFR
Website Address
Roster URL
char.php Compatibility Mode on off
Interface Directory URL
Interface Image Extension -jpg- png gif
Alt Interface Image Extension jpg png -gif-
Roster Images Directory URL
Timezone
Time Offest -12 -11 -10 -9 -8 -7 -6 -5 -4 -3.5 -3 -2 -1 -0- +1 +2 +3 +3.5 +4 +4.5 +5 +5.5 +6 +6.5 +7 +8 +9 +9.5 +10 +11 +12 +13
Allow upload of PvPLog Data yes no
Addon Update Triggers on off

When I go into the Admin.php file and hit Guild config I get a block for

Guild Name
Server Name
Guild Description
Server Type -PvE- PvP RP RPPvP
Alt-Text Search
Alt-Search Field -Player Note- Officer Note Guild Rank Number Guild Title



And if I click on Roster tab I get - Could not find guild: 'The GuildFriends' for server ''
You need to load your guild first and make sure you finished configuration

Click here for installation instructions



Also when I click on update progile it is asking for CharacterProfile.Lua and PvPLog.Lua.

Where to some of these files exist or where do I add them.

If I have to add them what format do I need?

Sarcoth
04-15-2007, 03:23 PM
@ lulanglo - I'm back in town and should have the sorting feature posted this week. I didn't change anything in my joined date time, it is probably still from a default setting. My guess is you may have changed something regarding display date in the settings.

@ cerulean - That isn't from my Mod. The only admin settings to change for my Mod are in the usergroups and the phrases.

m002.p
04-15-2007, 07:38 PM
Hey Sarcoth im looking forward to your new version. Ill keep myself informed of the progress you make.

Looking forward to the total member count & also the sorting bit ;)

Also a question; in the add-on (class stats) what could i use that for? Any ideas etc? Obviously my clan isnt based around the game you have so its a little tricky :(

Cheers & hope you had a good easter break from all this :p

Matt

m002.p
04-15-2007, 08:55 PM
Ah i also had an addition to post regarding this mod which will need sarcoths approval before added to the mod as an option etc

Basically in order to have the feel of better intergration with the forums; the little touch of adding some info to the "whos online" page, rather than the current "Unknown Location" message may help you ;)

This is what you very simply need to do:

1. On your web FTP server find this file located in the forum directory:

/includes/functions_online.php

2. Open it via a text editor and find:

case 'bugs.php':
$userinfo['activity'] = 'bugs';
break;

3. Underneath add this code:

case 'showroster.php':
$userinfo['activity'] = 'showroster';
break;

4. Now find this code:

case 'modcplogin':
$userinfo['action'] = $vbphrase['moderator_control_panel_login'];
break;

5. After this code add:

case 'showroster':
$userinfo['action'] = 'Viewing Clan Roster';
break;

*Note: You can change the "Viewing Clan Roster" text to anything you desire but I would suggest using either "Viewing Clan Roster" OR "Viewing Guild Roster"

Hope it helps you add a final touch to this great mod :)

Matt

Sarcoth
04-17-2007, 01:27 PM
Ahhh, yes. That "Who's Online" addition comes from one of my favorite articles, "How to create your own vBulletin-powered page! (https://vborg.vbsupport.ru/showthread.php?t=62164)"; not sure if it was posted elsewhere. Thanks for pointing that out moo2.p. I'll definitely be sure to add that in my update.

I'm not really sure what you could use the class stats for. A possibility could be to show the number of people that play SWAT 4, SWAT 4: DSS, and BF2. The only problem is that some people can do more than one so it would be more difficult to code. You'd have to make a lot of changes to that field as well so personally it isn't worth going that route. Other than that, you could do it for countries, but you'd have to manually change it anytime someone joined from a new country. Too much work in my opinion. I don't think it is needed for your roster.

lulanglo
04-17-2007, 04:54 PM
@ lulanglo - I'm back in town and should have the sorting feature posted this week. I didn't change anything in my joined date time, it is probably still from a default setting. My guess is you may have changed something regarding display date in the settings.

@ cerulean - That isn't from my Mod. The only admin settings to change for my Mod are in the usergroups and the phrases.

Hey Sarcoth,
really nice to hear the sorting feature will be available soon ! we really apreciate all the time you are puting in this growing project !
for the joined date, i just dont know what to put in my showroster_userbits...

<td class="$bgclass" nowrap="nowrap">$user[joindate]</td> ????

Thank.

Luc

m002.p
04-17-2007, 06:03 PM
To be honest it was a thread ive never seen. I knew that process due to coding I do on my own site and my knowledge of php code learnt at college. Nevermind, I will certainly follow up those threads.

Thanks for the info too Sarcoth, ill keep the add-on in my mind anyway :)

BTW... when is the new version of the mod expected?

Matt

Mookie
04-18-2007, 09:40 PM
Sarcoth, I am loving the hack but a few admins on my gaming site (http://www.trggaming.net) and I are wondering, is it possible to have Multiple Rosters for each game that we play?


Thanks ahead of time.

EDIT: I am using 'Extra Profile Fields Page' (https://vborg.vbsupport.ru/showthread.php?t=123253)for the guild roster profile input fields.

m002.p
04-19-2007, 06:18 AM
Yes Mookie, I think it is.

You would need to rename the showroster.php each time along with any other uploads to something different.

Then for it to display correctly you would have to create secondary usergroups for each game and then mod which members appear on each roster. I think it maybe hard to do though and I wouldnt be inclined to try just incase :s

Maybe Sarcoth with know more.

However you could add an extra profile field called "games" then have a dropdown for the games your members play. Then add it to the roster with icons or just text.

Have a look www.sog-team.co.uk/forum/showroster.php

Good luck

Matt

Mookie
04-19-2007, 07:06 AM
Let me see if i am understanding you. Each Guild Rank has to have its own Usergroup. Or is there a option where the user can select if he or she is a member of that game.

Also a few suggestions for a update would be:

Make a Option for addition of multiple games.
Option for user to select which games they would like to be display on.
A feature where the Web Admin can select the users rank and if not they go to a predetermined Rank.
Incorperate the 'Extra Profile Fields Page' (https://vborg.vbsupport.ru/showthread.php?t=123253) into the hack to seperate the game input rosters.


And if you can do all this I will drop some money in that bank account :D

m002.p
04-19-2007, 05:14 PM
Mookie half of that is already availiable.

You just select a custom public usergroup and on the members primary usergroup check "allow users to join public groups".

Well no, the secondary usergroup would be checked for that game and then under display usergroup, change it to the primary or the game. Im sure one must work ;)

Like i said i havent tried it, but i think in theory i know what i mean :s

Sarcoth
04-19-2007, 07:13 PM
Just a quick update. Being out of work a week caused some backlog. I'm almost caught up with that, but I have been working on the sorting feature whenever I get some free time. Even though I have the sorting feature working on my site, I'm trying to get the coding down to the minimum needed. If I were to have released it last week, you would have to make numerous changes just to get it to work on your site. I've cut that down quite a bit, but you'll still need to make changes. I'm going to be releasing this as a separate mod for those that don't need the sorting feature. I really don't see it needed for everyone.

@ Mookie - Like M002.p stated, it can be done, but you'd need to rename a lot of files and coding for each game you want a roster for. I think M002.p's suggestion would be best. You'd want to have a extra profile field where the user gets to select which game he plays.

Regarding those suggestions. I use to have a paragraph suggesting users of this mod use the Extra Profile Fields Page mod. I guess I removed it when I upgraded. I'll be sure to readd it. The top two suggestions are really going outside the scope of this mod, I really don't even know where to start to make something like that work. I don't understand the third suggestion, can you elaborate?

m002.p
04-19-2007, 07:59 PM
No problem Sarcoth, I cant wait for the release. Ive been on the forums visiting this thread anxiously lol!

If you need any help with testing or anything like that to relieve you slightly, my email is

All the best to you and good luck!

Sarcoth
04-19-2007, 08:52 PM
SHOWROSTER - Version 1.1.1 (Manual Update)

In the meantime, for those wishing to add a total count of members to their roster, you can make the following adjustments on your own. I'm going to go ahead and update the main zip file as well for new comers. That way you could just download the new file and upload the new showroster.php file to your server. I'd recommend making a manual update to the SHOWROSTER template rather than uninstalling and reinstalling the mod. This adjustment is small.

Step 1: Admincp > Styles & Templates > Expand > ShowRoster Templates > SHOWROSTER
Find:
<td class="tcat" colspan="7">$vbphrase[showroster_title]</td>
Replace with:
<td class="tcat">$vbphrase[showroster_title]<div style="position: absolute; right:9%">Member Count: $totalcount</div></td>
You'll need to adjust the right:#% depending on what works best for your site. It represents how far from the right margin it appears. Trial and error.

Step 2: Edit the showroster.php file and upload it to the /forum/ directory.
Find:
if ($permissions['showrosteraccesspermissions'] & $vbulletin->bf_ugp['showrosteraccesspermissions']['showrosteraccess']) {
$rosterheader = '';
if (sizeof($groupcache) >= 1) {
ksort($groupcache); // Alphabetically Sort Usergroups
foreach ($groupcache AS $users) {
ksort($users); // Alphabetically Sort Users
$rosterbits = '';
$usercount = '';
foreach ($users AS $user) {
//if ($user['field#'] != ''){ //Step 1 - If you wish to limit blank fields from appearing, remove the front two slashes and change field# to a field of your choice
exec_switch_bg();
$user = process_showgroups_userinfo($user);
$usercount++;
Replace with:
if ($permissions['showrosteraccesspermissions'] & $vbulletin->bf_ugp['showrosteraccesspermissions']['showrosteraccess']) {
$rosterheader = '';
$totalcount = '';
if (sizeof($groupcache) >= 1) {
ksort($groupcache); // Alphabetically Sort Usergroups
foreach ($groupcache AS $users) {
ksort($users); // Alphabetically Sort Users
$rosterbits = '';
$usercount = '';
foreach ($users AS $user) {
//if ($user['field#'] != ''){ //Step 1 - If you wish to limit blank fields from appearing, remove the front two slashes and change field# to a field of your choice
exec_switch_bg();
$totalcount++;
$usercount++;
$user = process_showgroups_userinfo($user);
Rather than do Step 2 manually, you can just download the new showroster_1.1.1.zip file and upload the showroster.php file.

Mookie
04-19-2007, 10:47 PM
m002.p and Sarcoth thanks for the reply. I am also waiting on the release of the column sort before installing but I will be adding this for sure (even if just for one game).

Sarcoth I was just coming up with some ideas for you incase you where a little stumped on what to try and add next. The 3rd one was more of a admin feature that would allow administrators to demote and promote users in the roster easily. But what i am understanding the primary user group has to be there game rank. The problem that I run into is with numberous games I have Members in some games and in other games they are officers. Would the secondary user group for that game allow them to be displayed in the Officer area if I have the secondary user group set to Officer of the desired game. I hope i explained that a little better. If not then I will play around with it once the new update comes out. Thanks again.

Sarcoth
04-20-2007, 02:04 PM
@ Mookie

I really like suggestions since I sometimes run out of idea's on my own, so keep them coming. :) I might not be able to use them all though. Some things just won't work with the current code and some other things are beyond my abilities at this time. I was thinking more about the multi-game setup and I may have an idea on how to pull it off. Don't expect it for awhile though.

In regards to the 3rd suggestions, I think it is already very easy to promote/demote users. The roster doesn't just look at the primary groups, it looks at primary and/or secondary. On my forum, all my users are in the registered primary usergroup except for myself and my officers. I am in the guild leader primary group and my officers are in the guild officers primary usergroup. I use my member and recruit groups as secondary groups and change my users to those groups as needed. So, as you can see, my roster mod makes use of all groups. It will only show the groups you ask it to show. If I changed the registered user group to appear on the roster as well, you would see many users appear in the member group and the registered user group; they would appear in both.

So, if you wanted to use this roster for multiple games. You could have secondary groups for each game + ranking. For example, Vanguard - Member, Vanguard - Recruit, EverQuest - Member, Everquest - Recruit, WoW - Member, WoW - Recruit. Then every user would appear in their correct group and you would only have to use one roster page.

I hope I understood your question.

Sarcoth
04-20-2007, 02:12 PM
I made a small correction in the SHOWROSTER - Version 1.1.1 (Manual Update) (https://vborg.vbsupport.ru/showpost.php?p=1231488&postcount=154) as well as the main download.

It seems I was telling you to use showroster_sort_title in the SHOWROSTER template when it should have been just showroster_title. The showroster_sort_title is something I'm using on my test sort page.

BTW, another small update on my progress. I figured out a way to add the sorting to this mod without creating a whole new one. I will be adding the sorting as a optional change rather than forcing it on everyone.

Sarcoth
04-20-2007, 03:32 PM
<font size="3">SHOWROSTER - Version 1.1.2 (Manual Update)</font>

I found it easier to add the sorting than I originally thought. So, rather than make a new version of this mod with sorting, I was able to just make the sorting optional. The code will already be placed in the showroster.php file so all you have to do is edit the SHOWROSTER template to get the sorting to work.

Step 1: Download the new showroster_v1.1.2.zip file. Unzip it and upload the showroster.php file to the /forum/ directory.

Step 2: Read the Optional.txt file and follow the instructions for #1; editting the SHOWROSTER template.

----------------------------------------

Those of you less code savey may want to uninstall the last version and just reinstall the new product-showroster.xml file. If you go that route though, you'll still need to make updates to the templates if you have made changes to them. Let me know if you have any problems.

Enjoy!

m002.p
04-20-2007, 03:45 PM
Great work mate. Im on the case of upgrading it :)

Thanks for your time and one of the best clan hacks out there ;)

m002.p
04-20-2007, 04:07 PM
Hmm ive just installed and get this:

http://www.sog-team.co.uk/forum/showroster.php

It appears the "<" correspond to the usergroup member count :s

Any ideas?

BTW also the member count is not in the header correctly; am I correct in thinking that this "right%" is only to adjust the alignment of the total count text? Im guessing some code is set incorrectly here :s

EDIT: I think the "showroster_sort_title" isnt correct. The phrase doesnt appear on the roster as it is not in the phrase manager.

Thanks

Matt

Sarcoth
04-20-2007, 06:01 PM
Hmm ive just installed and get this:

http://www.sog-team.co.uk/forum/showroster.php

It appears the "<" correspond to the usergroup member count :s

Any ideas?

BTW also the member count is not in the header correctly; am I correct in thinking that this "right%" is only to adjust the alignment of the total count text? Im guessing some code is set incorrectly here :s

EDIT: I think the "showroster_sort_title" isnt correct. The phrase doesnt appear on the roster as it is not in the phrase manager.

Thanks

Matt

Matt, how did you upgrade? Did you start from scratch? It looks like you have an extra < somewhere.

The "right: #%" is only for adjusting alignment away from the right margin.

Yea, I did it again. I was supposed to take the "_sort" part out of the optional.txt. I'm going to update it now with the correct update. I'll also relook over the code to see if a < was added somewhere on accident.

m002.p
04-20-2007, 06:07 PM
I was running the first version you released. I backed up the templates then imported your product allowing overwrite.

I then noticed the old templates were left "showroster_usergroups" & "showroster_usergroupbits" then reverted those to delete.

The showroster template got overwritten as you would expect.

Thanks Sarcoth

Matt

Sarcoth
04-20-2007, 06:14 PM
Regarding the "<". Look at the top line of your showroster_userbit template. :)

I bet it looks like: <<tr>

m002.p
04-20-2007, 06:17 PM
you were close lol it was the "<td" underneath :)

Thanks Sarcoth

BTW.... regarding the Member count text, is that my genuine fault or some coding? :s

Sarcoth
04-20-2007, 06:22 PM
NP. :)

BTW.... regarding the Member count text, is that my genuine fault or some coding? :s

I don't understand, it looks correct to me. You are free to change the words or edit it another way if you like. I was just providing a default.

m002.p
04-20-2007, 06:24 PM
ah i see now.....

You must be using Net explorer.

Try using Firefox ;)

The error is clearly seen

But yes for some reason IE seems to correct it :)

Sarcoth
04-20-2007, 06:26 PM
Ahhh, my bad. Sorry, I can only use IE here at work, so because of that, I do the same at home. Feel free to change the coding around to work with all browsers.

BTW, the sorting looks great on your roster. I can probably come up with a way for the group title to work for the username group as well. I'll post something shortly.

m002.p
04-20-2007, 06:30 PM
Thats the thing... im not sure what is wrong with the code. Here is what I see:

Could you perhaps identify what might need changing?

http://www.sog-team.co.uk/gallery/file.php?n=28&w=o

^ Thanks, yes i will have a play myself if you dont object, but i will look forward to hearing from you regarding that :)

Sarcoth
04-20-2007, 06:40 PM
It looks like Firefox forces "DIV" to go to the next line like it would normally do in IE. The only reason IE doesn't put it on the next line is because of the "position: absolute". Maybe change the <div and </div> to <span and </span>.

For your username thing, do this:

First, change the [musername] to just musername without the brackets in the SHOWROSTER template.

Then in your showroster_header template:

Find:
<tr>
<td class="tcat" colspan="10">$user[$groupsort] &nbsp; ($usercount)</td>
</tr>

Change to:
<tr>
<if condition="($groupsort == 'musername')"><td class="tcat" colspan="10">Usernames &nbsp; ($usercount)</td>
<else /><td class="tcat" colspan="10">$user[$groupsort] &nbsp; ($usercount)</td></if>
</tr>
That should work like a charm. :)

m002.p
04-20-2007, 06:49 PM
You are one hell of a coder ;)

Fantastic work I cannot fault it one bit ;)

BTW... are you going to add that "whos online" status to your instructions?

Instead of doing it the way I did, you can add the code to the showroster.php file also ;)

Ask me if you need any code for it.

Matt

This needs nominating as mod of the month :)

Sarcoth
04-20-2007, 07:02 PM
Thank you. (/bow) I feel this is all child's play though compared to what some of the coders here at vbulletin can do. I'm very proud that so many are using my mod though. Even more so with all those posting how they like it.

Yea, I forgot to add the "who's online" status to my instructions. If there is a way to add it to the .php file instead, I'll gladly go that route. Please tell. :)

m002.p
04-20-2007, 08:15 PM
Ive just had a go myself trying it and i can confirm success. However I have found it easier adding plugins, which can be added to that product you have. I will give it a go so *deep breaths*

1) You need to add a plugin first.

Go to admin CP > Plugins & Products > Add Plugin

2) Info as follows:

Product > showroster hack
Hook Location > online_location_process
Title > Showroster WOL Process
Execution Order > 5
Plugin PHP Code >
if ($filename == 'showroster.php')
{
$userinfo['activity'] = 'showroster';
}
Plugin is active > Yes

3) Add another Plugin:

Product > Showroster hack
Hook Location > online_location_unknown
Title > Showroster WOL Display
Execution Order > 5
Plugin PHP code >if ($userinfo['activity'] == 'showroster')
{
$handled = true;
$userinfo['action'] = 'Viewing Clan / Guild Roster';



Save both templates & then your done.

Alternatively, I made you a new product with it included. Simply overwrite product & your done.
BEWARE: If you are upgrading then backup those templates! I would advise you to do it the manual way!

__________________________________________________ ___________________________

I have tested it and spent a good few hours developing it so this better pay off! LOL

NOTE: If you install the product, then it uses "Viewing Guild Roster" as the status. You can change it (if you are like me and have a clan) by going:

Admin CP > Plugins & Products > Plugin Manager > Showroster Hack > Showroster WOL Display

then you can change the code by choosing edit :)


All the best mate, I hope it helps you like you have helped me :)

Matt

Sarcoth
04-20-2007, 08:53 PM
Thanks Matt. Sometimes I wonder where my head is at. I actually knew how to do that. I learned it while helping someone else with another mod. Do I remember it for my own mod? Course not. I'll make sure to have it updated here. Thanks again.

anywares
04-20-2007, 09:23 PM
*clicks install* Thanks alot :)

Brian31fl
04-21-2007, 12:09 PM
great work man gets better and better might wanna update your options file with this spent an hour sorting roster by groupid here how tofix that in the new showroster.php

Find:
$t = strtoupper($user[$groupsort]);

after add:
$t = strtoupper($user['usergroupid']);

when done the changes should look like this:

$t = strtoupper($user[$groupsort]);
$t = strtoupper($user['usergroupid']);
$u = strtoupper($user[$usersort]);

hope this helps

~Brian

Brian31fl
04-21-2007, 07:01 PM
yo sarcoth for your class stat mod can u look at my page
http://sacred-dragoons.com/forums/showroster.php?

and look at the changes and help me make it look more uniform?

modifyed text file attached

ShawnV
04-22-2007, 01:12 PM
Awesome mod, clicks install, nominated for MOTM!

Cheers,

_V

ShawnV
04-22-2007, 01:20 PM
yo sarcoth for your class stat mod can u look at my page
http://sacred-dragoons.com/forums/showroster.php?

and look at the changes and help me make it look more uniform?

modifyed text file attached

Very nice,

Wouldn't it be better to just standardize the classes for the stats and put multiple choice buttons in the UserCP, ergo: Defensive Fighter, Offensive Fighter, Divine Healers, Arcane Casters, and then make the code add those, so you don't have to change everything every time your guild changes games?

Cheers,

_V

Sarcoth
04-22-2007, 04:16 PM
great work man gets better and better might wanna update your options file with this spent an hour sorting roster by groupid here how tofix that in the new showroster.php

Find:
$t = strtoupper($user[$groupsort]);

after add:
$t = strtoupper($user['usergroupid']);

when done the changes should look like this:

$t = strtoupper($user[$groupsort]);
$t = strtoupper($user['usergroupid']);
$u = strtoupper($user[$usersort]);

hope this helps

~Brian

Brian, that change there would pretty much kill sorting I think. That is fine if you don't want sorting, but I wouldn't make that change in the master. You'd be better off just replacing the default $t with yours since the first one gets ignored.

I would actually recommend going back to the default though and instead making another change.

Find:
if ($groupsort == '') { $groupsort = 'title'; $grouptitle = 'title'; }

Replace with:
if ($groupsort == '') { $groupsort = 'usergroupid'; $grouptitle = 'usergroupid'; }

Does the same thing though so really not important. I'll have to update my optional instructions though, so thank you. :)

Sarcoth
04-22-2007, 04:23 PM
Brian & Shawn - I look at your class statistics files tomorrow.

m002.p
04-22-2007, 05:07 PM
Thanks for the update Sarcoth ;)

Nice to see the online status added :)

Brian31fl
04-22-2007, 10:49 PM
Brian, that change there would pretty much kill sorting I think. That is fine if you don't want sorting, but I wouldn't make that change in the master. You'd be better off just replacing the default $t with yours since the first one gets ignored.

I would actually recommend going back to the default though and instead making another change.

Find:
if ($groupsort == '') { $groupsort = 'title'; $grouptitle = 'title'; }

Replace with:
if ($groupsort == '') { $groupsort = 'usergroupid'; $grouptitle = 'usergroupid'; }

Does the same thing though so really not important. I'll have to update my optional instructions though, so thank you. :)

nvm read the code explained thanks with my class stastics there are 10 char classes

warrior,monk,mesmer,necromancer,ranger,elementalis t,assassin,ritualist,paragon, and dervish would like some help on it when you have time

ShawnV
04-23-2007, 12:13 PM
Brian & Shawn - I look at your class statistics files tomorrow.


Awesome mate, thanks. :up:

Cheers,

_V

Sarcoth
04-23-2007, 05:56 PM
BTW, for those interested, I just started on a new hack. It is going to take me away from here a little so don't plan to see an update for awhile. I'll keep posting fixes and assistance with this one in the meantime though.

I'm not giving out any info on the new hack until I'm done, so don't ask. All I will say is that it will come in handy for my guild, just not sure it will be useful for everyone.

ShawnV
04-24-2007, 05:54 PM
Sounds interesting, looking forward to it, let me know if you didn't get my PM with the email.

Cheers,

_V

m002.p
04-24-2007, 07:55 PM
yep will be interesting & nice to look forward too

Good luck!

Sarcoth
04-25-2007, 05:46 PM
Power has been out at work for the last day and a half. I made an update to the class_statistics.txt file for those interested. It is located in the 2nd post of this thread; HERE (https://vborg.vbsupport.ru/showpost.php?p=1197225&postcount=2).

redtailboa
05-05-2007, 06:01 PM
Man it would be nice to tie in forum users to the xml files that EQ2 and VG and other games put out. So you link them and you dont have to have the person list their characters. Maybe give them an option to add their Alts to their "info"

Sarcoth
05-08-2007, 04:01 AM
You can always get the VG Guild Roster (https://vborg.vbsupport.ru/showthread.php?t=142066) instead. My hack is mostly for use anywhere by using profile fields. I use an XML to connect to vgplayers.com to keep my roster updated. The only thing my members really need to enter is their race and sub-crafting class. If you want something similiar to that, I can be hired. Just send me a PM if you are interested. I can probably set up something for EQ2 as well.

Wolf Link
05-16-2007, 08:06 PM
Will this hack only work with a specific game? Can it be used for Battlefield Two?

So far, it's the nicest looking clan mod i've seen, and I can't seem to find anything directly related to BF2.

m002.p
05-18-2007, 12:14 AM
Yes this mod will work with any game. The mod does not depend on the game as it is made as a customised & more sophisticated "showgroups.php" and the subject could be anything in truth. You could utilise this hack as a more detailed "view forum leaders".

Ive used mine for SWAT 4

Wolf Link
05-18-2007, 03:35 AM
Yes this mod will work with any game. The mod does not depend on the game as it is made as a customised & more sophisticated "showgroups.php" and the subject could be anything in truth. You could utilise this hack as a more detailed "view forum leaders".

Ive used mine for SWAT 4

Thank you, sir. I've made up my mind, now.
*installs*

Appreciate it :)

Sarcoth
05-18-2007, 07:14 PM
Wolf, sorry I didn't get back to you on that sooner. Thanks m002.p.

VenomMaster
05-30-2007, 07:46 PM
Hi there,

fist i have to say that this mod is awesome. :D

Second, i got my first question: I use this on my site (http://www.kommando-xiv.de/board/showroster.php), and now i tried to integrate my Award System with this.

But - sorry to say - it doesn't work! :eek:

How can i make the awards show up in the table? :confused:

Thanks in advance,

Venom

m002.p
06-02-2007, 09:12 PM
Ill have to look into it mate. Im sure it could be possible a variant will probably need adding to display it, but like I say ill get back to you on that one :)

VenomMaster
06-04-2007, 07:38 AM
Wow, great... I look forward to this!

-Venom

Finger78
06-08-2007, 01:59 PM
I hope I havent missed the magical answer here in the replies to this hack but here goes.

I am using this hack and it works great except for one of the option changes you placed in the option.txt, Number 3 to only show people that have a certain profile field filled out.

When I change the code as instructed (changed the field# to field9) and edited both pieces of code within the .php file.

Once loaded up tthe server it shows an error on line 153 with an unexpected }

I removed the offending } and it worked again, but it only lists 2 members of the Super Mod usergroup, neither of which have that profile field filled out.

I went back and redid the instructed changes again and same thing both with the error at first then the actual shown list.

This mod will be perfect if I can indeed get it to only show the users that have the field9 profile field filled out.

I am using the most current version of vB (3.6.7) if that makes any difference.

Any help would be appreciated.

Sarcoth
06-08-2007, 02:21 PM
@ Finger - I received your PM.

First off, put back the } you removed.

Then find:
eval('$rosterbits .= "' . fetch_template('showroster_userbits') . '";');

Right below that is: //}, remove the // and everything should work. If that doesn't do it, please attach your showroster.php and I'll take a look.

@ Venom - What are the rewards? Not sure I understand what you are talking about regarding those. This may be a toughie since I haven't used german since High School. :)

Finger78
06-08-2007, 04:17 PM
As requested the "showroster.php" is the php file with ONLY the changes made as instructed in the provided "optional.txt" file that came with the files downloaded form here.

The "showroster1.php" (renamed for easy of identification here) is the php file with the corrected "}" removed from line 153. (Parse error: syntax error, unexpected '}' in /showroster.php on line 153)

As you can see at http://www.err32.com/forums/showroster.php that this fixed the parse error but it doesnt work properly. When looking at the page the profile field that should be required to have something entered into is it the "Character name" field (field9)

Sarcoth
06-08-2007, 05:02 PM
@ Finger - Replace the following with your line 132 to fix the problem.

if ($user['field9'] != '') {

You must have deleted the { somewhere along the line.

Finger78
06-08-2007, 06:25 PM
You need to fix your instructions in your options.txt file

I'll post the section of it here:

FIND:

//if ($user['field#'] != ''){ //Step 1 - If you wish to limit blank fields from appearing, remove the front two slashes and change field# to a field of your choice

REPLACE WITH:

if ($user['field#'] != '')

### NEXT ###

FIND:

//} //Step 2 - Remove the front two slashes

REPLACE WITH:

}

### END ###

Sarcoth
06-08-2007, 06:29 PM
Aye, thanks for pointing that out. It should be:

FIND:

//if ($user['field#'] != '') { //Step 1 - If you wish to limit blank fields from appearing, remove the front two slashes and change field# to a field of your choice

Remove the two // before the if.

### NEXT ###

FIND:

//} //Step 2 - Remove the front two slashes

Remove the two // before the }.

### END ###

Finger78
06-08-2007, 06:31 PM
I made the changes you suggested but it still has the same result as before, its not showing ONLY the the persons that have the Character Name field filled out. Still only the one person that is in my Super Mod usergroup. i double checked the field number and it is correct on the profile field manager list.

I tried to change the field number from 9 to several different ones and they all have the same result.

EDIT** I made a few minor changes to this post

I'll include the updated php

Sarcoth
06-08-2007, 06:55 PM
I couldn't find anything wrong with your .php file so I just copied it to my test area. It worked for me. Your error must be somewhere else. I have an idea. Check your usergroups. If you have uninstalled and reinstalled the hack at any time, you need to reapply permissions to which groups appear on the roster and which ones can view it.

That could be the reason why I can't even see one person on your roster. I'm not registered.

Finger78
06-08-2007, 07:08 PM
I have only installed this once, I double checked all the permissions and all looks well, i did remove 1 group from showing up on the roster and allowed unregistered users to view it.

Those changes didnt change fix the problem I'm having.

Sarcoth
06-08-2007, 07:18 PM
Click on the links for sorting the other fields. Something is definitely wrong with your fields somewhere. Check your templates; primarily userbits. Perhaps you don't have the correct field numbers there. Other than that, I'll need direct access to find the problem.

Finger78
06-08-2007, 07:27 PM
Ok, After playign with this some more it seems when I allow the Super mod usergroup to show up on the roster it ONLY shows that usergroup.

Ok it seems it might be some usergroup options, several different usergroups when selected to be viewable on the roster cause the roster to ONLY show that usergroup.

Any ideas on what setting might be causing this?

pedigree
06-10-2007, 08:14 AM
Not trying to thread hijack but a request for a Everquest II version was made in the thread and I ported RosterMaster SA to vB - its here https://vborg.vbsupport.ru/showthread.php?t=149275

Sarcoth
06-10-2007, 03:04 PM
Not that I really mind someone linking a similiar MOD from mine, but can you tell me which post someone requested that? I couldn't find it. I think to make things fair, you could put a link to my hack in yours. :)

BTW, thanks to Finger, I found a small problem in my hack. If you are using the Optional Step #3, the sorting doesn't work the way I want it to. So...I will be making an upgrade to the hack. If you aren't using the Optional Step #3, then you have no need to upgrade. It's just to fix a small piece of coding. I'll get something posted next week.

m002.p
06-12-2007, 03:51 PM
@Venom

You will need to tell me if you are using a mod or if you have created your own awards system. Basically I need to know what you want displayed.

Thanks

VenomMaster
06-13-2007, 06:17 AM
Hi m002.p,

[...]I use this on my site (http://www.kommando-xiv.de/board/showroster.php), and now i tried to integrate my Award System with this. [...]

I wrote something other than i meant... Actually it's not my Award system, i'm using the YAAS 2.14, found here (https://vborg.vbsupport.ru/showthread.php?t=142487).

Sarcoth
06-18-2007, 05:17 PM
Not that I really mind someone linking a similiar MOD from mine, but can you tell me which post someone requested that? I couldn't find it. I think to make things fair, you could put a link to my hack in yours. :)

BTW, thanks to Finger, I found a small problem in my hack. If you are using the Optional Step #3, the sorting doesn't work the way I want it to. So...I will be making an upgrade to the hack. If you aren't using the Optional Step #3, then you have no need to upgrade. It's just to fix a small piece of coding. I'll get something posted next week.

I went through my code, made a lot of tests and have come to the conclusion I can't fix the problem. I shouldn't really call it a problem, it's more of an annoyance. The annoyance only occurs when trying to use sorting and Optional Step #3. If you have a your roster set to ignore people missing a certain field, the roster may show an empty group when sorting.

This will really only be a problem when a user completes all fields except for the one you require. If you sort by a field they completed and they are the only one in that group, a group header for that field will show, but it will be empty. It's hard to explain since a lot of variables have to be in place. It will probably be rare anyhow, so it isn't an issue. The only fix I could come up with caused a much bigger problem, so I came to the conclusion that I should just leave it as is.

I will be reposting the current version with an updated optional.txt file, nothing worth alerting everyone.

Shana
06-22-2007, 01:13 AM
Mine isn't showing up the list for some reason? o_O. Everything else works.

Shana
06-22-2007, 01:19 AM
By that, I mean that when I go to my page it's just an empty layout page (the layout of my normal board). There's no roster or anything; I don't think I've done anything wrong? I left the showroster.php as is, nothing was changed and no additional things were put on.

Sarcoth
06-22-2007, 02:56 AM
If the page is just an empty white page, that usually means the showroster.php is not seeing the correct template. Can you verify that the SHOWROSTER template is in your style's and templates.

Shana
06-22-2007, 01:09 PM
It's not an empty white; it has my forums 'template'. Like, the background, header, footer, etc. It even had the title that I put and the box with the title (as normal forums do for the boards). Just the roster isn't showing up.

Sarcoth
06-22-2007, 03:18 PM
@ Shana - First thing that comes to mind is that you haven't set permissions for your group to view the page. You have to set which groups appear on the page and which groups have permissions to view it.

If that doesn't fix it, please give me a link to the page. Maybe just looking at it will give me a clearer idea.

If that does fix it, please click install for future assistance.

Shana
06-22-2007, 11:01 PM
Sorry, I forgot to press install; I usually do. Thanks for the support even tho I didnt :P.

Anyways, I set the permissions for sure. The link is www.knightsofmaple.com/forum/showroster.php

Thanks.

Halfhearted
06-24-2007, 11:38 AM
Awsome Hack.

1 Question tho, in LOTRO, you have 5 characters (10 with 2 accounts) with 3 professions with 5 levels per profession. Anyway to make this work? I know currently you would have crap loads of fields and wont sort by profession because of different profession fields.

What I am looking for is that Admin's add the character names and the members change their professions and profession levels to suit.

Thanks in advanced for any replies.

Sarcoth
06-25-2007, 01:19 PM
Sorry, I forgot to press install; I usually do. Thanks for the support even tho I didnt :P.

Anyways, I set the permissions for sure. The link is www.knightsofmaple.com/forum/showroster.php

Thanks.

Without being able to see the templates myself, the only thing I can think of is that the roster is clashing with another hack. It looks like you are using a lot so that is possible. You can test that theory out by disabling the other hacks one at a time just to see which one may be the culprit.

Other than that, have you made any changes to the showroster.php file? Can you upload it for me either way. I'd just like to look it over. I'll look over my code and try to come up with something.

Sarcoth
06-25-2007, 01:27 PM
Awsome Hack.

1 Question tho, in LOTRO, you have 5 characters (10 with 2 accounts) with 3 professions with 5 levels per profession. Anyway to make this work? I know currently you would have crap loads of fields and wont sort by profession because of different profession fields.

What I am looking for is that Admin's add the character names and the members change their professions and profession levels to suit.

Thanks in advanced for any replies.

Thank you.

Let me see if I understand. You can have up to 5 characters per account. Each character gets 3 professions (classes). Max level for each profession is 5. Is that what you mean?

The way this hack is set up, each forum account gets one line on the roster each. You can have as many fields across as you like. So, if you really didn't care how far across you would have to scroll, you could put in as many as you like.

Now, if you'd want to have each account linked to multiple characters (more than one line), then there would need to be some additional coding. Honestly, I think a lot of coding.

Sarcoth
06-29-2007, 01:08 PM
You would be amazed with all the stuff you can do with this hack. I added roughly 200 lines of code to my showroster.php file, 13 lines per class in Vanguard. The new code calculates how many members in my guild have which class and their level range. The next step is calculating a need level for that class by taking the sum of each member at all level ranges. For example, if I only have 2 members in my guild for a class, that class is a great need; if I have 5 members between the levels of 30 to 50 for a class, that class is a low need. I created a template to display the number calculations and then another to rate each class.

This does 2 things.

First, I am able to quickly see the numbers I have for each class at all the different level ranges. That helps me keep track of my members and how the guild is doing. I keep this page restricted to officers only since members usually aren't concerned about that stuff.

Second, I created a CMPS module for my guild's home page. It lists what classes we are recruiting over others. It will also recalculate on it's own depending on whether we get someone new added to the guild or is we lose someone OR as members go up in level.

Feel free to take a look at the Recruitment Needs module on my guild's home page (http://vanguard.sacredhaven.org/).

I'm only posting this for informational purposes. I won't be adding something like this to the hack because of all the extra lines of code and b/c I've only done it for my Vanguard guild. It can easily be done for practicially any roster though if you have a need. It would probably be more useful for larger guilds though since those are the ones that would be restricting some classes from joining the guild.

Enjoy!

UNP-Maximus
07-09-2007, 08:13 PM
Works well for my site although I have one small problem,

I have a Custom User Field that is a Single-Selection-Menu when I display this instead of displaying "Field Marshall" it displays "1" and for "General" "2"

Is there anyway to display the text rather than the field sequence please.

Thanks in advance.

Sarcoth
07-10-2007, 02:17 AM
Works well for my site although I have one small problem,

I have a Custom User Field that is a Single-Selection-Menu when I display this instead of displaying "Field Marshall" it displays "1" and for "General" "2"

Is there anyway to display the text rather than the field sequence please.

Thanks in advance.

I have about 3 custom user fields using Single-Selection Menu and they all display the text. I've never seen them display the field sequence before. I'd be interested in a link to your site as well as a copy of the showroster.php file and a posting of your showroster_userbits template.

UNP-Maximus
07-10-2007, 06:13 AM
Sarcoth,

Bizarrely I deleted the field and re-added and now working fine. Now to read the notes on how to sort by that field.:D

Thanks for the reply.

UNP-Maximus
07-10-2007, 06:37 AM
OK OK, I am stuck......

I am new at this previosuly a Nuke-Evolution user (PHP-Nuke variant).

Instead of sorting by user I would like to sort by field13.

I got working the optional sort but I would like this permanently sorted.

Thanks again its a great enhancement.

Sarcoth
07-10-2007, 02:21 PM
OK OK, I am stuck......

I am new at this previosuly a Nuke-Evolution user (PHP-Nuke variant).

Instead of sorting by user I would like to sort by field13.

I got working the optional sort but I would like this permanently sorted.

Thanks again its a great enhancement.

Sounds to me that you just want to make field13 your default field for sorting.

This is very similiar to #2 in the optional.txt file. Just take a look at that and instead of changing 'title' to 'usergroupid', change it to 'field13'. That will do the trick. I'm glad you got the other thing working. Let me know if you still have problems.

UNP-Maximus
07-11-2007, 07:27 PM
Thanks again have working nicely - all sorting.

I would however like to add Instant Messenger Icons is this possible, I tried by copying the code from the Memberlist display template but everything was blank.

Would appreciate if you could give me some guidance when you have chance on this.

Cheers,

Max

Sarcoth
07-12-2007, 12:20 PM
Thanks again have working nicely - all sorting.

I would however like to add Instant Messenger Icons is this possible, I tried by copying the code from the Memberlist display template but everything was blank.

Would appreciate if you could give me some guidance when you have chance on this.

Cheers,

Max

Great news! IM icons huh? I could easily get you icons that do nothing, but it will take some research getting them to work like the Memberlist. I'm working on some other projects right now and not sure when I will be able to get to that. If I come across something though, I'll post it here and send you a PM.

vash911
08-31-2007, 04:23 AM
Hello, Im using this on my website currently and it is excellent. I use this mod for my gaming league and i love it. I have a request if anyone can point me in the right direction. Currently my roster looks like this (http://www.ocwfed.net/forum/showroster.php)

I was wondering if there was a way I could make it so that I can have 5 or so Person across instead of vertical. A crude example is the following

What I want to do: Name | Name | Name | Name | Name |

Mod Currently does:
Name
Name
Name
Name
Name

I was also wondering if it was possible to split the rosters into 2 groups with out modifying there usergroups. IE if I can split the group up by 1 of 3 based on an option perhaps like Class.

Any info would be great.

m002.p
09-04-2007, 10:20 AM
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...

sheryarpatel
11-12-2007, 08:46 PM
compatible with 3.6.8?

Bludysky
11-15-2007, 03:02 AM
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?

m002.p
11-16-2007, 11:00 AM
compatible with 3.6.8?

Yes it is compatible mate, there are no reported issues.

Bludysky
11-16-2007, 04:43 PM
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:


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:

foreach ($groupcache AS $users) {
//if ($usersort == 'username') { ksort($users); } else { krsort($usersort); }
ksort($users); // Alphabetically Sort Users


Replace that with:

foreach ($groupcache AS $users) {
//if ($usersort == 'username') { ksort($users); } else { krsort($usersort); }
//ksort($users); // Alphabetically Sort Users
usort($users, myCmpName);


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 :D

Foxtrotelite
12-08-2007, 05:06 PM
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

Bludysky
12-15-2007, 11:27 PM
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.

boxerman
01-02-2008, 01:13 PM
Thanks! jsut what i needed

Foxtrotelite
01-04-2008, 03:22 PM
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:D

Brundlefly
01-06-2008, 02:21 PM
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 (http://www.ex-element.com/clan/index.php?pageid=25)

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

After
$usercount++;

Add the below, modified to your ranks

$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

<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

Foxtrotelite
01-07-2008, 11:03 PM
Nice thanks! I wasn't planning on using images for ranks but your roster looks good, thanks again

Bojangles
02-15-2008, 10:44 PM
Great job on this mod! This will work perfect on turning my clan's forums into a full functioning website.

/installed

Bojangles
02-20-2008, 11:02 PM
Nevermind, got it working :)

Brundlefly
02-25-2008, 04:56 PM
I wanted to use images that represented each usergroup (View Roster with this change (http://www.ex-element.com/clan/index.php?pageid=25)). Some of you may have trouble with sorting if you make this change, but it wouldn't be hard to figure out. I've probably lost some sorting functionality with this change. The below changes are accomplished in the showroster_header template

After

<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<tr>

Replace

<if condition="($groupsort == 'username')"><td class="tcat" colspan="10">Usernames &nbsp; ($usercount)</td>
<else /><td class="tcat" colspan="<total roster columns>">$user[$groupsort] &nbsp; ($usercount)</td></if>

With

<td class="tcat" colspan="<total roster columns>" align="center">

<if condition="($user[$groupsort] == '<usergroup name>')"><IMG STYLE="border: none;" SRC="<image location & name>"><br>
$user[$groupsort] &nbsp; ($usercount)
</if>
<if condition="($user[$groupsort] == '<usergroup name>')"><IMG STYLE="border: none;" SRC="<image location & name>"><br>
$user[$groupsort] &nbsp; ($usercount)
</if>

You'll be able to stack these "if conditions" for each of your usergroups. If you come up with a leaner way of doing this, i appreciate if you would provide it, i'm limited in what i'm able to accomplish with code, this was a trial and error effort till it finally worked. Hope this helps someone.

DivineMessenger
03-02-2008, 07:17 AM
I have a problem. I have members in different user groups and they all appear on the roster multiple times. I need it to only show primary usergroups. Where is that option?

Brundlefly
03-02-2008, 12:03 PM
Look through your usergroups in the usergroups manager. For usergroups you want to display on the roster ensure the following is checked:

Viewable - Should this usergroup be viewable on the Showroster page?

Sheep101
03-06-2008, 12:50 PM
Will this mod be available in 3.7?

PC-Junky
05-03-2008, 09:11 PM
Hello

I would like in these Mod insert a special function but I do not know where. Please help me.

My members should be only a text box as an additional Profielfeld, in which they enter any number. If a number is entered, then several things should happen automatically.

1st
The number should of course be displayed.

2nd
According to the point, a rank will be displayed.

3rd
According to the point, a symbol will be displayed.

An example:
If a number from 0 to 499, then it should be displayed. This number, rank and a symbol. Of course, everything on the extra page, as it actually provided in this mod.

Overall, I have 21 of this number ranges define and also the respective ranks and symbols.

It would satisfy me if someone tell me where I could these definitions in these Mod paste.

Thank you
PC-Junky

Celsus
05-04-2008, 04:38 AM
Will this mod be available in 3.7?

I really hope so as well because it's the only mod I know of that handles creating dynamic guild rosters.

Brundlefly
05-04-2008, 11:50 AM
Hello

I would like in these Mod insert a special function but I do not know where. Please help me.

My members should be only a text box as an additional Profielfeld, in which they enter any number. If a number is entered, then several things should happen automatically.

1st
The number should of course be displayed.

2nd
According to the point, a rank will be displayed.

3rd
According to the point, a symbol will be displayed.

An example:
If a number from 0 to 499, then it should be displayed. This number, rank and a symbol. Of course, everything on the extra page, as it actually provided in this mod.

Overall, I have 21 of this number ranges define and also the respective ranks and symbols.

It would satisfy me if someone tell me where I could these definitions in these Mod paste.

Thank you
PC-Junky

This may do it for you, it'll need a slight change to show you the number as well

https://vborg.vbsupport.ru/showpost.php?p=1416528&postcount=240

Will this mod be available in 3.7?

I'm running this mod on 3.7, i'm having no problem as of yet.