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.

Comments

eaton’s picture

StatusFileSize
new26.16 KB

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.

Anonymous’s picture

Thanks for doing this work Eaton.

designerbrent’s picture

StatusFileSize
new28.15 KB

@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.

designerbrent’s picture

StatusFileSize
new44.39 KB

Reroll of the previous patch. Adding in some small fixes to the code as well as some cleanup.

AmrMostafa’s picture

I couldn't test the last patch, I get this:

patching file delicious/delicious.inc
patching file delicious/delicious.install
patching file delicious/delicious.module
patch: **** malformed patch at line 413:     else {
AmrMostafa’s picture

StatusFileSize
new33.78 KB

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'm not sure the integration with user table is complete. For example, I cant' find a way to get delicious links for a given user is by their Drupal UID. I could do it by knowing their delicious account name though.
  • It looks like with Views2 integration, the delicious block feature built into the module is no longer needed.
  • A Views display style that produces typical delicious.com-like list would be nice!

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).

Anonymous’s picture

Assigned: Unassigned »

Working on this tomorrow ..

eaton’s picture

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...

Anonymous’s picture

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

Anonymous’s picture

Assigned: » Unassigned

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

Anonymous’s picture

Assigned: Unassigned »

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'

Anonymous’s picture

Status: Needs work » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.