Forum

Posted by
Pontus Östlund  -  June 2009
Since the general trend for corporate sites and intranets seems to gear towards the "social web" - and we follow that trend too - I've started working on some Pike modules that communicates with some of the more popular social web services - Flickr, Twitter and Gravatar to name the more common ones.

I've also made an OAuth (http://oauth.net/) module - Twitter uses it for authentication and I believe some Google services do the same - that seems to work quite ok.

The modules are still in the work-in-progress stage and the Flickr module I wrote a few years back so that needs to be gone through (and it will be moved to Social.pmod).

Anyhow! If anyone is interested in testing the modules - or even better contribute - you can check them out from Github:

http://github.com/poppa/Pike-Modules/tree/master

I'm also working on some Roxen wrapper modules for the Pike modules above, and I will publish them too on Github when they're usable.

# Code on
 
Posted by
Erik Dahl  -  June 2009
I will surely look at those, by the look of it it will be fun to try them out!
 
Posted by
Pontus Östlund  -  June 2009
Cool Erik. If you do try them out please let me know of any bugs (which there most certainly will be ;) or misbehavior.

If anyone know of some other "social web" service that might be interesting to implement please let me know of them. I will probably look into Facebook next.  I'm sweeping the world of social web at the moment, in a general sense.
 
Posted by
Erik Dahl  -  June 2009
Since I work with many sites where the users are frequent users of facebook, that will surely be really, really interesting. I assure you :)
 
Posted by
Pontus Östlund  -  September 2009
I started on a Facebook module this weekend. I hope it will be usable in a couple of weeks. Authentication works now but there's a lot left to do, like parameter verification and what not.

The first version is visible here: http://bit.ly/3CNu27
 
Posted by
Martin Pedersen  -  September 2009
That's how you do it! Looking forward to follow the development of this one. Great stuff!
 
Posted by
Erik Dahl  -  September 2009
You seem to have gathered quite som experience in this subject, so I have a related question about blog-pinging. I have a person here at my work that seems not to get it to work. I mean XMLRPC-pinging is done, but the blog portals do not seem to register it. Have you done anything in this area?
 
Posted by
Pontus Östlund  -  September 2009
You seem to have gathered quite som experience in this subject, so I have a related question about blog-pinging. I have a person here at my work that seems not to get it to work. I mean XMLRPC-pinging is done, but the blog portals do not seem to register it. Have you done anything in this area?


Do you mean any of these: http://en.wikipedia.org/wiki/Linkback ?

I looked into Trackback once - for a PHP module I was working on - but left it alone at that point. There seems to be a few more techniques now for this functionality (Trackback was invented by Six Apart and implemented in Movable Type and later also implemented in other blog tools).

There now seems to be three, widely used, methods: Refback, Trackback and Pingback. I havn't looked into it but now that you mentioned it I'm curious to do so.

But since I only have time for so many things (been working on a web site for a friends wife lately) I probably won't have time to deal with it in the nearest future (I have to get back to the Facebook module ;)).

If anyone is interested we could set up a repository, or I could share mine, at Github for stuff like this. It feels like this kind of functionality (regarding "social web" or what ever you'd like to call it) will be here to stay for a while.
 
Posted by
Erik Dahl  -  September 2009
I will certainly share if I find a working solution in pike.
 
Posted by
Erik Dahl  -  May 2010
One small bugg:

String.string_to_hex should be Crypto.string_to_hex in OAuth.pmod/module.pmod.

I tried to fix that quick, and stupidly used the MD5-macro and that made it so that it wouldn't compile. The reason is that the 7.4 version of the macro has a semi-colon, the 7.8 version does not.
 
Posted by
Pontus Östlund  -  May 2010
One small bugg:

String.string_to_hex should be Crypto.string_to_hex in OAuth.pmod/module.pmod.

I tried to fix that quick, and stupidly used the MD5-macro and that made it so that it wouldn't compile. The reason is that the 7.4 version of the macro has a semi-colon, the 7.8 version does not.


Where did you find that?

In the MD5-macro I thought I'd taken care of the 7.4 and 7.8 compat issue:

#if constant(Crypto.MD5)
# define MD5(S) String.string2hex(Crypto.MD5.hash((S)))
#else
# define MD5(S) Crypto.string_to_hex(Crypto.md5()->update((S))->digest());
#endif

BTW: I have moved the OAuth module to Security.OAuth instead.
http://github.com/poppa/Pike-Modules/tree/master/Security.pmod/OAuth.pmod/

I think some of the "Social" modules is starting to become at least pretty stable and useful and I'm thinking of making a "stable release" of that stuff. The repos at Github is of course work in progress and I'm taking a more or less ad-hoc approach on the stuff there so it can change a bit when ever I realise there's a more logical structure ;)
 
Posted by
Erik Dahl  -  May 2010


Where did you find that?


Note that the version with "digest()" ends with a semi colon and the 7.8 variant does not.


In the MD5-macro I thought I'd taken care of the 7.4 and 7.8 compat issue:

#if constant(Crypto.MD5)
# define MD5(S) String.string2hex(Crypto.MD5.hash((S)))
#else
# define MD5(S) Crypto.string_to_hex(Crypto.md5()->update((S))->digest());
#endif


It sure does, and since you are using it standalone writing something similar:
 return MD5("foo");
That is not incorrect, it just becomes:
Crypto.string_to_hex(Crypto.md5()->update(("foo"))->digest());;

A double semi colon is not incorrect here, it's just two statements - the last an empty statement. So it really isn't a bug as long as it is not used in another way than it is used now. My intent is not to be picky about your code, just that a simple change in code can break things and the error will only show itself in pike 7.4 ;)


BTW: I have moved the OAuth module to Security.OAuth instead.
http://github.com/poppa/Pike-Modules/tree/master/Security.pmod/OAuth.pmod/

I think some of the "Social" modules is starting to become at least pretty stable and useful and I'm thinking of making a "stable release" of that stuff. The repos at Github is of course work in progress and I'm taking a more or less ad-hoc approach on the stuff there so it can change a bit when ever I realise there's a more logical structure ;)


So I noticed, but understandable, these things are not clear when you start.

I forgot to thank you for your great effort on this module, it does work nicely.
 
Posted by
Pontus Östlund  -  May 2010
# define MD5(S) Crypto.string_to_hex(Crypto.md5()->update((S))->digest());


Ah! I missed that semi colon! I haven't used this module with Pike 7.4 my self and that's why I've never stumbled upon that bug!

I forgot to thank you for your great effort on this module, it does work nicely.


You'r welcome! First of all I think this is fun stuff, which I think all types of system integration is, so I do it with joy. Secondly we will make use of these modules soon at work. And thirdly I really like Pike as a language but since it has a small community you can't expect these things to exist as libraries, like in Python, PHP, C# and so on, so someone has to do it and why not make that someone myself ;)

BTW: A new exciting module is the Google Analytics module which we use at work to display (simplified) statistics for our external web on our intranet. We've made som default reports for various sub sections where you can se stats - visits and most visited pages - for the past 30 days or per month one year back. Great for the marketing people here who now doesn't have to bother Martin and me if they want to see if their adverts or campaigns have made any impact on the number of visits.

This module isn't 100% finished yet and only works with the DesktopApi (which uses plaintext or static authentication, which probably is waht you want when displaying a fixed number of reports for a fixed number of Analytics accounts).

http://github.com/poppa/Pike-Modules/tree/master/WS.pmod/Google.pmod/

There's also a Roxen module for this:
http://github.com/poppa/Roxen-Modules/blob/master/shared/google-analytics.pike

NOTE! These aren't the latest versions but I will upload them later this evening.
 
Posted by
Erik Dahl  -  May 2010
And thirdly I really like Pike as a language but since it has a small community you can't expect these things to exist as libraries[...], so someone has to do it and why not make that someone myself ;)


True, very true, I am glad you feel this way.

A new exciting module is the Google Analytics module which we use at work to display (simplified) statistics for our external web on our intranet.

I will have a look at those.
 
Posted by
Erik Dahl  -  May 2010
And thirdly I really like Pike as a language but since it has a small community you can't expect these things to exist as libraries[...], so someone has to do it and why not make that someone myself ;)


True, very true, I am glad you feel this way and do contribute!

A new exciting module is the Google Analytics module which we use at work to display (simplified) statistics for our external web on our intranet.

I will have a look at those.
 
1 2 3
Search this thread: