Go Back   vb.org Archive > Community Discussions > Modification Requests/Questions (Unpaid)
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #11  
Old 04-06-2003, 11:54 PM
MagNaMan MagNaMan is offline
 
Join Date: Mar 2003
Posts: 9
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hmm. I would guess the best place to check for auto-expiring would be during the login, where the username and password is entered. Also would need during cookie lookup, if user is using cookies.
Reply With Quote
  #12  
Old 04-22-2003, 11:48 PM
ryancooper ryancooper is offline
 
Join Date: Jul 2002
Posts: 433
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
03-31-03 at 03:59 PM trafix said this in Post #6
I was thinking more along the line of a premium paid usergroup, when the 12 month period has expired then they will be automaticly downgraded to a lower level (admin set) usergroup. that way i dont have to keep checking manually....maybe an auto pm to member and admin informing them of the downgrade would also be an advantage.


I can use this as well! :banana:
Reply With Quote
  #13  
Old 05-02-2003, 02:10 AM
nhlrat nhlrat is offline
 
Join Date: Dec 2001
Posts: 26
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Could use here as well.
Reply With Quote
  #14  
Old 05-02-2003, 02:40 AM
trafix's Avatar
trafix trafix is offline
 
Join Date: Dec 2002
Location: Australia
Posts: 1,021
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

OK OK, I have not had time to look into this any further, however Since i realy need this hack, it look like im going to have to force myself to learn more to build the hack..... give me a week or so as i have other projects to complete
Reply With Quote
  #15  
Old 05-02-2003, 03:08 AM
N!ck N!ck is offline
 
Join Date: Mar 2002
Location: Lake Havasu City, AZ
Posts: 886
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I have this running once a month with a cronjob in case you want some inspiration:

PHP Code:
<?php
if ($action=="renew") {
  
header("Location: [url]https://www.paypal.com/xclick/business=lebeldc%40yahoo.com&item_name=V-Driveboat.com+Insider+Renewal+-+1+year+-+[/url]".$user."&item_number=01005&amount=15.00&no_note=1&currency_code=USD");
  exit;
}
mysql_connect("localhost","******","******");
mysql_select_db("******");
mysql_query("UPDATE user SET usergroupid='2', iexpire='0' WHERE usergroupid='8' AND iexpire < ".time());
$month=time()+2592000;
$renewusers=mysql_query("SELECT * FROM user WHERE usergroupid='8' AND iexpire < $month");
while (
$user=mysql_fetch_array($renewusers)) {
  
$email=stripslashes($user[username]).",\n\n";
  
$email.="Your V-Driveboat.com Insider subscription is going to expire in approximately one month.  To ensure uninterrupted access, please renew your subscription as soon as possible.  You can instantly renew with a credit card by going to the following address:\n\n";
  
$email.="http://www.v-drivebooat.com/imanage.php?action=renew&user=".urlencode(stripslashes($user[username]))."\n\n";
  
$email.="If you prefer, you are also welcome to mail your $15.00 renewal fee (be sure to include your username) to:\n";
  
$email.="V-Driveboat.com Insider\n";
  
$email.="P.O. Box 1576\n";
  
$email.="Lake Havasu City, AZ 86405-1576\n\n";
  
$email.="Thank you for your continued support of V-Driveboat.com, the web's first and leading v-drive enthusiast community.\n\n";
  
$email.="Regards,\n";
  
$email.="Nick Saunders\n";
  
$email.="nick@v-driveboat.com";
  
mail($user[email],"Your subscription is almost expired",$email,"From: \"V-Driveboat.com Insider\" <insider@v-driveboat.com>");
  if (
$show=="y") {
    echo 
$month."<br>";
    echo 
stripslashes($user[username])."<br>";
  }
}
mysql_close();
echo 
"<br>Done.";  
?>
All you need to do is use mktime() in admin/user.php and add 365.26 days (or 31558464 seconds) to the timestamp, then add the iexpire field to the user table.
Reply With Quote
  #16  
Old 05-02-2003, 03:36 AM
trafix's Avatar
trafix trafix is offline
 
Join Date: Dec 2002
Location: Australia
Posts: 1,021
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Nick, I need all the inspriation that i can get .... lol

looking at the code, Ihis is now an automated process ????

I presume that you have to activate it via a link in the admin panel.

If i added similar code to the admin/user.php, this will check the paid members current status each time they view a page or visit the site. I spost that it would add an extra quriy for paid membeers , this would not be so bad. i would have to add a second column to the user table so when the expired membersship code is activated, it sets the value to "1" that tells the script next time around that the email has already been sent.

Will that work??
Reply With Quote
  #17  
Old 05-02-2003, 03:41 AM
trafix's Avatar
trafix trafix is offline
 
Join Date: Dec 2002
Location: Australia
Posts: 1,021
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

sorry the code would have to go in the admin/functions.php.........right???
Reply With Quote
  #18  
Old 05-05-2003, 01:46 AM
N!ck N!ck is offline
 
Join Date: Mar 2002
Location: Lake Havasu City, AZ
Posts: 886
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Actually, mine's just in the root vB folder (doesn't pose a security threat), and it simply runs via a cronjob once per month.
Reply With Quote
  #19  
Old 08-23-2003, 08:55 AM
JeffyJoe JeffyJoe is offline
 
Join Date: Oct 2002
Posts: 14
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

any progress on a full hack for this yet?
Reply With Quote
  #20  
Old 08-23-2003, 05:58 PM
Neo's Avatar
Neo Neo is offline
 
Join Date: Oct 2001
Location: Anywhere
Posts: 1,817
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

there can be security holes in cron jobs, make sure the script has security measures.
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 02:30 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.05770 seconds
  • Memory Usage 2,274KB
  • Queries Executed 13 (?)
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
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (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
  • 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