vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=113)
-   -   V3arcade - Show Last Score News (https://vborg.vbsupport.ru/showthread.php?t=109239)

MioTraGusa 02-28-2006 10:00 PM

V3arcade - Show Last Score News
 
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
HTML Code:

<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
HTML Code:

<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[imgdir_button]/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
PHP Code:

'arcade_news_bit'

Bellow add
PHP Code:

'arcade_scor_bit_first',
 
'arcade_scor_bit'

Search
PHP Code:

        eval('$newsbits .= "' fetch_template('arcade_news_bit') . '";');
    } 

Bellow add
PHP Code:

  // 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'], falsetruetruefalsetruefalse));
    if (
$scor['scorid'] == "1")
        {
        eval(
'$scorbits .= "' fetch_template('arcade_scor_bit_first') . '";');
        } else {
            eval(
'$scorbits .= "' fetch_template('arcade_scor_bit') . '";');
            }
    } 



Search
PHP Code:

    // 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
PHP Code:

  // 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!!

If your like this modification, please click Install

Sorry for my very bad english ...:nervous:


Omranic 03-01-2006 11:59 PM

hey thanks

there is two issues
the first code error here

your code must be
PHP Code:

 // 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'], falsetruetruefalsetruefalse));
    if (
$scor['scorid'] == "1")
        {
        eval(
'$scorbits .= "' fetch_template('arcade_scor_bit_first') . '";');
        } else {
            if (
$scor['scorgame'] <= "1")
            {
            eval(
'$scorbits .= "' fetch_template('arcade_scor_bit') . '";');
            }
        }
    }
  
// MioTraGuSa END Modification Last Scores 

notice the additional
}
at the end

if not it will give error

the second thing Is that the Last Scores menu doesn't show any thing exept "Instalation of Show last Scores - Done!!" phrase knowing that i have played some games & get in some hight scores & in some not hight score
this is my arcade

Hornstar 03-02-2006 01:57 AM

Ok great work, been waiting on some new mods for the arcade, cant wait til the actual arcade gets its next update this month.

MioTraGusa 03-02-2006 05:27 AM

yes the code is bad .. sorry.

The code is
PHP Code:

  // 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'], falsetruetruefalsetruefalse));
    if (
$scor['scorid'] == "1")
        {
        eval(
'$scorbits .= "' fetch_template('arcade_scor_bit_first') . '";');
        } else {
            eval(
'$scorbits .= "' fetch_template('arcade_scor_bit') . '";');
            }
    }
  
// MioTraGuSa END Modification Last Scores 

and
PHP Code:

  // 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 

Updated .. sorry

test it ..

soulface 03-30-2006 08:31 AM

its not working on 1.0.5 anymore :S

MioTraGusa 03-30-2006 12:23 PM

Quote:

Originally Posted by soulface
its not working on 1.0.5 anymore :S

Exactly, that is what does not work? At present I have installed the version 1.05 of v3arcade and work for me.

soulface 04-06-2006 01:03 PM

ummm its working on 1.0.6 now lol... don know whats the reason that was not working in 1.0.5 :/

MioTraGusa 04-06-2006 05:04 PM

I don't have neither idea, because it work for my well with the version 1.0.5 .The version 1.0.6 isn't most different.:confused:

Intex 10-14-2006 07:02 PM

How do you amend how many last scores show? At the moment, there's 10 by default and I only want to display 5.


All times are GMT. The time now is 04:47 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01406 seconds
  • Memory Usage 1,814KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_html_printable
  • (9)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (9)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete