Facebook  Twitter 

SMFHacks.com

+-

SMFHacks.com

+- User Information

Welcome, Guest.
Please login or register.
 
 
 
Forgot your password?

+- Forum Stats

Members
Total Members: 4255
Latest: andreios
New This Month: 3
New This Week: 1
New Today: 0
Stats
Total Posts: 43259
Total Topics: 7518
Most Online Today: 201
Most Online Ever: 2482
(April 09, 2011, 07:02:45 pm)
Users Online
Members: 0
Guests: 274
Total: 274

Author Topic: Staff Mod Update to Staff.template.php  (Read 6020 times)

0 Members and 1 Guest are viewing this topic.

Offline Bolerro

  • Bad Emails DO NOT EMAIL
  • Member
  • *
  • Posts: 4
    • View Profile
Staff Mod Update to Staff.template.php
« on: October 17, 2009, 12:59:50 am »
I made an update to the Staff.template.php file to make a better graphicall UI for the Staff Configuration page.

The change is done within the function template_adminset()
Code: [Select]
function template_adminset()
{
global $scripturl, $modSettings, $txt, $context;

echo '<table border="1px" width="90%" cellspacing="0" align="center" cellpadding="4" class="tborder">
<tr class="titlebg">
<td colspan="2">', $txt['smfstaff_staffsetting'], '</td>
</tr>
<br />
<tr class="windowbg">
<td colspan="2"><b>', $txt['smfstaff_staffsetting'], '</b></td>
</tr>
<tr>
<td colspan="2">
<form method="post" action="', $scripturl, '?action=staff;sa=admin2">
<input type="checkbox" name="smfstaff_showavatar" ', ($modSettings['smfstaff_showavatar'] ? ' checked="checked" ' : '') . ' />', $txt['smfstaff_showavatar'], '<br />
<input type="checkbox" name="smfstaff_showlastactive" ', ($modSettings['smfstaff_showlastactive'] ? ' checked="checked" ' : ''), ' />' . $txt['smfstaff_showlastactive'], '<br />
<input type="checkbox" name="smfstaff_showdateregistered" ', ($modSettings['smfstaff_showdateregistered'] ? ' checked="checked" ' : ''), ' />' . $txt['smfstaff_showdateregistered'], '<br />
<input type="checkbox" name="smfstaff_showcontactinfo" ', ($modSettings['smfstaff_showcontactinfo'] ? ' checked="checked" ' : ''), ' />' . $txt['smfstaff_showcontactinfo'], '<br />
<input type="checkbox" name="smfstaff_showlocalmods" ', ($modSettings['smfstaff_showlocalmods'] ? ' checked="checked" ' : ''), ' />' . $txt['smfstaff_showlocalmods'], '<br />
<input type="submit" name="savesettings" value="' . $txt['smfstaff_savesettings'] . '" />
</form>
</td>
</tr>
<br />
<tr class="windowbg">
<td colspan="2"><b>',$txt['smfstaff_groupstoadd'], '</td>
</tr>
<tr>';
foreach ($context['smfstaff_groups'] as $id => $data)
{
echo '<td width="auto">', $data['name'], '
</td>
<td width="20%" align="center">
<a href="', $scripturl, '?action=staff;sa=add&id=', $data['id'], '">' . $txt['smfstaff_addgroup'] . '</a>
</td>
</tr>';
}
echo '
<br />
<tr class="windowbg">
<td colspan="2"><b>',$txt['smfstaff_groupstoshow'], '</td>
</tr>
<tr>';
foreach ($context['smfstaff_showgroups'] as $id => $data)
{
echo '<td width="auto">', $data['name'], '
</td>
<td width="20%" align="center">
<a href="', $scripturl, '?action=staff;sa=delete&id=', $data['id'], '">' . $txt['smfstaff_delgroup'] . '</a>
</td>
</tr>';
}
echo ' <br />
<tr class="windowbg">
<td colspan="2">
<b>Has SMF Staff Page helped you?</b> Then support the developers:<br />
    <form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_xclick">
<input type="hidden" name="business" value="sales@visualbasiczone.com">
<input type="hidden" name="item_name" value="SMF Staff Page">
<input type="hidden" name="no_shipping" value="1">
<input type="hidden" name="no_note" value="1">
<input type="hidden" name="currency_code" value="USD">
<input type="hidden" name="tax" value="0">
<input type="hidden" name="bn" value="PP-DonationsBF">
<input type="image" src="https://www.paypal.com/en_US/i/btn/x-click-butcc-donate.gif" border="0" name="submit" alt="Make payments with PayPal - it is fast, free and secure!">
<img alt="" border="0" src="https://www.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1" />
</form>
</td>
</tr>
</table></td>
</tr>
</table>';

}

Maybe the mod author would like to change the code to include this. If not, at least its here now so anyone can use it.  Enjoy.

Offline Bolerro

  • Bad Emails DO NOT EMAIL
  • Member
  • *
  • Posts: 4
    • View Profile
Re: Staff Mod Update to Staff.template.php
« Reply #1 on: October 18, 2009, 11:44:19 am »
Ok, I updated this again to use the standard CSS that should fit better with the theme your using.

Code: [Select]
function template_adminset()
{
global $scripturl, $modSettings, $txt, $context;

echo '<table border="1px" width="90%" cellspacing="0" align="center" cellpadding="4" class="tborder">
<tr class="titlebg">
<td align="center" colspan="2">', $txt['smfstaff_staffsetting'], '</td>
</tr>
<br />
<tr class="windowbg">
<td colspan="2"><b>', $txt['smfstaff_staffsetting'], '</b></td>
</tr>
<tr class="windowbg2">
<td colspan="2">
<form method="post" action="', $scripturl, '?action=staff;sa=admin2">
<input type="checkbox" name="smfstaff_showavatar" ', ($modSettings['smfstaff_showavatar'] ? ' checked="checked" ' : '') . ' />', $txt['smfstaff_showavatar'], '<br />
<input type="checkbox" name="smfstaff_showlastactive" ', ($modSettings['smfstaff_showlastactive'] ? ' checked="checked" ' : ''), ' />' . $txt['smfstaff_showlastactive'], '<br />
<input type="checkbox" name="smfstaff_showdateregistered" ', ($modSettings['smfstaff_showdateregistered'] ? ' checked="checked" ' : ''), ' />' . $txt['smfstaff_showdateregistered'], '<br />
<input type="checkbox" name="smfstaff_showcontactinfo" ', ($modSettings['smfstaff_showcontactinfo'] ? ' checked="checked" ' : ''), ' />' . $txt['smfstaff_showcontactinfo'], '<br />
<input type="checkbox" name="smfstaff_showlocalmods" ', ($modSettings['smfstaff_showlocalmods'] ? ' checked="checked" ' : ''), ' />' . $txt['smfstaff_showlocalmods'], '<br />
<input type="submit" name="savesettings" value="' . $txt['smfstaff_savesettings'] . '" />
</form>
</td>
</tr>
<br />
<tr class="catbg">
<td colspan="2"><b>',$txt['smfstaff_groupstoadd'], '</td>
</tr>
<tr>';
foreach ($context['smfstaff_groups'] as $id => $data)
{
echo '<td class="windowbg2" width="auto">', $data['name'], '
</td>
<td class="windowbg2" width="20%" align="center">
<a href="', $scripturl, '?action=staff;sa=add&id=', $data['id'], '">' . $txt['smfstaff_addgroup'] . '</a>
</td>
</tr>';
}
echo '
<br />
<tr class="catbg">
<td colspan="2"><b>',$txt['smfstaff_groupstoshow'], '</td>
</tr>
<tr>';
foreach ($context['smfstaff_showgroups'] as $id => $data)
{
echo '<td class="windowbg2" width="auto">', $data['name'], '
</td>
<td class="windowbg2" width="20%" align="center">
<a href="', $scripturl, '?action=staff;sa=delete&id=', $data['id'], '">' . $txt['smfstaff_delgroup'] . '</a>
</td>
</tr>';
}
echo ' <br />
<tr class="windowbg2">
<td colspan="2">
<b>Has SMF Staff Page helped you?</b> Then support the developers:<br />
    <form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_xclick">
<input type="hidden" name="business" value="sales@visualbasiczone.com">
<input type="hidden" name="item_name" value="SMF Staff Page">
<input type="hidden" name="no_shipping" value="1">
<input type="hidden" name="no_note" value="1">
<input type="hidden" name="currency_code" value="USD">
<input type="hidden" name="tax" value="0">
<input type="hidden" name="bn" value="PP-DonationsBF">
<input type="image" src="https://www.paypal.com/en_US/i/btn/x-click-butcc-donate.gif" border="0" name="submit" alt="Make payments with PayPal - it is fast, free and secure!">
<img alt="" border="0" src="https://www.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1" />
</form>
</td>
</tr>
</table></td>
</tr>
</table>';

}
?>

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16436
    • View Profile
Re: Staff Mod Update to Staff.template.php
« Reply #2 on: October 18, 2009, 07:09:40 pm »
Thanks for the suggestion
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

Offline Rafferty

  • Full Member
  • ***
  • Posts: 159
    • View Profile
    • Australian Air Defence Artillery Association
Re: Staff Mod Update to Staff.template.php
« Reply #3 on: October 19, 2009, 08:36:39 pm »
I suggest what would be handy, if the avatars could be resized to a standard setting, mine are mostly all different sizes  looks messy.
Don't Follow Me I Have No Idea What I'm Doing

 

Related Topics

  Subject / Started by Replies Last post
56 Replies
74591 Views
Last post June 10, 2007, 11:51:27 am
by xcx
2 Replies
4945 Views
Last post September 23, 2006, 10:25:54 am
by Animal
2 Replies
4791 Views
Last post October 26, 2007, 08:58:21 pm
by Rekkuza
1 Replies
3843 Views
Last post February 26, 2009, 11:17:27 pm
by SMFHacks
2 Replies
4726 Views
Last post March 12, 2009, 11:21:32 am
by vmp1253

+- Recent Topics

No thumbnails on new uploads by SMFHacks
March 27, 2024, 02:10:41 pm

Display the Contact Page for guests by SMFHacks
March 27, 2024, 10:55:43 am

is it possible to add support for odysee.com by fvlog19
March 21, 2024, 08:47:51 am

Request for admin notification by davejo
March 10, 2024, 01:31:59 am

I need help with torrent upload by Ineedsmfhelp
March 09, 2024, 10:01:13 pm

an idea for new mod (( content type with different display )) by SMFHacks
February 27, 2024, 01:36:27 pm

[Mod] RSS Feed Poster by SMFHacks
February 27, 2024, 11:57:18 am

find duplicate pictures by fvlog19
February 14, 2024, 02:22:40 pm

Error uploading video. by SMFHacks
February 08, 2024, 02:04:16 pm

Gallery icon as last added image by fvlog19
February 01, 2024, 01:04:56 pm

Powered by EzPortal