Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Dan Diplo 1554 posts 6205 karma points MVP 6x c-trib
    Jan 07, 2015 @ 09:26
    Dan Diplo
    0

    Auto Share on Publish

    Nice plugin! Is there a way of hooking into uShare so that it can be used to automatically share when a page is published? So no manual intervention is required? For example, could we use the ContentService_Published event to trigger uShare to share when a page is published? I'm happy to delve into the source code, if required, but just wondered if there is a simple way of achieving this? Thanks :)

  • Governor Technology 146 posts 551 karma points
    Jan 07, 2015 @ 11:01
    Governor Technology
    0

    Hi Dan

    As you've probably figured, this is not supported out of the box unfortunately, however might be something neat for the future. I can't say I can think of a nice trick to hook this up with with a single line of code either :(

    Your best best would probably be to grab the source and as you've suggested, subscribe to the publish event. You will then use the various "ContentSharers" which each has a Share method for the specific social media provider and it only expects the node ID. You might also want to check first if the page can in fact be shared, similar to the checks done in uShare when the Share button is clicked (e.g. if at least one social media provider has been selected to share to, if the page is public, if the page is not deleted etc.) You can find this in the code in DataEditor.cs (pre v7) or uShareController.cs (v7).

    Let me know how it goes or if you need further help!

    Best,

    Rigardt

  • Dan Diplo 1554 posts 6205 karma points MVP 6x c-trib
    Jan 07, 2015 @ 21:05
    Dan Diplo
    0

    Hi Rigardt,

    Thanks for your quick response. Don't worry if it's not built in, or easily done. I understand there is a lot of work involved in implementing changes. So I don't expect anything :)

    I've a client who wants this functionality, so if they are willing to pay for a bit of time to invesitgate, I'm sure I can hook into your code and get something working. Thanks for the pointers, they are most useful. I'll let you know when/if I get time to do this.

    Thanks,

    Dan

Please Sign in or register to post replies

Write your reply to:

Draft