Community

Using a "fake" drupal user rather than adding 3rd part content as uid 0

Hi,

I am working on a Drupal module to plug into a third party news aggregator site. The news aggregator site has articles plus comments and votes on the articles. The drupal module needs to pull the stories, comments and votes from the news aggregator site (done through the cron hook and the API from the 3rd party site) and as well as replicate content posted to the drupal site back to the news aggregator site.

I am using the votingapi module for the voting interface.

I have been building it so that all content coming from the news aggregator site going to the drupal site gets owned/authored by uid 0. Adding comments and votes to belong to user id = 0 has involved a few small workarounds but nothing too big.

At this point in hook_load i am setting the name and homepage to point to the third party news aggregator site. All good, except that since the uid is 0 theme_username is adding (unverified) to the Submitted by link. If this was a custom module for my site i would just create a node-modulename.tpl.php theme template. But since this is a module intended for public consumption (commissioned by the news aggregtor site) i'm not sure what i should be doing. node.tpl.php calls theme_username direcly.

Do i include a node-modulename.tpl.php file with the module? If this is a fair solution then it might be the best.

Do i not do anything and mention in the read me that if site administrator wants to get rid of the "(unverified)" then they need to either redefine theme_user or add their own node-modulename.tpl.php file?

Or, is the whole process of using uid 0 (which is supposed to be the authenticated user) to represent content from a 3rd party site a hack? Should i be creating a "fake" user and then have all the content from the 3rd party site be owned/authored by that user.

Any comments are appreciated.

nobody click here