Fork me on GitHub
Current releases are 2.1.3 (9 Sept 2014) and 2.0.18.13 (5 Aug 2014)

Ready for 2.1? Find out if your favorite plugins are compatible. The 2.0 branch will no longer receive updates after Dec 2014.

[Share Me] v1.03 update concerns

brujahbrujah New
edited January 2011 in Vanilla 2.0 Help
This discussion is related to the ShareMe addon.
Thanks to Tim, I've learned a bit more about developing a plugin for Vanilla. I've rewritten a good portion of it, so it works a little different. I've experimented with the share icon links in a few different places; at the right of the title, at the end of the page, and as a panel in the sidebar. I'm not sure how to make this configurable yet, so I'm left with the sidebar panel version, as it allows for some text and more share icons, for future updates or unless someone else takes over. The only way around this until I can figure it out, is if I were write and maintain three different versions of this. So please don't update the plugin to version 1.03 (coming soon), if you prefer the share icons at the bottom of the discussion page instead of the sidebar panel.

Comments

  • TimTim Lord of Servers Vanilla Staff
    edited January 2011
    If I were you I'd set a config variable based on the user's choice of where to put the plugin's output. Then when your plugin loads (for example, inside the __construct()), read that config into a property of your object.

    $this->OutputLocation = C('Plugins.ShareMe.OutputLocation', 'panel');

    Hook into all the possible events your plugin supports (title, panel, footer, etc), and based on the value in $this->OutputLocation, either return immediately from the event without producing output, or continue and call your output method.

    Make sense?

    Vanilla Forums Senior Developer [GitHub, Twitter, About.me]

  • brujahbrujah New
    edited January 2011
    Makes sense. I'll see what I can whip together.

    I'm using Base_Render_Before to do the panel.
    DiscussionController_BeforeDiscussion_Handler to float right in the opening post.
    I haven't figured out the controller for the footer or end of the comments on the page yet.

    Thank you.
  • I use the plugin. it works okay for me but;
    1. when i submit to twitter its not a text with spaces, it comes with hyphens in between words, instead. hope this is solved this time.
    2. ability to place it by top and bottom of the discussions will be great.

    i am not sure if its as useful on the side bar.
  • brujahbrujah New
    edited January 2011
    @shah

    1. That's only the URL, or should be, which is correct and does use hyphens, not spaces.
    2. It'll take a little longer for me to have time to make the position selectable.

    This is what I meant by in the sidebar panel.
    http://i51.tinypic.com/2wdslk4.png
  • If there were 6 categories and few bookmarks on side bar the share buttons cannot be seen.

    If share buttons can be placed underneath the discussion topic, sharing can follow just after reading it, the same advantage if it follows the comments

    right sidebar will have very less relevance within a fully running site.

    how about by the left side of 'add comments' link.
  • brujahbrujah New
    edited January 2011
    shah, I agree and I've got a version of this that works in a few different places. I just haven't combined them into a selectable version yet.

    digibomb is writing a Share This plugin soon probably, and it'll undoubtably work much better since he knows his way around the Vanilla code way better than I do.
Sign In or Register to comment.