SMFHacks.com
** Home Forum Index Hacks Products Login Register Search
Welcome, Guest. Please login or register.
February 11, 2012, 07:04:08 am

Login with username, password and session length
Members
Total Members: 9906
Latest: mdebruijne
Stats
Total Posts: 27801
Total Topics: 4860
Online Today: 81
Online Ever: 2482
(April 09, 2011, 07:02:45 pm)
Users Online
Users: 1
Guests: 61
Total: 62
+ 
|-+ 
| |-+ 
| | |-+ 
| | | |-+ 
0 Members and 1 Guest are viewing this topic. « previous next »
Pages: [1] Go Down Print
Author Topic: Staff Mod Update to Staff.template.php  (Read 1603 times)
Bolerro
Newbie
*
Offline Offline

Posts: 4


View Profile
« 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:
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.
Logged
Bolerro
Newbie
*
Offline Offline

Posts: 4


View Profile
« 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:
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>';

}
?>
Logged
SMFHacks
Administrator
Hero Member
*****
Offline Offline

Posts: 9399


View Profile
« Reply #2 on: October 18, 2009, 07:09:40 pm »

Thanks for the suggestion
Logged
Rafferty
SMF Gallery Pro Customer
Full Member
*****
Offline Offline

Posts: 158



View Profile WWW
« 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.
Logged

Don't Follow Me I Have No Idea What I'm Doing
Pages: [1] Go Up Print 
« previous next »
Jump to:  

Recent
[Today at 04:29:13 am]

[Today at 01:21:47 am]

[February 10, 2012, 03:36:31 pm]

[February 10, 2012, 02:42:09 pm]

[February 10, 2012, 02:23:51 pm]

[February 10, 2012, 10:26:45 am]

[February 09, 2012, 05:30:55 pm]

by exit
[February 09, 2012, 04:47:13 pm]

[February 08, 2012, 09:09:16 pm]

[February 08, 2012, 09:11:02 am]
Random Picture
Donate to SMFHacks.com
Help Support the SMFHacks.com mod making.
Powered by SMF 1.1.16 | SMF © 2006-2011, Simple Machines LLC
TinyPortal v0.9.7 © Bloc
SMF and SimpleMachines are registered trademarks of Simple Machines. SMFHacks.com is not affiliated with nor endorsed by Simple Machines.
Page created in 0.226 seconds with 19 queries.