PDA

View Full Version : Show Expiration Date in Subscription Manager List


Amzadi
03-06-2004, 10:00 PM
This will show you the expiration date right beside the start date on the Paid Subscription Manager list. See what it will look like in the attached jpg. Tested and working on VB3 RC4. I created this because I got sick and tired of clicking edit on each subscription to see the darn dates. You can also make a print out of the list now and see who has what and for how long. Feel free to PM me if you have any questions.

Time to Install: 1 minute
Changes to 1 PHP file only! No template or database modifications.

Step 1: FIND in AdminCP/Subscriptions.php
print_table_header(construct_phrase($vbphrase['showing_subscriptions_x_to_y_of_z'], ($limitstart + 1), iif($limitfinish > $countusers['users'], $countusers['users'], $limitfinish), $countusers[users]), 5);
print_cells_row(array($vbphrase['title'], $vbphrase['username'], $vbphrase['start_date'], $vbphrase['status'], $vbphrase['controls']), 1);
- Replace with
print_table_header(construct_phrase($vbphrase['showing_subscriptions_x_to_y_of_z'], ($limitstart + 1), iif($limitfinish > $countusers['users'], $countusers['users'], $limitfinish), $countusers[users]), 6);
print_cells_row(array($vbphrase['title'], $vbphrase['username'], $vbphrase['start_date'], $vbphrase['expiry_date'], $vbphrase['status'], $vbphrase['controls']), 1);
This extends the cells 1 column and adds the additional field.

Step 2: FIND in AdminCP/Subscriptions.php (same file a couple lines down)
$cell[] = vbdate($vboptions['dateformat'], $user['regdate']);
- Add the following below it
$cell[] = vbdate($vboptions['dateformat'], $user['expirydate']);

YOU'RE DONE!!!

Andreas
03-07-2004, 04:11 AM
Nice one!

But you forgot one instruction:

Step 1a: FIND in admincp/subscriptions.php

print_cells_row(array($vbphrase['title'], $vbphrase['username'], $vbphrase['start_date'], $vbphrase['status'], $vbphrase['controls']), 1);


- Replace with

print_cells_row(array($vbphrase['title'], $vbphrase['username'], $vbphrase['start_date'], $vbphrase['expiry_date'], $vbphrase['status'], $vbphrase['controls']), 1);


* Andreas clicks install

Amzadi
03-07-2004, 04:32 AM
Duh! I was in such a hurry to get the format right, I forgot to add that line. Nice catch, I edited the original install script they way it should have read. :)

Boofo
03-07-2004, 04:39 AM
Excellent little idea! Thank you, sir. ;)

gmarik
03-07-2004, 09:33 AM
good one

Koutaru
03-07-2004, 03:59 PM
Thanks for this ;) Installing..

UDPride
03-07-2006, 05:04 AM
This doesnt seem to work in 3.5.x

I got a date of 1/1/1970 for an expiration date for my one subscription. Hmm.

I wish subscriptions had much better accounting tools than it does. Anyone?