Ok I was using this mod until the latest phpbb update killed it.
argh, this is hard to explain...
Basically I updated PHPBB with 'merge' files, then afterwards I was getting these errors when I edited a post:
[phpBB Debug] PHP Notice: in file /includes/functions_posting.php on line 144: Invalid argument supplied foreach ()
[phpBB Debug]PHP Notice: in file /includes/functions.php on line 4183: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3493)
[phpBB Debug]PHP Notice: in file /includes/functions.php on line 4185: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3493)
[phpBB Debug]PHP Notice: in file /includes/functions.php on line 4186: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3493)
[phpBB Debug]PHP Notice: in file /includes/functions.php on line 4187: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3493)
I read somewhere that the latest update includes it's own smiley pagination, so I deleted the adds to:
language/en/acp/board.php
includes/acp/acp_board.php
And then undid changes to:
includes/functions_posting.php
like so:
Replaced:
Code: Select all
$smilies_per_page = $config['smilies_per_page'];
$count = 0;
$current_page = 1;
// Build nested array for smilies
foreach ($smilies as $row)
{
$count++;
if ($count > $current_page*$smilies_per_page && $smilies_per_page != 0)
{
$current_page++;
}
$new_smilies[$current_page][$count] = $row;
}
if (sizeof($smilies))
{
foreach ($new_smilies as $page => $smilies_ary)
{
$template->assign_block_vars('smiley_pages', array(
'PAGE' => $page,
'TOTAL_PAGES' => sprintf($user->lang['PAGE_OF'], $page, $current_page, 1),
'FIRST_PAGE' => ($page == 1) ? true : false,
'PREV_PAGE' => $page-1,
'NEXT_PAGE' => $page+1,
'LAST_PAGE' => ($page == $current_page) ? true : false,
'ONE_PAGE' => ($current_page == 1) ? true : false
));
foreach ($smilies_ary as $key => $row)
{
$template->assign_block_vars('smiley_pages.smiley', array(
'COUNT' => $key,
'SMILEY_CODE' => $row['code'],
'A_SMILEY_CODE' => addslashes($row['code']),
'SMILEY_IMG' => $phpbb_root_path . $config['smilies_path'] . '/' . $row['smiley_url'],
'SMILEY_WIDTH' => $row['smiley_width'],
'SMILEY_HEIGHT' => $row['smiley_height'],
'SMILEY_DESC' => $row['emotion']
));
}
With:
Code: Select all
if (sizeof($smilies))
{
$root_path = (defined('PHPBB_USE_BOARD_URL_PATH') && PHPBB_USE_BOARD_URL_PATH) ? generate_board_url() . '/' : $phpbb_root_path;
foreach ($smilies as $row)
{
$template->assign_block_vars('smiley', array(
'SMILEY_CODE' => $row['code'],
'A_SMILEY_CODE' => addslashes($row['code']),
'SMILEY_IMG' => $root_path . $config['smilies_path'] . '/' . $row['smiley_url'],
'SMILEY_WIDTH' => $row['smiley_width'],
'SMILEY_HEIGHT' => $row['smiley_height'],
'SMILEY_DESC' => $row['emotion'])
);
}
}
if ($mode == 'inline' && $display_link)
{
$template->assign_vars(array(
'S_SHOW_SMILEY_LINK' => true,
'U_MORE_SMILIES' => append_sid("{$phpbb_root_path}posting.$phpEx", 'mode=smilies&f=' . $forum_id))
);
Which fixed the errors, but now I have no smiley's.
Can anyone advise?