Lee (
randomling) wrote in
dw_dev_training2012-08-27 08:25 pm
Entry tags:
Displaying the people who posted comments!
Hi guys,
I'm working on bug 4242 - including the poster of the comment in the preview page (helpful for people who might be posting comments as the wrong user, not noticed they're not logged in, wanted to use their OpenID, whatever).
I've managed to display the commenter's username - as long as they're actually a logged-in user of DW. However, anon and OpenID comments break the preview page now, because I haven't figured out how to display anon and OpenID there yet.
I was hoping to take my lead from the actual comments pages of entries, which show them just fine. But while I can find the page that deals with the comments page (/htdocs/talkread.bml) I can't actually find the place where it displays the username. It's a forest of code!
I wonder if anyone could show me the place where that happens? A copy/paste, line number, or thing to search the file for would really help me to get started.
Thanks!
ETA: Look,
denise, I asked for help!
I'm working on bug 4242 - including the poster of the comment in the preview page (helpful for people who might be posting comments as the wrong user, not noticed they're not logged in, wanted to use their OpenID, whatever).
I've managed to display the commenter's username - as long as they're actually a logged-in user of DW. However, anon and OpenID comments break the preview page now, because I haven't figured out how to display anon and OpenID there yet.
I was hoping to take my lead from the actual comments pages of entries, which show them just fine. But while I can find the page that deals with the comments page (/htdocs/talkread.bml) I can't actually find the place where it displays the username. It's a forest of code!
I wonder if anyone could show me the place where that happens? A copy/paste, line number, or thing to search the file for would really help me to get started.
Thanks!
ETA: Look,

no subject
no subject
no subject
no subject
check if $remote is a user object ? $remote->ljuser_display : show as anonymous
(ljuser_display is almost certainly the name of the function but double check that. it does handle OpenID though)
You are probably going to be looking at weblib.pl for what builds the comment headers but it might be somewhere in Talk.pm instead.
no subject
Thanks for the tips!
no subject
Meanwhile, I've skim-read the code a bit, and I think you are better off looking in Talk.pm -- if you get stuck and nobody else can point you more closely, ping me tomorrow and I'll try to turn up something more specific.
no subject
no subject
Thanks, both!
no subject