user thumbnails (avatars)
as we have quite many subscribers and it becomes hard to keep the overview i was asked if its somehow possible to integrate thumbnails of our members next to the username. (as common in other boards). any ideas, suggestions if there is a solution for?
muchas graçias, el tomate
paradeiser
obviously its not possible to place a macro inside another one like:
<% image name="<% username %>" %>
something like that would help if every user just uploads an image named like his username...
or am i wrong....
edit:
of course i am!
must be <% this.author %> instead of username
dm42
so try this one...
<img src="usericon_ [Macro not allowed in sandbox: username] " />
paradeiser
thx a lot! it works.
now i just need a very basic html advise.
if there is no picture of this user, how can i avoid the broken link/img picture (either a replacement or nothing instead)?
dm42
ok, another way...
you need a javascript with an array of usernames which you know have existing icons. check for existing username in this array and insert the userpicture or a default picture into the template at render time.
paradeiser
thx again.
but im afraid thats far beyond my horizont... :(
is there no workaround just to hide the broken img/link icon?
edit:
somebody mentioned
js
image.complete
but i've no clue how to use it...