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)

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.
PHP Code:

$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

Quote:

Originally Posted by ssslippy (Post 1214259)
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.
PHP Code:

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

Quote:

Originally Posted by Sarcoth (Post 1204306)
Jeff, I found an answer for you while playing with some of the code.

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

Open showroster.php

Find:
Code:

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

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

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


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

Quote:

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

Quote:

Originally Posted by grecostimpy (Post 1214906)
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

Quote:

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

Quote:

Originally Posted by grecostimpy (Post 1214986)
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

Quote:

Originally Posted by gator777 (Post 1215310)
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]

Sarcoth 03-29-2007 06:35 PM

Quote:

Originally Posted by gator777 (Post 1215491)
It worked great, and thanks for all your hard work. :D

You see what I did with it [here]

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

Quote:

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

Code:

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

<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

Quote:

Originally Posted by gator777 (Post 1215515)
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.

Code:

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

Sarcoth 03-29-2007 07:51 PM

Quote:

Originally Posted by Brian31fl (Post 1215550)
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

Quote:

Originally Posted by Brian31fl (Post 1215560)
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.

Code:

<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

Quote:

Originally Posted by Brian31fl (Post 1215581)
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

Code:

WHERE (usergroup.showrosterviewpermissions = 1)
If you want I can post the whole message ;)

Thanks

Sarcoth 04-02-2007 01:48 PM

Quote:

Originally Posted by m002.p (Post 1216333)
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

Code:

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

Code:

<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

Quote:

Originally Posted by lulanglo (Post 1219099)
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 :(

Code:

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

Code:

$usercount++;
Below it add:

Code:

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

Code:

<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

Quote:

Originally Posted by cerulean (Post 1220470)
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

Quote:

Originally Posted by JBMoney (Post 1221163)
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


All times are GMT. The time now is 02:45 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.01607 seconds
  • Memory Usage 1,864KB
  • 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
  • (13)bbcode_code_printable
  • (2)bbcode_php_printable
  • (17)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)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