HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

views > discussions > helper_functions.php

422422 MVP

I have buggered around with this code. This is what I have.

< ?php
            if ($Session->IsValid() && $Discussion->CountUnreadComments > 0)
               echo '< strong>'.Plural($Discussion->CountUnreadComments, '%s New', '%s New Plural').'< /strong>';

            $Sender->FireEvent('AfterCountMeta');

            if ($Discussion->LastCommentID != '') {
               echo '< span class="LastCommentBy">< div class="replyArrow"> < /div>< span class="repliedBy">'.UserPhoto($Last).'< /span>'.'< /span>';
               echo '< span class="LastCommentDate">'.Gdn_Format::Date($Discussion->LastDate).'< /span>';
            } else {
               echo ''.sprintf(T('Started by %1$s'), '< div class="replyArrowNew"> < /div>'.UserAnchor($First)).'< /span>';
               echo '< span class="LastCommentDate">'.Gdn_Format::Date($Discussion->FirstDate);
               
               if ($Source = GetValue('Source', $Discussion)) {
                  echo ' '.sprintf(T('via %s'), T($Source.' Source', $Source));
               }
               
               echo '< /span>';
            }
         
            if (C('Vanilla.Categories.Use') && $Discussion->CategoryUrlCode != '')
               echo Wrap(Anchor($Discussion->Category, '/categories/'.rawurlencode($Discussion->CategoryUrlCode), 'Category'));
               
            $Sender->FireEvent('DiscussionMeta');
         ?>

This posts in discussion index, the person who started the thread and the latest replier, with their avatars.
Demo can be seen here , http://vanillaskins.com/go-forum/discussions

Issue I have is in : http://vanillaskins.com/go-forum/profile/discussions/1/admin

It isnt displaying the thread starters avatar etc , so I am missing a hook somewhere. Any suggestions please.

Login info, if you wish to login is.
user = TestUser
pass = vanilla69

Cheers Ste

There was an error rendering this rich post.

Answers

  • You seem to be using UserPhoto in the if, and then UserAnchor in the else... did you mean to do that?

    There was an error rendering this rich post.

  • also, you're closing a span you may not have opened...

    There was an error rendering this rich post.

  • I think my code is correct, not sure I have a extra span. Demo seen here:

    click

    There was an error rendering this rich post.

  • ddumontddumont ✭✭
    edited December 2011
    #8 open span, open span, close span, close span
    #9 open span, close span
    
    #11 close span?
    #12 open span #13 close span
    

    Am I missing something?

    There was an error rendering this rich post.

  • 422422 MVP
    edited December 2011

    not sure u r i think i am lol Will recheck my code, thanks for the spot.

    There was an error rendering this rich post.

Sign In or Register to comment.