Attached is a patch (for the module). I will also add .install and .js files, as well as the whole module as the changes are big. This isn't 100% ready to rock, but it's good. Check it out.
Major changes:
New Nodeapi Calls
I've reworked the hook_nodeapi calls. This was necessary to allow for the submission of tags outside the node/edit interface. Specifically, I needed to not depend so heavily on the submit $op. What I've done is adjust how the module keeps the user's tags and the other tags on the node distinct, as well as adding an additional argument to the delete function so that when a user updates his/her tags, the module only needs to clear and reconstruct the tags for that user. There are a lot of comments in the module explaining all this.
AJAX/jQuery Support
I've added a JS file and some simple code to allow users to add tags without editing the node. This needs some more work. Specifically we should have an access check as to whether this is allowed, and the actual widget for clicking should be run through a theme_function. But, as-is, this pretty much replicates Flickr's functionality, which is kinda cool.
I've tested this a bit on my sandbox and on another site. I'll continue making improvements but wanted to send you my progress so you could check it out.
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | taxonomy_user_5.x.patch | 20.5 KB | alex_b |
| taxonomy_user_5.0.patch | 38.43 KB | joshk |
Comments
Comment #1
joshk commentedWell, drupal.org doesn't let me upload .module or .info files. If you want the module itself or the quick .info file I worked up, let me know.
Comment #2
patchak commentedCould you upload the whole upadted module in a zipped package here??
Thanks a lot,
Patchak
Comment #3
leoklein commentedWould love to see the .module and .info file added here as a zip package.
Comment #4
alex_b commentedThanks for the upgrade patch, josh
If you would like to add a new file to your patch, do
# cvs add taxonomy_user.info
(you can do this without write permission on the cvs repository)
followed by
# cvs diff -N -u > taxonomy_user_5.x.patch
Comment #5
alex_b commentedJosh,
Great job. Just tried it. Sorry for me taking so long to get around and actually look at it.
Here is a patch that contains the .info file. I also created a 5.x branch - please use this one to roll patches against from now on. The patch attached is for the latest 4.7.x-dev version.
Additional fixes:
* The terms did not show up right anymore, due to the changes in Drupals handling of text content on nodes. I fixed that.
* I made sure that the "Add..." link shows up under the listed terms.
Missing:
* The .js file, no AJAX so far. I looked into your sandbox but did not find it - could you post it here?
* Permissions: now, even anonymous users can enter the tagging form, they can submit the form, but the node-user-term relation just does not get stored. We should have a permission "Create taxonomy user terms"
If you want to take a look at it go here: http://alex.devseed.org and check it out. I will send you user/pw per mail. Anyone interested in getting access too, just drop me a mail.
Comment #6
leoklein commentedHi,
This module -- or at least this version -- doesn't seem to install. I've run the update script a couple of times but the tables are never made.
Comment #7
leoklein commentedActually the tables exist.
Drupal 5.x just doesn't know the module's there.
Comment #8
alex_b commentedI just committed the latest changes to taxonomy_user module. It now includes all changes from the patch here.
I adapted all theme functions to the ajax tagging, improved some functions and tried to lay the groundwork for having optional seperate my tags. Check out the cvs for details.
Major changes: