vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=245)
-   -   Administrative and Maintenance Tools - [DBTech] vBMail v2 (vB4) (https://vborg.vbsupport.ru/showthread.php?t=266142)

anihil2 10-29-2016 09:33 AM

Hello, I found one issue with vBMail. When user click on unsubscribe link in email he/she will get feedback pool before getting unscubscribe. Lets assume that at this time noone else did unsubscribe. After user unsubscribed in View Mail History admin should see for this specific mail only one person in 'Unsubscribed Users' column. That is correct if user used unsubscribe link only once. But if user go to this unsubscribe link without even setting feedback option it will automatically increment this 'Unsubscribed Users' counter. In my example below I have one user test which press link unsubscribe several times and I get:
https://vborg.vbsupport.ru/external/2016/10/3.jpg

Could it be fixed to count only users that actually unsubscribed from mailing list and not how many time they clikc on unsubscribe link?

anihil2 10-29-2016 10:22 AM

Quote:

Originally Posted by anihil2 (Post 2577431)
Hello, I found one issue with vBMail. When user click on unsubscribe link in email he/she will get feedback pool before getting unscubscribe. Lets assume that at this time noone else did unsubscribe. After user unsubscribed in View Mail History admin should see for this specific mail only one person in 'Unsubscribed Users' column. That is correct if user used unsubscribe link only once. But if user go to this unsubscribe link without even setting feedback option it will automatically increment this 'Unsubscribed Users' counter. In my example below I have one user test which press link unsubscribe several times and I get:
https://vborg.vbsupport.ru/external/2016/10/3.jpg

Could it be fixed to count only users that actually unsubscribed from mailing list and not how many time they clikc on unsubscribe link?

Didn't have time to wait for fix :) so I fix it myself. Fix description below.

In file dbtech\vbmail\actions\mailinglists.php from lines 1053-1069 move code:
PHP Code:

if ($vbulletin->GPC['mailid'])
    {
        
// We have a mail id
        
if ($mail $db->query_first_slave("SELECT unsubscriptions FROM " TABLE_PREFIX "dbtech_vbmail_mail WHERE mailid = " intval($vbulletin->GPC['mailid'])))
        {
            
// Mail id was valid
            
if (!$subscribeflag OR $mail['unsubscriptions'])
            {
                
// We're either unsubscribing, or we can decrement it successfully
                
$db->query_write("
                    UPDATE " 
TABLE_PREFIX "dbtech_vbmail_mail
                    SET unsubscriptions = unsubscriptions " 
. (!$subscribeflag '+' '-') . " 1
                    WHERE mailid = " 
intval($vbulletin->GPC['mailid'])
                );
            }
        }
    } 

Before line 1043 which is:
PHP Code:

VBMAIL::$db->insert('dbtech_vbmail_subscriptionlog', array( 

After change it code should look like this:
PHP Code:

    else if ($exists)
    {
        if (
$vbulletin->GPC['mailid'])
        {
            
// We have a mail id
            
if ($mail $db->query_first_slave("SELECT unsubscriptions FROM " TABLE_PREFIX "dbtech_vbmail_mail WHERE mailid = " intval($vbulletin->GPC['mailid'])))
            {
                
// Mail id was valid
                
if (!$subscribeflag OR $mail['unsubscriptions'])
                {
                    
// We're either unsubscribing, or we can decrement it successfully
                    
$db->query_write("
                        UPDATE " 
TABLE_PREFIX "dbtech_vbmail_mail
                        SET unsubscriptions = unsubscriptions " 
. (!$subscribeflag '+' '-') . " 1
                        WHERE mailid = " 
intval($vbulletin->GPC['mailid'])
                    );
                }
            }
        }
        
        
// We either subscribed or unsubscribed
        
VBMAIL::$db->insert('dbtech_vbmail_subscriptionlog', array(
            
'userid'         => $user['userid'],
            
'mailinglistid' => $mailinglist['mailinglistid'],
            
'dateline'         => TIMENOW,
            
'subscribed'     => $subscribeflag,
            
'reason'         => (!$subscribeflag 'un' '') . 'subscribed',
            
'mailid'         => $vbulletin->GPC['mailid']
        ));
    } 

What this change will give you?
When user hit link with unsubscribe it will increment counter "Unsubscribed Users" only when user flag in database change from Subscribed to Unsubscribed. If user try to hit unsubscribe link again it will not increment this counter anymore.

I hope this will help someone.

anihil2 10-29-2016 01:59 PM

Sorry with spamming with messages.

I installed this addon on vB version 4.2.3 Patch Level 2 without any issues.
I tried the same installation files on vB version 4.2.3 and it did install without any issues. But after I try to go to vbmail.php I get message:
"The vBMail product has been deactivated by an administrator."

Anyone know what might be wrong?

DragonByte Tech 11-04-2016 07:31 PM

Quote:

Originally Posted by anihil2 (Post 2577444)
Sorry with spamming with messages.

I installed this addon on vB version 4.2.3 Patch Level 2 without any issues.
I tried the same installation files on vB version 4.2.3 and it did install without any issues. But after I try to go to vbmail.php I get message:
"The vBMail product has been deactivated by an administrator."

Anyone know what might be wrong?

This means the product has been disabled in the Product Manager in vBulletin.


Fillip

tuRiver 01-04-2017 11:08 PM

Does this mod add the ability to send weekly digest (with hot/top threads) etc.. ?

ivanp 06-18-2017 10:25 AM

vBulletin 4.2.5 reports "PHP Fatal error: Call to undefined method vB_DataManager::vB_DataManager()"

The following files should be changed:

dbtech/vbmail/includes/class_dm_keyword.php
dbtech/vbmail/includes/class_dm_feedback.php
dbtech/vbmail/includes/class_dm_message.php
dbtech/vbmail/includes/class_dm_mailinglist.php

FROM:
Code:

function vBMail_DataManager_Keyword(&$registry, $errtype = ERRTYPE_STANDARD)
{
        parent::vB_DataManager($registry, $errtype);

TO:

Code:

function __construct(&$registry, $errtype = ERRTYPE_STANDARD)
{
        parent::__construct($registry, $errtype);


DragonByte Tech 06-18-2017 10:26 AM

This has been resolved in the latest version @ our site, vB.org hasn't been updated yet.

Fillip


All times are GMT. The time now is 05:47 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.01488 seconds
  • Memory Usage 1,766KB
  • 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
  • (3)bbcode_php_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete