Closed (won't fix)
Project:
Actions
Version:
5.x-2.5
Component:
User interface
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
20 Sep 2008 at 19:16 UTC
Updated:
3 Feb 2013 at 19:43 UTC
Hi,
Thank you for your wonderful module. I have a function in my template.php which converts username to the real name and it appears fine throughout my site on modules.
As a greeting message when a user logs in with :
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
datetoday = new Date();
timenow=datetoday.getTime();
datetoday.setTime(timenow);
thehour = datetoday.getHours();
if (thehour > 18) display = "Evening ";
else if (thehour >12) display = "Afternoon ";
else display = "Morning ";
var greeting = ("Good " + display + " ");
document.write(greeting);
// End -->
</script> %usernamethe %username does not covert to real name and I see that I'm not able to insert php code only html.
Is there perhaps a way to make this work, would most appreciate any help.
Look forward to your reply.
Lilian
Comments
Comment #1
jvandyk commentedCould you please say a bit more about what this has to do with the actions module?
Comment #2
liliplanet commentedThank you for your super-fast reply.
When you create an Advanced Action with Actions: 'Display a message to the user'. In the 'Trigger: After a user has logged in', back in actions you are able to 'configure' the message. In the box available in Actions I've set:
well, the %username does not covert to real name and I see that I'm not able to insert php code only html. All other modules convert the username on my site.
Is there a way to insert php or 'author name' or something similar to output first name.
Hope this more clear, and look forward to your reply.
Lilian
Comment #3
jvandyk commentedNot sure what to say here. I've tried it with both 5.x-2.5 and HEAD and the it works fine for me. I get "Good Afternoon jvandyk". I'm running on PHP 5.2.5, Drupal 5.10. So it points to your function in template.php. What does it look like?
Comment #4
liliplanet commentedThank you again. That's exactly it, I do not want the username 'jvandyk' but presuming :) John van Dyk ...
In template.php as follows:
Currently the above converts the username to full name everywhere on my site. I know that Facebook Statuses just had the same thing, yet now with their update works perfectly,
see http://drupal.org/node/307077
Do you think this is possible please John? Look forward to your reply. Lilian
Comment #5
jvandyk commentedAh, yes. We should be using theme_username() there instead of $user->name. Fixed in HEAD; will appear in 5.x-2.6. Thanks!
Comment #6
liliplanet commentedHi John,
Hope this message finds you fabulous. John, I downloaded 5.x-2.6 but still seem to have only 'username' and not the full name as defined by the template. Is there something specific I should do .. have run update, but to no avail.
Look forward to hearing from you.
Lilian
Comment #7
liliplanet commented*bump* sorry, I needed to re-open this issue. John, please see my posting above and thank you!
Comment #8
pomliane commentedThis version of Actions is not supported anymore. The issue is closed for this reason.
Please upgrade to a supported version and feel free to reopen the issue on the new version if applicable.
This issue has been automagically closed by a script.