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

michelle’s picture

Status: Active » Closed (won't fix)

This 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

RikiB’s picture

Status: Closed (won't fix) » Active

It 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)?

NoRandom’s picture

RikiB, 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:

<pre><?php print_r($account); ?></pre>

Close your site first because this could expose users' private data like email, password (encrypted anyway), etc...

michelle’s picture

Status: Active » Fixed

In 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

RikiB’s picture

Both 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 $name

Thanks!!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.