Upgrade for D6

matt_paz - December 3, 2007 - 18:22
Project:Usernode
Version:5.x-1.4
Component:Code
Category:task
Priority:normal
Assigned:Unassigned
Status:needs work
Description

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?

#1

matt_paz - December 3, 2007 - 18:25
Title:Upgrade for D5» Upgrade for D6

Title should have said D6

#2

deekayen - December 4, 2007 - 15:34
Category:feature request» task

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

AttachmentSize
usernode.info-usernode.install-D6.patch 3.05 KB

#3

deekayen - December 10, 2007 - 19:38
Status:active» needs work

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.

AttachmentSize
usernode.info-usernode.install-usernode.module-diff-2007-12-10-14-34-04.patch 13.24 KB

#4

fago - January 3, 2008 - 21:47

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

#5

fractile81 - January 4, 2008 - 17:34

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.

#6

fractile81 - March 11, 2008 - 16:41

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.

#7

Pedro Lozano - July 22, 2008 - 11:56

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.

<?php
/*
* 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;
}
?>

#8

Summit - November 12, 2008 - 09:15

Subscribing, Interested in D6 version. Greetings, Martijn

#9

quex - November 17, 2008 - 17:04
Version:HEAD» 5.x-1.4

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!

AttachmentSize
usernode 1.4 patch to: usernode.info 408 bytes
usernode 1.4 patch to: usernode.install 2.38 KB
usernode 1.4 patch to: usernode.module 9.28 KB

#10

jmaties - January 4, 2009 - 11:23

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

#11

SocialNicheGuru - January 6, 2009 - 08:18

subscribing

#12

scott859 - January 28, 2009 - 07:01

subscribing

#13

kevinwalsh - February 11, 2009 - 22:39

subscribing

#14

richard.e.morton - February 13, 2009 - 20:55

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

#15

deekayen - February 13, 2009 - 21:01

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

#16

SocialNicheGuru - February 13, 2009 - 22:31

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.

#17

fago - February 19, 2009 - 13:40

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

 
 

Drupal is a registered trademark of Dries Buytaert.