PDA


View Full Version : [Module] Dynamic Staffpage (vB3.5)


Pages : [1] 2 3 4

Kesomir
07-28-2005, 07:13 AM
What it does
This module creates a dynamic staffpage for your website, drawing data from a custom biography field and using the members profile picture for display.

This means that your staff can keep both the picture and information about them updated themselves.

Demo of script (http://www.onlinegamers.org.uk/index.php?page=staff&)

Thread outlining modification methods (http://www.onlinegamers.org.uk/forums/showthread.php?t=2992)

Works on 3.6.1

Upgrading
Upload the new file over the old one and replace your template with the one provided in the install/upgrade instructions.

Changelog

1.6g
Released the code under the GPL and removed link
1.6
Added support for images in both filesystem and database
Fixed zip. Previously held 1.4 not 1.5, now holds 1.6
1.5
Added support for vBulletin 3.5
1.4a
Bugfix to display staff without a profile pic
1.4
Added support for updated profile images
1.3
Added support for secondary usergroups
1.2
Added line break display
Seperated titles to allow for spaces in them
Added links to member profiles from name and picture
Fixed width display for non uniform profile pics.
1.1
Altered code to use all three usergroups (admin, veteran mod and mod)
1.0.1
Altered instructions to correct link url
1.0
Initial release - 09-01-2005

XenoZiden
07-31-2005, 05:03 AM
This is awsome. Good one :D

mholtum
07-31-2005, 05:07 AM
I use a similar one for 3.0.7

Sovereign
07-31-2005, 09:17 PM
Stupid question: Why am I missing from my own page? I'm Sovereign, and Sovereign doesn't show up. http://www.alliancemodding.com/index.php?page=staff

TeenForums
08-03-2005, 03:14 PM
Nice module!

I would prefer to just put the descriptions for each member myself though cause i have teen forums and although the staff know how to moderate etc. They might still post things i dont really want on that page! :P

Would there be anyway you could create a module where all staff are added to this page via admin cp or anything????

phoenixdown
08-03-2005, 10:09 PM
If I understand the hack correctly you can make the profile field a hidden one thats editable by admins only.

Kesomir
08-07-2005, 07:21 PM
Stupid question: Why am I missing from my own page? I'm Sovereign, and Sovereign doesn't show up. http://www.alliancemodding.com/index.php?page=staff

The default moderator is disabled by default because many users keep that as an emergency admin account.

To show it, there is a section in the module where you can comment it out. Instructions for that should be in the code itself.

No profile images display on that page either, if they have been uploaded, ensure that you enable the option in vbulletin to show those to unregistered users.

Would there be anyway you could create a module where all staff are added to this page via admin cp or anything????

As an above poster says you can set the profile field to hidden. This means that the end user whose account it's attached to (your moderators) wont see it and you are able to edit it for each of their accounts by editing their profiles. Simple solution :)

mystifiedLaLa
08-13-2005, 04:08 PM
thx thx!!

ninni
09-02-2005, 07:39 AM
Thank you.
But can I resize the module?
I want it to be in center, but I would like to hav columns on both sides.
Now I only have clolumn on the left side.

ninni
09-02-2005, 07:51 AM
I did the changes to make my default admin show, but my veteran moderator doesn't show anymore

ninni
09-02-2005, 07:54 AM
I fix the veteran moderator.

Kesomir
09-02-2005, 02:51 PM
The module should resize automatically if you add anything to the right column.

taylorstrait
09-04-2005, 11:29 AM
Instead of automatically clumping users by usergroups, is it possible to show their custom user titles instead? I have a software development team and would like their bios to show their custom title like "concept artist" or "animator" instead of just "Developer" (their usergroup).

y2krazy
09-07-2005, 02:00 AM
I can't seem to find where to go to have it show my secondary usergroups. I have several people on them and, well, they're not showing up... :(

y2krazy
09-08-2005, 01:35 PM
Anyone out there that can help me?

ninni
09-09-2005, 08:52 AM
The module should resize automatically if you add anything to the right column.
It did'nt.
I add a right column, but i shows under the staff page. Not to the right.I had the right column before I add the staffpage.

ninni
09-12-2005, 04:31 PM
Anyone help me get my right column back?
The staffpage doesnt resize if I anything to the right column.

Jason McConnell
09-21-2005, 12:00 PM
Killer hack.... Installed!! :) Wish there was an install button or something to show that it's being used, so I'll just rate the thread instead :D

TeamRocket
09-23-2005, 03:23 PM
http://www.neverwinterevenings.com/?page=Staff

Edit: Problem fixed.

y2krazy
09-24-2005, 11:56 PM
Anyone get the secondary usergroups to show up yet? :(

Yorixz
10-01-2005, 05:09 AM
Very nice mod but somehow avatars still wont show up for me; I've checked all the avatar settings - they just dont seem to work...

TeamRocket
10-01-2005, 01:11 PM
http://www.neverwinterevenings.com/?page=Staff

What the hell?

Kesomir
10-02-2005, 06:47 AM
The previous module here required avatars to be stored in the database.

When I checked, I think the zip may have contained version 1.4 not 1.5, or at least a version in between the two.

I have another version which works with avatars stored in the filesystem. Which I've now uploaded as 1.6 see if that sorts you.

Yorixz
10-02-2005, 07:36 AM
A little modification that others might also find usefull;

To show avatars instead of profile pictures at the staffpage:
Open staffpage.php and replace $$staffrank .= "<img src=\"".$vbulletin->options[bburl]."/image.php?u=".$row[userid]."&type=profile&dateline=".$row[dateline]."\" valign=\"top\" alt=\"".$row[username]."\" border=\"0\" width=\"$picturewidth\" /></a> </td></tr></table>";

With:
$$staffrank .= "<img src=\"".$vbulletin->options[bburl]."/image.php?u=".$row[userid]."&dateline=".$row[dateline]."\" valign=\"top\" alt=\"".$row[username]."\" border=\"0\" width=\"$picturewidth\" /></a> </td></tr></table>";

Deviant++
10-08-2005, 08:33 AM
mm one of the mods look interesting mwahah j/k :P

rrokdoka
10-08-2005, 12:36 PM
hmmm this doesnt seem to work for me. When i go to add a staffpage module i fill in everything that you say to the php file but i still get an error vBulletin Message


You already have a Module with an identifier of ''. Please select a different identifier." But i left the identifier blank. Can someone help me out?

majorj0nny1
10-14-2005, 07:46 AM
very nice idea .... but my site does not have any Modarators, But Id like to add a custom usergroup to this staff page .... so I changed all the instances of groupid 7 to 9 (the id of my server admins group) and changed this bit to :


case "9":
$staffrank = "ServerAdmin";
$staffname = "Server Admin";
break;

first time I saved the file I forgot to change the 7 to a 9 in the above bit and the effect was that all my server admins showed correctly but were all called 'Administrator' in stead of 'Server Admin'. I spotted the number change I forgot to do but to my suprise when I re-saved the file the server admins no longer appear on that page ? I dont get what Im doing wrong here ?

majorj0nny1
10-14-2005, 07:47 AM
ahhh.... found it - Had to change the $Moderator in the actual template in styles to $ServerAdmin

working like a dream now!

thanks all great addon! :)

one9er
10-16-2005, 05:52 PM
I'm a newbie at this stuff and have a question:

What do you mean by "Rebuild your bitfields" ?

one9er
10-16-2005, 07:52 PM
When I set all the 'Userpage permissions' to yes I get this: Warning: mysql_real_escape_string() expects parameter 1 to be string, array given in /includes/class_core.php on line 635

I must have done something wrong somepalce any help! It sets the permissions back to 'No'.

totenmaske
10-24-2005, 02:52 AM
**Figured it out...thanks!**

iguanairs
10-25-2005, 11:36 AM
Nice idea. I will have to make something similar for my site. (I was going to add yours, but I would need to remove the link and don't want to violate your terms. I can't stand a forced reciprocal link like that.)

apokalupsis
11-17-2005, 04:52 AM
I can't find a single site that is using this successfully (even the demo site is broken).

Does anyone use this? If so, can you link your staff page? I'd like to see it before I use it.

Tracer Gun Kata
11-17-2005, 05:34 AM
I can't find a single site that is using this successfully (even the demo site is broken).

Does anyone use this? If so, can you link your staff page? I'd like to see it before I use it.

Mine works - http://www.onlinewarfare.net - click on 'Staff' under Contact Zone on the left navigation menu.

Only just put it up so only half of the staff have updated there profile

ninni
11-17-2005, 07:38 AM
I can't find a single site that is using this successfully (even the demo site is broken).

Does anyone use this? If so, can you link your staff page? I'd like to see it before I use it.
I Use it, but when I do I have to disable the left column. Otherwise It doesn't work.

Kesomir
11-20-2005, 05:57 PM
hmmm this doesnt seem to work for me. When i go to add a staffpage module i fill in everything that you say to the php file but i still get an error vBulletin Message


You already have a Module with an identifier of ''. Please select a different identifier." But i left the identifier blank. Can someone help me out?

YOu must name your cmps modules, it's how they are differentiated. The instructions should give you a name to use, if not make one up. The reason it says that is you have already created a module with a blank title.

Kesomir
11-20-2005, 05:58 PM
I can't find a single site that is using this successfully (even the demo site is broken).

Does anyone use this? If so, can you link your staff page? I'd like to see it before I use it.

The demo staffpage is back up. I removed CMPS temporarily.

CommunityZ
12-05-2005, 04:48 PM
I got problem at it shows all the details at the frontpage of my site not at site.com/index.php?page=staff

Is there a version that doesn't need vbadvanced just the simple staffpage.php? I run staffpage.php and got errors :)

Kesomir
12-06-2005, 04:27 AM
I got problem at it shows all the details at the frontpage of my site not at site.com/index.php?page=staff

Is there a version that doesn't need vbadvanced just the simple staffpage.php? I run staffpage.php and got errors :)

thats because you had the box "update all pages" ticked when you installed.

edit all pages where it displays and turn the module off for those pages to remove it from the homepage and anywhere else it's not wanted.

Bluestrike2
12-20-2005, 06:00 PM
The MLG PwnCast (http://www.mlgpwncast.com/?) has your Staffpage installed here (http://www.mlgpwncast.com/?page=staff). Thank you for your excellent work!

Kesomir
12-20-2005, 08:38 PM
I don't see it on that page, did you disable it or can guests not view?

Glad you like it regardless though :)

redspider
12-22-2005, 08:20 AM
how can I make my field7 show on this satff page?

TY

Kesomir
12-22-2005, 10:51 AM
http://www.onlinegamers.org.uk/forums/showthread.php?t=2992

scroll down and there should be instructions for how to do it in one of my replies.

Bluestrike2
12-24-2005, 08:39 PM
I hate to be a bother but if you view mine at http://www.mlgpwncast.com/index.php?page=staff you will notice that at the bottom another bar is appearing. Do you have any ideas on what I can do to fix that?

All in all its awesome! Thank you :D.

Kesomir
12-29-2005, 02:50 PM
the bar is set to seperate admins from other staff.

Since you only appear to have admins, to remove:

Go to the staffpage template (adv_portal_staffmembers)

Find and remove:

<br />
<hr align="center" width="90%" color="#444444">

theczech
01-16-2006, 01:36 AM
Here's a couple of tweaks to personalize your Staffpage.

You DO NOT HAVE TO use both tweak simultaneously, you can choose either one or use both.

1. To automatically display an avatar if the user does not have a profile picture, edit the code of staffpage.php:

Instead of:

if ($vbulletin->options['usefileavatar'])
{
$$staffrank .= "<img src=\"".$vbulletin->options[bburl]."/customprofilepics/profilepic".$row[userid]."_".$row[profilepicrevision].".gif\" border=\"0\" width=\"$picturewidth\" /></a> </td></tr></table>";
}
else {
$$staffrank .= "<img src=\"".$vbulletin->options[bburl]."/image.php?u=".$row[userid]."&type=profile&dateline=".$row[dateline]."\" valign=\"top\" alt=\"".$row[username]."\" border=\"0\" width=\"$picturewidth\" /></a> </td></tr></table>";
}

Use the following code:

if (strlen($row['filename']) > 0)
{
$$staffrank .= "<img src=\"".$vbulletin->options[bburl]."/image.php?u=".$row[userid]."&type=profile&dateline=".$row[dateline]."\" valign=\"top\" alt=\"".$row[username]."\" border=\"0\" width=\"$picturewidth\" /></a> </td></tr></table>";
}
else
{
$$staffrank .= "<img src=\"".$vbulletin->options[bburl]."/image.php?u=".$row[userid]."\" valign=\"top\" alt=\"".$row[username]."\" border=\"0\" width=\"$picturewidth\" /></a> </td></tr></table>";
}


2. To be able to use modules in the right column along with the staffpage in the center AND to make the whole staffpage module collapsible, change the template adv_portal_staffmembers to (modify the TITLE OF THE MODULE within the following code):


<tr>
<td class="$getbgrow" width="100%">
<center>
<font size="4" align="center"><b>

TITLE OF THE MODULE HERE

</b></font>
</center>
$Administrator
<br />
<hr align="center" width="90%" color="#444444">
<br /><br />
$VeteranModerator
$Moderator
<center>
<font class="smallfont" align="center">Staffpage by: <a href="http://www.onlinegamers.org.uk">Online Gamers</a></font>
</center>
</td></tr>

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
YOU SHOULD ALWAYS MAKE A BACK-UP OF YOUR ORIGINAL CODE IN CASE THIS DOESN'T WORK FOR YOU.
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

You can see an example here (http://www.teamMR.com) (click on Members at the top). However, the example is also modified so it only shows Admins and custom group I named Team Member.

I hope someone finds this modification useful.

Have a great day!

russbo
01-17-2006, 02:44 PM
I can't find a single site that is using this successfully (even the demo site is broken).

Does anyone use this? If so, can you link your staff page? I'd like to see it before I use it.
I have it here: http://www.russbo.org/index.php?page=staff&

Works great.

I have one question however. Is there any way of forcing the page to show the staff members in a certain order???? I have not yet figured out how the staff page decides how to organize itself, other than admin to moderators. I need to organize the moderator list. If you see my page, you'll understand why.

Thanks. Superb addition to the vba family hacks.

rich

theczech
01-17-2006, 05:10 PM
Yes, there is a way to specify the order in which the usergroups are listed, and also the order of users within each group. Tell me what exactly you have in mind and if you modified your code than post it here and I might be able to help you.

russbo
01-18-2006, 02:08 AM
Well, I understand the order of the usergroups, that's no problem to change. It's how the usergroup pulls members from the usergroup and displays those guys. Basically, I want the one "user" that I use as an advertisement to join the staff, to be the last one. Does the usergroup organize its members on the page based upon their join date??? If so, then it would be easy to put the "advertisement guy" on the end just by changing his join date. I just don't understand if the usergroup organizes these guys randomly, or uses some sort of methodology (join date, alphabetical, age, etc)

theczech
01-18-2006, 08:38 AM
It organizes them alphabetically.

This is the line in the staffpage.php that controls it:

ORDER BY user.username ASC

I guess you can change the advertisement user's name to something that will place it at the bottom of the list, for example '*' <-- the character betweent is not just asterix. It's a character that's number 255 in ascii code, you can type it by holding ALT and typing 255 then releasing ALT. On your website it might appear as a blank character. That should work for you.