Why not collect them all? :P
| Comment | File | Size | Author |
|---|---|---|---|
| #17 | friendlist_import_bl.1103.patch | 1.89 KB | strangeways |
| #9 | friendlist_import_bl.txt | 3.1 KB | strangeways |
| #4 | friendlist_import_bl-316013-4.patch | 4.04 KB | webchick |
Why not collect them all? :P
| Comment | File | Size | Author |
|---|---|---|---|
| #17 | friendlist_import_bl.1103.patch | 1.89 KB | strangeways |
| #9 | friendlist_import_bl.txt | 3.1 KB | strangeways |
| #4 | friendlist_import_bl-316013-4.patch | 4.04 KB | webchick |
Comments
Comment #1
mercmobily commentedHi,
I am trying to work with the Buddylist developer about this one.
It's a bit more complicated because Buddylist only exists for Drupal 5.x and its DB structure is a little complicated.
Merc.
Comment #2
webchickI wish you luck with that... as far as I know, Buddylist doesn't have an active developer, or we would never have 5+ competing buddylist modules in the first place. :D
I'm working on an importer for the {buddylist} table only, since that's what my client needs me to do. It'd be a start, anyway. Should be able to post a patch tonight.
Comment #3
mercmobily commentedHi Webchick,
OK.
Please have a look at my response about the API. I am happy to make the changes to the API according to your advice in the next hour or so, so that you can still go ahead and do your work without worrying too much about changes.
Bye,
Merc.
Comment #4
webchickOk, this is officially doing... er... something! Possibly even the correct thing! ;) I'll need to review it again tomorrow when I am more awake.
Please note that this patch requires #316054: Allow passing in create time of relationship to be committed, else all buddylist requests look like they happened at the time the import script ran.
Comment #5
mercmobily commentedHi,
Please have a look at #316054: Allow passing in create time of relationship for this one...
Merc.
Comment #6
mercmobily commentedHi,
you up yet Webchick? :-D
Merc.
Comment #7
webchickNotes from mercmobily in the other issue, for reference here.
Comment #8
mercmobily commentedHi,
That's me :-D
Merc.
Comment #9
strangeways commentedHello,
I just wanted to attach the code I was working with to do the Buddylist import on my site (I just did this last night, otherwise I would have posted it sooner). I took the Buddylist2 importer and modified it.
I've only tested it on a site with two-way relationships, and it worked fine. It doesn't handle translations, which the posted patch does... Also, it updates the create times via db_query, but I see that the create time can be passed in to the API now... Cool. :)
Anyway, I don't know if it's helpful at all, but here it is.
strangeways
Comment #10
mercmobily commentedHi,
Actually, your patch made me realise that we need TWO update statements every time the status is set. I fixed the existing importers, and will fix webchick's when she posts hers!
Merc.
Comment #11
mercmobily commentedHi,
Wekchick, I am a little nervous.
On one hand, tons of people seem to be using this module _now_... before a release.
On the other, I was told by you that the API was basically crap drupal-wise -- and I fixed that. But now, I am really hoping to get your seal of approval so I can get V1 out of the door -- that way people will have a db_update function when they upgrade etc.
Byeeeeeeeeeeee!!!
Merc.
Comment #12
mercmobily commentedHi,
...?
I am turning blue :-)
Merc.
Comment #13
webchickHi, Merc.
Just chiming in to say I won't be able to get to anything FriendList-related until probably Wednesday at the earliest... I have a bunch of other impending deadlines, and a conference to present at between now and then. :\
I'll continue noting bugs as I go, but I wouldn't bother holding up the release waiting on me if you feel everything else is already in order.
Comment #14
mercmobily commentedHi,
Ugh. Now, that's a lot of trust in me... considering hum much I stuffed it up at my first go.
I will recheck everything, do my best to make sure that it does conform to Drupal, and release.
Sort of honoured and worried. Eh!
Alright, time to work harder. As ever.
I your patch works. Do you want me to fix it/add it?
Bye,
Merc.
Comment #15
mercmobily commentedHi,
Webchick, I have been sillily busy with other work things. This is "October from Hell" for me. So, I haven't released yet. I am also waiting to get a silly CSS issue fixed.
So, there is still time to have a look at the module... but I don't want to stress you out.
Also, have a look here:
http://groups.drupal.org/node/15738
http://drupal.org/project/user_relations_api
It's to create a module-independent friends API which will work no matter what underlying module you use (you just tell the GLUE API which module to use). I think it's a neat idea... let's see what Alex.K and the others say.
DON'T run THAT code through Coder yetttttttttttttt!!!!!! I haven't cleaned it up yet. It's all commented, but the missing spaces etc. might drive you bananas :-D
Aa new Friend Module popped out -- Ajax Friends. The guy actually wrote a lot of code for it, he just doesn't know how to use CVS to put it online (!). At this point, I am getting the feeling that Drupal might end up with a few established relation modules. Or maybe somebody will come up with something *better*, who knows.
Anyway, that's all.
Merc.
Comment #16
mercmobily commentedHi,
Alright, here is what I did.
* I got webchick's code
* Changed it so that it adheres to the new FriendList API before her "Holy cow" :-D
* Added the change in timestamp so that relations have a good creation timestamp
* Added the bit about pending requests after fixing it -- thanks strangeways
* Checked that there were no syntax error in the module
Now, you can see the missing item here: Testing!!! :-D
It's really, really hard for me to test anything, becuase I don't have any kind of meaningful data with buddylist.
So... please give it a go and let me know.
This code is so untested, that there is 0 chance it will work out of the box...
Bye,
Merc.
Comment #17
strangeways commentedHi Merc,
I tested this and found a couple minor bugs. I've attached a patch; hopefully I created it correctly! In case I didn't, here's a summary of the changes:
lines 73 and 87: "friendlist_api_set_relations_field" should be "friendlist_api_set_relation_field"
line 85: $relation->rtid should be $relationship->rtid
line 89: $time() should be time()
Pending requests section:
* All $row->uid should be $row->requester_uid
* All $row->buddy should be $row->requestee_uid
Other than those items, the import seems to have worked correctly -- the relation type, statuses, and times were set properly as far as I can tell. My data only had two-way relationships, however, so I did not test one-way relationships.
Best wishes,
strangeways
Comment #18
mercmobily commentedHi,
Patch applied.
THANK YOUUUUUUUUUUUUUUUUU!!!!!!!!!!!
Merc.
Comment #19
mercmobily commented