Customizing SMF > Portals, Bridges, and Integrations
Google Code Webhook
(1/1)
scorcher24:
Hi Folks.
I am an author of an open source library and I had Joomla till yesterday. A friend that knows more about php than me was nice enough to make me a plugin for joomla that reacts to webhooks sent from googlecode when I commit code.
What it does is that it receives a json array which contains informations like changed files, comments and dates etc when I commit something to my projects svn.
I am not savy with php, but I don't want to bug my friend again if possible.
So I am looking either for a comprehensive tutorial on how to make a plugin for SMF or someone who would convert it for me, which I would prefer :D.
I know C++, but not php very well. I guess the code that reads the json etc. could be used 1:1, I just need to integrate it into SMF somehow.
Required Components:
A specific URL that I can specify is called by google code when I submit something to the source control of my project.
In the admin area, a key should be allowed to be entered, which must be used to authenticate the input coming from googlecode.
The script can then read the json from php://input and should commit the content to the database.
A block is required then for the main page where the content of this database table is displayed.
Any input is appreciated :). I would post links to all the documentation and stuff, but well I can't atm. Sorry for that.
edit:
I really looked hard, I can't find a comprehensive Tutorial on how to start out with an addon or mod. You know, something like a step-by-step introduction etc.
Like Joomla and others have.
Kindred:
That is because, unlike joomla, SMF mods are not restricted to being component or modules... SMF mods can either directly edit the source code of the forum or use the SMF hooks...
You are unclear on what your google code is supposed to do... But, off the top of my head, such a call to google code seems like a big, potential, security hole....
scorcher24:
How is a security hole?
Google calls my script and submits the json array and a secret key.
So I can tell if it is legit data or not.
Kindred:
Anything that allows calls outside your own server is a potential hole...
scorcher24:
I published the code for such an addon here:
hxxp:code.google.com/p/php-googlecode-webhook/downloads/list [nonactive]
In case anyone needs/wants it. Works well if you use SimplePortal with a custom php block.
Navigation
[0] Message Index
Go to full version