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

Installation errors? Mod incompatibilities? Upgrade problems? Make your way over to the Install and Upgrade Support board for all your solutions!

Author Topic: Issue From Error Log  (Read 14015 times)

0 Members and 1 Guest are viewing this topic.

Offline 420connect

  • Jr. Member
  • **
  • Posts: 94
Issue From Error Log
« on: April 08, 2015, 03:55:33 PM »
Hey everyone and anyone!

I've got an issue from my PortalBlocks.php file according to my error log and on closer inspection, it is the line

Code: (PortalBlocks.php - Line 3592 (for me anyway)) [Select]
eval($content);
I have very little knowledge about php and would appreciate if anyone could help me clear this error!

I have a suspicion it could be caused by a custom block I am using (if that could be the issue) but am pretty clueless to be honest..

Attach is my full PortalBlocks.php file if anyone would mind having a look and I'm happy to attach other files / code parts if needbe!

Many thanks as always!

Offline ♦ Ninja ZX-10RR ♦

  • Spammer Hammer
  • Support
  • *
  • Posts: 1193
  • Gender: Male
  • Sniper Legends
    • Virtual Interactive Games Entertainment™
  • SMF Version: 2.0.13
  • SP Version: 2.3.6
  • Elkarte Version: 1.0.6
Re: Issue From Error Log
« Reply #1 on: April 08, 2015, 05:14:03 PM »
Pretty useless if you don't type the full error code and message dude... Also, disable the evaluation of template, I got a feeling it is hiding the real error.
:)
Have you tried SimplePortal Documentation before asking? ;)
F.A.Q.  English Support  |  Blocks Support
Fancy Feature idea ?!  |  Blocks Requests
Themes & Graphics

? My job! ?No PMs for support unless it's a paid request. Thank you! :)#OpIsis

Offline andy

  • On Leave
  • *
  • Posts: 861
  • Gender: Male
    • Outdoor Club Japan (OCJ) アウトドア・クラブ・ジャパン
  • SMF Version: 2.0.15
  • SP Version: 2.3.7
  • Elkarte Version: None
Re: Issue From Error Log
« Reply #2 on: April 09, 2015, 06:05:16 AM »
To be honest, you will always get errors in the log. Might be from mods, custom themes, custom code in blocks etc.
If you are using standard curve theme and simple portal with nothing customized at all (no mods, no other code), you might be lucky and get no errors. And most errors do not affect the performance of your site.
Some might be attributed to your server configurations as well.

I do not bother checking or trying to fix errors unless there are hundreds/ thousand+ /day (some SMF mods do that) or 'critical'.

Andy

« Last Edit: April 09, 2015, 06:07:48 AM by andy »
Everyone is a volunteer here so please try and make a small donation to keep the Simple Portal website running


Offline ♦ Ninja ZX-10RR ♦

  • Spammer Hammer
  • Support
  • *
  • Posts: 1193
  • Gender: Male
  • Sniper Legends
    • Virtual Interactive Games Entertainment™
  • SMF Version: 2.0.13
  • SP Version: 2.3.6
  • Elkarte Version: 1.0.6
Re: Issue From Error Log
« Reply #3 on: April 09, 2015, 10:33:48 AM »
135+ mods, heavily customized default theme (if you don't know what I mean by heavily customized feel free to check it out: http://virtualinteractivege.com/index.php), lots of manual edits, error log is clear except of fake registrations notifications :)
Have you tried SimplePortal Documentation before asking? ;)
F.A.Q.  English Support  |  Blocks Support
Fancy Feature idea ?!  |  Blocks Requests
Themes & Graphics

? My job! ?No PMs for support unless it's a paid request. Thank you! :)#OpIsis

Offline 420connect

  • Jr. Member
  • **
  • Posts: 94
Re: Issue From Error Log
« Reply #4 on: April 09, 2015, 11:43:23 AM »
Oops, sorry, I had posted this before going to bed and missed that out!  :whistle:



This is what it tell me ^^ and after checking, I already had my template evaluation thing disabled.
Hopefully it makes some sense to you :P

I currently have about 40 pages of the same error, and although I don't notice anything out of the ordinary, theres probably something not quite right in the code somewhere..

I thought I was bad with around 80 MOD's but Ninja takes that to a new extreme :P
(good to know, I still have room to customize though!)

Offline ♦ Ninja ZX-10RR ♦

  • Spammer Hammer
  • Support
  • *
  • Posts: 1193
  • Gender: Male
  • Sniper Legends
    • Virtual Interactive Games Entertainment™
  • SMF Version: 2.0.13
  • SP Version: 2.3.6
  • Elkarte Version: 1.0.6
Re: Issue From Error Log
« Reply #5 on: April 09, 2015, 12:31:49 PM »
That's so weird, it happens when there is an undefined somewhere but similar errors are being thrown when the evaluation of templates is enabled.
Forum » Administration Center » Server Settings » General
Disable evaluation of templates --> double check that the checkbox is checked.
Have you tried SimplePortal Documentation before asking? ;)
F.A.Q.  English Support  |  Blocks Support
Fancy Feature idea ?!  |  Blocks Requests
Themes & Graphics

? My job! ?No PMs for support unless it's a paid request. Thank you! :)#OpIsis

Offline 420connect

  • Jr. Member
  • **
  • Posts: 94
Re: Issue From Error Log
« Reply #6 on: April 10, 2015, 11:24:48 AM »
:o

Yup, definitely have disable checked

Offline ♦ Ninja ZX-10RR ♦

  • Spammer Hammer
  • Support
  • *
  • Posts: 1193
  • Gender: Male
  • Sniper Legends
    • Virtual Interactive Games Entertainment™
  • SMF Version: 2.0.13
  • SP Version: 2.3.6
  • Elkarte Version: 1.0.6
Re: Issue From Error Log
« Reply #7 on: April 10, 2015, 11:37:31 AM »
No idea, never seen anything similar before, really. :(
Have you tried SimplePortal Documentation before asking? ;)
F.A.Q.  English Support  |  Blocks Support
Fancy Feature idea ?!  |  Blocks Requests
Themes & Graphics

? My job! ?No PMs for support unless it's a paid request. Thank you! :)#OpIsis

Offline Chen Zhen

  • The Underdog
  • Operations Manager
  • *
  • Posts: 1350
  • Gender: Male
  • Kinesis
    • WebDev
  • SMF Version: 2.1
  • EhPortal Version: 1.22
Re: Issue From Error Log
« Reply #8 on: April 10, 2015, 02:03:14 PM »
420connect,

  It appears to be caused by one of your custom php blocks.

Regards.

Offline ♦ Ninja ZX-10RR ♦

  • Spammer Hammer
  • Support
  • *
  • Posts: 1193
  • Gender: Male
  • Sniper Legends
    • Virtual Interactive Games Entertainment™
  • SMF Version: 2.0.13
  • SP Version: 2.3.6
  • Elkarte Version: 1.0.6
Re: Issue From Error Log
« Reply #9 on: April 10, 2015, 02:28:48 PM »
Hmm, how to debug this kind of issues? Usually (you will know this for sure) you turn eval of templates off and then you can see the error, but apparently it doesn't work if the issue is in a custom php block, is there a way to make it to show up?
Have you tried SimplePortal Documentation before asking? ;)
F.A.Q.  English Support  |  Blocks Support
Fancy Feature idea ?!  |  Blocks Requests
Themes & Graphics

? My job! ?No PMs for support unless it's a paid request. Thank you! :)#OpIsis

Offline Chen Zhen

  • The Underdog
  • Operations Manager
  • *
  • Posts: 1350
  • Gender: Male
  • Kinesis
    • WebDev
  • SMF Version: 2.1
  • EhPortal Version: 1.22
Re: Issue From Error Log
« Reply #10 on: April 10, 2015, 05:03:02 PM »
 Ninja ZX-10RR,

  I don't think SP has been designed to show the actual block id within the error log.
The only way to figure it out is to disable custom PHP blocks through a process of elimination.
One would have to purge the error logs every time as each block is disabled during the process.

Regards.

Offline ♦ Ninja ZX-10RR ♦

  • Spammer Hammer
  • Support
  • *
  • Posts: 1193
  • Gender: Male
  • Sniper Legends
    • Virtual Interactive Games Entertainment™
  • SMF Version: 2.0.13
  • SP Version: 2.3.6
  • Elkarte Version: 1.0.6
Re: Issue From Error Log
« Reply #11 on: April 10, 2015, 05:54:40 PM »
If it's not too much of a hassle it could be a good feature for 2.3.7, among with the 2 bugs you have tracked down in the bug tracker ;)
Also, thank you for the explanation! :D
Have you tried SimplePortal Documentation before asking? ;)
F.A.Q.  English Support  |  Blocks Support
Fancy Feature idea ?!  |  Blocks Requests
Themes & Graphics

? My job! ?No PMs for support unless it's a paid request. Thank you! :)#OpIsis

Offline 420connect

  • Jr. Member
  • **
  • Posts: 94
Re: Issue From Error Log
« Reply #12 on: April 24, 2015, 01:01:36 PM »
Sorry for the late return! :P

I think I've found what block is causing my issues (and possibly what line)..

Much appreciated if someone wouldn't mind having a check over the following..

my error log says line 3 but I'm no PHP expert at all..

Code: [Select]
global  $sourcedir;

$block['style'] = sportal_parse_style('explode', $block['style'], true);  //Parse block style parameters.
template_block($block); // Output the block.
$blocks = array(
                   array(
'label' => 'Chat',
'type' => 'sp_shoutbox',
'parameters' => array('display' => 1, 'shoutbox' => 2),
),
array(
'label' => 'Who`s Online',
'type' => 'sp_whosonline',
'parameters' => array('display' => 1),
),
array(
'label' => 'Recent Posts',
'type' => 'sp_php',
'parameters' => array('content' => file_get_contents($sourcedir . '/spcustomblock1.php')),
),
array(
'label' => 'Recent Topics',
'type' => 'sp_recent',
'parameters' => array('type' => 1, 'display' => 1),
),
array(
'label' => 'Unread Posts',
'type' => 'sp_php',
'parameters' => array('content' => file_get_contents($sourcedir . '/spcustomblock2.php')),
),
);

global $txt;

$button_list = array();
foreach ($blocks as $id => $block)
{
$txt['sp_bib_label_' . $id] = $block['label'];

$button_list[] = array(
'text' => 'sp_bib_label_' . $id,
'image' => '',
'lang' => true,
'url' => '#sp_bib_' . $id . '" id="sp_bib_button_' . $id . '" onclick="sp_bib_change(' . $id . '); return false;',
);
}

$button_list[0]['active'] = true;

echo '
<div style="overflow: auto;">
', template_button_strip($button_list), '
</div>';

foreach ($blocks as $id => $block)
{
echo '
<div id="sp_bib_', $id, '"', $id != 0 ? ' style="display: none;"' : '', '>';

$block['type']($block['parameters'], 0);

echo '
</div>';
}

echo '
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
function sp_bib_change(id)
{
for (var i = 0; i < ', count($blocks), '; i++)
{
document.getElementById(\'sp_bib_\' + i).style.display = i == id ? \'\' : \'none\';
document.getElementById(\'sp_bib_button_\' + i).className = \'button_strip_\' + i + (i == id ? \' active\' : \'\');
}
}
// ]]></script>';

Offline Chen Zhen

  • The Underdog
  • Operations Manager
  • *
  • Posts: 1350
  • Gender: Male
  • Kinesis
    • WebDev
  • SMF Version: 2.1
  • EhPortal Version: 1.22
Re: Issue From Error Log
« Reply #13 on: April 24, 2015, 09:57:06 PM »
420connect,

  Prior to posting a fix it would be prudent to post the actual error from the log to be sure we are addressing your issue.

Regards.

Offline 420connect

  • Jr. Member
  • **
  • Posts: 94
Re: Issue From Error Log
« Reply #14 on: April 25, 2015, 09:37:44 AM »
Sorry I forgot to include it again, - just the same as stated earlier though..




Thank you very much in advance!

(Can hardly believe I'll soon have a error free log! yey!)

Offline Chen Zhen

  • The Underdog
  • Operations Manager
  • *
  • Posts: 1350
  • Gender: Male
  • Kinesis
    • WebDev
  • SMF Version: 2.1
  • EhPortal Version: 1.22
Re: Issue From Error Log
« Reply #15 on: April 25, 2015, 12:48:04 PM »
420connect,

find:
Code: [Select]
global  $sourcedir;

$block['style'] = sportal_parse_style('explode', $block['style'], true);  //Parse block style parameters.

replace:
Code: [Select]
global  $sourcedir;

$block = !empty($block) ? $block : array();
$block['style'] = !empty($block['style']) ? sportal_parse_style('explode', $block['style'], true) : array();  //Parse block style parameters.

... but that only patches it and does not address the issue to actually solve the problem. Also if the $block array is null line 2 should be throwing the error so I am not sure if you found the part that is causing it (it starts at line 0). I gave an edit to stop an error from line 2 or 3 of the code you just posted.

Regards.



Offline 420connect

  • Jr. Member
  • **
  • Posts: 94
Re: Issue From Error Log
« Reply #16 on: April 25, 2015, 02:48:25 PM »
*updated this

Damn, I still seem to be getting them after making the change although the error has changed from:

8: Undefined variable: block

to

8: Undefined index: style

Could it be from one of the custom blocks.. inside that block then?

2 custom blocks:

Code: [Select]
<?php

/*
Block: Recent posts with post preview
Author: Blue @ Simple Portal.net
Version: 1.6
*/

/* [SETUP WHAT YOU WANT HERE] */

$topics_posts 2; // TOPICS - 1 | MESSAGES - 2
$limit 50; // How many recent posts do you want to output?
$number 340; // How many characters do you want to output?
$exclude_boards = array(87931771); // IF null guests can see all boards | IF you want to hide some boards use: array( ID1, ID2, ID3) where ID is the board's ID
$htmlspecialcharacters false// Do you need to show html special characters like Greek characters?

// Scroll Enable? Height and Speed?
$scrolling 2;       // ENABLE - 1 | DISABLE - 2
$speed 4;           // SLOW - 1 | MEDIUM - 10 | FAST - 20
$height "210px";
$scrollbar 1;       // ENABLE - 1 | DISABLE - 2

// Do you want to translate it to your own language? :P
$text['sportal_false'] = 'Simple Portal not found';
$text['board'] = 'in';
$text['who'] = 'by';

/* [STOP!] - THIS IS THE END OF SETUP */

//Only code from now on ;)
global $smcFunc$scripturl$sourcedir$modSettings$user_info$settings$context;

// Lets see if you are using Simple Portal. If not...well...go get them :D
if (!file_exists($sourcedir '/PortalBlocks.php'))
{
echo $text['sportal_false'];
return;
}

// Let's grab some database results
if ($topics_posts == 1) {

if (is_array($exclude_boards) || (int) $exclude_boards === $exclude_boards)
{
$exclude_boards is_array($exclude_boards) ? $exclude_boards : array($exclude_boards);
}
elseif ($exclude_boards != null)
{
$output_method $exclude_boards;
$exclude_boards = array();
}

$posts_result $smcFunc['db_query']('''
   SELECT IFNULL(u.real_name, m.poster_name) AS poster_name, m.poster_time, m.id_msg, t.id_member_updated, m.subject, m.body, m.id_topic, b.name, t.id_last_msg, u.avatar, g.online_color,' 
. ($user_info['is_guest'] ? '1 AS is_read, 0 AS new_from' '
IFNULL(lt.id_msg, IFNULL(lmr.id_msg, 0)) >= m.id_msg_modified AS is_read,
IFNULL(lt.id_msg, IFNULL(lmr.id_msg, -1)) + 1 AS new_from'
) . '
   FROM {db_prefix}topics AS t
   LEFT JOIN {db_prefix}boards AS b ON (t.id_board = b.id_board)
   LEFT JOIN {db_prefix}messages AS m ON (m.id_msg = t.id_last_msg)
   LEFT JOIN {db_prefix}members AS u ON (t.id_member_updated = u.id_member)
   LEFT JOIN {db_prefix}membergroups AS g ON (g.id_group = CASE WHEN u.id_group = 0 THEN u.id_post_group ELSE u.id_group END)
   ' 
. (!$user_info['is_guest'] ? '
LEFT JOIN {db_prefix}log_topics AS lt ON (lt.id_topic = m.id_topic AND lt.id_member = ' 
$user_info['id'] . ')
LEFT JOIN {db_prefix}log_mark_read AS lmr ON (lmr.id_board = b.id_board AND lmr.id_member = ' 
$user_info['id'] . ')' '') . '     
   WHERE m.approved=1'   
. (empty($exclude_boards) ? '' '
AND b.id_board NOT IN ({array_int:exclude_boards})'
) . ' AND {query_see_board}
   ORDER BY t.id_last_msg DESC
   LIMIT ' 
$limit
array(
'exclude_boards' => empty($exclude_boards) ? '' $exclude_boards,
)   
   );
$posts = array();
while (
$row_posts $smcFunc['db_fetch_assoc']($posts_result))
{

      global 
$memberContext;
      
loadMemberData($row_posts['id_member_updated']);
      
loadMemberContext($row_posts['id_member_updated']);

   
$posts[] = array(
  'id' => $row_posts['id_member_updated'],
      
'username' => '<a style="color: ' $row_posts['online_color'] . ';" href="' $scripturl '?action=profile;u=' $row_posts['id_member_updated'] . '">' $row_posts['poster_name'] . '</a>',
      
'subject' => '<a style="font-weight: bold;" title="' $text['board'] . '&nbsp;' $row_posts['name'] .'" href="' $scripturl '?topic=' $row_posts['id_topic'] . '.msg' $row_posts['id_last_msg'] . ';topicseen#new">' $row_posts['subject'] . '</a>',
      
'body' => parse_bbc($row_posts['body']),
  'avatar' => $row_posts['avatar'] == '' $memberContext[$row_posts['id_member_updated']]['avatar']['href'] : (stristr($row_posts['avatar'], 'http://') ? $row_posts['avatar'] : $modSettings['avatar_url'] . '/' $row_posts['avatar']),
  'board' => $row_posts['name'], 
  'time' => timeformat($row_posts['poster_time']),
  'new' => !empty($row_posts['is_read'])
   );
}
$smcFunc['db_free_result']($posts_result);

} else {

if (is_array($exclude_boards) || (int) $exclude_boards === $exclude_boards)
{
$exclude_boards is_array($exclude_boards) ? $exclude_boards : array($exclude_boards);
}
elseif ($exclude_boards != null)
{
$output_method $exclude_boards;
$exclude_boards = array();
}

$posts_result $smcFunc['db_query']('''
   SELECT IFNULL(u.real_name, m.poster_name) AS poster_name, m.poster_time, m.id_msg, m.id_member, m.subject, m.body, m.id_topic, b.name, b.id_board, u.avatar, g.online_color,' 
. ($user_info['is_guest'] ? '1 AS is_read, 0 AS new_from' '
IFNULL(lt.id_msg, IFNULL(lmr.id_msg, 0)) >= m.id_msg_modified AS is_read,
IFNULL(lt.id_msg, IFNULL(lmr.id_msg, -1)) + 1 AS new_from'
) . '
   FROM {db_prefix}messages AS m
   LEFT JOIN {db_prefix}boards AS b ON (m.id_board = b.id_board)
   LEFT JOIN {db_prefix}members AS u ON (m.id_member = u.id_member)
   LEFT JOIN {db_prefix}membergroups AS g ON (g.id_group = CASE WHEN u.id_group = 0 THEN u.id_post_group ELSE u.id_group END)
   ' 
. (!$user_info['is_guest'] ? '
LEFT JOIN {db_prefix}log_topics AS lt ON (lt.id_topic = m.id_topic AND lt.id_member = ' 
$user_info['id'] . ')
LEFT JOIN {db_prefix}log_mark_read AS lmr ON (lmr.id_board = b.id_board AND lmr.id_member = ' 
$user_info['id'] . ')' '') . '   
   WHERE m.approved=1'   
. (empty($exclude_boards) ? '' '
AND b.id_board NOT IN ({array_int:exclude_boards})'
) . ' AND {query_see_board}
   ORDER BY m.id_msg DESC
   LIMIT ' 
$limit
array(
'exclude_boards' => empty($exclude_boards) ? '' $exclude_boards,
)   
   );
$posts = array();
while (
$row_posts $smcFunc['db_fetch_assoc']($posts_result))
{

      global 
$memberContext;
      
loadMemberData($row_posts['id_member']);
      
loadMemberContext($row_posts['id_member']);

   
$posts[] = array(
  'id' => $row_posts['id_member'],
      
'username' => '<a style="color: ' $row_posts['online_color'] . ';" href="' $scripturl '?action=profile;u=' $row_posts['id_member'] . '">' $row_posts['poster_name'] . '</a>',
      
'subject' => '<a style="font-weight: bold;" title="' $text['board'] . '&nbsp;' $row_posts['name'] .'" href="' $scripturl '?topic=' $row_posts['id_topic'] . '.msg' $row_posts['id_msg'] . ';topicseen#new">' $row_posts['subject'] . '</a>',
      
'body' => parse_bbc($row_posts['body']),
  'avatar' => $row_posts['avatar'] == '' $memberContext[$row_posts['id_member']]['avatar']['href'] : (stristr($row_posts['avatar'], 'http://') ? $row_posts['avatar'] : $modSettings['avatar_url'] . '/' $row_posts['avatar']),
  'board' => $row_posts['name'],  
  'time' => timeformat($row_posts['poster_time']),
  'new' => !empty($row_posts['is_read'])
   );
}
$smcFunc['db_free_result']($posts_result);

}

//Finally the Output

//Scrolling xD
if ($scrolling == 1)
echo 
'<div style="overflow: hidden;"><marquee height=' $height ' behavior="scroll" direction="up" scrollamount="' $speed '" onmouseover="this.stop()" onmouseout="this.start()">';

if (
$scrollbar == 1)
echo 
'<div style="height:' $height '; overflow-y: scroll; overflow-x: hidden;">';

foreach (
$posts as $post) {

// Lets fix the BBCode bug and Strip the Text
$content1 str_replace("[""<"$post['body']);
$content2 str_replace("]"">"$content1); 
$content3 strip_tags($content2);
$preview substr ($content3,0,$number);

echo
'<table>
<tr>
<td style="width: 40px;">
<img src="' 
$post['avatar'] .'" alt="" width="40px" height="40px" />
</td>
<td>
$post['subject'];

if (!$post['new'] && $context['user']['is_logged'])
echo '&nbsp;<img src="'$settings['images_url'], '/'$context['user']['language'], '/new.gif" alt="new" border="0" />';

echo '<br />
<small>' 
$text['who'] . '&nbsp;' $post['username'] . '&nbsp;|&nbsp;' $post['time'] .'</small>
</td>
</tr>
</table>'
;

if ($htmlspecialcharacters) {
echo htmlspecialchars($previewENT_NOQUOTES"UTF-8") . '...';
} else {
echo $preview '...';
}

echo 
'<hr />';
}
        
//Scrolling xD
if ($scrollbar == 1)
echo 
'</div>'

if (
$scrolling == 1)
echo 
'</marquee></div>';
?>


2
Code: [Select]
/* Unread Posts Block v1.4 ||  c/o Underdog @ http://askususaquestion.net */
global $settings, $sourcedir;
@require_once($sourcedir . '/PortalUnread.php');

/* Current default settings are for a full display example */
/* Recommended settings for compact display (ie. side block) :           */
/* $parameters['container_style'] = 'font-family:Sans Serif;font-size:12px;   */
/* $parameters['display'] = 'compact';              */

/* --------------------------------------------BLOCK SETTINGS-------------------------------------------- */
$seconds = 300;
$auto_refresh = false; /* Change to false to disable auto refresh */

/* Basic settings */
$parameters['type'] = 'Topics'; /* Posts/Topics */
$parameters['rows'] = '5'; /* (int) Amount of posts/topics per page */
$parameters['display'] = 'full'; /* full/compact */
$parameters['show_icon'] = 'yes'; /* yes/no - Show new icon */
$parameters['full_height'] = 35; /* (int) Uniform row height for full display */
$parameters['compact_height'] = 45; /* (int) Uniform row height for compact display */
$parameters['container_class'] = 'mediumtext'; /* Set the css class for the whole container .. */
$parameters['container_style'] = 'font-family: Verdana, Arial, sans-serif;'; /* Set the css attributes for the whole container */
// $parameters['boards'] = '1|2|3|4'; /* Specific boards to display ... uncomment to use this option! */

/* This is the number of recent topics to select new one's from */ 
$parameters['limit'] = 5; /* (int) Maximum amount of posts/topics to display */

/* Image/Language Text  ...  set $parameters['unread_icons'] = false; to disable images & use text */
/* All images located in directory /Themes/default/images/sp */
$parameters['unread_icons'] = true;
$parameters['prev'] = 'Prev'; 
$parameters['next'] = 'Next';
$parameters['vbar_x'] = '';
$parameters['vbar_y'] = '';

/* Starting page */
$_SESSION['sp_current_page'] = 1;

/* --------------------------------------------END BLOCK SETTINGS-------------------------------------------- */

/* Execute & then let jQuery reset the container every xx milliseconds */
sportal_unread($parameters, false, false);

if ($auto_refresh)
echo '<script type="text/javascript" src="'.$settings['default_theme_url'].'/scripts/sp-jquery-1.3.2.min.js"></script>
<script type="text/javascript">
setInterval(function() {       
    $("#sp_content").load(location.href+" #sp_content","");
        event.stopPropagation();                       
}, '.((int)$seconds * 1000).');
</script>';

appreciated if you would have a check over these to make sure I've not mucked something up?

determined to find and solve this!  :nervous-happy:

... I don't suppose a block that isn't enabled but is saved would be a cause?
« Last Edit: April 25, 2015, 03:07:23 PM by 420connect »

Offline Chen Zhen

  • The Underdog
  • Operations Manager
  • *
  • Posts: 1350
  • Gender: Male
  • Kinesis
    • WebDev
  • SMF Version: 2.1
  • EhPortal Version: 1.22
Re: Issue From Error Log
« Reply #17 on: April 28, 2015, 05:43:55 PM »
420connect,

Try disabling the recent post block that was developed by me & then clear your error log.
If the problem is resolved then update that block with this: http://web-develop.ca/index.php?topic=112.msg928#forumposts
If you use the updated block + file make sure to read the instructions carefully that I gave to use it.

Let me know if this resolved the issue.

Regards.
« Last Edit: April 28, 2015, 05:54:09 PM by Chen Zhen »