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: 481
  • 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]

NEED HELP? If you're looking for support with Simple Portal, look no further than the Support Board!

Author Topic: message  (Read 3658 times)

0 Members and 1 Guest are viewing this topic.

Offline Normally

  • Jr. Member
  • **
  • Posts: 53
  • Gender: Male
  • SMF Version: 2.0.2
  • SP Version: 2.3.5
message
« on: February 24, 2009, 04:12:21 AM »
I get this messages in the log:
Quote
                              http://www.kaartenleggen.nl/zigeunerkaarten/index.php?action=forum                                                     
                                                        8: Undefined offset:  158                         
                                                        Bestand: /home/kaarten/domains/kaartenleggen.nl/public_html/zigeunerkaarten/cache/lang_Post_dutch_zigeunerkaarten.php (portal_above sub template - eval?)
                               Regel: 266                           

I use:
SimplePortal 2.1.1
SMF 2.0 RC1

Does anyone know what the problem is?

Stef.
« Last Edit: February 24, 2009, 08:13:27 AM by Normally »

Offline [SiNaN]

  • Mr. SimplePortal
  • Developer
  • *
  • Posts: 6782
  • SMF Version: 2.0.15
  • SP Version: 2.3.7
Re: message
« Reply #1 on: February 24, 2009, 06:19:38 AM »
It probably is not related to SimplePortal. But to make sure:

Try disabling template eval using the instructions here:

http://www.simplemachines.org/community/index.php?topic=290186.0

Then check error logs agin. You will see the exact file and line giving error.
And slowly, you come to realize... It's all as it should be...

Offline Normally

  • Jr. Member
  • **
  • Posts: 53
  • Gender: Male
  • SMF Version: 2.0.2
  • SP Version: 2.3.5
Re: message
« Reply #2 on: February 24, 2009, 06:28:43 AM »
Now i get this message in the log:
http://www.kaartenleggen.nl/zigeunerkaarten/index.php?action=admin;area=logs;e5722a888a0c=d5fdb371eb1c819b89e5b30b5c01b36                                                     
                                                       8: Undefined offset:  15                         
                                                       Bestand: /home/kaarten/domains/kaartenleggen.nl/public_html/zigeunerkaarten/Sources/SPortal2.php(1862) : eval()'d code
Regel: 266                            

Offline [SiNaN]

  • Mr. SimplePortal
  • Developer
  • *
  • Posts: 6782
  • SMF Version: 2.0.15
  • SP Version: 2.3.7
Re: message
« Reply #3 on: February 24, 2009, 06:32:52 AM »
Okay, I see. You have a PHP block and it causes an undefined index error. Would paste the codes of your PHP blocks here?

BTW, do not forget to enable the template eval back. You can see how to do that from the same topic linked above.
And slowly, you come to realize... It's all as it should be...

Offline Normally

  • Jr. Member
  • **
  • Posts: 53
  • Gender: Male
  • SMF Version: 2.0.2
  • SP Version: 2.3.5
Re: message
« Reply #4 on: February 24, 2009, 06:43:37 AM »
PHP block:
Code: [Select]
{

   global $smcFunc, $memberContext, $context, $user_info, $txt, $scripturl, $modSettings, $settings, $sc;

   global $color_profile;

   if($context['user']['is_logged'])

   {

      $member_id = $user_info['id'];

      loadMemberData($member_id);

      loadMemberContext($member_id);

      //If you install the Membercolor Link the colors will be autmaticly set.

      if(empty($modSettings['MemberColorLinkInstalled']) && sp_loadColors($member_id) !== false)

         $memberContext[$member_id]['colored_name'] = $color_profile[$member_id]['colored_name'];



      $memberContext[$member_id]['karma']['total'] = $memberContext[$member_id]['karma']['good'] - $memberContext[$member_id]['karma']['bad'];

   }

      echo '<div align="center">';



   if ($context['user']['is_guest'])

   {

      echo '<form action="', $scripturl, '?action=login2" method="post" accept-charset="', $context['character_set'], '">

         <table border="0" cellspacing="1" cellpadding="0" class="ssi_table">

            <tr>

               <td align="right"><label for="user">', $txt['username'], ':</label></td>

               <td><input type="text" id="sp_user" name="user" size="9" value="', !empty($user_info['username']) ? $user_info['username'] : '', '" /></td>

            </tr><tr>

               <td align="right"><label for="passwrd">', $txt['password'], ':</label></td>

               <td><input type="password" name="passwrd" id="sp_passwrd" size="9" /></td>

            </tr><tr>

               <td>

                  <select name="cookielength">

                     <option value="60">', $txt['one_hour'], '</option>

                     <option value="1440">', $txt['one_day'], '</option>

                     <option value="10080">', $txt['one_week'], '</option>

                     <option value="43200">', $txt['one_month'], '</option>

                     <option value="-1" selected="selected">', $txt['forever'], '</option>

                  </select>

               </td>

               <td><input type="submit" value="', $txt['login'], '" /></td>

            </tr>

         </table>

      </form>', sprintf($txt['welcome_guest'], $txt['guest_title']);

   }

   else

   {

      echo $txt['hello_member'], ' <b>', (!empty($memberContext[$member_id]['colored_name']) ? $memberContext[$member_id]['colored_name'] : $context['user']['name']), '</b><br /><br />';



      if (!empty($context['user']['avatar']))

         echo $context['user']['avatar']['image'], '<br /><br />';



      if (!empty($memberContext[$member_id]['group']))

         echo $memberContext[$member_id]['group'];

      else

         echo $memberContext[$member_id]['post_group'];

     

      echo '<br />', $memberContext[$member_id]['group_stars'], '<hr /></div>';

 if ($context['user']['is_logged'])
   {
      echo '
                        <span style="font-size: 100%;"> <a href="', $scripturl, '?action=unread">', $txt['unread_since_visit'], '</a> <br />
                        <a href="', $scripturl, '?action=unreadreplies">', $txt['show_unread_replies'], '</a><br /></span><br>';

}       
echo '
       
         ', $txt['posts'], ': ',$memberContext[$member_id]['posts'],'<br />';



      if(!empty($modSettings['karmaMode']))

         echo '

          ', $txt['sp-userkarma'], ': ';

     

      if($modSettings['karmaMode'] == '1')

         echo $memberContext[$member_id]['karma']['total'],'<br />';

      elseif($modSettings['karmaMode'] == '2')

         echo '+', $memberContext[$member_id]['karma']['good'],'/-', $memberContext[$member_id]['karma']['bad'], '<br />';



   }


   if(allowedTo('pm_read'))

      echo '

      ', $txt['sp-usertmessage'], ': <a href="' . $scripturl . '?action=pm">' . $context['user']['messages'], '</a><br />

       ', $txt['sp-usernmessage'], ': ' . $context['user']['unread_messages'], '<hr />';

if (!empty($context['user']['total_time_logged_in']))

      {

   echo '

   <span style="font-size: 100%;">            ', $txt['totalTimeLogged1'];
echo'
         <br>';
// If days is just zero, don't bother to show it.
                            if ($context['user']['total_time_logged_in']['days'] > 0)

   echo $context['user']['total_time_logged_in']['days'] . $txt['totalTimeLogged2'];


// Same with hours - only show it if it's above zero.

         if ($context['user']['total_time_logged_in']['hours'] > 0)

            echo $context['user']['total_time_logged_in']['hours'] . $txt['totalTimeLogged3'];



         // But, let's always show minutes - Time wasted here: 0 minutes.

         echo $context['user']['total_time_logged_in']['minutes'], $txt['totalTimeLogged4'], '<br /></span>';

      }   

   if (!$context['user']['is_guest'])

      echo '

      <div align="center"><img src="' . $settings['images_url'] . '/arrow.gif" alt="', $txt['sp-arrow'], '" /> <a href="'.$scripturl.'?action=profile">', $txt['profile'], '</a>   <img src="' . $settings['images_url'] . '/arrow.gif" alt="', $txt['sp-arrow'], '" /> <a href="', $scripturl, '?action=logout;sesc=', $sc, '">', $txt['logout'], '</a>';

   echo '</div><hr />';



   $totals = array(

      'members' => $modSettings['totalMembers'],

      'posts' => $modSettings['totalMessages'],

      'topics' => $modSettings['totalTopics']

   );



   $request = $smcFunc['db_query']('','

      SELECT COUNT(*)

      FROM {db_prefix}boards'

   );

   list ($totals['boards']) = $smcFunc['db_fetch_row']($request);

   $smcFunc['db_free_result']($request);



   $request = $smcFunc['db_query']('','

      SELECT COUNT(*)

      FROM {db_prefix}categories'

   );

   list ($totals['categories']) = $smcFunc['db_fetch_row']($request);

   $smcFunc['db_free_result']($request);;


// Statistieken
   echo '
   
<div class="normaltext">
<img src="http://www.kaartenleggen.nl/zigeunerkaarten/Themes/zigeunerkaarten/images/icons/info.gif" alt="" title="statistieken">
<a href="http://www.kaartenleggen.nl/zigeunerkaarten/index.php?action=stats"><strong>Statistieken</strong></a>
</div>
     <br />
          ', $txt['total_members'], ': <a href="', $scripturl . '?action=mlist">', $totals['members'], '</a>
      <br />
          ', $txt['total_posts'], ': ', $totals['posts'],'
      <br />
          ', $txt['total_topics'], ': ', $totals['topics'],'
      <br />
          ', $txt['total_cats'], ': ', $totals['categories'],'
      <br />
          ', $txt['total_boards'], ': ', $totals['boards'],'
      <hr />';




// Members online
   echo '

<div class="normaltext">
<img src="http://www.kaartenleggen.nl/zigeunerkaarten/Themes/zigeunerkaarten/images/icons/online.gif" alt="" title="online leden">
<a href="http://www.kaartenleggen.nl/zigeunerkaarten/index.php?action=who"><strong>Leden online</strong></a>
    </div>';

      global $txt, $scripturl;
      require_once('SSI.php');

     $limit = 20; // Limited number of users shown.

      // add online users
      echo '
      <h5 class="online"><a href="'.$scripturl.'?action=who">'.$txt[158].'</a></h5>
     
         ';
     
      $online = ssi_whosOnline('array');
      echo $txt['sp-onlineuser'].': '.$online['num_users']. '
         
         <br />'.$txt['sp-onlineguest'].': '.$online['guests'].'
         <br />'.$txt['sp-onlinetuser'].': '.$online['total_users'].'
         <br /><br />
         <width: 100%; ' , $online['num_users']>14 ? 'height: 23ex;overflow: auto;' : '' ,'">';

      foreach($online['users'] as $user)
      {
         if ($limit <= 0)
               break;
         echo '
            <img src="' . $settings['images_url'] . '/useron.gif" alt="', $txt['user'], '" /> ', $user['hidden'] ? '<em>' . $user['link'] . '</em>' : $user['link'];
         echo '<br />';
         $limit--;
      }
      echo '
<br />
<div class="smalltext">
                     ', $txt['most_online_today'], ': <b>', $modSettings['mostOnlineToday'], '</b>.
                     ', $txt['most_online_ever'], ': ', $modSettings['mostOnline'], ' (' , timeformat($modSettings['mostDate']), ')
                  </div>

         '; 
      }
 

PHP Block:
Code: [Select]
global $context, $memberContext, $modSettings, $color_profile,$smcFunc;

//Edit the number of last members you want to show
$number_to_display = 5;

echo '
<div style="text-align: center;">
   <table>';

$request = $smcFunc['db_query']('','
   SELECT
      id_member, member_name
   FROM smf_members
   ORDER BY id_member DESC LIMIT 0,'.$number_to_display
);
while ($row = $smcFunc['db_fetch_assoc']($request)){
   loadMemberData($row['id_member']);
   loadMemberContext($row['id_member']);
   echo '
      <tr><td>';

   if (!empty($memberContext[$row['id_member']]['avatar']['href']))
      echo '
      <img src="'.$memberContext[$row['id_member']]['avatar']['href'].'" alt="" width="50" />';
   else
      echo '
      <img src="avatars/noavatar.gif" alt="" width="30" />';

   echo '
      </td><td>', $memberContext[$row['id_member']]['link'], '</td></tr>';
}

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

And some standard blocks:
Recent Posts Block
Quick Search Block
Calendar Block

Thanks for helping.

Stef.
« Last Edit: February 24, 2009, 06:46:03 AM by Normally »

Offline [SiNaN]

  • Mr. SimplePortal
  • Developer
  • *
  • Posts: 6782
  • SMF Version: 2.0.15
  • SP Version: 2.3.7
Re: message
« Reply #5 on: February 24, 2009, 07:33:07 AM »
In the first codes;

Find:

Code: [Select]
$txt[158]
Replace:

Code: [Select]
$txt['who_title']
And slowly, you come to realize... It's all as it should be...

Offline Normally

  • Jr. Member
  • **
  • Posts: 53
  • Gender: Male
  • SMF Version: 2.0.2
  • SP Version: 2.3.5
Re: message
« Reply #6 on: February 24, 2009, 08:13:09 AM »
This fixt the problem.

Thanks for all your help.

Stef.