I tried to sift through older feature requests and it didn't look like this would be a duplicate.
Any chance of pursuing an upgrade for D6?

Comments

matt_paz’s picture

Title: Upgrade for D5 » Upgrade for D6

Title should have said D6

deekayen’s picture

Category: feature » task
StatusFileSize
new3.05 KB

Absolutely. Here's the start (.info and .install).

deekayen’s picture

Status: Active » Needs work
StatusFileSize
new13.24 KB

Starts porting some of .module. Maybe it's just me, but I haven't been able to get drupal_execute() to to save a new node so it'll fire the usernode_insert() hook. Need a break from it, but wanted to leave my work for someone else to continue with.

fago’s picture

you'll need to include manually node.pages.inc from the node module.

fractile81’s picture

Subscribing. I've done a little work myself trying to get this to just work on a dev site of mine, so if I run into anything I can give back, I'll post it here.

fractile81’s picture

So, what's the advantage to using drupal_execute(); over a direct node_save();? The drupal_execute(); is going to be doing form validation on the node object which, if invalid, causes no node to be created and breaks the module (as implemented in D5).

I also ask because I too haven't been able to figure out how to get the drupal_execute(); to work correctly.

Pedro Lozano’s picture

I have made a port from scratch myself. This is how the drupal_execute part is done, it's documented in the api how to create nodes using drupal_execute.

I'll post a patch later if I have some time.

/*
 * Saves a usernode by using drupal_execute.
 * This allows modules like auto_nodetitle to work and makes sure all hooks are invoked properly
 */
function usernode_save_node($node) {
  $form_state = array();
  $form_state['values'] = $node;
  $form_state['values']['op'] = t('Save');
  
  // workaround to disable drupal message "Your usernode has been created"
  $messages = drupal_get_messages();
  
  module_load_include('inc', 'node', 'node.pages');
  drupal_execute(USERNODE_CONTENT_TYPE .'_node_form', $form_state, (object)$node);
  
  // write back the old messages
  $_SESSION['messages'] = $messages;
} 
summit’s picture

Subscribing, Interested in D6 version. Greetings, Martijn

quex’s picture

Version: master » 5.x-1.4
StatusFileSize
new9.28 KB
new2.38 KB
new408 bytes

Hi all!

I have made a full path to lastest stable usernode version which is 1.4. Patch to usernode.info and usernode.install is almost that same as above (but compatible with usernode 5.x-1.4).

It works!
Enjoy!

jmaties’s picture

#9 not work fine!
Create a usernode anonymous first :(

socialnicheguru’s picture

subscribing

scott859’s picture

subscribing

kevinwalsh’s picture

subscribing

richard.e.morton’s picture

any progress here with a full release. The reason I would like usernode is purely to be able to use CCK fields and only show certain fields to users with certain roles.

is there another way, I used usernode with drupal 5.

thanks
R

deekayen’s picture

@richard.e.morton:

Usernode really doesn't have anything to do with that - it's whole purpose in life was to provide a way to list users in Views AFAIK, which is built into Views in 6.

Check out CCK 6.x-2. It ships with the Content Permissions module which sets field-level permissions for CCK fields.

socialnicheguru’s picture

if Usernode is no longer needed, then how do we implement node profile which is content profile in D6? Node profiles hung off of usernode.

fago’s picture

Just read content profile docs - you don't need usernode any more.

pomliane’s picture

Status: Needs work » Closed (won't fix)

This version of Usernode is not supported anymore. The issue is closed for this reason.
Please upgrade to a supported version and feel free to reopen the issue on the new version if applicable.

This issue has been automagically closed by a script.