Twire and Buddypress


Hi,

Well as you know I’ve been working on Twire.  Specifically getting the sitewide and user activity to work.  Well, after diving down for days in to buddypress I’ve final found why Twire and sitewide activity are not working.  It is due to php’s limit of what it calls an integer and how twitter gives large numbered id’s to it’s tweets.  This could be avoided as Buddypress allocated the size to handle a large integer in it’s database, but they didn’t do the right sprintf conversion in the code to do it.  Arg.

There is no easy way around this.  I started to modify buddypress, but who would modify the code to use the plugin?

So two new ideas to try:

1.  Make a map of what twitter calls a post and what I call a post (that has issues)

2.  Break down and duplicate twitter inside buddypress.  Meaning make a table of all the user’s tweets in buddypress.

This seems to be the best route, but will delay the release days.  Good news is Twire will work even if twitter goes down

with this approach.

So stay tuned until I get the twitter table in the db created and populated.  Ugh!!!

Here’s a screen shot of the new layout though.

Twire

Twire



June 22, 2009   Posted in: Plugins, Twire, buddypress

7 Responses

  1. Roy - June 22, 2009

    Great! Thanks for the update. Looks great.

  2. BuddyPress Links #29 · Buddypress Links - June 23, 2009

    [...] BuddyPress integer issues [...]

  3. Ray - June 23, 2009

    Looking good!

    Unfortunate to hear about the table duplication.
    Have you brought up this issue with the BP devs?

    -Ray

  4. Andy P - June 24, 2009

    Or, submit a patch to fix this in BuddyPress and I will review it.

  5. daveaubin - June 24, 2009

    Hey Andy,

    There is more than one place for a code change, but in the database you for user and sitewide activity you have a bigint 10 allocated(very nice)
    That’s more than enough for twitter id’s:) But when you essentially do an sprintf in the exists routine in the activity
    class it gets truncated due to converting to a %d. I troubleshot it down to there. When I made the change to buddypress to fix the %d limitation
    it did fix in that spot, but I think there are other places in Buddypress that also do the %d conversion truncating as my
    test just failed later on after that.

    I’ll investigate what it takes to mimic wire and get a twitter table in the db populated based on my current logic and go from there.
    People have been bugging me for this for weeks now and I don’t want to disappoint:)

    Thanks,
    Dave:)

  6. daveaubin - June 24, 2009

    Andy (the man himself) said he’d take care of it if I provide a patch. I told him what I found, but for now I’ll
    doe the table solution as that should work as long as you don’t have over ~2 billion tweets;)

  7. daveaubin - June 24, 2009

    Thanks:) I’ll try to take a stab at the table tonight. Fingers crossed it all goes well:)

Leave a Reply

Powered by WP Hashcash

Leave these:

Protected by Invisible Defender. Showed 403 to 14 bad guys.