1
nts81
Re: Sorry, no permission...
  • 2004/10/1 13:22

  • nts81

  • Just popping in

  • Posts: 3

  • Since: 2004/9/26


hi Guido,

same problem happens to me, and what I did was to force it a little bit. There should be an easier way in the admin section, but as I'm rather new to Xoops, I just did it my way. Well, I just commented the lines that checked the permissions for news module, therefore, anyone will be able to see it.
Open modules\news\
Find index.php and find this piece code :

if (!$gperm_handler->checkRight('news_view', $_GET['storytopic'], $groups, $xoopsModule->getVar('mid'))) {
redirect_header('index.php', 3, _NOPERM);
exit();
Comment the 2 lines redirect and exit so it should look like this :
//redirect_header('index.php', 3, _NOPERM);
// exit();

then open modules\news\articles.php, search for :

$storyid = (isset($_GET['storyid'])) ? intval($_GET['storyid']) : 0;
if (empty($storyid)) {
redirect_header("index.php",2,_NW_NOSTORY);
exit();
}

$myts =& MyTextSanitizer::getInstance();
// set comment mode if not set

$article = new NewsStory($storyid);
if ( $article->published() == 0 || $article->published() > time() ) {
redirect_header('index.php', 2, _NW_NOSTORY);
exit();
}
$gperm_handler =& xoops_gethandler('groupperm');
if (is_object($xoopsUser)) {
$groups = $xoopsUser->getGroups();
} else {
$groups = XOOPS_GROUP_ANONYMOUS;
}
if (!$gperm_handler->checkRight("news_view", $article->topicid(), $groups, $xoopsModule->getVar('mid'))) {
redirect_header('index.php', 3, _NOPERM);
exit();
}

Do the same (comment) as in the first example.

HTH,

Chris



2
nts81
Re: Southend Newspaper theme
  • 2004/9/26 14:50

  • nts81

  • Just popping in

  • Posts: 3

  • Since: 2004/9/26


Why not possible ? This is done here :
http://www.southend.wayne.edu/modules/news/



3
nts81
Re: Southend Newspaper theme
  • 2004/9/26 8:33

  • nts81

  • Just popping in

  • Posts: 3

  • Since: 2004/9/26


Yeah,
I would also like to ask, how do I display the latest news displayed seperately depending on Topic like Campus, Local/State, Nation/World. Do I have to edit recent news ?




TopTop



Login

Who's Online

148 user(s) are online (86 user(s) are browsing Support Forums)


Members: 0


Guests: 148


more...

Donat-O-Meter

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

Latest GitHub Commits