The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Loading avatars externally
Hey there,
I'm trying to find a user's avatar and am having problems. I don't have access to any of the VB template functions or includes, but I do have full DB access. The problem I'm running into is this: user_id in the users table DOES NOT match u= in the image.php file. For example: user_id 2 (me) has an avatar at images.php?u=1 user_id 67 (someone else) has an avatar at images.php?u=17 I tried looking into the database table "customavatars" but I couldn't find it in PHPMyAdmin. Any clues on where to go? |
#2
|
||||
|
||||
Check "customavatar" table. There are all customavatars (and "avatar" for you own uploaded avatars for users use as gallery to choose)
There you have an "userid" column to search for userid, and get user's avatar data (filename, size, etc). BUT... i use avatars as files, not from DB, and have no userful data in there So i took a quick lookup for what you ask, and... found this: You only need to check "user" table, and see "avatarrevision" column. If that column is not zero, then user have an avatar, and that avatar is on the server's path that you point on vb's admincp to save them, and have that "revision number" as part of the filename. Like this example: If in "user" table for "userid" = 8 his "avatarrevision" is = 2, then his avatar image is: /server/path/where/avatars/are/stored/avatar8_2.gif The trick is that filename: avatarUSERID_AVATARREVISION.gif Hope helps |
#3
|
|||
|
|||
I wish my avatar images were stored as files! They're stored in the DB though and I can't seem to find the "customavatars" database table. I'm thinking it's hidden or something...
How can I store things on the file system instead? Is there an option to enable this I'm missing? In any case, you are quite correct - userId 2, revision 1000, equals an image of 2_1000.png in the user table under "avatar filename". Unfortunately it runs into the same problem as I originally posted.. User_id 2 has an image filename of 2_1000.png, but to load the image the only way I can find is to follow the URL: /image.php?u=1 I can't find the correlation between the User_ID and image.php's u= field. --------------- Added [DATE]1251931011[/DATE] at [TIME]1251931011[/TIME] --------------- Update: Well I just found out how to store them to the disk instead of the DB, but I'm still having the same problem. UserID2 has /customavatars/avatar1_1.png . I can't find any reference to the number 1 in the user database at all. |
#4
|
||||
|
||||
Quote:
There you can move avatar from DB to filesystem. |
#5
|
|||
|
|||
Just did a few test queries against the "customavatar" table and it doesn't exist, so I'm not just crazy.
|
#6
|
||||
|
||||
Table_prefix?
If you are using a tableprefix for your vbulletin installation (check your includes/config.php file), then use it when you call that table. I use "vb_" as prefix, so that table to me is: vb_customavatar |
#7
|
|||
|
|||
Nope, no prefixes. I can browse all the tables, and am doing so... can see all the internal workins! just no table that remotely resembles the customavatars one. :/
--------------- Added [DATE]1251932025[/DATE] at [TIME]1251932025[/TIME] --------------- ...... of course I'm looking at my old installation's PHPBB database. sigh. nevermind, all solved now. *rolls eyes* |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|