שלום לכל קהילת MyBB ישראל!
במדריך זה אסביר איך להתקין מוד CS למערכת MyBB!.
ברחבי האינטרנט מצאתי רק מוד אחד כזה, אשר לא עובד ומפיל את הפורום.
אז לקחתי אותו, ותיקנתי כמה דברים.
אז הנה המוד המתוקן ושעובד!
מדריך
כנסו לפאנל הניהול שלכם, לכו ל configuration ולחצו על Add New Setting group.
ב title רשמו mod cs, ב Identifier רשמו 1, ולאחר מכן שמרו.
לאחר מכן לחצו על הכפתור add new setting וחזרו על הפעולה 3 פעמים עם הפרטים הבאים (בכולם לשים group- mod cs:
- title: cats per line, Identifier: cpl
- title: Cat image, Identifier: catimg
- title: Expander, Identifier: cex
ומלאו את הפרטים. בשדה הראשון רשמו כמה קטגוריות אתם רוצים בכל שורה. בשדה השני רשמו 0 להפעלת תמונה לכל קטגוריה, ו 1 לביטול. בשדה השלישי רשמו 0 כדי לאפשר לצמצם קטגוריה ו 1 לביטול.
לאחר הגדרת ההגדרות,
פתחו את הקובץ inc/function_forumlist.php .
חפשו בסביבות השורה 60 את השורה הבאה:
קוד PHP:
$forum = $plugins->run_hooks("build_forumbits_forum", $forum);
קוד PHP:
// CS Mod Start
$cpl = $mybb->settings['cpl'];
$c=$mybb->settings['cex'];
$catimg=$mybb->settings['catimg'];
$csw=100 / $cpl.'%';
if($forum['type'] == 'c'){
if($c==1){
$cc='<div class="hidden">';
$cce='</div>';
}else{
$cc='';
$cce='';
}
if($catimg==1){
$ccc='<!--';
$ecc='-->';
}else{
$ccc='';
$ecc='';
}
$i++;
}
if($i==$cpl){
$tr_end='</tr><tr><td colspan="'.$cpl.'"><hr></td></tr><tr>';
$i=$i-$i;
}else{
$tr_end='';
}
//CS Mod End
בחרו את שם הסקין שלכם, ולאחר מכן לחצו על Forum Bit Templates ולאחר מכן בחרו forumbit_depth1_cat.
החליפו את כל התוכן ב
קוד:
<td width="{$csw}" valign="top">
<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder">
<thead>
<tr>
<td colspan="2" valign="top" align="center">
{$ccc}<img src="images/catimg/{$forum['fid']}.png" />{$ecc}
</td>
</tr>
<tr>
<td class="thead" colspan="2">
{$cc}
<div class="expcolimage"><img src="{$theme['imgdir']}/{$expcolimage}" id="cat_{$forum['fid']}_img" class="expander" alt="{$expaltext}" title="{$expaltext}" /></div>{$cce}
<div><strong><a href="{$forum_url}" title="{$forum['description']}">{$forum['name']}</a></strong><br />
</div>
</td>
</tr>
</thead>
<tbody style="{$expdisplay}" id="cat_{$forum['fid']}_e">
{$sub_forums}
</tbody>
</table></td>
{$tr_end}
בחרו בתבנית forumbit_depth2_forum והחליפו את כל תוכנה ב
קוד:
<tr><td class="{$bgcolor}" align="center" valign="top" width="1"><img src="{$theme['imgdir']}/{$lightbulb['folder']}.gif" alt="{$lightbulb['altonoff']}" title="{$lightbulb['altonoff']}" class="ajax_mark_read" id="mark_read_{$forum['fid']}" /></td><td class="{$bgcolor}" valign="top"><strong><a href="{$forum_url}" title="{$forum['description']}">{$forum['name']}</a></strong></td></tr>
בחרו בתבנית forumbit_depth2_cat והחליפו את כל תוכנה ב
קוד:
<tr><td class="{$bgcolor}" align="center" valign="top" width="1"><img src="{$theme['imgdir']}/{$lightbulb['folder']}.gif" alt="{$lightbulb['altonoff']}" title="{$lightbulb['altonoff']}" class="ajax_mark_read" id="mark_read_{$forum['fid']}" /></td><td class="{$bgcolor}" valign="top"><strong><a href="{$forum_url}" title="{$forum['description']}">{$forum['name']}</a></strong></td></tr>
כנסו לתבנית index->index
חפשו, {$forums}
הוסיפו לפני:
קוד:
<table>
<tr>
הוסיפו אחרי
קוד:
</tr>
</table>
אם בחרתם להפעיל תמונה לקטגוריה בצעו את השלב מטה. אם לא סיימתם את המדריך.
לאחר מכן,
בתוך התיקיה images פתחו תיקיה בשם catimg ובה שימו תמונות לקטגוריה.
לכל קטגוריה יש שם משלה.
לדוגמה, לקטגוריה שה ID שלה הוא 8 השם של התמונה יהיה 8.png ולקטגוריה שה ID הוא 5 התמונה תהיה בשם 5.png.
מקווה שהבנתם!
בהצלחה!
** המדריך נכתב ע"י. אין להעתיק מדריך זה בשום פנים ואופן!! **
[u][b]** קרדיט לron4548 על חלק מהקודים **
[/b][/u]