Enabling Fast, Light Weight and Lazy Loading Social Buttons (Twitter, FB, G+)
We all know the value to fast loading pages but these social buttons make all our efforts and minutest improvements worthless.
To load the Facebook, Twitter and Google social media buttons page requires total of 19 requests takes 246.7k in bandwidth.
Solution - SocialCount
It is a small jQuery plugin for progressively enhanced, lazy loaded, mobile friendly social networking widgets. With just 2.98KB and1 JS request, 1 CSS request, 1 optional request for icons, 1 optional AJAX request for counts (compared to 25 total requests for Facebook, Twitter, and Google Plus widgets)
More information on Github
Now, I am trying to develop a plugin with this. [Please note that I am complete noob here and therefore seeking advice.]
Problem -
The markup has to be placed after event - FireEvent('AfterDiscussion');
The text to be shared is - Data('Discussion.Name')
URL to be shared - ????
Help me out.
There was an error rendering this rich post.
Comments
check the Gdn::Session object else just use the core php request header processing.
Vanilla Wiki, Tastes Great! 31,000 viewers can't be wrong. || Plugin Development Explained
Aaaaaand @hbf I have no idea about it
There was an error rendering this rich post.
for me, i use print_r to echo out the contents of a class when im not sure whats in it. I suspect you'll find what your looking for somewhere in the long list. if not do a google search on "php request url"
that should get you pretty close.
Vanilla Wiki, Tastes Great! 31,000 viewers can't be wrong. || Plugin Development Explained