collapse

* Simple Portal Archived Forum

This is an Archive Forum.

The content in this forum may be out-of-date or have been superseded by newer information, and links in forum pages to other sites may not work.
This forum contains archives for future reference.

Visit our thread at Simple Machines Forum for current support.

SMF 2.1 users: EhPortal is a ported version of Simple Portal specifically designed for the SMF 2.1 branch.
Please visit web-develop.ca to download EhPortal and for its support.

* User Info

 
 
Welcome, Guest. Please login or register.

* Who's Online

  • Dot Guests: 493
  • Dot Hidden: 0
  • Dot Users: 0

There aren't any users online.

* Shoutbox

Refresh History
  • Shoutbox is not for support!
  • {OCS}MasterSeal: Yup, Still adore SP
    April 21, 2019, 07:08:06 PM
  • {OCS}MasterSeal: STILL love SP :)
    November 24, 2018, 05:05:50 AM
  • ♦ Ninja ZX-10RR ♦: <3 aegersz
    September 13, 2018, 03:36:09 PM
  • aegersz: I STILL <3 LOVE SimplePortal
    September 13, 2018, 07:11:39 AM
  • aegersz: o LOVE you guys - Simple Portal rocks !
    May 09, 2018, 05:18:59 AM
  • Chen Zhen: our apologies for the site being down.. please read server issues topic
    March 22, 2018, 05:32:38 AM
  • {OCS}MasterSeal: LOL PLEASE forget I just posted that. I found the answer in my own dang post back in 2015. lol sorry!
    July 04, 2017, 10:47:55 PM
  • {OCS}MasterSeal: I know this SB isnt' for support, but I just have a general question. Who would I contact to find out where SP stores its block info? Is it DB driven or files? I searched the site but came up with nothing. probably my fault any insight is appreciated.
    July 04, 2017, 10:43:36 PM
  • ♦ Ninja ZX-10RR ♦: Excuse me but what does Simpleportal have to deal with that?
    February 05, 2017, 08:21:14 PM
  • WhiteEagle: of course IMHO that site appears to be dead :(
    February 04, 2017, 01:08:05 PM
  • WhiteEagle: If I can get that, then I'll use it for that site...
    February 04, 2017, 01:07:35 PM
  • WhiteEagle: decided to not use SMF for any projects, unless I can get a copy of the premium version of the fanfiction archive plugin
    February 04, 2017, 01:06:54 PM
  • expertdecisions: cloudflare
    January 28, 2017, 08:01:47 AM
  • aegersz: SM release 2.0.13 !
    January 12, 2017, 06:00:13 AM
  • raffo: Tks Emanuele, even if I didn't understand the fix :D
    November 07, 2016, 02:01:20 AM
  • emanuele: [link]
    November 01, 2016, 12:43:50 PM
  • emanuele: raffo: the English support board is a good place. ;)
    November 01, 2016, 12:43:38 PM
  • raffo: Where can I find the fix for the shoutbox?
    November 01, 2016, 05:06:09 AM
  • {OCS}MasterSeal: To the SP team, I make a point to come here and thank you as much as possible for your work.  so again, THANK YOU!
    October 28, 2016, 10:38:05 AM
  • emanuele: That's indeed funny, the limit is present only in the patch and not the full install.
    October 22, 2016, 06:14:58 PM

* Recent Posts

Adding Forums Button to Nav bar by jirapon
[August 01, 2019, 09:07:12 AM]


Re: Board Icons by ♦ Ninja ZX-10RR ♦
[July 30, 2019, 04:03:41 PM]


MOVED: Czech translation???? by ♦ Ninja ZX-10RR ♦
[July 30, 2019, 03:04:51 PM]


Board Icons by jirapon
[July 30, 2019, 07:28:44 AM]


Re: Thankyou Simpleportal, by ♦ Ninja ZX-10RR ♦
[July 29, 2019, 09:41:29 AM]

Thanks for having an interest with our portal. If you have any requests for features, have a look at the Feature Requests board.

Author Topic: 8: Undefined index: action  (Read 15894 times)

0 Members and 1 Guest are viewing this topic.

Offline Ace

  • Semi Newbie
  • *
  • Posts: 19
8: Undefined index: action
« on: September 22, 2008, 10:14:40 PM »
Hi
I have this error in log can you tell me what it is and how to repair..

Quote
public_html/forum/Themes/default/SPortal.template.php (main sub template - eval?)
Line: 19
Thanks..

Offline ???1031

  • ... feel not as a dev at the moment ...
  • Comrade
  • *
  • Posts: 789
  • Gender: Male
  • Overworked <<
  • SMF Version: None
  • SP Version: None
Re: 8: Undefined index: action
« Reply #1 on: September 23, 2008, 12:41:56 AM »
Hi
I have this error in log can you tell me what it is and how to repair..

Quote
public_html/forum/Themes/default/SPortal.template.php (main sub template - eval?)
Line: 19
Thanks..

Can you quote the complete error? :)

I would like to know which variable this eval error produce.

Thanks and Bye
DIN1031
Again... I'm having time problems...Normal Monday to Friday I'm at office from 6:00-16:00 (On my local time ;P).

Offline Ace

  • Semi Newbie
  • *
  • Posts: 19
Re: 8: Undefined index: action
« Reply #2 on: September 23, 2008, 08:11:18 AM »
8: Undefined index: action
File:/public_html/forum/Themes/default/SPortal.template.php (main sub template - eval?)
Line: 19


This is all there is thats displayed its listed 7 times

Offline Nathaniel

  • Comrade
  • *
  • Posts: 5203
  • Gender: Male
    • Verbtest.com
  • SMF Version: 2 RC4
  • SP Version: 2.3.3
Re: 8: Undefined index: action
« Reply #3 on: September 23, 2008, 08:39:27 PM »
Do you have any edited/custom/php blocks on your forum? If so then can you please post the code for them.
SMF Friend (Former Support Specialist) | SimplePortal DeveloperMy SMF Mods | SimplePortal"Quis custodiet ipsos custodes?" - Who will Guard the Guards?Please don't send me ANY support related PMs. I will just delete them.

Offline Ace

  • Semi Newbie
  • *
  • Posts: 19
Re: 8: Undefined index: action
« Reply #4 on: September 24, 2008, 08:12:25 AM »
Do you have any edited/custom/php blocks on your forum? If so then can you please post the code for them.

Heres the scripts im using:

RANDOM GAMES:
Quote
/******************************************************************************
* Tiny Portal/SMF Arcade - Fading Random Game Block                           *
*******************************************************************************
* Version:              1.0 - for SMFARCADE V2                                  *
* File by:            Eric Lawson - www.ericsworld.eu                            *
*******************************************************************************
*                                                                             *
* To install:                                                                 *
* Copy the entire contents (crtl+a)(ctrl+c) of this file into a phpblock      *
*                                                                               *
* Edits:                                                                      *
* Change the txt 'play' to suit your language.                                *
* Set $no_of_games = <the number of games installed in your arcade            *
*                                                                             *
* You may also edit some of the java settings further down the file           *
* to change speed, text colour if you know what you are doing!                *
*                                                                             *
* This file is distributed in the hope that it is and will be useful,         *
* but WITHOUT ANY WARRANTIES; without even any implied warranty of            *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.                        *
*                                                                             *
*******************************************************************************

********EDITS*****************************************************************/

$no_of_games = 25;
$txt['arcade_play']='Play';


//******NOTHING TO EDIT BELOW HERE********************************************

global $context, $txt, $modSettings, $scripturl, $db_prefix;

$no = rand(1,$no_of_games-10);

$sql = "SELECT ID_GAME, gameName, thumbnail, gameDirectory
        FROM {$db_prefix}arcade_games
        LIMIT $no,10";
$result = db_query($sql, __FILE__, __LINE__);


   $i=0;

   echo'
   <div align="center">
   <table width="100%" border="0" cellpadding="1">
   <tr>
   <td><span class="smalltext">
   <script type="text/javascript">

   /***********************************************
   * Fading Scroller- © Dynamic Drive DHTML code library (www.dynamicdrive.com)
   * This notice MUST stay intact for legal use
   * Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code
   ***********************************************/

   var delay1 = 3000; //set delay between message change (in miliseconds)
   var maxsteps1=30; // number of steps to take to change from start color to endcolor1
   var stepdelay1=40; // time in miliseconds of a single step
   //**Note: maxsteps1*stepdelay1 will be total time in miliseconds of fading effect
   var startcolor1= new Array(255,255,255); // start color (red, green, blue)
   var endcolor1=new Array(0,0,0); // end color (red, green, blue)

   var fcontent1=new Array();
   begintag1=\'<div align="center"style=" padding: 5px;">\'; //set opening tag, such as font declarations
   ';
   //foreach($rg as $rg_out)
   while ($rg_out = mysql_fetch_array($result))
   {
      $gameico1 = !$rg_out['gameDirectory'] ?   $modSettings['gamesUrl'].$rg_out['thumbnail'] : $modSettings['gamesUrl'].$rg_out['gameDirectory']."/".$rg_out['thumbnail'];

      echo 'fcontent1[',$i,']="<a href=\"',$scripturl,'?action=arcade;sa=play;game=',$rg_out['ID_GAME'],'\"><img border=\"0\" src=\"',$gameico1, '\" alt=\"ico\" width=\"60\" height=\"60\" title=\"',$txt['arcade_play'],' ', $rg_out['gameName'],'\"></a><br /><br /><a href=\"',$scripturl,'?action=arcade;sa=play;game=',$rg_out['ID_GAME'],'\">',$rg_out['gameName'],'</a>";
      ';
      $i++;
   }
   echo'
   closetag1=\'</div>\';
   
   var fwidth1=\'100%\'; //set scroller width
   var fheight1=\'100px\'; //set scroller height
   var fadelinks1=1;  //should links inside scroller content also fade like text? 0 for no, 1 for yes.

   ///No need to edit below this line/////////////////

   var ie41=document.all&&!document.getElementById;
   var DOM21=document.getElementById;
   var faderdelay1=3;
   var index=0;

   /*Rafael Raposo edited function*/
   //function to change content
   function changecontent1(){
   if (index>=fcontent1.length)
   index=0
   if (DOM21){
   document.getElementById("fscroller1").style.color="rgb("+startcolor1[0]+", "+startcolor1[1]+", "+startcolor1[2]+")"
   document.getElementById("fscroller1").innerHTML=begintag1+fcontent1[index]+closetag1
   if (fadelinks1)
   linkcolorchange1(1);
   colorfade1(1, 15);
   }
   else if (ie41)
   document.all.fscroller1.innerHTML=begintag1+fcontent1[index]+closetag1;
   index++
   }

   // colorfade1() partially by Marcio Galli for Netscape Communications.  ////////////
   // Modified by Dynamicdrive.com

   function linkcolorchange1(step1){
   var obj=document.getElementById("fscroller1").getElementsByTagName("A");
   if (obj.length>0){
   for (i=0;i<obj.length;i++)
   obj.style.color=getstepcolor1(step1);
   }
   }

   /*Rafael Raposo edited function*/
   var fadecounter1;
   function colorfade1(step1) {
   if(step1<=maxsteps1) {
   document.getElementById("fscroller1").style.color=getstepcolor1(step1);
   if (fadelinks1)
   linkcolorchange1(step1);
   step1++;
   fadecounter1=setTimeout("colorfade1("+step1+")",stepdelay1);
   }else{
   clearTimeout(fadecounter1);
   document.getElementById("fscroller1").style.color="rgb("+endcolor1[0]+", "+endcolor1[1]+", "+endcolor1[2]+")";
   setTimeout("changecontent1()", delay1);
   }
   }
   function getstepcolor1(step1) {
   var diff1
   var newcolor1=new Array(3);
   for(var i=0;i<3;i++) {
   diff1 = (startcolor1-endcolor1);
   if(diff1 > 0) {
   newcolor1 = startcolor1-(Math.round((diff1/maxsteps1))*step1);
   } else {
   newcolor1 = startcolor1+(Math.round((Math.abs(diff1)/maxsteps1))*step1);
   }
   }
   return ("rgb(" + newcolor1[0] + ", " + newcolor1[1] + ", " + newcolor1[2] + ")");
   }
   if (ie41||DOM21)
   document.write(\'<div id="fscroller1" style="border:0px solid black;width:\'+fwidth1+\';height:\'+fheight1+\'"></div>\');

   if (window.addEventListener)
   window.addEventListener("load", changecontent1, false)
   else if (window.attachEvent)
   window.attachEvent("onload", changecontent1)
   else if (document.getElementById)
   window.onload=changecontent1
   </script>
   </span>
   </td>
   </tr>
   </table>
   </div>';

Total Playes:
Quote
global $db_prefix;

$request = db_query("SELECT SUM(numPlays) FROM {$db_prefix}arcade_games", __FILE__, __LINE__);
list ($plays) = mysql_fetch_row($request);
mysql_free_result($request);

echo 'Our users have played a total of ', $plays, ' games ';

Users in Arcade:
Quote
global $txt, $context,$settings, $db_prefix;
   require_once('SSI.php');

//    Heres the bullits duck lol
$bullet2 = '<img src="'.$settings['images_url'].'/aim.gif" alt="" border="0" style="margin:0 2px 0 0;" />';
//   Its ok now bullits have flown by stand up again lol
$online = ssi_whosOnline('array');
$arcade_users = array();
foreach($online['users'] as $user)
{
   
   $result = db_query("
      SELECT url
      FROM {$db_prefix}log_online
      WHERE ID_MEMBER = $user[id]",__FILE__, __LINE__);

   $checkit = mysql_fetch_assoc($result);
   $data = @unserialize($checkit['url']);
   if($data['action']=='arcade')
   {
      echo $bullet2 , $user['hidden'] ? '<i>' . $user['link'] . '</i>' : $user['link'];  echo ' ';
      $arcade_users[] = $user;
   }
   unset($data);
}

//   No arcade users?
if(empty($arcade_users))
   echo 'no players playing at the moment';
// end wdmboard_statsonline

Link to Us:
Quote
<p align="center"><a href="http://www.mowclan.us/forum/index.php"><img src="http://www.mowclan.us/forum/images/minilogo.gif"></a><br>
<br>
<TEXTAREA id=holdtext rows=3 cols=20><p align="center"><a href="www.mowclan.us/forum/index.php"><img src="http://www.mowclan.us/forum/images/minilogo.gif"></textarea>

Arcade Hall of Fame:
Quote
function hof($count = 10, $time = - 1)
{
   global $db_prefix, $scripturl, $txt,  $modSettings;

   $where = '';

   if ($time == 'current')
      $where = 'AND championTo = 0';
   elseif ($time != -1)
      $where = "AND championFrom > $time";

   $results = db_query("
      SELECT  game.ID_GAME, game.gameName,game.thumbnail, game.gameDirectory, score.score, score.position,
         IF(championFrom > 0, (IF(championTo = 0, UNIX_TIMESTAMP(), championTo) - championFrom), 0) AS championDuration,
         IFNULL(mem.ID_MEMBER, 0) AS ID_MEMBER, IFNULL(mem.realName, '') AS realName, IF(championTo = 0, 1, 0) AS current
      FROM ({$db_prefix}arcade_scores AS score, {$db_prefix}arcade_games AS game)
         LEFT JOIN {$db_prefix}members AS mem ON (mem.ID_MEMBER = score.ID_MEMBER)
      WHERE game.ID_GAME = score.ID_GAME
         $where
      HAVING championDuration > 0
      ORDER BY IF(championFrom > 0, (IF(championTo = 0, UNIX_TIMESTAMP(), championTo) - championFrom), 0) DESC
      LIMIT $count", __FILE__, __LINE__);

   $top = array();
   $max = -1;

   while ($score = mysql_fetch_assoc($results))
   {
      if ($max == -1)
         $max = $score['championDuration'];

      $top[] = array(
         'game_name' => $score['gameName'],
         'game_link' => '<a href="' . $scripturl . '?action=arcade;sa=play;game=' . $score['ID_GAME'] . '">' .  $score['gameName'] . '</a>',
         'member_name' => $score['realName'],
         'member_link' => !empty($score['realName']) ? '<a href="' . $scripturl . '?action=profile;u=' . $score['ID_MEMBER'] . '">' .  $score['realName'] . '</a>' : $txt['arcade_guest'],
         'duration' => format_time_ago($score['championDuration']),
         'precent' => ($score['championDuration'] / $max) * 100,
         'current' => $score['current'] == 1,
         'thumbnail' =>$score['gameDirectory']."/".$score['thumbnail'],
            'score' => round($score['score'],3),
      );
   }

   if (count($top) == 0)
      return false;
   elseif ($count > 1)
      return $top;
   else
      return $top[0];
}
   global $scripturl, $txt,  $boardurl, $context, $settings, $arcsettings;

$top_player = hof(10);
   $i=0; //players position
         echo '
   <table width="100%"  border="0" cellspacing="1" cellpadding="1">
       <tr>
       <td width="20%" align="center" nowrap class="titlebg">
         <b>Champion in Game</b>
       </td>
       <td width="25%" align="center" nowrap class="titlebg">
         <b>Champions Name</b>
       </td>
       <td width="15%" align="center" nowrap class="titlebg">
         <b>High Score</b>
       </td>
       <td width="20%" align="center" nowrap class="titlebg">
         <b>Champion Since</b>
       </td>
       </tr>
      </table>';
     foreach ($top_player as $row)
      {
         echo '
<table width="100%" border="0" cellspacing="1" cellpadding="4">
    <tr>
      <td align="left" width="20%" class="windowbg">
          <img src="',$boardurl,'/','Games',$row['gameDirectory']."/".$row['thumbnail'],'"></a>  ', $row['game_link'],'<br/>
        </td>
      <td align="center" width="25%" nowrap class="windowbg2">
          ', $row['member_link'],'
        </td>
      <td align="center" width="15%" nowrap="nocrap" class="windowbg">
          ', $row['score'],'
        </td>
      <td align="center" width="20%" class="windowbg2">
        ', $row['duration'],'
        
     </td>
   </tr>
   ';
     $i++;
      }
      echo '
</table>';

Chess:
Quote
global $scripturl, $context;
echo '
<img src="/chessblock/chess.png"/> <a href="', $scripturl ,'?action=chess"><font size="2">My Chess Stats</font></a> |
<img src="/chessblock/challenge.png"/> <a href="', $scripturl ,'?action=chess;u=', $context['user']['id'] ,';sa=challenge"><font size="2">Challenge</font></a> |
<img src="/chessblock/matches.png"/> <a href="', $scripturl ,'?action=chess;u=', $context['user']['id'] ,';sa=current"><font size="2">Current Matches</font></a> |
<img src="/chessblock/matches.png"/> <a href="', $scripturl ,'?action=chess;u=', $context['user']['id'] ,';sa=finished"><font size="2">Finished Matches</font></a> |
<img src="/chessblock/leader.png"/> <a href="', $scripturl ,'?action=chess;u=', $context['user']['id'] ,';sa=leaderboard"><font size="2">Leaderboard</font></a>
';

These are ALL php scripts
EXCEPT LINK TO US this is HTML






Offline Nathaniel

  • Comrade
  • *
  • Posts: 5203
  • Gender: Male
    • Verbtest.com
  • SMF Version: 2 RC4
  • SP Version: 2.3.3
Re: 8: Undefined index: action
« Reply #5 on: September 24, 2008, 08:27:56 AM »
The issue is with your "Users In Arcade" block, try the code below. It checks to see that the $data['action'] variable is set, that should remove the error.

Code: [Select]
global $txt, $context,$settings, $db_prefix;
   require_once('SSI.php');

//    Heres the bullits duck lol
$bullet2 = '<img src="'.$settings['images_url'].'/aim.gif" alt="" border="0" style="margin:0 2px 0 0;" />';
//   Its ok now bullits have flown by stand up again lol
$online = ssi_whosOnline('array');
$arcade_users = array();
foreach($online['users'] as $user)
{
   
   $result = db_query("
      SELECT url
      FROM {$db_prefix}log_online
      WHERE ID_MEMBER = $user[id]",__FILE__, __LINE__);

   $checkit = mysql_fetch_assoc($result);
   $data = @unserialize($checkit['url']);
   if(!empty($data['action']) && ($data['action']=='arcade'))
   {
      echo $bullet2 , $user['hidden'] ? '<i>' . $user['link'] . '</i>' : $user['link'];  echo ' ';
      $arcade_users[] = $user;
   }
   unset($data);
}

//   No arcade users?
if(empty($arcade_users))
   echo 'no players playing at the moment';
// end wdmboard_statsonline
SMF Friend (Former Support Specialist) | SimplePortal DeveloperMy SMF Mods | SimplePortal"Quis custodiet ipsos custodes?" - Who will Guard the Guards?Please don't send me ANY support related PMs. I will just delete them.

Offline Ace

  • Semi Newbie
  • *
  • Posts: 19
Re: 8: Undefined index: action
« Reply #6 on: September 24, 2008, 08:46:56 AM »
The issue is with your "Users In Arcade" block, try the code below. It checks to see that the $data['action'] variable is set, that should remove the error.

Code: [Select]
global $txt, $context,$settings, $db_prefix;
   require_once('SSI.php');

//    Heres the bullits duck lol
$bullet2 = '<img src="'.$settings['images_url'].'/aim.gif" alt="" border="0" style="margin:0 2px 0 0;" />';
//   Its ok now bullits have flown by stand up again lol
$online = ssi_whosOnline('array');
$arcade_users = array();
foreach($online['users'] as $user)
{
   
   $result = db_query("
      SELECT url
      FROM {$db_prefix}log_online
      WHERE ID_MEMBER = $user[id]",__FILE__, __LINE__);

   $checkit = mysql_fetch_assoc($result);
   $data = @unserialize($checkit['url']);
   if(!empty($data['action']) && ($data['action']=='arcade'))
   {
      echo $bullet2 , $user['hidden'] ? '<i>' . $user['link'] . '</i>' : $user['link'];  echo ' ';
      $arcade_users[] = $user;
   }
   unset($data);
}

//   No arcade users?
if(empty($arcade_users))
   echo 'no players playing at the moment';
// end wdmboard_statsonline

Ok thanks
I seem to have no errors in log now....

Offline Ace

  • Semi Newbie
  • *
  • Posts: 19
Re: 8: Undefined index: action
« Reply #7 on: September 24, 2008, 08:56:25 AM »
ive rechecked my logs again and still no errors your fixer upper worked thanks again... :applause: :applause: :applause:

Offline Nathaniel

  • Comrade
  • *
  • Posts: 5203
  • Gender: Male
    • Verbtest.com
  • SMF Version: 2 RC4
  • SP Version: 2.3.3
Re: 8: Undefined index: action
« Reply #8 on: September 24, 2008, 08:57:53 AM »
Thats good to hear. :D
SMF Friend (Former Support Specialist) | SimplePortal DeveloperMy SMF Mods | SimplePortal"Quis custodiet ipsos custodes?" - Who will Guard the Guards?Please don't send me ANY support related PMs. I will just delete them.

Offline Jakki

  • Semi Newbie
  • *
  • Posts: 48
  • Gender: Female
  • Peaceful living is the way to go.
    • roundablock
Re: 8: Undefined index: action
« Reply #9 on: September 24, 2008, 12:45:28 PM »
Thanks I was just reading this and this solved my issue also.