vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=113)
-   -   Add Expiration Date Column to Show Subscriptions Page (https://vborg.vbsupport.ru/showthread.php?t=105924)

the Sandman 01-20-2006 10:00 PM

Add Expiration Date Column to Show Subscriptions Page
 
In the AdminCP > Paid Subscriptions > Subscription Manager, when you click on any of the links representing the number of subscribers in the Active, Completed, and Total categories you are taken to a "Showing Subscriptions" page. I asked Logician if he could add a column with the "Expiration Date" between the "Start Date" and "Status" columns. He sent me this code modification a short time later and again gave me permission to post it here for any interested parties.

Edit admincp/subscriptions.php, find:
PHP Code:

print_form_header('user''find');
                
print_table_header(construct_phrase($vbphrase['showing_subscriptions_x_to_
y_of_z'
], ($vbulletin->GPC['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);
                
// now display the results
                
while ($user=$db->fetch_array($users))
                {
                        
$cell = array();
                        
$cell[] = $subcache["{$user['subscriptionid']}"];
                        
$cell[] = "<a href=\"user.php?" .
$vbulletin->session->vars['sessionurl'] .
"do=edit&u=$user[userid]\"><b>$user[username]</b></a>&nbsp;";
                        
$cell[] = vbdate($vbulletin->options['dateformat'], $user['regdate']);
                        
$cell[] = iif($user['status'], $vbphrase['active'],
$vbphrase['disabled']);
                        
$cell[] = construct_button_code($vbphrase['edit'], "subscriptions.php?"
$vbulletin->session->vars['sessionurl'] .
"do=adjust&subscriptionlogid=$user[subscriptionlogid]");
                        
print_cells_row($cell);
                } 

REPLACE it as:

PHP Code:

print_form_header('user''find');
                
// Logician Hack : Add Expire Date to Subscriptions
                
print_table_header(construct_phrase($vbphrase['showing_subscriptions_x_to_
y_of_z'
], ($vbulletin->GPC['limitstart'] + 1), iif($limitfinish >
$countusers['users'], $countusers['users'], $limitfinish),
$countusers[users]), 6);
                
print_cells_row(array($vbphrase['title'], $vbphrase['username'],
$vbphrase['start_date'], "Expiration Date"$vbphrase['status'],
$vbphrase['controls']), 1);
                
// Logician Hack : Add Expire Date to Subscriptions
                // now display the results
                
while ($user=$db->fetch_array($users))
                {
                        
$cell = array();
                        
$cell[] = $subcache["{$user['subscriptionid']}"];
                        
$cell[] = "<a href=\"user.php?" .
$vbulletin->session->vars['sessionurl'] .
"do=edit&u=$user[userid]\"><b>$user[username]</b></a>&nbsp;";
                        
$cell[] = vbdate($vbulletin->options['dateformat'], $user['regdate']);
                        
// Logician Hack : Add Expire Date to Subscriptions
                        
$cell[] = vbdate($vbulletin->options['dateformat'],
$user['expirydate']);
                        
// Logician Hack : Add Expire Date to Subscriptions
                        
$cell[] = iif($user['status'], $vbphrase['active'],
$vbphrase['disabled']);
                        
$cell[] = construct_button_code($vbphrase['edit'], "subscriptions.php?"
$vbulletin->session->vars['sessionurl'] .
"do=adjust&subscriptionlogid=$user[subscriptionlogid]");
                        
print_cells_row($cell);
                } 


Rich 01-21-2006 09:29 PM

Hello,

This is useful for me. Thanks for adding it to the .org. (I suspect it is also on the adminzone?)

the Sandman 01-21-2006 09:58 PM

Quote:

Originally Posted by iguanairs
Hello,

This is useful for me. Thanks for adding it to the .org. (I suspect it is also on the adminzone?)

Yes, I use it on TAZ. :)

RMS-Chef 01-22-2006 06:19 AM

Thanks to you both.

Snake 01-22-2006 08:57 AM

/me installs

Thanks bud!


All times are GMT. The time now is 06: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.01181 seconds
  • Memory Usage 1,769KB
  • 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_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (5)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