Update for Drupal 5
Freso - April 26, 2007 - 01:06
| Project: | FOAF |
| Version: | 5.x-1.x-dev |
| Component: | Code |
| Category: | task |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed |
Description
Please update this module for Drupal 5.
| Project: | FOAF |
| Version: | 5.x-1.x-dev |
| Component: | Code |
| Category: | task |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed |
Please update this module for Drupal 5.
#1
I second that request, Drupal needs FOAF!
#2
Hi. Drupal definitely needs this module. I would add here one important feature which could make this module priceless - to embed user permissions for browsing content, created by user, by FOAF - e.g. My Friends and Friends of a Friend could browse this content.
#3
Update for Drupal 5 needed!!!
#4
By now....make that 6 (;
#5
r0g1: Actually, there might still be people wanting a 5.x port, and D5 is still supported, so this issue is still valid as it is. I do agree, though, that I'd be more interested in a port for 6.x, and would definitely also subscribe to an issue for porting to that. :)
(If foaf.module is going to skip 5.x, then this issue should be marked "won't fix".)
#6
Here's one that works for Drupal 5. I did this in about 10 minutes, but it seems to be working nicely. I took the code from the 4.7 module (the code in CVS is only up to 4.6, there's an issue for 4.7 support) and started from that. No guarantees of course, but this should get you started.
#7
It would be awesome one day to see a diff of what is changed between 4.7, 5.x, and 6.x modules. I would love to pitch in and help upgrade some modules, or patch and fix existing upgrades, and seeing these differences shown as a comparison of one file to another would really help me learn more than just looking at the handbook info about how to upgrade.
I suppose I could upload two versions of a module in a revision control and look at the differences there. Maybe I will go ahead and do that.... :-)
Anyway, just a sidebar thought. I will try and test out FOAF zip above, and thanks for contributing that!
#8
Just check out this module from CVS, overwrite it with the files from the .zip and do a diff… ;) :)
#9
(it worked, thanks!)
#10
Using HEAD from CVS and the files from Wim Leers, I have made the attached patch.
A quick review:
?>at the end (this is removed in the attached patch)Otherwise, the patch looks like its forbear, and I will test it ASAP.
#11
Here's a revised patch. I've altered the
foaf_export()in favour of readability, cleaned up a ton of code style failings (both from previous patch(es) and before), fixed some string functions that were introduced in 4.7 to replace PHP's native ones (remember that this module in its current state is for 4.6!), and addedfoaf_uninstall()which will clean up the variable table. I've also tested the module somewhat, and found that it works. Please test and review!#12
Excellent work! :) I'll try to get walkah's attention over here.
#13
Thanks Wim Leers and Freso for dusting off this module :)
The RDF output doesn't validate. I corrected a double quote issue. Also, RDF shouldn't contain HTML tags inside property elements (
<em>here).The patch attached produces valid RDF/XML.
#14
why do we use iso-8859-1 here?
This patch changes the output encoding to Drupal native utf-8.
#15
Good catch with the character set. :) Is it actually being sent as UTF-8 though (that would make the most sense, seeing how everything in Drupal is pretty much UTF-8 nowadays)? (Also, just wondering, where is/was the
<em>you talk of? I can't seem to find it in my patch. :/)#16
the
<em>was hidden in the way t() handles the variables, which should use @variable to output plain text.I've added the encoding to the header
Content-Type: application/rdf+xml; charset=utf-8and used drupal_set_header() instead of header().#17
I think this module is finally getting the attention it deserves! :) How about we all volunteer to co-maintain this module? That'll prevent it from dying again.
#18
@scor: Ah, yes. I did make a mental note on checking up on
@foocompared to%foo(I can never remember which is which), but I guess I lost the note again. :/@Wim Leers: Haha. I'm game. :)
#19
Great, I needed that, and had begun looking into it. I'll try to help keeping this module compatible, it looked like it was mostly Forms related.
#20
The profile stuff worked but the buddylist stuff did not.
#21
committed #20. thanks to all who helped! closing this issue. let's start new issues for Drupal 5 now that we have a branch for it.
#22
Automatically closed -- issue fixed for 2 weeks with no activity.