Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

How to show 'participating in this discussion' as per github?

camocamo New
edited September 2011 in Vanilla 2.0 - 2.8
How can I show whos participating in a discussion as per github, (see example)

(user icons here) lincolnwebs and bean are participating in this issue.

https://github.com/vanillaforums/Garden/issues/885

any help please?

windows7
chrome
v2.1.8b4
Tagged:

Answers

  • Currently using 'inthisdiscussion' plugin, it shows list in sidebar but no avatars as seen on github.
  • jspautschjspautsch Themester ✭✭✭
    You could try inserting
    <?php echo UserPhoto($User); ?>
    somewhere into class.inthisdiscussionmodule.php, but you'd have to fiddle with the spacing.
  • camocamo New
    edited September 2011
    how do they get it under the first discussion though, this must be a different module?
    seems they managed to resize to 32x32pix aswell?
  • Don't focus on the layout. Just show the usernames first in your discussion layout. You know what's the first discussion topic, so under that topic show the usernames of the persons that are joining the discussion.
    Example is the "module" "In this discussion", you can figure out the rest yourself of course.
    Then as @jspautch excellently shows, add the code from his post.
  • Underdog thankyou for participating, but Im afraid I dont understand. How do I do that exactly?

    I added jspautsch suggestion to that module and could insert avatars in the sidepanel (inthisdiscussion) but not as shown at github. Please dont assume we're all as smart as you :)

    How do I insert usernames under the first discussion? Is it somewhere in class.inthisdiscussionmodule.php ?
  • UnderDogUnderDog MVP
    edited September 2011
    When you look at the display of 1 single discussion (for example this discussion) you are looking at a view

    The modules are separate from a view, so focus on the views first.

    Every application (vanilla, dashboard, etc, etc) has a view directory (or views directory)

    When you're looking at a list of discussions, you look for the discussions view. When you're looking at one single discussion, you look for the discussion view.

    The details inside the view are filled by a helper function. Take a look at the helper function for the discussion view and the discussion view itself.

    Use FireFox with the FireBug plugin. Look at the style of the first comment in the single discussion and look for that same style in the view.
    Now figure out where that single first comment ends and experiment with pieces of texts at the end of the first comment.

    Gradually add important stuff like just a username or just the word "username". When that works look in the "In this discussion" module for examples of what you want to achieve.
  • camocamo New
    edited September 2011
    looked in those files, tried inserting various places, i just dont get it.

    OK I found the right place but I dont know what from class.inthisdiscussionmodule.php ? tp insert there ?????

    Admins please delete these spammers, im getting 'you must accept or reject' but its not possible

    http://vanillaforums.org/discussion/17261/short-urls-url-redirect#Item_1
  • camocamo New
    edited October 2011
    Also wondering how they got those nice rounded corners on index avatars too?
    and looks like they've resized them to 32x32 somehow for that veiw?

    https://github.com/vanillaforums/Garden/commits/
  • @ Underdog,
    ok mate, I got something there, but its not pulling user id or the avatar, also its under both the first and last post.

    This file

    forum/applications/vanilla/views/post/comment.php

    this bare code

    <div><h4><?php echo T('In this Discussion'); ?></h4><?php echo UserPhoto($User);?></div>

    at the very top of the file. Now you know your dealing with a very clueless new vanilla/php user, please, please help? :)

    image
  • Bump @ Underdog.....?
  • @camo : This might help you? Check it.

Sign In or Register to comment.