New to Drupal looking for a way in to using nodes as profiles?

Events happening in the community are now at Drupal community events on www.drupal.org.
zzJames's picture

If like me you are not new to PHP, Web development or CMSs but new to Drupal and hoping to build a website with complex user profiles you may be looking for that killer link that documents putting modules like nodeprofile and usernode through their paces.

Does anyone know the URL of that tutorial, or anything even remotely like it?

Thanks in advance :-)

zzJames

Comments

Agreed

designguru-gdo's picture

I would love to see some links guys - been exhausting the user profile tips ( http://drupal.org/node/35728 ) and want to start doing more with my profiles.

--
Web Production for communities
http://www.designguru.org - http://www.joomlasphere.net

--
Qasim Virjee
Principal, Design Guru ( http://www.designguru.org )

.

Post Reading 101

geddon's picture

Thirded. I've been searching for weeks and am making progress -- but an all-in-one solution would be most helpful!

ok kids

zzJames's picture

In the spirit of all things open-sourcey....

I will do it myself. well over the course of the 10 or so days from 27th December to 7th January I HAVE to build a drupal site with advanced multi content type profile pages and make those profiles searchable.

so you (anyone) can help maybe, I will note everything down that I do, on a blog created specifically for me to document my progress. remember I am starting with practically no information, so any hints and tips that you can post as replies/comments they are welcome.

the address of the blog is http://safetycat.co.uk/wordpress/

Thanks, see you there!!

great!

fago's picture

great to see someone working on more docs.. thanks!
which modules are you using for your documentation?

regarding to the nodeprofile modules, the only available documentation is currently the "official" nodeprofile README.txt

I got so far but

zzJames's picture

ok. I am stuck at this point.

from the readme.txt of nodeprofile

* Theme your usernodes

If you have only one nodeprofile, just load the node view of your parent content
type of your nodeprofile, e.g. use this in your theme:

<?php
$children
= nodefamily_relation_load($nid);
         print
node_view($children[0]);
  
?>

anyone know where this code lives??? not in node.tpl.php, not in page.tpl.php, not in template.php??

  • HELP !!!!!!

usernode

fago's picture

e.g. in node-usernode.tpl.php

oh wow!!!!!!!

zzJames's picture
It works!!!! thankyou
It works!!!! thankyou

It works!!!! thankyou

It works!!!! thankyou


It works!!!! thankyou

as you can see this makes me very happy!

I have gone from zero drupal knowledge to almost having the multinode userprofile/registration system drupal site in 2 weeks, 8-10 days (cos of xmas) I have kept I rough diary, but after the site is delivered (10th Jan) I will create a full report for anyone trying to grok the whole usernode/nodeprofilel concept.

Well done!

jockox3's picture

I've been watching this one, and your blog, over the past couple of weeks because almost exactly in parallel with you I am in the same situation. Though mine I haven't finished yet.

But I wanted to ask - you mentioned at the beginning you wanted to make the profiles searchable. Have you succeeded in this yet? Or are you just searching using the default Drupal search.

I need to get my users into lists (think Friends Reunited) based on fields in their userprofile node and I assume that what I need to do is create some views using the views module - have you done this sort of stuff with yours as well?

Also, you mentioned multi-node profiles. So do you mean your usernode has more than one child content type? Do you include them all in the registration process? In fact how have you handled the registration process - do users have to fill in any of their profile nodes when they register? I've used the "register-profile" module to incorporate my custom node profile content type's fields into the registration form itself and it works a treat.

But I too am pleased at how relatively easy it's been so far. I haven't spent as much time on it as I ought to but I'm certainly finding it steady going when I do. As one who has been trying to do this sort of stuff with Plone for months now, I'm finding Drupal a bit of a dream.

views

fago's picture

for searches use views and views_fusion. you'll need views fusion as soon as your view needs to include more than one node per result. (e.g. usernode + profile node)

I've not done anything about the registration profile, the registerprofile has been written by sym. however I think you can also use it with more than one node.

registration and user sorting

zzJames's picture

yes I have to do these things.

My usernode is in relation to (at the moment) biography node and bioimage node. The reason for doing it this way (I think anyway) is so it will be possible to display the bioimages or biography's seperate from each other.

I did think, well why not use CCK and make a huge 'user-bio' node type with everything in, but I thought maybe this would be less flexable down the line.

I believe that you use pageroute module to make a registration process - which is another thing, I want user to be able to enter their information a bit at a time, as far as I understand it with the pageroute module they can fill in the info for one node, then click to do the next, but if they feel like it they can exit and the info they have entered so far will be saved.

it's a very interesting process to learn this stuff, it's been like looking at a pack of cards all mixed up and then sorting small piles, then later you can begin to join the small piles together, if you know what I mean, a bit like playing patience or something... (sorry getting a bit lyrical poetic)

like today when i got the reply to use the file node-usernode.tpl.php, and bizarrely it's not like I didn't know that you can create specific template files for specific node types, because it's on the ibm site and in the theme developers guide, but I just didn't put it together.

Now that it is obvious I had no hesitation in creating a custom node.tpl files for the other nodes in the family (it didn't work at first until I realised that cck nodes have the prefix 'content' on there types, e.g. my bioimage type must be called 'node-content_bioimage.tpl.php') allowing me to remove the title, which I don't want to show.

HOWEVER!! next small problem - when the user is logged in he/she gets the view/edit tabs at the top of the node, when the user clicks 'edit' they get what i assume is the usernode edit page, which consists of nothing (since usernode is empty) - I'm off hunting the forums now, but of course if any suggestions come to mind....

p.s. I love the last comment in this thread
http://drupal.org/node/86407

it's listed as an issue

zzJames's picture

this page

http://drupal.org/node/100619

show that it is an issue with the #edit option.

I wouldn't mind at all just getting rid of the tabs and having edit my profile as a menu option in the usermenu.

I am assuming the tabs are created in node.module but can't find the function, presumably it would be a simple matter of overriding the function with a blank function in usernode.module ???

any thoughts guys?

Maybe just theme them out?

jockox3's picture

Maybe just theme them out?

...in the CSS I mean.

yes good idea.

zzJames's picture

but also...

I see from further inspection that the tabs are not part of the node but part of the page.

ie. line 41 of page.tpl.php

<?php
print $tabs
?>

and I have been thinking also about this post:

http://drupal.org/node/45944 - "Customising the full page layout and sections based on node type"

it might be useful idea to create a unique page.tpl.php for displaying usernodes......

will get back with more info and summarize today on the blog, (maybe tomorow as I probably go out tonight!)

c u

James

Pageroute

jockox3's picture

Yeah - I looked at using pageroute but found registerprofile does just as well at least for a single page setup. I guess it maybe doesn't give me as much control.

Actually I only have about half a dozen fields I need them to provide when they register - just enough to sort of visually verify who they are - but then other profile nodes to hold voluntary information about themselves so I don't need a complicated multi-page registration system I don't think - though it might yet be a better way of presenting their profile information after they've registered to coax them into filling in the voluntary information.

One thing I've assumed, which I hope someone will confirm but I think it's obvious, is that you will always have the username and email address and password in the user record rather than the usernode or its relatives won't you? I would actually like to compute usernames for people depending on what they enter in my usernode profile fields but I can't see any way of doing that other than by modifying the main user module itself which I don't want to do.

Do you keep any other information in the user profile? Or is everything but the three essential user fields in your content nodes? I need to capture a first name, last name and year of connection with the organization concerned and I wanted to be able to use that in core areas of the site - such as wherever author information is displayed. And I wondered whether there are any advantages to keeping that information in the user profile as additional profile fields rather than as fields on the profile nodoe content types.

Jock

I don't know for sure....

zzJames's picture

but I think your assumption is highly likely, as far as I understand it the usernode doesn't do anything to alter how drupal works with username/passwords, so it would be a safe bet to assume that it remains in the user record.

computing usernames is an interesting one. I also would be highly reluctant to alter the main user module!

I am not planning to keep anything other than essentials in user fields as a.f.a.i.k. they are not searchable.... maybe I am not correct in this but I think only node content is searchable....

I am still working out what my full profile will be.... I am doing this today.

p.s. I just reread my blog, as I assumed noone was reading it!! I need to go back and improve a lot of it, even I don't understand what I was talking about sometimes.

Profiles as nodes

Group organizers

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: