Avatars/Profiles on index.php Avatars/Profiles on index.php
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

Avatars/Profiles on index.php

Started by WBL, September 14, 2007, 09:49:51 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

WBL

I have installed Modpack and able to add avatars to profiles.
Is there any method to display avatars on the index page along with Gallery [something like http://designerid.com/ ]

Once you click the avatar it should take to the profiles page..

Any reference threads/help would be great




Joachim Müller

Avatars are a modpack-only feature, so I'm moving this from the "misc"-board to the modpack sub-board.
There are similar threads to yours (e.g. "Getting Member Avatars to be Displayed in index.php ?"), but no answers, so probably nobody knows the answer, or nobody has been willing to look into this.

WBL

Oops... Stramm any idea on how to fix my problem?

Stramm

this is nothing to fix... you're asking for some new functionality. Not hard to come up with something if you have a few free mins. You'd have grab the function loginForm form themes.inc.php and copy it to the theme.php you're actually using. Then find where I've displaying avatars, eg. in pms.php or again in themes.inc.php in function theme_html_comments and add that to the above mentioned function.   

WBL

Hi Stramm,

Thanks.

I saw your post at http://forum.coppermine-gallery.net/index.php?topic=46692.0 and was able to bring user avatar of the 'LOGGED IN' user to the index page. But my question remains the same.. How can i display multiple avatars [something like http://designerid.com/ ] for the guest visitor to view?

Stramm

#5
I've modded Nibblers onlinestats plugin (v 1.8 )
Below the list of logged in users (text list), the plugin will show all avatars of the logged in users, if they do not have an avatar... nothing will display. That's not exactly what you want but it'll give you a good idea of how to achieve it.
Search for 'avatar' in the code to find the changes I did.

Of course the modpack with enabled minithumbs is required. If you already have the plugin installed you need to remove it and to delete the plugins db table (pfx__mod_online).
The avatars will display with reduced size in that list (50% smaller). You can change that in codebase.php

lobosden

Ok this gave me critical error had to restore whole site.

Stramm

read more careful
QuoteIf you already have the plugin installed you need to remove it and to delete the plugins db table (pfx__mod_online)

lobosden

got it worked great my bad....I need to learn to read better lol.

DaBe

hello that is nice..is there possible, when the user dont have a avatar, to display  a default avatar instead nothing?

Stramm

sure... find in the code where I grab the avatar. If the user doesn't have one, I usually assign an empty string like
$avatar_url="";
replace it with eg.
$avatar_url = "<img src=\"images/default_avatar.jpg\" class=\"image\">";

edit: added the missing ;

Nibbler

Don't forget the semi-colon at the end of the line.

DaBe

hello I have a ciritcal error

I have cpg 1.4.16 and have deinstall and remove the db sql in phpmyadmin..but the error is everything here...

Stramm

You're not supposed to 'remove the db sql in phpmyadmin'. Messing around with the db can ruin the gallery.
When you get a fatal error you enable debug mode and the detailed error message you post here (but not the entire debug output).

Hint: If editing a file leads to an error then usually undoing the changes helps.

DaBe


Stramm

All good now? Or does the error persist... in that case post it

DaBe

now, is all good..but one question encore.

you write:sure... find in the code where I grab the avatar. If the user doesn't have one, I usually assign an empty string like
Code:

$avatar_url="";

replace it with eg.
Code:

$avatar_url = "<img src=\"images/default_avatar.jpg\" class=\"image\">";


in which file is that? in the codebase I dont found $avatar_url="";  and in the other files in the zip also...