MyBB Community Forums

Full Version: myBB 1.2.x Color Mod Block ?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Don't color Mod block..

[Image: 9617981.gif]


color moderatör =>

[Image: 661832.gif]

how can be index moderators gained grup colors
????
You can use the function format_name() in the file inc/functions_forumlist.php.
Gece uğraştım ve yaptımCool
http://www.mybbdestek.com/showthread.php...727#pid727

Yapımcı : OGtr
Düzenleme yapacağınız dosyaların yedeğini almayı unutmayınız.

------------------------------
inc/functions_forumlist.php
------------------------------

Bul:
$moderators .= "$comma<a href=\"member.php?action=profile&uid=$moderator[uid]\">".$moderator['username']."</a>";
                                    $comma = ", "; 

Değiştir:
$moderators .= "{$comma}<a href=\"member.php?action=profile&amp;uid={$moderator['uid']}\"> ".format_name($moderator['username'], $moderator['usergroup'], $moderator['displaygroup'])."</a>";
$comma = "<br> "; 
------------------------------
index.php
------------------------------


Bu Kodu Bul:
// Get the forum moderators if the setting is enabled.
if($mybb->settings['modlist'] != "off")
{
	$query = $db->query("
		SELECT m.uid, m.fid, u.username
		FROM ".TABLE_PREFIX."moderators m
		LEFT JOIN ".TABLE_PREFIX."users u ON (m.uid=u.uid)
		ORDER BY u.username
	");

Bunla Değiştir:
// Get the forum moderators if the setting is enabled.
if($mybb->settings['modlist'] != "off")
{
	$query = $db->query("
		SELECT m.uid, m.fid, u.username, u.usergroup, u.displaygroup
		FROM ".TABLE_PREFIX."moderators m
		LEFT JOIN ".TABLE_PREFIX."users u ON (m.uid=u.uid)
		ORDER BY u.username
	");



Sıra Geldi Şablonlara

Admin KP --> Şablonlar --> ForumBit Şablonları
forumbit_depth1_cat
Hepsini Silip Aşağıdaki kodları ekleyin
<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder">
<thead>
<tr>
<td class="thead" colspan="7">
<div class="expcolimage"><img src="{$theme['imgdir']}/{$expcolimage}" id="cat_{$forum['fid']}_img" class="expander" alt="{$expaltext}" /></div>
<div><strong><a href="forumdisplay.php?fid={$forum['fid']}">{$forum['name']}</a></strong><br /><div class="smalltext">{$forum['description']}</div></div>
</td>
</tr>
</thead>
<tbody style="{$expdisplay}" id="cat_{$forum['fid']}_e">
<tr>
<td class="tcat" width="35">&nbsp;</td>
<td class="tcat" width="59%"><strong>{$lang->forumbit_forum}</strong></td>
<td class="tcat" width="65" align="center" style="white-space: nowrap"><strong>Konular</strong></td>
<td class="tcat" width="65" align="center" style="white-space: nowrap"><strong>Mesajlar</strong></td>
<td class="tcat" width="200" align="center"><strong>{$lang->forumbit_lastpost}</strong></td>
<td class="tcat" width="20" align="center"><b>    Moderatör </b></td>
</tr>
{$sub_forums}
</tbody>
</table>
<br />
forumbit_depth2_forum
Hepsini Silip Aşağıdaki kodları ekleyin
<tr>
<td class="{$bgcolor}" align="center" valign="top"><img src="{$theme['imgdir']}/{$lightbulb['folder']}.gif" alt="{$lightbulb['altonoff']}" title="{$lightbulb['altonoff']}" /></td>
<td class="{$bgcolor}" valign="top">
<strong><a href="forumdisplay.php?fid={$forum['fid']}">{$forum['name']}</a></strong><div class="smalltext">{$forum['description']}{$modlist}{$subforums}</div>
</td>
<td class="{$bgcolor}" valign="top" align="center" style="white-space: nowrap">{$threads}{$unapproved['unapproved_threads']}</td>
<td class="{$bgcolor}" valign="top" align="center" style="white-space: nowrap">{$posts}{$unapproved['unapproved_posts']}</td>
<td class="{$bgcolor}" valign="top" align="left" style="white-space: nowrap"><table width="230"> $lastpost</table></td>
<td class="$bgcolor" valign="top" align="center" nowrap="nowrap">
<table width="100">$moderators</table>
</tr></td>
</tr>

forumbit_moderators açın silin kaydedin

Ek Olarak
Aşağıda ki Şablonu Aç
Forum Görünümü Şablonlar--->forumdisplay_subforums
Tüm Kodları silip
Aşağıda ki kodları ekleyin
<table border="0" cellspacing="$theme[borderwidth]" cellpadding="$theme[tablespace]" class="tborder">
<tr>
<td class="thead" colspan="7" align="center"><strong>$lang->sub_forums_in</strong></td>
</tr>
<tr>
<td class="tcat" width="35">&nbsp;</td>
<td class="tcat" width="65%"><strong>$lang->forumbit_forum</strong></td>
<td class="tcat" width="50" align="center" nowrap="nowrap"><strong>$lang->forumbit_threads</strong></td>
<td class="tcat" width="50" align="center" nowrap="nowrap"><strong>$lang->forumbit_posts</strong></td>
<td class="tcat" width="200" align="center"><strong>$lang->forumbit_lastpost</strong></td>
<td class="tcat" width="20" align="center"><b>    Moderatör </b></td>
</tr>
$forums
</table>
<br />

Bunu yapmamızın nedeni kategoriye tıklayınca mod grafiği çıkmıyordu kötü bir görüntü oluşturuyordu Big Grin
saol ogtr okul dolasıyla bu mesaja yeni baktım.. ilgilenemedim.. Mod Bloğunu yaptıkta 1.1.x renklendirmeyi yapmıştım ama 1.2x de forumlistte hata verdi açıkçası fazla zamanım yok uğraşamadım index.php yi ve forumlisti aynı benim yöntemle yapmışsın ama benim forumlist hataveriyordu seninki nasıl olmuş anlamadım Smile Neyse ilgin ve alakan için teşekkürler..
rica ederim önemli deil