Simple Machines Community Forum

Customizing SMF => SMF Coding Discussion => Aiheen aloitti: wynnyelle - syyskuu 25, 2013, 11:22:49 IP

Otsikko: How to make most recent poster's avatar show as board icon?
Kirjoitti: wynnyelle - syyskuu 25, 2013, 11:22:49 IP
I just want to replace the "on.png/off.png" image icons with the avatar of the most recent poster to that board, whoever's post shows up as most recent post on that board's front already.

How would I do this?
Otsikko: Re: How to make most recent poster's avatar show as board icon?
Kirjoitti: Arantor - syyskuu 25, 2013, 11:29:11 IP
And add a *significant* extra processing load to every board? We're talking a serious different in performance here.
Otsikko: Re: How to make most recent poster's avatar show as board icon?
Kirjoitti: wynnyelle - syyskuu 25, 2013, 11:30:23 IP
Just to have the front of the site show them? I don't have that many boards out there. I thought since it was already displaying the most recent post real time it wouldn't be a big deal...
Otsikko: Re: How to make most recent poster's avatar show as board icon?
Kirjoitti: Arantor - syyskuu 25, 2013, 11:33:02 IP
No, 36 isn't a lot, I guess >_< (Yes, it is for the purposes of this query)

It is a big deal because the most recent post is already pre-calculated, avatars are not.
Otsikko: Re: How to make most recent poster's avatar show as board icon?
Kirjoitti: wynnyelle - syyskuu 25, 2013, 11:55:18 IP
Would there be a way to have avatars be pre-calculated? The username does show up on the front, at least in default theme. Avatar is connected to the username.

Otsikko: Re: How to make most recent poster's avatar show as board icon?
Kirjoitti: Arantor - syyskuu 25, 2013, 11:56:40 IP
Not without rewriting more of SMF's code than you want to get into... The avatar is not nearly as connected to the username as you think it is.
Otsikko: Re: How to make most recent poster's avatar show as board icon?
Kirjoitti: wynnyelle - syyskuu 25, 2013, 11:58:32 IP
Then can anyone else show me how I might be able to do this?
Otsikko: Re: How to make most recent poster's avatar show as board icon?
Kirjoitti: Arantor - syyskuu 26, 2013, 12:01:03 AP
Oh, don't mistake me. I'm not incapable of doing it. I'm just refusing because I cannot in good conscience tell you how to do it. I refuse to tell you how to add a feature that will adversely affect the running of your forum.

Anyone else who thinks of offering should understand the unique nature of your forum and that the tiniest change can have colossal effects.
Otsikko: Re: How to make most recent poster's avatar show as board icon?
Kirjoitti: wynnyelle - syyskuu 26, 2013, 12:07:50 AP
Would it help if there were fewer front boards displayed? Like a bare minimum?

I see what you are saying. Now what I need to do is sort out what I need to change to allow for this compromise. I want the front of the site to display more member-created content, particularly images. Avatars seemed to me to be a good place to start with this.

You don't have to reply if you don't feel you have any answers.
Otsikko: Re: How to make most recent poster's avatar show as board icon?
Kirjoitti: wynnyelle - lokakuu 02, 2013, 12:47:01 AP
I actually found another forum that does this exactly like I want to.

I can give the link by PM if you like.
Otsikko: Re: How to make most recent poster's avatar show as board icon?
Kirjoitti: margarett - lokakuu 02, 2013, 02:34:49 AP
Besides what Arantor mentioned, you will loose the "new posts" visualization (by replacing on/off icons) in board index. Isn't this a major concern for your users?