Hello,

I am working on a helper module that tries to replace to drupal user profile with the content profile but keeping the URLs (and tabs) of the usual drupal system.

So far it's a fairly simple module. It was coded around the assumption that only one content type and one node exists for a sepcific username, although any other possibilities are detected by the module and provide the proper drupal user page default.

This module also redirects (under the same assumption) to to the user profile url, so I guess that might be related to (at least) #661572: Option to redirect content profile page to user profile page or vice versa.

One note:
- I am using a function called content_profile_replace_is_replaceable() which tries to find the replacement node for the user id. So far it's working for the above mentioned logic, but it can be extended to other configurable use cases. This function is also run on init() to query for redirection. I remembered that there were issues with node_load() on hook_init() (#740100: hook_init() needs to document what functions are ok/not ok to call) so I did a custom node_load function which is basically the same but with only the sql queries (not invoking any nodeapi hooks). I am sure this is not 'ideal' but so far is the only way I found to work around this without breaking other contribs.

The rest should be straightforward to review, tried to be verbose on my comments.

Basically, I am interested to know if you are willing to consider inclusion of this contrib on this module.

Let me know your thoughts.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

hanoii’s picture

Attached is the module, module has a .txt extension

Gabriel R.’s picture

This sounds great!