Closed (fixed)
Project:
User titles
Version:
5.x-1.0-beta2
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
14 May 2008 at 14:29 UTC
Updated:
29 Dec 2008 at 22:50 UTC
Thank you for this module, first...
I'm trying to use it in forum topic and in comments together.
i' ve found two differents function to add to the template,php
The first one is in the README :
switch ($hook) {
case 'node':
case 'comment':
if (module_exists('user_titles')) {
$vars['user_title'] = user_titles_get_user_title($vars['node']->uid);
}
}
return $vars;
}if i use this i have the "title" in node and not in comments
if i use the other one, found following the "documentation" link here on the drupal website:
switch ($hook) {
case 'node':
if (module_exists('user_titles')) {
$vars['user_title'] = user_titles_get_user_title($vars['node']->uid);
}
case 'comment':
if (module_exists('user_titles')) {
$vars['user_title'] = user_titles_get_user_title($vars['comment']->uid);
}
}
return $vars;
}it works in comments but not in the node
Solution?
Thank you,
Da.
Comments
Comment #1
off commentedand in comment.tpl.php use this code
<?php if ($user_titlec): ?><div class="user-title"><?php print $user_titlec; ?></div><?php endif; ?>Comment #2
agileware commentedDid OFF's comment solve your problem?
Comment #3
planctus commentedI think i've never tried that and i still have that problem, if i'm remembering well...
As soon as i can i will try it
Da.
Comment #4
off commentedyes! this 100% vorking, but i have new problem.. 6.x version missing
Comment #5
agileware commentedIf you are referring to there only being a 6.x-1.x-dev version, there is now a beta1 release you can use.