1 (edited by orlandu63 2007-02-01 21:20)

Topic: Make the 'subscribe topic' system intergrated with PunBB.

Eh, self-explanatory.

Re: Make the 'subscribe topic' system intergrated with PunBB.

Not really tongue
What's the "track topic" system?

Re: Make the 'subscribe topic' system intergrated with PunBB.

Threads being marked as unread/read? If so, already planned.

Re: Make the 'subscribe topic' system intergrated with PunBB.

I'm sorry; I meant the 'Subscribe to Topic' feature being intergrated.

Re: Make the 'subscribe topic' system intergrated with PunBB.

I'm not following you. It's a standard feature to be able to subscribe to a topic.

Re: Make the 'subscribe topic' system intergrated with PunBB.

There already is one in PunBB 1.2.x

I still don't understand.

Re: Make the 'subscribe topic' system intergrated with PunBB.

Maybe I was more vague than I thought. What I mean is when you subscribe to a topic, you get emailed the thread; what I want is to have a feature that alerts you IN PunBB itself that there has been a new reply in a specified topic.

Re: Make the 'subscribe topic' system intergrated with PunBB.

That's not so easy to do, especially when you're trying to handle multiple topics that a user has subscribed to. It could be a modification that takes advantage of the PM mod though

Re: Make the 'subscribe topic' system intergrated with PunBB.

Gnah... PM... vade retro!

It might be useful orlandu, but that would require some serious brainstorming on the UI side. How to handle several dozens of threads for example, things like that.

10 (edited by guardian34 2007-02-03 00:20)

Re: Make the 'subscribe topic' system intergrated with PunBB.

What about adding something like this to header.php?

Edit: Edited script posted further down.

Re: Make the 'subscribe topic' system intergrated with PunBB.

What if you're the one who posted? wink

12 (edited by guardian34 2007-02-03 00:20)

Re: Make the 'subscribe topic' system intergrated with PunBB.

Doesn't "new posts since last visit" work the same way? wink

Edit: Added something to the above code.

Edit: Moved edited code further down.

Re: Make the 'subscribe topic' system intergrated with PunBB.

Edit: Added something to the above code.

t.last_post_id is the post ID, not the user ID

Doesn't "new posts since last visit" work the same way?

Yes, but subscriptions don't wink

Re: Make the 'subscribe topic' system intergrated with PunBB.

Thanks for the correction; How about t.last_poster?

    if(!$pun_user['is_guest'] && $pun_config['o_subscriptions'] == 1)
    {
        $result_subscriptions = $db->query('SELECT COUNT(t.id) FROM '.$db->prefix.'topics AS t INNER JOIN '.$db->prefix.'subscriptions AS s ON (t.id=s.topic_id AND s.user_id='.$pun_user['id'].') INNER JOIN '.$db->prefix.'forums AS f ON f.id=t.forum_id LEFT JOIN '.$db->prefix.'forum_perms AS fp ON (fp.forum_id=f.id AND fp.group_id='.$pun_user['g_id'].') WHERE (fp.read_forum IS NULL OR fp.read_forum=1) AND t.last_post>'.$pun_user['last_visit'].' AND t.last_poster<>'.$db->escape($pun_user['username'])) or error('Unable to fetch topic list', __FILE__, __LINE__, $db->error());

        if ($db->result($result_subscriptions, 0))
            $tpl_temp .= "\n\t\t\t\t".'<li><strong><a href="'.PUN_ROOT.'search.php?action=show_subscriptions">There are replies to subscribed topics</a></strong></li>';
    }

Re: Make the 'subscribe topic' system intergrated with PunBB.

Just use != wink
Keep in mind, that code will also display the message until
A. The subscriber replies
B. The subscriber times out/marks the forums as read