MyBBHacks.com Plugins for MyBB

Full Version: display bug from index to gallery page when using Unread Posts plugin
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I know I'm not Pro (yet), but I found a small bug.  I use the "Unread Posts" plugin, and this link disappears when I view the Gallery, then re-appears on every other page.  Please see attached screenshots.  Thanks!
Probably because that plugin's language file is no longer loaded?That would be my guess.
Yeah makes sense. I'll mess around with the templates, see what I can do. Thanks! Smile
(11-01-2016, 09:32 AM)MyBBHacks Wrote: [ -> ]Probably because that plugin's language file is no longer loaded?That would be my guess.

and how do I load them? asked stupid?
i have this in the gallery.lib.php:


PHP Code:
function gallery_header()
{
   global $headerinclude$context$header$templates$lang;
   $lang->load("unreadPosts");
   eval("\$unreadPosts .= \"" $templates->get("unreadPosts_link") . "\";");
   $header str_replace('<!-- UNREADPOSTS_LINK -->'$unreadPosts$header);

    if (isset($context['linktree']))
    foreach($context['linktree'] as $linktree)
    {
        add_breadcrumb($linktree['name'], $linktree['url']);
    }

    echo parse_page('<html>
<head>
<title>' 
$context['page_title'] .'</title>
$headerinclude '
$context['html_headers'] . '
</head>
<body>
$header);





this works. 

but now the counter for the unread messages is missing. how does it work?
It's a little tricky. For porting reasons I did not use MyBB templates when I made the plugin. You might ave to include the code for counter.