Go Back   vb.org Archive > vBulletin 4 Discussion > vB4 General Discussions
  #1  
Old 10-19-2018, 04:50 PM
gsk8's Avatar
gsk8 gsk8 is offline
 
Join Date: Jun 2003
Posts: 133
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default 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
Reply With Quote
  #2  
Old 10-19-2018, 05:12 PM
scottkoz20 scottkoz20 is offline
 
Join Date: Dec 2015
Location: Lewiston, NY
Posts: 344
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
Благодарность от:
gsk8
  #3  
Old 10-19-2018, 05:52 PM
MarkFL's Avatar
MarkFL MarkFL is offline
 
Join Date: Feb 2014
Location: St. Augustine, FL
Posts: 3,853
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #4  
Old 10-19-2018, 06:16 PM
gsk8's Avatar
gsk8 gsk8 is offline
 
Join Date: Jun 2003
Posts: 133
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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....
Reply With Quote
  #5  
Old 10-20-2018, 12:56 AM
MarkFL's Avatar
MarkFL MarkFL is offline
 
Join Date: Feb 2014
Location: St. Augustine, FL
Posts: 3,853
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by gsk8 View Post
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.
Attached Files
File Type: xml product-markflpmquota.xml (3.2 KB, 2 views)
Reply With Quote
Благодарность от:
CAG CheechDogg
  #6  
Old 10-20-2018, 02:05 AM
scottkoz20 scottkoz20 is offline
 
Join Date: Dec 2015
Location: Lewiston, NY
Posts: 344
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Attached Images
File Type: png formark1.png (14.7 KB, 0 views)
Reply With Quote
  #7  
Old 10-20-2018, 02:50 AM
MarkFL's Avatar
MarkFL MarkFL is offline
 
Join Date: Feb 2014
Location: St. Augustine, FL
Posts: 3,853
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by scottkoz20 View Post
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.
Attached Files
File Type: xml product-markflpmquota.xml (4.1 KB, 6 views)
Reply With Quote
  #8  
Old 10-20-2018, 11:32 AM
scottkoz20 scottkoz20 is offline
 
Join Date: Dec 2015
Location: Lewiston, NY
Posts: 344
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by MarkFL View Post
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:
Attached Images
File Type: png mark2.PNG (3.2 KB, 0 views)
Reply With Quote
Благодарность от:
CAG CheechDogg
  #9  
Old 10-20-2018, 06:28 PM
gsk8's Avatar
gsk8 gsk8 is offline
 
Join Date: Jun 2003
Posts: 133
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #10  
Old 10-23-2018, 08:03 AM
CAG CheechDogg's Avatar
CAG CheechDogg CAG CheechDogg is offline
 
Join Date: Feb 2012
Location: Riverside, California USA
Posts: 1,080
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Good stuff Mark ...
Reply With Quote
Благодарность от:
MarkFL
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 10:01 AM.


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.05015 seconds
  • Memory Usage 2,297KB
  • Queries Executed 14 (?)
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
  • (1)bbcode_php
  • (3)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (10)post_thanks_box
  • (4)post_thanks_box_bit
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (4)post_thanks_postbit
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (4)postbit_attachment
  • (10)postbit_onlinestatus
  • (10)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_postinfo_query
  • fetch_postinfo
  • 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
  • postbit_attachment
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete