Remove blog module hard coding from blogapi.module

catch - March 12, 2008 - 19:23
Project:Drupal
Version:7.x-dev
Component:blogapi.module
Category:bug report
Priority:normal
Assigned:Unassigned
Status:patch (code needs review)
Description

This issue came about as a result of: http://drupal.org/node/233301

A lot of good work was done in D6 to make it possible to use blogapi.module with different node types. However there's still a couple of places where blog module is hard coded.

blogapi_blogger_get_users_blogs() and blogapi_blogger_get_user_info()

These are callbacks for the xmlrpc interface - so we need something there, and it's currently inaccurate to point to the user's blog if they're using blogapi to post completely different content types. There's also no check to see if the user actually has a blog, so it's providing page not found in both cases potentially.

#1

catch - April 15, 2008 - 16:06
Title:Remove remaining blog module hard coding from blogapi.module» Remove blog module hard coding from blogapi.module
Version:6.x-dev» 7.x-dev
Status:active» patch (code needs review)

I've given this some thought and I think for now our best option is to link to user/uid instead of blog/uid.

This means:

If blog module isn't enabled, we serve an actual page instead of a 404
If blog module is enabled, there's a link by default to $user's blog on the my account page anyway.
If tracker.module is enabled with or without blog.module, there's a link from the user's profile to find their other posts via the track tab.

Core currently doesn't provide a list of all nodes a user has created anywhere (minus nodes they've commented on), that's probably something to revisit (along with blog.module) once we have views in core.

This probably makes more sense for blogapi_blogger_get_user_info() than blogapi_blogger_get_users_blogs() but I'll mark to CNR for now.

AttachmentSize
223425.patch1.19 KB
 
 

Drupal is a registered trademark of Dries Buytaert.