forum.coppermine-gallery.net

Support => cpg1.4.x Support => Older/other versions => cpg1.4 modpack by Stramm => Topic started by: WBL on September 14, 2007, 09:49:51 am

Title: Avatars/Profiles on index.php
Post by: WBL on September 14, 2007, 09:49:51 am
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



Title: Re: Avatars/Profiles on index.php
Post by: Joachim Müller on September 14, 2007, 04:52:28 pm
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 ? (http://forum.coppermine-gallery.net/index.php?topic=46692.0)"), but no answers, so probably nobody knows the answer, or nobody has been willing to look into this.
Title: Re: Avatars/Profiles on index.php
Post by: WBL on September 16, 2007, 06:07:40 am
Oops... Stramm any idea on how to fix my problem?
Title: Re: Avatars/Profiles on index.php
Post by: Stramm on September 16, 2007, 10:46:57 am
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.   
Title: Re: Avatars/Profiles on index.php
Post by: WBL on September 27, 2007, 12:52:59 pm
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?
Title: Re: Avatars/Profiles on index.php
Post by: Stramm on September 28, 2007, 12:59:52 pm
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
Title: Re: Avatars/Profiles on index.php
Post by: lobosden on September 28, 2007, 09:27:09 pm
Ok this gave me critical error had to restore whole site.
Title: Re: Avatars/Profiles on index.php
Post by: Stramm on September 28, 2007, 11:05:04 pm
read more careful
Quote
If you already have the plugin installed you need to remove it and to delete the plugins db table (pfx__mod_online)
Title: Re: Avatars/Profiles on index.php
Post by: lobosden on September 29, 2007, 12:49:41 am
got it worked great my bad....I need to learn to read better lol.
Title: Re: Avatars/Profiles on index.php
Post by: DaBe on March 21, 2008, 05:37:59 pm
hello that is nice..is there possible, when the user dont have a avatar, to display  a default avatar instead nothing?
Title: Re: Avatars/Profiles on index.php
Post by: Stramm on March 21, 2008, 06:35:17 pm
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: [Select]
$avatar_url="";replace it with eg.
Code: [Select]
$avatar_url = "<img src=\"images/default_avatar.jpg\" class=\"image\">";
edit: added the missing ;
Title: Re: Avatars/Profiles on index.php
Post by: Nibbler on March 21, 2008, 06:36:59 pm
Don't forget the semi-colon at the end of the line.
Title: Re: Avatars/Profiles on index.php
Post by: DaBe on March 21, 2008, 07:48:48 pm
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...
Title: Re: Avatars/Profiles on index.php
Post by: Stramm on March 21, 2008, 07:57:33 pm
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.
Title: Re: Avatars/Profiles on index.php
Post by: DaBe on March 21, 2008, 08:12:07 pm
sry was my mistake !  ::) thx
Title: Re: Avatars/Profiles on index.php
Post by: Stramm on March 21, 2008, 08:18:15 pm
All good now? Or does the error persist... in that case post it
Title: Re: Avatars/Profiles on index.php
Post by: DaBe on March 21, 2008, 08:23:26 pm
now, is all good..but one question encore.

you write:
Code: [Select]
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...