1
mwalls59
Is there a way to only allow some registered users to submit news?
  • 2004/4/27 6:53

  • mwalls59

  • Just popping in

  • Posts: 4

  • Since: 2004/4/2 1


Is there a way to only allow some registered users to submit news?

I'd like for only a select few to be able to submit news. I found this change to the template suggested in the forum that would "hide" the submit link from non-registered users.

https://xoops.org/modules/newbb/viewtopic.php?topic_id=11137&forum=10#forumpost44713

Can any one help me with a way to do this for most registered users, only allowing one group of registered users to submit?

Thanks

Matt

2
Mithrandir
Re: Is there a way to only allow some registered users to submit news?

This will be a feature in the next version of News, which is in early beta atm.

3
rabideau
Re: Is there a way to only allow some registered users to submit news?
  • 2004/4/27 12:22

  • rabideau

  • Home away from home

  • Posts: 1042

  • Since: 2003/4/25


Hi Matt,

Try creating a new "Group" provide the new "Group" with privs for submission; turn off those same permissions for the old Registered Group.

That might work... I hope.

4
Mithrandir
Re: Is there a way to only allow some registered users to submit news?

IIRC the "old" news module only allowed for specifying whether anonymous users could submit news, only registered users or only webmasters (and I am not at all certain about that last one)

Everyone would see the "Submit News" link in the main menu, but people without permissions would get a "you cannot access this area" message.

5
mwalls59
Re: Is there a way to only allow some registered users to submit news?
  • 2004/4/27 17:39

  • mwalls59

  • Just popping in

  • Posts: 4

  • Since: 2004/4/2 1


This will be a feature in the next version of News, which is in early beta atm.

-Awesome, thanks for the update. I will look forward to it.

Hi Matt,

Try creating a new "Group" provide the new "Group" with privs for submission; turn off those same permissions for the old Registered Group.

That might work... I hope.


-Thanks for the response. This sounds interesting. I may be missing something here. As far as I can tell, I can only restrict registered users from access to the news block, but cannot restrict them from being able to submit news if they are given access to view the news block. Are there some permissions that I am missing?

IIRC the "old" news module only allowed for specifying whether anonymous users could submit news, only registered users or only webmasters (and I am not at all certain about that last one)

Everyone would see the "Submit News" link in the main menu, but people without permissions would get a "you cannot access this area" message.


-Does this confirm what I said above? I can only find permissions to restrict anonymous users from submitting news.

Thanks for all your help thus far.

-Matt

6
El_Jordo
Re: Is there a way to only allow some registered users to submit news?
  • 2004/4/27 18:04

  • El_Jordo

  • Just popping in

  • Posts: 64

  • Since: 2003/4/23


One way I got around this restriction involves two things:

1) Remove the "Submit News" link from the main menu, as you seem to have done successfully.

2) Create a new block with this text:

Quote:
<div align="center"><a href="http://www.yoursite.com/modules/news/submit.php">Submit News</a></div>

Then go to Admin > System > Groups and modify the settings so that only users in the selected group can see the block.

7
JackJ
Re: Is there a way to only allow some registered users to submit news?
  • 2004/4/27 18:38

  • JackJ

  • Community Support Member

  • Posts: 747

  • Since: 2003/8/31


I am getting confused here, the next door post looks like a similar subject, I posted in the the other thinking it was this..

https://xoops.org/modules/newbb/viewtopic.php?topic_id=11137&forum=10&post_id=82577#forumpost82577

8
AZNative
Re: Is there a way to only allow some registered users to submit news?
  • 2004/5/8 21:56

  • AZNative

  • Friend of XOOPS

  • Posts: 8

  • Since: 2004/4/21


In the xoops_version.php file for news, find these two lines of code:

$modversion['sub'][1]['name'] = _MI_NEWS_SMNAME1;
$modversion['sub'][1]['url'] = "submit.php";


and change it to look like this:

global $xoopsUser;

if(! empty(
$xoopsUser)) {
  
$group $xoopsUser->getGroups();

  if (
in_array(1$group) || in_array(4$group) || in_array(5$group)) {
    
$modversion['sub'][1]['name'] = _MI_NEWS_SMNAME1;
    
$modversion['sub'][1]['url'] = "submit.php";
  }
}


In the code, above, the 1, 4 and 5 refer to groups, so just put whatever groups you want here and only those groups will even see the link.




Login

Who's Online

272 user(s) are online (194 user(s) are browsing Support Forums)


Members: 0


Guests: 272


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