vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=251)
-   -   Some mod for appear news replys of subscription threads like news mp's? (https://vborg.vbsupport.ru/showthread.php?t=328888)

gnrx 09-25-2021 08:04 PM

Some mod for appear news replys of subscription threads like news mp's?
 
Hi,
I installed this mod https://vborg.vbsupport.ru/showthread.php?t=267329
But not work, appears news replys but when click and visit the new reply continue not dissapear this, continue appear the new reply.
Only if click in mark all forum like thread, dissapear.

Are one similar mod to this?

I search in this forum but not view any, and lI was think this are native in vb but I view that not (I always I have the notifications via mail) but yesterday I change to all users to notifications in control panel and this is important for view their new notifications.

Thanks and regards.

PS: Sorry for my english.

socialteenz 09-26-2021 04:08 AM

Unfortunately, it's a very old mod.

I don't think there are alternatives available.

Other forum softwares offer this functionality by default, you should consider them as well.

gnrx 09-26-2021 04:30 AM

Quote:

Originally Posted by socialteenz (Post 2607507)
Unfortunately, it's a very old mod.

I don't think there are alternatives available.

Other forum softwares offer this functionality by default, you should consider them as well.

Thanks for your reply.

Yes, since some time ago, I think in other forum software...the problem, are the mods that I have installed and in use...

Thanks and regards.

z3r0 09-26-2021 07:08 AM

That mod is broken as it checks the thread marking options that were removed in the newer vb4 versions, it's fixed quite easily if you edit the check out.

Here is my working version of the code so you can see what to edit.

Code:

// Subscribed threads in Notifications
// Modification COPYRIGHT 2010 ADAM OEST
// http://www.pentaxforums.com/forums/sendmessage.php

if ($vbulletin->userinfo['userid'] > 0 && $vbulletin->userinfo['field27'] == "Enable")
{
        $new_subscribed_threads = 0;

        // Dirty workaround
        if ($_REQUEST['do'] == 'markread' AND !$_REQUEST['forumid'])
        {
                $vbulletin->db->query_write('
                        UPDATE ' . TABLE_PREFIX . 'threadread
                        SET readtime = ' . TIMENOW . '
                        WHERE userid = ' . $vbulletin->userinfo['userid']);
        }

        $thread_readtime_query = $vbulletin->db->query_read('
                SELECT a.threadid, c.forumid, c.lastpost, b.readtime
                FROM ' . TABLE_PREFIX . 'subscribethread a
                LEFT JOIN ' . TABLE_PREFIX . 'threadread b
                ON (a.threadid = b.threadid AND a.userid = b.userid)
                LEFT JOIN ' . TABLE_PREFIX . 'thread c
                ON (a.threadid = c.threadid)
                WHERE a.userid = ' . $vbulletin->userinfo['userid'] . '
                AND a.canview = 1
                AND c.visible = 1'
        );
       
        while($thread_readtime = $vbulletin->db->fetch_array($thread_readtime_query))
        {
               
                        $lastread = max($vbulletin->forumcache[$thread_readtime['forumid']]['forumread'], TIMENOW - ($vbulletin->options['markinglimit'] * 86400));
               
               

                if ($thread_readtime['lastpost'] > $lastread)
                {

                       
                                $threadview = intval($thread_readtime['readtime']);
                       
                        if($thread_readtime['lastpost'] > $threadview)
                        {
                                $new_subscribed_threads++;
                        }
                }
               
        }

        $vbulletin->userinfo['adam_subsct_count'] = $new_subscribed_threads;

        $notifications['adam_subsct_count'] = array(
                'phrase' => $vbphrase['new_subscribed_threads'],
                'link'  => $vbulletin->options['bburl'] . '/subscription.php?do=viewsubscription&daysprune=-1&folderid=all',
                'order'  => 50
        );
}


gnrx 09-29-2021 07:39 PM

Thank you very much for this answer.
Sorry for the delay in answering, my programming knowledge is small and I have been doing several tests.

Just great, that's what I was looking for ...

I had to remove this part of this line, so it works for all users.

Code:

if ($vbulletin->userinfo['userid'] > 0 && $vbulletin->userinfo['field27'] == "Enable")
The bold part, removed.

Now looking for the way that, when you click on that notification, if there are 3 threads with new replies, they are the first to be shown (for example, if they have answered one that is on page 5 appears at the beginning) but that are major words about all for me.

With your code, just great.

I see that the url to which it sends does not do that filtering, it could be changed to the control panel, I will continue with those tests, but as I comment, simply, thank you very much!

Again, thanks a lot!

z3r0 09-30-2021 08:03 AM

Whoops, I forgot I added a user condition to the plug, it was all so long ago!!!

I'm glad you are sorted now ;)

gnrx 10-02-2021 09:02 AM

Quote:

Originally Posted by z3r0 (Post 2607526)
Whoops, I forgot I added a user condition to the plug, it was all so long ago!!!

I'm glad you are sorted now ;)

Thanks at you, really thanks!!


All times are GMT. The time now is 11:51 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.02895 seconds
  • Memory Usage 1,733KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_code_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (7)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete