Your fucking browser doesn't support JavaScript, so you can't post here.
VBsupport перешел с домена .ORG на родной .RU
Ура!
Пожалуйста, обновите свои закладки - VBsupport.ru
Блок РКН снят, форум доступен на всей территории России, включая новые терртории, без VPN
На форуме введена премодерация ВСЕХ новых пользователей
Почта с временных сервисов, типа mailinator.com, gawab.com и/или прочих, которые предоставляют временный почтовый ящик без регистрации и/или почтовый ящик для рассылки спама, отслеживается и блокируется, а так же заносится в спам-блок форума, аккаунты удаляются
for English speaking users:
You may be surprised with restriction of access to the attachments of the forum. The reason is the recent change in vbsupport.org strategy:
- users with reputation < 10 belong to "simple_users" users' group
- if your reputation > 10 then administrator (kerk, Luvilla) can decide to move you into an "improved" group, but only manually
Main idea is to increase motivation of community members to share their ideas and willingness to support to each other. You may write an article for the subject where you are good enough, you may answer questions, you may share vbulletin.com/org content with vbsupport.org users, receiving "thanks" equal your reputation points. We should not only consume, we should produce something.
- you may:
* increase your reputation (doing something useful for another members of community) and being improved
* purchase temporary access to the improved category:
10 $ for 3 months. - this group can download attachments, reputation/posts do not matter.
20 $ for 3 months. - this group can download attachments, reputation/posts do not matter + adds eliminated + Inbox capacity increased + files manager increased permissions.
Please contact kerk or Luvilla regarding payments.
Important!:
- if your reputation will become less then 0, you will be moved into "simple_users" users' group automatically.*
*for temporary groups (pre-paid for 3 months) reputation/posts do not matter.
Уважаемые пользователи!
На форуме открыт новый раздел "
Каталог фрилансеров "
и отдельный раздел для платных заказов "
Куплю/Закажу "
Если вы хотите приобрести какой то скрипт/продукт/хак из каталогов перечисленных ниже:
Каталог модулей/хаков
Ещё раз обращаем Ваше внимание: всё, что Вы скачиваете и устанавливаете на свой форум, Вы устанавливаете исключительно на свой страх и риск.
Сообщество vBSupport'а физически не в состоянии проверять все стили, хаки и нули, выкладываемые пользователями.
Помните: безопасность Вашего проекта - Ваша забота.
Убедительная просьба : при обнаружении уязвимостей или сомнительных кодов обязательно отписывайтесь в теме хака/стиля
Спасибо за понимание
04-04-2009, 06:35 PM
Эксперт
Join Date: Oct 2007
Location: Moscow
Posts: 558
Версия vB: 5.x.x
Пол:
Reputation:
Expert 1282
Репутация в разделе: 1161
хайд-магазин на базе vbcredits
44
Перелопатил vbcredits и его аддоны
Все руссифицированно!!!
В общем это можно назвать как магазин или как - денежный хайд
Можно использовать как для фрилансеров)))
Работает на 3.7.5 PL1 и на 3.8.2:ay:
Пофиксены 3 бага - которые были раньше;)
СКРИНШОТЫ
Оффтоп
РИДМИ по установке и настройке внутри архива)))
ПРОДОЛЖЕНИЕ И СКРИНЫ НА 2й странице)))
http://vbsupport.ru/forum/showthread.php?t=27607&page=2
Демо:
http://shop-scripts.ru/showthread.php?t=1078
Установка vBCredits под v3.8.4
http://vbsupport.ru/forum/showpost.p...8&postcount=41
====================================
Обновление на весну-лето 2011
Версия морально устарела. Новая сейчас 2.1
NEW!!! vbCredits 2.1 rus
Обновлен clientscript\credits_ajax_postadd.js (раньше использовался от версий 3.5.х :negative
Исправлен код (дописан) по созданию доп. таблиц в БД (разработчик до сих пор не исправил эту ошибку):greeting:
В шаблонах отсутствует текст, всё сделано на фразах
Изначально интегрирован прием средств через ПС "ИНТЕРКАССА" (с легкостью можно менять ПСы "Робокассу", "Интеркассу", "Z-Payment")
Пути для изображений не нужно прописывать, достаточно положить в папку картинок вашего стиля с заменой
Архив обновлен от
22-23 февраля 2011
Исправлен прием средств посредством РОБОКАССЫ
Исправлен путь картинки Z-PAYMENT
Сделан прием средств посредством WEBMONEY
Архив обновлен от
6 марта 2011 Пофиксен архив на очистку кредитов по крону с лицевого счета
=======================================================
[SPOILER]
Если у вас появляется ошибка
Deprecated: Assigning the return value of new by reference is deprecated in Z:\home\localhost\www\forum2\credits.php on line 38
То это говорит о том, что ваш хостер (или на denwer) перешел на использование PHP 5.3
Необходимо в файле credits.php найти 38 строчку: $bbcode_parser =
& new vB_BbCodeParser($vbulletin, fetch_tag_list());
и удалить амперсант, т.е. значок
& [/SPOILER]
Скачать
http://shop-scripts.ws/ss_templates/...d _RUS__2_.rar
Last edited by Дмитрий Кесаев : 04-29-2014 at 12:01 AM .
Yandex Bot
04-04-2009, 08:30 PM
Специалист
Join Date: Jan 2006
Location: Израиль
Posts: 453
Версия vB: 3.8.5
Пол:
Reputation:
Professional 493
Репутация в разделе: 437
в ридми изменения файлов есть графа:
Quote:
================================
Откройте: clientscript/vbulletin_textedit.js
================================
Найдите:
--------------------------------
// =============================================================================
// WYSIWYG editor
// =============================================================================
то что указанно найти, этого нету в этом файле
04-13-2009, 02:11 AM
Эксперт
Join Date: Oct 2007
Location: Moscow
Posts: 558
Версия vB: 5.x.x
Пол:
Reputation:
Expert 1282
Репутация в разделе: 1161
Интеграция v3 Arcade в vbcredits
Английская версия ставится по верх установленной...
Добавляются доп поля в БД и доп меню в админке)))
Это мануалка по установке)))
Оффтоп
Сделайте на всяк случай БЭКАП форума
1) Импортируйте продукт product-credits_v3arcade.xml
2)По мануалу сделайте замены в файлах и шаблоне.
3) Обновите F5 админ-панельку.
4) Настройки произведите для игр their costs и jackpots.
================================
Файл: arcade.php
================================
НАЙТИ:
--------------------------------
// Use the correct flash code depending on the game system.
switch ($game['system'])
{
case 0: // v3 Arcade Legacy Title
case 10: // iB Arcade Legacy Title (The same for the time being)
eval('$flashcode = "' . fetch_template('arcade_v3game') . '";');
break;
}
--------------------------------
Если вы не найдете, то:
--------------------------------
// Use the correct flash code depending on the game system.
switch ($game['system'])
{
case 0:
// v3 Arcade Legacy Title
eval('$flashcode = "' . fetch_template('arcade_v3game') . '";');
break;
case 10:
// iB Arcade Legacy Title (The same for the time being)
eval('$flashcode = "' . fetch_template('arcade_v3game') . '";');
break;
}
--------------------------------
ДОБАВИТЬ НИЖЕ:
--------------------------------
if ($vbulletin->options['credits_enabled'] AND $vbulletin->userinfo['userid'] AND !empty($game['cost']) AND ($vbulletin->userinfo['credits_v3_pass'] <= TIMENOW OR intval($_GET['pay'])))
{
$game['cost'] *= $vbulletin->userinfo['permissions']['credit_v3_discount'];
$addtojackpot = $game['cost'];
$game['cost'] *= (1 + $vbulletin->options['credits_v3_tax']);
if ($vbulletin->userinfo['credits'] < $game['cost'] OR !($vbulletin->userinfo['credits_canget'] OR $vbulletin->userinfo['credits_canspend']))
{
eval(standard_error(fetch_error('credits_v3_notenoughplay', $vbphrase['credits'])));
}
if ($game['jptype'])
{
$db->query_write("UPDATE " . TABLE_PREFIX . "arcade_games SET jackpot = jackpot + $addtojackpot WHERE gameid = " . $game['gameid']);
}
$db->query_write("UPDATE " . TABLE_PREFIX . "user SET credits = credits - " . $game['cost'] . " WHERE userid = " . $vbulletin->userinfo['userid']);
$db->query_write("INSERT INTO " . TABLE_PREFIX . "credits_v3session (gameid, userid) VALUES (" . $game['gameid'] . ", " . $vbulletin->userinfo['userid'] . ")");
}
--------------------------------
НАЙТИ:
--------------------------------
if ($highscore==1 && $vbulletin->userinfo['userid']!=$game['highscorerid'])
{
if ($vbulletin->options['neweventonhighscore'])
{
// Add a new news item, since there's a new champion for this game.
$db->query_write("INSERT INTO " . TABLE_PREFIX . "arcade_news (newstext, newstype, datestamp) VALUES ('" . addslashes(construct_phrase($vbphrase['x_is_the_new_champion'], $vbulletin->userinfo['username'], $game['title'], $game['gameid'])) . "', 'auto', " . TIMENOW . ")");
}
($hook = vBulletinHook::fetch_hook('arcade_new_champion')) ? eval($hook) : false;
// Break the bad news the next guy/gal.
$highnotify = true;
}
--------------------------------
ДОБАВИТЬ НИЖЕ:
--------------------------------
if ($vbulletin->options['credits_enabled'] AND $vbulletin->userinfo['userid'] AND ($vbulletin->userinfo['credits_canget'] OR $vbulletin->userinfo['credits_canspend']) AND $highscore AND $highscore <= $vbulletin->options['credits_v3_minrank'])
{
$db->query_write("DELETE FROM " . TABLE_PREFIX . "credits_v3session WHERE userid = " . $vbulletin->userinfo['userid'] . " AND gameid = " . $game['gameid']);
if ($db->affected_rows())
{
switch ($vbulletin->options['credits_v3_jptype'])
{
case 'rank':
$winamount = $game['jackpot'] / $highscore;
break;
case 'score':
$winamount = $game['jackpot'] * $highscore;
break;
case 'static':
$winamount = $game['jackpot'];
break;
}
if ($game['jptype'])
{
if ($winamount > $game['jackpot'])
{
$winamount = $game['jackpot'];
}
$db->query_write("UPDATE " . TABLE_PREFIX . "arcade_games SET jackpot = jackpot - $winamount WHERE gameid = " . $game['gameid']);
}
$db->query_write("UPDATE " . TABLE_PREFIX . "user SET credits = credits + $winamount WHERE userid = " . $vbulletin->userinfo['userid']);
}
}
--------------------------------
НАЙТИ:
--------------------------------
// Can this user play?
if (!($permissions['arcadepermissions'] & $vbulletin->bf_ugp['arcadepermissions']['canplayarcade']))
{
print_no_permission();
}
--------------------------------
ЗАМЕНИТЬ КОД НА:
--------------------------------
// Can this user play?
if (!($permissions['arcadepermissions'] & $vbulletin->bf_ugp['arcadepermissions']['canplayarcade']))
{
if ($vbulletin->options['credits_enabled'] AND $vbulletin->userinfo['userid'] AND ($vbulletin->userinfo['credits_canget'] OR $vbulletin->userinfo['credits_canspend']) AND $vbulletin->userinfo['permissions']['credit_v3_accesscost'])
{
if (!$vbulletin->userinfo['credits_v3_access'])
{
eval(standard_error(fetch_error('credits_v3_buyaccess', $vbulletin->session->vars['sessionurl'], vb_number_format($vbulletin->userinfo['permissions']['credit_v3_accesscost'], $vbulletin->options['credits_decimals']), $vbphrase['credits'])));
}
}
else
{
print_no_permission();
}
}
================================
Файл: admincp/arcadeadmin.php
================================
НАЙТИ:
--------------------------------
// vbBux Integration
if ($vbulletin->options['vbbux_pointsfield'])
{
print_input_row($vbphrase['game_cost'], 'cost', $game['cost']);
}
--------------------------------
ЗАМЕНИТЬ КОД НА:
--------------------------------
if ($vbulletin->options['credits_enabled'])
{
print_table_break();
print_column_style_code(array('width: 70%', 'width: 30%'));
print_table_header($vbphrase['credit_settings']);
print_input_row($vbphrase['credits_v3_costacp'], 'cost', $game['cost']);
print_select_row($vbphrase['credits_v3_jptypeacp'], 'jptype', array($vbphrase['credits_v3_static'], $vbphrase['credits_v3_raising']), $game['jptype']);
print_input_row($vbphrase['credits_v3_jackpotacp'], 'jackpot', $game['jackpot']);
}
--------------------------------
НАЙТИ:
--------------------------------
'cost' => TYPE_NUM
--------------------------------
ЗАМЕНИТЬ КОД НА:
--------------------------------
'cost' => TYPE_NUM,
'jptype' => TYPE_BOOL,
'jackpot' => TYPE_NUM
--------------------------------
НАЙТИ:
--------------------------------
cost='" . $vbulletin->GPC['cost'] . "'
--------------------------------
ЗАМЕНИТЬ КОД НА:
--------------------------------
cost='" . $vbulletin->GPC['cost'] . "',
jptype='" . $vbulletin->GPC['jptype'] . "',
jackpot='" . $vbulletin->GPC['jackpot'] . "'
--------------------------------
НАЙТИ:
--------------------------------
'isreverse' => TYPE_ARRAY_UINT,
--------------------------------
ДОБАВИТЬ НИЖЕ:
--------------------------------
'cost' => TYPE_ARRAY_NUM,
'jptype' => TYPE_ARRAY_BOOL,
'jackpot' => TYPE_ARRAY_NUM,
--------------------------------
НАЙТИ:
--------------------------------
isreverse='" . $vbulletin->GPC['isreverse'][$id] . "',
--------------------------------
ДОБАВИТЬ НИЖЕ:
--------------------------------
cost='" . $vbulletin->GPC['cost'][$id] . "',
jptype='" . $vbulletin->GPC['jptype'][$id] . "',
jackpot='" . $vbulletin->GPC['jackpot'][$id] . "',
--------------------------------
НАЙТИ:
--------------------------------
print_yes_no_row($vbphrase['use_reverse'], "isreverse[$game[gameid]]", $game['isreverse']);
--------------------------------
ДОБАВИТЬ НИЖЕ:
--------------------------------
if ($vbulletin->options['credits_enabled'])
{
print_input_row($vbphrase['credits_v3_costacp'], "cost[$game[gameid]]", $game['cost']);
print_select_row($vbphrase['credits_v3_jptypeacp'], "jptype[$game[gameid]]", array($vbphrase['credits_v3_static'], $vbphrase['credits_v3_raising']), $game['jptype']);
print_input_row($vbphrase['credits_v3_jackpotacp'], "jackpot[$game[gameid]]", $game['jackpot']);
}
================================
Шаблон: arcade_game_bit
================================
НАЙТИ:
--------------------------------
<if condition="$show['fav']">
<img src="$vboptions[arcadeimages]/subfav.gif" align="absmiddle" id="fav_$game[gameid]" class="point" onclick="dofav($game[gameid])" alt="$vbphrase[sub_favorite]" border="0" />
<else />
<img src="$vboptions[arcadeimages]/addfav.gif" align="absmiddle" id="fav_$game[gameid]" class="point" onclick="dofav($game[gameid])" alt="$vbphrase[add_favorite]" border="0" />
</if>
--------------------------------
ДОБАВИТЬ НИЖЕ:
--------------------------------
<if condition="$vbulletin->options['credits_enabled']">
<br /><span class="smallfont">
<if condition="$show['override']">
<a href="arcade.php?$session[sessionurl]do=play&gameid=$game[gameid]&pay=1"><phrase 1="$game[cost]" 2="$game[jackpot]" 3="$vbphrase[credits]">$vbphrase[credits_v3_override]</phrase></a>
<else />
$vbphrase[credits_v3_cost]: <b>$game[cost]</b> $vbphrase[credits_v3_jackpot]: <b>$game[jackpot]</b>
</if>
</span>
</if>
================================
Файл продукта в аттаче)))
Last edited by Дмитрий Кесаев : 04-13-2009 at 02:17 AM .
04-13-2009, 02:29 AM
Эксперт
Join Date: Oct 2007
Location: Moscow
Posts: 558
Версия vB: 5.x.x
Пол:
Reputation:
Expert 1282
Репутация в разделе: 1161
Интеграция ibProArcade с vbcredits
Английская версия)))
Делайте бэкап на всяк случай))
1) Загружаете все файлы из папки upload к себе на хост
2) Импортируйте продукт product-credits_ibproarcade.xml
3) Произведите замены в файлах
6) Обновите настройки для групп пользователей
Оффтоп
================================
Файл: arcade.php
================================
НАЙТИ:
--------------------------------
$specialtemplates = array();
--------------------------------
ЗАМЕНИТЬ НА:
--------------------------------
$specialtemplates = array('credits_central');
--------------------------------
НАЙТИ:
--------------------------------
$DB->query("SELECT t.nbtries, t.demare, t.datestarted, t.cost, t.numplayers, g.gtitle, g.gname, g.gid, g.decpoints, g.highscore_type FROM ibf_tournaments as t, ibf_games_list as g WHERE t.gid = g.gid AND t.tid=".$tid." LIMIT 0, 1");
--------------------------------
ЗАМЕНИТЬ НА:
--------------------------------
$DB->query("SELECT t.*, g.gtitle, g.gname, g.gid, g.decpoints, g.highscore_type FROM ibf_tournaments as t, ibf_games_list as g WHERE t.gid = g.gid AND t.tid = $tid LIMIT 0, 1");
--------------------------------
НАЙТИ:
--------------------------------
$tinfo['jackpottxt'] = "";
if ( (floatval($tinfo['cost']) > 0) && (($vbulletin->options['vbbux_enabled'] == 1) && ($vbulletin->options['vbbux_arcadeintegration'] == 1)) )
{
$tinfo['jackpottxt'] = $ibforums->lang['tourney_jackpot1']."<b>".$tinfo['cost']."</b><br />";
$tinfo['jackpottxt'].= $ibforums->lang['tourney_jackpot2']."<b>".(floatval($tinfo['cost'])*intval($tinfo['numplayers']))."</b><br />";
}
--------------------------------
ЗАМЕНИТЬ НА:
--------------------------------
$tinfo['jackpottxt'] = '<div>' . construct_phrase($GLOBALS['vbphrase']['credits_ibp_tournyinfo'], vb_number_format($tinfo['cost'], $vbulletin->options['credits_decimals']), $GLOBALS['vbphrase']['credits'], vb_number_format($tinfo['jackpot'], $vbulletin->options['credits_decimals'])) . '</div>';
--------------------------------
НАЙТИ:
--------------------------------
$DB->query("SELECT t.numplayers,t.datestarted,t.tid,g.gtitle,g.gid,t.champion FROM ibf_tournaments as t, ibf_games_list as g WHERE champion = '' AND t.gid = g.gid AND demare>0 ORDER BY datestarted DESC");
while($row = $DB->fetch_row()) {
$row['link'] = "<a href='".$ibforums->base_url."act=Arcade&do=viewtourney&tid=".$row['tid']."'>".$ibforums->lang['view_tourney']."</a>";
--------------------------------
ЗАМЕНИТЬ НА:
--------------------------------
$DB->query("SELECT t.*, g.gtitle, g.gid FROM ibf_tournaments as t, ibf_games_list as g WHERE champion = '' AND t.gid = g.gid AND demare > 0 ORDER BY datestarted DESC");
while ($row = $DB->fetch_row())
{
$row['link'] = '<a href="' . $ibforums->base_url . 'act=Arcade&do=viewtourney&tid=' . $row['tid'] . '">' . $ibforums->lang['view_tourney'] . '</a>';
$row['jackpot'] = vb_number_format($row['jackpot'], $vbulletin->options['credits_decimals']);
--------------------------------
НАЙТИ:
--------------------------------
if ($costhtmlstart!="")
{
// add the costs to HTML and format it
$value = $vbulletin->options['vbbux_decimalplaces'];
if (($vbversion != "3.0") && ($NATIVEMODE==0))
{
($hook = vBulletinHook::fetch_hook('ibproarcade_view_tourney_getcosts')) ? eval($hook) : false;
}
$costhtmlstart .= vb_number_format($row['cost'], $value);
}
--------------------------------
ЗАМЕНИТЬ НА:
--------------------------------
if ($vbversion != '3.0' AND !$NATIVEMODE)
{
($hook = vBulletinHook::fetch_hook('ibproarcade_view_tourney_getcosts')) ? eval($hook) : false;
}
--------------------------------
НАЙТИ:
--------------------------------
$selected['sort']['gtitle']="";
$selected['sort']['gcount']="";
$selected['sort']['gwords']="";
$selected['sort']['g_rating']="";
$selected['sort']['added']="";
$selected['order']['ASC']="";
$selected['order']['DESC']="";
// make sure the setting is clean and has a valid value
if (!in_array($this->arcade->settings['g_display_sort'],array('gtitle','gcount','gwords','g_rating','added')))
{
$this->arcade->settings['g_display_sort'] = "gtitle";
}
--------------------------------
ЗАМЕНИТЬ НА:
--------------------------------
$selected = array(
'sort' => array(
'gtitle' => '',
'gcount' => '',
'gwords' => '',
'g_rating' => '',
'added' => '',
'cost' => '',
'jackpot' => ''
),
'order' => array(
'ASC' => '',
'DESC' => ''
)
);
if (!in_array($this->arcade->settings['g_display_sort'], array('gtitle', 'gcount', 'gwords', 'g_rating', 'added', 'cost', 'jackpot')))
{
$this->arcade->settings['g_display_sort'] = 'gtitle';
}
--------------------------------
НАЙТИ:
--------------------------------
// detect vBplaza
if (($vbulletin->options['vbbux_enabled'] == 1) && ($vbulletin->options['vbbux_arcadeintegration'] == 1))
{
$the_game['ibprostyle_info1']=" <fieldset>
<legend><b>{$ibforums->lang['gb_jackpot_title']}</b></legend>
<span class=\"smallfont\"><center>";
$the_game['ibprostyle_info2']=" </center></span></fieldset>";
$the_game['v3style_info']="<br />";
$the_game['cost_info'] = $ibforums->lang['costs_pgame']."<b>".$the_game['cost']."</b><br />";
if ($the_game['jackpot_type']=='-1')
{
// raising Jackpot, so display it in GameBit!
$the_game['jackpot_info'] = $ibforums->lang['gb_win_jackpot_raising']."<b>".$the_game['jackpot']."</b>";
}
else
{
// static Jackpot
$the_game['jackpot_info'] = $ibforums->lang['gb_win_jackpot_static']."<b>".$the_game['jackpot']."</b>";
}
}
--------------------------------
ЗАМЕНИТЬ НА:
--------------------------------
if ($vbulletin->options['credits_enabled'])
{
$the_game['ibprostyle_info1'] = '<fieldset><legend><b>' . $vbphrase['credits'] . '</b></legend><span class="smallfont"><center>';
$the_game['ibprostyle_info2'] = '</center></span></fieldset>';
$the_game['v3style_info'] = '<b>' . $vbphrase['credits'] . ':</b><br />';
$the_game['cost_info'] = $vbphrase['credits_ibp_playcost'] . ': <b>' . $the_game['cost'] . '</b><br />';
$the_game['jackpot_info'] = $vbphrase['jackpot'] . ': <b>' . $the_game['jackpot'] . '</b>' . $the_game['pass_extra'];
}
--------------------------------
НАЙТИ:
--------------------------------
$DB->query("SELECT gid, mid, lid FROM ibf_games_league WHERE gid=".$gid." AND mid=".$lboard['mid']." AND position=0");
--------------------------------
ДОБАВИТЬ НИЖЕ:
--------------------------------
if ($vbulletin->userinfo['credits_canearn'] AND $ctr <= $vbulletin->options['credits_ibp_minrank'] AND $lboard['score'] == $player_score AND $vbulletin->userinfo['credits_ibp_paid'])
{
$paidout = false;
if ($vbulletin->options['credits_ibp_buffer'])
{
$topcurrent = $vbulletin->db->query_read("SELECT * FROM " . TABLE_PREFIX . "games_scores WHERE gid = " . $gid . " ORDER BY score " . ( $ginfo['highscore_type'] == 'high' ? 'DESC' : 'ASC' ) . ", timespent ASC LIMIT " . $vbulletin->options['credits_ibp_minrank']);
while ($topscore = $vbulletin->db->fetch_array($topcurrent))
{
if ($topscore['datescored'] != ( empty($gtime) ? TIMENOW : $gtime ) AND $topscore['name'] == $vbulletin->userinfo['username'] AND $topscore['datescored'] + $vbulletin->options['credits_ibp_buffer'] > TIMENOW)
{
$paidout = true;
break;
}
}
$vbulletin->db->free_result($topcurrent);
}
switch ($vbulletin->options['credits_ibp_jptype'])
{
case 'rank':
$winamount = $ginfo['jackpot'] / $ctr;
break;
case 'score':
$winamount = $ginfo['jackpot'] * $points;
break;
case 'static':
$winamount = $ginfo['jackpot'];
break;
}
if ($winamount)
{
if ($ginfo['jackpot_type'] == 'raising')
{
if ($winamount > $ginfo['jackpot'])
{
$winamount = $ginfo['jackpot'];
}
$vbulletin->db->query_write("UPDATE " . TABLE_PREFIX . "games_list SET jackpot = jackpot - $winamount WHERE gid = $gid");
}
$wintax = $vbulletin->options['credits_ibp_tax'] * $winamount;
$vbulletin->userinfo['credits_ibp_paid'] = false;
$amount = $winamount - $wintax;
$vbulletin->db->query_write("UPDATE " . TABLE_PREFIX . "user SET credits = credits + $amount WHERE userid = " . $vbulletin->userinfo['userid']);
$vbulletin->db->query_write("INSERT INTO " . TABLE_PREFIX . "credits_transactions (touserid, action, comment, amount, timestamp) VALUES (" . $vbulletin->userinfo['userid'] . ", 'ibp_game', '" . $vbulletin->db->escape_string(construct_phrase($GLOBALS['vbphrase']['credits_ibp_game_desc'], vb_number_format($player_score, 0), $ginfo['gtitle'])) . "', $amount, " . TIMENOW . ")");
build_datastore('credits_central', $vbulletin->credits_central + $wintax, false);
}
}
--------------------------------
НАЙТИ:
--------------------------------
$DB->query("SELECT name,id FROM ibf_members WHERE id='".$winner."' LIMIT 1");
$name = $DB->fetch_row();
--------------------------------
ЗАМЕНИТЬ НА:
--------------------------------
$tourn = $vbulletin->db->query_first("SELECT * FROM " . TABLE_PREFIX . "tournaments WHERE tid = " . $tid);
$name = $vbulletin->db->query_first("SELECT *, username AS name FROM " . TABLE_PREFIX . "user WHERE userid = " . $winner);
if ($tourn['jackpot'])
{
$oldtourn = $vbulletin->db->query_first("SELECT user.* FROM " . TABLE_PREFIX . "tournaments AS tourn LEFT JOIN " . TABLE_PREFIX . "user AS user ON(tourn.champion = user.username) WHERE user.credits_canspend = 1 AND tourn.champion != '' AND tourn.tid = " . $tid);
if ($oldtourn['userid'] != $winner)
{
$wintax = $vbulletin->options['credits_ibp_tax'] * $tourn['jackpot'];
$amount = $tourn['jackpot'] - $wintax;
if (!empty($oldtourn['userid']))
{
$vbulletin->db->query_write("UPDATE " . TABLE_PREFIX . "user SET credits = credits - $amount WHERE userid = " . $oldtourn['userid']);
$vbulletin->db->query_write("DELETE FROM " . TABLE_PREFIX . "credits_transactions WHERE touserid = " . $oldtourn['userid'] . " AND action = 'ibp_tourn' AND amount = $amount ORDER BY timestamp DESC LIMIT 1");
}
else if ($wintax)
{
build_datastore('credits_central', $vbulletin->credits_central + $wintax, false);
}
if ($name['credits_canearn'])
{
$vbulletin->db->query_write("UPDATE " . TABLE_PREFIX . "user SET credits = credits + $amount WHERE userid = " . $winner);
$vbulletin->db->query_write("INSERT INTO " . TABLE_PREFIX . "credits_transactions (touserid, action, comment, amount, timestamp) VALUES (" . $winner . ", 'ibp_tourn', '" . $vbulletin->db->escape_string(construct_phrase($GLOBALS['vbphrase']['credits_ibp_tourn_desc'], vb_number_format(( $vbulletin->userinfo['userid'] == $winner ? $savearray[1] : $opponentinfo['rungscore'] ), 0), $gameinfo['gtitle'])) . "', $amount, " . TIMENOW . ")");
}
}
}
--------------------------------
НАЙТИ:
--------------------------------
'cost' => $costs,
--------------------------------
ДОБАВИТЬ НИЖЕ:
--------------------------------
'jackpot' => $joincost,
'jackpot_type' => 'raising',
--------------------------------
НАЙТИ:
--------------------------------
$DB->query("SELECT creat, gid, demare, numplayers, cost FROM ibf_tournaments WHERE tid = '".$tid."' LIMIT 1");
--------------------------------
ЗАМЕНИТЬ НА:
--------------------------------
$DB->query("SELECT * FROM ibf_tournaments WHERE tid = " . $tid . " LIMIT 1");
================================
Файл: arcade/modules/mod_arcade.php
================================
НАЙТИ:
--------------------------------
$validsort = array('gtitle','gcount','gwords','g_rating','added');
--------------------------------
ЗАМЕНИТЬ НА:
--------------------------------
$validsort = array('gtitle', 'gcount', 'gwords', 'g_rating', 'added', 'cost', 'jackpot');
--------------------------------
НАЙТИ:
--------------------------------
if ($arcadepass_expire!="")
{
$the_links = "<span class='smallfont' style='color: red;'><b>".$ibforums->lang['arcade_pass'].$arcadepass_expire."</b></span><br />".$the_links;
}
--------------------------------
ЗАМЕНИТЬ НА:
--------------------------------
if ($vbulletin->userinfo['userid'] AND $vbulletin->userinfo['creditperms']['credit_ibp_passcost'])
{
$the_links = '<span class="smallfont"><b>' . ( $vbulletin->userinfo['credits_ibp_pass'] > TIMENOW ? construct_phrase($GLOBALS['vbphrase']['credits_ibp_passexpires'], vbdate($vbulletin->options['dateformat'] . ', ' . $vbulletin->options['timeformat'], $vbulletin->userinfo['credits_ibp_pass']), $GLOBALS['vbphrase']['credits']) : construct_phrase($GLOBALS['vbphrase']['credits_ibp_buypass'], vb_number_format($vbulletin->userinfo['creditperms']['credit_ibp_passcost'], $vbulletin->options['credits_decimals']), $GLOBALS['vbphrase']['credits'], $vbulletin->session->vars['sessionurl']) ) . '</b></span><br />' . $the_links;
}
================================
Файл: arcade/skins/skin_Arcade.php AND/OR skin_v3Arcade.php
================================
НАЙТИ:
--------------------------------
<tr>
<td width="100%" align="center" class="thead" colspan="5">{$ibforums->lang['active_tournaments']}</td>
</tr>
<tr>
<td width="20%" align="center" class="tcat">{$ibforums->lang['legend_of_zelda']}</td>
<td width="20%" align="center" class="tcat">{$ibforums->lang['tourney_title']}</td>
<td width="20%" align="center" class="tcat">{$ibforums->lang['num_of_players']}</td>
<td width="20%" align="center" class="tcat">{$ibforums->lang['your_status']}</td>
<td width="20%" align="center" class="tcat">{$ibforums->lang['date_started']}</td>
</tr>
--------------------------------
ЗАМЕНИТЬ НА:
--------------------------------
<tr>
<td width="100%" align="center" class="thead" colspan="6">{$ibforums->lang['active_tournaments']}</td>
</tr>
<tr>
<td width="17%" align="center" class="tcat">{$ibforums->lang['legend_of_zelda']}</td>
<td width="18%" align="center" class="tcat">{$ibforums->lang['tourney_title']}</td>
<td width="17%" align="center" class="tcat">{$ibforums->lang['num_of_players']}</td>
<td width="16%" align="center" class="tcat">{$ibforums->lang['your_status']}</td>
<td width="16%" align="center" class="tcat">{$ibforums->lang['date_started']}</td>
<td width="16%" align="center" class="tcat">{$GLOBALS['vbphrase']['jackpot']}</td>
</tr>
--------------------------------
НАЙТИ:
--------------------------------
<td align='center' nowrap='nowrap' class='alt1'>{$rowinfo['datestarted']}</td>
</tr>
--------------------------------
ЗАМЕНИТЬ НА:
--------------------------------
<td align='center' nowrap='nowrap' class='alt1'>{$rowinfo['datestarted']}</td>
<td align='center' nowrap='nowrap' class='alt1'>{$rowinfo['jackpot']}</td>
</tr>
--------------------------------
НАЙТИ ДВАЖДЫ:
--------------------------------
<option value="added" {$selected['sort']['added']}>{$ibforums->lang['dateadded']}</option>
--------------------------------
ДОБАВИТЬ НИЖЕ:
--------------------------------
<option value="cost" {$selected['sort']['cost']}>{$GLOBALS['vbphrase']['credits_ibp_playcost']}</option>
<option value="jackpot" {$selected['sort']['jackpot']}>{$GLOBALS['vbphrase']['jackpot']}</option>
================================
Файл: admincp/arcade.php
================================
НАЙТИ:
--------------------------------
$sortextra = "";
if (($IN['sort']=="dateasc") || ($IN['sort']=="datedesc") || ($IN['sort']=="timesplayed") || ($IN['sort']=="inactive") || ($IN['sort']=="costs") || ($IN['sort']=="jpraise") || ($IN['sort']=="jpstatic"))
{
if ($IN['sort']=="dateasc") { $sortextra = "added ASC,"; }
if ($IN['sort']=="datedesc") { $sortextra = "added DESC,"; }
if ($IN['sort']=="timesplayed") { $sortextra = "gcount DESC,"; }
if ($IN['sort']=="costs") { $sortextra = "cost DESC,"; }
if ($IN['sort']=="jpraise")
{
$sortextra = "jackpot DESC,";
if ($query_extra=="") { $query_extra ="WHERE jackpot_type='-1'";}
else { $query_extra.=" AND jackpot_type='-1'";}
}
if ($IN['sort']=="jpstatic")
{
$sortextra = "jackpot_type DESC,";
if ($query_extra=="") { $query_extra ="WHERE jackpot_type<>'-1'";}
else { $query_extra.=" AND jackpot_type<>'-1'";}
}
}
--------------------------------
ЗАМЕНИТЬ НА:
--------------------------------
switch ($IN['sort'])
{
case 'dateasc':
$sortextra = 'added ASC,';
break;
case 'datedesc':
$sortextra = 'added DESC,';
break;
case 'timesplayed':
$sortextra = 'gcount DESC,';
break;
case 'cost':
$sortextra = 'cost DESC,';
break;
case 'jackpot':
$sortextra = 'jackpot DESC,';
break;
}
--------------------------------
НАЙТИ:
--------------------------------
if ($IN['opt_jackpottype']==1)
{
if ($IN['select_jackpottype']==0)
{
// static Jackpot
if ($staticjp)
{
$db_string = $DB->compile_db_update_string( array ( 'jackpot_type' => $IN['select_jackpotstatic'] ) );
}
else
{
$db_string = $DB->compile_db_update_string( array ( 'jackpot_type' => '0' ));
}
}
else
{
// raising Jackpot
$db_string = $DB->compile_db_update_string( array ( 'jackpot_type' => '-1' ) );
}
$DB->query("UPDATE ibf_games_list SET ".$db_string." WHERE gid IN ".$cat_string);
}
else
{
// no changes on Jackpot-Type, so finally store static value if that was changed
if ($staticjp)
{
// check if Jackpot-Type of that Game isn't set to RAISING (done via Query)
$db_string = $DB->compile_db_update_string( array ( 'jackpot_type' => $staticjackpot ) );
$DB->query("UPDATE ibf_games_list SET ".$db_string." WHERE jackpot_type<>'-1' AND gid IN ".$cat_string);
}
}
--------------------------------
ЗАМЕНИТЬ НА:
--------------------------------
if ($IN['opt_jackpottype'])
{
$DB->query("UPDATE ibf_games_list SET " . $DB->compile_db_update_string(array('jackpot_type' => $IN['select_jackpottype'])) . " WHERE gid IN " . $cat_string);
}
--------------------------------
НАЙТИ ДВАЖДЫ:
--------------------------------
if( (!is_numeric($costs)) || ($costs < 0) )
{
$costs = 0;
}
if (($jackpottype<0) || ($jackpottype>1))
{
$jackpottype = 1;
}
if( (!is_numeric($jackpot)) || ($jackpot < 0) )
{
$jackpot = 0;
}
if( (!is_numeric($static)) || ($static < 0) )
{
$static = 0;
}
if ($jackpottype == 1)
{
// if raising Jackpot set the Jackpot itself to Zero
$jackpottype = "-1";
}
else
{
// static Jackpot
$jackpottype = $static;
}
--------------------------------
ЗАМЕНИТЬ НА В ОБОИХ:
--------------------------------
$costs = $vbulletin->input->clean_gpc('r', 'cost', TYPE_UNUM);
$jackpottype = $vbulletin->input->clean_gpc('r', 'jackpottype', TYPE_NOHTML);
$jackpot = $vbulletin->input->clean_gpc('r', 'jackpot', TYPE_UNUM);
--------------------------------
НАЙТИ:
--------------------------------
'cost' => $costs,
--------------------------------
ЗАМЕНИТЬ НА:
--------------------------------
'cost' => $vbulletin->input->clean_gpc('r', 'costs', TYPE_UNUM),
'jackpot_type' => $vbulletin->input->clean_gpc('r', 'jackpottype', TYPE_NOHTML),
'jackpot' => $vbulletin->input->clean_gpc('r', 'jackpot', TYPE_UNUM) + ( $vbulletin->input->clean_gpc('r', 'jackpottype', TYPE_NOHTML) == 'raising' ? (sizeof($match) - 1) * $vbulletin->input->clean_gpc('r', 'costs', TYPE_UNUM) : 0 ),
--------------------------------
НАЙТИ:
--------------------------------
$DB->query("INSERT INTO ibf_tournament_players (" .$db_string['FIELD_NAMES']. ") VALUES (". $db_string['FIELD_VALUES'] .")");
--------------------------------
ДОБАВИТЬ НИЖЕ:
--------------------------------
$vbulletin->db->query_write("UPDATE " . TABLE_PREFIX . "user SET credits = credits - " . $vbulletin->input->clean_gpc('r', 'costs', TYPE_UNUM) . " WHERE userid = $key");
--------------------------------
НАЙТИ:
--------------------------------
print_table_header($ibforums->lang['acp_tourney_edituser']);
print_description_row($ibforums->lang['acp_tourney_editusertxt']."<input type='text' name='username' value='' size='32' class='textinput' readonly='readonly'>");
print_input_row($ibforums->lang['acp_tourney_replace'], 'replaceid', '', 0);
print_submit_row($ibforums->lang['acp_replace'], 0);
--------------------------------
ДОБАВИТЬ НИЖЕ:
--------------------------------
$tourn = $vbulletin->db->query_first("SELECT * FROM " . TABLE_PREFIX . "tournaments WHERE tid = " . $IN['tid']);
print_form_header('credits_admin', 'ibp_tourn');
print_table_header($vbphrase['credits_ibp_settings']);
construct_hidden_code('tournament', $IN['tid']);
print_input_row($vbphrase['credits_ibp_acp_entrance'], 'costs', $tourn['cost']);
print_select_row($vbphrase['credits_ibp_acp_jackpot_type_tourn'], 'jackpottype', array('raising' => $vbphrase['raising'], 'static' => $vbphrase['static']), $tourn['jackpot_type']);
print_input_row($vbphrase['credits_ibp_acp_jackpot_value_tourn'], 'jackpot', $tourn['jackpot']);
print_submit_row();
================================
Архив с файлами в аттаче)))
04-13-2009, 03:42 AM
Эксперт
Join Date: Oct 2007
Location: Moscow
Posts: 558
Версия vB: 5.x.x
Пол:
Reputation:
Expert 1282
Репутация в разделе: 1161
Интеграция
vbcredits с хаком post_thanks (любой хак где нада кликать спасибо)...
Так вот, если кликнул спасибо, то получаешь 0.10 центов или 0.10 кредита (у кого на что настроено)
В аттаче продукт
04-13-2009, 03:49 AM
Эксперт
Join Date: Oct 2007
Location: Moscow
Posts: 558
Версия vB: 5.x.x
Пол:
Reputation:
Expert 1282
Репутация в разделе: 1161
Интеграция vbcredits с хаком букмейкерской конторы vBookie
Необходимо тока импортировать продукт.
Качаем из аттача
04-13-2009, 04:00 AM
Эксперт
Join Date: Oct 2007
Location: Moscow
Posts: 558
Версия vB: 5.x.x
Пол:
Reputation:
Expert 1282
Репутация в разделе: 1161
Интеграция vbcredits с хаком vBArmy - vBulletin Army System
Сделайте на всяк случай бэкап
Мануалка
Оффтоп
PHP Code:
================================
Файл : ( forums )/ armysystem / att_include . php
================================
Найти :
--------------------------------
if ( $this -> value [ 'entries' ]) {
$this -> value [ 'entries' ] .= ", $field = ' $value '" ;
} else {
$this -> value [ 'entries' ] = " $field = ' $value '" ;
}
--------------------------------
Добавить ниже :
--------------------------------
if ( $field == 'gold' ) $this -> credits = $value ;
--------------------------------
Найти :
--------------------------------
if (! $this -> value [ 'where' ]) {
$this -> value [ 'where' ] = "WHERE $field = ' $value '" ;
} else {
$this -> value [ 'where' ] .= " and $field = ' $value '" ;
}
--------------------------------
Добавить ниже :
--------------------------------
if ( $field == 'userid' ) $this -> userid = $value ;
if ( $field == 'id' ) $this -> gameid = $value ;
--------------------------------
Найти :
--------------------------------
if( $type == count ){
--------------------------------
Добавить выше :
--------------------------------
if ( $this -> value [ 'table' ] == 'as_user' )
{
if ( substr ( $type , 0 , 6 ) == 'select' AND $this -> userid )
{
$this -> value [ 'field' ] .= ( $this -> value [ 'field' ] ? ', ' : '' ) . "(SELECT credits FROM " . TABLE_PREFIX . "user WHERE userid = " . $this -> userid . ") AS gold" ;
unset( $this -> userid );
}
if ( $type == 'update' AND $this -> gameid AND isset( $this -> credits ))
{
$vbulletin -> db -> query_write ( "UPDATE " . TABLE_PREFIX . "user SET credits = " . $this -> credits . " WHERE userid = (SELECT userid FROM " . TABLE_PREFIX . "as_user WHERE id = " . $this -> gameid . ")" );
unset( $this -> gameid , $this -> credits );
}
}
================================
04-16-2009, 04:00 PM
Эксперт
Join Date: Oct 2007
Location: Moscow
Posts: 558
Версия vB: 5.x.x
Пол:
Reputation:
Expert 1282
Репутация в разделе: 1161
Интеграция vbcredits с хаком Inferno Quiz - это это викторина, ты задаешь вопросы они отвечают, анализируются результаты... и т.д. ;)
Работать должен на всей линейке 3.6.х-.3.8.х
Проверять не было времени)))
Делайте всегда бэкап - на всяк случай)))
Inferno Quiz 2.2
http://vbsupport.ru/forum/showthread...highlight=quiz
МАНУАЛКА:
Оффтоп
PHP Code:
1 ) Импортировать product - credits_quiz . xml
2 ) Отредактировать файлы
================================
Файл : quiz . php
================================
НАЙТИ :
--------------------------------
$bbcode_parser =& new vB_BbCodeParser ( $vbulletin , fetch_tag_list ());
--------------------------------
ДОБАВИТЬ НИЖЕ :
--------------------------------
if ( $vbulletin -> userinfo [ 'credits' ] < $Quiz [ 'credit_cost' ])
{
eval( standard_error ( fetch_error ( 'credits_quiz_notenough' , vb_number_format ( $Quiz [ 'credit_cost' ], $vbulletin -> options [ 'credits_decimals' ]), $vbphrase [ 'credits' ])));
}
$db -> query_write ( "UPDATE " . TABLE_PREFIX . "user SET credits = credits - " . $Quiz [ 'credit_cost' ] . " WHERE userid = " . $vbulletin -> userinfo [ 'userid' ]);
--------------------------------
НАЙТИ :
--------------------------------
$Report .= "[/list]\n\nYour overall score was: { $Overall } %" ;
--------------------------------
ДОБАВИТЬ НИЖЕ :
--------------------------------
$prize = $Quiz [ 'credit_prize' ];
if ( $Quiz [ 'credit_multiply' ])
{
$prize *= ( $Overall / 100 );
}
$db -> query_write ( "UPDATE " . TABLE_PREFIX . "user SET credits = credits + $prize WHERE userid = " . $vbulletin -> userinfo [ 'userid' ]);
$Report .= "\n" . construct_phrase ( $vbphrase [ 'credits_prizestring' ], vb_number_format ( $prize , $vbulletin -> options [ 'credits_decimals' ]), $vbphrase [ 'credits' ]);
================================
Файл : admincp / admin_quiz . php
================================
НАЙТИ :
--------------------------------
Print_My_DDM ( "Allow users who have finished the quiz to view the correct answers?" , "q_viewanswer" , $viewanswer ,- 1 );
--------------------------------
ДОБАВИТЬ НИЖЕ :
--------------------------------
print_input_row ( $vbphrase [ 'credit_cost' ], 'credit_cost' , 0 );
print_input_row ( $vbphrase [ 'credit_prize' ], 'credit_prize' , 0 );
print_yes_no_row ( $vbphrase [ 'credit_multiply' ], 'credit_multiply' , 1 );
--------------------------------
НАЙТИ :
--------------------------------
Print_My_DDM ( "Allow users who have finished the quiz to view the correct answers?" , "q_viewanswer" , $viewanswer , $quiz [ 'q_viewanswer' ]);
--------------------------------
ДОБАВИТЬ НИЖЕ :
--------------------------------
print_input_row ( $vbphrase [ 'credit_cost' ], 'credit_cost' , $quiz [ 'credit_cost' ]);
print_input_row ( $vbphrase [ 'credit_prize' ], 'credit_prize' , $quiz [ 'credit_prize' ]);
print_yes_no_row ( $vbphrase [ 'credit_multiply' ], 'credit_multiply' , $quiz [ 'credit_multiply' ]);
--------------------------------
НАЙТИ :
--------------------------------
$DB -> query ( "delete from " . TABLE_PREFIX . "quiz_submissions where sid=' { $sub [ 'sid' ]} '" );
--------------------------------
ДОБАВИТЬ НИЖЕ :
--------------------------------
$subuser = fetch_userinfo ( $sub [ 's_from' ]);
$db -> query_write ( "UPDATE " . TABLE_PREFIX . "user SET credits = credits + " . $vbulletin -> usergroupcache [ $subuser [ 'usergroupid' ]][ 'credit_makequiz' ] . " WHERE userid = " . $subuser [ 'userid' ]);
--------------------------------
НАЙТИ :
--------------------------------
$DB -> query ( "insert into " . TABLE_PREFIX . "quiz
(q_name,q_state,q_perms,q_start,q_end,q_autoend,q_timelimit,q_viewanswer,q_desc,q_forcat,q_image)
values
(' { $q_name } ', { $q_state } ,' { $Perms } '," . time (). ", { $End_Time } , { $q_autoend } , { $q_timelimit } , { $q_viewanswer } ,' { $q_desc } ', $q_forcat ,' { $q_image } ')" );
--------------------------------
ЗАМЕНИТЬ ЭТИМ :
--------------------------------
$vbulletin -> input -> clean_array_gpc ( 'r' , array(
'credit_cost' => TYPE_NUM ,
'credit_prize' => TYPE_NUM ,
'credit_multiply' => TYPE_BOOL
));
$db -> query_write ( "
INSERT INTO " . TABLE_PREFIX . "quiz
(
q_name,
q_state,
q_perms,
q_start,
q_end,
q_autoend,
q_timelimit,
q_viewanswer,
q_desc,
q_forcat,
q_image,
credit_cost,
credit_prize,
credit_multiply
)
VALUES
(
' $q_name ',
$q_state ,
' $Perms ',
" . TIMENOW . ",
$End_Time ,
$q_autoend ,
$q_timelimit ,
$q_viewanswer ,
' $q_desc ',
$q_forcat ,
' $q_image ',
" . $vbulletin -> GPC [ 'credit_cost' ] . ",
" . $vbulletin -> GPC [ 'credit_prize' ] . ",
" . $vbulletin -> GPC [ 'credit_multiply' ] . "
)
" );
--------------------------------
НАЙТИ :
--------------------------------
$DB -> query ( "update " . TABLE_PREFIX . "quiz
set q_name=' { $q_name } ',q_state= { $q_state } ,q_perms=' { $Perms } ',q_end= { $End_Time } ,q_autoend= { $q_autoend } ,q_timelimit= { $q_timelimit } ,q_viewanswer= { $q_viewanswer } ,q_desc=' { $q_desc } ',q_forcat= $q_forcat ,q_image=' { $q_image } '
where qid=' { $quiz [ 'qid' ]} '" );
--------------------------------
ЗАМЕНИТЬ ЭТИМ :
--------------------------------
$vbulletin -> input -> clean_array_gpc ( 'r' , array(
'credit_cost' => TYPE_NUM ,
'credit_prize' => TYPE_NUM ,
'credit_multiply' => TYPE_BOOL
));
$db -> query_write ( "
UPDATE " . TABLE_PREFIX . "quiz SET
q_name = ' $q_name ',
q_state = $q_state ,
q_perms = ' $Perms ',
q_end = $End_Time ,
q_autoend = $q_autoend ,
q_timelimit = $q_timelimit ,
q_viewanswer = $q_viewanswer ,
q_desc = ' $q_desc ',
q_forcat = $q_forcat ,
q_image = ' $q_image ',
credit_cost = " . $vbulletin -> GPC [ 'credit_cost' ] . ",
credit_prize = " . $vbulletin -> GPC [ 'credit_prize' ] . ",
credit_multiply = " . $vbulletin -> GPC [ 'credit_multiply' ] . "
WHERE
qid = $quiz [ qid ]
" );
================================
04-16-2009, 04:14 PM
Эксперт
Join Date: Oct 2007
Location: Moscow
Posts: 558
Версия vB: 5.x.x
Пол:
Reputation:
Expert 1282
Репутация в разделе: 1161
Интеграция vbcredits с хаком Living Avatars - Живые Аватары
http://vbsupport.ru/forum/showthread...living+avatars
МАНУАЛКА
Оффтоп
PHP Code:
--------------------------------
ТОЛЬКО ДЛЯ LIVING AVATARS v1.2 .
================================
ФАЙЛ : ( forums )/ living_avatars / index . php
================================
НАЙТИ :
--------------------------------
$points_remaining = $user_info [ 'points' ] - $item [ 'cost' ];
--------------------------------
ДОБАВИТЬ НИЖЕ :
--------------------------------
$DB -> query ( "UPDATE " . $GLOBALS [ 'forum_info_arr' ][ 'forum_table_prefix' ] . "user SET credits = credits - " . floatval ( $item [ 'cost' ]) . " WHERE userid = $user_info [ user_id ] " );
--------------------------------
НАЙТИ :
--------------------------------
$userpostcount = $DB -> query_first ( "SELECT posts AS value FROM " . $forum_info_arr [ 'forum_table_prefix' ] . "user WHERE userid = $user_info [ user_id ] " );
--------------------------------
ЗАМЕНИТЬ ЭТИМ :
--------------------------------
$userpostcount = $DB -> query_first ( "SELECT credits + " . floatval ( $user_info [ 'points_spent' ]) . " AS value FROM " . $forum_info_arr [ 'forum_table_prefix' ] . "user WHERE userid = $user_info [ user_id ] " );
$decset = $DB -> query_first ( "SELECT value FROM " . $forum_info_arr [ 'forum_table_prefix' ] . "setting WHERE varname = 'credits_decimals'" );
$userpostcount [ 'value' ] = round ( $userpostcount [ 'value' ], $decset [ 'value' ]);
--------------------------------
ТОЛЬКО ДЛЯ LIVING AVATARS v1.1 .
================================
ФАЙЛ : ( forums )/ living_avatars / index . php
================================
НАЙТИ :
--------------------------------
$points_remaining = $userinfo [ 'points' ] - $item [ cost ];
--------------------------------
ДОБАВИТЬ НИЖЕ :
--------------------------------
$DB -> query ( "UPDATE " . $GLOBALS [ 'foruminfo' ][ 'table_prefix' ] . "user SET credits = credits - " . floatval ( $item [ 'cost' ]) . " WHERE userid = $userinfo [ userid ] " );
================================
ФАЙЛ : ( forums )/ living_avatars / includes / session . php
================================
НАЙТИ :
--------------------------------
$userpostcount = $DB -> query_first ( "SELECT posts AS value FROM " . $foruminfo [ 'table_prefix' ] . "user WHERE userid = $userinfo [ userid ] " );
--------------------------------
ЗАМЕНИТЬ ЭТИМ :
--------------------------------
$userpostcount = $DB -> query_first ( "SELECT credits + " . floatval ( $userinfo [ 'points_spent' ]) . " AS value FROM " . $foruminfo [ 'table_prefix' ] . "user WHERE userid = $userinfo [ userid ] " );
$decset = $DB -> query_first ( "SELECT value FROM " . $foruminfo [ 'table_prefix' ] . "setting WHERE varname = 'credits_decimals'" );
$userpostcount [ 'value' ] = round ( $userpostcount [ 'value' ], $decset [ 'value' ]);
================================
04-16-2009, 04:25 PM
Эксперт
Join Date: Oct 2007
Location: Moscow
Posts: 558
Версия vB: 5.x.x
Пол:
Reputation:
Expert 1282
Репутация в разделе: 1161
Интеграция vbcredits с хаком Timed Registration Incentive
1) Отредактируйте значения в upload/plugins/credits_drive.php, сохраните и залейте на хост
2) Создайте новый модуль в админке (продукты и модули):
Местоположение модуля: register_addmember_complete
Заголовок: Award Users Extra Credits During Registration Drive
Код PHP модуля : include(DIR . '/plugins/credits_drive.php');
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
All times are GMT +4. The time now is 08:15 AM .