Home › Forums › Web + Tech Answers › SocialStats: Need Programmers Collaboration for WordPress Plugin
Tagged: count, facebook, fans, feedburner, followers, friends, readers, rss, stats, subscribers, twitter
- This topic has 0 replies, 1 voice, and was last updated 13 years, 2 months ago by Bryan Hadaway.
-
AuthorPosts
-
August 4th, 2011 at 3:26 AM #3025Bryan HadawayKeymaster
If you want to help out you can do so over at the GitHub page:
https://github.com/bhadaway/SocialStats-WordPress-Plugin
A plugin to collect, combine and display FeedBurner, Facebook and Twitter subscriber/fan/follower stats.
Download and test plugin from here.
I’m working on the plugin version of the following script:
http://www.problogdesign.com/wordpress/how-to-get-facebook-twitter-and-rss-counts-wp/
(with permission of its writer of course)
As you’ll find out quickly I’m not a programmer myself, only a web and graphic designer. So when it comes to programming it’s experimental and I usually need help.
So if anyone agrees that this would make a great plugin and would like to collaborate (and receive an added credit of course) take a look at the code I have so far below.
From a PHP programmers perspective you can probably see the basic concept of my attempt;
– Settings page and option saving is working and in place
– The code is being delivered to the front-end (perhaps in the wrong place)
– However I’m sure there are some logic and syntax errors
– The main problem I’m sure is that the attempted delivery of:
[[code]]czoxMTE6XCImbHQ7P3BocCBlY2hvIHNzX2ZlZWRidXJuZXI7ID8mZ3Q7PGJyIC8+CiZsdDs/cGhwIGVjaG8gc3NfZmFjZWJvb2s7ID97WyYqJl19Jmd0OzxiciAvPgombHQ7P3BocCBlY2hvIHNzX3R3aXR0ZXI7ID8mZ3Q7XCI7e1smKiZdfQ==[[/code]]
to the front-end is incorrect for a number of reasons.
The second main part see below main plugin code.
[[code]]czo1NTc1OlwiJmx0Oz9waHA8YnIgLz4KLyo8YnIgLz4KUGx1Z2luIE5hbWU6IFNvY2lhbFN0YXRzPGJyIC8+ClZlcnNpb246IDEuMDx7WyYqJl19YnIgLz4KUGx1Z2luIFVSSTogaHR0cDovL2JyeWFuaGFkYXdheS5jb20vc29jaWFsc3RhdHMvPGJyIC8+CkRlc2NyaXB0aW9uOiBBbHtbJiomXX1sb3dzIHlvdSB0byBjb2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Ds8YnIge1smKiZdfS8+CiZsdDsvdHImZ3Q7PGJyIC8+CiZsdDsvdGFibGUmZ3Q7PGJyIC8+CjxiciAvPgombHQ7cCBjbGFzcz0mcXVvdDtzdWJtaXQmcXV7WyYqJl19b3Q7Jmd0OzxiciAvPgombHQ7aW5wdXQgdHlwZT0mcXVvdDtzdWJtaXQmcXVvdDsgaWQ9JnF1b3Q7c3VibWl0JnF1b3Q7IGNsYXNzPXtbJiomXX0mcXVvdDtidXR0b24tcHJpbWFyeSZxdW90OyB2YWx1ZT0mcXVvdDsmbHQ7P3BocCBlc2NfYXR0cl9lKCYjMzk7U2F2ZSBDaGFuZ2Vze1smKiZdfSYjMzk7KTsgPyZndDsmcXVvdDsgLyZndDs8YnIgLz4KJmx0Oy9wJmd0OzxiciAvPgo8YnIgLz4KJmx0Oy9mb3JtJmd0OzxiciAvPgp7WyYqJl19Jmx0Oy9kaXYmZ3Q7PGJyIC8+CiZsdDs/cGhwIH0gPyZndDtcIjt7WyYqJl19[[/code]]
Now the PHP delivery of this code to front-end would be:
[[code]]czoxNjA6XCImbHQ7P3BocDxiciAvPgokc3VtID0gc3NfZ2V0X3RyYW5zaWVudCgmIzM5O3JzcyYjMzk7KSArIHNzX2dldF90cmFuc2l7WyYqJl19ZW50KCYjMzk7ZmFjZWJvb2smIzM5OykgKyBzc19nZXRfdHJhbnNpZW50KCYjMzk7dHdpdHRlciYjMzk7KTs8YnIgLz4KZWNobyAkc3tbJiomXX11bTs8YnIgLz4KPyZndDtcIjt7WyYqJl19[[/code]]
If I spent a little time on that I’m sure I could figure out the code to make it usable as a shortcode. But, if someone would like to collaborate that would save a lot of time.
Also, if you think we should add LinkedIn, Google+, YouTube, MySpace etc support let me know.
Thanks, Bryan
-
AuthorPosts
- You must be logged in to reply to this topic.