When anonymous users post to forums the user information shows "joined 1970-01-01" and the post count is the total of anonymous users' posts. Obviously, we'd like to avoid that. So we need to check if the user is registered in the code that's added to template.php like this:

...
<?php // BEGIN AUTHOR JOIN DATE DISPLAY ?>
       <?php 
       global $user;		
       if (isset($joined) && $user->uid) { ?> 
        <div class="author-regdate">
          <?php print t('Joined:') . ' ' . $joined; ?>
        </div>

Same goes for the post counts and the online icon.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Natalie@drupal.ru’s picture

Oops, I meant forum-thread.tpl.php

Natalie@drupal.ru’s picture

Correction: the code above actually checks the current user but what we need is to check the uid of the node's or comment's author. My guess that it should be done in the module's code and not the theme templates.

Natalie@drupal.ru’s picture

I went ahead and did the changes myself. If anyone is interested, I can post the patch here.

Michelle’s picture

Good idea. I'll add it to the to do list.

Thanks,

Michelle

Natalie@drupal.ru’s picture

Sorry for the delay... here's the patch.

Michelle’s picture

Hmmm.. You have bad timing. I'm about to rip this section of code apart. LOL! But it will be a while before my changes get into an RC so people can use this patch in the mean time. :)

Thanks,

Michelle

Michelle’s picture

Status: Active » Patch (to be ported)
Natalie@drupal.ru’s picture

Thank you Michele.
It was just a couple of minor changes.
Are you going to incorporate this feature with the new changes?

Michelle’s picture

Yes, I will. I actually didn't get to that code last night after all but it's the next thing I'll be doing for advforum. I want to reuse the code from advprofile as much as I can so I'll be splitting that off into its own area.

Michelle

Michelle’s picture

Assigned: Unassigned » Michelle

Also want to add to this task allowing anon users to put in name/email/homepage like with comments and showing that.

Michelle

Michelle’s picture

Status: Patch (to be ported) » Postponed

I did go ahead and add code to not show all the user stuff for anon posters but I didn't take the next step of allowing people to put in their info like with comments. I'm undecided on the best way to handle that right now so postponing this.

Michelle

Michelle’s picture

Status: Postponed » Closed (fixed)

I can't think of any good way to do this. Just closing it.

Michelle