Views2 integration and minor reorganization
eaton - August 4, 2008 - 06:26
| Project: | Delicious |
| Version: | 6.x-1.x-dev |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | paulbooker |
| Status: | closed |
Description
This patch splits the delicious module into a delicious.inc file that can be used for pure loading and parsing of links from delicious, even by external modules. It also adds a delicious.views.inc file that forms a first stab at full views integration. It's not complete by any means but it's a pretty good start.

#1
And integration with the tags and users table. Now it's possible to create ad-hoc views filtered by tag, sidebar blocks of links posted by the author of the currently displayed node, links by the user whose profile is being show, and so on. Viva la Views 2!
I also snuck in hook_delicious_link($link, $update_or_insert), allowing modules to initiate actions, create nodes, etc based on the incoming delicious links. It would be easy to whip up a module, for example, that creates a new 'draft' node linking to a website whenever someone tags the url with 'write-about-this' on delicious.
Super-cool, and so on.
#2
Thanks for doing this work Eaton.
#3
@Eaton: Thank you for the work in adding the views support.
The attached patch takes account for the changes made in the recent api update.
http://www.angrydonuts.com/attention-views-api-developers
It seems to be working fine for me now.
#4
Reroll of the previous patch. Adding in some small fixes to the code as well as some cleanup.
#5
I couldn't test the last patch, I get this:
patching file delicious/delicious.incpatching file delicious/delicious.install
patching file delicious/delicious.module
patch: **** malformed patch at line 413: else {
#6
Ok, I removed the malformed hunk which was fixing code style so we should be good without it for testing purposes.
Thank you for the patch, it works great. I've few humble comments though:
I would happily work on these issues (or others) if someone with more experience with the module would confirm these issues.
(Attached same patch as the last, but fixed the malformed part as well as removed few mistakingly included .svn directories).
#7
Working on this tomorrow ..
#8
I've been using the patched version of the module on my own blog for a few months now and I've been really happy with it.
At least with the code I was using, you should be able to filter links by adding the User: UID argument to the view. If that's not working, something may have gotten a bit borked in the patch. I can take a look at it...
#9
Ok , i see that now is a good time to commit everything i have in my working copy to the development branch and then ill take a look at the great work you guys have all been doing.
Thanks again for all your help.
Best, Paul
#10
I have added introduced the changes above and have temporarily broken my working copy. I have committed all the changes to the development branch.
From the logs it looks to be something minor like a missing include but i am out of time ..
[23-Jan-2009 18:47:53] PHP Fatal error: Call to undefined function _delicious_nodetype_applicable() in /Users/paulbooker/Development/Drupal/drupal6/httpdocs/sites/all/modules/delicious/delicious.module on line 174
If you have half an hour Jeff and want to take a look please do.
Best, Paul
#11
The module looks to be working again now my local server i just have some cvs problem to look at now ..
paulbookers-computer:~/Development/Drupal/drupal6/httpdocs/sites/all/modules/delicious paulbooker$ cvs add includes
? includes/.DS_Store
? includes/delicious.views.inc
? includes/delicious_views_handler_field_description.inc
? includes/delicious_views_handler_field_tag.inc
cvs add: Using deprecated info format strings. Convert your scripts to use
the new argument format and remove '1's from your info file format strings.
cvs rlog: could not read RCS file for contributions/modules/delicious/includes/directory
Directory /cvs/drupal-contrib/contributions/modules/delicious/includes added to the repository
--> Using per-directory sticky tag `DRUPAL-6--1'
#12
#13
Automatically closed -- issue fixed for 2 weeks with no activity.