Avatar Display in the Forum

Printer Friendly Version Attach Files

wdavatar?user=ed-johnson
Ed Johnson
25 Apr 2010 11:58. Edited 0 times. (Edit, Permalink)

It looks like the space in my user name is causing the avatar display to fail. I thought this was addressed and fixed a while ago by tsangk… ???

Included page "inc:signature" does not exist (create it now)

wdavatar?user=tsangk
tsangk

25 Apr 2010 13:02. Edited 0 times. (Edit, Permalink)
No. I didn't fix the spaceproblem with the avatars because it is an internal Wikidot problem.

However, notifcations don't show up properly in this theme.

Included page "inc:signature" does not exist (create it now)

wdavatar?user=leiger
leiger

26 Apr 2010 00:10. Edited 0 times. (Edit, Permalink)
Oh damn, I thought everything was working with avatars as well - guess not :(

As for notifications… what do you mean? Can you elaborate on "don't show up properly"?

Included page "inc:signature" does not exist (create it now)

wdavatar?user=tsangk
tsangk

26 Apr 2010 03:30. Edited 0 times. (Edit, Permalink)
Notifications (like PMs) don't show up…. the pop-up goes behind the whole behind the website (I think it's a z-index problem :S). The shaded screen appears and the whole website is non-responsive. Solution: refresh page. :-)

Included page "inc:signature" does not exist (create it now)

wdavatar?user=leiger
leiger

26 Apr 2010 03:42. Edited 0 times. (Edit, Permalink)
I hadn't noticed :S

Included page "inc:signature" does not exist (create it now)

wdavatar?user=
(user deleted)

27 Apr 2010 19:01. Edited 1 times. (Edit, Permalink)
So why does my avatar show up properly here (the thread that led me to believe it was fixed)?

[[image http://wdpkg.ejohnson.info/getavatar.php?u=ed-johnson&size=48]]

getavatar.php?u=ed-johnson&size=48

[[image http://wdpkg.ejohnson.info/getavatar2.php?id=38854&size=48]]

getavatar2.php?id=38854&size=48

Included page "inc:signature" does not exist (create it now)

wdavatar?user=leiger
leiger

27 Apr 2010 23:35. Edited 1 times. (Edit, Permalink)
I suspect, for the same reason this doesn't work :(

[[image http://wdpkg.ejohnson.info/getavatar.php?u=Ed Johnson&size=48]]

getavatar.php?u=Ed

It's a wikidot problem. Adding a space in the URL breaks it and therefore tsangk's script only gets "Ed" and searches for an avatar for that user.

Included page "inc:signature" does not exist (create it now)

wdavatar?user=
(user deleted)

28 Apr 2010 00:14. Edited 2 times. (Edit, Permalink)
Yes, same problem with the Hammer Navigator user list. We really need a %%created_by_unix%% variable to solve this. I know it's in the user table where the user name is forced to lower case and hyphens replace spaces, so it would be easy to implement. It's clear to me that %%created_by%% uses the nick_name field.

user_id name nick_name unix_name
-1 Anonymous Anonymous anonymous
2 moc.niamod|nosnhoje#moc.niamod|nosnhoje Ed Johnson ed-johnson
3 moc.niamod|apmaks#moc.niamod|apmaks Steve Kampa steve-kampa

In the meantime, I have an idea that maybe tsangk can take a look at: If we use %%created_by_linked%% in list pages the link gets constructed like this:

<a href="http://www.wikidot.com/user:info/ed-johnson" _
onclick="WIKIDOT.page.listeners.userInfo(38854); _
return false;">Ed Johnson</a>

tsangk, can you modify (or create a new version) of your php used in [[image http://wdpkg.ejohnson.info/getavatar.php?u=tsangk]] so that we could use %%created_by_linked%% and then parse the unix-name or user_id out of that string to make it work? Nevermind, I figured out why it won't work. :(

Included page "inc:signature" does not exist (create it now)

wdavatar?user=
(user deleted)

28 Apr 2010 00:14. Edited 1 times. (Edit, Permalink)
Whoa! We have a CSS issue!

[Edit: Long lines in code blocks throw the page formatting out of whack. I edited my post above as a work-around.]

Included page "inc:signature" does not exist (create it now)

wdavatar?user=
(user deleted)

28 Apr 2010 03:03. Edited 0 times. (Edit, Permalink)

OK, I've been messing with this issue too long tonight. After much trial and error and dusting off my limited PHP skills, I still can't get anything to work (and I see now my idea above won't work at all due to the way Wikidot constructs the link).

However, I did find something that does work for users with spaces in their name. You can use ListUsers to construct a link that works with the user_id method that tsangk wrote:

[[module ListUsers users="."]]
[[image http://wdpkg.ejohnson.info/getavatar2.php?id=%%number%%&size=48]]
[[/module]]

Is there a way to incorporate that into this forum? I assume you're using ListPages to list the threads and from what I can tell, you can't nest ListUsers inside ListPages. But, if you can work the ListUsers into the post:_template, there might be a way to do this (kind of like I did here).

Included page "inc:signature" does not exist (create it now)

wdavatar?user=leiger
leiger

28 Apr 2010 03:43. Edited 0 times. (Edit, Permalink)
No, no modules will work. I'm using ListPages to list the pages in the post category, therefore the post category cannot have any modules in it's pages — at all. It's very, very limiting, but because of the stress it would put on wikidot's servers, apparently it will be a long time before nested modules are allowed, even just one level of nesting will apparently cause too much trouble for what it's worth.

Included page "inc:signature" does not exist (create it now)

wdavatar?user=
(user deleted)

28 Apr 2010 04:22. Edited 1 times. (Edit, Permalink)
I realize no modules will work inside ListPages, but I was able to place the ListUsers module on a page and then list that page via ListPages and my avatar displayed. I was thinking along the lines of placing the ListUsers module in the live template for your post category and see if that works.

Maybe I'm missing something obvious (I actually didn't test it with the code in a live template). I won't be able to do any heavy testing until tomorrow night. I have the pleasure of pulling an all-nighter tonight to do a major programming overhaul on our point of sale system at work.

Included page "inc:signature" does not exist (create it now)

wdavatar?user=
(user deleted)

28 Apr 2010 04:30. Edited 0 times. (Edit, Permalink)

therefore the post category cannot have any modules in it's pages

I just read your post more carefully. I placed the ListUsers module in my post above and it worked. Do you mean you can't put modules in a live template and then list that category?

Sign me still confused until I get a chance to do more testing…

Included page "inc:signature" does not exist (create it now)

wdavatar?user=leiger
leiger

28 Apr 2010 08:17. Edited 3 times. (Edit, Permalink)
Huh, wha-? The ListUsers module works here? :O

Testing…

[[module ListUsers users="."]]
> Hello %%name%%
[[/module]]

Edit: Okay… that was completely unexpected. I don't think ListPages works though:

[[module ListPages category="post" parent="post:35" separate="no"]]
> %%created_by%%
[[/module]]
The ListPages module does not work recursively.

Edit2: Okay, it's probably showing an error message ("ListPages doesn't work recursively") but I've blocked error messages with CSS.

Included page "inc:signature" does not exist (create it now)

wdavatar?user=leiger
leiger

30 Apr 2010 01:16. Edited 0 times. (Edit, Permalink)
ListUsers won't work because you would see your avatar just fine, but everyone else would see their avatar next to your name :(

Included page "inc:signature" does not exist (create it now)

wdavatar?user=
(user deleted)

06 May 2010 00:24. Edited 0 times. (Edit, Permalink)
So what fixed this? Was it James' tinkering with Kenneth's Avatar Grabber? I've had relatives in town this week so haven't been able to do much more than casually browse new activity.

Included page "inc:signature" does not exist (create it now)

wdavatar?user=govegan
GoVegan

06 May 2010 00:54. Edited 0 times. (Edit, Permalink)

So what fixed this? Was it James' tinkering with Kenneth's Avatar Grabber?

Yes :-)

@ Shane, if you don't want the avatar to link to anywhere, just remove the |link= code altogether ('cause at the moment it links to some place strange).

Included page "inc:signature" does not exist (create it now)

wdavatar?user=leiger
leiger

06 May 2010 01:58. Edited 0 times. (Edit, Permalink)

@ Shane, if you don't want the avatar to link to anywhere, just remove the |link= code altogether

I was thinking that would work, but as I was in a hurry I decided to leave it like this for now. Will update it then.

Included page "inc:signature" does not exist (create it now)

Post Reply

Add reply on "Avatar Display in the Forum"

Printer Friendly Version Attach Files

CSS Theme, Images and Code on this website are © Shane Smith 2010-2012. All forum posts by users and documentation licensed under Creative Commons BY-NC-SA 3.0 License.