vBulletin Arcade Games v1.0.3 Kurulumu

Dark_Angel

Webmaster
Yönetici
admincp/index.php ye gecin

alttaki kodlari bulun

Kod:
if (can_administer('canadminstyles'))
altina su kodlari ekliyin
PHP:
 construct_nav_option("General Settings", 'arcadeadmin.php?do=general', '<br />');
construct_nav_option("Game Settings", 'arcadeadmin.php?do=games', '<br />');
construct_nav_option("Score Settings", 'arcadeadmin.php?do=scores', '<br />');
construct_nav_option("Challenges", 'arcadeadmin.php?do=challenges', '<br />');
construct_nav_group("Arcade", '<hr />');

admincp/index.php
yi kaydedip upload edin

admincp/usergroup.php ye gecin
alttaki kodlari bulun
Kod:
print_table_header($vbphrase['forum_viewing_permissions']);
bu kodlarin altina alttaki kodlari ekliyin


PHP:
print_table_header("Arcade Permissions");
    print_yes_no_row("Can View the Arcade? <dfn>Allows usergroup to view the arcade, including high scores and leaderboards</dfn>", 'usergroup[canviewarcade]', $ug_bitfield['canviewarcade']);
    print_yes_no_row("Can Play Games in the Arcade? <dfn>Allows usergroup to play arcade games</dfn>", 'usergroup[canplayarcade]', $ug_bitfield['canplayarcade']);
    print_yes_no_row("Can Post Comments? <dfn>Allows usergroup to post comments when they achieve a high score</dfn>", 'usergroup[canmakecomments]', $ug_bitfield['canmakecomments']);
    print_yes_no_row("Can Edit Leaderboard Comments? <dfn>Allows usergroup to edit comments left by other members</dfn>", 'usergroup[caneditscores]', $ug_bitfield['caneditscores']);
    print_yes_no_row("Can Delete Leaderboard Scores? <dfn>Allows usergroup to delete scores and comments left by other members</dfn>", 'usergroup[candelscores]', $ug_bitfield['candelscores']);
    print_table_break();



dosyayı kaydedip upload edin.

includes/functions.php
ye gecin

alttaki kodlari bulun....

Kod:
// get CSS width for outerdivwidth from outertablewidth
ustune alttaki kodlari ekliyin...
PHP:
// declares the arcade image directory
    $stylevar['imgdir_arcade'] = "images/arcade";

dosyayı kaydedip upload edin.

includes/functions_showthread.php ye gecin

alttaki kodlari bulun....

Kod:
require_once('./includes/functions_reputation.php');
bu kodlarin altina alttaki kodlari ekliyin...

PHP:
if ($arcadegeneral['awardson']==1) {
    // declares the arcade image directory
    $stylevar['imgdir_arcade'] = "images/arcade";
    $arcade_result = $DB_site->query("SELECT shortname,title,gamesettings,highscorerid,highscore,miniimage,gameid FROM " . TABLE_PREFIX . "games ");
    while ($arcade = $DB_site->fetch_array($arcade_result)){
        if (($arcade[gamesettings] & $_GAMESCHECK['showaward'])){
            $awards[$arcade[shortname]]['userid'] = $arcade['highscorerid'];
            $awards[$arcade[shortname]]['gametitle'] = $arcade['title'];
            $awards[$arcade[shortname]]['icon'] = $arcade['miniimage'];
            $awards[$arcade[shortname]]['highscore'] = $arcade['highscore'];
            $awards[$arcade[shortname]]['gameid'] = $arcade['gameid'];
        }
    }
}

simdi alttaki kodlari bulun


Kod:
// sorts through all the stuff to return the postbit template
altina bunlari ekliyin

PHP:
// arcade
    global $awards,$arcadegeneral;
simdi alttaki kodlari bulun

Kod:
$show['messageicon'] = iif($post['iconpath'], true, false);
bunun ustune alttaki kodlari ekliyin


PHP:
if ($arcadegeneral['awardson']==1) {
        foreach ($awards as $key => $award) {
            if ($award['userid']==$post['userid']) {
                eval('$post[\'arcadeawards\'] .= "' . fetch_template('arcade_awards_bit') . '";');
            }
        }
    }

includes/functions_showthread.php yi kaydedip upload edin

includes/init.php ye gecin

alttaki kodlari bulun
PHP:
'stylecache'
            ), $specialtemplates);

komple alttaki kodlarla deiştirin

PHP:
'stylecache',
                'arcadesettings'
            ), $specialtemplates);
sora alttaki kodlari bulun


Kod:
// get $usergroupcache array
bu kodlarin ustune alttaki kodlari ekliyin

Kod:
// get $arcadesettings
                case 'arcadesettings':

                $arcadesettings = $storeitem['data'];
                break;
alttaki kodlari bulun


PHP:
// ----------------------------------------------------------
// ###  END PLUGIN USERGROUP PERMISSIONS BITFIELDS HERE   ###
ustune alttaki kodlari ekliyin
PHP:
 $_BITFIELD['usergroup']['arcadepermissions'] = array(
    'canviewarcade'            => 1,
    'canplayarcade'            => 2,
    'caneditscores'             => 4,
    'candelscores'             => 8,
    'canmakecomments'        => 16
);

alttaki kodlari bulun

PHP:
'warnall'           => 131072
);
bu kodlarin altina alttaki kodlari ekliyin

PHP:
 $_ARCADE = array(
    'active'            => 1,
    'netplay'            => 2,
    'awardson'            => 4,
    'quickreg'            => 8,
    'autoprune'            => 16,
    'highonly'            => 32,
    'vbcodeon'            => 64,
    'imgcodeon'            => 128,
    'smilieson'            => 256,
    'allowemail'        => 512,
    'challengescores'        => 1024
);

$_ARCADEUSER = array(
    'firstvisit'        => 1,
    'settingschecked'    => 2,
    'allowchallenges'    => 4,
    'allowemails'        => 8
);

$_GAMESCHECK = array(
    'active'            => 1,
    'netplay'            => 2,
    'playpanel'            => 4,
    'challenabled'        => 8,
    'showaward'            => 16
);

dosyayı kaydedip upload edin

includes/functions_online.php

ye gecin alttakii kodlari bulun

PHP:
default:
            if ($permissions['wolpermissions'] & CANWHOSONLINEBAD)

ustune su kodlari ekliyin
PHP:
case 'arcade':
            $userinfo['action'] = 'In the Arcade';
            $userinfo['where'] = "<a href=\"arcade.php?$session[sessionurl]\">$vboptions[bbtitle] Arcade</a>";
            break;
alttaki kodlari bulun

PHP:
default:
        $userinfo['activity'] = 'unknown';
    }

ustune sunlaari ekliyin

PHP:
case 'arcade.php':
        $userinfo['activity'] = 'arcade';
        break;

dosyayı kaydedip upload edin

global.php
ye gecin

alttaki kodlari bulun
PHP:
echo "End call of global.php:  $aftertime\n";
    echo "\n<hr />\n\n";
}
altina alttaki kodlari ekliyin


PHP:
// Creates general settings for the Arcade
$arcadegeneral = convert_bits_to_array($arcadesettings,$_ARCADE);
$arcadeuser = convert_bits_to_array($bbuserinfo['arcadesettings'],$_ARCADEUSER);
$arcadepermissions = convert_bits_to_array($permissions['arcadepermissions'],$_BITFIELD['usergroup']['arcadepermissions']);

Dosyayı kaydedip upload edin

profile.php
ye gecin

alttaki kodlari bulun

Kod:
'editavatar' => array(

altina alttaki kodlari ekliyin
PHP:
'editarcade' => array(
        'modifyarcade'
    ),

sora allttaki kodlari bulun

PHP:
// ############################################################################
// ############################### EDIT OPTIONS ###############################
// ############################################################################
ustune alttaki kodlari ekliiyn

PHP:
// ############################################################################
// ########################### ARCADE USER OPTIONS ############################
// ############################################################################
if ($_REQUEST['do'] == 'editarcade')
{
    $checked = array();
    // current values as checked
    foreach ($arcadeuser as $key => $value) {
        if ($value == 1) {
            $checked[$key] = HTML_CHECKED;
        }
    }
    construct_usercp_nav();
    $templatename = "modifyarcade";
sora alttaki kodlari bulun

Kod:
// ############################### start update options ###############################
ustune su kodlari ekliyin....

PHP:
// ############################## start update arcade #################################
if ($_POST['do'] == 'updatearcade')
{
require_once('./includes/functions_misc.php');
    // globalize here
    $_POST['arcade']['firstvisit'] = 0;
    $_POST['arcade']['settingschecked'] = 1;
    $userSettings = &$_POST['arcade'];

    $userBits = convert_array_to_bits($userSettings,$_ARCADEUSER);
    
    $DB_site->query("
        UPDATE " . TABLE_PREFIX . "user SET
        arcadesettings = $userBits
        WHERE userid = $bbuserinfo[userid]
    ");
    
    $url = "arcade.php?do=main";
    eval(print_standard_redirect('redirect_updatethanks'));
}


Dosyayı kaydedip upload edin

showthread.php
ye gecin

alttaki kodlari bulun

Kod:
'pollresult',

alttaki kodlarla deiştirin

PHP:
'pollresult',
    'arcade_awards_bit',

Dosyayı kaydedip upload edin


postbit templatesine gecin

alttaki kodlari bulun

Kod:
<if condition="$show['pmlink']">

altina alttaki kodlari ekliyin

PHP:
<if condition="$post['arcadesettings'] & 4 AND $post[userid]!=$bbuserinfo[userid] AND $bbuserinfo[userid]!=0">
        <tr><td class="vbmenu_option"><a href="arcade.php?$session[sessionurl]do=newchallenge&userid=$post[userid]" target="_self">Challenge $post[username] in the Arcade</a></td></tr>
    </if>

alttaki kodlari bulun


PHP:
<if condition="$post['rank']"><div class="smallfont">$post[rank]</div></if>

alttakilerle deiştirin
Kod:
$post[arcadeawards]

navbar templates ine gecin

alttaki kodlari bulun
PHP:
<td class="vbmenu_control"><a href="calendar.php?$session[sessionurl]">$vbphrase[calendar]</a></td>
altina su kodlari ekliyin

PHP:
<td class="vbmenu_control"><a href="arcade.php?$session[sessionurl]">Arcade</a></td>

sora alttaki kodlari bulun

PHP:
</table>
    </div>
    <!-- / header quick search form -->
ustune su kodlari ekliyin


PHP:
<tr>
            <td class="thead">Arcade Game Search</td>
        </tr>
        <tr>
            <td class="vbmenu_option" title="nohilite">
            <form action="arcade.php" method="post">
                <input type="text" class="bginput" name="search" size="20" />$gobutton<br />
            </form>
            </td>
        </tr>



Admincp >> Diller & Sözcükler >> Sözcük Düzenleyici >> Yeni Sözcük Ekle kısmından alttaki girdileri ekleyin.

Phrase Type: GLOBAL
Varname: arcade_cp_game_active
Text: Is Game Active? <dfn>Allows you to enable or disable the game</dfn>

Phrase Type: GLOBAL
Varname: arcade_cp_game_challenabled
Text: Challenges Enabled? <dfn>Allows challenges to be created for this game</dfn>

Phrase Type: GLOBAL
Varname: arcade_cp_game_netplay
Text: netPlay Enabled: <dfn>Live multiplayer gaming</dfn>

Phrase Type: GLOBAL
Varname: arcade_cp_game_playpanel
Text: Show Play Panel? <dfn>Enables a small navigation panel during play</dfn>

Phrase Type: GLOBAL
Varname: arcade_cp_game_showaward
Text: Show Award? <dfn>(Enable the award for the highest scorer, tournaments excluded)</dfn>

Phrase Type: GLOBAL
Varname: arcade_main_latestscorebit
Text: <b>{1}</b> scored <b>{2}</b> playing "<b>{3}</b>". <a href="arcade.php?do=play&gameid={4}">[Click here to play {3}!]

Phrase Type: Front-End Error Messages
Varname: quickreg_prompt
Text: You need to register in order to play in the Arcade. Click <a href="$vboptions[bburl]/register.php">here</a> to register.

Phrase Type: Control Panel Stop Message
Varname: arcade_cp_settingssaved
Text: <i>Arcade</i> Settings Saved Successfully

Bunları da ekledikten sonra;

Alttaki rar dosyasındaki dosyaları ordaki klasörlerine göre, forum klasörünüze upload edin. Sonra;
/admincp/install_arcade.php dosyasını çalıştırın ve next diyerek kurulumu yapın. Kurulumdan sonra "install_arcade.php" dosyasını silin.

Admincp >> Zamanlanmış Görevler >> Zamanlanmış Görev Ekle kısmından alttaki verileri girerek yeni görev ekleyin ve çalıştırın.

Başlık : Arcade Tasks
Ayın Haftası : *
Ayın Günü : *
Saat : *
Dakika : 23
İz Girdileri : Evet
Dosya Adı : ./includes/cron/arcadeupdate.php

Bunu kaydedip Zamanlanmış Görev Düzenleyici kısmından seçip çalıştırın.

eklenti ektedir...
 

Ekli dosyalar

Dark_Angel

Webmaster
Yönetici
elımde yaklasık 1000 den fazla hack var ortı tek tek eklıycem zaman oldukca bundan sonra vb bolumune bıraz yardım edeyım cok boslandı bu bolum
 

nikolis

New member
Arkadaşlar benim bir sorunum var bende vb 3.6.8 sürümü var includes/functions_showthread.php yi birtürlü bulamadım bunun yerine başka bir dosyamı olacak acama bu sürüm için.
Anlayamadım su eklentıyı yaw bı yardım edın :(
 
Üst