View Full Version : [Module] Dynamic Staffpage (vB3.5)
bhxtyrant
09-10-2006, 06:31 AM
Hmm i gave your suggestion a try but it seems to have no effect as everything still shows exactly the same reguardless of if a value is set in the defined fields or not.Perhaps i have to use an "else" command along with the if command?
Kesomir
09-10-2006, 06:37 AM
try variations to determine unset variable
if ($row[field6] = null)
or
if ($row[field6])
or
if ($row[field6] == "")
or
if (is_null($row[field6]))
or
if (empty($row[field6]))
bhxtyrant
09-10-2006, 07:34 AM
Ah thanks that got it up and running :D had to use "if ($row[field6])" now i will begin on paging see what i can come up with.Thanks again for all your help.
Also i had one final question,Is there any sort of exception or aggreement we might be able to make so i can remove the small copyright link/text?I know it's always good to give credit obviously but would it be possible to move the link to another location?or if we could come to some sort of aggreement to remove it completely either would be great.
Kesomir
09-22-2006, 05:49 PM
Sorry for the delay, I've started a new job (3hrs travel a day) and been busy so not swung by.
I've been intending to release the module under GPL2 but just havn't got to it yet, I'll get on it now and strip the link but for those of you with it installed - anyone who wishes may remove it with my blessing.
I want to thank all of you who followed my wishes in displaying it up until now. Special thanks also to all the people who have helped others and given back with their mods and assistance, don't stop :P
I've started learning python since I got xgl/compiz running on ubuntu (eye candy 4tw) and I'm having lots of fun playing with it and the wx gui tools so hopefully I'll be knocking out some programs on Linux/Win32 soon.
wedvidpro
09-23-2006, 09:23 PM
Well.. Followed the instructions to a T.. It seems to be the SQL causing this error:
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /modules/staffpage.php on line 61
VB 3.6.1
MySql 4.1
PHP 5
Kesomir
09-24-2006, 06:01 AM
wedvidpro please download the zip again and overwrite the staffpage.php with the one in the file. I added some error checking code. Then please post what output you get.
wedvidpro
09-24-2006, 01:36 PM
Updated as suggested.
We move up a line in the error..
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /modules/staffpage.php on line 62
Kesomir
09-25-2006, 06:03 PM
It may have something to do with 3.6.1 as I havn't upgraded to that yet. Once I get time I'll do so and post again - just letting you know I havn't gone awol :D
wedvidpro
09-25-2006, 10:02 PM
Alright..I'll be waiting for ya..;)
LatinPrince
09-26-2006, 05:21 PM
Database error in vBulletin 3.5.4:
Invalid SQL:
SELECT userfield.userid, user.userid, user.username, user.membergroupids, user.usergroupid, user.avatarrevision, user.profilepicrevision, customprofilepic.dateline, customprofilepic.filename, userfield.field23
FROM userfield AS userfield
INNER JOIN user AS user ON (userfield.userid=user.userid)
LEFT JOIN customprofilepic AS customprofilepic ON (customprofilepic.userid=user.userid)
WHERE FIND_IN_SET(5,user.membergroupids) OR FIND_IN_SET(6,user.membergroupids) OR FIND_IN_SET(7,user.membergroupids)
OR (user.usergroupid = 5) OR (user.usergroupid = 6) OR (user.usergroupid = 7)
ORDER BY userfield.userid ASC;
MySQL Error : Unknown column 'userfield.field23' in 'field list'
Error Number : 1054
Date : Tuesday, September 26th 2006 @ 04:19:32 PM
Script : http://xxxx.com/titans/index.php?page=staff&$session[sessionurl]
Referrer :
IP Address : xxxxx
Username : xxxxx
Classname : vB_Database
Where did I go wrong?
Kesomir
10-01-2006, 04:57 PM
LatinPrince:
You havn't set the value for the biofield. Read through the instructions again and enter the correct number in the staffpage.php file after you create the custom field.
Save and look at the listing. The name for the field will be fieldx where x is a number
Open staffpage.php and type that number into the line that reads $bionum between the quotes
wedvidpro:
I just upgraded to 3.6.1 and the staffpage still works. Might be a problem related to php5, then again, may not be. Perhaps it's related to your database prefix but again scratching my head here.
I've replaced the file in OP with a slightly updated one that has a minor tweak for performance
1. download ond over write with that one and see if it gives you a mysql_fetch_assoc error.
Then it may be time for some trial and improvement.
2. Try removing the three instances of " . TABLE_PREFIX ." in the sql query.
wedvidpro
10-02-2006, 03:05 AM
Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /modules/staffpage.php on line 61
Yep same error..I wonder if it's related to my vbulletin config using MySQLi
instead of MySQL
Kesomir
10-02-2006, 03:37 PM
lol!
open the php file staffpage.php
find the line:
while($row = mysql_fetch_assoc($result))
replace with:
while($row = mysqli_fetch_assoc($result))
let me know if that fixes for you.
wedvidpro
10-11-2006, 10:31 AM
I figured it out.. I am using MySQLi and your code is for MySQL. I changed to MySQL to test the theory and with MySQL set in the config it works..:)
I have no "moderators" on my forum. Instead I have a "Committee" group (ID: 51) of 5 people who all have full mod powers. I want to only display only this group on the staff page and I want to display any rank information, simply their username.
Edit: Doesn't matter. Worked it out by editing the PHP file.
Kizzmet
11-15-2006, 06:51 PM
I`m using vb 3.6.3 and everything is working great so far.
I don't know much about coding but was able to figure out how to change which usergroups I wanted it to display.
Thanks a ton!
Kizzmet
11-17-2006, 03:01 PM
Is there anyone who can please tell me how to get it to show any html or bbcoding entered in the profile field by the staff members?
unforsaken
12-17-2006, 07:22 AM
I've done all the steps in the install...tripple checked everything...it appears ok in the cmps...appears activated...but when I click on my link I just get taken to my index page...any ideas???
McCarroll21
01-03-2007, 12:16 PM
I'm having the same problem as some of the others in this thread. When I installed it, it made my right column go down below the center column. Any ideas on why it is doing that?
Eagle Graphix
01-08-2007, 07:33 AM
I am trying to do 2 things.
1. Trying to get a PM link/button and online status to show up. I can get custom fields with no problem. Can't get those to come up though.
2. I have tried to uncomment // the 3 lines like you explained and I get an error on the page after I do that.
3. Sorry one more idea. Can I make a certain image show up instead of an avatar if they don't put up a pic?
Thanks for any help.
Chris
theczech
01-08-2007, 10:32 AM
I am trying to do 2 things.
1. Trying to get a PM link/button and online status to show up. I can get custom fields with no problem. Can't get those to come up though.
2. I have tried to uncomment // the 3 lines like you explained and I get an error on the page after I do that.
3. Sorry one more idea. Can I make a certain image show up instead of an avatar if they don't put up a pic?
Thanks for any help.
Chris
I can help you with your #1 and #3 problems. Catch me on my xfire TheCzech or MSN micquell@hotmail.com, I'm on 24/7 but have time to work on usually after 5 pm.
I can help you with your #1 and #3 problems. Catch me on my xfire TheCzech or MSN micquell@hotmail.com, I'm on 24/7 but have time to work on usually after 5 pm.
Why don't you explain it here on the forum so we can all find the same solutions?
Eagle Graphix
01-08-2007, 03:55 PM
theczech, hey thanks for the offer. I am curious if you could just post it here. Maybe just paste the code that you use in your staffpage.php file. I can then see how it is done. I think it would benefit everyone that way. This seems to be a popular hack. Thanks a bunch.
theczech
01-09-2007, 12:23 AM
OK, fellas,
it's done. This following staffpage.php adds an online/offline icon next to the name, and adds a Send PM button.
Don't forget to modify the bio field and usergroups to suit your needs (if you have done so before).
You may have to upload your own
user_online.gif and user_offline.gif into your default images/statusicon directory
and your
sendpm.png into your default images/buttons directory.
Hope that helps!
Eagle Graphix
01-09-2007, 12:28 AM
Hey everyone he did a GREAT job on this. I have this and it works great!
Thanks for sharing and taking the time to do this the czech greatly appreciated.
Can you explain how to download that file? I can't seem to capture it with my download program or the IE7 download dialog. Can you just change it to a .txt file and then let us change it back to a .php?
theczech
01-09-2007, 01:00 AM
Can you explain how to download that file? I can't seem to capture it with my download program or the IE7 download dialog. Can you just change it to a .txt file and then let us change it back to a .php?
That's weird, it works fine for me, offers the download window when i click on it.
I don't know why it didn't do that for me the first time I was on the forum (tried several times and finally could retrieve it using the Firefox browser). Now it works fine. Maybe it's the instability of IE7, I don't know. I appreciate your work though, thanks.
Jim
unforsaken
01-11-2007, 12:32 AM
does anyone know why mine doesn't seem to work. I've installed it, followed all the steps and when I click on the link for it...it just simply takes me back to exact same page....www.coderzfactory.org if you want to take a look...its at the bottom of the portal page...
if needed you can log in with a test account...
Login : tester
Password : tester
does anyone know why mine doesn't seem to work. I've installed it, followed all the steps and when I click on the link for it...it just simply takes me back to exact same page....www.coderzfactory.org if you want to take a look...its at the bottom of the portal page...
if needed you can log in with a test account...
Login : tester
Password : tester
I don't know why it doesn't work. I do know it took way too long to even get to the portal page, prob'ly because you made me detour past some huge-ass image that weighs in at 511KB and does nothing but sit on the page. Are you an art site or are you a "coderz" site (whatever that is)? Try this one at one fourth the file size: http://www.enterprisejm.com/images/share/coderz_intro.jpg Even so, I wouldn't force my visitors to look at a picture before getting to what they came for.
I'd also like to know why I keep getting that "Run activeX?" pop-up on every page. Get rid of it, you don't need it. I am beginning to think that "coderz" aren't really coders. Am I right?
Jim
unforsaken
01-11-2007, 02:19 AM
no in fact the group is a group of coders (coderz is just another way in the net lingo to say coders)...however they are a group of ppl who focus on gaming apps in asm language, as for the size of the graphix it was made by one of our members who is in fact a professional digital graphix artist. As for the intro image...a lot of sites have a logo at the begining of their site, and I have to say I've never really noticed the site...I didn't make the site, I only took it over after it was established and being on the broadband net I'm on I've never noticed its size as it loads up in a matter of a second for me. For the active x script, its part of a mod/hack that is installed. The only way to remove it would be to remove the hack and we aren't prepaired for that. If you want to avoid the graphix tho, you can always hit http://www.coderzfactory.org/portal.php and that will bypass the graphix. I apologize if you don't like the site, but the users of our site do not seem to be bothered by it. There must just be something about this module and a mod/hack that is installed on our site. Its the only logical conclusion I can come up with. I guess I can use another mod/hack and then just design my own webpage that does the Staff info page...it would have just been nice to have this one working. If anyone has any other suggestions to make this work I'ld love to hear them. Thanx for all who are willing to help.
theczech
01-11-2007, 07:18 AM
Unforsaken,
It seems like you didn't set up your CMPS page called 'staff' correctly. VBa by default will take you to the main page you're calling a page that doesn't exist. That's all I can tell from looking at your website without seeing your AdminCP.
If you want more help, hit me up on xfire (TheCzech) or msn (micquell@hotmail.com) and I'll help you.
paradise
01-29-2007, 07:03 AM
Did anyone ever figure out how to make this work with secondary usergroups? And only one single group? I have a board of directors, that is a sec. user group and I need to make a page for it, and have not been able to get it to work.
joeychgo
01-31-2007, 10:57 PM
This wasnt working for me --
I played with the code - im not a coder -- But I got it working better -
It wasnt showing pics or avatars
There was also a border around the PM button.
I got it showing the pics- but still not avatar -- I fixed the border.
Maybe that will help -- here is the file
DeadpoolSA
02-17-2007, 07:51 AM
Is there a way to add one member to the staff page? He's just a registered member but does have mod rights in one forum on the board. I definitely love this module though! Great work!
theczech
02-17-2007, 02:41 PM
Is there a way to add one member to the staff page? He's just a registered member but does have mod rights in one forum on the board. I definitely love this module though! Great work!
Yes there is. Are you using the original staffpage.php or some modified version?
What title does this user have? Administrator, moderator, something else?
DeadpoolSA
02-25-2007, 02:54 AM
Yes there is. Are you using the original staffpage.php or some modified version?
What title does this user have? Administrator, moderator, something else?
Sorry for the delay in responding. I'm using the original staffpage, and the person is a regular member in the Registered usergroup. He has mod rights in one forum though.
theczech
02-25-2007, 03:44 AM
Sorry for the delay in responding. I'm using the original staffpage, and the person is a regular member in the Registered usergroup. He has mod rights in one forum though.
OK, what's his user id?
dplevy81
05-05-2007, 03:25 PM
okay i just read through EVERYTHING and cant seem to find an answer to my question.. i instaled the staffpage and everything seems to work well, except that the profile pics keep disappearing. i reload everything and they come back, but hours later they seem to disappear again. anyone?
theczech
05-05-2007, 03:33 PM
okay i just read through EVERYTHING and cant seem to find an answer to my question.. i instaled the staffpage and everything seems to work well, except that the profile pics keep disappearing. i reload everything and they come back, but hours later they seem to disappear again. anyone?
That's a new one ... hmmmm, no idea. Don't even know where to start.
Johnneke
05-21-2007, 09:10 AM
Hmmm this looks very nice but is the instructions in the zip modified for the latest version of vb?
I'm having trouble with this step (There is only a Add new style link on my style manager and that only allows me to add the name but not the code? I'm a vb noob *ashamed*:
Create a new Template by selecting from your Admin CP
Styles and Templates -> Style Manager -> Add new template
Use the following data;
///////////////////////////////////////////////////////////////////////////////////
Name: adv_portal_staffmembers
///////////////////////////////////////////////////////////////////////////////////
<center>
<table class="tborder" border="0" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" width="100%">
<tr><td class="tcat">
<font size="4"><b>$vboptions[bbtitle] Staff</b></font>
</td></tr>
</table>
<br />
$Administrator
<br />
<hr align="center" width="90%" color="#444444">
<br /><br />
$VeteranModerator
$Moderator
</center>
<br />
///////////////////////////////////////////////////////////////////////////////////
Renada
05-21-2007, 09:27 AM
Hmmm this looks very nice but is the instructions in the zip modified for the latest version of vb?
I'm having trouble with this step (There is only a Add new style link on my style manager and that only allows me to add the name but not the code? I'm a vb noob *ashamed*:
Create a new Template by selecting from your Admin CP
Styles and Templates -> Style Manager -> Add new template
Hi,
Things can be very confusing when you're first starting out :)
Click on:
Styles and Templates -> Style Manager ->
On the right hand side you will see a drop-down menu called "All Style Options".
In that drop down menu you will find "Add New Template" - click on that and you'll get a new page where you can name your template and add the code that you need. :)
Regards,
Renada
All by themselves, vBulletin and vBadvanced CMPS pass the World Wide Web Consortium validation tests because they are well written in xHTML Transitional code. The template code above breaks all that. It should be rewritten so as not to use the center and font tags. And the use of bold tags (<b></b>) should be changed to <strong></strong>.
This is a good module to add to a forum and there's no reason it couldn't be written with valid xHTML code.
Just my opinion,
Jim
unforsaken
05-24-2007, 01:43 AM
has anyone got this working with 3.6.7PL1 and cmps 3.0RC1? I am having similar issues as before where the page is not displaying at all.
sly ls1
05-30-2007, 01:57 PM
Ok ive got just a small problem, the module I can get to work fine and show up on the home page or forum page, I just cant get the staff page to show no matter what url I try.
I think its because of my index page url being
http://www.toughstreetcars.com/forum/index.php
rather than
http://www.toughstreetcars.com/index.php
im sure its an easy fix I just cant seem to work it out
any help would much appriciated
Cheers
Edit: I worked it out at last
http://www.toughstreetcars.com/forum/index.php?pageid=staff
Ive also changed the staffpage.php file around a bit to make it a bit neater, ive attached it below
sly ls1
05-31-2007, 06:38 AM
has anyone got this working with 3.6.7PL1 and cmps 3.0RC1? I am having similar issues as before where the page is not displaying at all.
I installed on 3.6.7, I just followed the instructions and they worked fine, the only thing I found I had to change was the link to the page, I had to use
/index.php?pageid=staff
instead of
/index.php?page=staff&$session[sessionurl]
Im pretty sure thats the only change I had to make.
hope that helps.
ryans
06-24-2007, 04:03 PM
my admin usergroup is 28. I changed all instances of 6 to 28. didn't work. I then deleted showstaff.php file and it still works. wondering if it's not using that php file?
redspider
11-25-2007, 05:52 AM
any chance for this to be upgrade to work with latest software ?
vbulletin and vbadvance.
thanks
attroll
11-25-2007, 03:16 PM
any chance for this to be upgrade to work with latest software ?
vbulletin and vbadvance.
thanks
I have it working fine with 3.6. It should be working for you as well.
attroll
11-25-2007, 03:20 PM
Ok ive got just a small problem, the module I can get to work fine and show up on the home page or forum page, I just cant get the staff page to show no matter what url I try.
I think its because of my index page url being
http://www.toughstreetcars.com/forum/index.php
rather than
http://www.toughstreetcars.com/index.php
im sure its an easy fix I just cant seem to work it out
any help would much appriciated
Cheers
Edit: I worked it out at last
http://www.toughstreetcars.com/forum/index.php?pageid=staff
Ive also changed the staffpage.php file around a bit to make it a bit neater, ive attached it below
You need to go to the Staff page in your CMPS and go to the Main Options and change you CMPS URL to this "/index.php".
vBulletin® v3.7.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.