Closed (fixed)
Project:
Advanced Forum
Version:
5.x-1.0-alpha5
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
22 Mar 2008 at 00:21 UTC
Updated:
15 May 2008 at 20:33 UTC
In advf-forum-post.tpl.php, the $name variable will only correctly show a username for the first post/node, and not in the proceeding comments. $user_info_pane's $name works in comments though. See example:
http://sourdough.com.au/forum/topic/183
Comments
Comment #1
michelleAh, yeah, the documentation didn't keep up with the move to a separate user theme function. Thanks for pointing that out. I updated the docs at the top.
Michelle
Comment #2
maedi commentedI've upgraded to alpha6 and I'm still getting no usernames (or last posts on the forum index). Update done by replacing existing module and theme files and running update.php.
Comment #3
michelleThis was a documentation error. The $name variable was a leftover from the previous way of doing things and the comment wasn't removed when it was moved to the advf-forum-user.tpl.php.
Michelle
Comment #4
maedi commentedIs it now $user_title? I'm using $name outside of advf-forum-user.tpl.php. Is there still a variable to show a username?
Comment #5
maedi commentedComment #6
michelle$comment holds the whole comment object so you can make use of what's in there. Looking at comment.tpl.php, the normal method is using theme('username', $comment). There isn't anything provided by advforum outside of that function because it doesn't load the user object.
Michelle
Comment #7
maedi commentedBefore Alpha5's theme changes, I used $name to print a username per post which would be on a node or comment.
"theme('username', $comment)" only works across comments, "theme('username', $comment, $node)" ?. I'm not proficient with php but now it looks like I can only use $name inside advf-forum-user.tpl.php. I still need to use a variable similar to $name outside of advf-forum-user.tpl.php. Why is $name now dependent on advf-forum-user.tpl.php?
Michelle, thanks for your consistent level of support.
BTW, once I've ironed out the kinks, I'd like to submit my forum theme to an Advanced Forum theme section. Could we set something like this up? I'd be happy to manage it.
Comment #8
michelleHmm... Weird... That shouldn't have worked since I moved all the user stuff into its own function, which was a while ago.
I changed this over to a feature request. I'll need to do some restructuring to make the user object available earlier.
Michelle
Comment #9
maedi commentedThat would much appreciated. In the mean time "theme('username', $comment)" works well except leaves an 'Anonymous' mark for the node poster instead of their username. How can I fix this?
And would you like me to start a new thread about an AF theme section?
Comment #10
michelleIn the mean time, you can do:
Sorry I forgot to comment on the theme part. Sure, when you have something ready to contribute, just make an issue for it. I have a "themes" directory in the project that was meant to hold more themes but I haven't gotten any, yet. The only other forum theme I know of is part of the Sky theme and we decided it made more sense for her to maintain it there rather than be added to the module.
Michelle
Comment #11
michelleComment #12
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.