Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Try Vanilla Forums Cloud product

Ready to contribute?

Amazing! Sign our contributors' agreement and then join us on GitHub.

Update for critical security issue in PHPMailer included in release Vanilla 2.3.1

how to show avatars on the landing page

I want to show an avatar of a person who started a discussion on the landing/index page similar to how it is done in this forum. How can I do this? Is there a plugin for this?

Thank you,
Mike

Comments

  • vrijvlindervrijvlinder Papillon-Sauvage MVP

    Yes it's a plugin bundled with vanilla called Index Photos.... all you need to do is enable it if you are using version 2.3.1....

    Caylusmikerds
  • K17K17 UnkornegLosk · Français / French Nouvelle Aquitaine / La Rochelle ✭✭✭

    Hi :D
    As vrijvvlinfer said, the plugin is bundled with Vanilla (but it's not Index Photos, it's Discussion Photos)

    Just click on the blue button next to the picture.

    This is the aim of Vanilla Forums: a simple forum, with only essential, and all other is driven by addons ^^
    That's why, features that you find on most forums are provided by a lot of addons already in your fresh Vanilla install, you just need to enable it ^^
    I suggest you @mikerds to check the list on your dashboard and select what your community need ^^
    If you do not have the "Discussion Photos" addon, It's maybe because you run an older version of Vanilla, then you will need to update it.

    R_JCaylusmikerdshgtonight
  • Awesome! Thank you. It works - now my message board looks much better.

    One more question. Is there any way to add FB like button to the landing/home page?

  • K17K17 UnkornegLosk · Français / French Nouvelle Aquitaine / La Rochelle ✭✭✭

    Depends on what you want the users to like ^^
    If it's posts, search for "Facebook" in the addons.
    If you want users to like the page, add the like button where you want by editing default.master.tpl of your theme ^^

  • @K17 said:
    Depends on what you want the users to like ^^
    If it's posts, search for "Facebook" in the addons.
    If you want users to like the page, add the like button where you want by editing default.master.tpl of your theme ^^

    Thank you! I need the second one which is a button on the landing page. If I edit default.master.tpl and then upgrade vanilla to the newer version, will I loose all my changes?

    Thanks
    Mike

  • @K17 said:
    Depends on what you want the users to like ^^
    If it's posts, search for "Facebook" in the addons.
    If you want users to like the page, add the like button where you want by editing default.master.tpl of your theme ^^

    Also, I use default scheme. It looks like it doesn't have default.master.tpl... what do I do then?

  • R_JR_J Cheerleader & Troubleshooter Munich Moderator

    @mikerds said:
    Also, I use default scheme. It looks like it doesn't have default.master.tpl... what do I do then?

    >

    I guess you are talking about the "default" theme? :wink: Never mind. You are doing it wrong by now.

    @mikerds said:
    If I edit default.master.tpl and then upgrade vanilla to the newer version, will I loose all my changes?

    Yes you will. You could easily avoid that by creating a custom theme. Creating a custom theme is as easy as creating a new subfolder in the themes folder, copying one of the other themes about.php files and changing the contents of that about file. Afterwards you can add the files you need to change to that folder and only change your copy.
    You can find more information about theming in the documentation

    If you give your theme a cool and unique name, it will never be overwritten!

    @mikerds said:
    Thank you! I need the second one which is a button on the landing page.

    Find out the html code you need for that and either add it to the default master.tpl or insert it by creating a themehooks file (see documentation), using the base_afterBody_handler event.

    If you only want to do very few, very simple modifications, I would advice to stick with changing default.master.tpl if possible, but if you want to do some more sophisticated tweaks, start learning how to change Vanilla with theme hooks - it is much more simple than it sounds, I promise!

    If you get stuck at any time, just ask.

    K17
  • K17K17 UnkornegLosk · Français / French Nouvelle Aquitaine / La Rochelle ✭✭✭

    @R_J a dit :

    start learning how to change Vanilla with theme hooks - it is much more simple than it sounds, I promise!

    Yes @R_J and I was impressed the first time I looked how vanilla themes works how easy this is compared to other solutions.

    @mikerds don't forget to edit your last post if no one have answered after you, here you have one hour to edit your last post ^^

  • Thank you for all your answers! I tried this approach with modifying default template.

    The problem is when I add FB javascript for like button into the default template, it breaks the forum.

    The forum says "Something went wrong"

    here is Javascript that I generated for the like button:

    (function(d, s, id) { var js, fjs = d.getElementsByTagName(s)[0]; if (d.getElementById(id)) return; js = d.createElement(s); js.id = id; js.src = "//connect.facebook.net/en_US/sdk.js#xfbml=1&version=v2.10"; fjs.parentNode.insertBefore(js, fjs); }(document, 'script', 'facebook-jssdk'));

    I am trying to add it into default.master.tpl after opening tag

    What am I doing wrong?

    Thank you

  • R_JR_J Cheerleader & Troubleshooter Munich Moderator

    The default.master.tpl is a Smarty template file. If you like to insert JavaScript, you need to use the {literal} take like that:

    {literal}
    <script>
    alert('Hello World');
    </script>
    {/literal}
    
    mikerdsK17
  • Thank you R_J! It works :+1:

Sign In or Register to comment.