2. открыть /system/mod.php и вставить
Код: Выделить всё
//Игры
case "apps":
include ENGINE_DIR.'/modules/apps.php';
break;
Код: Выделить всё
//Игры
case "apps":
include ADMIN_DIR.'/apps.php';
break;
4. открыть /system/clases/wall.php и найти
Код: Выделить всё
//Если ссылка
} elseif($attach_type[0] == 'link' AND preg_match('/http:\/\/(.*?)+$/i', $attach_type[1]) AND $cnt_attach_link == 1){
выше вставить
Код: Выделить всё
//Если игра
} elseif($attach_type[0] == 'apps' AND file_exists(ROOT_DIR."/uploads/apps/{$attach_type[1]}/{$attach_type[2]}")){
$attach_result .= '<div><a href="?i='.$attach_type[1].'" onclick="apps.view(\''.$attach_type[1].'\', this.href, \' \'); return false;"><img src=\"/uploads/apps/'.$attach_type[1].'/'.$attach_type[2].'" style="margin-right:5px;width:250px" /></a></div>';
$resLinkTitle = '';
Код: Выделить всё
//APPS
var vii_apps_search_delay = false;
var vii_apps_search_val = '';
var apps_preload = true;
var doload = 5;
var loads = 20;
var apps = {
close:function(h){
history.pushState({link:h}, null, h);
$('#newbox_miniature').remove();
$('html,body').css({'overflow':'auto','margin':'0'});
},
c:function(){
$('#newbox_miniature').remove();
},
sendWall:function(id){
$.post('/index.php?go=apps&act=mywall', {id:id},function(){
Box.Info('msg_info', 'Приложения', 'Вы успешно рассказали друзьям.', 300);
});
},
gSearch: function(){
var a = $('#query_games').val();
if(!a){
$('#apps_all').show();
$('#apps_search').hide();
$('#apps_se_load').fadeOut(100);
apps_preload = true;
}
if(a != 0){
apps_preload = false;
$('#apps_se_load').fadeIn('fast');
0 == vii_apps_search_val != a && a != 0 < a.length && (clearInterval(vii_apps_search_delay), vii_apps_search_delay = setInterval(function(){
apps.xSearch();
}, 600));
}
},
xSearch: function(){
clearInterval(vii_apps_search_delay);
var a = $('#query_games').val();
$.post('/index.php?go=apps&act=search', {query_games: a}, function(d){
if(a != 0){
$('#apps_all').hide();
$('#apps_search').show();
$('#apps_se_load').fadeOut(100);
$('#apps_search_res').html(d);
$(".apps_last:last").css('border', '0px');
} else {
$('#apps_all').show();
$('#apps_search').hide();
$('#apps_se_load').fadeOut(100);
}
});
},
showMore: function(){
if($('#apps_text_load').text() == 'Показать больше приложений' && apps_preload){
textLoad('apps_text_load');
$.post('/index.php?go=apps&act=loads', {num:loads}, function(d){
loads = loads+20;
row = d.split('||');
$('#apps_pop').append(row[0]);
$('#apps_new').append(row[1]);
$('#apps_text_load').text('Показать больше приложений');
if(!row[0] && !row[1]) $('.apps_but2').remove();
});
}
},
showMoreOld: function(){
if($('#apps_text_load_old').text() == 'Показать больше приложений'){
textLoad('apps_text_load_old');
$.post('/index.php?go=apps&act=doload',{num:doload}, function(d){
doload = doload+5;
row = d.split('||');
$('#apps_my_games').append(row[0]);
$('#apps_activity').append(row[1]);
$('#apps_text_load_old').text('Показать больше приложений');
if(!row[0] && !row[1]) $('.apps_but').remove();
});
}
},
view: function(a, h, c){
history.pushState({link:h}, null, h);
$('html,body').css({'overflow':'hidden','margin':'0 17px 0 0'});
$.post('/index.php?go=apps&act=view', {id: a}, function(d){
$('body').append('<div id="newbox_miniature"><div class="miniature_box"><div class="miniature_pos" style="width: 607px;margin-top:30px;"><div class="miniature_title fl_l">Запуск игры</div><a class="cursor_pointer fl_r" onclick="apps.close(\'/apps\')">Закрыть</a><div class="clear"></div>'+d+'</div></div></div>');
});
},
mydel: function(i, t){
if(t){
$('.js_titleRemove').remove();
$('#app'+i).html('<div align="center" style="color:#777;height:40px;padding-top:10px">Игра успешно удалена.</div>');
} else
$('#apps_rdel_txt').html('<div class="fl_r" style="color:#777;margin-top:6px;font-weight:normal">Игра удалена из списках ваших игр</div>');
$.post('/index.php?go=apps&act=mydel', {id: i});
}
}
Код: Выделить всё
CREATE TABLE IF NOT EXISTS "vii_apps" (
"id" int(11) NOT NULL AUTO_INCREMENT,
"app" varchar(255) NOT NULL,
"cols" int(11) NOT NULL,
"title" varchar(255) NOT NULL,
"img" varchar(255) NOT NULL,
"desk" text NOT NULL,
PRIMARY KEY ("id")
) AUTO_INCREMENT=0 ;
CREATE TABLE IF NOT EXISTS "vii_apps_users" (
"id" int(11) NOT NULL AUTO_INCREMENT,
"user_id" int(11) NOT NULL,
"game_id" int(11) NOT NULL,
"date" int(11) NOT NULL,
PRIMARY KEY ("id")
) AUTO_INCREMENT=0 ;