vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.7 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=228)
-   -   Profile Enhancements - Customizable Roster (https://vborg.vbsupport.ru/showthread.php?t=180432)

Sarcoth 05-24-2008 10:00 PM

Customizable Roster
 
Customizable Roster

Introduction:

This Mod is ideal for a Guild/Clan roster, but it is also a great replacement for the memberlist. Customize it any way you like: add or remove columns with just a few easy edits. The installer includes permission control that allows you to set which groups appear on the roster and which ones can view it. See the optional.txt file included in the installation for additional changes that you can make at your discretion. The most popular option is the ability to add sorting; check it out!


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 both of the colspan variables 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 files)


Updates:

Version 1.2.0 - May 24, 2008
  • Release of this hack for vBulletin version 3.7.x.
  • This version works on all vBulletin versions from 3.6.0 and up.
  • This version works with vBadvanced CMPS version 3.0.1.

Version 1.2.1 - June 11, 2008
  • Updated code for XHTML validation.
  • Added a Date Joined column with code to support.
  • Added a Last Online column with code to support; also changes color.
  • Added a Birthday column with code to support; will be blank for users wishing to hide their birthday.
  • Added a ProfilePic column with code to support.

FUTURE VERSIONS
  • This version will no longer be supported or upgraded.

Click Here For A Preview

PLEASE CLICK INSTALLED.

Support will no longer be given for anything below vB4.x.

Go to Customizable Roster 4.0 for the newer supported mod.

Sarcoth 05-25-2008 03:47 AM

Reserved for FAQ and Optional changes.
  1. Can the column's be sorted? Yes, the code is already in the showroster.php. Check the optional.txt file on how to set it up.

Mookie 05-25-2008 05:32 AM

Sarcoth excellent Mod any way we could have it setup for mulitiple rosters. On our gamming site we plays mulitiple games Age of Conan, WoW, EQ2, and so on. We were wondering if there is a way to display each roster seperately? Could this be added into a new version or is it not possible?

Sarcoth 05-25-2008 01:04 PM

Quote:

Originally Posted by Mookie (Post 1530668)
Sarcoth excellent Mod any way we could have it setup for mulitiple rosters. On our gamming site we plays mulitiple games Age of Conan, WoW, EQ2, and so on. We were wondering if there is a way to display each roster seperately? Could this be added into a new version or is it not possible?

Almost anything is possible. :) It really depends on your end goal. Do you want each game displayed on the same roster, and then via rank, then name? Or do you want each game displayed on its own roster page? In the latter, it is as easy as creating a separate showroster page for each game with just a few configuration/permission changes.

Post a list of the fields you are using. One of those fields will need the name of each game.

stwilson 05-25-2008 03:09 PM

Nice MOD. Thanks for sharing. I will use this as a version of the Member List, showing only Supporting Members. Since I will have quite a few names on my roster I would like to make two suggestions for future versions:

1. Allow for a header footer field that shows above or below the Roster/Memberlist
2. The ability to sort by specific columns by clicking on the header in that column

Excellent MOD for sure. I was looking for something like this. Thank you again.

stwilson 05-25-2008 03:12 PM

I just now noticed you had the code for sorting in the Optional file. THANKS.

Skyrider 05-25-2008 03:34 PM

Any screenies?

stwilson 05-25-2008 03:57 PM

I have a question. I am trying to include a member's Join Date in a column but the number that shows up is a ten digit number. How do I convert it back to the standard VB date format?

stwilson 05-25-2008 03:58 PM

Quote:

Originally Posted by FF|Skyrider (Post 1531012)
Any screenies?


There is a PREVIEW link in the original post. :D

ssslippy 05-25-2008 04:56 PM

Added a usergroup with almost 400 members and the script fails to run, gives a white page.

I get no emails reporting errors.

GlitchersCorner 05-26-2008 01:32 AM

Nice Mod!

By any chance can you make an add-on for this or an option for users to create their own rosters? That would be extremely cool. I'd pay for that option!

iogames 05-26-2008 04:56 AM

Quote:

Originally Posted by GlitchersCorner (Post 1531438)
Nice Mod!

By any chance can you make an add-on for this or an option for users to create their own rosters? That would be extremely cool. I'd pay for that option!

I chip-in!

michael5472 05-26-2008 08:07 AM

I have installed but can i make it show BBCODE in the profile field ?

doesn't work for me
http://www.theoldbreed.com/showroster.php

Sarcoth 05-26-2008 03:53 PM

Quote:

Originally Posted by stwilson (Post 1530990)
Allow for a header footer field that shows above or below the Roster/Memberlist?

I don't think that would be very difficult to add, but what do you want to put there? The roster should already be using the forums header/footer.

Quote:

Originally Posted by stwilson (Post 1531030)
I have a question. I am trying to include a member's Join Date in a column but the number that shows up is a ten digit number. How do I convert it back to the standard VB date format?

I recall something similiar to that, I'll look into it this week.

Quote:

Originally Posted by ssslippy (Post 1531095)
Added a usergroup with almost 400 members and the script fails to run, gives a white page. I get no emails reporting errors.

We had a problem with large usergroups back in vBulletin 3.6.x as well. I just tested it out on my roster with a usergroup that has 289 users in it; it worked successfully. I'd be curious to know if others are having any problems? How many fields are you using? Did you also try a smaller usergroup; if you have one? I'm sure you did, just asking though.

Quote:

Originally Posted by GlitchersCorner (Post 1531438)
By any chance can you make an add-on for this or an option for users to create their own rosters? That would be extremely cool. I'd pay for that option!

Maybe in the future...but I fear that would be a lot of work. I'll research it though and maybe it can be done. No promises though.

Quote:

Originally Posted by michael5472 (Post 1531620)
I have installed but can i make it show BBCODE in the profile field ? doesn't work for me http://www.theoldbreed.com/showroster.php

You need to give unregistered users permissions to view it as well. I can't see it.

michael5472 05-26-2008 06:42 PM

Quote:

Originally Posted by Sarcoth (Post 1531974)
You need to give unregistered users permissions to view it as well. I can't see it.

Done

Sarcoth 05-27-2008 02:11 PM

Quote:

Originally Posted by stwilson (Post 1531030)
I have a question. I am trying to include a member's Join Date in a column but the number that shows up is a ten digit number. How do I convert it back to the standard VB date format?

Completed.

Open the showroster.php file.

Find:
Code:

  fetch_musername($user);
After it add:
Code:

        $user['datejoined'] = vbdate($vbulletin->options['dateformat'], $user['joindate'], true);
Your code in the showroster_userbits template should look similiar to this:
Code:

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

I'll be sure to add this in the next version for those that wish to use it.

stwilson 05-28-2008 03:33 AM

Worked like a charm. Thank you for the super mod!!!

michael5472 05-29-2008 04:05 PM

Quote:

Originally Posted by Sarcoth (Post 1531974)
You need to give unregistered users permissions to view it as well. I can't see it.


Done any chance ?

IR15H 05-29-2008 07:19 PM

A few things...

Firstly, thanks for releasing this :).

Some Questions
  • How do I sort user groups in a custom order, say id 1, 4, 5, 3, 2 or name A, D, E, C, B? A similar thing is done for user groups in a legend by Cyberntec in his "Visitors in Last X Hours" mod, but not being a coder I can't work it out myself.
  • How would I pull a user's age (not DOB), provided they haven't set it to private (Hide Age + DOB, Display Only Day and Month of Birth)? I spent quite a while trying to figure it out, with no joy.
  • How would I do the feature that is in ADMIN CP > Forums & Moderators > Show All Moderators, whereby it displays the last online in different colours, based on their last activity? I managed to find the code in forum/admincp/moderator.php;

PHP Code:

if ($supergroup['lastactivity'] >= $unixtoday)
{
$onlinecolor 'modtoday';
}
else if (
$supergroup['lastactivity'] >= ($unixtoday 86400))
{
$onlinecolor 'modyesterday';
}
else if (
$supergroup['lastactivity'] >= ($unixtoday 864000))
{
$onlinecolor 'modlasttendays';
}
else if (
$supergroup['lastactivity'] >= ($unixtoday 2592000))
{
$onlinecolor 'modsincetendays';
}
else
{
$onlinecolor 'modsincethirtydays';


Which I unsuccessfully tried to convert into;

PHP Code:

<if condition="$user['lastactivity'] >= $unixtoday">$user[lastonline]
<else />
<if 
condition="$user['lastactivity'] >= ($unixtoday - 86400)"><span style="color:green">$user[lastonline]</span>
<else />
<if 
condition="$user['lastactivity'] >= ($unixtoday - 864000)"><span style="color:blue">$user[lastonline]</span>
<else />
<if 
condition="$user['lastactivity'] >= ($unixtoday - 2592000)"><span style="color:orange">$user[lastonline]</span>
<else />
<
span style="color:red">$user[lastonline]</span>
</if></if></if></if> 

What am I doing wrong?

Some Suggestions
  • postbit_onlinestatus is uncached. Opening up showroster.php, and adding the following appears to fix this;

    Quote:

    // pre-cache templates used by all actions
    $globaltemplates = array(
    'SHOWROSTER',
    'showroster_header',
    'showroster_userbits',
    'postbit_onlinestatus'

    );
  • Replace all instances of <br> (9) with <br /> for XHTML validation.
  • Continuing with XHTML, still in showroster.php change the following line to include;

    Quote:

    $avatarimage='<img src="'.$avatarurl.'" border="0" alt="" />'; //Use $avatarimage in userbits to display avatars
  • Also XHTML, in product-showroster.xml, find and edit;

    Quote:

    Originally Posted by (showroster_header template)
    <td class="thead">Avatars</td>
    </tr>
    $rosterbits
    </table>

  • "Last Online" can be phrased using $vbphrase[last_online].

A Request

Rather than decide who appears/can view a roster via bitfields, would it be possible to do it via a ADMIN CP > vBulletin Options > Edit Settings Option (Similar to Cyb's mod I mentioned earlier)? I have quite a lot of usergroups, and I imagine most people who have clans/guilds use their forums do too, and it's a bit of a pain having to update each user group manually for those permissions, particularly if you use more than one roster. Those options would ideally include;
  • "User groups to show in roster" and a input area, where by the user group ids entered would be shown on the roster, in the order entered.
  • "User groups who can view roster" where you enter the user groups id that can view it, and where 0 means all groups can view it.

If doing it via that method is a lot of work/you think bit fields is a better way then no worries, I just thought I'd ask :).



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

Quote:

Originally Posted by michael5472 (Post 1535267)
Done any chance ?

I don't know how to enable BB code in the field, and I can't view users profiles without signing up, so don't know what else you use the "Play Monitor" field for, but a possible idea that may you might find suitable is;
  • Change your "Play Monitor" description to say "Enter the server IP you wish to track".
  • Enter the IP in that field: eg; 217.163.28.224:28960
  • In your showroster_userbits template, put this;
Quote:

<if condition="$user[fieldX]"><img src="http://www.gametracker.com/server_info/$user[fieldX]/b_560x95.png" alt="$user[fieldX]" border="0" /><else />No Server Tracked</if>
If that's not of any use to you then I'm afraid you'll have to wait for someone else to reply regarding enabling BB code, as I can't help you.

Sarcoth 05-29-2008 09:14 PM

Quote:

Originally Posted by michael5472 (Post 1535267)
Done any chance ?

Not yet. I usually try to look over code while at work...don't tell please...but I can't get to your site from there. My evenings have been busy this whole week. I'll definitely get around to taking a look as soon as time permits; probably this weekend.

Sarcoth 05-29-2008 09:45 PM

Quote:

Originally Posted by IR15H (Post 1535495)
Some Questions

1) My suggestion for custom order is to have all usergroups named with a number in front of it: 1-, 2-, etc. Then put something like the following within the .php file to change the $user['title'] names to what you want to appear.

Code:

switch($user['title']) {
        case '1-A':
                $Title = "A";
                break;
        case '2-D':
                $Title = "D";
                break;
        }

Then you need to figure out how to get that into your template.

2 & 3) I'll look into that when time permits.


Quote:

Originally Posted by IR15H (Post 1535495)
Some Suggestions

I'll definitely try out your suggestions and put those in my next version, thank you.

Quote:

Originally Posted by IR15H (Post 1535495)
A Request

I originally tried to do that when I first started off making this mod but had some problems. I have a much better understanding of the code now though and will see about getting it changed for the next version. Again, thank you.

michael5472 06-01-2008 09:05 PM

Quote:

Originally Posted by IR15H (Post 1535495)
I don't know how to enable BB code in the field, and I can't view users profiles without signing up, so don't know what else you use the "Play Monitor" field for, but a possible idea that may you might find suitable is;
  • Change your "Play Monitor" description to say "Enter the server IP you wish to track".
  • Enter the IP in that field: eg; 217.163.28.224:28960
  • In your showroster_userbits template, put this;


If that's not of any use to you then I'm afraid you'll have to wait for someone else to reply regarding enabling BB code, as I can't help you.

This worked with a bit of tweaking

I put this code in
HTML Code:

<td class="$bgclass" nowrap="nowrap"><if condition="$user[field15]"><img src="http://www.gametracker.com/server_info/$user[field15]/b_560x95.png" alt="$user[field15]" border="0" /><else />No Server Tracked</if></td>
THANKS A LOT

michael5472 06-02-2008 05:21 AM

ok i just showed my members what i had been working on and one thinks it would be a good idea to have the profile pic on like the avatarl.

How would i work this in ?

Code Monkey 06-02-2008 05:49 AM

Is this limited to one clan only or can it be used by multiple clans that home at a forum? To show their own separate clan page.

Dagothar 06-03-2008 11:43 AM

Well, I apologize, but my newness to vBulletin has potentially screwed something here. Your instructions were very clear, and I've been looking forward to your roster.

But I see no difference to the configurable Members List nor to the Roster/Show Groups (View Forum Leaders' Page).
I've ensured I've added the 3 files to the correct place; I've followed all the Readme.txt instructions.
Why would it then not show? It should replace the Members List, correct?

Sarcoth 06-03-2008 11:55 AM

Quote:

Originally Posted by michael5472 (Post 1538384)
ok i just showed my members what i had been working on and one thinks it would be a good idea to have the profile pic on like the avatarl.

How would i work this in ?

I'll see what I can figure out on that.


Quote:

Originally Posted by Code Monkey (Post 1538400)
Is this limited to one clan only or can it be used by multiple clans that home at a forum? To show their own separate clan page.

I'm sure it can be done with multiple clans. The easiest way would probably be to have separate showroster.php files for each clan. Just rename the showroster.php to the name of your clan like, clan1roster.php. Add a new field that has the players pick their clan. Somewhere near the top of the code, set up an <if> statement that only runs the code for those that happen to be in that particular clan.

I'm sure there's a way you could also do it with just the showroster.php file and by adding some more code, I just can't see it yet. As long as your fields are not too difficult, I could try to come up with something for you.



Quote:

Originally Posted by Dagothar (Post 1539620)
Well, I apologize, but my newness to vBulletin has potentially screwed something here. Your instructions were very clear, and I've been looking forward to your roster.

But I see no difference to the configurable Members List nor to the Roster/Show Groups (View Forum Leaders' Page).
I've ensured I've added the 3 files to the correct place; I've followed all the Readme.txt instructions.
Why would it then not show? It should replace the Members List, correct?

Did you go to the /forum/showroster.php? You'll need to type that in and make a link to it somewhere on your site. You could find where the Member List code is in the navbar template and change the link too.

Dagothar 06-03-2008 12:53 PM

Quote:

...Did you go to the /forum/showroster.php? You'll need to type that in and make a link to it somewhere on your site. You could find where the Member List code is in the navbar template and change the link too.
:erm: :up: :D
No, I hadn't. But type that in, and Voil?, there it is!
Now to find that pesky navbar code...
Thanks!!

Sarcoth 06-04-2008 02:46 AM

<font color="Blue">UPDATE ALERT:

I've done a lot of updates on this mod over the last week. I am hoping to have the new version posted by the end of the week; Sunday maybe. The only thing I'm missing is the new permissions change that IR15H requested. I've always wanted to get switched over to that. I haven't looked at it yet, but I should have some time this week or weekend.

IR15H - I think I made all the changes you mentioned. I also have a working version with the color coded last activity you requested. I'll see about giving an optional addition for DOB for those that want it.

Michael - I added a profilepic part as well for those that want to use it.</font>

Brian30fl 06-04-2008 03:55 PM

are u adding the ability to have differant guilds to be used instead of just 1? or maybe seperate roster pages?

Sarcoth 06-04-2008 04:39 PM

Quote:

Originally Posted by Brian30fl (Post 1540723)
are u adding the ability to have differant guilds to be used instead of just 1? or maybe seperate roster pages?

Brian, I'll try to dabble in that a little this week and see how far off I would be from implementing it. If I can't finish it by the end of this week though, I'll make that my top priority for the next version. I've been playing with some idea's lately though and I think I know how it can be done; no promises yet.

Brian30fl 06-04-2008 05:33 PM

it all good no rush m8

IR15H 06-06-2008 06:40 PM

Quote:

Originally Posted by michael5472 (Post 1538161)
This worked with a bit of tweaking

I put this code in
HTML Code:

<td class="$bgclass" nowrap="nowrap"><if condition="$user[field15]"><img src="http://www.gametracker.com/server_info/$user[field15]/b_560x95.png" alt="$user[field15]" border="0" /><else />No Server Tracked</if></td>
THANKS A LOT

No problem, glad it was useful for you :).

Quote:

Originally Posted by Sarcoth (Post 1540248)
UPDATE ALERT:

I've done a lot of updates on this mod over the last week. I am hoping to have the new version posted by the end of the week; Sunday maybe. The only thing I'm missing is the new permissions change that IR15H requested. I've always wanted to get switched over to that. I haven't looked at it yet, but I should have some time this week or weekend.

IR15H - I think I made all the changes you mentioned. I also have a working version with the color coded last activity you requested. I'll see about giving an optional addition for DOB for those that want it.

Michael - I added a profilepic part as well for those that want to use it.

Excellent! Thanks :D.

Sarcoth 06-11-2008 01:12 PM

<font color="Blue">I still can't get the permissions change thing to work. I tried to find a way to use what was suggested but I just don't see it. This hack uses a .php file, whereas the hack that I've been researching uses only templates and plugins. I still think it can be done, but it is just going to take me a lot longer.

I am going to take a look at getting the DOB added. Whether I get that working or not, I should have the new version released soon. The new version will be various fixes and minor additions that have been requested.</font>

Replicators 06-11-2008 10:55 PM

One thing i don't like about this mod is if a members has another usergroup, it shows them in that group in the list. Is there a way to not have them show up in their secondary usergroup in the roster?

Sarcoth 06-12-2008 12:00 PM

Quote:

Originally Posted by Replicators (Post 1547112)
One thing i don't like about this mod is if a members has another usergroup, it shows them in that group in the list. Is there a way to not have them show up in their secondary usergroup in the roster?

This mod was mainly built for a guild roster where each member would only appear in one rank. Either they are the leader, officer, member, recruit or whatever. Not possible to be more than one. I will see if I can come up with some optional code to do this for you though. It just won't be part of the actual mod; you'll need to make the edit's to get it to work.

theparentpack 06-20-2008 05:39 PM

Does this replace my existing member list, or can I use it to create an additional roster for my various social groups and usergroups?

Deyth 06-25-2008 01:54 PM

Sarcoth, would you be willing to expand this mod for some money? I lead a multi-gaming guild and this roster, although nice, is single-game with no historical info. What I need is to define games, game servers, and their characteristics (races, classes, sub-classes, levels, etc.), let every board user enter their historical character data for every game and server I've defined, and then show a roster for the usergroups I select with the ability to narrow down by game and/or server. If you do this, it'll be THE definitive mod for gaming guilds.

Dagothar 06-25-2008 02:32 PM

I want to thank Sarcoth, who filled a major hole for us with this great mod. His upcoming update, to allow multiple versions, will also greatly help.

Quote:

Originally Posted by theparentpack (Post 1554760)
Does this replace my existing member list, or can I use it to create an additional roster for my various social groups and usergroups?

No, and Yes.

Personally, I use this for my main Members' roster, for my Age of Conan guild. It's so nicely customizable, and sortable. I put it right up front on the menubar, and limit access to members who've successfully undergone our trial process.

I use the native showgroups.php for the leaders only, and crank it down to show just the leaders with the Admin CP Usergroups CP.

I use the native memberlist.php for all the registered users. That's buried in Quick Links.

http://the-sentinels.net/forum/

ProtoPC 06-27-2008 09:22 PM

Yes this will be a great addition! I am waiting for the multiple roster version.

Brian30fl 06-29-2008 06:56 AM

same i need the multiable roster edtion for my 10 guild alliance


All times are GMT. The time now is 05:50 PM.

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

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

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete