Uutiset:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu
Advertisement:

Staff

Aloittaja Saku, lokakuu 18, 2005, 10:50:22 IP

« edellinen - seuraava »

Saku

I would like to make this page public:
/smf/index.php?action=reports;Staff
so everyone can see it also the guest
how can i do that ?

Elmacik

Home of Elmacik

Oldiesmann

That's not a custom action. That's a standard feature in 1.1.

Sakuragi:

Sources/Reports.php

Find
// Only admins, only EVER admins!
isAllowedTo('admin_forum');


Replace
if(!isset($_REQUEST['rt']) || $_REQUEST['rt'] != 'staff')
{
// Only admins, only EVER admins!
isAllowedTo('admin_forum');
}


Find
// We want an admin menu...
adminIndex('generate_reports');


Replace
if(allowedTo('admin_forum'))
{
// We want an admin menu... (but only if they're an admin)
adminIndex('generate_reports');
}


Then just make the link public: http://www.yourdomain.com/smf/index.php?action=reports;rt=staff
Michael Eshom
Christian Metal Fans

Saku

perfect Thank you,
and how can i add another member group to this list??

Oldiesmann

That just shows all your "staff" - moderators, global moderators, administrators and users with certain permissions (moderate_board, moderate_forum, etc.)
Michael Eshom
Christian Metal Fans

Saku

no not global moderators !!just Admin + Moderators

Oldiesmann

It won't show global moderators unless you actually have them...
Michael Eshom
Christian Metal Fans

Saku

i have 4 G. Moderators :D

Oldiesmann

Why don't you want them showing up as staff then?

Sources/Reports.php

Find
WHERE ID_MEMBER IN (" . implode(',', $allStaff) . ")", __FILE__, __LINE__);

Replace
WHERE ID_MEMBER IN (" . implode(',', $allStaff) . ")
AND ID_GROUP != '2'", __FILE__, __LINE__);
Michael Eshom
Christian Metal Fans

Saku

still not showing G. moderators :(

Oldiesmann

Sorry. That's the code to prevent global mods from showing up. I thought that's what you wanted.

SMF actually only displays moderators, admins and anyone with the admin_forum, manage_membergroups or manage_permissions permission, and doesn't include Global Mods.

Anyway, change that "AND ID_GROUP != '2'" to "OR ID_GROUP = '2'".
Michael Eshom
Christian Metal Fans

Saku

sorry but not working again:
ERROR
the URL required could not be charged
Squid did not receive any data for this request.

sorry for my english

Oldiesmann

That's not related to the changes I had you make... I'm currently browsing Google to see what I can find about that particular error message (the actual English equivalent is "The requested URL could not be retrieved"). This apparently has something to do with caching...
Michael Eshom
Christian Metal Fans

Oldiesmann

Unfortunately, I'm not finding anything useful as to what could be causing this problem. Try removing the changes and see if that fixes it. If not, contact your host about it.
Michael Eshom
Christian Metal Fans

Saku

yes it's working if i remove the change

Oldiesmann

Weird...

Try changing this:
WHERE ID_MEMBER IN (" . implode(',', $allStaff) . ")

To this
WHERE (ID_MEMBER IN (" . implode(',', $allStaff) . ") || ID_GROUP = '2')
Michael Eshom
Christian Metal Fans

Saku

thank you!!
Worked like a charm  ;D

Saku

Lainaus käyttäjältä: Oldiesmann - lokakuu 18, 2005, 11:18:13 IP
Then just make the link public: http://www.yourdomain.com/smf/index.php?action=reports;rt=staff
when someone opens this page, that generates this error in the log :

Undefined index: generate_reports
Fichier: /home/Sak/domains/public_html/smf/Sources/Reports.php
Ligne: 140

Ligne: 140     $context['page_title'] = $txt['generate_reports'];

Advertisement: