vb.org Archive

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

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,

Quote:

Originally Posted by VenomMaster (Post 1257867)
[...]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.

Sarcoth 06-18-2007 05:17 PM

Quote:

Originally Posted by Sarcoth (Post 1265556)
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

Quote:

Originally Posted by Shana (Post 1274269)
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

Quote:

Originally Posted by Halfhearted (Post 1275322)
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.

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

Quote:

Originally Posted by UNP-Maximus (Post 1286998)
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

Quote:

Originally Posted by UNP-Maximus (Post 1287351)
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

Quote:

Originally Posted by UNP-Maximus (Post 1288547)
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

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

Quote:

Originally Posted by sheryarpatel (Post 1381307)
compatible with 3.6.8?

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

Bludysky 11-16-2007 04:43 PM

Quote:

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

Never mind.. I broke down and looked up the stupid custom sort function... If anyone else would like to order by custom fields so that you have your users broken down by usergroups (as it is by default), and then arranged by a custom field (I use character class/profession), and then alphabetical by character name (as defined by a custom field, this is not the same as the normal username) the following code will work.

Below the print_users function, create a seperate function:

PHP Code:

function myCmpName($a$b){

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



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

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

Now, scroll down until you see the chunk of code:
PHP Code:

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

Replace that with:
PHP Code:

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

That will give you a roster that looks something like:

GUILD ROSTER

Council:

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

Members:

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


etc etc etc.

Hope thats clear, and that i didn't forget to add anything :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

Quote:

Originally Posted by Bludysky (Post 1401824)
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

Quote:

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

Council:

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

Members:

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

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


Thanks

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

My Roster

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

After
Code:

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

Code:

$classurl = 'images/spacer.gif';
if ($user[field9] == '1 - Area General') { $classurl = 'forum/images/custom/AGEN.gif'; }
if ($user[field9] == '2 - Brigade General') { $classurl = 'forum/images/custom/BGEN.gif'; }
if ($user[field9] == '3 - General') { $classurl = 'forum/images/custom/GEN.gif'; }
if ($user[field9] == '4 - Lieutenant General') { $classurl = 'forum/images/custom/LTG.gif'; }
if ($user[field9] == '5 - Colonel') { $classurl = 'forum/images/custom/COL.gif'; }
if ($user[field9] == '6 - Lieutenant Colonel') { $classurl = 'forum/images/custom/LTC.gif'; }
if ($user[field9] == '7 - Major') { $classurl = 'forum/images/custom/MAJ.gif'; }
if ($user[field9] == '8 - Captain') { $classurl = 'forum/images/custom/CPT.gif'; }
if ($user[field9] == '9 - Lieutenant') { $classurl = 'forum/images/custom/LT.gif'; }
if ($user[field9] == '10 - Sergeant') { $classurl = 'forum/images/custom/SGT.gif'; }
if ($user[field9] == '11 - Corporal') { $classurl = 'forum/images/custom/CPL.gif'; }
if ($user[field9] == '12 - Private 1st Class') { $classurl = 'forum/images/custom/PFC.gif'; }
$classimage = '<img src="'.$classurl.'" border="0" alt="'.$user[field9].'">';

In your showroster_userbits templates you need to add the below where you want it to fall in the roster and add a column heading in the showroster_header

Code:

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


All times are GMT. The time now is 04:21 AM.

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.01554 seconds
  • Memory Usage 1,874KB
  • 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
  • (3)bbcode_code_printable
  • (3)bbcode_php_printable
  • (11)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)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