vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=251)
-   -   Alert when Mailbox is Full (https://vborg.vbsupport.ru/showthread.php?t=326827)

gsk8 10-19-2018 04:50 PM

Alert when Mailbox is Full
 
Hey all!

Is there anything nifty to let folks know when their PM storage is full? Most are overlooking the default.

I like and use this mod when folks get a new PM. It would be cool to have something similar for folks who are nearing their storage limit. Is there anything out there like that? I did a search and wasn't able to find anything :)

scottkoz20 10-19-2018 05:12 PM

You can use a Notice from the AdminCP and choose the option for "User's private message storage is between X% and Y% full"

for the Notice - use the following Hey {username} - Your PM Mailbox is 90% or more filled at this time. Please delete some of your older messages before your box is filled.

MarkFL 10-19-2018 05:52 PM

Let's try this...create a new plugin hooked at "notifications_list" and give it the title "PM Quota Past Threshold" with the following Plugin PHP Code:

PHP Code:

global $vbulletin;
$threshold 0.25;

if (
$vbulletin->userinfo['pmtotal']/$vbulletin->userinfo['permissions']['pmquota'] > $threshold)
{
    
$template_name 'header';
    
$t_temp $vbulletin->templatecache[$template_name];
    
$find '/(<li class="welcomelink">.*?<\/li>)/';
    
$t_temp preg_replace($find'$1' .'<li style="padding: 3px 4px; color: #ffffff; font-weight: bold;">Your PM quota is over ' $threshold*100 '% capacity!</li>'$t_temp);
    
$vbulletin->templatecache[$template_name] = $t_temp;


You can change the value of 0.25 for the variable $threshold to suit your liking. Once you see how this looks, we can make any tweaks to it you like. :)

gsk8 10-19-2018 06:16 PM

Thanks Scott and Mark!

--------------- Added [DATE]1539980719[/DATE] at [TIME]1539980719[/TIME] ---------------

What's depressing is that folks using the mobile version (i.e. Tapatalk) cannot see "Notices". Only Announcements. Tapatalk won't fix it. ForumRunner is gone....

MarkFL 10-20-2018 12:56 AM

1 Attachment(s)
Quote:

Originally Posted by gsk8 (Post 2596882)
Thanks Scott and Mark!

--------------- Added [DATE]1539980719[/DATE] at [TIME]1539980719[/TIME] ---------------

What's depressing is that folks using the mobile version (i.e. Tapatalk) cannot see "Notices". Only Announcements. Tapatalk won't fix it. ForumRunner is gone....

I don't know if Tapatalk bypasses the hook I'm using (I think it bypasses most PHP plugin hooks), but I have turned my code into a product with settings to allow you to turn it on/off and to set the percentage threshold. If you install this product, then delete the plugin I posted above first before installing this product.

The message is in a phrase to you can edit it if you like.

scottkoz20 10-20-2018 02:05 AM

1 Attachment(s)
Tapatalk bypasses a number of hooks as it's really looking at the forums generally in the app. So this mod is not going to appear on there.

However, I have a suggestion. I can see where the notification is going to get lost in the "noise" at the top of the forum. As a suggestion, I think a better location for this would be in the notifications area (see image attached).

Just a thought

MarkFL 10-20-2018 02:50 AM

1 Attachment(s)
Quote:

Originally Posted by scottkoz20 (Post 2596886)
Tapatalk bypasses a number of hooks as it's really looking at the forums generally in the app. So this mod is not going to appear on there.

However, I have a suggestion. I can see where the notification is going to get lost in the "noise" at the top of the forum. As a suggestion, I think a better location for this would be in the notifications area (see image attached).

Just a thought

I am attaching an updated product that gives you a choice in the settings whether to display the alert next to the welcome as in the original, or to display the alert as a notification. :)

scottkoz20 10-20-2018 11:32 AM

1 Attachment(s)
Quote:

Originally Posted by MarkFL (Post 2596889)
I am attaching an updated product that gives you a choice in the settings whether to display the alert next to the welcome as in the original, or to display the alert as a notification. :)

clean and simple

:up:

gsk8 10-20-2018 06:28 PM

When I brought up Tapatalk, I should have been more clear. It doesn't show "Notices". The ones you make under "Notice" manager. :)

On another note with Tapatalk (or anything other than full site version)

If you are not logged in and you click on an "ANNOUNCEMENT", it will go to some random post and not the actual announcement. Very frustrating. I've sent them emails, but no responses.

CAG CheechDogg 10-23-2018 08:03 AM

Good stuff Mark ...


All times are GMT. The time now is 03:11 AM.

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.01231 seconds
  • Memory Usage 1,739KB
  • 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
  • (1)bbcode_php_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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