View Full Version : [Module] Dynamic Staffpage (vB3.5)
henners
12-05-2007, 12:11 PM
Hey, can anyone supply me with an if statement that I can use with this.
IF user has an avatar
THEN show it
ELSE show noavatar.gif
I'm all out of ideas, but there must be some code out there to manage this?
attroll
12-05-2007, 02:37 PM
Hey, can anyone supply me with an if statement that I can use with this.
IF user has an avatar
THEN show it
ELSE show noavatar.gif
I'm all out of ideas, but there must be some code out there to manage this?
By default it is set up to use profile pictures and not avatars. Maybe that is what is wrong.
henners
12-06-2007, 09:19 AM
Indeed; currently I have this to show avatars:
$$staffrank .= "<img src=\"".$vbulletin->options[bburl]."/image.php?u=".$row[userid]."\" valign=\"top\" alt=\"".$row[username]."\" border=\"0\" /></a> </td></tr></table>";
This works fine, but for users with no avatar it shows nothing, obviously. For these users, i'd love to show a default gif instead. Any ideas?
henners
12-06-2007, 03:32 PM
nevermind, I just changed the old code to call the database for avatars instead of profile pics :)
D12Eminem989
02-16-2008, 07:16 PM
I have 3.6 and I cannot get it to work. I get this:
Database error in vBulletin 3.6.8:
Invalid SQL:
SELECT userfield.userid, user.userid, user.username, user.membergroupids, user.usergroupid, user.avatarrevision, user.profilepicrevision, customprofilepic.dateline, customprofilepic.filename, userfield.field66, userfield.field2, userfield.field4
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.field66' in 'field list'
Error Number : 1054
Date : Saturday, February 16th 2008 @ 05:13:54 PM
Script : index.php?page=test
Referrer :
IP Address : **.**.**.**
Username : Hitman
Classname : vb_database
Craig141
02-17-2008, 09:22 PM
you got a Unknown column 'userfield.field66' in 'field list'
Do you have a userfield called field66?
it's got to be in your userfield table
D12Eminem989
02-17-2008, 09:47 PM
Yeah it's my custom field I added for xfire users.
Ayberk1122
03-04-2008, 08:21 PM
vbadvanced 3.0 not works??
airborneCAL
04-27-2008, 03:15 AM
I think this is an excellent module - can it be redesigned to work for 3.7?
Ug4t0R
05-26-2008, 10:36 PM
can it be redesigned to work for 3.7?
no answer to that question?
attroll
05-26-2008, 10:42 PM
What do you mean by wanting it to be redesigned for 3.7?
What is wrong with it the way it is now?
mholtum
05-27-2008, 12:34 AM
I think this is an excellent module - can it be redesigned to work for 3.7?
Have you tried to use it in 3.7? It will probably work.
blind-eddie
07-03-2008, 02:05 AM
With a lil editing, it works Great with 3.7.2
BOUCreed
08-05-2008, 12:13 PM
What do you have to edit to get this to work with 3.7.2?
blind-eddie
08-05-2008, 12:17 PM
Try this out. http://www.vbulletin.org/forum/showthread.php?t=184491
vBulletin® v3.7.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.