MioTraGusa
02-28-2006, 10:00 PM
This Modification show the last scores and the games played in V3arcade main page.
I do not know if the next version of v3arcade taught also the latest scores, but this modification is a way for it.
Fully phrased modification.
Tested in Vbulletin 3.5.3 and V3arcade 1.0.2
Products to import: (1) - product-v3arcade_score_news_english.xml or product-v3arcade_score_news_spanish.xml
Templates to edit: (1) - arcade_main
Templates Added: (2) - arcade_scor_bit & arcade_scor_bit_first
Phrases Added: (4)
DB changes: Add new fields in arcade_news_scor
Instructions...
Download the attached product and install it in Admin CP -> Plugin System -> Manage Products -> [Add/Import Product]
Edit the template "arcade_main"Search
<tbody id="collapseobj_newsandevents" style="$vbcollapse[collapseobj_newsandevents]">
<tr align="center">
<td class="alt1" valign="top" style="padding: 0px">
<table cellpadding="0" cellspacing="0" border="0" width="100%" align="center">
$newsbits
</table>
</td>
</tr>
</tbody>
Bellow add
<thead>
<tr align="center">
<td class="thead"><a style="float:$stylevar[right]" href="#top" onclick="return toggle_collapse('newscorevents')"><img id="collapseimg_newscorevents" src="$stylevar/collapse_thead$vbcollapse[collapseimg_newscorevents].gif" alt="" border="0" /></a>$vbphrase[newscorevents]</td>
</tr>
</thead>
<tbody id="collapseobj_newscorevents" style="$vbcollapse[collapseobj_newscorevents]">
<tr align="center">
<td class="alt1" valign="top" style="padding: 0px">
<table cellpadding="0" cellspacing="0" border="0" width="100%" align="center">
$scorbits
</table>
</td>
</tr>
</tbody>
Edit arcade.php file in /forumroot/Search
'arcade_news_bit',
Bellow add
'arcade_scor_bit_first',
'arcade_scor_bit',
Search
eval('$newsbits .= "' . fetch_template('arcade_news_bit') . '";');
}
Bellow add
// MioTraGuSa Modification Last Scores
// Fetch the latest scores.
$scorbits = '';
$scorquery = $db->query_read("SELECT * FROM " . TABLE_PREFIX . "arcade_news_scor AS arcade_news_scor ORDER BY datescor DESC LIMIT " . $vbulletin->options['quicksearchresults']);
while ($scor = $db->fetch_array($scorquery))
{
exec_switch_bg();
// Format the score news date/time.
$scor['date'] = vbdate($vbulletin->options['logdateformat'], $scor['datescor']);
$scor['newstext'] = unhtmlspecialchars($parser->do_parse($scor['scortext'], false, true, true, false, true, false));
if ($scor['scorid'] == "1")
{
eval('$scorbits .= "' . fetch_template('arcade_scor_bit_first') . '";');
} else {
eval('$scorbits .= "' . fetch_template('arcade_scor_bit') . '";');
}
}
Search
// Save the session.
$db->query_write("UPDATE " . TABLE_PREFIX . "arcade_sessions SET ping='$difference', valid=$validate WHERE sessionid=" . $vbulletin->GPC['id'] . " AND userid=" . $vbulletin->userinfo['userid']);
Bellow add
// MioTraGuSa Modification Last Scores
$gamescornews['score'] = sprintf((float)$game['score']);
if ($gamescornews['score'] <= 1) {
$db->query_write("INSERT INTO " . TABLE_PREFIX . "arcade_news_scor (scortext, scortype, scorgame, scoruserid, datescor) VALUES ('" . addslashes(construct_phrase($vbphrase['x_points_in_the_y_gamezero'], $vbulletin->userinfo['username'], $gamescornews['score'], $game['title'])) . "', 'auto', '$game[gameid]', " .$vbulletin->userinfo['userid']. ", " . TIMENOW . ")");
} else {
$db->query_write("INSERT INTO " . TABLE_PREFIX . "arcade_news_scor (scortext, scortype, scorgame, scoruserid, datescor) VALUES ('" . addslashes(construct_phrase($vbphrase['x_points_in_the_y_game'], $vbulletin->userinfo['username'], $gamescornews['score'], $game['title'])) . "', 'auto', '$game[gameid]', " .$vbulletin->userinfo['userid']. ", " . TIMENOW . ")");
}
// MioTraGuSa END Modification Last Scores
Upload modified file
Enjoy!![I]
If your like this modification, please click Install (https://vborg.vbsupport.ru/vborg_miscactions.php?do=installhack&threadid=109239)
Sorry for my very bad english ...:nervous:
I do not know if the next version of v3arcade taught also the latest scores, but this modification is a way for it.
Fully phrased modification.
Tested in Vbulletin 3.5.3 and V3arcade 1.0.2
Products to import: (1) - product-v3arcade_score_news_english.xml or product-v3arcade_score_news_spanish.xml
Templates to edit: (1) - arcade_main
Templates Added: (2) - arcade_scor_bit & arcade_scor_bit_first
Phrases Added: (4)
DB changes: Add new fields in arcade_news_scor
Instructions...
Download the attached product and install it in Admin CP -> Plugin System -> Manage Products -> [Add/Import Product]
Edit the template "arcade_main"Search
<tbody id="collapseobj_newsandevents" style="$vbcollapse[collapseobj_newsandevents]">
<tr align="center">
<td class="alt1" valign="top" style="padding: 0px">
<table cellpadding="0" cellspacing="0" border="0" width="100%" align="center">
$newsbits
</table>
</td>
</tr>
</tbody>
Bellow add
<thead>
<tr align="center">
<td class="thead"><a style="float:$stylevar[right]" href="#top" onclick="return toggle_collapse('newscorevents')"><img id="collapseimg_newscorevents" src="$stylevar/collapse_thead$vbcollapse[collapseimg_newscorevents].gif" alt="" border="0" /></a>$vbphrase[newscorevents]</td>
</tr>
</thead>
<tbody id="collapseobj_newscorevents" style="$vbcollapse[collapseobj_newscorevents]">
<tr align="center">
<td class="alt1" valign="top" style="padding: 0px">
<table cellpadding="0" cellspacing="0" border="0" width="100%" align="center">
$scorbits
</table>
</td>
</tr>
</tbody>
Edit arcade.php file in /forumroot/Search
'arcade_news_bit',
Bellow add
'arcade_scor_bit_first',
'arcade_scor_bit',
Search
eval('$newsbits .= "' . fetch_template('arcade_news_bit') . '";');
}
Bellow add
// MioTraGuSa Modification Last Scores
// Fetch the latest scores.
$scorbits = '';
$scorquery = $db->query_read("SELECT * FROM " . TABLE_PREFIX . "arcade_news_scor AS arcade_news_scor ORDER BY datescor DESC LIMIT " . $vbulletin->options['quicksearchresults']);
while ($scor = $db->fetch_array($scorquery))
{
exec_switch_bg();
// Format the score news date/time.
$scor['date'] = vbdate($vbulletin->options['logdateformat'], $scor['datescor']);
$scor['newstext'] = unhtmlspecialchars($parser->do_parse($scor['scortext'], false, true, true, false, true, false));
if ($scor['scorid'] == "1")
{
eval('$scorbits .= "' . fetch_template('arcade_scor_bit_first') . '";');
} else {
eval('$scorbits .= "' . fetch_template('arcade_scor_bit') . '";');
}
}
Search
// Save the session.
$db->query_write("UPDATE " . TABLE_PREFIX . "arcade_sessions SET ping='$difference', valid=$validate WHERE sessionid=" . $vbulletin->GPC['id'] . " AND userid=" . $vbulletin->userinfo['userid']);
Bellow add
// MioTraGuSa Modification Last Scores
$gamescornews['score'] = sprintf((float)$game['score']);
if ($gamescornews['score'] <= 1) {
$db->query_write("INSERT INTO " . TABLE_PREFIX . "arcade_news_scor (scortext, scortype, scorgame, scoruserid, datescor) VALUES ('" . addslashes(construct_phrase($vbphrase['x_points_in_the_y_gamezero'], $vbulletin->userinfo['username'], $gamescornews['score'], $game['title'])) . "', 'auto', '$game[gameid]', " .$vbulletin->userinfo['userid']. ", " . TIMENOW . ")");
} else {
$db->query_write("INSERT INTO " . TABLE_PREFIX . "arcade_news_scor (scortext, scortype, scorgame, scoruserid, datescor) VALUES ('" . addslashes(construct_phrase($vbphrase['x_points_in_the_y_game'], $vbulletin->userinfo['username'], $gamescornews['score'], $game['title'])) . "', 'auto', '$game[gameid]', " .$vbulletin->userinfo['userid']. ", " . TIMENOW . ")");
}
// MioTraGuSa END Modification Last Scores
Upload modified file
Enjoy!![I]
If your like this modification, please click Install (https://vborg.vbsupport.ru/vborg_miscactions.php?do=installhack&threadid=109239)
Sorry for my very bad english ...:nervous: