Hi,
When posting a news module, the summary/detail says "Posted by: *username*", which is the username of the admin who logged in and posted the news.
What I wish to change is the "Posted by: *username*" to say "Posted by: *Firstname Lastname*", which are relative to the username logged in.
If you go admin > users & groups > users > and edit a user, there are fields for First Name and Last Name - these are what I want displayed on the news module as "Posted by".
I can't seem to find any simple way of doing this, so there's probably something in the module .php files to change, however I'm unsure of how to go about that also.
Any ideas?
I'm using CMSMS 1.1.3.1 and News Module 2.5.
Cheers
[solved] Changing News author name from 'username' to 'first/last' name
-
peedub
[solved] Changing News author name from 'username' to 'first/last' name
Last edited by peedub on Tue Oct 09, 2007 12:31 am, edited 1 time in total.
-
alby
Re: Changing News author name from 'username' to 'first/last' name
Look in Extensions > Modules > Help of Newspeedub wrote: When posting a news module, the summary/detail says "Posted by: *username*", which is the username of the admin who logged in and posted the news.
What I wish to change is the "Posted by: *username*" to say "Posted by: *Firstname Lastname*", which are relative to the username logged in.
If you go admin > users & groups > users > and edit a user, there are fields for First Name and Last Name - these are what I want displayed on the news module as "Posted by".
I can't seem to find any simple way of doing this, so there's probably something in the module .php files to change, however I'm unsure of how to go about that also.
Substitute in template entry->author with entry->authorname$entry->authorname - The full name of the the author including First and Last name
Alby
-
peedub
Re: Changing News author name from 'username' to 'first/last' name
Whoopsies, I must have missed that 
Apologies, but thank you.
EDIT: In fact, after actually trying the solution it appears that something must be wrong. The username still appears as the author.
Here's the edited template code, done in the Summary Template and Detail Template of the News page under Content...
I have tried adding new articles but the username still appears as the author.
Apologies, but thank you.
EDIT: In fact, after actually trying the solution it appears that something must be wrong. The username still appears as the author.
Here's the edited template code, done in the Summary Template and Detail Template of the News page under Content...
Code: Select all
{if $entry->authorname}
<div class="NewsSummaryAuthor">
{$author_label} {$entry->authorname}
</div>
{/if}
Last edited by peedub on Sat Oct 06, 2007 7:44 am, edited 1 time in total.
-
peedub
Re: Changing News author name from 'username' to 'first/last' name
Bump, problem still persists. See previous post's edit.
-
alby
Re: Changing News author name from 'username' to 'first/last' name
Have you edited Dummary and Detail template that you use?peedub wrote: EDIT: In fact, after actually trying the solution it appears that something must be wrong. The username still appears as the author.
Here's the edited template code, done in the Summary Template and Detail Template of the News page under Content...
Templates in use have green check in News Admin.
Alby
-
peedub
Re: Changing News author name from 'username' to 'first/last' name
Oh I see now...
Making a new template and making the 'authorname' changes in there, then setting that template to default, did the trick.
Before, I was making changes in the "Default Detail Template" text area, and that wasn't applying the changes to the default 'Sample' template, which I assumed it was suppose to be doing.
Thanks, Alby, for your help.
Consider this solved
Edit: How do I add to your Karma?
Making a new template and making the 'authorname' changes in there, then setting that template to default, did the trick.
Before, I was making changes in the "Default Detail Template" text area, and that wasn't applying the changes to the default 'Sample' template, which I assumed it was suppose to be doing.
Thanks, Alby, for your help.
Consider this solved
Edit: How do I add to your Karma?
Last edited by peedub on Mon Oct 08, 2007 2:17 am, edited 1 time in total.
Re: Changing News author name from 'username' to 'first/last' name
Peedub,
there was no need to make a new template. You could also edit the template available at the bottom that was marked as default.
If a topic is [solved], please mark it as solved by modifying the original post, and change the subject-line.
As for Karma, only users with more than 10 posts can give/take karma. If you've posted more than 10 replies, under other users name will be the "Karma/Smite"-option linked.
Ronny
there was no need to make a new template. You could also edit the template available at the bottom that was marked as default.
If a topic is [solved], please mark it as solved by modifying the original post, and change the subject-line.
As for Karma, only users with more than 10 posts can give/take karma. If you've posted more than 10 replies, under other users name will be the "Karma/Smite"-option linked.
Ronny

