It looks like you're new here. If you want to get involved, click one of these buttons!
I would like to offer Facebook, Twitter and GooglePlus share buttons beneath articles (from the articles application) in the same way as they appear beneath discussions and comments.
However, after looking into the code of the respective social plugins as well as the vanilla core (on version 2.2b1), I would like to hear your opinion on how to proceed.
The problem is as follows (same as https://github.com/austins/Vanilla-App-Articles/issues/34):
Each of these social plugins declares a method on the PostController e.g.
PostController_Facebook_Create($Sender, $RecordType, $ID) that makes a call to a function
GetRecord($RecordType, $ID) which is defined in
GetRecord() function only supports "discussion", "activity" or "comment" for the RecordType argument, which are from the Vanilla app.
If I could just extend this function and add support for the "article" RecordType, everything would be fine, the social plugins would work without modification. However, I found out that functions from library/core/functions.general.php cannot be overwritten by plugins.
I really don't like adding code to the global bootstrap.*.php, also it is not recommended to overwrite functions from functions.general.php. Do I then really have to clone all the existing social plugins just to replace the
GetRecord($RecordType, $ID) call in one of their methods?
Any ideas would be appreciated!