When using content profile with imagefield, there is no way to have the image link to the user's profile instead of to the content profile node. This will make the image field in views link to the right place.
This is very useful, specially when you want to have the content profile node link to the user's profile page instead.
Once the patch in #661572: Option to redirect content profile page to user profile page or vice versa gets applied, this feature could be adjusted to automatically link to the correct place using:
if (content_profile_get_settings($node->type, 'page_redirect') == 1) {
// redirect to the user profile page
$path = empty($item['uid']) ? '' : 'user/'. $item['uid'];
}
else {
// redirect to the user profile node
... // Do some more code determining the correct profile node.
$path = empty($item['nid']) ? '' : 'node/'. $item['nid'];
}
Comments
Comment #1
drewish commentedSpeaking as the imagecache maintainer I'd say it looks good though I wonder about:
Typo?
Comment #2
moonray commentedoops. yes typo.
will re-roll tomorrow.
Comment #3
moonray commentedFixed typo. Re-rolled patch.
Comment #4
drewish commentedVery nice.
Comment #5
fagoIndeed, very nice + patch looks good! Committed, thanks.