gerade bemerkt und das ist eigentlich nur eine optische Sache...
Wenn jemand eine PN bekommt zeigt das die MiniToolbar so an:

was ist da wohl schief gelaufen?
cu Overhead

Code: Alles auswählen
if ( $can_watch_topic )
{
$uw_parm = $is_watching_topic ? 'unwatch' : 'watch';
$tlbr_more = array(
'watch' => array('link_pgm' => 'viewtopic', 'link_parms' => array(POST_TOPIC_URL => intval($topic_id), $uw_parm => 'topic', 'start' => intval($start)), 'txt' => $is_watching_topic ? 'Stop_watching_topic' : 'Start_watching_topic', 'img' => $is_watching_topic ? 'tlbr_un_watch' : 'tlbr_watch'),'pdf' => array('link_pgm' => 'pdf', 'link_parms' => array(POST_TOPIC_URL => intval($topic_id)), 'txt' => 'PDF', 'img' => 'tlbr_pdf'),
);
}
build_toolbar('viewtopic', $l_privmsgs_text, $s_privmsg_new, $forum_id, $tlbr_more);
Code: Alles auswählen
function build_toolbar($mode, $l_privmsgs_text='', $s_privmsg_new=0, $forum_id=0, $tlbr_more='')
{
global $userdata, $template, $lang, $images, $phpEx;
// restrict mode input to valid options
$mode = ( in_array($mode, array('default', 'index', 'viewforum', 'viewtopic')) ) ? $mode : '';
if ( !empty($mode) && $userdata['session_logged_in'] )
{
// init vars
$s_toolbar = '';
// toolbar actions details display
$toolbar_actions = array(
'inbox' => array('link_pgm' => 'privmsg', 'link_parms' => array('folder' => 'inbox'), 'txt' => $l_privmsgs_text, 'img' => !$s_privmsg_new ? 'tlbr_no_new_pm' : 'tlbr_new_pm'),
'unanswered' => array('link_pgm' => 'search', 'link_parms' => array('search_id' => 'unanswered'), 'txt' => 'Search_unanswered', 'img' => 'tlbr_unanswered'),
'newposts' => array('link_pgm' => 'search', 'link_parms' => array('search_id' => 'newposts'), 'txt' => 'Search_new', 'img' => 'tlbr_new'),
'egosearch' => array('link_pgm' => 'search', 'link_parms' => array('search_id' => 'egosearch'), 'txt' => 'Search_your_posts', 'img' => 'tlbr_self'),
'pdf' => array('link_pgm' => 'pdf', 'link_parms' => array(POST_TOPIC_URL => intval($topic_id)), 'txt' => 'PDF', 'img' => 'tbr_pdf'),
'forums' => array('link_pgm' => 'index', 'link_parms' => array(POST_FORUM_URL => intval($forum_id), 'mark' => 'forums'), 'txt' => 'Mark_all_forums', 'img' => 'tlbr_markall', 'cond' => $mode == 'index'),
'topics' => array('link_pgm' => 'viewforum', 'link_parms' => array(POST_FORUM_URL => intval($forum_id), 'mark' => 'topics'), 'txt' => 'Mark_all_topics', 'img' => 'tlbr_markall', 'cond' => !empty($forum_id) && ($mode == 'viewforum' || $mode == 'viewtopic')),
'viewonline' => array('link_pgm' => 'viewonline', 'link_parms' => '', 'txt' => 'Who_is_Online', 'img' => 'tlbr_viewonline', 'cond' => $mode != 'viewtopic'),
);
// add additional actions in toolbar so existing
if ( !empty($tlbr_more) && is_array($tlbr_more) )
{
$toolbar_actions = array_merge($toolbar_actions, $tlbr_more);
}
// let's go
foreach ( $toolbar_actions as $action => $data )
{
if ( !isset($data['cond']) || $data['cond'] )
{
// build url parms
$url_parms = '';
if ( !empty($data['link_parms']) )
{
foreach ( $data['link_parms'] as $key => $val )
{
if ( !empty($key) && !empty($val) )
{
$url_parms .= (empty($url_parms) ? '?' : '&') . $key . '=' . $val;
}
}
}
// build toolbar
$s_toolbar .= '<a href="' . append_sid($data['link_pgm']. '.' . $phpEx . $url_parms) . '"><img src="' . $images[ $data['img'] ] . '" alt="' . ( $action == 'inbox' ? $data['txt'] : $lang[ $data['txt'] ] ) . '" title="' . ( $action == 'inbox' ? $data['txt'] : $lang[ $data['txt'] ] ) . '" border="0" /></a>';
}
}
// send to template
if ( !empty($s_toolbar) )
{
// constants
$template->assign_block_vars('toolbar', array(
'S_TOOLBAR' => $s_toolbar,
));
}
}
}Code: Alles auswählen
$s_privmsg_new = 1;
$icon_pm = $images['pm_new_msg'];
}
else
{
$s_privmsg_new = 0;
$icon_pm = $images['pm_new_msg'];
}
}
else
{
$l_privmsgs_text = $lang['No_new_pm'];
$s_privmsg_new = 0;
$icon_pm = $images['pm_no_new_msg'];
}
if ( $userdata['user_unread_privmsg'] )
{
$l_message_unread = ( $userdata['user_unread_privmsg'] == 1 ) ? $lang['Unread_pm'] : $lang['Unread_pms'];
$l_privmsgs_text_unread = sprintf($l_message_unread, $userdata['user_unread_privmsg']);
}
else
{
$l_privmsgs_text_unread = $lang['No_unread_pm'];
}
}
else
{
$icon_pm = $images['pm_no_new_msg'];
$l_privmsgs_text = $lang['Login_check_pm'];
$l_privmsgs_text_unread = '';
$s_privmsg_new = 0;
}Code: Alles auswählen
// Private Messaging
//
$lang['Private_Messaging'] = 'Private Nachrichten';
$lang['Login_check_pm'] = 'Einloggen, um private Nachrichten zu lesen';
$lang['New_pms'] = '<EMBED SRC="post.wav" AUTOSTART=true LOOP=FALSE WIDTH=0 HEIGHT=0></EMBED>Du hast %d neue Nachrichten'; // You have 2 new messages
$lang['New_pm'] = '<EMBED SRC="post.wav" AUTOSTART=true LOOP=FALSE WIDTH=0 HEIGHT=0></EMBED>Du hast 1 neue Nachricht'; // You have 1 new message
$lang['No_new_pm'] = 'Du hast keine neuen Nachrichten';
$lang['Unread_pms'] = 'Du hast %d ungelesene Nachrichten';
$lang['Unread_pm'] = 'Du hast 1 ungelesene Nachricht';
$lang['No_unread_pm'] = 'Du hast keine ungelesenen Nachrichten';
$lang['You_new_pm'] = 'Eine neue private Nachricht befindet sich in deinem Posteingang';
$lang['You_new_pms'] = 'Es befinden sich neue private Nachrichten in deinem Posteingang';
$lang['You_no_new_pm'] = 'Es sind keine neuen privaten Nachrichten vorhanden';Code: Alles auswählen
//-- mod : toolbar -------------------------------------------------------------
//-- add
$images['tlbr_markall'] = "$current_template_images/tlbr_markall.gif";
$images['tlbr_new'] = "$current_template_images/tlbr_new.gif";
$images['tlbr_new_pm'] = "$current_template_images/tlbr_pm_new.gif";
$images['tlbr_no_new_pm'] = "$current_template_images/tlbr_pm.gif";
$images['tlbr_self'] = "$current_template_images/tlbr_self.gif";
$images['tlbr_un_watch'] = "$current_template_images/tlbr_un_watch.gif";
$images['tlbr_pdf'] = "$current_template_images/tlbr_pdf.gif";
$images['tlbr_unanswered'] = "$current_template_images/tlbr_unanswered.gif";
$images['tlbr_viewonline'] = "$current_template_images/tlbr_viewonline.gif";
$images['tlbr_watch'] = "$current_template_images/tlbr_watch.gif";
//-- fin mod : toolbar ---------------------------------------------------------