Naziv tutoriala: Member info ispod toolbara
Izradio: Sexserghy
Slike tutoriala Klikni me! (http://zaslike.com/files/s9ovpaiuots99jbkmvra.png)
Tutorial:
U folderu svoje teme pronadjite Index.template.php te kada otvorite pronadjite "mainarea" i prije njega dodajte:
<div id="usergreets">';
// Show user avatar
if (!empty($context['user']['avatar']))
echo ' <br>
<div id="avatar"> ', $context['user']['avatar']['image'], '</div>';
// Show welcome bar.
if ($context['user']['is_logged'])
echo ' <div id="memberinfo">';
//Say hello to member
if ($context['user']['is_logged'])
echo '', $txt['hello_member_ndt'], ' <b>', $context['user']['name'], '</b>,';
// Only tell them about their messages if they can read their messages!
if ($context['allow_pm'])
echo ' <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'] , '.<br />';
// Show unread replies to members.
if ($context['user']['is_logged'])
echo '
<a href="', $scripturl, '?action=unread"><b>', $txt['unread_since_visit'] ,'</a></b><br />
<a href="', $scripturl, '?action=unreadreplies"><b>', $txt['show_unread_replies'] ,'</b></a>';
// Show the total time logged in?
if ($context['user']['is_logged'])
echo ' <br />
', $txt['totalTimeLogged1'];
// If days is just zero, don't bother to show it.
if ($context['user']['is_logged'])
echo $context['user']['total_time_logged_in']['days'] . $txt['totalTimeLogged2'];
// Same with hours - only show it if it's above zero.
if ($context['user']['is_logged'])
echo $context['user']['total_time_logged_in']['hours'] . $txt['totalTimeLogged3'];
// But, let's always show minutes - Time wasted here: 0 minutes ;).
if ($context['user']['is_logged'])
echo $context['user']['total_time_logged_in']['minutes'], $txt['totalTimeLogged4'], '';
//Show current time.
if ($context['user']['is_logged'])
echo ' <br /> ', $context['current_time'],'
</div>
<br>';
// Otherwise they're a guest - so politely ask them to register or login.
if ($context['user']['is_guest'])
echo ' <div id="memberinfo">
<br>Welcome guest <b>please <a href="?action=login">Login</a> or <a href="?action=register">Register</a></b>. <br />
<script language="JavaScript" type="text/javascript" src="', $settings['default_theme_url'], '/sha1.js"></script>
<form action="', $scripturl, '?action=login2" method="post" accept-charset="', $context['character_set'], '" style="margin: 4px 0;"', 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" />
<input type="submit" value="', $txt[34], '" />
<input type="hidden" name="hash_passwrd" value="" />
</form></div>';
// 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><br />
</div>
Te zatim udjite u style.css i na kraj dodajte:
#usergreets {
background:none repeat scroll 0 0 #1A1A1A;
border-top:1px solid #333333;
}
#avatar {
float:left;
margin-left:10px;
margin-top:10px;
padding-right:10px;
}
#memberinfo {
background:none repeat scroll 0 0 #1A1A1A;
padding-top:20px;
padding-left:10px;
margin:0 0 -4px;
}
Velicina avatara: Upravljanje Privitcima - Postavke Avatara - Vanjski Avatar ( Sirinu i visinu izmjenite ), na slici je 110x110.
Komentar: Ako negdje zapnete javite se u temi ili meni na PM. Opet napominjem znam da ima dosta tutoriala po netu i razlicitim forumima ali eto neka bude jedan i ovdje.
http://www.balkan-smf.com/forum/index.php?topic=467.0 (http://www.balkan-smf.com/forum/index.php?topic=467.0)
Dobro ti je ovo,hvala na pomoći :D
Citat: ~ / Numeric ~ poslato Jun 05, 2013, 00:43:52 PRE PODNE
http://www.forum cenzuriran/forum/index.php?topic=467.0 (http://www.forum%20cenzuriran/forum/index.php?topic=467.0)
Šta si htio reći s time? PM
Znam ovo i svidja mi se svaka cast