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.

[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?

There was an error rendering this rich post.

Tagged:

Best Answers

  • cedced
    edited August 2011 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
    Answer ✓
    solution in http://www.vanilla-wiki.info/Bugs/VariousTips

    chapter "User avatars for each discussion in the list"
  • cedced
    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 ✭✭
    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 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
    Answer ✓
    solution in http://www.vanilla-wiki.info/Bugs/VariousTips

    chapter "User avatars for each discussion in the list"
  • cedced
    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 ✭✭
    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.

    There was an error rendering this rich post.

  • shozen1shozen1 New
    edited September 2011
    EDIT: its fixed and working, thanks guys.

    There was an error rendering this rich post.

  • 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?

    There was an error rendering this rich post.

Sign In or Register to comment.