Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.0 > vBulletin 3.0 Full Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Subscription Expiry Notification on Forumhome Details »»
Subscription Expiry Notification on Forumhome
Version: 2.0, by kall kall is offline
Developer Last Online: Aug 2021 Show Printable Version Email this Page

Version: 3.0.7 Rating:
Released: 04-18-2005 Last Update: 05-05-2005 Installs: 10
 
No support by the author.

Hack Name: Subscription Expiry Notification on Forumhome
Hack Version: 2.1
Hack Author: Kall
Release: 20 April 2005
Description: Shows date of Subscription Expiry (and days remaining) on Forumhome to members with Active Subscriptions.
Requested by: Mike Warner.
Thanks to: MarcoH64 (big thanks to Marco), Mike Warner and The_Realist for help on day one ironing out the bugs.

Files modified: 1 (root/index.php)
Templates Modified: 1 (FORUMHOME)
New templates: 1 (forumhome_nzb_exprydatebit)


By default, this will show to people with under 30 days remaining on their Subscription and the next 5 subscriptions to expire.

To change the days, change the 30 at the start of the last PHP edit to the number of days you want to show in advance.
To change the number, change the 5 at the end of the sql query.

This is my first hack that includes either a joining of tables or a new template or a template that can be called more than once, so I apologise in advance if a string of runaway queries turns your server into swiss cheese.

New features in v2.1: Optimised query to only be run for non-guests and tidied up a lot. (thanks to Marco). To upgrade, simply replace the final index.php edit with the one inside the new .txt file.


Updates - Fixed query thanks to MarcoH64.
Extended message thanks to The_Realist.
Tidied message up, XHTML-wise and gave it a nice little box.
v2.0 Released. Thanks to MarcoH64 for shaming me into making it a bit more functional with his first post.

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #12  
Old 04-19-2005, 09:17 PM
The Realist's Avatar
The Realist The Realist is offline
 
Join Date: Oct 2001
Location: UK
Posts: 842
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yep works perfect

Quote:
Originally Posted by kall
Oh bugger. It's because of the way we are displaying our dates.

Err...

HTML Code:
<if condition="$remaining > 0 AND $remaining < 20 AND $bbuserinfo[userid] != '0'">
How's that?
Reply With Quote
  #13  
Old 04-19-2005, 09:35 PM
The Realist's Avatar
The Realist The Realist is offline
 
Join Date: Oct 2001
Location: UK
Posts: 842
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Works great M8 and does what it says on the bottle

Edited mine a bit to:
Code:
<if condition="$remaining > 0 AND $remaining < 90 AND $bbuserinfo[userid] != '0'">
<div align="center"><font color="#FF0000">$bbuserinfo[username]!</font> Your Subscription 
	Here Expires On The <font color="#FF0000">$expirydate</font>. You Have $remaining 
	Days Remaining.<br />Please Click <a href="$vboptions[bburl]/subscriptions.php" title="Renew Subscription">here</a> 
	And Renew Your Subscription And Continue Your Support Of YOUR FORUMS NAME Forums.</div></if>
Clicks install
Reply With Quote
  #14  
Old 04-19-2005, 09:58 PM
kall's Avatar
kall kall is offline
 
Join Date: Apr 2004
Location: New Zealand
Posts: 2,608
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Sweet!

Nice message....I'll stick that in the install.
Reply With Quote
  #15  
Old 04-19-2005, 10:07 PM
The Realist's Avatar
The Realist The Realist is offline
 
Join Date: Oct 2001
Location: UK
Posts: 842
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Well thank you.
Reply With Quote
  #16  
Old 04-20-2005, 12:11 AM
kall's Avatar
kall kall is offline
 
Join Date: Apr 2004
Location: New Zealand
Posts: 2,608
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by The Realist
Well thank you.
And with a bit of tidying, it's XHTML compliant.
Reply With Quote
  #17  
Old 04-20-2005, 09:27 AM
MikeGK MikeGK is offline
 
Join Date: Apr 2004
Posts: 22
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

can this be done in user's profile as well? thank you
Reply With Quote
  #18  
Old 04-20-2005, 07:08 PM
kall's Avatar
kall kall is offline
 
Join Date: Apr 2004
Location: New Zealand
Posts: 2,608
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Probably.

It could probably be done on every page, by using the query in php_include_start..

Optimised version will be out later today, thanks to the help of MarcoH64.
Reply With Quote
  #19  
Old 05-06-2005, 03:31 PM
MikeWarner's Avatar
MikeWarner MikeWarner is offline
 
Join Date: Nov 2001
Location: UK
Posts: 133
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Good job with the update.

I want to show this just below the bit that says "You last visited: Today at xx:xx". I can handle the template changes no problem, but the hack is designed to only show on the forumhome (index.php). How would I make it so that it showed on all pages? Do I need to change global.php - if so, how?

Many thanks.
Reply With Quote
  #20  
Old 05-06-2005, 08:57 PM
kall's Avatar
kall kall is offline
 
Join Date: Apr 2004
Location: New Zealand
Posts: 2,608
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

2.1 Update out today.

(Sorry, I don't know about putting it in global.php ... it might work...)
Reply With Quote
  #21  
Old 06-01-2005, 10:27 AM
LloydSev LloydSev is offline
 
Join Date: May 2005
Posts: 7
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Works like an absolute charm for me. Thanks very much.
Reply With Quote
Reply


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 06:15 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.05001 seconds
  • Memory Usage 2,308KB
  • Queries Executed 25 (?)
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)bbcode_code
  • (1)bbcode_html
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)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
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete