Drupal User Profile - drupal

One of my favourite sites at the moment is developmentseed.org. I really like what they do with there user profiles. How would you go about recreating it.
http://developmentseed.org/team seems to be a view of users/nodes
/team/eric-gundersen is a profile/node
"Posts by Eric Gundersen" block on the right of 2. seems to be a view. Is an argument being parsed to return content by Eric?
/blog/2009/oct/21/announcing-managing-news-pluggable-news-data-aggregator the user name links to the profile/node
Same link as above seems to be a block (teaser I guess).
Do you think there are using the defaults drupal module or a custom content type? How would you go about trying to implement something like this?
Thanks
Ryan

This seems to be a view of users with 3 fields: The avatar, the title of the user node (see 2) and the role name.
They're most likely using Content Profile.
In Views you can add an argument and specify that when no argument has been supplied (as is always the case for a block) a default value should be used. Among those default values you can select the user id from the current path. By adding a argument for the author of a node and specifying a default argument for it you can limit a node list to just the nodes created by that author.
I think this is built in functionality - the nice URL is probably an alias for user/123 created through PathAuto.
The block is probably a variant of 3 - the default argument is to take the id from the currently shown node instead and the teaser comes from the node linked to the user with the module described in 2.
So - to create something like that I would install Content Profile and then create some Views with arguments that has default values and with block displays. Does that help? :)

Of course, you can easily custom and theme the related User Profile page by including a user-profile.tpl.php file in your theme.

Related

Wordpress Advanced Custom Fields - Limit A User's Choice To One Option

I have a WordPress website and as part of the news items, the editor can add either an:
internal link OR
external link OR
file
Currently I have this set up as a repeater field with maximum rows set to 1.
Is it possible if say one value has been entered, to prevent another of the values from being filled in.
E.g. I add an internal link and then try to add an external link. A message of some sort is then shown to me to say that only one value can be selected at a time.
I know I can add a description to the field with this information but I want to make it idiot proof so that the user can never add more than one value.
Thanks for your time and help in advance.
I can't write this in comments but celeriko right. Install types plugin there is ability of conditional logic. You can very easy implement of from backend.
Types: http://wp-types.com/
Reagrds

Drupal Lightbox issue (not jQuery lightbox)

I am having a issue in Flag_list module, can anyone please help me out how to put a flag list and how to view it please?
The module has very good description how to do it : http://drupal.org/project/flag_lists
How to use:
Install as usual.
At admin/build/flags you will see a flag "fl_template." This is a default template flag provided by flag_lists. You can edit it to make changes to list messages and to assign it to node types. This
template will be used only on types you assign.
You can create new templates here: admin/build/flags/lists/template and apply them to other node types.
A template can be assiged to many node types, but a node type can only have one template assigned to it.
Enable the "list" block so that it is displayed on your content. The block will only be visible if the content is listable and the user has permission to create lists. That is, the node type must be assigned a template, or the block won't appear. Further, you should enable the link to create lists in the block's config.
Create new lists using the link in the block.
See your lists and listed content at user/[uid]/flags/lists

Drupal6 - Display specific View from a specific user in page

I need a help displaying a specific View result in a page which the user created it.
story...
"User X has created a Page called My Store and UserX has products which was created in custom Content Item."
Now how do I show this UserX's products in his My Store page?
I have already made a view called User_Store_View, I added a Page Display and on Page Settings:Path, the value was "node/%".. now I guess my problem is on the Arguments?
The path should be something like my-store and it should have an argument of user id. Given your requirements I think setting the default behaviour for the argument being invalid or not being supplied to an empty result set would be the most sensible(I think the default is show all). That may be all you really need.
However, if your product is a type that you've created yourself you will need to do some behind the scenes wiring to expose all your fields to Views; it's almost always better to build a content type using CCK so it's already hooked up to Views. And D7 is a different beast in this regard, with fields part of core and whatnot, so I can't help you out there.

Drupal arguments in a menu

By default on a page I have the following menu:
Profile /profile
Albums /album
Awards /awards
Going to any of those pages will load the page default.
If I go to a page on my site such as /mycontent/1 I wish to change a the menu to be the following.
Profile /profile/1
Albums /album/1
Awards /awards/1
I want to pass the argument (nid) to the menu. Is this possible?
Update
The selected answer does do what I asked. I however have changed how I am doing things to use Panels to display the content. I am then using some CSS and JavaScript to hide and show content. With views caching it seems to be working well.
Yes,use arg(0),arg(1), or arg(2) depending on which variable you want to use. It will use the path like the indexes of an array (0/1/2/3/4/etc...). Drupal will send you these variables as they were before the path was aliased if that is something that has been applied to it. Why are you passing the variable? There is probably a better way to do it the "Drupal" way..
Actually I am working on this same problem currently where I need to translate an aliased path: dept/profile/1 to load node/1223/profile/1 where 1 is the ID of the profile to show.
What I am using now is the URL Alter module and implementing the hook it gives to enable this feature. If you are interested in this maybe we can see if it is possible to get module out with a GUI.
My thread on this that is active now: Using module: url_alter and it's hook: hook_url_outbound_alter()
I am using a node that houses a panel which has a view inside it, for reasons that are site specific.

Creating a view for a node

I'm having some problems creating a view for a node within my website.
The content has a path of 'content/%' where % is the title of the node.
What I tried to do is to create a page view in the Views2 module, but to no avail.
When I attempt to preview with the name of one of my nodes, nothing appears, and when I visit the node live, it renders text to the screen without any formatting.
Here are some of the settings from my View...please let me know if I should provide any extra information!
Page Settings
Path: content/%
Arguments
Node:Title
Title: %1
Action to take if argument is not present: Provide default argument
Default argument type: Node ID from URL
Edit
I will describe the behavior I'm expecting to see...
I have a list of nodes in my website in a view....that shows up without any issue.
What I would like to do is click on the node and go to that node's page, which is basically an expanded view of a single item from my list.
I thought what I could do is clone my list view and then add an argument to trim the scope from a list to a single item, but this isn't working too well. What is the proper method for styling a single node?
Edit:
Based on your edit, you've already used Views to create a list of nodes, and now you want to be able to click on one and get to the node page.
If you just want the default node output, you shouldn't have to do anything else. Don't try to use a View to override default node rendering; Drupal will print it out by default.
If you want to theme your node uniquely (beyond what moving the fields around and changing display settings in the UI allows you to do), then you should look at custom template files and theming. Resource here: http://drupal.org/theme-guide
You can change the default node.tpl.php file if you want to change how all nodes are displayed, or you can copy that file and rename it to node-name_of_custom_type.tpl.php to uniquely theme a custom content type you've created, but I'd suggest reading up on the Drupal theme system before making those changes.
End of edit
When you want to assign a path to a Views Page display, you shouldn't model it after any existing paths (e.g. node paths, as you mention). It should be something unique to avoid path alias conflicts. So for example:
my-path/%
Now, if you're just looking to embed a view inside of your node (and you want to pass along the node id as the argument), you're half-way there. Your Arguments setting, based on your description, is correct. However, you don't need a page display.
Here are a couple of options:
Quick 'n' Dirty: Create a block display (which doesn't need a path) and stick the block in a region on the node page (I've used the content_bottom region) to "embed" it in your node
Powerful, Flexible: Use the views_embed_view function (api docs here) inside your node (the body or a CCK field, just make sure to use the "PHP filter" input format)
If you use views_embed_view, you have the flexibility of sticking your Views results wherever you like, and you don't even need to create a Views page or block display, because that function can just use the "Default" display.
Note: If you export your View and save the export code on a site like pastebin or drupalbin, folks here can import the View and see it directly to help answer your question in full detail.
Okay, got it. :)
Using Node: Title as an argument is pretty tricky: with the default settings, the argument must match the title exactly. So, if you wanted to match on "Test value", your path would need to look like content/Test%20value (note the caps).
This will get you the node you want. You said you have default argument set to Node ID from URL; that really doesn't apply for Node: Title arguments. What it does is attempt to find a numeric Node ID and use that as the argument, which will never validate on a Node: Title unless the node's title happens to match the node's ID.
If you just want to display all the nodes if there isn't a title argument present, select Display all values as the action to take if an argument is not present. If you want to display all nodes if the title argument is invalid (like a typo or something), make sure Display all values is set in the Validator field group for the action to take if the argument does not validate.
Because of the exact match restriction on node titles, it's generally not a good idea to use Node: Title as the argument. Instead, consider using "content/NID", where NID is the Node ID of the row's node, as the link in the original view Then, instead of the Node: Title argument in your view, use the Node: ID argument. This should make it less error-prone.

Resources