It will be nice if we have the colors of the groups, too.Yeah, that would be nice too.
Now this is looking good. Very interesting. Would like to see more on this though. Demo seems to need you to log in?Currently anyone can view the staff list. I might add a permission isallowed to view staff list.
Just noticed on my test forum that when you click to view the staff list it dose not highlight the proper place on the menu bar. Bug or glitch for I see it on the Demo page there too?Just fixed it.
Updated with the fix for littleone.
Currently it will show all non posting groups.
I think I am just going to place a text field under "Basic Features" and then you enter in the groups you do not want to show on the staff list seperated by a comma.
I would rather alter the groups table to toggle if they are visible but don't want to mess up any mods, or future upgrades.
//Send email row
echo '<a href="mailto:', $data['emailAddress'], '"><img src="' . $settings['images_url'] . '/sendemail.gif"></a>
While you could upload the file that has been updated to its proper location.
I still advise you to use the package manager to unistall and reinstall the mod.
Not quite sure I follow there. Only install that Staff.template.php via the package manager?
I'd never heard of only installing part of the package before?
Or do you upload it via ftp alone?
// the [staff list] button
if ($context['allow_veiw_stafflist'])
echo ($current_action == 'staff' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '"> </td>' : '' , '
<td valign="top" class="maintab_' , $current_action == 'staff' ? 'active_back' : 'back' , '">
<a href="', $scripturl, '?action=staff">' , $txt['smfstaff_stafflist'] , '</a>
</td>' , $current_action == 'staff' ? '<td class="maintab_active_' . $last . '"> </td>' : '';
You can change which member groups are shown by going to Staff List settings.
1. Execute Modification - Modification parse errorMay I know what causes this error?
http://mysiteinfo?action=staff
8: Undefined index: staff_filter
File: mysiteinfo/Staff.template.php (eval?)
Line: 13
8: Undefined index: 38
File: /home/for10001/public_html/forum/Themes/default/Staff.template.php (eval?)
Line: 119
$bmods[$row3['ID_MEMBER']] .= '<a href="' . $scripturl . '?board=' . $row3['ID_BOARD'] . '">' . $row3['name'] . '</a><br />';
<file name="$sourcedir/ModSettings.php">
<operation>
<search position="before"><![CDATA[array('check', 'who_enabled'),]]></search>
<add><![CDATA[
//SMF Staff Mod
array('text', 'staff_filter')]]></add>
</operation>
</file>
</modification>
8: Undefined index: 38
File: /home/for10001/public_html/forum/Themes/default/Staff.template.php (eval?)
Line: 119
if you guys read back through you will see how to stop the errors. ;D
The modification itself works fine, but when I look in my error log, I get this error:Quotehttp://mysiteinfo?action=staff
8: Undefined index: staff_filter
File: mysiteinfo/Staff.template.php (eval?)
Line: 13
I'm on a fresh install of 1.1RC2.
Edit: Ok, I figured out I get this message if I do not add a filter of any kind in the Edit Feature and Options area in the admin panel. So I'm not sure if you want to fix this or not - up to you :D Thanks for a groovy mod!
The modification itself works fine, but when I look in my error log, I get this error:Quotehttp://mysiteinfo?action=staff
8: Undefined index: staff_filter
File: mysiteinfo/Staff.template.php (eval?)
Line: 13
I'm on a fresh install of 1.1RC2.
Edit: Ok, I figured out I get this message if I do not add a filter of any kind in the Edit Feature and Options area in the admin panel. So I'm not sure if you want to fix this or not - up to you :D Thanks for a groovy mod!
i too was getting pages and pages of errors until i went in and added a group in the filter box suggested in this post. i happen to have other groups other then moderator, global moderator, and administrator so i just added the other two groups seperated by comas and i have not had one error since. go to features and options, layout and options and scroll to the bottom to see filter box.
The modification itself works fine, but when I look in my error log, I get this error:Quotehttp://mysiteinfo?action=staff
8: Undefined index: staff_filter
File: mysiteinfo/Staff.template.php (eval?)
Line: 13
I'm on a fresh install of 1.1RC2.
Edit: Ok, I figured out I get this message if I do not add a filter of any kind in the Edit Feature and Options area in the admin panel. So I'm not sure if you want to fix this or not - up to you :D Thanks for a groovy mod!
i too was getting pages and pages of errors until i went in and added a group in the filter box suggested in this post. i happen to have other groups other then moderator, global moderator, and administrator so i just added the other two groups seperated by comas and i have not had one error since. go to features and options, layout and options and scroll to the bottom to see filter box.
Yea I saw that but not any help if you don't have anything to add to the filter. And you should not have to make a new group just to fix it.
Undefined index: MSN
File: /home/****/public_html/smf/Themes/hiha11rc2/Staff.template.php (eval?)
Line: 156
The only file you need to edit is index.template.php of the custom theme that you are using.
I look at the menu function of that theme and just copy the code from one of the buttons and change the action to staff and the image to the image you want to use.
Anyway to get rid of these:QuoteUndefined index: MSN
File: /home/****/public_html/smf/Themes/hiha11rc2/Staff.template.php (eval?)
Line: 156
There there for YIM, ICQ, AIM...
hi there.. i get an error.. not when veiwing staff page... but when i am working in my admin side of my forum.. am i the only one with this prob?
hi there.. i get an error.. not when veiwing staff page... but when i am working in my admin side of my forum.. am i the only one with this prob?What's the error?
'',
// Pagination stuff.
array('int', 'defaultMaxMembers'),
'',
// This is like debugging sorta.
array('check', 'timeLoadPageEnable'),
array('check', 'disableHostnameLookup'),
'',(this line is 292 daz)
// Who's online.
array('check', 'who_enabled'),
//SMF Staff Mod
array('text', 'staff_filter')
'',
// The Streaming Mod Options.
array('check', 'enableEmbeddedStream'),
array('check', 'enableEmbeddedReal'),
array('check', 'enableEmbeddedQuick'),
// Pagination stuff.
array('int', 'defaultMaxMembers'),
'',
// This is like debugging sorta.
array('check', 'timeLoadPageEnable'),
array('check', 'disableHostnameLookup'),
'',
// Who's online.
array('check', 'who_enabled'),
//SMF Staff Mod
array('text', 'staff_filter')
);
Will this MOD ever work with any other theme besides the default??All mods can't really install on non default themes. But it is easy to make this one work. All you need to do is make a new button on the theme you are using. You can access it via http://www.yoursite.com/index.php?action=staff
Will this MOD ever work with any other theme besides the default??All mods can't really install on non default themes. But it is easy to make this one work. All you need to do is make a new button on the theme you are using. You can access it via http://www.yoursite.com/index.php?action=staff
good but i get this error when I go to admin -> fetures and options:Fixed redownload the mod.
Parse error: syntax error, unexpected T_ARRAY, expecting ')' in /home/epaytalk/public_html/Sources/ModSettings.php on line 299
http://**mysiteinfo**index.php?action=staff
8: Undefined index: 58
File: /**mysiteinfo**Themes/default/Staff.template.php (main sub template - eval?)
Line: 127
$bmods[$row3['ID_MEMBER']] .= '<a href="' . $scripturl . '?board=' . $row3['ID_BOARD'] . '">' . $row3['name'] . '</a><br />';
8: Undefined index: allow_view_stafflist
File: **mysiteinfo**/Themes/default/MessageIndex.template.php (main_above sub template - eval?)
Line: 601
ok so i look like a fool now :(I really didn't want to fill up that page with extra tab just for one option for the staff page.
um. but wouldnt it make sense to have its own tab instead of under layout like other mods?
i looked but couldnt find where the options was :P
btw it seems to work great even with my mods now :D no errors even :D
now i just got to remember how to remove tabs from the forum--logout bar :P as i want the button elsewhere :P
Very good modification :)
A small problem is when you have more than one Moderator for the same board or a lot of boards with moderators, stuff page fills with same boards over and over makes it look terrible :(
Can i do something to avoid listing of moderated rooms at least? ???
It would look much better if there were separators in Local Moderators part of staff page :-\What do you mean?
My moderators are all in special groups, so I just removed the local moderators completely from the staff.template.php page.
Do you need them displayed? If not, I can tell you which portion of the code to remove :)
//Seperate the groups from the local mods.
echo '<br />';
//Show local mod's
$localmods = array();
//Stores the boards that member is a moderateor of
$bmods = array();
$query3 = db_query("SELECT m.ID_GROUP, m.ID_MEMBER, m.realName, m.lastLogin, m.dateRegistered, m.ICQ, m.AIM, m.YIM, m.MSN, m.hideEmail, m.emailAddress, b.name, b.ID_BOARD
FROM {$db_prefix}members AS m, {$db_prefix}moderators AS o, {$db_prefix}boards AS b WHERE o.ID_MEMBER = m.ID_MEMBER AND b.ID_BOARD = o.ID_BOARD AND $user_info[query_see_board]", __FILE__, __LINE__);
if(db_affected_rows() != 0)
{
echo '<table border="0" cellspacing="0" cellpadding="2" width="100%">';
echo '<tr>';
echo '<td class="catbg2" width="25%">' . $txt['smfstaff_local'] . '</td>';
echo '<td class="catbg2" width="25%">' . $txt['smfstaff_lastlogin'] . '</td>';
echo '<td class="catbg2" width="25%">' . $txt['smfstaff_forums'] . '</td>';
echo '<td class="catbg2" width="25%">' . $txt['smfstaff_contact'] . '</td>';
echo '</tr>';
while ($row3 = mysql_fetch_assoc($query3))
{
@$bmods[$row3['ID_MEMBER']] .= '<a href="' . $scripturl . '?board=' . $row3['ID_BOARD'] . '">' . $row3['name'] . '</a><br />';
$localmods[$row3['ID_MEMBER']] = array(
'id' => $row3['ID_MEMBER'],
'realName' => $row3['realName'],
'lastLogin' => $row3['lastLogin'],
'dateRegistered' => $row3['dateRegistered'],
'hideEmail' => $row3['hideEmail'],
'emailAddress' => $row3['emailAddress'],
'ICQ' => $row3['ICQ'],
'YIM' => $row3['YIM'],
'AIM' => $row3['AIM'],
'MSN' => $row3['MSN'],
'forums' => $bmods[$row3['ID_MEMBER']],
);
}
foreach ($localmods as $id => $data)
{
echo '<tr>';
echo '<td class="windowbg"><a href="' . $scripturl . '?action=profile;u=' . $data['id'] . '">' . $data['realName'] . '</a></td>';
echo '<td class="windowbg">' . timeformat($data['lastLogin']) . '</td>';
echo '<td class="windowbg">' . $data['forums'] . '</td>';
//echo '<td class="windowbg">' . timeformat($data['dateRegistered']) . '</td>';
echo '<td class="windowbg" align="center">';
//Send email row
if($data['hideEmail'] == 0)
echo '<a href="mailto:', $data['emailAddress'], '"><img src="' . $settings['images_url'] . '/email_sm.gif" alt="email" /></a> ';
if($data['ICQ'] != '')
echo '<a href="http://www.icq.com/whitepages/about_me.php?uin=' . $data['ICQ'] . '" target="_blank"><img src="http://status.icq.com/online.gif?img=5&icq=' . $data['ICQ'] . '" alt="' . $data['ICQ'] . '" width="18" height="18" border="0" /></a> ';
if($data['AIM'] != '')
echo '<a href="aim:goim?screenname=' . urlencode(strtr($data['AIM'], array(' ' => '%20'))) . '&message=' . $txt['aim_default_message'] . '"><img src="' . $settings['images_url'] . '/aim.gif" alt="' . $data['AIM'] . '" border="0" /></a> ';
if($data['YIM'] != '')
echo '<a href="http://edit.yahoo.com/config/send_webmesg?.target=' . urlencode($data['YIM']) . '"><img src="http://opi.yahoo.com/online?u=' . urlencode($data['YIM']) . '&m=g&t=0" alt="' . $data['YIM'] . '" border="0" /></a> ';
if($data['MSN'] != '')
echo '<a href="http://members.msn.com/' . $data['MSN'] . '" target="_blank"><img src="' . $settings['images_url'] . '/msntalk.gif" alt="' . $data['MSN'] . '" border="0" /></a> ';
//Send PM row
echo '<a href="' . $scripturl . '?action=pm;sa=send;u=' . $data['id'] . '">' . $txt['smfstaff_sendpm'] . '</a>';
echo '</td>';
echo '</tr>';
}
echo '</table>';
}
mysql_free_result($query3);
<?php
// Version: 1.1 RC2; index
/* This template is, perhaps, the most important template in the theme. It
contains the main template layer that displays the header and footer of
the forum, namely with main_above and main_below. It also contains the
menu sub template, which appropriately displays the menu; the init sub
template, which is there to set the theme up; (init can be missing.) and
the linktree sub template, which sorts out the link tree.
The init sub template should load any data and set any hardcoded options.
The main_above sub template is what is shown above the main content, and
should contain anything that should be shown up there.
The main_below sub template, conversely, is shown after the main content.
It should probably contain the copyright statement and some other things.
The linktree sub template should display the link tree, using the data
in the $context['linktree'] variable.
The menu sub template should display all the relevant buttons the user
wants and or needs.
For more information on the templating system, please see the site at:
http://www.simplemachines.org/
*/
// Initialize the template... mainly little settings.
function template_init()
{
global $context, $settings, $options, $txt;
/* Use images from default theme when using templates from the default theme?
if this is 'always', images from the default theme will be used.
if this is 'defaults', images from the default theme will only be used with default templates.
if this is 'never' or isn't set at all, images from the default theme will not be used. */
$settings['use_default_images'] = 'never';
/* What document type definition is being used? (for font size and other issues.)
'xhtml' for an XHTML 1.0 document type definition.
'html' for an HTML 4.01 document type definition. */
$settings['doctype'] = 'xhtml';
/* The version this template/theme is for.
This should probably be the version of SMF it was created for. */
$settings['theme_version'] = '1.1 RC2';
/* Set a setting that tells the theme that it can render the tabs. */
$settings['use_tabs'] = false;
/* Use plain buttons - as oppossed to text buttons? */
$settings['use_buttons'] = false;
/* Show sticky and lock status seperate from topic icons? */
$settings['seperate_sticky_lock'] = false;
}
function get_collapsed_state($object_id)
{
global $settings;
if(isset($settings['collapsed_sects']) && !empty($settings['collapsed_sects'])) {
if(array_search($object_id, $settings['collapsed_sects']) === false)
return false;
else
return true;
}
return false;
}
// The main sub template above the content.
function template_main_above()
{
global $context, $settings, $options, $scripturl, $txt, $forum_version, $language, $modSettings;
$csect_cookie = 'SMF_user_' . $context['user']['id'] . '_CSect';
if(isset($_COOKIE[$csect_cookie]) && !empty($_COOKIE[$csect_cookie]))
$settings['collapsed_sects'] = explode("\n", $_COOKIE[$csect_cookie]);
$settings['csect_cookie'] = $csect_cookie;
// Show right to left and the character set for ease of translating.
echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"', $context['right_to_left'] ? ' dir="rtl"' : '', ' xml:lang="', $txt['lang_dictionary'], '" lang="', $txt['lang_dictionary'], '"><head>
<meta http-equiv="Content-Type" content="text/html; charset=', $context['character_set'], '" />
<meta http-equiv="Content-Script-Type" content="text/javascript" />
<meta http-equiv="Content-Style-Type" content="text/css" />
<meta name="description" content="', $context['page_title'], '" />
<meta name="keywords" content="PHP, MySQL, bulletin, board, free, open, source, smf, simple, machines, forum" />
<script language="JavaScript" type="text/javascript" src="', $settings['default_theme_url'], '/script.js?rc2"></script>
<script language="JavaScript" type="text/javascript" src="', $settings['theme_url'], '/collapse.js?rc2"></script>';
if(empty($settings['show_dhtml_menu']))
echo '
<script language="JavaScript" type="text/javascript" src="', $settings['theme_url'], '/menu.js?rc2"></script>';
echo '
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
var smf_theme_url = "', $settings['theme_url'], '";
var smf_images_url = "', $settings['images_url'], '";
var smf_scripturl = "', $scripturl, '";
// ]]></script>
<title>', $context['page_title'], '</title>';
// The ?rc2 part of this link is just here to make sure browsers don't cache it wrongly.
echo '
<link rel="stylesheet" type="text/css" href="', $settings['theme_url'], '/style.css?rc2" />';
// Any color set by user?
if (isset($options['theme_color']))
$settings['theme_user_color'] = $options['theme_color'];
// If not set, or if not allowed to set
if(!isset($options['theme_color']) || (isset($settings['allow_color_change']) && $settings['allow_color_change'] == 'no'))
{
// Defaults.
$options['theme_color'] = isset($settings['theme_default_color']) ? $settings['theme_default_color'] : '10';
$settings['theme_user_color'] = $options['theme_color'];
}
if (empty($settings['theme_user_color']))
echo '
<link rel="stylesheet" type="text/css" href="', $settings['theme_url'], '/maincolorcss/default_orc.css?rc2" />';
else
{
if ($settings['theme_user_color'] == 0)
echo '
<link rel="stylesheet" type="text/css" href="', $settings['theme_url'], '/maincolorcss/default_orc.css?rc2" />';
if ($settings['theme_user_color'] == 1)
echo '
<link rel="stylesheet" type="text/css" href="', $settings['theme_url'], '/maincolorcss/blue_human.css?rc2" />';
if ($settings['theme_user_color'] == 2)
echo '
<link rel="stylesheet" type="text/css" href="', $settings['theme_url'], '/maincolorcss/blue_draenei.css?rc2" />';
if ($settings['theme_user_color'] == 3)
echo '
<link rel="stylesheet" type="text/css" href="', $settings['theme_url'], '/maincolorcss/red_b_elves.css?rc2" />';
if ($settings['theme_user_color'] == 4)
echo '
<link rel="stylesheet" type="text/css" href="', $settings['theme_url'], '/maincolorcss/blue_elves.css?rc2" />';
if ($settings['theme_user_color'] == 5)
echo '
<link rel="stylesheet" type="text/css" href="', $settings['theme_url'], '/maincolorcss/green_undead.css?rc2" />';
if ($settings['theme_user_color'] == 6)
echo '
<link rel="stylesheet" type="text/css" href="', $settings['theme_url'], '/maincolorcss/brown_dwarves.css?rc2" />';
if ($settings['theme_user_color'] == 7)
echo '
<link rel="stylesheet" type="text/css" href="', $settings['theme_url'], '/maincolorcss/brown_gnomes.css?rc2" />';
if ($settings['theme_user_color'] == 8)
echo '
<link rel="stylesheet" type="text/css" href="', $settings['theme_url'], '/maincolorcss/red_troll.css?rc2" />';
if ($settings['theme_user_color'] == 9)
echo '
<link rel="stylesheet" type="text/css" href="', $settings['theme_url'], '/maincolorcss/brown_tauren.css?rc2" />';
if ($settings['theme_user_color'] == 10)
echo '
<link rel="stylesheet" type="text/css" href="', $settings['theme_url'], '/maincolorcss/grey_logo.css?rc2" />';
}
if(empty($settings['show_dhtml_menu']))
echo '
<link rel="stylesheet" type="text/css" href="', $settings['theme_url'], '/menu.css?rc2" />';
echo '
<link rel="stylesheet" type="text/css" href="', $settings['default_theme_url'], '/print.css?rc2" media="print" />
<!--[if IE 5 ]><link rel="stylesheet" type="text/css" href="', $settings['theme_url'], '/ie5.css?rc2"><![endif]-->';
/* Internet Explorer 4/5 and Opera 6 just don't do font sizes properly. (they are big...)
Thus, in Internet Explorer 4, 5, and Opera 6 this will show fonts one size smaller than usual.
Note that this is affected by whether IE 6 is in standards compliance mode.. if not, it will also be big.
Standards compliance mode happens when you use xhtml... */
if ($context['browser']['needs_size_fix'])
echo '
<link rel="stylesheet" type="text/css" href="', $settings['default_theme_url'], '/fonts-compat.css" />';
// Show all the relative links, such as help, search, contents, and the like.
echo '
<link rel="help" href="', $scripturl, '?action=help" target="_blank" />
<link rel="search" href="' . $scripturl . '?action=search" />
<link rel="contents" href="', $scripturl, '" />';
// If RSS feeds are enabled, advertise the presence of one.
if (!empty($modSettings['xmlnews_enable']))
echo '
<link rel="alternate" type="application/rss+xml" title="', $context['forum_name'], ' - RSS" href="', $scripturl, '?type=rss;action=.xml" />';
// If we're viewing a topic, these should be the previous and next topics, respectively.
if (!empty($context['current_topic']))
echo '
<link rel="prev" href="', $scripturl, '?topic=', $context['current_topic'], '.0;prev_next=prev" />
<link rel="next" href="', $scripturl, '?topic=', $context['current_topic'], '.0;prev_next=next" />';
// If we're in a board, or a topic for that matter, the index will be the board's index.
if (!empty($context['current_board']))
echo '
<link rel="index" href="' . $scripturl . '?board=' . $context['current_board'] . '.0" />';
// We'll have to use the cookie to remember the header...
if ($context['user']['is_guest'])
$options['collapse_header'] = !empty($_COOKIE['upshrink']);
// Output any remaining HTML headers. (from mods, maybe?)
echo $context['html_headers'], '
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
var current_header = ', empty($options['collapse_header']) ? 'false' : 'true', ';
function shrinkHeader(mode)
{';
// Guests don't have theme options!!
if ($context['user']['is_guest'])
echo '
document.cookie = "upshrink=" + (mode ? 1 : 0);';
else
echo '
smf_setThemeOption("collapse_header", mode ? 1 : 0, null, "', $context['session_id'], '");';
echo '
document.getElementById("upshrink").src = smf_images_url + (mode ? "/upshrink2.gif" : "/upshrink.gif");
document.getElementById("upshrinkHeader").style.display = mode ? "none" : "";
current_header = mode;
}
// ]]></script>
</head>
<body>
<a name="top_t" id="top_t"></a>';
// Because of the way width/padding are calculated, we have to tell Internet Explorer 4 and 5 that the content should be 100% wide. (or else it will assume about 108%!)
echo '
<table align="center" border="0" cellpadding="0" cellspacing="0" width="100%" >
<tbody>
<tr><td align="left" width="170"', empty($settings['header_logo_url']) ? ' class="topbg_l"' : ' class="topbg_l2"', ' height="38"> </td><td colspan="2" align="left" class="topbg" valign="middle">
</td><td align="right" width="37" class="topbg_r" valign="top">
</td>
</tr> </tbody>
</table>
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tbody>
<tr>
<td width="15" class="area_l"><img src="', $settings['images_url'], '/area_blank.gif" border="0" alt="" /></td><td>
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="hd_border_l"><img src="', $settings['images_url'], '/hd_border_l.gif" border="0" alt="" /></td>
<td id="headerarea" align="center" width="100%" style="position: relative; padding: 0 0 0 0;">';
// The logo and the three info boxes.
echo '
<table cellspacing="0" cellpadding="0" border="0" align="center" width="100%" style="position: relative;">
<tr id="upshrinkHeader"', empty($options['collapse_header']) ? '' : ' style="display: none;" ', '>
<td valign="top">
<div>
<table width="100%"', empty($settings['header_logo_url']) ? ' class="headerbodies"' : ' class="headerbodies3"', ' cellpadding="0" cellspacing="5" border="0">
<tr><td width="10%"><!--blank--></td>
<td width="60%" valign="top" class="headertext" align="left" height="65" >
<div style="width: 100%; overflow: hidden;">
';
// This part is the logo and forum name. You should be able to change this to whatever you want...
if (empty($settings['header_logo_url']))
echo '
<div style="font-family: Georgia, sans-serif; font-size: 30px; padding: 5px 0 12px 90px; white-space: nowrap; float: left; background-image: url(images/header_bg_r.png;">', $context['forum_name'], '</div>
<div style="float: right; width: 80%;"><!-- blank --></div>';
else
echo '
<img src="', $settings['header_logo_url'], '" alt="', $context['forum_name'], '" border="0" />';
echo '
</div></td>';
if (!empty($context['user']['avatar']))
{
if(empty($settings['top_avatar_resize']))
{
$context['user']['avatar']['image'] = strtr($context['user']['avatar']['image'], array("class=\"avatar\"" => "class=\"avatar_t\""));
}
echo '<td valign="middle">', $context['user']['avatar']['image'], '</td>';
}
echo '
<td width="30%" class="headertext_r" valign="top" align="left" nowrap="nowrap">';
// If the user is logged in, display stuff like their name, new messages, etc.
if ($context['user']['is_logged'])
{
echo '
', $txt['hello_member'], ' <b>', $context['user']['name'], '</b>';
// Only tell them about their messages if they can read their messages!
if ($context['allow_pm'])
echo ', ', $txt[152], ' <a href="', $scripturl, '?action=pm">', $context['user']['messages'], ' ', $context['user']['messages'] != 1 ? $txt[153] : $txt[471], '</a>', $txt['newmessages4'], ' ', $context['user']['unread_messages'], ' ', $context['user']['unread_messages'] == 1 ? $txt['newmessages0'] : $txt['newmessages1'];
echo '.<br />';
// Is the forum in maintenance mode?
if ($context['in_maintenance'] && $context['user']['is_admin'])
echo '
<b>', $txt[616], '</b><br />';
// Are there any members waiting for approval?
if (!empty($context['unapproved_members']))
echo '
', $context['unapproved_members'] == 1 ? $txt['approve_thereis'] : $txt['approve_thereare'], ' <a href="', $scripturl, '?action=viewmembers;sa=browse;type=approve">', $context['unapproved_members'] == 1 ? $txt['approve_member'] : $context['unapproved_members'] . ' ' . $txt['approve_members'], '</a> ', $txt['approve_members_waiting'], '<br />';
// Show the total time logged in?
if (!empty($context['user']['total_time_logged_in']))
{
echo '
', $txt['totalTimeLogged1'];
// If days is just zero, don't bother to show it.
if ($context['user']['total_time_logged_in']['days'] > 0)
echo $context['user']['total_time_logged_in']['days'] . $txt['totalTimeLogged2'];
// Same with hours - only show it if it's above zero.
if ($context['user']['total_time_logged_in']['hours'] > 0)
echo $context['user']['total_time_logged_in']['hours'] . $txt['totalTimeLogged3'];
// But, let's always show minutes - Time wasted here: 0 minutes ;).
echo $context['user']['total_time_logged_in']['minutes'], $txt['totalTimeLogged4'], '<br />';
}
echo '
<a href="', $scripturl, '?action=unread">', $txt['unread_since_visit'], '</a><br />
<a href="', $scripturl, '?action=unreadreplies">', $txt['show_unread_replies'], '</a><br />';
}
// Otherwise they're a guest - so politely ask them to register or login.
else
{
echo '
', $txt['welcome_guest'], '<br />
<script language="JavaScript" type="text/javascript" src="', $settings['default_theme_url'], '/sha1.js"></script>
<form action="', $scripturl, '?action=login2" method="post" style="margin: 3px 1ex 1px 0; text-align: left;"', empty($context['disable_login_hashing']) ? ' onsubmit="hashLoginPassword(this, \'' . $context['session_id'] . '\');"' : '', '>
<input type="text" name="user" size="10" /> <input type="password" name="passwrd" size="10" />
<select name="cookielength">
<option value="60">', $txt['smf53'], '</option>
<option value="1440">', $txt['smf47'], '</option>
<option value="10080">', $txt['smf48'], '</option>
<option value="302400">', $txt['smf49'], '</option>
<option value="-1" selected="selected">', $txt['smf50'], '</option>
</select>
<input type="submit" value="', $txt[34], '" /><br />
', $txt['smf52'], '
<input type="hidden" name="hash_passwrd" value="" />
</form>';
}
echo '
</td></tr>
</table>
</div>
</td>
</tr>
</table>';
echo '
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="maintab_bgba" align="left" nowrap="nowrap">
<div style="width: 100%; overflow: auto;">';
// Show the menu here, according to the menu sub template.
template_menu();
echo '
</div></td><td class="maintab_bgb" align="right" width="25"><div><a href="#top_t" onclick="shrinkHeader(!current_header); return false;"><img id="upshrink" src="', $settings['images_url'], '/', empty($options['collapse_header']) ? 'upshrink.gif' : 'upshrink2.gif', '" alt="*" title="', $txt['upshrink_description'], '" style="margin: 2px 4px 2px 0;" border="0" /></a></div></td>
</tr>
</table>
<table width="100%" class="headerbodies2a" cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="headernews" height="24" width="95%" align="left"><!-- News -->';
if (!empty($settings['enable_news']))
echo '
<span style="text-transform: uppercase; font-weight: bold;">', $txt[102], '</span> : ', $context['random_news_line'] , ' ';
echo '
</td>
<td class="currenttime" width="5%" valign="top" nowrap="nowrap">', $context['current_time'] , '</td>
</tr>
</table>
<table width="100%" class="headerbodies2" cellpadding="0" cellspacing="0" border="0">
<tr>
<td valign="middle" align="left" style="padding: 8px 0px 8px 10px;" width="100%">', theme_linktree(), '</td>
<td valign="middle"><a href="', $scripturl, '?action=search;advanced" class="searchb" title="', $txt['smf298'], '"><img src="', $settings['images_url'], '/search2_f.gif" border="0" alt="', $txt['smf298'], '" /></a></td>
<td valign="middle" align="right" style="padding: 8px 10px 8px 0px;">
<form action="', $scripturl, '?action=search2" method="post" style="margin: 0; margin-top: 0px;">
<input type="text" name="search" value="', $txt[182], '..." onfocus="this.value = \'\';" onblur="if(this.value==\'\') this.value=\'', $txt[182], '...\';" style="width: 150px;" />';
// Search within current topic?
if (!empty($context['current_topic']))
echo '
<input type="hidden" name="topic" value="', $context['current_topic'], '" />';
// If we're on a certain board, limit it to this board ;).
elseif (!empty($context['current_board']))
echo '
<input type="hidden" name="brd[', $context['current_board'], ']" value="', $context['current_board'], '" />';
echo '
</form>
</td>
</tr>
</table>
<table width="100%" class="headerbodies2" cellpadding="0" cellspacing="0" border="0">
<tr><td class="hd_bottom_l" width="46px"></td><td class="hd_bottom" height="24"></td><td class="hd_bottom_r" width="46px"></td></tr></table>';
echo '
</td><td class="hd_border_r"><img src="', $settings['images_url'], '/hd_border_r.gif" border="0" alt="" /></td>
</tr>
</table>';
// The main content should go here. A table is used because IE 6 just can't handle a div.
echo '
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="hd_border_l" style="width: 8px; background-color: #000;"><!-- blank --></td>
<td class="main_area_tl" style="width: 16px;"><!-- tl --></td>
<td class="main_area_tc" height="3"><!-- tc --></td>
<td class="main_area_tr" style="width: 16px;"><!-- tr --></td>
<td class="hd_border_r" style="width: 8px; background-color: #000;"><!-- blank --></td></tr>
<tr>
<td class="hd_border_l" style="width: 8px;"><img src="', $settings['images_url'], '/hd_border_l.gif" border="0" alt="" /></td>
<td class="main_area_ml" style="width: 16px;" align="left" valign="top"><div class="main_area_tlf"><img src="', $settings['images_url'], '/main_area_t_blank.gif" border="0" alt="" /></div></td>
<td id="bodyarea" style="padding: 0px 1px 12px 1px;">';
if ($context['user']['is_admin'])
{
if (empty($settings['theme_version_attention']))
{
if ($forum_version != 'SMF 1.1 RC2')
echo '
<div style="margin: 2ex; padding: 2ex; border: 2px dashed #cc3344; color: black; background-color: #ffb76f;">
<div style="float: left; width: 2ex; font-size: 2em; color: red;">!!</div>
<b style="text-decoration: underline;">Attention of WOW-DK theme:</b><br />
<div style="padding-left: 6ex;">
This theme doesn\'t correspond to the version of SMF that you are using. This theme is made for SMF 1.1 RC2.
</div>
</div>';
}
if (empty($txt['necessary_to_translate']))
echo '
<div style="margin: 2ex; padding: 2ex; border: 2px dashed #cc3344; color: black; background-color: #e7e7f7;">
<div style="float: left; width: 2ex; font-size: 2em; color: red;">!!</div>
<b style="text-decoration: underline;">Attention of wow-dk theme:</b><br />
<div style="padding-left: 6ex;">
You should put "<b>Modifications.<span style="color: red;"><acronym title="Name of language that you are using">' , $language , '</acronym></span>.php</b>" on the "<b>languages</b>" directory ( <i>', $settings['theme_url'], '/languages/</i> ) in the theme of wow-dk.<br /><br />
Copy "<i>Modifications.english.php</i>" of the "languages" directory of wow-dk onto the first. Next, rename it according to the language for which you use the file.
</div>
</div>';
}
}
function template_main_below()
{
global $context, $settings, $options, $scripturl, $txt;
echo '</td>
<td class="main_area_mr" style="width: 16px;" align="left" valign="top"><div class="main_area_trf"><img src="', $settings['images_url'], '/main_area_t_blank.gif" border="0" alt="" /></div></td>
<td class="hd_border_r"><!-- blank --></td>
</tr>
<tr>
<td class="hd_border_l" style="width: 8px; background-color: #000;"><!-- blank --></td>
<td class="main_area_bl" style="width: 16px;"><!-- bl --></td>
<td class="main_area_bc" height="3"><!-- bc --></td>
<td class="main_area_br" style="width: 16px;"><!-- br --></td>
<td class="hd_border_r" style="width: 8px; background-color: #000;"><!-- blank --></td></tr>
</table>
<table style="text-align: center;" cellspacing="0" cellpadding="0" border="0" align="center" width="100%">
<tr>
<td class="hd_border_l" style="width: 8px;"><img src="', $settings['images_url'], '/hd_border_l.gif" border="0" alt="" /></td>
<td class="footer_area_tc" height="20" style="padding: 5px 0px 5px 0px;"> ';
// Show the load time?
if ($context['show_load_time'])
echo '
', $txt['smf301'], $context['load_time'], $txt['smf302'], $context['load_queries'], $txt['smf302b'], '';
echo '
<!-- area_tc --></td>
<td class="hd_border_r" style="width: 8px;"><img src="', $settings['images_url'], '/hd_border_r.gif" border="0" alt="" /></td></tr>
</table>';
// Show the "Powered by" and "Valid" logos, as well as the copyright. Remember, the copyright must be somewhere!
echo '
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
function smfFooterHighlight(element, value)
{
element.src = smf_images_url + "/" + (value ? "h_" : "") + element.id + ".gif";
}
// ]]></script>
<table id="footerarea" style="text-align: center;" cellspacing="0" cellpadding="0" border="0" align="center" width="100%">
<tr><td class="hd_border_l" style="width: 8px;"><img src="', $settings['images_url'], '/hd_border_l.gif" border="0" alt="" /></td>
<td width="28%" class="copyright_l" style="padding: 0 0 3px 0;" valign="bottom" align="', !$context['right_to_left'] ? 'right' : 'left', '" height="35" nowrap="nowrap"><div style="width: 100%; overflow: hidden;">
<a href="http://www.mysql.com/" target="_blank" title="', $txt['powered_by_mysql'], '"><img id="powered-mysql" src="', $settings['images_url'], '/powered-mysql.gif" alt="', $txt['powered_by_mysql'], '" width="30" height="18" style="margin: 0px 5px;" border="0" onmouseover="smfFooterHighlight(this, true);" onmouseout="smfFooterHighlight(this, false);" /></a>
<a href="http://www.php.net/" target="_blank" title="', $txt['powered_by_php'], '"><img id="powered-php" src="', $settings['images_url'], '/powered-php.gif" alt="', $txt['powered_by_php'], '" width="30" height="18" style="margin: 0px 5px;" border="0" onmouseover="smfFooterHighlight(this, true);" onmouseout="smfFooterHighlight(this, false);" /></a>
</div></td>
<td valign="bottom" align="center" nowrap="nowrap" style="padding: 0 15px 10px 12px;" class="copyright">
<span style="white-space: nowrap;">
', theme_copyright(), '</span>
</td>
<td width="28%" class="copyright_r" style="padding: 0 0 3px 0;" valign="bottom" align="', !$context['right_to_left'] ? 'left' : 'right', '" height="35" nowrap="nowrap"><div style="width: 100%; overflow: hidden;">
<a href="http://validator.w3.org/check/referer" target="_blank" title="', $txt['valid_xhtml'], '"><img id="valid-xhtml10" src="', $settings['images_url'], '/valid-xhtml10.gif" alt="', $txt['valid_xhtml'], '" width="30" height="18" style="margin: 0px 5px;" border="0" onmouseover="smfFooterHighlight(this, true);" onmouseout="smfFooterHighlight(this, false);" /></a>
<a href="http://jigsaw.w3.org/css-validator/check/referer" target="_blank" title="', $txt['valid_css'], '"><img id="valid-css" src="', $settings['images_url'], '/valid-css.gif" alt="', $txt['valid_css'], '" width="30" height="18" style="margin: 0px 5px;" border="0" onmouseover="smfFooterHighlight(this, true);" onmouseout="smfFooterHighlight(this, false);" /></a></div>
</td>
<td class="hd_border_r" style="width: 8px;"><img src="', $settings['images_url'], '/hd_border_r.gif" border="0" alt="" /></td>
</tr>
<tr><td class="hd_border_l" style="width: 8px;"><img src="', $settings['images_url'], '/hd_border_l.gif" border="0" alt="" /></td>
<td width="28%" class="copyright_l" style="padding: 0 0 3px 0;" valign="bottom" align="', !$context['right_to_left'] ? 'right' : 'left', '" height="35" nowrap="nowrap"><div style="width: 100%; overflow: hidden;">
<a href="http://padexx.de/" class="pdx_c" title="Author of the theme." target="_blank"><span style="white-space: nowrap;">WoW-DK Theme by padexx.</span></a></div>
</td>
<td valign="bottom" align="center" nowrap="nowrap" style="padding: 0 15px 10px 12px;" class="copyright">
<span class="smalltext" style="white-space: nowrap;">based on the popular</span>
</td>
<td width="28%" valign="bottom" align="center" style="padding: 3px 0 5px 0;" nowrap="nowrap" class="copyright_r"><div style="width: 100%; overflow: hidden;"><a href="http://bdc.s15.xrea.com/" class="bdc_c" title="Author of the base theme." target="_blank"><span style="white-space: nowrap;">Pn-Pn Theme by koni.</span></a></div>
</td>
<td class="hd_border_r" style="width: 8px;"><img src="', $settings['images_url'], '/hd_border_r.gif" border="0" alt="" /></td>
</tr>
</table></td>
<td width="15" class="area_r"><img src="', $settings['images_url'], '/area_blank.gif" border="0" alt="" /></td>
</tr>
</tbody>
</table>
<table align="center" border="0" cellpadding="0" cellspacing="0" width="100%" style="margin-bottom: 3px;">
<tbody>
<tr><td align="left" width="37" class="bottombg_l" height="25"> </td><td colspan="2" align="left" class="bottombg">
</td><td align="right" width="37" class="bottombg_r"> </td>
</tr> </tbody>
</table>';
// This is an interesting bug in Internet Explorer AND Safari. Rather annoying, it makes overflows just not tall enough.
if (($context['browser']['is_ie'] && !$context['browser']['is_ie4']) || $context['browser']['is_mac_ie'] || $context['browser']['is_safari'])
{
// The purpose of this code is to fix the height of overflow: auto div blocks, because IE can't figure it out for itself.
echo '
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[';
// Unfortunately, Safari does not have a "getComputedStyle" implementation yet, so we have to just do it to code...
if ($context['browser']['is_safari'])
echo '
window.addEventListener("load", smf_codeFix, false);
function smf_codeFix()
{
var codeFix = document.getElementsByTagName ? document.getElementsByTagName("div") : document.all.tags("div");
for (var i = 0; i < codeFix.length; i++)
{
if ((codeFix[i].className == "code" || codeFix[i].className == "post" || codeFix[i].className == "signature") && codeFix[i].offsetHeight < 20)
codeFix[i].style.height = (codeFix[i].offsetHeight + 20) + "px";
}
}';
else
{
echo '
var window_oldOnload = window.onload;
window.onload = smf_codeFix;
function smf_codeFix()
{
var codeFix = document.getElementsByTagName ? document.getElementsByTagName("div") : document.all.tags("div");
for (var i = codeFix.length - 1; i > 0; i--)
{
if (codeFix[i].currentStyle.overflow == "auto" && (codeFix[i].currentStyle.height == "" || codeFix[i].currentStyle.height == "auto") && (codeFix[i].scrollWidth > codeFix[i].clientWidth || codeFix[i].clientWidth == 0) && (codeFix[i].offsetHeight != 0 || codeFix[i].className == "code"))
codeFix[i].style.height = (codeFix[i].offsetHeight + 36) + "px";
}
if (window_oldOnload)
{
window_oldOnload();
window_oldOnload = null;
}
}';
}
echo '
// ]]></script>';
}
echo '
</body>
</html>';
}
// Show a linktree. This is that thing that shows "My Community | General Category | General Discussion"..
function theme_linktree()
{
global $context, $settings, $options;
// Folder style or inline? Inline has a smaller font.
echo '<span class="nav"', $settings['linktree_inline'] ? ' style="font-size: smaller;"' : '', '>';
// Each tree item has a URL and name. Some may have extra_before and extra_after.
foreach ($context['linktree'] as $link_num => $tree)
{
// Show the | | |-[] Folders.
if (!$settings['linktree_inline'])
{
if ($link_num > 0)
echo str_repeat('<img src="' . $settings['images_url'] . '/icons/linktree_main.gif" alt="| " border="0" />', $link_num - 1), '<img src="' . $settings['images_url'] . '/icons/linktree_side.gif" alt="|-" border="0" />';
echo '<img src="' . $settings['images_url'] . '/icons/folder_open.gif" alt="+" border="0" /> ';
}
// Show something before the link?
if (isset($tree['extra_before']))
echo $tree['extra_before'];
// Show the link, including a URL if it should have one.
echo '<b>', $settings['linktree_link'] && isset($tree['url']) ? '<a href="' . $tree['url'] . '" class="nav">' . $tree['name'] . '</a>' : $tree['name'], '</b>';
// Show something after the link...?
if (isset($tree['extra_after']))
echo $tree['extra_after'];
// Don't show a separator for the last one.
if ($link_num != count($context['linktree']) - 1)
echo $settings['linktree_inline'] ? ' | ' : '<br />';
}
echo '</span>';
}
// Show the menu up top. Something like [home] [help] [profile] [logout]...
function template_menu()
{
global $context, $settings, $options, $scripturl, $txt;
// Work out where we currently are.
$current_action = 'home';
if (in_array($context['current_action'], array('admin', 'ban', 'boardrecount', 'cleanperms', 'detailedversion', 'dumpdb', 'featuresettings', 'featuresettings2', 'findmember', 'maintain', 'manageattachments', 'manageboards', 'managecalendar', 'managesearch', 'membergroups', 'modlog', 'news', 'optimizetables', 'packageget', 'packages', 'permissions', 'pgdownload', 'postsettings', 'regcenter', 'repairboards', 'reports', 'serversettings', 'serversettings2', 'smileys', 'viewErrorLog', 'viewmembers')))
$current_action = 'admin';
if (in_array($context['current_action'], array('search', 'admin', 'calendar', 'profile', 'mlist', 'register', 'login', 'help', 'pm')))
$current_action = $context['current_action'];
if ($context['current_action'] == 'search2')
$current_action = 'search';
if ($context['current_action'] == 'theme')
$current_action = isset($_REQUEST['sa']) && $_REQUEST['sa'] == 'pick' ? 'profile' : 'admin';
// Are we using right-to-left orientation?
if ($context['right_to_left'])
{
$first = 'last';
$last = 'first';
}
else
{
$first = 'first';
$last = 'last';
}
// Show the start of the tab section.
echo '
<table cellpadding="0" cellspacing="0" border="0">
<tr>';
// Show the [home] button.
if (!empty($settings['wow_forum_button']))
echo '
<td class="maintab_off_first"> </td>
<td valign="top" class="maintab_off_back">
<a href="', $settings['wow_forum_button'], '">' , $txt[103] , '</a>
</td>
<td class="maintab_off_last"> </td>';
if (!empty($settings['wow_forum_button']))
{
// Show the [home] button.
echo ($current_action=='home' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '"> </td>' : '<td class="maintab_off_' . $first . '"> </td>' , '
<td valign="top" class="maintab_' , $current_action == 'home' ? 'active_back' : 'off_back' , '">
<a href="', $scripturl, '">' , $txt['wow_forum_button_forum'] , '</a>
</td>' , $current_action == 'home' ? '<td class="maintab_active_' . $last . '"> </td>' : '<td class="maintab_off_' . $last . '"> </td>';
}
else
{
// Show the [forum] button.
echo ($current_action=='home' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '"> </td>' : '<td class="maintab_off_' . $first . '"> </td>' , '
<td valign="top" class="maintab_' , $current_action == 'home' ? 'active_back' : 'off_back' , '">
<a href="', $scripturl, '">' , $txt[103] , '</a>
</td>' , $current_action == 'home' ? '<td class="maintab_active_' . $last . '"> </td>' : '<td class="maintab_off_' . $last . '"> </td>';
}
// Show the [help] button.
echo ($current_action == 'help' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '"> </td>' : '<td class="maintab_off_' . $first . '"> </td>' , '
<td valign="top" class="maintab_' , $current_action == 'help' ? 'active_back' : 'off_back' , '">
<a href="', $scripturl, '?action=help">' , $txt[119] , '</a>
</td>' , $current_action == 'help' ? '<td class="maintab_active_' . $last . '"> </td>' : '<td class="maintab_off_' . $last . '"> </td>';
// How about the [search] button?
if ($context['allow_search'])
echo ($current_action == 'search' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '"> </td>' : '<td class="maintab_off_' . $first . '"> </td>' , '
<td valign="top" class="maintab_' , $current_action == 'search' ? 'active_back' : 'off_back' , '">
<a href="', $scripturl, '?action=search">' , $txt[182] , '</a>
</td>' , $current_action == 'search' ? '<td class="maintab_active_' . $last . '"> </td>' : '<td class="maintab_off_' . $last . '"> </td>';
// Is the user allowed to administrate at all? ([admin])
if ($context['allow_admin'])
echo ($current_action == 'admin' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '"> </td>' : '<td class="maintab_off_' . $first . '"> </td>' , '
<td valign="top" class="maintab_' , $current_action == 'admin' ? 'active_back' : 'off_back' , '">
<a href="', $scripturl, '?action=admin">' , $txt[2] , '</a>
</td>' , $current_action == 'admin' ? '<td class="maintab_active_' . $last . '"> </td>' : '<td class="maintab_off_' . $last . '"> </td>';
// Edit Profile... [profile]
if ($context['allow_edit_profile'])
echo ($current_action == 'profile' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '"> </td>' : '<td class="maintab_off_' . $first . '"> </td>' , '
<td valign="top" class="maintab_' , $current_action == 'profile' ? 'active_back' : 'off_back' , '">
<a href="', $scripturl, '?action=profile">' , $txt[79] , '</a>
</td>' , $current_action == 'profile' ? '<td class="maintab_active_' . $last . '"> </td>' : '<td class="maintab_off_' . $last . '"> </td>';
// Go to PM center... [pm]
if ($context['user']['is_logged'] && $context['allow_pm'])
echo ($current_action == 'pm' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '"> </td>' : '<td class="maintab_off_' . $first . '"> </td>' , '
<td valign="top" class="maintab_' , $current_action == 'pm' ? 'active_back' : 'off_back' , '">
<a href="', $scripturl, '?action=pm"><span style="white-space: nowrap;">' , $txt['pm_short'] , ' ', $context['user']['unread_messages'] > 0 ? '[<strong>'. $context['user']['unread_messages'] . '</strong>]' : '' , '</span></a>
</td>' , $current_action == 'pm' ? '<td class="maintab_active_' . $last . '"> </td>' : '<td class="maintab_off_' . $last . '"> </td>';
// The [calendar]!
if ($context['allow_calendar'])
echo ($current_action == 'calendar' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '"> </td>' : '<td class="maintab_off_' . $first . '"> </td>' , '
<td valign="top" class="maintab_' , $current_action == 'calendar' ? 'active_back' : 'off_back' , '">
<a href="', $scripturl, '?action=calendar">' , $txt['calendar24'] , '</a>
</td>' , $current_action == 'calendar' ? '<td class="maintab_active_' . $last . '"> </td>' : '<td class="maintab_off_' . $last . '"> </td>';
// the [member] list button
if (!empty($settings['member_list_button']))
{
if($settings['member_list_button'])
{
if ($context['allow_memberlist'])
echo ($current_action == 'mlist' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '"> </td>' : '<td class="maintab_off_' . $first . '"> </td>' , '
<td valign="top" class="maintab_' , $current_action == 'mlist' ? 'active_back' : 'off_back' , '">
<a href="', $scripturl, '?action=mlist">' , $txt[331] , '</a>
</td>' , $current_action == 'mlist' ? '<td class="maintab_active_' . $last . '"> </td>' : '<td class="maintab_off_' . $last . '"> </td>';
}
}
// If the user is a guest, show [login] button.
if ($context['user']['is_guest'])
echo ($current_action == 'login' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '"> </td>' : '<td class="maintab_off_' . $first . '"> </td>' , '
<td valign="top" class="maintab_' , $current_action == 'login' ? 'active_back' : 'off_back' , '">
<a href="', $scripturl, '?action=login">' , $txt[34] , '</a>
</td>' , $current_action == 'login' ? '<td class="maintab_active_' . $last . '"> </td>' : '<td class="maintab_off_' . $last . '"> </td>';
// If the user is a guest, also show [register] button.
if ($context['user']['is_guest'])
echo ($current_action == 'register' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '"> </td>' : '<td class="maintab_off_' . $first . '"> </td>' , '
<td valign="top" class="maintab_' , $current_action == 'register' ? 'active_back' : 'off_back' , '">
<a href="', $scripturl, '?action=register">' , $txt[97] , '</a>
</td>' , $current_action == 'register' ? '<td class="maintab_active_' . $last . '"> </td>' : '<td class="maintab_off_' . $last . '"> </td>';
// Otherwise, they might want to [logout]...
if ($context['user']['is_logged'])
echo ($current_action == 'logout' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '"> </td>' : '<td class="maintab_off_' . $first . '"> </td>' , '
<td valign="top" class="maintab_' , $current_action == 'logout' ? 'active_back' : 'off_back' , '">
<a href="', $scripturl, '?action=logout;sesc=', $context['session_id'], '">' , $txt[108] , '</a>
</td>' , $current_action == 'logout' ? '<td class="maintab_active_' . $last . '"> </td>' : '<td class="maintab_off_' . $last . '"> </td>';
// The end of tab section.
echo '
</tr>
</table>';
}
// Generate a strip of buttons.
function template_button_strip($button_strip, $direction = 'top', $force_reset = false, $custom_td = '')
{
global $settings, $buttons, $context, $txt, $scripturl;
// Create the buttons...
foreach ($button_strip as $key => $value)
{
if (isset($value['test']) && empty($context[$value['test']]))
{
unset($button_strip[$key]);
continue;
}
elseif (!isset($buttons[$key]) || $force_reset)
$buttons[$key] = '<a href="' . $value['url'] . '" ' .( isset($value['custom']) ? $value['custom'] : '') . '>' . $txt[$value['text']] . '</a>';
$button_strip[$key] = $buttons[$key];
}
if (empty($button_strip))
return '<td> </td>';
echo '
<td class="', $direction == 'top' ? 'main' : 'mirror', 'tab_' , $context['right_to_left'] ? 'last' : 'first' , '"> </td>
<td class="', $direction == 'top' ? 'main' : 'mirror', 'tab_back">', implode(' | ', $button_strip) , '</td>
<td class="', $direction == 'top' ? 'main' : 'mirror', 'tab_' , $context['right_to_left'] ? 'first' : 'last' , '"> </td>';
}
?>
8: Undefined index: allow_view_stafflistThis is for
You should be able to download the rc3 version at smfhacks.com waiting for mod site to list smfr3 then i load them here.
Maybe the script just needs updated for RC3. Killed mine too. o hopefully we will have a RC3 compatible version of this soon. ;DBut it was deinstalled. How can that be that there is a rest of it making trouble? Sounds like the deinstallation doesn't work correct.
Is it possible to show avatars or images before the names? ::)Not currently. I might add that later.
// the [staff list] button
if ($context['allow_view_stafflist'])
echo ($current_action == 'staff' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '"> </td>' : '' , '
<td valign="top" class="maintab_' , $current_action == 'staff' ? 'active_back' : 'back' , '">
<a href="', $scripturl, '?action=staff">' , $txt['smfstaff_stafflist'] , '</a>
</td>' , $current_action == 'staff' ? '<td class="maintab_active_' . $last . '"> </td>' : '';
if ($context['allow_search'])
echo '
<a href="', $scripturl, '?action=search">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/search.gif" alt="' . $txt[182] . '" style="margin: 2px 0;" border="0" />' : $txt[182]), '</a>', $context['menu_separator'];
if ($context['allow_view_stafflist'])
echo '
<a href="', $scripturl, '?action=staff">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/search.gif" alt="Staff" style="margin: 2px 0;" border="0" />' : 'Staff'), '</a>', $context['menu_separator'];
I am trying to not have some groups displayed but it still displays some even with comma separation :(
how to install in proton theme?
thank you!
Added contact information for ICQ,AIM,YIM,MSN, PM
//Begin SMF Staff Page Text Strings
$txt['smfstaff_stafflist'] = 'Staff';
$txt['smfstaff_local'] = 'Moderadores Locais';
$txt['permissionname_view_stafflist'] = 'Visualizar a Lista do Staff';
$txt['permissionhelp_view_stafflist'] = 'A Lista do Staff mostra todos os membros do teu Staff. Podes alterar que grupo de membros são mostrados indo ao Opções do Layout e ver o filtro do SMF Staff. Esta permissão possibilita a escolha de quem pode ver a lista do staff.';
$txt['cannot_view_stafflist'] = 'Não podes ver a Lista do Staff.';
$txt['smfstaff_lastlogin'] = 'Última Actividade:';
$txt['smfstaff_forums'] = 'Foruns:';
$txt['smfstaff_dateregistered'] = 'Data de Registo:';
$txt['smfstaff_contact'] = 'Informações:';
$txt['smfstaff_sendpm'] = 'Enviar PM';
$txt['staff_filter'] = 'SMF Staff - Filtrar grupos na página do staff. <br />(separe cada grupo por uma <b>virgula</b>.)';
//Begin SMF Staff Page Text Strings
$txt['whoall_staff'] = 'A ver a página do <a href="' . $scripturl . '?action=staff">Staff</a>';
//END SMF Staff Page Text Strings
echo '<td class="windowbg"><a href="' . $scripturl . '?action=profile;u=' . $row2['ID_MEMBER'] . '"><font color="' . $data['color'] . '">' . $row2['realName'] . '</font></a></td>';
Working on a new improved Staff mod with some new features for SMF 1.1.1
if (in_array($context['current_action'], array(
Add inside'staff',
if ($context['allow_memberlist'])
echo ($current_action == 'mlist' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '"> </td>' : '' , '
<td valign="top" class="maintab_' , $current_action == 'mlist' ? 'active_back' : 'back' , '">
<a href="', $scripturl, '?action=mlist">' , $txt[331] , '</a>
</td>' , $current_action == 'mlist' ? '<td class="maintab_active_' . $last . '"> </td>' : '';
Add after // the [staff list] button
if ($context['allow_view_stafflist'])
echo ($current_action == 'staff' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '"> </td>' : '' , '
<td valign="top" class="maintab_' , $current_action == 'staff' ? 'active_back' : 'back' , '">
<a href="', $scripturl, '?action=staff">' , $txt['smfstaff_stafflist'] , '</a>
</td>' , $current_action == 'staff' ? '<td class="maintab_active_' . $last . '"> </td>' : '';
Error
SQL query:
CREATE TABLE IF NOT EXISTS `{$db_prefix}staff` (
ID_GROUP smallint( 5 ) unsigned NOT NULL ,
`roworder` mediumint( 8 ) unsigned NOT NULL default '0',
PRIMARY KEY ( `ID_GROUP` )
) REPLACE INTO {$db_prefix}settings
VALUES (
'smfstaff_showavatar', '0'
)
REPLACE INTO {$db_prefix}settings
VALUES (
'smfstaff_showlastactive', '1'
)
REPLACE INTO {$db_prefix}settings
VALUES (
'smfstaff_showdateregistered', '1'
)
REPLACE INTO {$db_prefix}settings
VALUES (
'smfstaff_showcontactinfo', '1'
)
REPLACE INTO {$db_prefix}settings
VALUES (
'smfstaff_showlocalmods', '1'
)
MySQL said: Documentation
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'INTO {$db_prefix}settings VALUES ('smfstaff_showavatar', '0')
REPLACE INTO {$db' at line 8
#1062 - Duplicate entry '0' for key 1
http://huongtinhyeu.net/avatars/http://www.vipcentury.net/Forums/images/avatars/520699210458a8b2166f2d.gif
plz help me.
For phpmyadmin you need replace {$db_prefix} with smf_ and you should each query one at a time.I just tried upgrading to 1.5, and have the same problem. Well, I'm getting this:
db_query(
"CREATE TABLE IF NOT EXISTS `kwjtlff1_staff` (ID_GROUP smallint(5) unsigned NOT NULL, `roworder` mediumint(8) unsigned NOT NULL default '0', PRIMARY KEY (`ID_GROUP`))", __FILE__, __LINE__
)
MySQL said: Documentation
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'db_query("CREATE TABLE IF NOT EXISTS `kwjtlff1_staff`
(ID_GROUP
??? CREATE TABLE IF NOT EXISTS `kwjtlff1_staff` (ID_GROUP smallint(5) unsigned NOT NULL, `roworder` mediumint(8) unsigned NOT NULL default '0', PRIMARY KEY (`ID_GROUP`))
I'm using smf 1.1.1 and lastest Staff page mod but it doesn't display avatar of Super Mod or admin who have remote avatar. When i view html source, it is below:Fixed.Code: [Select]http://huongtinhyeu.net/avatars/http://www.vipcentury.net/Forums/images/avatars/520699210458a8b2166f2d.gif
plz help me.
Incorrect table name ''
File: /home/szen/public_html/smf/Packages/temp/staffsql.php
Line: 9
Table 'szen_jos.smf_staff' doesn't exist
File: /home/szen/public_html/smf/Sources/Staff.php
Line: 59
Hmm, clicking on my forum's button for "Staff List" just takes it back to the homepage?That means the mod did not install.
I have the staff list set to be viewed by guests and members.
http://forums.buhaychat.com
UseCool. That worked and created the table.Code: [Select]CREATE TABLE IF NOT EXISTS `kwjtlff1_staff` (ID_GROUP smallint(5) unsigned NOT NULL, `roworder` mediumint(8) unsigned NOT NULL default '0', PRIMARY KEY (`ID_GROUP`))
Whats the link look like for the staf configuration?The link is shown in the screen shot. It's the "Staff Configuration" right in the center...
And also try to reupload Staff.php to the sources folder.
It should work with other themes. Not using anything really theme dependent. Just using the standard styles for catbg and windowbg.
If it doesn't look right you can try to chagne class= to the class that wish to use in Staff.template.php
vbgamer, I've been given the option to switch to the one server on my host that has MySQL and PHP 5 until they decide to roll out the change on all boxes, for which they don't have a set date. Argh.
Do you think this will fix my issue? I am having it with every single one of your mods, and it's all the mods I want to use, lol.
:/
I don't want to bother switching if it's pointless.
What version of the Staff mod do you have installed? Do you have the latest one installed.
You just need to edit the index.template.php of your custom theme and include a link to the staff page
http://www.yoursite.com/index.php?act=staff
<?php
// Try to handle it with the upper level index.php. (it should know what to do.)
if (file_exists(dirname(dirname(__FILE__)) . '/index.php'))
include (dirname(dirname(__FILE__)) . '/index.php');
else
exit;
?>
Hi. I get a red x, where the staff's photos are supposed to be, also the staff have URL avatars... so how can I fix the red x problem?
That's all it does to that file.
<code>staffsql.php</code>
http://www.radicalreaction.com/forum/staffsql.php
Fatal error: Call to undefined function: db_query() in /customersites/7/home/httpd/vhosts/radicalreaction.com/httpdocs/forum/staffsql.php on line 6
db_query("CREATE TABLE IF NOT EXISTS `{$db_prefix}staff`
Warning: main(ssi.php): failed to open stream: No such file or directory in /customersites/7/home/httpd/vhosts/radicalreaction.com/httpdocs/forum/staffsql.php on line 3
Warning: main(ssi.php): failed to open stream: No such file or directory in /customersites/7/home/httpd/vhosts/radicalreaction.com/httpdocs/forum/staffsql.php on line 3
Fatal error: main(): Failed opening required 'ssi.php' (include_path='.:/usr/share/pear') in /customersites/7/home/httpd/vhosts/radicalreaction.com/httpdocs/forum/staffsql.php on line 3
// the [staff list] button
if ($context['allow_view_stafflist'])
echo ($current_action == 'staff' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '"> </td>' : '' , '
<td valign="top" class="maintab_' , $current_action == 'staff' ? 'active_back' : 'back' , '">
<a href="', $scripturl, '?action=staff">' , $txt['smfstaff_stafflist'] , '</a>
</td>' , $current_action == 'staff' ? '<td class="maintab_active_' . $last . '"> </td>' : '';
// Show the menu up top. Something like [home] [help] [profile] [logout]...
function template_menu()
{
global $context, $settings, $options, $scripturl, $txt;
// Work out where we currently are.
$current_action = 'home';
if (in_array($context['current_action'], array('admin', 'ban', 'boardrecount', 'cleanperms', 'detailedversion', 'dumpdb', 'featuresettings', 'featuresettings2', 'findmember', 'maintain', 'manageattachments', 'manageboards', 'managecalendar', 'managesearch', 'membergroups', 'modlog', 'news', 'optimizetables', 'packageget', 'packages', 'permissions', 'pgdownload', 'postsettings', 'regcenter', 'repairboards', 'reports', 'serversettings', 'serversettings2', 'smileys', 'viewErrorLog', 'viewmembers')))
$current_action = 'admin';
if (in_array($context['current_action'], array('staff','search', 'admin', 'calendar', 'profile', 'mlist', 'register', 'login', 'help', 'pm')))
$current_action = $context['current_action'];
if ($context['current_action'] == 'search2')
$current_action = 'search';
if ($context['current_action'] == 'theme')
$current_action = isset($_REQUEST['sa']) && $_REQUEST['sa'] == 'pick' ? 'profile' : 'admin';
if (in_array($context['current_action'], array('staff','search', 'admin', 'calendar', 'profile', 'mlist', 'register', 'login', 'help', 'pm')))
Hi. I get a red x, where the staff's photos are supposed to be, also the staff have URL avatars... so how can I fix the red x problem?
anyone?
can anyone help me with this problem?
try changing it to SSI.php
Database Error
Please try again. If you come back to this error screen, report the error to an administrator.
Hi. I get a red x, where the staff's photos are supposed to be, also the staff have URL avatars... so how can I fix the red x problem?
anyone?
can anyone help me with this problem?
echo '<img src="' . $modSettings['avatar_url']. '/' . $user_profile[$memCommID]['avatar'] .'" />';
Incorrect table name ''
File: /customersites/7/home/httpd/vhosts/radicalreaction.com/httpdocs/forum/staffsql.php
Line: 12
//Create the Staff Table
db_query("CREATE TABLE IF NOT EXISTS `{$db_prefix}staff`
(ID_GROUP smallint(5) unsigned NOT NULL,
`roworder` mediumint( 8 ) unsigned NOT NULL default '0',
PRIMARY KEY (`ID_GROUP`))", __FILE__, __LINE__);
`
And replace with nothing then save the file.Im having some problems with this great mod, I installed it with succes and the problem is that I cant see the STAFF link, I read most pages and saw the copy from modifications.english to bla bla but my problem is that I cant even see them in english -.- I mean I dont think its modifiying Modifications.english.php correctly as I have a blank space at this mod config and cant see the link in any language.
Thanks and congrats on a great mod.
<?php
// Version: 1.1; Modifications
// Begin stickyFirstPost entries
$txt['non_sticky_topics'] = "Regular topics";
$txt['sticky_topics'] = "Sticky topics";
// End stickyFirstPost entries
// Country Flag mod
$txt['country_flag_label'] = 'Please select your country';
$txt['country_flag_error_required'] = 'You must select the country that you visit us from';
$txt['country_flag_ask'] = 'Ask for country flag on';
$txt['country_flag_disabled'] = 'Don\'t show (Disabled)';
$txt['country_flag_profile'] = 'Profile';
$txt['country_flag_registration'] = 'Registration';
$txt['country_flag_both'] = 'Both';
$txt['country_flag_required'] = 'Require a member to select a location?';
$txt['country_flag_show'] = 'Show flags on Display page (Where posts are shown).';
$txt['country_flag'] = 'Country';
$txt['uot_users_online_today']='Users Logged In Today';
$txt['uot_yesterday']='Yesterday at ';
$txt['uot_total']='Total';
$txt['uot_visible']='Visible';
$txt['uot_hidden']='Hidden';
// [Who Voted What?]
$txt['poll_view_voters_expand_to_view'] = 'Expand to view:';
$txt['poll_view_voters_expanded_help1'] = 'Select a name to view';
$txt['poll_view_voters_expanded_help2'] = 'the member\'s profile...';
$txt['cannot_poll_view_voters'] = 'Sorry, you\'re not allowed to view which members voted for what option in the poll.';
$txt['permissionname_poll_view_voters'] = 'View voters';
$txt['permissionhelp_poll_view_voters'] = 'This permission allows people to see which members voted for what option in a poll.';
$txt['whovotedwhatMode'] = 'Who Voted What? mode';
$txt['whovotedwhatMode0'] = 'Select Box';
$txt['whovotedwhatMode1'] = 'Table View';
$txt['activeMembers_title'] = 'Active members:';
$txt['arcade'] = 'Arcade';
$txt['arcade_admin'] = 'Arcade Admin';
$txt['arcade_manage_games'] = 'Games';
$txt['arcade_manage_category'] = 'Categories';
$txt['arcade_settings'] = 'Settings';
// Permission names and help
$txt['permissiongroup_arcade'] = 'Arcade';
$txt['permissionname_arcade_view'] = 'View Arcade';
$txt['permissionhelp_arcade_view'] = 'May access Arcade and use basic features like search and view highscores';
$txt['permissionname_arcade_play'] = 'Play on Arcade';
$txt['permissionhelp_arcade_play'] = 'Allows member to play on arcade, in games which he/she has rights to';
$txt['permissionname_arcade_admin'] = 'Administrate arcade';
$txt['permissionhelp_arcade_admin'] = 'Arcade Administarator can Install/Edit/Delete game, Delete scores and edit settings for arcade';
$txt['permissionname_arcade_view'] = 'View Arcade';
$txt['permissionhelp_arcade_view'] = 'May access Arcade and use basic features like search and view highscores';
$txt['permissionname_arcade_favorite'] = 'Use Favorites feature';
$txt['permissionhelp_arcade_favorite'] = 'Allows member to favorite and unfavorite games';
$txt['permissionname_arcade_submit'] = 'Save scores';
$txt['permissionhelp_arcade_submit'] = 'Allows users to save their scores.';
$txt['permissionname_arcade_rate'] = 'Rate games';
$txt['permissionhelp_arcade_rate'] = 'Allows users to rate games.';
$txt['permissionname_arcade_comment'] = 'Allow to comment/edit comment';
$txt['permissionhelp_arcade_comment'] = 'Allows user to edit comments, own or any';
$txt['permissionname_arcade_comment_any'] = 'Any';
$txt['permissionname_arcade_comment_own'] = 'Own';
// Errors if they can't do something
$txt['cannot_arcade_play'] = 'You are not allowed to play games!';
$txt['cannot_arcade_view'] = 'You are not allowed to access arcade.';
$txt['cannot_arcade_favorite'] = 'You are not allowed to favorite games';
$txt['cannot_arcade_rate'] = 'You are not allowed to rate games';
$txt['cannot_arcade_comment_own'] = 'You are not allowed to comment';
// Who's online
$txt['who_arcade'] = 'Viewing Arcade index';
$txt['who_arcade_play'] = 'Playing <a href="' . $scripturl . '?action=arcade;sa=play;game=%d">%s</a> on Arcade';
$txt['who_arcade_highscore'] = 'Viewing highscores of <a href="' . $scripturl . '?action=arcade;sa=play;game=%d">%s</a> on Arcade';
// Help
$txt['arcade_max_scores_help'] = 'Maximum scores that will be stored per member. (0 means unlimited)';
$txt['arcade_membergroups_help'] = 'These groups will be allowed to play and view highscores. Others will not see this game, only used if permission mode will use game permissions.';?>
Im using the default theme but with another color.
?>
?>
Can you please paste the lines Im missing so I add them??
And Im picky 2 ^^ Good picky tip :P
thanks TrueSatan .... u r telling that i should go for manual installation of this mod
anywayes how should i update my forum version( from SMF1.1RC3 to SMF1.1.2)
already i have many features in my SMF1.1RC3
every thing i need to keep impact just want to update the version
any links , tutorials plz
Is it possible to exclude 2 moderators from having the 'Send PM' button there on the list?No
Open up staffsql.phpSorry folks, but this help doesn´t work for me....
Find AllCode: [Select]`
And replace with nothing then save the file.
Incorrect table name ''
file: /home/*****/public_html/forum/Packages/temp/staffsql.php
Line: 9
// 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>';
See ACP>Members>Permissions From there you can modify the permissions for each group so that they can see the staff list.
if($manage_staff)
echo '<td class="windowbg"><a href="' . $scripturl . '?action=staff;sa=catdown;id=' . $data['id'] . '">' . $txt['smfstaff_down'] . '</a> <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>
<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>';
}
$firstid = $context['smfstaff_users'][$data['id']]['ID_MEMBER'][0];
foreach (@$context['smfstaff_users'][$data['id']] as $id => $row2)
{
//if ($row2['ID_GROUP'] != $data['id'])
//continue;
// The [staff] button
if ($context['allow_memberlist'])
echo ($current_action == 'staff' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '"> </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 . '"> </td>' : '';
SMF Staff Page|^|staff.zip|^|vbgamer45:SMFStaff|^|1.5.1
What type of editor are you using to search for the code in the files. ??? Are you using notepad.
//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.';
// Go to PM center... [pm]
if ($context['user']['is_logged'] && $context['allow_pm'])
echo'
<td align="center" class="menubg' , $current_action == 'pm' ? '2' : '' , '">
<a href="', $scripturl, '?action=pm">' , $txt['pm_short'] , ' ', $context['user']['unread_messages'] > 0 ? '[<strong>'. $context['user']['unread_messages'] . '</strong>]' : '' , '</a>
</td>';
We can help you to add the new staff page to the header.Tha main informations about modifications index.template.php are in the staff.xml file, into the package.
To create a new button you find in the staff.xml file the way you may add new button in the default theme, not in customized themes.
If you open the index.template.php of your current theme, copy and paste here any block code like this (I use Dilber Mc):Code: [Select]// Go to PM center... [pm]
We can help you to add the new staff page to the header.
if ($context['user']['is_logged'] && $context['allow_pm'])
echo'
<td align="center" class="menubg' , $current_action == 'pm' ? '2' : '' , '">
<a href="', $scripturl, '?action=pm">' , $txt['pm_short'] , ' ', $context['user']['unread_messages'] > 0 ? '[<strong>'. $context['user']['unread_messages'] . '</strong>]' : '' , '</a>
</td>';
Any theme has it's own kind of style.
check to see that Staff.template.php is in place
You will need to go through the mod creating new copies of all the theme files it uses and adding them to your custom theme:Oi.
Staff.template.php
Staff.english.php
Staff.english-utf8.php
You will need to work on any existing Who.english.php, index.template.php in your custom theme to add the edits the mod uses and if there are no such files may need to copy them in from your SMF default theme (your forum should use the files from the default theme if no files of the same names are in your custom theme but on some hosting it may be necessary to copy them to your custom theme.)
You will need to go through the mod creating new copies of all the theme files it uses and adding them to your custom theme:Okay... I've read that last bit a few times, and maybe it's been a long day, but I'm having trouble making sense of it.
Staff.template.php
Staff.english.php
Staff.english-utf8.php
You will need to work on any existing Who.english.php, index.template.php in your custom theme to add the edits the mod uses and if there are no such files may need to copy them in from your SMF default theme (your forum should use the files from the default theme if no files of the same names are in your custom theme but on some hosting it may be necessary to copy them to your custom theme.)
Check under admin -> Server Settings and make sure the language is set to english and not english utf8Yep. It's under English. Don't have English utf8 as an option.
Correct they will always appear lastSo this means you see the admin and global mod, than some special user groups as my beta testers for the game..and the more important group will be always the last,
Yes you would need to add a link/button for the staff page. I do include a button that can be used for balyon but you would need to modify the index.template.php for that theme.
Duplicate entry '53-view_stafflist' for key 1
File: /home/user/web/forum/Sources/ManagePermissions.php
Line: 1216
Yes you would need to modify the code though.Yep, i thought so ;) but how ?
I'd use it, but I'd wish it would work with other themes!
<file name="$languagedir/Modifications.brazilian.php">
<operation error="ignore">
<search position="after"><![CDATA[
?>]]></search>
<add><![CDATA[
//Begin SMF Staff Page Text Strings
$txt['smfstaff_stafflist'] = 'Staff';
$txt['smfstaff_admin'] = 'Configurações da Staff';
$txt['permissionname_view_stafflist'] = 'Ver a lista da Staff';
$txt['permissionhelp_view_stafflist'] = 'Mostra todos os membros em sua Staff. Você pode alterar quais os grupos de membros a serem mostrados indo em "Layout e Opções" e procurar pela "Lista SMF Staff". Esta permissão o permite ver a lista dos membros da Staff.';
$txt['cannot_view_stafflist'] = 'Você não pode ver a lista da Staff.';
]]></add>
</operation>
</file>
<file name="$languagedir/Modifications.portuguese.php">
<operation error="ignore">
<search position="after"><![CDATA[
?>]]></search>
<add><![CDATA[
//Begin SMF Staff Page Text Strings
$txt['smfstaff_stafflist'] = 'Staff';
$txt['smfstaff_admin'] = 'Configurações da Staff';
$txt['permissionname_view_stafflist'] = 'Ver a lista da Staff';
$txt['permissionhelp_view_stafflist'] = 'Mostra todos os membros em sua Staff. Você pode alterar quais os grupos de membros a serem mostrados indo em "Layout e Opções" e procurar pela "Lista SMF Staff". Esta permissão o permite ver a lista dos membros da Staff.';
$txt['cannot_view_stafflist'] = 'Você não pode ver a lista da Staff..';
]]></add>
</operation>
</file>
<file name="$languagedir/Who.brazilian.php">
<operation error="ignore">
<search position="after"><![CDATA[
?>]]></search>
<add><![CDATA[
// Begin SMF Staff Page Text Strings
$txt['whoall_staff'] = 'Vendo os membros da <a href="' . $scripturl . '?action=staff">Staff</a>';
// END SMF Staff Page Text Strings
]]></add>
</operation>
</file>
<file name="$languagedir/Who.portuguese.php">
<operation error="ignore">
<search position="after"><![CDATA[
?>]]></search>
<add><![CDATA[
// Begin SMF Staff Page Text Strings
$txt['whoall_staff'] = 'Vendo os membros da <a href="' . $scripturl . '?action=staff">Staff</a>';
// END SMF Staff Page Text Strings
]]></add>
</operation>
</file>
//Staff text strings
$txt['smfstaff_local'] = 'Moderador Local';
$txt['smfstaff_lastactive'] = 'Último Acesso:';
$txt['smfstaff_forums'] = 'Fórums:';
$txt['smfstaff_dateregistered'] = 'Data de Registro:';
$txt['smfstaff_contact'] = 'Informações de Contato:';
$txt['smfstaff_sendpm'] = 'Enviar MP';
$txt['smfstaff_avatar'] = 'Avatar';
$txt['smfstaff_options'] = 'Opções';
$txt['smfstaff_nocatabove'] = 'Não há nenhum grupo acima do atual.';
$txt['smfstaff_nocatbelow'] = 'Não há nenhum grupo abaixo do atual.';
$txt['smfstaff_errgroupexists'] = 'Esse grupo sempre está na lista da Staff.';
$txt['smfstaff_staffsetting'] = 'Configurações da Staff';
$txt['smfstaff_showavatar'] = 'Mostrar Avatar';
$txt['smfstaff_showlastactive'] = 'Mostrar Último Acesso';
$txt['smfstaff_showdateregistered'] = 'Mostrar Data de Registro';
$txt['smfstaff_showcontactinfo'] = 'Mostar Informações de Contato';
$txt['smfstaff_showlocalmods'] = 'Mostrar Locais de Moderação';
$txt['smfstaff_groupstoshow'] = 'Grupos para mostrar na Página da Staff:';
$txt['smfstaff_groupstoadd'] = 'Grupos para adicionar na Página da Staff:';
$txt['smfstaff_addgroup'] = 'Adicionar Grupo';
$txt['smfstaff_delgroup'] = 'Remover Grupo';
$txt['smfstaff_up'] = 'Acima';
$txt['smfstaff_down'] = 'Abaixo';
$txt['smfstaff_savesettings'] = 'Gravar Alterações';
// The [staff] button.
if ($context['allow_view_stafflist'])
echo ($current_action == 'staff' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '"> </td>' : '' , '
<td valign="top" class="maintab_' , $current_action == 'staff' ? 'active_back' : 'back' , '">
<a href="', $scripturl, '?action=staff">Staff List</a>
</td>' , $current_action == 'staff' ? '<td class="maintab_active_' . $last . '"> </td>' : '';
// Otherwise, they might want to [logout]...
// The [staff] button.
if ($context['allow_view_stafflist'])
echo ($current_action == 'staff' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '"> </td>' : '' , '
<td valign="top" class="maintab_' , $current_action == 'staff' ? 'active_back' : 'back' , '">
<a href="', $scripturl, '?action=staff">Staff List</a>
</td>' , $current_action == 'staff' ? '<td class="maintab_active_' . $last . '"> </td>' : '';
$current_action = 'admin'; if (in_array($context['current_action'], array(
Any help will be appriciatedWhat theme are you using. ???
:D wow thank you so much in advance ccbtimewiz
also i installed the theme "banlist" by SiNaN but same with this its not showing because i need a tab inorder to show it, if you dont mind and if its not too much trouble can you also add a tab for "banlist" thank so much really and btw this is the link for the banlist theme http://custom.simplemachines.org/mods/index.php?mod=1198
when i uploaded that this is what it showing
Template Parse Error!
It seems something has gone sour on the forum with the template system. This problem should only be temporary, so please come back later and try again. If you continue to see this message, please contact the administrator.
You can also try refreshing this page.
Find: [Select]
$current_action = 'admin'; if (in_array($context['current_action'], array(
Add After: [Select]
'staff',
Hi,
we are using this mods for a long time and we are happy to have it.
Today we moved the button "Staff List" out of the link list from the top of the forum to the bottom, cause our Linklist was running out of space.
Now we got the idea to show the staff list in a new window, but without the links. What have I to do to realize it?
Thanks in advance for your help. :)
Hi,
we are using this mods for a long time and we are happy to have it.
Today we moved the button "Staff List" out of the link list from the top of the forum to the bottom, cause our Linklist was running out of space.
Now we got the idea to show the staff list in a new window, but without the links. What have I to do to realize it?
Thanks in advance for your help. :)
You could try using the target="_blank" attribute.
Hello,
I need help.
My staff list is not looking to good..
Is there a way..that you could give me the right codes, or give me a new file to make the staff look a bit more like this?
http://img210.imageshack.us/img210/7292/staffzq7.jpg
$current_action = 'admin'; if (in_array($context['current_action'], array(
'staff',
if ($context['allow_view_stafflist'])
echo'
<li><a href="index.php?action=staff">' , $txt['smfstaff_stafflist'] , '</a></li>
Right Mouse the link to Send PM. Click properties.
It should tell what image is supposed to be there, and where image should be located.
Go look where it says, and make sure the PM image is there.
// Send PM row
echo '<a href="' . $scripturl . '?action=pm;sa=send;u=' . $row2['ID_MEMBER'] . '">' . $txt['smfstaff_sendpm'] . '</a>';
// Send PM row
echo '<a href="' . $scripturl . '?action=pm;sa=send;u=' . $row2['ID_MEMBER'] . '"><img src="' . $settings['images_url'] . '/im_off.gif" alt="' . $txt['smfstaff_sendpm'] . '" /></a>';
Added support for SMF 2.0!
This is a really nice addition, however I can only get it to display for the Administrator. Any other user or moderator who logs on cannot see it. I am running a fresh install of 1.1.7.
Thanks,
Murray
http://setitoffcreations.com/index.php?action=viewErrorLog;desc
Apply Filter: Only show the errors with the same message
8: Undefined index: smfstaff_admin
File: /home/setitoff/public_html/Sources/Subs.php
Line: 2757
8: Undefined index: smfstaff_stafflist
File: /home/setitoff/public_html/Themes/default/Admin.template.php (main_above sub template - eval?)
Line: 619
An appropriate representation of the requested resource /index.php could not be found on this server.
This is a really nice addition, however I can only get it to display for the Administrator. Any other user or moderator who logs on cannot see it. I am running a fresh install of 1.1.7.
Thanks,
Murray
If I remember correctly CPO, you need to set the permissions in Admin CP.
Groups to add on Staff Page:
Designer Add Group
Site Police Add Group
Webmaster Add Group
yes the list of the mombergroups u can normally click the check boxes and hit save but i get a 501 error cause my host blocks any 775 or 777 chmod edits. so I need to manually go to the database and add those membergroups and I was asking how to do so.I have fix for you!
http://XXXXXXX/index.php?action=admin;area=staff;sa=adminset;d0f5b2190=4a590ddbf7e9ebd86a2624558fcb8674
8: Undefined index: description
File: /home/XXXXXXX/public_html/cache/lang_Staff_english_default.php (generic_menu_dropdown_above sub template - eval?)
Line: 278
http://XXXXXXXX/index.php?action=helpadmin;help=titlesEnable
8: Undefined index: usercp
File: /home/XXXXXXXXX/public_html/Sources/Subs.php
Line: 3815
Check out this post
www.simplemachines.org/community/index.php?topic=34270
If that does not work I can give code that you can change.
;id=
Replace all with&id=
// Swedish translation by djkmmo
$txt['smfstaff_stafflist'] = 'Personal';
$txt['smfstaff_admin'] = 'Personalkonfiguration';
$txt['permissionname_view_stafflist'] = 'Visa personallista';
$txt['permissionhelp_view_stafflist'] = 'Personallistan visar all din personal på forumet. Du kan anpassa vilka grupper som visas i "Layout and Options" och titta efter SMF-personal-filtret. Med denna inställning kan du ställa in vilka som kan se personallistan.';
$txt['cannot_view_stafflist'] = 'Du har inte rättighet att se personallistan.';
// Swedish translation by djkmmo
$txt['whoall_staff'] = 'Tittar på <a href="' . $scripturl . '?action=staff">Personallistan</a>';
Anyone know if it would be possible to add the staff members location to the list? We have a amsoil dealers network forum and we'd like to have customers be able to find the dealer closest to them. I would think that would be pretty easy but I have learned to not assume. lol
Thanks,
~Joe
// Did they select a flag?
if(isset($message['member']['options']['country']) && !empty($modSettings['country_flag_show']) && !empty($message['member']['options']['country']))
{
$flags = CountryFlag();
echo '
<img src="', $settings['default_theme_url'], '/images/flags/', $message['member']['options']['country'], '.png" alt="', $flags[$message['member']['options']['country']], '" align="absmiddle" /><br />';
}
Possible for SMF 2.0 but not SMF 1.1.x
Updated to work on SMF 2.0 RC2the description page say only RC1.2...
FixedUpdated to work on SMF 2.0 RC2the description page say only RC1.2...
http://edit.yahoo.com/config/send_webmesg?.target=yahoousername
to ymsgr:sendIM?yahoousername
for the Contact Information?
Works for SMF 2.0.x, 1.1.x and 1.0.x
<file name="$languagedir/Modifications.portuguese_pt.php" error="skip">
<operation error="ignore">
<search position="after"><![CDATA[
?>]]></search>
<add><![CDATA[
// Begin SMF Staff Page Text Strings
$txt['smfstaff_stafflist'] = 'Lista do Funcionários';
$txt['smfstaff_admin'] = 'Configuração dos Funcionários';
$txt['permissionname_view_stafflist'] = 'Ver Lista dos Funcionários';
$txt['permissionhelp_view_stafflist'] = 'Staff List mostra todos os membros de sua equipe. Você pode alterar qual membro grupos são mostrados indo para layout e Opções e procure SMF Funcionários filtro. Esta autorização permite que você alterne quem pode ver a lista de funcionários.';
$txt['cannot_view_stafflist'] = 'Você não pode ver a lista de funcionários.';
]]></add>
</operation>
</file>
<file name="$languagedir/Modifications.portuguese_pt-utf8.php" error="skip">
<operation error="ignore">
<search position="after"><![CDATA[
?>]]></search>
<add><![CDATA[
// Begin SMF Staff Page Text Strings
$txt['smfstaff_stafflist'] = 'Lista do Funcionários';
$txt['smfstaff_admin'] = 'Configuração dos Funcionários';
$txt['permissionname_view_stafflist'] = 'Ver Lista dos Funcionários';
$txt['permissionhelp_view_stafflist'] = 'Staff List mostra todos os membros de sua equipe. Você pode alterar qual membro grupos são mostrados indo para layout e Opções e procure SMF Funcionários filtro. Esta autorização permite que você alterne quem pode ver a lista de funcionários.';
$txt['cannot_view_stafflist'] = 'Você não pode ver a lista de funcionários.';
]]></add>
</operation>
</file>
<file name="$languagedir/Who.portuguese_pt.php" error="skip">
<operation error="ignore">
<search position="after"><![CDATA[
?>]]></search>
<add><![CDATA[
// Begin SMF Staff Page Text Strings
$txt['whoall_staff'] = 'Vendo a Página dos <a href="' . $scripturl . '?action=staff">Funcionários</a>';
// END SMF Staff Page Text Strings
]]></add>
</operation>
</file>
<file name="$languagedir/Who.portuguese_pt-utf8.php" error="skip">
<operation error="ignore">
<search position="after"><![CDATA[
?>]]></search>
<add><![CDATA[
// Begin SMF Staff Page Text Strings
$txt['whoall_staff'] = 'Vendo a Página dos <a href="' . $scripturl . '?action=staff">Funcionários</a>';
// END SMF Staff Page Text Strings
]]></add>
</operation>
</file>
if ($modSettings['smfstaff_showavatar'])
{
echo '<td class="windowbg">';
// Display the users avatar
$memCommID = $row2['ID_MEMBER'];
loadMemberData($memCommID);
loadMemberContext($memCommID);
echo $memberContext[$memCommID]['avatar']['image'];
echo '</td>';
}
Although a great mod, I ended up making my own staff page using SSI functions:
http://biology-forums.com/index.php?action=staff
One thing that would make me revert back however, if there was a possibility to resize the avatars.
Although a great mod, I ended up making my own staff page using SSI functions:
http://biology-forums.com/index.php?action=staff
One thing that would make me revert back however, if there was a possibility to resize the avatars.
I love what you've done with it. Really organized and clean. Won't you share with us all?! ;D
I could definitely use that on my site.
<?php
/*
SMF Staff
Version 1.6
by:vbgamer45
http://www.smfhacks.com
*/
//Staff text strings
$txt['smfstaff_local'] = 'Moderadores Locais';
$txt['smfstaff_lastactive'] = 'Última atividade:';
$txt['smfstaff_forums'] = 'Fóruns:';
$txt['smfstaff_dateregistered'] = 'Data de Registro:';
$txt['smfstaff_contact'] = 'Informações de Contato:';
$txt['smfstaff_sendpm'] = 'Enviar MP';
$txt['smfstaff_avatar'] = 'Avatar';
$txt['smfstaff_options'] = 'Opções';
$txt['smfstaff_nocatabove'] = 'Não há nenhum grupo acima do atual.';
$txt['smfstaff_nocatbelow'] = 'Não há nenhum grupo abaixo do atual.';
$txt['smfstaff_errgroupexists'] = 'Esse grupo á está na staff list.';
$txt['smfstaff_staffsetting'] = 'Configurações da Página de Staff';
$txt['smfstaff_showavatar'] = 'Mostrar Avatar';
$txt['smfstaff_showlastactive'] = 'Mostrar Última Atividade';
$txt['smfstaff_showdateregistered'] = 'Mostrar Data de Registro';
$txt['smfstaff_showcontactinfo'] = 'Mostrar Informações de Contato';
$txt['smfstaff_showlocalmods'] = 'Mostrar Moderadores Locais';
$txt['smfstaff_groupstoshow'] = 'Adicionar grupos à página da Staff:';
$txt['smfstaff_groupstoadd'] = 'Grupos que aparecem na página da Staff:';
$txt['smfstaff_addgroup'] = 'Adicionar Grupo';
$txt['smfstaff_delgroup'] = '[Deletar Grupo]';
$txt['smfstaff_up'] = '[Para cima]';
$txt['smfstaff_down'] = '[Para baixo]';
$txt['smfstaff_savesettings'] = 'Salvar Configurações';
?>
<file name="$languagedir/Modifications.portuguese_brazilian.php" error="skip">
<operation error="ignore">
<search position="after"><![CDATA[
?>]]></search>
<add><![CDATA[
// Begin SMF Staff Page Text Strings
$txt['smfstaff_stafflist'] = 'Staff';
$txt['smfstaff_admin'] = 'Configurações da Lista de Staff';
$txt['permissionname_view_stafflist'] = 'Ver Staff';
$txt['permissionhelp_view_stafflist'] = 'A lista de staff mostra todos os membros da sua staff. Você pode mudar quais grupos de membros são mostrados indo em Configurações do Fórum e procure por Configurações da Lista de Staff. Essa permissão permite que você alterne quem pode ver a lista de staff.';
$txt['cannot_view_stafflist'] = 'Você não pode ver a lista da Staff.';
]]></add>
</operation>
</file>
Yes in themes/default/languages/modifications.english.php
Although a great mod, I ended up making my own staff page using SSI functions:
http://biology-forums.com/index.php?action=staff
One thing that would make me revert back however, if there was a possibility to resize the avatars.
I love what you've done with it. Really organized and clean. Won't you share with us all?! ;D
I could definitely use that on my site.
Yes, but to create it you'll need SMF version 1.x. I can share the code with you, and then you can revert it to the proper 2.x code. It was purely done using SSI functions.
<file name="$languagedir/Who.portuguese_pt.php" error="skip">
<operation error="ignore">
<search position="after"><![CDATA[
?>]]></search>
<add><![CDATA[
// Begin SMF Staff Page Text Strings
$txt['whoall_staff'] = 'Vendo a Página dos <a href="' . $scripturl . '?action=staff">Funcionários</a>';
// END SMF Staff Page Text Strings
]]></add>
</operation>
</file>
<file name="$languagedir/Who.portuguese_pt-utf8.php" error="skip">
<operation error="ignore">
<search position="after"><![CDATA[
?>]]></search>
<add><![CDATA[
// Begin SMF Staff Page Text Strings
$txt['whoall_staff'] = 'Vendo a Página dos <a href="' . $scripturl . '?action=staff">Funcionários</a>';
// END SMF Staff Page Text Strings
]]></add>
</operation>
</file>
<file name="$languagedir/Modifications.portuguese_pt.php" error="skip">
<operation error="ignore">
<search position="after"><![CDATA[
?>]]></search>
<add><![CDATA[
// Begin SMF Staff Page Text Strings
$txt['smfstaff_stafflist'] = 'Lista do Funcionários';
$txt['smfstaff_admin'] = 'Configuração dos Funcionários';
$txt['permissionname_view_stafflist'] = 'Ver Lista dos Funcionários';
$txt['permissionhelp_view_stafflist'] = 'Lista de Pessoal mostra todos os membros de sua equipe. Você pode alterar qual membro grupos são mostrados indo para layout e Opções e procure SMF Funcionários filtro. Esta autorização permite que você alterne quem pode ver a lista de funcionários.';
$txt['cannot_view_stafflist'] = 'Você não pode ver a lista de funcionários.';
]]></add>
</operation>
</file>
<file name="$languagedir/Modifications.portuguese_pt-utf8.php" error="skip">
<operation error="ignore">
<search position="after"><![CDATA[
?>]]></search>
<add><![CDATA[
// Begin SMF Staff Page Text Strings
$txt['smfstaff_stafflist'] = 'Lista do Funcionários';
$txt['smfstaff_admin'] = 'Configuração dos Funcionários';
$txt['permissionname_view_stafflist'] = 'Ver Lista dos Funcionários';
$txt['permissionhelp_view_stafflist'] = 'Lista de Pessoal mostra todos os membros de sua equipe. Você pode alterar qual membro grupos são mostrados indo para layout e Opções e procure SMF Funcionários filtro. Esta autorizaçção permite que você alterne quem pode ver a lista de funcionários.';
$txt['cannot_view_stafflist'] = 'Você não pode ver a lista de funcionários.';
]]></add>
</operation>
</file>
Any errors in the forum error log that might be related?
$count_users = count(@$context['smfstaff_users'][$data['id']]);