Instructions for using the Tribune Plugin

Hey guys,

Does anyone have any tutorials, youtube videos or any suggestions and resources on how to use the Tribune plugin ( https://github.com/devnewton/grav-plugin-tribune ) in both default and modular pages? The github readme instructions don’t really help out (unless I’m not reading them right).

Thank you in advance.

Hi. Your question could be improved for answerers with a link to the plugin. Of course we can all find it ourselves, but you have an option to make it easier so why not??

Not trying to be difficult, but if you think the instructions are unclear, then I believe you should hassle the maintainer of the plugin in an issue on Github. It’s in their interest to have good user experiences with this plugin.

I doubt there will be Youtube videos and unfortunately many people are on holiday right now.

Good luck :slight_smile:

Thanks for the tip. I’ve made the change and added a link to the plugin’s github page. As you could see though… all it has for its usage is:

  1. Create a page to show the tribune (default /tribune).
  2. Enjoy !

It doesn’t mention whether it can be used in a modular page and how (which is what I want to accomplish). Even on a single page I get this:

So my question is… ok I grabbed the plugin and installed it… I enabled it… so now how do I get it to work? Is there anyone that could point me to the right direction to figure out its usage?

Yep that’s a shocking effort at documentation on the developer’s part. I guess if I was you I would just start trying stuff, which it looks like you are doing. Did you create that /tribune page described in the README?

It could be that it does not work on newer versions of Grav. No information in the plugin code about that.

If you only need chat, there are other plugins for that.

@GNUTechie, I agree the documentation might not look optimal. However, in defence of the author, to embed the plugin in a page not much more info is required.

TL;DR: Not useful for modular pages.

To give you a bit more guidance, this is what I did to embed the plugin in a “regular” page and a “modular” page.

  • Installed Tribune using:

    $ bin/gpm install tribune
    
  • Copied file ‘user/plugins/tribune/tribune.yaml’ to folder ‘/user/config/plugins/tribune’.
    Made no changes to the default settings, so this step could be skipped.

  • For a “regular” page I created the following ‘tribune’ page:

    Folder structure

    pages
    ├── 01.home
    │   └── default.md
    ├── 02.typography
    │   └── default.md
    └── 03.tribune
        └── default.md
    

    Content of ‘/03.tribune/default.md’:

    ---
    title: Tribune "regular"
    ---
    This regular page should contain the Tribune plugin
    
  • If you now browse to page http://mysite/tribune, you should see something like the following:
    image

    • You can type any message and hit ‘Post’.
    • Using the settings button you can change your nickname.
    • The list of messages are stored in file ‘user/data/tribune.tsv’.
    • Your nickname will be stored in local storage of the browser.
  • For a “modular” page I created the following ‘tribune’ page:
    Folder structure

    pages
    ├── 01.home
    │   └── default.md
    ├── 02.typography
    │   └── default.md
    └── 03.tribune
        ├── 01._child-module
        │   └── text.md
        ├── 02._another-child
        │   └── text.md
        └── modular.md
    

    Content of ‘modular.md’

    ---
    title: Tribune "modular"
    content:
      items: @self.modular
    onpage_menu: false
    ---
    
    

    Content of ‘text.md’

    ---
    title: Tribune "modular child"
    ---
    This is a child module.
    
  • If you now browse to page http://mysite/tribune, you should see something like.
    image
    As you can see, the plugin will be added to each and every child module, making it useless for modular pages IMHO.
    By the way, the second embedded plugin doesn’t function.

Notes:

  • You can only have one page with an embedded Tribune plugin.
  • Not very useful in modular pages.

Oh I’m not trying to bash the author… I’m also a newcomer in Grav and I’m sure lots of things are new and/or escape me. I’m thinking Tribune is a better way than the traditional blog setup or something else that involves a secondary server.

And I thought it would be easy to set it up… but as you saw from my screenshot all I’m getting is the HTML form tag and javascript. the plugin is enabled and the path of the page is /tribune, the only thing that’s different is the name of the default page that the tribune plugin is supposed to be displayed (although I don’t think that would make any difference… unless title and path are significantly tied in to each other).

I’m going to ask the plugin author to implement a shortcode feature so we can plug Tribune in to any kind of page whether it’s a default or modular one… hopefully that would help users with my issues to use Tribune in Grav.

Thanks for your help guys

The shortcode is a fine idea and to complete the loop I’ve now linked it :slight_smile:

I’m going to criticise this documentation though. I know it is unfortunately close to a normal level of documentation, but I have noticed how much of my time has been wasted from poor documentation recently, and how joyous coding with good documentation can be. I’ve been guilty of poor/inadequate documentation plenty. After my realisation, I am hoping not to release anything public again unless it’s properly documented. Trying to get into the habit of seeing them as a package.

I agree with @pamtbaau that the instruction docs make sense, but they presuppose what the purpose or method of the plugin is.

is the part that’s missing and why I didn’t get it. What the plugin does and how it does it instead of “The Tribune Plugin add simple tribune/shoutbox/webchat feature to Grav CMS.” And instead of highlighting that term, a hyperlink would have served better.

I hope that doesn’t sound grumpy. I just want to lift the general standard.