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

[Solved] HOWTO: User avatar besides posts

shozen1shozen1 New
edited September 2011 in Vanilla 2.0 - 2.8
Rather than try to explain, there is a site here that does what I am looking for: http://newbuddhist.com/

As you can see, besides each post is the users avatar. How do I make this work for my forum?
Tagged:
Ravidae

Best Answers

  • cedced
    edited August 2011 Accepted Answer
    hi

    you could copy the views from /applications/vanilla/views/discussions/helper_functions.php to /themes/your_theme_name/views/discussions/helper_functions.php and edit

    (note the the code below remove the space character after < )
    before line 45 ( < div class="Meta "> )
    add
    < span class="Author">
    < ?php
    echo UserPhoto($Author);
    ?>
    < /span>

    after i don't know ho activate the userphoto function...

    i only successful display "toto" before line 45 in /applications/vanilla/views/discussions/helper_functions.php for find the line in code...

    if you know the next step, post here please ;)
  • cedced
    Accepted Answer
    solution in http://www.vanilla-wiki.info/Bugs/VariousTips

    chapter "User avatars for each discussion in the list"
  • cedced
    Accepted Answer
    these solutions work, but I think it's not the way to go because in the next update gonna crush changes

    for helper_functions.php
    copy the views from /applications/vanilla/views/discussions/helper_functions.php to /themes/your_theme_name/views/discussions/helper_functions.php

    and for /plugins/Gravatar/default.php and /applications/vanilla/models/class.discussionmodel.php we must extend classes... (i don't know really how to do this)
  • AoleeAolee Hobbyist & Coder ✭✭
    Accepted Answer
    the http://www.vanilla-wiki.info/Bugs/VariousTips was actually taken from that thread. and one way or another it will still be crushed because the discussion model needs to be modified to access the Last user's photo. but i agree it will help lessen the work should you do an update.

Answers

  • cedced
    edited August 2011 Accepted Answer
    hi

    you could copy the views from /applications/vanilla/views/discussions/helper_functions.php to /themes/your_theme_name/views/discussions/helper_functions.php and edit

    (note the the code below remove the space character after < )
    before line 45 ( < div class="Meta "> )
    add
    < span class="Author">
    < ?php
    echo UserPhoto($Author);
    ?>
    < /span>

    after i don't know ho activate the userphoto function...

    i only successful display "toto" before line 45 in /applications/vanilla/views/discussions/helper_functions.php for find the line in code...

    if you know the next step, post here please ;)
  • cedced
    Accepted Answer
    solution in http://www.vanilla-wiki.info/Bugs/VariousTips

    chapter "User avatars for each discussion in the list"
  • cedced
    Accepted Answer
    these solutions work, but I think it's not the way to go because in the next update gonna crush changes

    for helper_functions.php
    copy the views from /applications/vanilla/views/discussions/helper_functions.php to /themes/your_theme_name/views/discussions/helper_functions.php

    and for /plugins/Gravatar/default.php and /applications/vanilla/models/class.discussionmodel.php we must extend classes... (i don't know really how to do this)
  • AoleeAolee Hobbyist & Coder ✭✭
    Accepted Answer
    the http://www.vanilla-wiki.info/Bugs/VariousTips was actually taken from that thread. and one way or another it will still be crushed because the discussion model needs to be modified to access the Last user's photo. but i agree it will help lessen the work should you do an update.
  • shozen1shozen1 New
    edited August 2011
    @Aolee - thanks for this

    @ced - do you know when the update is planned for release? if there is no approximate date I think I will just go ahead with the changes.
  • shozen1shozen1 New
    edited September 2011
    EDIT: its fixed and working, thanks guys.
  • shozen1shozen1 New
    edited September 2011
    I have noticed that when a user has a gravatar image, it is not used as an avatar besides the post and instead just the default image is shown. is this fixable?
Sign In or Register to comment.