xoops forums

mwalls59

Just popping in
Posted on: 2004/4/27 6:53
mwalls59
mwalls59 (Show more)
Just popping in
Posts: 4
Since: 2004/4/2 1
#1

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

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/viewto ... 7&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

Mithrandir

XOOPS is my life!
Posted on: 2004/4/27 12:20
Mithrandir
Mithrandir (Show more)
XOOPS is my life!
Posts: 6320
Since: 2003/6/21
#2

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.

rabideau

Home away from home
Posted on: 2004/4/27 12:22
rabideau
rabideau (Show more)
Home away from home
Posts: 1042
Since: 2003/4/25
#3

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

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.

Mithrandir

XOOPS is my life!
Posted on: 2004/4/27 12:25
Mithrandir
Mithrandir (Show more)
XOOPS is my life!
Posts: 6320
Since: 2003/6/21
#4

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.

mwalls59

Just popping in
Posted on: 2004/4/27 17:39
mwalls59
mwalls59 (Show more)
Just popping in
Posts: 4
Since: 2004/4/2 1
#5

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.

-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

El_Jordo

Just popping in
Posted on: 2004/4/27 18:04
El_Jordo
El_Jordo (Show more)
Just popping in
Posts: 64
Since: 2003/4/23
#6

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

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.

JackJ

Community Support Member
Posted on: 2004/4/27 18:38
JackJ
JackJ (Show more)
Community Support Member
Posts: 747
Since: 2003/8/31
#7

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

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/viewto ... t_id=82577#forumpost82577

AZNative

Friend of XOOPS
Posted on: 2004/5/8 21:56
AZNative
AZNative (Show more)
Friend of XOOPS
Posts: 8
Since: 2004/4/21
#8

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

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.