The user profile edit tab does not jump out at users - is it possible to create a link right in the middle of the profile page with logic such as:

if (current user is looking at their own profile) then display message "You have not created a user profile yet, click here to create one"

OR even a prompt on login to do this. I'm thinking of using Admin Message to prompt users about the new feature, but would rather just have a simple link on their own page.

Thanks, Stephen

Comments

michelle’s picture

I've been wanting to do something when there's no profile node for a while. I finally resorted to putting some fields on the registration page just so it auto creates. That's ok for my site but I'd like something for general use. I wonder if I could maybe create a content type that will only show up when there's no profile node... I'm fairly sure I know how to do that. I'll put it on my to do list and see how it goes.

Michelle

ashtronaut’s picture

I know you probably want to build this into advanced profile's functionality without the use of other modules, but I was able to achieve something similar by creating a Rule with the workflow-ng module. Pretty much when the user registers, the rule automatically creates a userprofile node with empty fields. When the user sees his/her user profile with empty fields it may motivate them to edit their profile. You can also create an action that shows a message (that you configured) based on whatever conditions you have set (I have not tried this yet so I don't know what conditions are available.)

ash

scedwar’s picture

Hmmm. Interesting - I'm already using workflow-ng.

User registration isn't a problem - I've got a field from user profile on the registration form, so it gets auto created for new users. The issue is for existing users (around 600) who don't have one. A batch script would be sufficient, perhaps on the install of advanced profile?

michelle’s picture

I'm not sure this is something advprofile should be doing. I think this should be done on the bio/nodeprofile end. I'm not completely opposed to the idea, though, so I won't rule it out entirely. My focus, though, is to find a way to make the profile page not look like crap when there is no node for the user.

Michelle

scedwar’s picture

same objective, different means. Michelle, your approach is far more sensible if only because you don't create unnecessary (empty) nodes for users with no details in their profile.

michelle’s picture

Status: Active » Postponed

New features will go in the 6.x version.

Michelle

michelle’s picture

Status: Postponed » Closed (won't fix)

APK will not be getting new features.

Michelle

chadchandler’s picture

Look into the " Profile Complete Percentage " module. Currently it only supports Core Profile Fields, but in the dev. they are working with CCK.

chadchandler’s picture

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

Here is what I did.

I put this in block visibility. This checks to see if the user has created a profile node, or any other node ..if not it displays whatever you put into the block body where you want.

<?php
global $user;   // the current logged-in user

$result = db_query(db_rewrite_sql("SELECT nid FROM {node} n WHERE type = 'uprofile' AND uid = $user->uid"));
$rows = db_num_rows($result);
$showit = $rows ? FALSE : TRUE;

return $showit;
?>

And something like this in block body

<?php print l('Create your user profile.', 'node/add/uprofile'); ?>
michelle’s picture

Version: 5.x-1.x-dev » 6.x-1.x-dev
Status: Needs review » Postponed

I still want to do somethign with this but it's more likely to happen in 6.x-2.x.

Michelle

michelle’s picture

Status: Postponed » Active

This was a suggestion that was misplaced as a comment on a handbook page. Unfortunately, someone was doing a comment cleaning sweep and deleted the comment so I don't have a record of the contributor.

global $user;
if (arg(1) == $user->uid)
{
$nodes1 = db_query("SELECT Count(nid) as count1 from node WHERE type = 'profile' AND uid = ". arg(1));
while ($node1 = db_fetch_object($nodes1)) {
if ($node1->count1 < 1)
{
print "<div style='padding: 5px; font-weight: bold; font-size:14px;'><a href='/user/".arg(1)."/edit/profile'>You do not have a profile yet, Click here to create your profile</a></div>Other members will not be able to comment on your wall unless you fill in your profile.";
}
}
}
socialnicheguru’s picture

this is a great idea. I have had difficulty trying to figure out the best way to do this for the content profiles that I have setup

Edit: code did not work

How can I use this
theme_content_profile_display_add_link ($element)

this might be another way to add the link if using content profile. But what is $element? Is it just the content

http://drupal.org/node/455586

silkscreen’s picture

Looks like this will be part of this super cool module soon.
As above a block seems like a great workaround
The body code I found was different

<?php
print l(t('edit profile'), "user/{$GLOBALS['user']->uid}/edit/uprofile");
?>

In block Page Specific Visibility Settings i am still unsure of what the correct method is.

michelle’s picture

Status: Active » Closed (won't fix)

Round and round on this but I think using http://drupal.org/project/content_complete is the best bet.

Michelle