مرجع پارسی MyBB

نسخه‌ی کامل: پلاگين بخش بازي Game Section 1.2 RC5.1 Final
شما درحال مشاهده‌ی نسخه‌ی متنی این صفحه می‌باشید. مشاهده‌ی نسخه‌ی کامل با قالب‌بندی مناسب.
صفحه‌ها: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
از گزینه های روبروی هر بازی برای ساختن مسابقه استفاده کنین.
http://community.gamesection.org/games.php
بازی دانلود کن عزیزHeart
دوست گرامی ، اومدم یه متن بنویسم ، دوباره پاکش کردم
یکمی مهربون تر باشیم با هم بهتره

من تقریبا 100 تا از بازیها رو برات آپلود کردم . لینک ها مستقیمه . نه عضویت میخاد نه هیچی که یه وقت خدای نکرده تبلیغ سایتم نشده باشه . دانلود کن اگه بازم بیشتر از این لازم داشتی بگو برات آپلود کنم . موفق باشی .

http://www.aria-nik.com/games/01.zip
http://www.aria-nik.com/games/02.zip
http://www.aria-nik.com/games/03.zip
http://www.aria-nik.com/games/04.zip
http://www.aria-nik.com/games/05.zip
سلام دوستان
خسته نباشید
چطوری می تونم که اون کادر بازیکنان برتز ساتم رو تو صفحه اول زیر هدر قرار بدم..
با تشکرHeart
تو سایت اصلی آموزشش باید باشه یه نگاه بندازین
من نگاه کردم اما چیزی سر در نیاوردم...

کسی بلد نیست به من یاد بده.Angel
فایل index.php رو باز کنید و کدهای زیر رو پیدا کنین:

کد php:
require_once MYBB_ROOT."inc/functions_post.php";
require_once 
MYBB_ROOT."inc/functions_forumlist.php";
require_once 
MYBB_ROOT."inc/class_parser.php";
$parser = new postParser

کدهای زیر رو بعدشون اضافه کنین:

کد php:
require_once MYBB_ROOT."inc/class_games.php";
$games_core = new games;
$games_core->run_settings();

//Theme setting
if($mybb->user['uid'] != && $mybb->user['games_theme'] != "0")
{
    
$theme_games_tid $mybb->user['games_theme'];
}
else
{
    
$theme_games_tid $games_core->settings['theme'];
}

//Game Section Theme
$query $db->query("SELECT * FROM ".TABLE_PREFIX."games_themes WHERE tid='".$theme_games_tid."' AND active='1'");
$theme_games $db->fetch_array($query);
$theme_games_test $db->num_rows($query);

if(
$theme_games_test == 0)
{
    
//The user selected theme doesn't exist, load the default theme
    
$query $db->query("SELECT * FROM ".TABLE_PREFIX."games_themes WHERE tid='".$games_core->settings['theme']."' AND active='1'");
    
$theme_games $db->fetch_array($query);
    
$theme_games_test2 $db->num_rows($query);
}
else
{
    
$theme_games_test2 1;
}

if(
$theme_games_test2 == 0)
{
    
//The standard theme doesn't exist, load the default Game Section theme
    
$query $db->query("SELECT * FROM ".TABLE_PREFIX."games_themes WHERE tid='1'");
    
$theme_games $db->fetch_array($query);
    
$theme_games_test3 $db->num_rows($query);
}
else
{
    
$theme_games_test3 1;
}

//No theme available
if($theme_games_test3 == 0)
{
    die(
"The users selected theme, the default theme and the Game Section Default theme doesn't exist.");
}

//Load bestplayers
$query $db->query("SELECT u.uid, u.username, u.avatar, COUNT(c.gid) AS champs
FROM "
.TABLE_PREFIX."games_champions c
LEFT JOIN "
.TABLE_PREFIX."users u ON (u.uid=c.uid)
LEFT JOIN "
.TABLE_PREFIX."games g ON (c.gid=g.gid)
WHERE g.active='1'
GROUP BY u.uid
ORDER BY champs DESC, c.dateline ASC
LIMIT 0,3"
);

$rank 0;

while(
$bestplayers $db->fetch_array($query))
{
    
$rank++;
    
$bestplayers_place "bestplayers_place_".$rank;
    
$bestplayers_place $lang->$bestplayers_place;
    
    
$bestplayers_sen $lang->sprintf($lang->bestplayers_sen$bestplayers['username'], $bestplayers['champs']);
    
    if(!empty(
$bestplayers['avatar']))
    {
        
$bestplayers_avatar "<img src=\"".$bestplayers['avatar']."\" alt\"\" />";
    }
    else
    {
        
$bestplayers_avatar "";
    }
    
    
//Plugin
    
$plugins->run_hooks("games_stats_bestplayers");
    
    eval(
"\$bestplayers_bit .= \"".$games_core->template("games_stats_bestplayers_bit")."\";");
}

eval(
"\$stats_bestplayers = \"".$games_core->template("games_stats_bestplayers")."\";"); 


به قالب بندی index page templates>>index برین و متغیر زیر رو در محل دلخواه (ترجیاً بعد {$header}) قرار بدین:

کد php:
{$stats_bestplayers
اقا خیلی با حالی کیف کردم به خدا با آموزشت...
دقیق کار می کنه ...Big Grin

اما یه سوال دیگه هم داشتم...البته ببخشید ها..
چطور میشه اون که بالاش نوشته "بهترین بازی کنان" رو فقط تو همینی که شما اموزش دادید تغییر داد.
و اینکه تعداد نفرات برتر رو 5 تا کرد..
بازم دمت گرم.
امکانش نیست مگه با کدی نویسی و ... که خیلی پیچیده میشه. تو سایتاصلی درخواست بدین راهنمایی میکنن
تنظیم خاصی وجود نداره برای این قسمت احتمالاً باید فایل پلاگین ویرایش بشه
اگه متغییری که این اسم رو میندازه رو تو index تغییر بدیم و به جاش متن مورد نظر رو بنویسیم جواب نمی ده؟؟؟
صفحه‌ها: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32