Closed (fixed)
Project:
Advanced Forum
Version:
6.x-1.1
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
19 Nov 2009 at 11:19 UTC
Updated:
6 Dec 2010 at 20:30 UTC
Hi
In every theme you can read this in advf-forum-post.tpl.php:
* - $name: User name of post author.
But $name doesn't seem to work for me. Is it a bug? a mistake in the documentation?
Regards.
Comments
Comment #1
michelleThis variable is provided by Drupal core: http://api.drupal.org/api/function/template_preprocess_node
I don't know why it wouldn't work for you, but it's outside of the realm of AF.
Michelle
Comment #2
RikiB commentedIt works on the first post (node) but not on the comments. Is there a way to have this show on the comments (other than first post)?
Comment #3
NoRandom commentedRikiB, not sure now because I haven't touched the code for a while, try with $account->name.
You can see all the information inside $account writing this in advf-forum-post.tpl.php:
Close your site first because this could expose users' private data like email, password (encrypted anyway), etc...
Comment #4
michelleIn the comment preprocess, the variable is $author. http://api.drupal.org/api/drupal/modules--comment--comment.module/functi...
Still nothing to do with AF. This is core.
Michelle
Comment #5
RikiB commentedBoth worked but $author also makes it a link to their profile.
So the final working codes needs both $author and $name because name does the first post and author does the comments.
print $author; print $nameThanks!!