Go Back   vb.org Archive > vBulletin 4 Discussion > vB4 General Discussions
  #1  
Old 09-25-2021, 08:04 PM
gnrx gnrx is offline
 
Join Date: Apr 2009
Posts: 390
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default 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.
Reply With Quote
  #2  
Old 09-26-2021, 04:08 AM
socialteenz's Avatar
socialteenz socialteenz is offline
 
Join Date: May 2011
Posts: 465
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #3  
Old 09-26-2021, 04:30 AM
gnrx gnrx is offline
 
Join Date: Apr 2009
Posts: 390
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by socialteenz View Post
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.
Reply With Quote
  #4  
Old 09-26-2021, 07:08 AM
z3r0's Avatar
z3r0 z3r0 is offline
 
Join Date: Apr 2005
Posts: 339
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
	); 
}
Reply With Quote
Благодарность от:
gnrx
  #5  
Old 09-29-2021, 07:39 PM
gnrx gnrx is offline
 
Join Date: Apr 2009
Posts: 390
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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!
Reply With Quote
Благодарность от:
z3r0
  #6  
Old 09-30-2021, 08:03 AM
z3r0's Avatar
z3r0 z3r0 is offline
 
Join Date: Apr 2005
Posts: 339
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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

I'm glad you are sorted now
Reply With Quote
  #7  
Old 10-02-2021, 09:02 AM
gnrx gnrx is offline
 
Join Date: Apr 2009
Posts: 390
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by z3r0 View Post
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!!
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 04:18 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.03859 seconds
  • Memory Usage 2,223KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (2)bbcode_code
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (7)post_thanks_box
  • (2)post_thanks_box_bit
  • (7)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (2)post_thanks_postbit
  • (7)post_thanks_postbit_info
  • (7)postbit
  • (7)postbit_onlinestatus
  • (7)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete