help needed for porting smf to phpbb

Started by capi-lisa, July 26, 2005, 07:35:33 AM

Previous topic - Next topic

capi-lisa

hi ,

i like smf board but i'm now working on a phpbb premodded but would like a feature of smf into my phpbb and i hope someone can help me

1) i got Amod+ from austin and would like a check file inside the admin panel that check what kind of games are installed and what not

2) if the game is not installed then you can download the game and installed it to the right directory that you can put in
because the files are a picture and swf file inside a zip file so when you check it then it's downloading and unzipt it like smf

3) if you have a game that's not in the list then you can upload it

4) when you have games in your board that is not approved by the game author then it's must automatic of with hand delete


austin have made a file but it's only check if installed or not ect ect

so can someone help me

Autsin file explain
QuoteThe below changes, will add a new link to your ACP. The link will be `Check Games` and when clicking it, it will load a list of games. It will show you all the games we have released vs the games you have installed. It will then output 3 lists, games you have, games you dont have & games you have that we dont have released. Note: This connects to my site every time for checks, so if my server is lagged or down, it will effect the check.
Here is the code that check thru a txt if it installed or not
======
OPEN
======
admin/admin_ina_xtras.php

======
FIND
======

   $module['Amod+ Admin']['Xtras'] = "$file";

======
AFTER, ADD
======

   $module['Amod+ Admin']['Check_Games'] = "$file?mode=check_game_listing";

======
FIND
======

   if (isset($HTTP_POST_VARS['mode']) || isset($HTTP_GET_VARS['mode']))
      $mode = (isset($HTTP_POST_VARS['mode'])) ? $HTTP_POST_VARS['mode'] : $HTTP_GET_VARS['mode'];
   else
      $mode = '';

======
AFTER, ADD
======

   if ($HTTP_GET_VARS['mode'] == "check_game_listing")
      {
   echo "<table width='100%' border='0' class='forumline' cellspacing='2' align='center' valign='middle'>";
   echo "   <tr>";
   echo "      <th class='thHead' colspan='2'>";
   $file = @file("http://phpbb-amod.com/game_list.php");
   if (!$file)
      echo 'Failed To Open Game List. Please Try Again Later.';
   else
      echo 'Game List Found.';
   echo "      </th>";
   echo "   </tr>";
   echo "</table>";
   echo "<br><br>";
   if (!$file)
      exit();
           
   $match             = 'You Have These Games';
   $mis_match          = 'You Dont Have These Games';
   $not_listed         = 'You Have Games I Dont Have Released';   
   $match_array       = array();
   $mis_match_array    = array();
   $not_listed_array    = array();

   $amod_list    = $file[0];
   $new_list   = explode(',', $amod_list);
   
      for ($x = 0; $x < count($new_list); $x++)
         {
      $q = "SELECT game_id
           FROM ". iNA_GAMES ."
           WHERE game_name = '". $new_list[$x] ."'";
      $r = $db->sql_query($q);
      $exists = $db->sql_fetchrow($r);
     
         if ($exists['game_id'])
            $match_array[] = $new_list[$x];
         else
            $not_listed_array[] = $new_list[$x];
         }
         
   $q = "SELECT game_name
        FROM ". iNA_GAMES ."";
   $r = $db->sql_query($q);
   $games = $db->sql_fetchrowset($r);
     
      for ($x = 0; $x < count($games); $x++)
         {
         if (!strstr($amod_list, $games[$x]['game_name'] .','))
            $mis_match_array[] = $games[$x]['game_name'];
         }
         
   echo '<table width="100%" class="forumline" align="center">';
   echo '   <tr>';
   echo '      <th class="thTop" width="100%">';
   echo          $match;
   echo '      </th>';
   echo '   </tr>';
      if (count($match_array) > 0)
         {
         for ($x = 0; $x < count($match_array); $x++)
            {
         echo '   <tr>';
         echo '      <td align="left" width="100%" class="'. (($x % 2) ? $theme['td_class2'] : $theme['td_class1']) .'">';
         echo          $match_array[$x];
         echo '      </td>';
         echo '   </tr>';
            }
         }
      else
         {
      echo '   <tr>';
      echo '      <td align="left" width="100%" class="row2">';
      echo '         No matches.';
      echo '      </td>';
      echo '   </tr>';         
         }
   echo '   <tr>';
   echo '      <th class="thTop" width="100%">';
   echo          $not_listed;
   echo '      </th>';
   echo '   </tr>';
      if (count($mis_match_array) > 0)
         {
         for ($x = 0; $x < count($mis_match_array); $x++)
            {
         echo '   <tr>';
         echo '      <td align="left" width="100%" class="'.(($x % 2) ? $theme['td_class2'] : $theme['td_class1']) .'">';
         echo          $mis_match_array[$x];
         echo '      </td>';
         echo '   </tr>';
            }
         }
      else
         {
      echo '   <tr>';
      echo '      <td align="left" width="100%" class="row2">';
      echo '         No matches.';
      echo '      </td>';
      echo '   </tr>';         
         }
   echo '   <tr>';
   echo '      <th class="thTop" width="100%">';
   echo          $mis_match;
   echo '      </th>';
   echo '   </tr>';
      if (count($not_listed_array) > 0)
         {
         for ($x = 0; $x < count($not_listed_array); $x++)
            {
         echo '   <tr>';
         echo '      <td align="left" width="100%" class="'. (($x % 2) ? $theme['td_class2'] : $theme['td_class1']) .'">';
         echo          $not_listed_array[$x];
         echo '      </td>';
         echo '   </tr>';
            }
         }
      else
         {
      echo '   <tr>';
      echo '      <td align="left" width="100%" class="row2">';
      echo '         No matches.';
      echo '      </td>';
      echo '   </tr>';         
         }                 
   echo '</table>';     
      }

======
CLOSE & SAVE
======

Rik©


capi-lisa

he got the easy version but i want to make it more extended like i wrote and austin have the problem of his bandwidth so he can not put i online :p

Advertisement: