Page 1 of 1
Allow News Author Field to be Edited
Posted: Sun Feb 25, 2007 12:15 am
by carasmo
Note by Elijah: Split from:
http://forum.cmsmadesimple.org/index.ph ... .html
You ROCK!
This is off topic, but is there an easy way to add an author field in the news? I know it defaults to the person who logged in, but I post news from all over, or snippets of it, and I'd like to be able to have
Title
Written by: New York Times
Summary
Body
I looked and there was some fix but it's old and not compatible with your modifications.
Please tell me to buzz off if you want.
Allow News Author Field to be Edited
Posted: Sun Feb 25, 2007 1:28 am
by Elijah Lofgren
carasmo wrote:
You ROCK!
Thanks, I enjoy using the resources and gifts that God has given me to help others.
carasmo wrote:
This is off topic, but is there an easy way to add an author field in the news? I know it defaults to the person who logged in, but I post news from all over, or snippets of it, and I'd like to be able to have
Title
Written by: New York Times
Summary
Body
I looked and there was some fix but it's old and not compatible with your modifications.
I just adapted my patch to add post images to store the author instead (which means this patch cannot work with the article images one I just posted)
I've just written a patch that adds an editable author text input for News Articles:
http://dev.cmsmadesimple.org/tracker/in ... 8&atid=111
Download here:
http://dev.cmsmadesimple.org/tracker/do ... 2-24.patch
Changed files here:
http://www.elijahlofgren.com/uploads/mo ... eld.tar.gz
(If you don't have a program to uncompress .tar.gz, Filzip is good for that:
http://www.filzip.com/en/index.html )
After applying the patch or changed files add this code to your summary and or detail News template where you want the author name to appear:
If you want to look at the patch see here:
http://www.cmsmadesimple.org/pastebin/810
Hope this helps,
Elijah
carasmo wrote:Please tell me to buzz off if you want.
No problem. Feel free to ask for whatever, but I'll be really busy soon so I'll likely not be able to help much more.

Re: Allow News Author Field to be Edited
Posted: Sun Feb 25, 2007 4:20 am
by carasmo
Thanks!
I installed it and the author feild shows up in the admin, i put the tag in the template, but it doesn't show up on the site. Some places the instance is called "author" and others "icon". Since I'm not too bright about php and how to patch (since I added all that SEO stuff you did and the removal of the News in the path and so forth), I bascially uploaded these two files (since they didn't get affected by the SEO hack you did):
action.addarticle.php
action.editarticle.php
and then pasted in the new line that changed in the action.default.php file
$onerow->icon = $row['icon'];
It saves and works fine, but the author's name doesn't show up on the site.
Re: Allow News Author Field to be Edited
Posted: Sun Feb 25, 2007 4:54 am
by Elijah Lofgren
carasmo wrote:
Thanks!
I installed it and the author feild shows up in the admin, i put the tag in the template, but it doesn't show up on the site. Some places the instance is called "author" and others "icon". Since I'm not too bright about php and how to patch (since I added all that SEO stuff you did and the removal of the News in the path and so forth), I bascially uploaded these two files (since they didn't get affected by the SEO hack you did):
action.addarticle.php
action.editarticle.php
and then pasted in the new line that changed in the action.default.php file
$onerow->icon = $row['icon'];
It saves and works fine, but the author's name doesn't show up on the site.
Does it show up in the Admin Panel with editing and adding news articles? By default it will be blank.
Re: Allow News Author Field to be Edited
Posted: Sun Feb 25, 2007 5:28 am
by carasmo
Yes, the field is there in the admin and it's blank by default, and I entered "Test" in it. Saved, went back to see if if it took, and it's still filled in.
I added the tag to have it show up on the detail news template and it doesn't publish to the site or show up where it's supposed to.
Re: Allow News Author Field to be Edited
Posted: Sun Feb 25, 2007 5:29 am
by Elijah Lofgren
carasmo wrote:
Yes, the field is there in the admin and it's blank by default, and I entered "Test" in it. Saved, went back to see if if it took, and it's still filled in.
I added the tag to have it show up on the detail news template and it doesn't publish to the site or show up where it's supposed to.
If you want, you can Email or PM me your Admin Panel Admin login (and maybe FTP in case I need it) and I will take a look and see if I can see what's wrong.
Re: Allow News Author Field to be Edited
Posted: Sat May 19, 2007 6:17 pm
by avegard
Did you guys ever solve this? Same thing happens to me. This should ideed be a part of the normal news module.
Re: Allow News Author Field to be Edited
Posted: Sat May 19, 2007 6:46 pm
by Elijah Lofgren
avegard wrote:
Did you guys ever solve this? Same thing happens to me. This should ideed be a part of the normal news module.
Sorry, but I don't remember....
carasmo, do you remember?