how to make content show "written by USERNAME" instead of by real name?

General questions relating to Joomla! There are other boards for more specific help on Joomla! features and extensions.
mrmailer
Joomla! Apprentice
Joomla! Apprentice
Posts: 45
Joined: Tue Oct 11, 2005 3:46 pm

how to make content show "written by USERNAME" instead of by real name?

Post by mrmailer » Tue May 02, 2006 7:29 pm

surely there must be some way to do this, be it a hack or whatever.

the "written by" for content, how do you make it say username instead of real name?

I have the feeling it has something to do with this in content.html.php

created_by_alias ? $row->created_by_alias : $row->author ); ?>


but what do i change it to?
Last edited by mrmailer on Tue May 02, 2006 8:01 pm, edited 1 time in total.

User avatar
phoebe
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 132
Joined: Wed Mar 22, 2006 8:00 am
Location: UK
Contact:

Re: how to make content show "written by USERNAME" instead of by real name?

Post by phoebe » Sat May 13, 2006 8:22 pm

I need to know how to do this as well.

If someone who knows the core code well could point us in the right direction, I'm sure we could figure it out...
Phoebe
--
I'm not bossy, I just have better ideas.

User avatar
phoebe
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 132
Joined: Wed Mar 22, 2006 8:00 am
Location: UK
Contact:

Re: how to make content show "written by USERNAME" instead of by real name?

Post by phoebe » Sat May 13, 2006 8:34 pm

This thread offers a solution (hard to find with a search because it refers to user ID not username)

http://forum.joomla.org/index.php/topic,4483.0.html

but having made the change in my content.php file, I still don't get anything different on the site.
Phoebe
--
I'm not bossy, I just have better ideas.

User avatar
phoebe
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 132
Joined: Wed Mar 22, 2006 8:00 am
Location: UK
Contact:

[SOLVED] how to make content show "written by USERNAME" instead of by real name?

Post by phoebe » Sat May 13, 2006 9:02 pm

Aha!! :D

The piece of code that says "u.name AS author" which needs to be changed to "u.username AS author" appears NINE times in the file components/com_content/content.php.  You have to change all of them to get it to work.

I used an html editor with find/replace since it's easier, however, if you need to do it by hand, it appears in the following lines:

163
489
578
660
774
778
887
891
1234

It worked for me so hopefully it will for others too.
Phoebe
--
I'm not bossy, I just have better ideas.

mrmailer
Joomla! Apprentice
Joomla! Apprentice
Posts: 45
Joined: Tue Oct 11, 2005 3:46 pm

Re: how to make content show "written by USERNAME" instead of by real name?

Post by mrmailer » Tue May 16, 2006 6:05 pm

works for me, thanks phoebe!  they really should make this a preference.

now, does anyone know how to do this with mod_latestnews or mod_latestnewsenhanced?
Last edited by mrmailer on Tue May 16, 2006 6:32 pm, edited 1 time in total.

sumanrs
Joomla! Apprentice
Joomla! Apprentice
Posts: 15
Joined: Wed Feb 22, 2006 12:55 am
Contact:

Re: [SOLVED] how to make content show "written by USERNAME" instead of by real n

Post by sumanrs » Tue May 16, 2006 9:16 pm

phoebe wrote: Aha!! :D

The piece of code that says "u.name AS author" which needs to be changed to "u.username AS author" appears NINE times in the file components/com_content/content.php.  You have to change all of them to get it to work.
This is probably not related, but in case you are looking for manual changes to author name, there's an easier way that doesn't require any code modifications.  :)

1. Edit the content page in "Content Item: Edit" page in the administrator site.
2. Look for the tab called "Publishing" on the right side of the page.
3. Look for the field called "Author Alias". Fill in the value you want to use instead of the user who posted it.
4. Save the content. You should have see the new value in "Written By" when you refresh.

mrmailer
Joomla! Apprentice
Joomla! Apprentice
Posts: 45
Joined: Tue Oct 11, 2005 3:46 pm

Re: how to make content show "written by USERNAME" instead of by real name?

Post by mrmailer » Wed May 17, 2006 2:51 am

the problem with that is that you'll have to do it every single time  :D

User avatar
phoebe
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 132
Joined: Wed Mar 22, 2006 8:00 am
Location: UK
Contact:

Re: how to make content show "written by USERNAME" instead of by real name?

Post by phoebe » Thu May 18, 2006 4:05 pm

Exactly.

What we were looking for was an automatic preference to for username not real name.  Expecting my community to do that everytime they posted would be totally unrealistic.
Phoebe
--
I'm not bossy, I just have better ideas.

mrmailer
Joomla! Apprentice
Joomla! Apprentice
Posts: 45
Joined: Tue Oct 11, 2005 3:46 pm

Re: how to make content show "written by USERNAME" instead of by real name?

Post by mrmailer » Sat May 20, 2006 5:34 am

ok, to get mod_latestnews_enhanced
(and possible regular latest news)

change
u.name author
to
u.username author

thx again phoebe!

User avatar
SusanW
Joomla! Apprentice
Joomla! Apprentice
Posts: 7
Joined: Thu Mar 23, 2006 11:20 pm
Location: Canada
Contact:

Re: how to make content show "written by USERNAME" instead of by real name?

Post by SusanW » Thu Jul 06, 2006 10:09 pm

???  I followed the instructions and replaced "u.name AS author" with "u.username AS author" in the file components/com_content/content.php. and I'm still seeing my full name appear  :'( 

Has anyone else successfully been able to fix this?

Thanks in advance!

User avatar
phoebe
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 132
Joined: Wed Mar 22, 2006 8:00 am
Location: UK
Contact:

Re: how to make content show "written by USERNAME" instead of by real name?

Post by phoebe » Thu Jul 06, 2006 10:16 pm

Are you certain you got them all?  I found that if I missed even one, it didn't work.
Phoebe
--
I'm not bossy, I just have better ideas.

User avatar
SusanW
Joomla! Apprentice
Joomla! Apprentice
Posts: 7
Joined: Thu Mar 23, 2006 11:20 pm
Location: Canada
Contact:

Re: how to make content show "written by USERNAME" instead of by real name?

Post by SusanW » Thu Jul 06, 2006 10:26 pm

Yeah :(  I did a find/replace.

Now I get this error msg:
Parse error: parse error, unexpected $ in ****components/com_content/content.php on line 1917

PureMom
Joomla! Intern
Joomla! Intern
Posts: 62
Joined: Tue Oct 03, 2006 3:38 pm

Re: how to make content show "written by USERNAME" instead of by real name?

Post by PureMom » Wed Jan 17, 2007 4:36 am

I am showing this:

. "\n WHERE c.section = '$category->section'"

on line 489 - I do not show anywhere in that file - very strange.

Any ideas?

PureMom
Joomla! Intern
Joomla! Intern
Posts: 62
Joined: Tue Oct 03, 2006 3:38 pm

Re: how to make content show "written by USERNAME" instead of by real name?

Post by PureMom » Wed Jan 17, 2007 4:45 am

Found my answer here... (for mablog only though...)

http://www.jxdevelopment.com/component/ ... 5/catid,4/

Hope that helps!

crypt
Joomla! Fledgling
Joomla! Fledgling
Posts: 2
Joined: Mon Aug 28, 2006 8:05 am

Re: how to make content show "written by USERNAME" instead of by real name?

Post by crypt » Thu Mar 22, 2007 11:44 pm

hi ...

i have changed all "u.names" to "u.usernames" in com_component/content.php but nothing seems to change :(


and this is really ridicilous why joomla doesn't have an option to let us to decide what to display.
youre building a complicated community site with joomla nicely but youre stuck in some stupid  "written by..." problem :(

User avatar
masteryoda
Joomla! Apprentice
Joomla! Apprentice
Posts: 32
Joined: Sun Jun 25, 2006 9:54 pm
Location: İstanbul
Contact:

[SOLVED] how to make content show "written by USERNAME" instead of by real name?

Post by masteryoda » Sat Mar 31, 2007 5:37 pm

change all u.names with u.usernames in components/com_content/content.php
this solves the problem
Lord of Opportunity

mrmailer
Joomla! Apprentice
Joomla! Apprentice
Posts: 45
Joined: Tue Oct 11, 2005 3:46 pm

Re: how to make content show

Post by mrmailer » Wed Mar 19, 2008 5:46 am

Seems to have changed to a different file with joomla 1.5.

Anyone know which one?

I found these references, but I'm afraid to change them all...


components/com_content/models/category.php: ' CHAR_LENGTH( a.`fulltext` ) AS readmore, u.name AS author, u.usertype, g.name AS groups'.$voting['select'] .
components/com_content/models/archive.php: ' CHAR_LENGTH( a.`fulltext` ) AS readmore, u.name AS author, u.usertype, g.name AS groups'.$voting['select'] .
components/com_content/models/section.php: ' CHAR_LENGTH( a.`fulltext` ) AS readmore, u.name AS author, u.usertype, cc.title AS category, g.name AS groups'.$voting['select'] .
components/com_content/models/frontpage.php: ' u.name AS author, u.usertype, g.name AS groups, cc.title AS category, s.title AS section, s.ordering AS s_ordering, cc.ordering AS cc_ordering, a.ordering AS a_ordering, f.ordering AS f_ordering'.
components/com_content/models/article.php: $query = 'SELECT a.*, u.name AS author, u.usertype, cc.title AS category, s.title AS section,' .
[david@laptop joomla]$ gedit components/com_content/models/category.php components/com_content/models/archive.php components/com_content/models/section.php components/com_content/models/frontpage.php components/com_content/models/article.php

TBK0000
Joomla! Apprentice
Joomla! Apprentice
Posts: 19
Joined: Thu Mar 19, 2009 8:01 pm

Re: how to make content show

Post by TBK0000 » Sat Oct 24, 2009 5:02 pm

Hi all

I have made a package with the changes for Joomla 1.5.14.


Guide:
1. Download package: http://www.mediafire.com/download.php?fuzc3oknimj
2. Unzip
3. Upload "models" folder to "Joomla Root/components/com_content"
4. Enjoy

Jabe64
Joomla! Apprentice
Joomla! Apprentice
Posts: 10
Joined: Sat Aug 01, 2009 6:08 am

Re: how to make content show

Post by Jabe64 » Sat Nov 14, 2009 10:25 pm

Up! Is this safe to use this hack with Joomla 1.5.15? Or does it need some update?

If so do you have any update?

TBK0000
Joomla! Apprentice
Joomla! Apprentice
Posts: 19
Joined: Thu Mar 19, 2009 8:01 pm

Re: how to make content show

Post by TBK0000 » Sat Nov 14, 2009 11:56 pm

Nope, you can't. Here is the new pack: http://www.mediafire.com/file/2m1m35n2q ... 1.5.15.zip

Jabe64
Joomla! Apprentice
Joomla! Apprentice
Posts: 10
Joined: Sat Aug 01, 2009 6:08 am

Re: how to make content show

Post by Jabe64 » Sun Nov 15, 2009 1:46 am

Thanks a lot TBK0000, that solved my problem.

I hope it will be officially fixed on next release.

Does somebody reported it on bugtracker?

It would be better and easier to have some radio button choice on backend configuration.

TBK0000
Joomla! Apprentice
Joomla! Apprentice
Posts: 19
Joined: Thu Mar 19, 2009 8:01 pm

Re: how to make content show

Post by TBK0000 » Sun Nov 15, 2009 9:15 pm

Would be great, if you could add it to the request tracker.

Radio button or drop down menu.

Author name based on:
- Name
- Username

Jabe64
Joomla! Apprentice
Joomla! Apprentice
Posts: 10
Joined: Sat Aug 01, 2009 6:08 am

Re: how to make content show

Post by Jabe64 » Sun Nov 15, 2009 9:38 pm

TBK0000 wrote:Would be great, if you could add it to the request tracker.

Radio button or drop down menu.

Author name based on:
- Name
- Username
I can't, I never achieved to register on this bugtracker :( .
I created 2 accounts and never received any activation e-mail.
If I try to login it says User doesn't exist.
If I try to register with this login (or e-mail) it says user and e-mail adress already exists.
If I try to send activation e-mail again it says User doesn't exist too.

So if you have some account or achieve to register here (click).

Please request this feature ;).

TBK0000
Joomla! Apprentice
Joomla! Apprentice
Posts: 19
Joined: Thu Mar 19, 2009 8:01 pm

Re: how to make content show

Post by TBK0000 » Sun Nov 15, 2009 9:56 pm


Jabe64
Joomla! Apprentice
Joomla! Apprentice
Posts: 10
Joined: Sat Aug 01, 2009 6:08 am

Re: how to make content show

Post by Jabe64 » Mon Nov 16, 2009 2:04 am


zantetzuken
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Wed Nov 25, 2009 4:52 am

Re: how to make content show

Post by zantetzuken » Wed Nov 25, 2009 5:04 am

Here is the new pack: http://www.mediafire.com/file/2m1m35n2q ... 1.5.15.zip
thanks a looot man, you have no idea how much I've been looking for a solution to this problem .. Really .. thanks for taking the time to "fix it" and uploading the solution..

TBK0000
Joomla! Apprentice
Joomla! Apprentice
Posts: 19
Joined: Thu Mar 19, 2009 8:01 pm

Re: how to make content show

Post by TBK0000 » Sat May 01, 2010 2:01 am

Here is the new pack for 1.5.17 - http://www.mediafire.com/?knmmhzgqmog

User avatar
Sream
Joomla! Apprentice
Joomla! Apprentice
Posts: 8
Joined: Sun Dec 12, 2010 2:08 am

Re: how to make content show

Post by Sream » Sun Dec 12, 2010 2:16 am

Tried the latest package... not working with the latest Joomla version 1.5.22... :/ I'm working on my site with my cousin which has the same name and surname... can't even recognize what he posted... please help me...

TBK0000
Joomla! Apprentice
Joomla! Apprentice
Posts: 19
Joined: Thu Mar 19, 2009 8:01 pm

Re: how to make content show

Post by TBK0000 » Sun Dec 12, 2010 4:16 am

Sream wrote:Tried the latest package... not working with the latest Joomla version 1.5.22... :/ I'm working on my site with my cousin which has the same name and surname... can't even recognize what he posted... please help me...

Strange, since I use the same files with 1.5.22.

You are manually uploading the files, right?

User avatar
Sream
Joomla! Apprentice
Joomla! Apprentice
Posts: 8
Joined: Sun Dec 12, 2010 2:08 am

Re: how to make content show

Post by Sream » Sun Dec 12, 2010 4:35 pm

Yup... why?


Locked

Return to “General Questions - 1.0.x”