News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Staff Page Mod

Started by SMFHacks.com Team, May 18, 2006, 06:53:57 PM

Previous topic - Next topic

@TheOffice

At this moment only Admins can see the staff. Is it possible to let al users see the staff page?

I had to made some changes to the index.template.php so it fits in the template.

// the [staff list] button
if ($context['allow_view_stafflist'])
echo ($current_action == 'staff' || $context['browser']['is_ie4']) ? '' : '' , '
<div class="maintab_' , $current_action == 'pm' ? 'active_back' : 'back' , '">
<a href="', $scripturl, '?action=staff">' , $txt['smfstaff_stafflist']  , '</a>
</div>' , $current_action == 'staff' ? '<div class="seperator"><!--no content--></div>' : '<div class="seperator"><!--no content--></div>';


Kind Regards
Daniel

TrueSatan

See ACP>Members>Permissions From there you can modify the permissions for each group so that they can see the staff list.

@TheOffice

Quote from: TrueSatan on July 14, 2007, 07:25:53 AM
See ACP>Members>Permissions From there you can modify the permissions for each group so that they can see the staff list.

Haha. Many thanks didn't think at that. I was thinking to difficult it seems :P



TrueSatan

After adding mods it's often a good idea to look through the permissions just in case there's something new to adjust...you'll soon get used to it.

@TheOffice

SMF is not really new for me :) I was just thinking to difficult this time  :-[

lodle

#345
Hey, i like this alot but can you add one thing in.

change
if($manage_staff)
echo '<td class="windowbg"><a href="' . $scripturl . '?action=staff;sa=catdown;id=' . $data['id'] . '">' . $txt['smfstaff_down'] . '</a>&nbsp;<a href="' . $scripturl . '?action=staff;sa=catup;id=' . $data['id'] . '">' . $txt['smfstaff_up'] . '</a><br /><br /><a href="' . $scripturl . '?action=staff;sa=delete;id=' . $data['id'] . ';ret">' . $txt['smfstaff_delgroup'] . '</a></td>';

to


if($manage_staff)
{
echo '<td class="windowbg">';

if($firstid == $row2['ID_MEMBER'])
{

<a href="' . $scripturl . '?action=staff;sa=catup;id=' . $data['id'] . '">' . $txt['smfstaff_up'] . '</a>&nbsp;
<a href="' . $scripturl . '?action=staff;sa=catdown;id=' . $data['id'] . '">' . $txt['smfstaff_down'] . '</a><br /><br />
<a href="' . $scripturl . '?action=staff;sa=delete;id=' . $data['id'] . ';ret">' . $txt['smfstaff_delgroup'] . '</a>';
}
echo '</td>';
}


and insert


$firstid = $context['smfstaff_users'][$data['id']]['ID_MEMBER'][0];


before


foreach (@$context['smfstaff_users'][$data['id']]  as $id => $row2)
{
//if ($row2['ID_GROUP'] != $data['id'])
//continue;



what this does is make it so theres only one set of options per group.

[nofollow]

i removed the del button cause i think it doesnt belong there

FrEaK@ZoiD !!!

nobody can help me with the SQL file??

Thanx !

dl75

Hello, First off Thank you vbgamer45 for an awesome mod, I desperately needed it for my forum.

Ok, here's my problem. Everything is working fine, but I went to check the Forum error logs, and I got like  bizzilion of these errors, each time member clicks on the button

8: Undefined variable: last
File: Themes/default/Admin.template.php (eval?)
Line: 657

Or

8: Undefined variable: first
File: Themes/default/Admin.template.php (eval?)
Line: 654

Any idea on what to do to fix it? Thanks in advance. ;D

FreeSporePrints

#348
Hello :)

I'm using (or better SMF is using me:) ) SMF 1.1.3 with a custom theme based on The Core Theme (same structure, different colours).

I added this code to the index.template.php to make appear the Staff button into the main menu:


// The [staff] button
if ($context['allow_memberlist'])
echo ($current_action == 'staff' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '">&nbsp;</td>' : '' , '
<td valign="top" class="maintab_' , $current_action == 'staff' ? 'active_back' : 'back' , '">
<a href="', $scripturl, '?action=staff">' , $txt[120] , '</a>
</td>' , $current_action == 'staff' ? '<td class="maintab_active_' . $last . '">&nbsp;</td>' : '';


I've setted into Themes/default/languages/index.language.php another variable for the text Staff into $txt[120]

All is working good, but..

I've these 2 problems:

1) When i click on the Staff button - i don't mean the hover function of the CSS - doesn't appear the changed background of the (active) button. What must i modify?

2) How can i modify the white background of the Staff page?

Thank you all ;)
F.


Cool999

SMF Ver - 1.1.3

I m getting this error-

apply Mod
This package is already installed, and no upgrade was found!

You should uninstall the old version first to avoid problems, or ask the author to create an upgrade from your old version.

Please remember to always make regular backups of your sources and database before installing mods, especially beta versions.

Install Actions
Installations actions for "SMF Staff Page":
The package you are trying to download or install is either corrupt or not compatible with this version of SMF.


But the MOd is not already installed,

Please help

If u want to check any files, tell me , i will attach them in the next post so u can check.

Thanks a lot

TrueSatan

I'd start by looking at installed.list in the Packages directory to see if the mod appears on that at all...post it here if you have any doubts

Cool999

Check the attachment

Thanks

dl75

I'm sorry for a bump but does anyone have anything helpful for this

8: Undefined variable: last
File: Themes/default/Admin.template.php (eval?)
Line: 657

Or

8: Undefined variable: first
File: Themes/default/Admin.template.php (eval?)
Line: 654


I tried EVERYTHING and still cant figure it out  :-[

TrueSatan

#353
Line 5 shows why the Package Manager has reacted as it has:

SMF Staff Page|^|staff.zip|^|vbgamer45:SMFStaff|^|1.5.1

That file lists the mods in the order that were installed so it is saying that some time back you did install this mod but don't appear to have uninstalled it and thus it won't let you install it again. The mod doesn't offer an upgrade option...you have to uninstall the old version to install a new one.

If you go to ACP>Packages

...it should be listed in the "Browse Packages" tab and you should be able to try to uninstall it from there...looking at the number of mods installed after it I doubt that a Package Manager uninstall will work...it will probably show errors and if it does don't proceed with it...you'll have to do a manual uninstallation or, if you are upgrading to a newer version of the mod you can check each file for any differences in the new version and edit accordingly then edit the line in the installed.list I quoted above to reflect the new version...it you are unsure about this then do a full manual uninstall removing that line from the installed.list as well then install the new version from the Package Manager as normal.

These links may help (official SMF Documentation)...reverse the process they describe.

http://docs.simplemachines.org/index.php?topic=402.msg531#msg531

http://www.simplemachines.org/community/index.php?topic=34526.0

The following may also prove helpful:

http://modparser.dev.dansoftaustralia.net/

TrueSatan

@dl75

When you see (eval?) in the report it tells you that the error is in a different file but has tripped up the file shown in the report...it doesn't tell you what file it is in.

I would suggest that you follow through the process of a manual installation checking at each step that everything is in place as it should be...the process is described in the links I put in my reply to cool999

Cool999

Sir, but i tried to manual uninstall it, but can find the text, so its not installed i think.

Please tell what should i do nwo

Thanks

Bigguy

What type of editor are you using to search for the code in the files. ??? Are you using notepad.

Cool999

I m using EditPlus 2

Quote from: Bigguy on August 15, 2007, 12:28:01 PM
What type of editor are you using to search for the code in the files. ??? Are you using notepad.

TrueSatan

The mod edits a number of files...let's look at one as an example, Modifications.english.php in the language directory of the default theme:

The mod adds the following code :


//Begin SMF Staff Page Text Strings
$txt['smfstaff_stafflist'] = 'Staff List';
$txt['smfstaff_admin'] = 'Staff Configuration';

$txt['permissionname_view_stafflist'] = 'View Staff List';
$txt['permissionhelp_view_stafflist'] = 'Staff List shows all members on your Staff. You can change which member groups are shown by going to Layout and Options and look for SMF Staff filter. This permission allows you to toggle who can view the staff list.';
$txt['cannot_view_stafflist'] = 'You can not view the staff list.';


You will need to remove that code from that file to remove the mod from it...the details of all the files you have to edit can be found if you use the links I already gave you and reverse the manual installation process. The mod is not removed by just editing one file...you have a number of different files to edit.

dl75

Arrrrggggg This is sooo frustrating. I changed everything, and I feel like my brain is fried. Now I get this message

8: Undefined variable: last
File: /Themes/default/languages/Staff.english.php (eval?)
Line: 658

Advertisement: