how to get new icon if post is not/read in topic on recent posts page smf

Started by Pipke, February 13, 2014, 03:19:12 AM

Previous topic - Next topic

Pipke

on this page--> site url../index.php?action=recent

on file Sources/Recent.php and Recent.Template.php i think?
i want to display a new icon on link url of the posts that aren't read yet by the member.

function RecentPosts()

// Get all the most recent posts.
$request = $smcFunc['db_query']('', '
SELECT
m.id_msg, m.subject, m.smileys_enabled, m.poster_time, m.body, m.id_topic, t.id_board, b.id_cat,
b.name AS bname, c.name AS cname, t.num_replies, m.id_member, m2.id_member AS id_first_member,
IFNULL(mem2.real_name, m2.poster_name) AS first_poster_name, t.id_first_msg,
IFNULL(mem.real_name, m.poster_name) AS poster_name, t.id_last_msg
FROM {db_prefix}messages AS m
INNER JOIN {db_prefix}topics AS t ON (t.id_topic = m.id_topic)
INNER JOIN {db_prefix}boards AS b ON (b.id_board = t.id_board)
INNER JOIN {db_prefix}categories AS c ON (c.id_cat = b.id_cat)
INNER JOIN {db_prefix}messages AS m2 ON (m2.id_msg = t.id_first_msg)
LEFT JOIN {db_prefix}members AS mem ON (mem.id_member = m.id_member)
LEFT JOIN {db_prefix}members AS mem2 ON (mem2.id_member = m2.id_member)
WHERE m.id_msg IN ({array_int:message_list})
ORDER BY m.id_msg DESC
LIMIT ' . count($messages),
array(
'message_list' => $messages,
)


thx for anyhelp.
"If something is wrong, fix it if you can. But train yourself not to worry: Worry never fixes anything."

Click here to view my mods for SMF

Hey 👋 Did i helped... you like what i do. You can now buy me a coffee! ☕

margarett

Nice thought. I definitely agree on this.

* margarett dives into code
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

margarett

Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

Pipke

Nice, cant wait for the code. i tried this for a week now with no result   :P
"If something is wrong, fix it if you can. But train yourself not to worry: Worry never fixes anything."

Click here to view my mods for SMF

Hey 👋 Did i helped... you like what i do. You can now buy me a coffee! ☕

margarett

So, here goes nothing :P
I'm adding 2 joins to the query so I'm sure this is not very efficient in performance. But I can't also think on another way to do it, actually ???

Sources/Recent.php
Find:

// Get all the most recent posts.
$request = $smcFunc['db_query']('', '
SELECT
m.id_msg, m.subject, m.smileys_enabled, m.poster_time, m.body, m.id_topic, t.id_board, b.id_cat,
b.name AS bname, c.name AS cname, t.num_replies, m.id_member, m2.id_member AS id_first_member,
IFNULL(mem2.real_name, m2.poster_name) AS first_poster_name, t.id_first_msg,
IFNULL(mem.real_name, m.poster_name) AS poster_name, t.id_last_msg
FROM {db_prefix}messages AS m
INNER JOIN {db_prefix}topics AS t ON (t.id_topic = m.id_topic)
INNER JOIN {db_prefix}boards AS b ON (b.id_board = t.id_board)
INNER JOIN {db_prefix}categories AS c ON (c.id_cat = b.id_cat)
INNER JOIN {db_prefix}messages AS m2 ON (m2.id_msg = t.id_first_msg)
LEFT JOIN {db_prefix}members AS mem ON (mem.id_member = m.id_member)
LEFT JOIN {db_prefix}members AS mem2 ON (mem2.id_member = m2.id_member)
WHERE m.id_msg IN ({array_int:message_list})
ORDER BY m.id_msg DESC
LIMIT ' . count($messages),
array(
'message_list' => $messages,
)
);

Replace with:
// Get all the most recent posts.
$request = $smcFunc['db_query']('', '
SELECT
m.id_msg, m.subject, m.smileys_enabled, m.poster_time, m.body, m.id_topic, t.id_board, b.id_cat,
' . ($user_info['is_guest'] ? '0' : 'IFNULL(lt.id_msg, IFNULL(lmr.id_msg, -1)) + 1') . ' AS new_from, m.id_msg_modified,
b.name AS bname, c.name AS cname, t.num_replies, m.id_member, m2.id_member AS id_first_member,
IFNULL(mem2.real_name, m2.poster_name) AS first_poster_name, t.id_first_msg,
IFNULL(mem.real_name, m.poster_name) AS poster_name, t.id_last_msg
FROM {db_prefix}messages AS m
INNER JOIN {db_prefix}topics AS t ON (t.id_topic = m.id_topic)
INNER JOIN {db_prefix}boards AS b ON (b.id_board = t.id_board)
INNER JOIN {db_prefix}categories AS c ON (c.id_cat = b.id_cat)
INNER JOIN {db_prefix}messages AS m2 ON (m2.id_msg = t.id_first_msg)
LEFT JOIN {db_prefix}members AS mem ON (mem.id_member = m.id_member)
LEFT JOIN {db_prefix}members AS mem2 ON (mem2.id_member = m2.id_member)' . ($user_info['is_guest'] ? '' : '
LEFT JOIN {db_prefix}log_topics AS lt ON (lt.id_topic = t.id_topic AND lt.id_member = {int:current_member})
LEFT JOIN {db_prefix}log_mark_read AS lmr ON (lmr.id_member = {int:current_member})'). '
WHERE m.id_msg IN ({array_int:message_list})
ORDER BY m.id_msg DESC
LIMIT ' . count($messages),
array(
'message_list' => $messages,
'current_member' => $user_info['id'],
)
);


Find:
'delete_possible' => ($row['id_first_msg'] != $row['id_msg'] || $row['id_last_msg'] == $row['id_msg']) && (empty($modSettings['edit_disable_time']) || $row['poster_time'] + $modSettings['edit_disable_time'] * 60 >= time()),
Add after:
'new' => $row['new_from'] <= $row['id_msg_modified'],
'new_from' => $row['new_from'],
'newtime' => $row['new_from'],
'new_href' => $scripturl . '?topic=' . $row['id_topic'] . '.msg' . $row['new_from'] . '#new',
'id_msg_modified' => $row['id_msg_modified'],


Themes/default/Recent.template.php
Find:

<h5>', $post['board']['link'], ' / ', $post['link'], '</h5>
<span class="smalltext">&#171;&nbsp;', $txt['last_post'], ' ', $txt['by'], ' <strong>', $post['poster']['link'], ' </strong> ', $txt['on'], '<em> ', $post['time'], '</em>&nbsp;&#187;</span>

Replace with:
<h5>', $post['board']['link'], ' / ', $post['link'];
// Is this post new? (assuming they are logged in!)
if ($post['new'] && $context['user']['is_logged'])
echo '
<a href="', $post['new_href'], '" id="newicon' . $post['id'] . '"><img src="', $settings['lang_images_url'], '/new.gif" alt="', $txt['new'], '" /></a>';
echo '
</h5><span class="smalltext">&#171;&nbsp;', $txt['last_post'], ' ', $txt['by'], ' <strong>', $post['poster']['link'], ' </strong> ', $txt['on'], '<em> ', $post['time'], '</em>&nbsp;&#187;</span>
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

Arantor

You'd probably actually be quicker doing that as a separate query once you have the topic ids.

margarett

Yeah, that's that optimization thing, that I have absolutely no idea about :P

Thanks for the heads-up, I might try it if the OP has issues with this ;)
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

Arantor

It's more trial and error for the most part, but as a general rule: taking a large scary query that is already noted to be inefficient and then making it more scary is probably not ideal.

Query count is not an ideal metric for performance; plenty of times you'll find two smaller queries will outperform a single larger one.

Pipke

@margarett, thx it works great, ill use this for a mod i'm working on. ill add youre credits  ;)


topic marked as solved.....

@Arantor, if you know quicker and better idea for this let us know.

Thx for the quick help. much appriciated.
"If something is wrong, fix it if you can. But train yourself not to worry: Worry never fixes anything."

Click here to view my mods for SMF

Hey 👋 Did i helped... you like what i do. You can now buy me a coffee! ☕

Pipke

got some problems/bug with if i install this mod RecentTopicsOnRecentPostsPage with the modification you give me above.
problem is when you press button MARK AS READ in page of a board or boardindex it removes posts from the recent list.
anyone know how to fix it, it works with one board but if you have more the one board on the forum it fails, and (most) forums have more then 1 board  :P, so...
thx for the help

see attachment


"If something is wrong, fix it if you can. But train yourself not to worry: Worry never fixes anything."

Click here to view my mods for SMF

Hey 👋 Did i helped... you like what i do. You can now buy me a coffee! ☕

margarett

Just to make it clear to me: does the trick above work with any number of boards or does it work with just one board also?

TBH, I don't understand what your attachment means, sorry...
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

Pipke

Quote from: margarett on February 26, 2014, 07:01:08 AM
Just to make it clear to me: does the trick above work with any number of boards or does it work with just one board also?

TBH, I don't understand what your attachment means, sorry...
the trick works:
- if you have on board on your forum: like board=1.0

dont work with:
- if you have made more boards on your forum: like board=1.0 and board=2.0 etc etc

attachment means its skips post number 1 3 5 etc etc, they are there but recent page doesnt show them.
here's my function:

function RecentPosts()
{
global $txt, $scripturl, $user_info, $context, $modSettings, $sourcedir, $board, $smcFunc;

loadTemplate('Recent');
$context['page_title'] = !empty($modSettings['RecentTopicsOnRecentPostsPage_mode']) && $modSettings['RecentTopicsOnRecentPostsPage_mode'] == 'updated' ? $txt['RecentTopicsOnRecentPostsPage_updated_actiontitle'] : $txt['RecentTopicsOnRecentPostsPage_actiontitle'];

if (isset($_REQUEST['start']) && $_REQUEST['start'] > 95)
$_REQUEST['start'] = 95;

$query_parameters = array();
if (!empty($_REQUEST['c']) && empty($board))
{
$_REQUEST['c'] = explode(',', $_REQUEST['c']);
foreach ($_REQUEST['c'] as $i => $c)
$_REQUEST['c'][$i] = (int) $c;

if (count($_REQUEST['c']) == 1)
{
$request = $smcFunc['db_query']('', '
SELECT name
FROM {db_prefix}categories
WHERE id_cat = {int:id_cat}
LIMIT 1',
array(
'id_cat' => $_REQUEST['c'][0],
)
);
list ($name) = $smcFunc['db_fetch_row']($request);
$smcFunc['db_free_result']($request);

if (empty($name))
fatal_lang_error('no_access', false);

$context['linktree'][] = array(
'url' => $scripturl . '#c' . (int) $_REQUEST['c'],
'name' => $name
);
}

$request = $smcFunc['db_query']('', '
SELECT b.id_board, b.num_topics
FROM {db_prefix}boards AS b
WHERE b.id_cat IN ({array_int:category_list})
AND {query_see_board}',
array(
'category_list' => $_REQUEST['c'],
)
);
$total_cat_posts = 0;
$boards = array();
while ($row = $smcFunc['db_fetch_assoc']($request))
{
$boards[] = $row['id_board'];
$total_cat_posts += $row['num_posts'];
}
$smcFunc['db_free_result']($request);

if (empty($boards))
fatal_lang_error('error_no_boards_selected');

$query_this_board = 'b.id_board IN ({array_int:boards})';
$query_parameters['boards'] = $boards;

// If this category has a significant number of posts in it...
if ($total_cat_posts > 100 && $total_cat_posts > $modSettings['totalMessages'] / 15)
{
$query_this_board .= '
AND m.id_msg >= {int:max_id_msg}';
$query_parameters['max_id_msg'] = max(0, $modSettings['maxMsgID'] - 400 - $_REQUEST['start'] * 7);
}

$context['page_index'] = constructPageIndex($scripturl . '?action=recent;c=' . implode(',', $_REQUEST['c']), $_REQUEST['start'], min(100, $total_cat_posts), 10, false);
}
elseif (!empty($_REQUEST['boards']))
{
$_REQUEST['boards'] = explode(',', $_REQUEST['boards']);
foreach ($_REQUEST['boards'] as $i => $b)
$_REQUEST['boards'][$i] = (int) $b;

$request = $smcFunc['db_query']('', '
SELECT b.id_board, b.num_topics
FROM {db_prefix}boards AS b
WHERE b.id_board IN ({array_int:board_list})
AND {query_see_board}
LIMIT {int:limit}',
array(
'board_list' => $_REQUEST['boards'],
'limit' => count($_REQUEST['boards']),
)
);
$total_posts = 0;
$boards = array();
while ($row = $smcFunc['db_fetch_assoc']($request))
{
$boards[] = $row['id_board'];
$total_posts += $row['num_posts'];
}
$smcFunc['db_free_result']($request);

if (empty($boards))
fatal_lang_error('error_no_boards_selected');

$query_this_board = 'b.id_board IN ({array_int:boards})';
$query_parameters['boards'] = $boards;

// If these boards have a significant number of posts in them...
if ($total_posts > 100 && $total_posts > $modSettings['totalMessages'] / 12)
{
$query_this_board .= '
AND m.id_msg >= {int:max_id_msg}';
$query_parameters['max_id_msg'] = max(0, $modSettings['maxMsgID'] - 500 - $_REQUEST['start'] * 9);
}

$context['page_index'] = constructPageIndex($scripturl . '?action=recent;boards=' . implode(',', $_REQUEST['boards']), $_REQUEST['start'], min(100, $total_posts), 10, false);
}
elseif (!empty($board))
{
$request = $smcFunc['db_query']('', '
SELECT num_topics
FROM {db_prefix}boards
WHERE id_board = {int:current_board}
LIMIT 1',
array(
'current_board' => $board,
)
);
list ($total_posts) = $smcFunc['db_fetch_row']($request);
$smcFunc['db_free_result']($request);

$query_this_board = 'b.id_board = {int:board}';
$query_parameters['board'] = $board;

// If this board has a significant number of posts in it...
if ($total_posts > 80 && $total_posts > $modSettings['totalMessages'] / 10)
{
$query_this_board .= '
AND m.id_msg >= {int:max_id_msg}';
$query_parameters['max_id_msg'] = max(0, $modSettings['maxMsgID'] - 600 - $_REQUEST['start'] * 10);
}

$context['page_index'] = constructPageIndex($scripturl . '?action=recent;board=' . $board . '.%1$d', $_REQUEST['start'], min(100, $total_posts), 10, true);
}
else
{
$query_this_board = '{query_wanna_see_board}' . (!empty($modSettings['recycle_enable']) && $modSettings['recycle_board'] > 0 ? '
AND b.id_board != {int:recycle_board}' : ''). '
AND m.id_msg >= {int:max_id_msg}';
$query_parameters['max_id_msg'] = max(0, $modSettings['maxMsgID'] - 100 - $_REQUEST['start'] * 6);
$query_parameters['recycle_board'] = $modSettings['recycle_board'];

// !!! This isn't accurate because we ignore the recycle bin.
$context['page_index'] = constructPageIndex($scripturl . '?action=recent', $_REQUEST['start'], min(100, $modSettings['totalTopics']), 10, false);
}

$context['linktree'][] = array(
'url' => $scripturl . '?action=recent' . (empty($board) ? (empty($_REQUEST['c']) ? '' : ';c=' . (int) $_REQUEST['c']) : ';board=' . $board . '.0'),
'name' => $context['page_title']
);

$key = 'recent-' . $user_info['id'] . '-' . md5(serialize(array_diff_key($query_parameters, array('max_id_msg' => 0)))) . '-' . (int) $_REQUEST['start'];
if (empty($modSettings['cache_enable']) || ($messages = cache_get_data($key, 120)) == null)
{
$done = false;
while (!$done)
{
// Find the 10 most recent messages they can *view*.
// !!!SLOW This query is really slow still, probably?
$request = $smcFunc['db_query']('', '
SELECT m.id_msg
FROM {db_prefix}messages AS m
INNER JOIN {db_prefix}boards AS b ON (b.id_board = m.id_board)
INNER JOIN {db_prefix}topics AS t ON (t.' . (!empty($modSettings['RecentTopicsOnRecentPostsPage_mode']) && $modSettings['RecentTopicsOnRecentPostsPage_mode'] == 'updated' ? 'id_last_msg' : 'id_first_msg') . ' = m.id_msg)
WHERE ' . $query_this_board . '
AND m.approved = {int:is_approved}
ORDER BY m.id_msg DESC
LIMIT {int:offset}, {int:limit}',
array_merge($query_parameters, array(
'is_approved' => 1,
'offset' => $_REQUEST['start'],
'limit' => 10,
))
);
// If we don't have 10 results, try again with an unoptimized version covering all rows, and cache the result.
if (isset($query_parameters['max_id_msg']) && $smcFunc['db_num_rows']($request) < 10)
{
$smcFunc['db_free_result']($request);
$query_this_board = str_replace('AND m.id_msg >= {int:max_id_msg}', '', $query_this_board);
$cache_results = true;
unset($query_parameters['max_id_msg']);
}
else
$done = true;
}
$messages = array();
while ($row = $smcFunc['db_fetch_assoc']($request))
$messages[] = $row['id_msg'];
$smcFunc['db_free_result']($request);
if (!empty($cache_results))
cache_put_data($key, $messages, 120);
}

// Nothing here... Or at least, nothing you can see...
if (empty($messages))
{
$context['posts'] = array();
return;
}

// Get all the most recent posts.
$request = $smcFunc['db_query']('', '
SELECT
m.id_msg, m.subject, m.smileys_enabled, m.poster_time, m.body, m.id_topic, t.id_board, b.id_cat,
' . ($user_info['is_guest'] ? '0' : 'IFNULL(lt.id_msg, IFNULL(lmr.id_msg, -1)) + 1') . ' AS new_from, m.id_msg_modified,
b.name AS bname, c.name AS cname, t.num_replies, m.id_member, m2.id_member AS id_first_member,
IFNULL(mem2.real_name, m2.poster_name) AS first_poster_name, t.id_first_msg,
IFNULL(mem.real_name, m.poster_name) AS poster_name, t.id_last_msg
FROM {db_prefix}messages AS m
INNER JOIN {db_prefix}topics AS t ON (t.id_topic = m.id_topic)
INNER JOIN {db_prefix}boards AS b ON (b.id_board = t.id_board)
INNER JOIN {db_prefix}categories AS c ON (c.id_cat = b.id_cat)
INNER JOIN {db_prefix}messages AS m2 ON (m2.id_msg = t.id_first_msg)
LEFT JOIN {db_prefix}members AS mem ON (mem.id_member = m.id_member)
LEFT JOIN {db_prefix}members AS mem2 ON (mem2.id_member = m2.id_member)' . ($user_info['is_guest'] ? '' : '
LEFT JOIN {db_prefix}log_topics AS lt ON (lt.id_topic = t.id_topic AND lt.id_member = {int:current_member})
LEFT JOIN {db_prefix}log_mark_read AS lmr ON (lmr.id_member = {int:current_member})'). '
WHERE m.id_msg IN ({array_int:message_list})
ORDER BY m.id_msg DESC
LIMIT ' . count($messages),
array(
'message_list' => $messages,
'current_member' => $user_info['id'],
)
);
$counter = $_REQUEST['start'] + 1;
$context['posts'] = array();
$board_ids = array('own' => array(), 'any' => array());
while ($row = $smcFunc['db_fetch_assoc']($request))
{
// Censor everything.
censorText($row['body']);
censorText($row['subject']);

// BBC-atize the message.
$row['body'] = parse_bbc($row['body'], $row['smileys_enabled'], $row['id_msg']);

// And build the array.
$context['posts'][$row['id_msg']] = array(
'id' => $row['id_msg'],
'counter' => $counter++,
'alternate' => $counter % 2,
'category' => array(
'id' => $row['id_cat'],
'name' => $row['cname'],
'href' => $scripturl . '#c' . $row['id_cat'],
'link' => '<a href="' . $scripturl . '#c' . $row['id_cat'] . '">' . $row['cname'] . '</a>'
),
'board' => array(
'id' => $row['id_board'],
'name' => $row['bname'],
'href' => $scripturl . '?board=' . $row['id_board'] . '.0',
'link' => '<a href="' . $scripturl . '?board=' . $row['id_board'] . '.0">' . $row['bname'] . '</a>'
),
'topic' => $row['id_topic'],
'href' => $scripturl . '?topic=' . $row['id_topic'] . '.msg' . $row['id_msg'] . '#msg' . $row['id_msg'],
'link' => '<a href="' . $scripturl . '?topic=' . $row['id_topic'] . '.msg' . $row['id_msg'] . '#msg' . $row['id_msg'] . '" rel="nofollow">' . $row['subject'] . '</a>',
'start' => $row['num_replies'],
'subject' => $row['subject'],
'time' => timeformat($row['poster_time']),
'timestamp' => forum_time(true, $row['poster_time']),
'first_poster' => array(
'id' => $row['id_first_member'],
'name' => $row['first_poster_name'],
'href' => empty($row['id_first_member']) ? '' : $scripturl . '?action=profile;u=' . $row['id_first_member'],
'link' => empty($row['id_first_member']) ? $row['first_poster_name'] : '<a href="' . $scripturl . '?action=profile;u=' . $row['id_first_member'] . '">' . $row['first_poster_name'] . '</a>'
),
'poster' => array(
'id' => $row['id_member'],
'name' => $row['poster_name'],
'href' => empty($row['id_member']) ? '' : $scripturl . '?action=profile;u=' . $row['id_member'],
'link' => empty($row['id_member']) ? $row['poster_name'] : '<a href="' . $scripturl . '?action=profile;u=' . $row['id_member'] . '">' . $row['poster_name'] . '</a>'
),
'message' => $row['body'],
'can_reply' => false,
'can_mark_notify' => false,
'can_delete' => false,
'delete_possible' => ($row['id_first_msg'] != $row['id_msg'] || $row['id_last_msg'] == $row['id_msg']) && (empty($modSettings['edit_disable_time']) || $row['poster_time'] + $modSettings['edit_disable_time'] * 60 >= time()),
'new' => $row['new_from'] <= $row['id_msg_modified'],
'new_from' => $row['new_from'],
'newtime' => $row['new_from'],
'new_href' => $scripturl . '?topic=' . $row['id_topic'] . '.msg' . $row['new_from'] . '#new',
'id_msg_modified' => $row['id_msg_modified'],
);

if ($user_info['id'] == $row['id_first_member'])
$board_ids['own'][$row['id_board']][] = $row['id_msg'];
$board_ids['any'][$row['id_board']][] = $row['id_msg'];
}
$smcFunc['db_free_result']($request);

// There might be - and are - different permissions between any and own.
$permissions = array(
'own' => array(
'post_reply_own' => 'can_reply',
'delete_own' => 'can_delete',
),
'any' => array(
'post_reply_any' => 'can_reply',
'mark_any_notify' => 'can_mark_notify',
'delete_any' => 'can_delete',
)
);

// Now go through all the permissions, looking for boards they can do it on.
foreach ($permissions as $type => $list)
{
foreach ($list as $permission => $allowed)
{
// They can do it on these boards...
$boards = boardsAllowedTo($permission);

// If 0 is the only thing in the array, they can do it everywhere!
if (!empty($boards) && $boards[0] == 0)
$boards = array_keys($board_ids[$type]);

// Go through the boards, and look for posts they can do this on.
foreach ($boards as $board_id)
{
// Hmm, they have permission, but there are no topics from that board on this page.
if (!isset($board_ids[$type][$board_id]))
continue;

// Okay, looks like they can do it for these posts.
foreach ($board_ids[$type][$board_id] as $counter)
if ($type == 'any' || $context['posts'][$counter]['poster']['id'] == $user_info['id'])
$context['posts'][$counter][$allowed] = true;
}
}
}

$quote_enabled = empty($modSettings['disabledBBC']) || !in_array('quote', explode(',', $modSettings['disabledBBC']));
foreach ($context['posts'] as $counter => $dummy)
{
// Some posts - the first posts - can't just be deleted.
$context['posts'][$counter]['can_delete'] &= $context['posts'][$counter]['delete_possible'];

// And some cannot be quoted...
$context['posts'][$counter]['can_quote'] = $context['posts'][$counter]['can_reply'] && $quote_enabled;
}
}


hope this helps you to know what i mean with the bug, if not let me know.


"If something is wrong, fix it if you can. But train yourself not to worry: Worry never fixes anything."

Click here to view my mods for SMF

Hey 👋 Did i helped... you like what i do. You can now buy me a coffee! ☕

margarett

Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

Pipke

Quote from: margarett on February 26, 2014, 08:46:56 AM
And without the mod you mentioned, the behavior is the same?
all fine is:
- your modification + no mod + [logged in] +[as guest]
- your modification + mod + only one board made on forum + [logged in] +[as guest]
- your modification +mod + more boards made on forum.[as guest]

fail is:
- your modification +mod + more boards made on forum. [logged in]
"If something is wrong, fix it if you can. But train yourself not to worry: Worry never fixes anything."

Click here to view my mods for SMF

Hey 👋 Did i helped... you like what i do. You can now buy me a coffee! ☕

margarett

Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

margarett

Update: I can't tell why this happens :(

The query I updated is not touched with this MOD *but* the $messages array is.

Out of curiosity, the MOD alone works fine?
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

Pipke

Quote from: margarett on March 03, 2014, 06:45:35 AM
Out of curiosity, the MOD alone works fine?
yes it does, thx for the free time you spend into it, ill disable mark as read buttons in my making (future) mod, then it is solved. I dont understand how to grab the correct info from smf's db. Its complicated  ???
"If something is wrong, fix it if you can. But train yourself not to worry: Worry never fixes anything."

Click here to view my mods for SMF

Hey 👋 Did i helped... you like what i do. You can now buy me a coffee! ☕

Advertisement: