News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

SMF Arcade

Started by niko, October 01, 2004, 02:45:55 PM

Previous topic - Next topic

babjusi

Quote from: masss on August 19, 2007, 10:36:29 AM
Where can i get more games for arcade??? (with working scores!)

www.smfarcade.info

Skhilled

ATTENTION!!! If you are using a different theme other than the default please state so in your post along with the version of smf and arcade that you are using! We can help you a lot quicker!

The arcade will only install to the default theme. You will have to modify all other themes to work with it using the code in install-rc2.xml.

Switch to the default theme BEFORE installing the arcade. Do not do this in your profile...only in admin! If it works using the default theme then you will have to modify your theme to work with it.

If you are having problems with using a different theme do a search at smfarcade to see if it has already been done. If not, please post your index.template.php file there with the name of the theme and we might be able to make it work.

Also, do not use UTF-8 with your language file for the arcade. It's probably the mod that is at fault but they will probably work better without it.

There is a new version called 2.0.10. This will fix a few issues that some of you may have. Please, go to smfarcade.info for assistance.

tam2oo5

Hi there, i made a regular group in my smf board called donated members. I set their permissions for them to be able to see the arcade , but when one of them clicks it they cannot see the games. Do you have any idea whats causing this?

Jaba

#2783
Hi all. Great software SMF :) Some errors in Admin log but site running  ok!

Firstly I would like to say Hi and at the same time what a great job to SMF for creating what I think is one of the best bits of software I have used for a while!

I've just set up my 1st test site, now looking for a Domain and will then move it there! All working in a couple of hours in its basic form.
Not urgent I think but I have some errors in Admin log but can't see any problems on the site.
They relate to Arcade which I just installed.

The error log:

http://my.web.site.com/forum/index.php?action=arcade;sa=stats

2: Invalid argument supplied for foreach()
File: /home/sites/my.web.site.com/public_html/forum/Themes/default/ArcadeMenu.template.php (eval?)
Line: 594


The error seems to be created when I look at the Arcade stats! The only thing I can see is maybe one player has 2 entries for the same Game under "Longest champions" Is this correct?
Info: I did install the bright Forest theme before installing Arcade, then had to make an edit to index.template.php to get the Menu to show it!
Ver. SMF 1.1.3 - Theme Bright Forest - Arcade 2.0.9

Not urgent, but any info on the error would be a help!
Many Thanx

masss

How can i add ads at the top of .swf flash game?

GouroB

i am getting this error whenever i am trying to install this mod

Error in Package Installation
At least one error was encountered during a test installation of this package. It is strongly recommended that you do not continue with installation unless you know what you are doing, and have made a backup very recently. This error may be caused by a conflict between the package you're trying to install and another package you have already installed, an error in the package, a package which requires another package that you don't have installed yet, or a package designed for another version of SMF.


5.     Execute Modification     ./Themes/default/index.template.php     Test failed


any idea ? i am using latest version of smf and i tried both version of arcade ( 2.0.9 and 2.0.10 ) both gave me error.

Chantal Matar

#2786
Hello all,

After my Arcade working perfectly well since installation it is now not working properly.

High Scores are not being saved:

'Score was not saved because checks failed and you probably tried to cheat or your browser is malfunctioning'

What can I do to fix this?

I installed 4 new games today which are working fine.  Are the two things related?

Did a search on this but didn't find anything.  Can someone help me please?

Thanks.

(I am using the latest version for 1.1.3)

www.PS3SmallTalk.com (it's disabled but I can enable it for guests if you need to check it out)

Chantal Matar

#2787
Oh and another thing I just noticed.

When I play a game called Alien Hunters on my forum, once it's finished instead of saving my score says Error: Game Not Found! 

Eh?  ???


EDIT:  Hurrah I've just sorted it out!  Just so everybody knows what I did - I uploaded the repair.settings file and fixed the cookie which was wrong.  That fixed the previous problem but not this one.

I then deleted and reinstalled Alien Hunter.  Problem solved!

Jaba

I've held back installing too many games I have a few errors also as posted above!
One game Breakit CH will not save scores but 5 others are 100% ok.
When I look at the stats for the games only then the error is recorded in the error log!

Seems to me some of the games have a few small bugs Re. saving scores + the Arcade might have a small bug as I only started getting entries in my log file after installing it! Not a problem hopefully as it is playing all the games so that's the most important thing!!


rider

Quote from: tam2oo5 on August 22, 2007, 01:13:47 PM
Hi there, i made a regular group in my smf board called donated members. I set their permissions for them to be able to see the arcade , but when one of them clicks it they cannot see the games. Do you have any idea whats causing this?
Quote from: Jaba on August 25, 2007, 06:09:00 PM
I've held back installing too many games I have a few errors also as posted above!
One game Breakit CH will not save scores but 5 others are 100% ok.
When I look at the stats for the games only then the error is recorded in the error log!

Seems to me some of the games have a few small bugs Re. saving scores + the Arcade might have a small bug as I only started getting entries in my log file after installing it! Not a problem hopefully as it is playing all the games so that's the most important thing!!


What permissions did you set for them and what are your arcade permissions set for?.Some of the games form smfarcade.info won't work cause of the changes made to the arcade over time but there are places you can get lots of games that will work.

masss

Please help! How can i add html (java) ads into arcare?? I really would like to do that! Please help! Which file do i have to modify and how?

fwitt

Quote from: masss on August 26, 2007, 05:37:27 AM
Please help! How can i add html (java) ads into arcare?? I really would like to do that! Please help! Which file do i have to modify and how?

put the ad code where you want it to appear in arcade.template.php

Virtual Hero

I have some members that need to use a proxy to view my website. The arcade works fine through the proxy as long as they do not log in (the play as a guest). However their scores do not save this way (yes I know there is a setting but I don't want that).

My question is, after a guest plays a game, can the guest be taken to the log me in screen so they can log in right then and save their scores?

Thanks!

Skhilled

Quote from: Jaba on August 23, 2007, 10:00:46 AM
Hi all. Great software SMF :) Some errors in Admin log but site running  ok!

Firstly I would like to say Hi and at the same time what a great job to SMF for creating what I think is one of the best bits of software I have used for a while!

I've just set up my 1st test site, now looking for a Domain and will then move it there! All working in a couple of hours in its basic form.
Not urgent I think but I have some errors in Admin log but can't see any problems on the site.
They relate to Arcade which I just installed.

The error log:

http://my.web.site.com/forum/index.php?action=arcade;sa=stats

2: Invalid argument supplied for foreach()
File: /home/sites/my.web.site.com/public_html/forum/Themes/default/ArcadeMenu.template.php (eval?)
Line: 594


The error seems to be created when I look at the Arcade stats! The only thing I can see is maybe one player has 2 entries for the same Game under "Longest champions" Is this correct?
Info: I did install the bright Forest theme before installing Arcade, then had to make an edit to index.template.php to get the Menu to show it!
Ver. SMF 1.1.3 - Theme Bright Forest - Arcade 2.0.9

Not urgent, but any info on the error would be a help!
Many Thanx

This will occur when no one has rated any games yet. Once any one game is rated it will not show up again.

Jaba

QuoteThis will occur when no one has rated any games yet. Once any one game is rated it will not show up again.
Thank you that answer is spot on! :) I just rated a few games yesterday and can so no more entries in the log for this!
Many thanx.

Skhilled

Quote from: masss on August 26, 2007, 05:37:27 AM
Please help! How can i add html (java) ads into arcare?? I really would like to do that! Please help! Which file do i have to modify and how?
I believe it is Arcade.template.php.

masss

Where do i have to put it? I was trying but without success :'(

Code

Quote<?php
// Version: 2.0.8; Arcade

function template_arcade_above()
{
   global $scripturl, $txt, $context;

   echo '
   <div style="padding: 3px;">', theme_linktree(), '</div>';

   if (!empty($context['arcade_tabs']))
   {
      echo '
   <div class="tborder">
      <table class="bordercolor" border="0" cellpadding="4" cellspacing="1" width="100%">
         <tr class="titlebg">
            <td colspan="2">
               ', $context['arcade_tabs']['title'], '
            </td>
         </tr>
         ', isset($context['arcade']['notice']) ? '
         <tr class="windowbg2">
            <td colspan="2">' . $context['arcade']['notice'] . '</td>
         </tr>' : '', '
         <tr class="catbg">
            <td align="center">', $txt['arcade_game_highlights'], '</td>
            <td align="center">', $txt['arcade_latest_scores'], '</td>
         </tr>
         <tr class="windowbg">
            <td class="smalltext" style="padding: 2ex; text-align: center;">';

      if ($context['arcade']['longest_champion'] !== false)
         echo sprintf($txt['arcade_game_with_longest_champion'], $context['arcade']['longest_champion']['member_link'], $context['arcade']['longest_champion']['game_link']), '<br />';

      if ($context['arcade']['most_played'] !== false)
         echo sprintf($txt['arcade_game_most_played'], $context['arcade']['most_played']['link']), '<br />';

      if ($context['arcade']['best_player'] !== false)
         echo sprintf($txt['arcade_game_best_player'], $context['arcade']['best_player']['link']), '<br />';

      if ($context['arcade']['stats']['games'] != 0)
         echo sprintf($txt['arcade_game_we_have_games'], $context['arcade']['stats']['games']), '<br />';

      echo '
            </td>
            <td class="smalltext" style="padding: 2ex; text-align: center;">';

      if (count($context['arcade']['latest_scores']) > 0)
         foreach ($context['arcade']['latest_scores'] as $score) // Print out latest scores
            printf($txt['arcade_latest_score'], $scripturl . '?action=arcade;sa=play;game=' . $score['game_id'], $score['name'], $score['score'], $score['memberLink'], strip_tags($score['time']));
      else
         echo $txt['arcade_no_scores'];

      echo '
            </td>
         </tr>
      </table>
   </div>

   <table cellpadding="0" cellspacing="0" border="0" style="margin-left: 10px;">
      <tr>
         <td class="maintab_first">&nbsp;</td>';

         // Print out all the items in this tab.
         foreach ($context['arcade_tabs']['tabs'] as $tab)
         {
            if (!empty($tab['is_selected']))
            {
               echo '
         <td class="maintab_active_first">&nbsp;</td>
         <td valign="top" class="maintab_active_back">
            <a href="', $tab['href'], '">', $tab['title'], '</a>
         </td>
         <td class="maintab_active_last">&nbsp;</td>';

               $selected_tab = $tab;
            }
            else
               echo '
         <td valign="top" class="maintab_back">
            <a href="', $tab['href'], '">', $tab['title'], '</a>
         </td>';
         }

         // the end of tabs
         echo '
         <td class="maintab_last">&nbsp;</td>
      </tr>
   </table><br />';

   }

   echo '
   <div style="padding-top: 5px;">
      <a name="top"></a>';

}

// Game list
function template_arcade_list()
{
   global $scripturl, $txt, $context, $settings;

   $arcade = array(
      'random' => array(
         'text' => 'arcade_random_game',
         'image' => 'arcade_random.gif', // Theres no image for this included (yet)
         'url' => $scripturl . '?action=arcade;sa=play;random',
         'lang' => true
      ),
      'favorites' => array(
         'text' => 'aracde_favorites_only',
         'image' => 'arcade_favorites.gif',
         'url' => $scripturl . '?action=arcade;favorites',
         'lang' => true
      ),
   );

   if (isset($context['arcade']['search']) && $context['arcade']['search'])
      $arcade['search'] = array(
         'text' => 'aracde_show_all',
         'image' => 'arcade_search.gif',
         'url' => $scripturl . '?action=arcade',
         'lang' => true
      );


   // Header for Game listing
   echo '
      <table border="0" cellpadding="0" cellspacing="0" width="100%">
         <tr>
            <td class="middletext" style="padding-bottom: 4px;" valign="bottom">', $txt[139], ': ', $context['arcade']['pageIndex'], '   &nbsp;&nbsp;<a href="#bot"><b>', $txt['topbottom5'], '</b></a></td>
            <td style="padding-right: 1ex;" align="right">
               <table cellpadding="0" cellspacing="0">
                  <tr>', template_button_strip($arcade, 'bottom'), '</tr>
               </table>
            </td>
         </tr>
      </table>

      <div class="tborder">
         <table class="bordercolor" border="0" cellpadding="4" cellspacing="1" width="100%">';

   // Is there games?
   if (count($context['arcade']['games']) > 0)
   {

      // Header
      echo '
            <tr>
               <td class="catbg3"></td>
               <td class="catbg3"><a href="', $scripturl, '?action=arcade;sort=name', $context['sort_by'] == 'name' && $context['sort_direction'] == 'up' ? ';desc' : '', '">', $txt['arcade_game_name'], $context['sort_by'] == 'name' ? ' <img src="' . $settings['images_url'] . '/sort_' . $context['sort_direction'] . '.gif" alt="" />' : '', '</a></td>
               <td class="catbg3"><a href="', $scripturl, '?action=arcade;sort=myscore', $context['sort_by'] == 'myscore' && $context['sort_direction'] == 'up' ? ';desc' : '', '">', $txt['arcade_personal_best'], $context['sort_by'] == 'myscore' ? ' <img src="' . $settings['images_url'] . '/sort_' . $context['sort_direction'] . '.gif" alt="" />' : '', '</a></td>
               <td class="catbg3"><a href="', $scripturl, '?action=arcade;sort=champion', $context['sort_by'] == 'champion' && $context['sort_direction'] == 'up' ? ';desc' : '', '">', $txt['arcade_champion'], $context['sort_by'] == 'champion' ? ' <img src="' . $settings['images_url'] . '/sort_' . $context['sort_direction'] . '.gif" alt="" />' : '', '</a></td>
            </tr>';

      // Loop thought all games in page
      foreach ($context['arcade']['games'] as $game)
      {
         // Print out game information
         echo '
            <tr>
               <td class="windowbg2" style="width: 60px;" align="center">', $game['thumbnail'] != '' ? '
                  <a href="' . $game['url']['play'] . '"><img width="60" src="' . $game['thumbnail'] . '" alt="" /></a>' : '', '
               </td>
               <td class="windowbg">
                  <div style="float: left">
                     <div><a href="', $game['url']['play'], '">', $game['name'], '</a></div>';
         // Is there description?

         if (!empty($game['description']))
            echo '
                     <div class="smalltext">', $game['description'], '</div>';

         if ($game['highscoreSupport']) // Does this game support highscores?
            echo '
                     <div class="smalltext"><a href="' . $game['url']['highscore'] . '">' . $txt['arcade_viewscore'] . '</a></div>
                     ', $game['maxScores'] > 0 ? '<div class="smalltext">' . sprintf($txt['arcade_you_may_have_only'], $game['maxScores']) . '</div>' : '', '
                     </div>';

         echo '
                  <div style="float: right; text-align: right;" class="smalltext">';
         // Rating

         if ($game['rating2'] > 0)
            echo '
                  <div>',
                     str_repeat('<img src="' . $settings['images_url'] . '/star.gif" alt="*" />' , $game['rating2']),
                     str_repeat('<img src="' . $settings['images_url'] . '/star2.gif" alt="" />' , 5 - $game['rating2']), '</div>';

         // Category

         if ($game['category']['name'] != '')
            echo '
                        <a href="', $game['category']['link'], '">', $game['category']['name'], '</a><br />';

         // Favorite link (if can favorite)
         if ($context['arcade']['can_favorite'])
            echo '
                     <a href="', $game['url']['favorite'], '" onclick="arcade_favorite(', $game['id'] , '); return false;">
                        ', !$game['isFavorite'] ?
                        '<img id="favgame' . $game['id'] . '" src="' . $settings['images_url'] . '/favorite.gif" alt="' . $txt['arcade_add_favorites'] . '" />' :
                        '<img id="favgame' . $game['id'] . '" src="' . $settings['images_url'] . '/favorite2.gif" alt="' . $txt['arcade_remove_favorite'] .'" />', '</a>';

         echo '
                  </div>
               </td>';

         // Show personal best and champion only if game doest support highscores
         if ($game['highscoreSupport'] && $game['isChampion'])
            echo '
               <td class="windowbg2" style="width: 15%; text-align: center;">
                  ', $game['isPersonalBest'] ? $game['personalBest'] :  $txt['arcade_no_scores'], '
               </td>

               <td class="windowbg2" style="width: 15%; text-align: center;">
                  ', $game['champion']['memberLink'], '<br />', $game['champion']['score'], '
               </td>';

         elseif (!$game['highscoreSupport'])
            echo '
                  <td class="windowbg2" colspan="2" style="text-align: center; width: 30%;">', $txt['arcade_no_highscore'], '</td>';
         else
            echo '
                  <td class="windowbg2" colspan="2" style="text-align: center; width: 30%;">', $txt['arcade_no_scores'], '</td>';


         echo '
            </tr>';
      }

      /*
      // Footer for game listing
      echo '
            <tr class="catbg">
               <td></td>
               <td>', $txt['arcade_game_name'], '</td>
               <td>', $txt['arcade_personal_best'], '</td>
               <td>', $txt['arcade_champion'], '</td>
            </tr>';*/

   }
   else
   {
      // There is no games installed / found.
      echo '
            <tr>
               <td class="catbg3"><b>', $txt['arcade_no_games'], '</b></td>
            </tr>';
   }

   echo '
         </table>
      </div>

      <table border="0" cellpadding="0" cellspacing="0" width="100%">
         <tr>
            <td class="middletext">', $txt[139], ': ', $context['arcade']['pageIndex'], '   &nbsp;&nbsp;<a href="#top"><b>', $txt['topbottom4'], '</b></a></td>
            <td style="padding-right: 1ex;" align="right">
               <table cellpadding="0" cellspacing="0">
                  <tr>', template_button_strip($arcade, 'top'), '</tr>
               </table>
            </td>
         </tr>
      </table>';
}

function template_ArcadeGame_above()
{
   global $scripturl, $txt, $context, $settings;

   // Play link
   $context['arcade']['buttons']['play'] =  array(
      'text' => 'arcade_play',
      'image' => 'arcade_play.gif', // Theres no image for this included (yet)
      'url' => $context['arcade']['play'] ? $scripturl . '?action=arcade;sa=play;game=' . $context['arcade']['game']['id'] . '" onclick="arcadeRestart(); return false;' : $scripturl . '?action=arcade;sa=play;game=' . $context['arcade']['game']['id'],
      'lang' => true
   );

   // Highscores link if it is supported
   if ($context['arcade']['game']['highscoreSupport'])
      $context['arcade']['buttons']['score'] =  array(
         'text' => 'arcade_viewscore',
         'image' => 'arcade_viewscore.gif', // Theres no image for this included (yet)
         'url' => $scripturl . '?action=arcade;sa=highscore;game=' . $context['arcade']['game']['id'],
         'lang' => true
      );

   // Random game
   $context['arcade']['buttons']['random'] =  array(
      'text' => 'arcade_random_game',
      'image' => 'arcade_random.gif', // Theres no image for this included (yet)
      'url' => $scripturl . '?action=arcade;sa=play;random',
      'lang' => true
   );

   echo '
               <table border="0" cellpadding="0" cellspacing="0" width="100%">
                  <tr>
                     <td class="middletext">
                        ', isset($context['arcade']['pageIndex']) ? $txt[139] . ': ' . $context['arcade']['pageIndex'] : '' ,'
                     </td>
                     <td style="padding-right: 1ex;" align="right">
                        <table cellpadding="0" cellspacing="0">
                           <tr>
                              ', template_button_strip($context['arcade']['buttons'], 'bottom'), '
                           </tr>
                        </table>
                     </td>
                  </tr>
               </table>';
}

// Play screen
function template_arcade_game_play()
{
   global $scripturl, $txt, $context, $settings;

   echo '
               <div class="tborder">
                  <table class="bordercolor" border="0" cellpadding="4" cellspacing="1" width="100%">
                     <tr class="catbg">
                        <td>', $context['arcade']['game']['name'], '</td>
                     </tr>
                     <tr class="windowbg">
                        <td>
                           <div style="text-align: center;">
                              ', $context['arcade']['game']['html'], '
                              ', !$context['arcade']['can_submit'] ? '<br /><b>' . $txt['arcade_cannot_save'] . '</b>' : '', '
                           </div>
                        </td>
                     </tr>
                  </table>
               </div>';

}

// Highscore
function template_arcade_game_highscore()
{
   global $scripturl, $txt, $context, $settings;

   $game = &$context['arcade']['game'];

   echo '
               <div class="tborder">
                  <table class="bordercolor" border="0" cellpadding="4" cellspacing="1" width="100%">';

   if (isset($context['arcade']['new_score'])) // Was score submitted
   {
      $score = &$context['arcade']['new_score'];

      echo '
                     <tr class="titlebg">
                        <td colspan="5">', $txt['arcade_submit_score'], '</td>
                     </tr>
                     <tr class="windowbg">
                        <td colspan="5" style="text-align: center;">';

      if (!$score['saved'])
         // No permission to save
         echo '
         <div>', $txt[$score['error']], '<br />
         <strong>', $txt['arcade_score'], ':</strong> ', $score['score'], '</div>';

      else
      {
         echo '
         <div>', $txt['arcade_score_saved'], '</div>
         <div><strong>', $txt['arcade_score'], ':</strong> ', $score['score'], '</div>';

         if ($score['is_new_champion'])
            echo '
            <div>', $txt['arcade_you_are_now_champion'], '</div>';

         elseif ($score['is_personal_best'])
            echo '
            <div>', $txt['arcade_this_is_your_best'], '</div>';

         if ($score['can_comment'])
            echo '
            <div id="edit', $score['id'], '">
               <form action="', $scripturl, '?action=arcade;sa=comment;game=', $game['id'], ';score=',  $score['id'], '" onsubmit="arcadeCommentEdit(', $score['id'], ', ', $game['id'], ', 1); return false;" method="post">
                  <input type="text" id="c', $score['id'], '" name="comment" style="width: 95%;" />
                  <input type="submit" value="', $txt['arcade_save'], '" />
               </form>
            </div>';

      }

      echo '
                        </td>
                     </tr>';
   }

   if (count($context['arcade']['scores']) > 0) // There must be more than zero scores or we will skip them :)
   {
      echo '
                     <tr class="titlebg">
                        <td colspan="5">', $txt['arcade_highscores'], '</td>
                     </tr>
                     <tr class="catbg3">
                        <td width="5">', $txt['arcade_position'], '</td>
                        <td>', $txt['arcade_member'], '</td>
                        <td>', $txt['arcade_time'], '</td>
                        <td>', $txt['arcade_score'], '</td>
                        <td>', $txt['arcade_comment'], '</td>
                     </tr>';

      $button['edit'] = create_button('modify.gif', 'arcade_edit', '', 'title="' . $txt['arcade_edit'] . '"');
      $button['delete'] = create_button('delete.gif', 'arcade_delete_score', '', 'title="' . $txt['arcade_delete_score'] . '"');

      foreach ($context['arcade']['scores'] as $score)
      {

         echo '
                     <tr class="', $score['own'] ? 'windowbg3' : 'windowbg', '"', $score['highlight'] ? ' style="font-weight: bold;"' : '', '>
                        <td class="windowbg2" align="center">', $score['position'], '</td>
                        <td>', $score['memberLink'], '</td>
                        <td width="300" class="windowbg2">', $score['time'], '</td>
                        <td align="center">', $score['score'], '</td>
                        <td class="windowbg2">
                           <div id="comment', $score['id'], '" style="float: left; ', $score['edit'] && $score['can_edit'] ? 'display: none;' : '', '">', $score['comment'], '</div>';

         if ($score['can_edit']) // Can edit
         {
            echo '
                           <div id="edit', $score['id'], '" style="float: left; ', $score['edit'] ? '' : 'display: none;', ' width: 90%;">
                              <form action="', $scripturl, '?action=arcade;sa=comment;game=', $game['id'], '" method="post" name="score_edit', $score['id'], '" onsubmit="arcadeCommentEdit(', $score['id'], ', ', $game['id'], '); return false;">
                                 <input type="hidden" name="score" value="', $score['id'], '" />
                                 <input type="text" name="comment" id="c', $score['id'], '" value="', $score['raw_comment'], '" style="width: 95%;" />
                              </form>
                           </div>';
         }


         // Buttons
         if ($score['can_edit'] || $context['arcade']['show_editor'])
         {

            echo '
                           <div style="float: right">';

            // Edit
            if ($score['can_edit'])
               echo '
                              <a onclick="arcadeCommentEdit(', $score['id'], ', ', $game['id'], ', 0); return false;" href="', $scripturl, '?action=arcade;sa=highscore;game=', $game['id'], ';edit;score=', $score['id'], '">', $button['edit'], '</a>';

            // Delete
            if ($context['arcade']['show_editor'])
               echo '
               <a onclick="return confirm(\'', $txt['arcade_really_delete'], '\');" href="', $scripturl, '?action=arcade;sa=highscore;game=', $game['id'], ';delete;score=', $score['id'], ';sesc=', $context['session_id'], '">', $button['delete'], '</a>';

            echo '
                           </div>';


         }


         echo '
                        </td>
                     </tr>';
      }

      echo '
                     <tr class="catbg3">
                        <td>', $txt['arcade_position'], '</td>
                        <td>', $txt['arcade_member'], '</td>
                        <td>', $txt['arcade_time'], '</td>
                        <td>', $txt['arcade_score'], '</td>
                        <td>', $txt['arcade_comment'], '</td>
                     </tr>';
   }

   else
   {
      // No one has played this game

      echo '
                     <tr class="windowbg">
                        <td align="center" class="catbg3"><b>', $txt['arcade_no_scores'], '</b></td>
                     </tr>';
   }

   echo '
                  </table>
               </div>';
}

// Below game
function template_ArcadeGame_below()
{
   global $scripturl, $txt, $context, $settings;



   echo '
               <table border="0" cellpadding="0" cellspacing="0" width="100%">
                  <tr>
                     <td class="middletext">
                        ', isset($context['arcade']['pageIndex']) ? $txt[139] . ': ' . $context['arcade']['pageIndex'] : '' ,'
                     </td>
                     <td style="padding-right: 1ex;" align="right">
                        <table cellpadding="0" cellspacing="0">
                           <tr>
                              ', template_button_strip($context['arcade']['buttons'], 'top'), '
                           </tr>
                        </table>
                     </td>
                  </tr>
               </table>';
}

function template_arcade_statistics()
{
   global $scripturl, $txt, $context, $settings;

   echo '
   <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr>
         <td class="middletext"></td>

         <td style="padding-right: 1ex;" align="right">
            <table cellpadding="0" cellspacing="0">
               <tr></tr>
            </table>
         </td>
      </tr>
   </table>

   <table border="0" width="100%" cellspacing="1" cellpadding="4" class="bordercolor">
      <tr class="titlebg">
            <td align="center" colspan="4">', $txt['arcade_stats'], '</td>
      </tr>
      <tr>
         <td class="catbg" colspan="2"><b>', $txt['arcade_most_played'], '</b></td>
         <td class="catbg" colspan="2"><b>', $txt['arcade_most_active'], '</b></td>
      </tr>
      <tr>
            <td class="windowbg" width="20" valign="middle" align="center"><img src="', $settings['images_url'], '/gold.gif" alt="" /></td>
            <td class="windowbg2" valign="top">
               <table border="0" cellpadding="1" cellspacing="0" width="100%">';

   // Most played games
   if (count($context['arcade']['statistics']['play']) > 0)
   {
      foreach ($context['arcade']['statistics']['play'] as $game)
         echo '
                     <tr>
                        <td width="60%" valign="top">', $game['link'], '</td>
                        <td width="20%" align="left" valign="top">', $game['plays'] > 0 ? '<img src="' . $settings['images_url'] . '/bar.gif" width="' . $game['precent'] . '" height="15" alt="" />' : '&nbsp;', '</td>
                        <td width="20%" align="right" valign="top">', $game['plays'], '</td>
                     </tr>';
   }

   echo '
               </table>
            </td>

            <td class="windowbg" width="20" valign="middle" align="center"><img src="', $settings['images_url'], '/gold.gif" alt="" /></td>
            <td class="windowbg2" valign="top">
               <table border="0" cellpadding="1" cellspacing="0" width="100%">';

   // Most active in arcade
   if (count($context['arcade']['statistics']['active']) > 0)
   {
      foreach ($context['arcade']['statistics']['active'] as $game)
         echo '
                     <tr>
                        <td width="60%" valign="top">', $game['link'], '</td>
                        <td width="20%" align="left" valign="top">', $game['scores'] > 0 ? '<img src="' . $settings['images_url'] . '/bar.gif" width="' . $game['precent'] . '" height="15" alt="" />' : '&nbsp;', '</td>
                        <td width="20%" align="right" valign="top">', $game['scores'], '</td>
                     </tr>';
   }
   echo '
               </table>
            </td>
      </tr>

      <tr>
         <td class="catbg" colspan="2"><b>', $txt['arcade_best_games'], '</b></td>
         <td class="catbg" colspan="2"><b>', $txt['arcade_best_players'], '</b></td>
      </tr>

      <tr>
            <td class="windowbg" width="20" valign="middle" align="center"><img src="', $settings['images_url'], '/gold.gif" alt="" /></td>
            <td class="windowbg2" valign="top">
               <table border="0" cellpadding="1" cellspacing="0" width="100%">';

   // Top rated games
   if (count($context['arcade']['statistics']['rating']) > 0)
   {
      foreach ($context['arcade']['statistics']['rating'] as $game)
         echo '
                     <tr>
                        <td width="60%" valign="top">', $game['link'], '</td>
                        <td width="20%" align="left" valign="top">', $game['rating'] > 0 ? '<img src="' . $settings['images_url'] . '/bar.gif" width="' . $game['precent'] . '" height="15" alt="" />' : '&nbsp;', '</td>
                        <td width="20%" align="right" valign="top">', $game['rating'], '</td>
                     </tr>';
   }

   echo '
               </table>
            </td>

            <td class="windowbg" width="20" valign="middle" align="center"><img src="', $settings['images_url'], '/gold.gif" alt="" /></td>
            <td class="windowbg2" valign="top">
               <table border="0" cellpadding="1" cellspacing="0" width="100%">';

   // Best players by champions
   if (count($context['arcade']['statistics']['champions']) > 0)
   {
      foreach ($context['arcade']['statistics']['champions'] as $game)
         echo '
                     <tr>
                        <td width="60%" valign="top">', $game['link'], '</td>
                        <td width="20%" align="left" valign="top">', $game['champions'] > 0 ? '<img src="' . $settings['images_url'] . '/bar.gif" width="' . $game['precent'] . '" height="15" alt="" />' : '&nbsp;', '</td>
                        <td width="20%" align="right" valign="top">', $game['champions'], '</td>
                     </tr>';
   }

   echo '
               </table>
            </td>
      </tr>

      <tr>
         <td class="catbg" colspan="4"><b>', $txt['arcade_longest_champions'], '</b></td>
      </tr>
      <tr>
         <td class="windowbg" width="20" valign="middle" align="center"><img src="', $settings['images_url'], '/gold.gif" alt="" /></td>
         <td class="windowbg2" valign="top" colspan="3">
            <table border="0" cellpadding="1" cellspacing="0" width="100%">';

   // Top rated games
   if (count($context['arcade']['statistics']['longest']) > 0)
   {
      foreach ($context['arcade']['statistics']['longest'] as $game)
         echo '
                  <tr>
                     <td width="40%" valign="top">', $game['member_link'], ' (', $game['game_link'], ')</td>
                     <td width="20%" align="left" valign="top">', $game['duration'] > 0 ? '<img src="' . $settings['images_url'] . '/bar.gif" width="' . $game['precent'] . '" height="15" alt="" />' : '&nbsp;', '</td>
                     <td width="40%" align="right" valign="top">', $game['current'] ? '<b>' . $game['duration'] . '</b>' : $game['duration'], '</td>
                  </tr>';
   }

   echo '
            </table>
         </td>
      </tr>
   </table>';
}

function template_arcade_below()
{
   global $arcade_version;

   // Print out copyright and version. Removing copyright is not allowed by license
   echo '
   </div>
   <a name="bot"></a>

   <div class="smalltext" style="text-align: center;">
      Powered by: <a href="http://www.smfarcade.info/" target="_blank">SMF Arcade ', $arcade_version, '</a> &copy; <a href="http://www.madjoki.com/" target="_blank">Niko Pahajoki</a> 2004-2007
   </div>';

}

// XML templates
function template_xml() // General XML template
{
   global $context, $txt;

   $extra = isset($context['arcade']['extra']) ? $context['arcade']['extra'] : '';

   echo '<', '?xml version="1.0" encoding="', $context['character_set'], '"?', '>
   <smf>
      <txt><![CDATA[', isset($txt[$context['arcade']['message']]) ? $txt[$context['arcade']['message']] : $context['arcade']['message'], ']]></txt>
      ', $extra, '
   </smf>';
}

function template_xml_list()
{
   global $context, $txt;

   echo '<', '?xml version="1.0" encoding="', $context['character_set'], '"?', '>
   <smf>';

   foreach ($context['arcade']['search']['games'] as $game)
      echo '
      <game>
         <id>', $game['id'], '</id>
         <name><![CDATA[', $game['name'], ']]></name>
         <url><![CDATA[', $game['url'], ']]></url>
      </game>';

   echo '
      <more>
         <is>', $context['arcade']['search']['more'], '</is>
         <url>', $context['arcade']['search']['more_url'], '</url>
      </more>
   </smf>';
}

?>

fwitt

within this echo statement


// Play screen
function template_arcade_game_play()
{
   global $scripturl, $txt, $context, $settings;

   echo '

Skhilled

#2798
Quote from: masss on August 23, 2007, 05:56:22 PM
How can i add ads at the top of .swf flash game?
Arcade.template.php, I think.

Quote from: GouroB on August 24, 2007, 05:21:51 PM
i am getting this error whenever i am trying to install this mod

Error in Package Installation
At least one error was encountered during a test installation of this package. It is strongly recommended that you do not continue with installation unless you know what you are doing, and have made a backup very recently. This error may be caused by a conflict between the package you're trying to install and another package you have already installed, an error in the package, a package which requires another package that you don't have installed yet, or a package designed for another version of SMF.


5.      Execute Modification      ./Themes/default/index.template.php      Test failed


any idea ? i am using latest version of smf and i tried both version of arcade ( 2.0.9 and 2.0.10 ) both gave me error.
This usually happens when you either are not using the default theme or another mod modified index.template.php.

Switch to the default if you are not using it while installing. If you are using the default then another mod has modified it. You can manually install that part of the arcade after installing as usual via Packages.

Mohamed GadAllah

I've got this

SMF Arcade 2.0.0 Installer
Creating tables
Success with no errors!
Inserting default permissions
Success with no errors!
Inserting default settings
Success with no errors!
Finishing
Success with no errors!
Package was installed. If you have SMFArcade 1.x installed you can import games and scores now


error:

SMF Arcade 2.0.0
Importing games and scores
Table 'prodes_smf1.smf_games' doesn't exist

Please advise

Advertisement: