The Serendipity Handbook

You can now read the (german) handbook here: PDF - https://github.com/s9y/Book (LaTeX source).

Forum-Information

Before posting about errors, make sure that the answer cannot already be found in our FAQ or by searching this forum!
Posting is restricted to registered users (registering is free and simple!) due to recent spam attacks. When having trouble with this board, contact garvin(-at)s9y(-dot)org.

Board index Plugins Avatar Plugin - Default Avatar image not shown

Creating and modifying plugins.
User avatar
lfrantzen
Regular
 
Posts: 49
Joined: Fri May 02, 2008 1:24 pm
Location: Cologne, Germany

Postby lfrantzen » Tue Jan 24, 2012 12:24 pm

Hi,

I newly added the Avatar plugin with these settings:

Load Avatar via: all set to "Gravatar"
Default Avatar image: set to an image from the media library (but also an external link does not help)

The plugin is the upmost in the event plugin list.

The problem is that when no gravatar image exists, the default image is not shown. Instead I get an asterix being enclosed in a box, see:

http://www.frantzen.info/archives/10-simfy-Player-unter-Ubuntu-10.10-64bit-Installieren.html

Also changing the Gravatar fallback and Gravatar always fallback options did not affect this behaviour.

Any clues?
Thanks and cheers!
Lars

User avatar
yellowled
Regular
 
Posts: 4936
Joined: Fri Jan 13, 2006 12:46 pm
Location: Eutin, Germany

Postby yellowled » Tue Jan 24, 2012 12:47 pm

lfrantzen wrote:Also changing the Gravatar fallback and Gravatar always fallback options did not affect this behaviour.

The Avatar plugin will get an update in the next couple of days anyway which might fix this. Then again, I tested this (locally) just the other day and it worked fine with an image from my media db.

YL

User avatar
blog.brockha.us
Regular
 
Posts: 695
Joined: Tue Jul 03, 2007 3:34 am
Location: Berlin, Germany

Postby blog.brockha.us » Tue Jan 24, 2012 1:05 pm

I think, the update I've done yesterday on the avatar plugin should fix that, too.
But: Don't set all fallbacks to Gravatar. What you order the plugin to do with it is:

try Gravatar.
if it fails, try Gravatar.
if it fails, try Gravatar.
..

Set the first "fallback" to Gravatar and set the other entries to "---". The plugin will stop trying to do other fallbacks when it first finds the "---" and will use the default Avatar, if set and no Avatar was found trying the methods before.

Btw: What version of serendipity are you using?
- Grischa Brockhaus - http://blog.brockha.us
- Want to make me happy? http://wishes.brockha.us/

User avatar
lfrantzen
Regular
 
Posts: 49
Joined: Fri May 02, 2008 1:24 pm
Location: Cologne, Germany

Postby lfrantzen » Tue Jan 24, 2012 1:26 pm

Hi all,

blog.brockha.us wrote:Set the first "fallback" to Gravatar and set the other entries to "---".

done, no change.
blog.brockha.us wrote:Btw: What version of serendipity are you using?

Powered by Serendipity 1.6 and PHP 5.2.17

I will let you know if the update fixes it.

Thanks and cheers!
Lars

User avatar
blog.brockha.us
Regular
 
Posts: 695
Joined: Tue Jul 03, 2007 3:34 am
Location: Berlin, Germany

Postby blog.brockha.us » Tue Jan 24, 2012 2:52 pm

lfrantzen wrote:done, no change.

Well of course. This will only reduce needless load from your server while fetching the ava, but as you did not update the plugin itself yet, the original problem is still there.

Pressing thumbs, that my recent fix will fix your problem too.. :mrgreen:
- Grischa Brockhaus - http://blog.brockha.us
- Want to make me happy? http://wishes.brockha.us/

User avatar
lfrantzen
Regular
 
Posts: 49
Joined: Fri May 02, 2008 1:24 pm
Location: Cologne, Germany

Postby lfrantzen » Tue Jan 31, 2012 4:55 pm

Hi,

unfortunately the update to version: 1.57 did not help, same situation as described above.

Cheers,
Lars

User avatar
blog.brockha.us
Regular
 
Posts: 695
Joined: Tue Jul 03, 2007 3:34 am
Location: Berlin, Germany

Postby blog.brockha.us » Wed Feb 01, 2012 2:37 pm

Okay. I seem to be able to reproduce the problem in my testblog. I hope to have a fix soon. :)
- Grischa Brockhaus - http://blog.brockha.us
- Want to make me happy? http://wishes.brockha.us/

User avatar
blog.brockha.us
Regular
 
Posts: 695
Joined: Tue Jul 03, 2007 3:34 am
Location: Berlin, Germany

Postby blog.brockha.us » Wed Feb 01, 2012 2:51 pm

Ah well, I can't reproduce it, if I set it up correctly. I was confused myself.
If I setup Gravatar as first method and Standardavar as second, the StandardAva is shown, if no Gravatar was found.

Did you set it up like that or Gravatar only (like I told you wrong some posts before)?
- Grischa Brockhaus - http://blog.brockha.us
- Want to make me happy? http://wishes.brockha.us/

User avatar
lfrantzen
Regular
 
Posts: 49
Joined: Fri May 02, 2008 1:24 pm
Location: Cologne, Germany

Postby lfrantzen » Wed Feb 01, 2012 3:13 pm

blog.brockha.us wrote:Did you set it up like that or Gravatar only (like I told you wrong some posts before)?


I had Gravatar only... So setting "Defaultavatar" as the second choice did solve it! Sorry, I could have guessed that, I just overlooked the explicit "Defaultavatar" option and assumed that it is chosen implicitly when the default avatar image is set, and no other option matches.

Maybe adding a short note at the default avatar image section like "Do not forget to also load the Defaultavatar above" could prevent that mistake?

Thanks for your help!
Lars

User avatar
blog.brockha.us
Regular
 
Posts: 695
Joined: Tue Jul 03, 2007 3:34 am
Location: Berlin, Germany

Postby blog.brockha.us » Wed Feb 01, 2012 3:19 pm

Yeah, true.. Even I was confused about that. :shock:
I will add an infotext describing that.

About setting it implicit: Well I was thinking about doing that. But then you always have to delete the link to the AVA and search it again from your medialib in order to switch it on and off. Having a "DefaultAva" method is much more easy. What do you think?
- Grischa Brockhaus - http://blog.brockha.us
- Want to make me happy? http://wishes.brockha.us/

User avatar
lfrantzen
Regular
 
Posts: 49
Joined: Fri May 02, 2008 1:24 pm
Location: Cologne, Germany

Postby lfrantzen » Wed Feb 01, 2012 3:48 pm

I would consider having an explicit checkbox:

[ ] Use a default avatar when all other options fail

the best solution. Then the "Defaultavatar" option can be removed from the set of choices, and the image location can be preserved by just unchecking the box. But this solution is probably also the most expensive one?



Return to Plugins

Who is online

Users browsing this forum: Google [Bot] and 3 guests