1
JackD
News 1.4 - Can't edit news
  • 2005/9/1 13:55

  • JackD

  • Just popping in

  • Posts: 7

  • Since: 2005/9/1 1


Just installed news 1.4 and all seems to be working perfectly until user submits news. I do not have permission (as the admin user) to edit that article to approve it???

What's up with that? I have double- and triple-checked permissions everywhere I know to.

2
Oneway
Re: News 1.4 - Can't edit news
  • 2005/9/1 23:33

  • Oneway

  • Just popping in

  • Posts: 1

  • Since: 2005/9/1 2


Hi Jack,

I ran into the same problem today.
What did it for me was setting the option:

"Enable authors to edit their post ?" to yes in the News preferences.

This worked for me. I can even edit posts that are not mine. So i suppose this is a bug in the news module.

3
nachenko
Re: News 1.4 - Can't edit news
  • 2005/9/2 1:01

  • nachenko

  • Quite a regular

  • Posts: 356

  • Since: 2005/1/18


I found this problem today. As webmaster, i can't edit other user's submissions unless i allow everyone to do this.

4
JackD
Re: News 1.4 - Can't edit news
  • 2005/9/2 11:41

  • JackD

  • Just popping in

  • Posts: 7

  • Since: 2005/9/1 1


Oneway,

I tried your solution and it worked, but it caused a couple of other problems...

When a post is waiting to be approved, and I edit it, it will add my name to it as the author. I do not want this. I can manually put the other one back in there, but I shouldn't have to.

Bigger problem is that after it is approved, that user may edit it freely without it requiring approval again.

I do not like that workaround.

5
StarShaper
Re: News 1.4 - Can't edit news
  • 2005/9/2 15:00

  • StarShaper

  • Just popping in

  • Posts: 29

  • Since: 2005/7/25


I can confirm this bahavior. I just tested it. As long as you don't give everybody the right to edit articles the ADMIN can't also edit this articles. This is because it's hardcoded in this way.

If you want that ADMINS can always edit News insert a word into this code in submit.php (line 78):

if($xoopsModuleConfig['authoredit']==|| is_admin_group()) {
            
$tmpstory = new NewsStory(intval($_GET['storyid']));
            if(
is_object($xoopsUser) && $xoopsUser->getVar('uid')!=$tmpstory->uid() && !is_admin_group()) {
                
redirect_header(XOOPS_URL.'/modules/news/index.php'3_NOPERM);
                exit();
            }
        } else {    
// Users can't edit their articles
        
            
redirect_header(XOOPS_URL.'/modules/news/index.php'3_NOPERM);
            exit();
        }


The addition || is_admin_group() will allow admins to edit posts anytime. It doesn`t matter if the option in config is set yes or no.

This should solve your problem.

regards
starshaper

6
JackD
Re: News 1.4 - Can't edit news
  • 2005/9/2 15:58

  • JackD

  • Just popping in

  • Posts: 7

  • Since: 2005/9/1 1


Will that leave the original poster's name intact on the article?

7
StarShaper
Re: News 1.4 - Can't edit news
  • 2005/9/2 16:09

  • StarShaper

  • Just popping in

  • Posts: 29

  • Since: 2005/7/25


I don't know exactly what you mean. This code fixes your problem with admin permissions. The name of the original poster will stay untouched as long as you don't set your name when you edit others articles.

bye

8
JackD
Re: News 1.4 - Can't edit news
  • 2005/9/2 18:43

  • JackD

  • Just popping in

  • Posts: 7

  • Since: 2005/9/1 1


Quote:

StarShaper wrote:
I don't know exactly what you mean.


What I mean (and it does do this) is if "user1" submits news, when I go to approve the news, by default, it puts "Admin" (my userid) into the Author box. I have to manually put "user1" back into it.

Also, if "user1" selected to be notified when his article is posted, that doesn't happen.

Login

Who's Online

210 user(s) are online (129 user(s) are browsing Support Forums)


Members: 0


Guests: 210


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Mar 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits