MyBB 1.8.x Mod  Years Of Service Mod
#1
Thumbs Up 
Years Of Service  Mod

Este codigo es para poner el Mod de Years  Of Service de MyBB

Debemos de editar estos archivos:

1. Template: Postbit

Quote:<setvar years>floor((TIME_NOW-$post['regdate'])/(60*60*24*365))</setvar>
<span class="service-{$GLOBALS['tplvars']['years']}">{$GLOBALS['tplvars']['years']} years of service</span>

2. En  global.css, añadir el codigo de style
Ejemplo
Quote:.service-1 {
color: pink;
}

.service-2 {
color: yellow;
}

.service-3 {
color: red;
}

.service-4 {
color: orange;
}

Nota: Este seria el Codigo que tengo en el foro de Winningeleven-games
Quote:/** Years of Service MOD **/
.service-0 {
width: 180px;
font-size: 13px;
color: yellow;
text-align: center;
margin: 5px;
padding: 5px;
background: #4382cc;
border: 2px solid #009AFF;
border-radius: 3px;
}

.service-1 {
width: 180px;
font-size: 13px;
color: yellow;
text-align: center;
margin: 5px;
padding: 5px;
background: #4382cc;
border: 2px solid #009AFF;
border-radius: 3px;
}

.service-2 {
width: 180px;
font-size: 13px;
color: orange;
text-align: center;
margin: 5px;
padding: 5px;
background: #4382cc;
border: 2px solid #009AFF;
border-radius: 3px;
}

.service-3 {
width: 180px;
font-size: 13px;
color: #800080;
text-align: center;
margin: 5px;
padding: 5px;
background: #4382cc;
border: 2px solid #009AFF;
border-radius: 3px;
}

.service-4 {
width: 180px;
font-size: 13px;
color: yellow;
text-align: center;
margin: 5px;
padding: 5px;
background: #4382cc;
border: 2px solid #009AFF;
border-radius: 3px;
}

.service-6 {
width: 180px;
font-size: 13px;
color: yellow;
text-align: center;
margin: 5px;
padding: 5px;
background: #4382cc;
border: 2px solid #009AFF;
border-radius: 3px;
}

.service-7 {
width: 180px;
font-size: 13px;
color: yellow;
text-align: center;
margin: 5px;
padding: 5px;
background: #4382cc;
border: 2px solid #009AFF;
border-radius: 3px;
}

.service-8 {
width: 180px;
font-size: 13px;
color: yellow;
text-align: center;
margin: 5px;
padding: 5px;
background: #4382cc;
border: 2px solid #009AFF;
border-radius: 3px;
}

.service-9 {
width: 180px;
font-size: 13px;
color: yellow;
text-align: center;
margin: 5px;
padding: 5px;
background: #4382cc;
border: 2px solid #009AFF;
border-radius: 3px;
}

.service-10 {
width: 180px;
font-size: 13px;
color: yellow;
text-align: center;
margin: 5px;
padding: 5px;
background: #4382cc;
border: 2px solid #009AFF;
border-radius: 3px;
}

.service-11 {
width: 180px;
font-size: 13px;
color: yellow;
text-align: center;
margin: 5px;
padding: 5px;
background: #4382cc;
border: 2px solid #009AFF;
border-radius: 3px;
}

.service-12 {
width: 180px;
font-size: 13px;
color: orange;
text-align: center;
margin: 5px;
padding: 5px;
background: #4382cc;
border: 2px solid #009AFF;
border-radius: 3px;
}

.service-13 {
width: 180px;
font-size: 13px;
color: yellow;
text-align: center;
margin: 5px;
padding: 5px;
background: #4382cc;
border: 2px solid #009AFF;
border-radius: 3px;
}

.service-14 {
width: 180px;
font-size: 13px;
color: yellow;
text-align: center;
margin: 5px;
padding: 5px;
background: #4382cc;
border: 2px solid #009AFF;
border-radius: 3px;
}

.service-15 {
width: 180px;
font-size: 13px;
color: gold;
text-align: center;
margin: 5px;
padding: 5px;
background: #4382cc;
border: 2px solid #009AFF;
border-radius: 3px;
}

.service-16 {
width: 180px;
font-size: 13px;
color: yellow;
text-align: center;
margin: 5px;
padding: 5px;
background: #4382cc;
border: 2px solid #009AFF;
border-radius: 3px;
}

.service-17 {
width: 180px;
font-size: 13px;
color: yellow;
text-align: center;
margin: 5px;
padding: 5px;
background: #4382cc;
border: 2px solid #009AFF;
border-radius: 3px;
}

.service-18 {
width: 180px;
font-size: 13px;
color: yellow;
text-align: center;
margin: 5px;
padding: 5px;
background: #4382cc;
border: 2px solid #009AFF;
border-radius: 3px;
}

.service-19 {
width: 180px;
font-size: 13px;
color: yellow;
text-align: center;
margin: 5px;
padding: 5px;
background: #4382cc;
border: 2px solid #009AFF;
border-radius: 3px;
}

.service-20 {
width: 180px;
font-size: 13px;
color: yellow;
text-align: center;
margin: 5px;
padding: 5px;
background: #4382cc;
border: 2px solid #009AFF;
border-radius: 3px;
}

3. Hay que activar el Plugin ---> PHP in Templates

URL: http://mybbhacks.zingaburga.com/showthread.php?tid=260


Eso seria todo para Instalar el Mod de Years Of Service para MyBB

Adjunto: Codigo Completo del Template: Postbit

Quote:{$ignore_bit}{$deleted_bit}
<a name="pid{$post['pid']}" id="pid{$post['pid']}"></a>
<div class="post {$unapproved_shade}" style="{$post_visibility}" id="post_{$post['pid']}">
<div class="post_author">
{$post['useravatar']}
<div class="author_information">
<span class="titletag titletag_{$usergroup['gid']}">&nbsp;</span><strong><span class="largetext">{$post['profilelink']}</span></strong> {$post['onlinestatus']}<br />
<span class="smalltext">
<span class="grouptag grouptag{$usergroup['gid']}">&nbsp; {$post['usertitle']}</span><br />
{$post['userstars']}
{$post['groupimage']}
<setvar years>floor((TIME_NOW-$post['regdate'])/(60*60*24*365))</setvar>
<span class="service-{$GLOBALS['tplvars']['years']}">{$GLOBALS['tplvars']['years']} years in forums</span>
</span>

</div>
<div class="author_statistics">
{$post['user_details']}{$post['ougc_awards']}{$post['usermood']}{$post['usercountry']}
</div>
</div>
<div class="post_content">
<div class="post_head">
{$post['posturl']}
{$post['icon']}
<span class="post_date">{$post['postdate']} <span class="post_edit" id="edited_by_{$post['pid']}">{$post['editedmsg']}</span></span>
{$post['subject_extra']}
</div>
<div class="post_body scaleimages" id="pid_{$post['pid']}">
{$post['message']}
</div>
{$post['attachments']}
{$post['signature']}
<div class="post_meta" id="post_meta_{$post['pid']}">
{$post['iplogged']}
<div class="float_right">
{$post['poststatus']}
</div>
</div>
{$post['input_editreason']}
</div>
<div class="post_controls">
<div class="postbit_buttons author_buttons float_left">
{$post['button_email']}{$post['button_pm']}{$post['button_www']}{$post['button_find']}{$post['button_rep']}
</div>
<div class="postbit_buttons post_management_buttons float_right">
{$post['button_edit']}{$post['button_quickdelete']}{$post['button_quickrestore']}{$post['button_quote']}{$post['button_multiquote']}{$post['button_report']}{$post['button_warn']}{$post['button_purgespammer']}{$post['button_reply_pm']}{$post['button_replyall_pm']}{$post['button_forward_pm']}{$post['button_delete_pm']}
</div>
</div>
</div>


Resultado:
[Image: Captura-de-pantalla-100.png]

Eso es todo  Cool
[Image: 51.jpg]
We11World [ Winning Eleven ] , Blog , Winning Eleven Games
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)