Customization > Blocks and Modifications

[Block] Advanced Unread Posts

<< < (15/16) > >>

Jade Elizabeth:
No line 44 is this:

--- Code: --- $items = $type($limit, null, $boards, 'array');

--- End code ---



--- Code: ---function sportal_unread($parameters, $id, $return_parameters = false)
{
global $txt, $scripturl, $settings, $context, $color_profile, $boardurl;

$block_parameters = array(
'boards' => 'boards',
'limit' => 'int',
'type' => 'select',
'display' => 'select',
);

if ($return_parameters)
return $block_parameters;

$boards = !empty($parameters['boards']) ? explode('|', $parameters['boards']) : null;
$limit = !empty($parameters['limit']) ? (int) $parameters['limit'] : 5;
$rows = !empty($parameters['rows']) ? (int) $parameters['rows'] : 5;
$type = 'unread' . (!empty($parameters['type']) ? $parameters['type'] : 'Posts');
$display = !empty($parameters['display']) ? $parameters['display'] : 'full';
$prev = !empty($parameters['prev']) ? $parameters['prev'] : 'Prev';
$next = !empty($parameters['next']) ? $parameters['next'] : 'Next';
$vertical_bar_x = !empty($parameters['vbar_x']) ? $parameters['vbar_x'] : '|';
$vertical_bar_y = !empty($parameters['vbar_y']) ? $parameters['vbar_y'] : '|';
$images = !empty($parameters['unread_icons']) ? $parameters['unread_icons'] : false;
$items = $type($limit, null, $boards, 'array');
$row_height_full = !empty($parameters['full_height']) ? (int) $parameters['full_height'] : 35;
$row_height_compact = !empty($parameters['compact_height']) ? (int) $parameters['compact_height'] : 45;
$show_icon = !empty($parameters['show_icon']) ? $parameters['show_icon'] : 'yes';
$current_page = !empty($_SESSION['sp_current_page']) ? (int) $_SESSION['sp_current_page'] : 1;
$class = !empty($parameters['container_class']) ? $parameters['container_class'] : 'mediumtext';
$style = !empty($parameters['container_style']) ? $parameters['container_style'] : 'font-family:Helvetica;';
if ($display == 'full')
$height = ($rows+1.88) * $row_height_full;
else
$height = ($rows+0.88) * $row_height_compact;
$counter = 0;

--- End code ---

emanuele:
Replace everything with the attached.

Jade Elizabeth:
Thanks so much! That works now! I wouldn't have figured that out on my own, thank you!! :D

Portugal:
Instead of unread, its possibile to change for unreply??

emanuele:
Possible is certainly possible. It requires to rewrite the query to fetch the "unreply" following the one used by SMF for the same function.

* emanuele hopes Chan Zhen has some moment to look into the matter.  :angel:

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version