Posted by kiryoku on November 9, 2007 at 9:43am
I use the following code in order to display my users avatar (if they have any) on my site.
Since phpbb3 handles my avatars... is there any way of getting this to work?
The problem is that Drupal doesn't know about the phpbb3 avatars and because of their random filenames I don't know how to get this to work...
<?php
global $user;
if ( $user->picture ) {
print "<div id=\"userbar_avatar\"><a href=". $base_path ."/user/". $user->uid .">" .theme(''user_picture'', $user, ''user_picture''). " </a></div>";
}
?>
Comments
just follow the instructions
just follow the instructions on arkepps website :)
I found my mistake, I
I found my mistake, I managed to drop the premodded files into the wrong directory...
Thanks a lot! :D
I've followed guide, but for
I've followed guide, but for some reasons Drupal skips a "/" between "avatars" and the filename... ---> forum/shared/avatarsc1355960f3a6...
I've tried to set "avatars" and "avatars/" on the user-page, but it still skips the "/". Any ideas?
Confirmed, here's the fix
Yeah, I can confirm what NeoID says, this has come up somewhere between RC5 and RC7, I didn't catch it.
I'll get around to releasing a new version this weekend or early next week, in the mean time you can change line 13 of forum/includes/functions_drupal.php to
$drupal_avatar_path = 'forum/' . $config['avatar_path'] . '/';(not the slash at the end, otherwise the same)
Thanks, I tried to change
Thanks, I tried to change that line, but it didn't make any difference on the path at all...
You need to upload the
You need to upload the avatar again, else the line is not used. You can run a update (using the replace function in MySQL) on the picture column of the drupal_users table in to fix exisiting avatars.
mm same problem here
Hi all,
i'm having the same problem as the topic starter,i already edited drupal_functions.php in my includes folder,uploaded my avatar again and its still now showing cause drupal is searching in the wrong avatar,i made a screen with some info see atachment
http://www.ashladan.be/files/avatar%20sync.PNG
when i look to the the user table and then the picture table i'm seeying strange things:
1 .../files/avatars/shared/upload455c2a10dc037e190c7...
1 .../files/avatars/shared/upload455c2a10dc037e190c7...
1 .../files/avatars/shared/upload455c2a10dc037e190c7...
1 files/avatars/picture-1.jpg
i still dont know why its looking into files/avatars/shared/..
like you can see al my settings ar like they have to be i think..
hope you can help.
If you change
If you change drupal_functions.php you change the path that is appended to all FUTURE updates of Drupals user table, as I have explained to you before.
1 files/avatars/picture-1.jpgis an artifact of an insert you made before you made your own, custom changes ( http://groups.drupal.org/node/6791#comment-19794 ). So now you have this mess in your database, a file path in the phpBB admin section, which is probably okay, and a line in functions_drupal.php that still says it should prefix every location string with ".../files/" before inserting it into Drupals user table.yeah okay the mess is made
yeah okay the mess is made by me thats a thing i know :D, but i replaced the file with the orginel one yesterday and i even uploaded my avtar again in phpbb in the hope that it will updated on drupal :D.
this is line 13: $drupal_avatar_path = 'forum/' . $config['avatar_path'] . '/';
i think i need to clear the tables but how?...
Sorry for the problems :D