Keep avatar on a per message basis, instead of global

This forum is now closed as part of retiring phpBB2
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

This forum is now closed due to phpBB2.0 being retired.
Timduru
Registered User
Posts: 11
Joined: Sat Oct 19, 2002 12:19 am

Keep avatar on a per message basis, instead of global

Post by Timduru »

I'm usually changing my avatar to reflect the current mood when I post a message.
Post the message, and change it depending on the moment of posting.

Now on a few other boards I've tried, the avatar stays linked to the message instead of beeing one global avatar for the user/
ie if user X had avatar Y when he posts a message,
then change its avatar to Z the message still displays avatar Y.

I've not seen such a mod in the database,
anyone knows of one ?
I've not looked at the tables structures, but I guess there is no column for inserting that info on a per message basis.
That would mean it'd require a table alteration..

thanks for any infos.
RustyDragon
Registered User
Posts: 90
Joined: Thu Jul 11, 2002 12:39 pm
Contact:

Post by RustyDragon »

There is no such a mod.
But! I've seen somewhere (sorry don't remember where) a mod which enables you to choose mood icon. It is not linked to any message. It is just mood icon in Odigo, if you know. You enter a board and you choose your mood. And you can change it after some time.

Other alternative - message icon mod. You can attach an icon to post.
User avatar
LaZeR
Registered User
Posts: 671
Joined: Sat Jun 29, 2002 8:38 pm
Contact:

Post by LaZeR »

Sticky Avatar :wink: Netclectic developed this. See his site:
http://www.netclectic.com/forums/index.php
netclectic
Former Team Member
Posts: 4439
Joined: Wed Mar 13, 2002 3:08 pm
Location: Omnipresent
Contact:

Post by netclectic »

I've just updated Sticky Avatar to fix a problem with admin / mods editing user's posts.
Defend the game:
Image
Acecool
Registered User
Posts: 1013
Joined: Sat Jul 13, 2002 4:51 am
Location: Behind my computer
Contact:

Post by Acecool »

He doesnt want his avatar to change in entire forum, just on each post
Visit Acecoolco.com :: Image

If you plan on contacting me, please read this: Legal Terms & Conditions
netclectic
Former Team Member
Posts: 4439
Joined: Wed Mar 13, 2002 3:08 pm
Location: Omnipresent
Contact:

Post by netclectic »

That's exactly the point of the sticky avatar mod.
Defend the game:
Image
Timduru
Registered User
Posts: 11
Joined: Sat Oct 19, 2002 12:19 am

yup

Post by Timduru »

netclectic wrote: I've just updated Sticky Avatar to fix a problem with admin / mods editing user's posts.


Cool, that's exactly what I'm looking for :)
I'll give it a try
thanks :)
Timduru
Registered User
Posts: 11
Joined: Sat Oct 19, 2002 12:19 am

working

Post by Timduru »

Ok I"ve tried it with phpBB 2.0.3
beside this chunk that was failing to update

#
#-----[ FIND ]------------------------------------------
#
<tr>
<td class="row1">{L_ALLOW_UPLOAD}</td>
<td class="row2"><input type="radio" name="allow_avatar_upload" value="1" {AVATARS_UPLOAD_YES} /> {L_YES}&nbsp;&nbsp;<input type="radio" name="allow_avatar_upload" value="0" {AVATARS_UPLOAD_NO} /> {L_NO}</td>
</tr>


it's working fine for url avatars,
it was not working with uploaded avatars either from url or from a file.
Maybe that's something that has changed in 2.0.3 I don't know.
But when you upload a new avatar the old one is deleted, and so the sticky avatar too.
To make it work I"ve just commented the following line in usercp_avatar.php

if ( file_exists('./' . $board_config['avatar_path'] . '/' . $current_avatar) )
{
# @unlink('./' . $board_config['avatar_path'] . '/' . $current_avatar);
}

thanks :)
netclectic
Former Team Member
Posts: 4439
Joined: Wed Mar 13, 2002 3:08 pm
Location: Omnipresent
Contact:

Post by netclectic »

That's really weird :? I've not noticed that happening before on my board (using sticky avatar) but when i test it now it's definitly the case that the uploaded avatars are being deleted.


What i've done to change it is...

find

Code: Select all

if ( file_exists('./' . $board_config['avatar_path'] . '/' . $current_avatar) )
replace with

Code: Select all

if ( $mode == 'editprofile' && $current_type == USER_AVATAR_UPLOAD && $current_avatar != '' && !$board_config['allow_avatar_sticky'] )
I'll include a fix for this in the next version, thanks!
Defend the game:
Image
Timduru
Registered User
Posts: 11
Joined: Sat Oct 19, 2002 12:19 am

something weird

Post by Timduru »

I've noticed that if you"re not logged on, you get the avatar currently set up in the profil
(ie no sticky avatar feature)
while you get the proper sticky avatar if logged on.

Is it on purpose ?
Timduru
Registered User
Posts: 11
Joined: Sat Oct 19, 2002 12:19 am

Re: something weird

Post by Timduru »

Timduru wrote: I've noticed that if you"re not logged on, you get the avatar currently set up in the profil
(ie no sticky avatar feature)
while you get the proper sticky avatar if logged on.

Is it on purpose ?



Update: in fact it's not only when one is not logged on.
It's everyone who is not the user that don't see the sticky avatars 0_0

If I'm logged on as the user it's working fine.
But if not logged one or logged as another user, nope. :\
Timduru
Registered User
Posts: 11
Joined: Sat Oct 19, 2002 12:19 am

update of update ;)

Post by Timduru »

seems it's because of the last test in this line
if ( $postrow[$i]['user_avatar_type'] && $poster_id != ANONYMOUS && $postrow[$i]['user_allowavatar'] && $userdata['avatar_sticky'] )

from viewtopic.php

the display of the sticky avatar is based on the current logged on user setting $userdata['avatar_sticky'] ?

It means if user X posts and has sticky avatar on. His posts will only be seen with sticky avatars if the other users have the sticky avatar feature on , and non logged one users won't see them at all ?

I'm not sure if it's meant to be like that.
I was more expecting it to be only dependant on the poster, if he has the sticky avatar on,
then the sticky avatars are shown for everyone, if not they are not :)

I'm not sure how to retrieve the current sticky avatar flag for the 'poster_id'
but I think that'd be the test to do.
For the moment I've just removed the last test.
It means that if a post was made by someone with the sticky avatar on, and that the person turns of the feature later on, the post will continue to show with the sticky avatars..
Not too much of a problem for me ..
netclectic
Former Team Member
Posts: 4439
Joined: Wed Mar 13, 2002 3:08 pm
Location: Omnipresent
Contact:

Post by netclectic »

That should be...

Code: Select all

$postrow[$i]['avatar_sticky']
Don't know how that one slipped in there, it's correct on my board :?


[Edit] Now updated!
Defend the game:
Image
Timduru
Registered User
Posts: 11
Joined: Sat Oct 19, 2002 12:19 am

Post by Timduru »

ok yep
that's working :)
gfmorris
Registered User
Posts: 67
Joined: Wed Jan 22, 2003 10:15 pm

Post by gfmorris »

I'd dearly love it if netclectic, in his copious [NOT!] free time, could update this MOD.

GFM
--
Geof F. Morris
Post Reply

Return to “[2.0.x] MOD Requests”