| crypto |
| Resource Seeker |

 |
| |
| Joined: Aug 13, 2004 |
| Posts: 2 |
|
|
|
 |
 |
 |
|
Does anybody know how to get YA-Expiration Hack 1.0 to work with Nuke v7.4? What modifications should be done?
| Code: | ###############################################
## Hack Title: YA-Expiration Hack
## Hack Version: 1.0
## Author: chatserv
## Description: Decide when a inactive user registration will expire.
## Compatibility: 6.5 & above
##
## Installation Level: Easy
## Installation Time: < 5 minutes
## Files To Edit: 4
## admin/modules/settings.php
## modules/Your_Account/index.php
## mainfile.php
## admin/language/lang-yourlang.php
##
## Included Files: 0
##
## History:
## 1.0: Initial release.
##
## Author Notes:
## Depending on the Nuke version you use the actual lines might vary.
##
## Support: http://www.nukeresources.com/modules.php?name=Forums
## Copyright: ©2004 YA-Expiration Hack 1.0 - chatserv
##
###############################################
## You downloaded this hack from nukeresources.com.
## Please visit http://www.nukeresources.com/modules.php?name=Forums for support.
###############################################
##
###############################################
## This hack is released under the GPL License.
## This hack can be freely used, but not distributed, without permission.
## Intellectual Property is retained by the hack author(s) listed above.
###############################################
#
#-----[ OPEN ]------------------------------------------
#
admin/modules/settings.php
#
#-----[ FIND ]------------------------------------------
#
$result = sql_query("SELECT sitename, nukeurl, site_logo, slogan, startdate, adminmail, anonpost, Default_Theme, foot1, foot2, foot3, commentlimit, anonymous, minpass, pollcomm, articlecomm, broadcast_msg, my_headlines, top, storyhome, user_news, oldnum, ultramode, banners, backend_title, backend_language, language, locale, multilingual, useflags, notify, notify_email, notify_subject, notify_message, notify_from, footermsgtxt, email_send, attachmentdir, attachments, attachments_view, download_dir, defaultpopserver, singleaccount, singleaccountname, numaccounts, imgpath, filter_forward, moderate, admingraphic, httpref, httprefmax, CensorMode, CensorReplace from ".$prefix."_config", $dbi);
#
#-----[ IN-LINE FIND ]------------------------------------------
#
user_news,
#
#-----[ IN-LINE AFTER ADD ]------------------------------------------
#
usr_exp,
#
#-----[ FIND ]------------------------------------------
#
list($sitename, $nukeurl, $site_logo, $slogan, $startdate, $adminmail, $anonpost, $Default_Theme, $foot1, $foot2, $foot3, $commentlimit, $anonymous, $minpass, $pollcomm, $articlecomm, $broadcast_msg, $my_headlines, $top, $storyhome, $user_news, $oldnum, $ultramode, $banners, $backend_title, $backend_language, $language, $locale, $multilingual, $useflags, $notify, $notify_email, $notify_subject, $notify_message, $notify_from, $footermsgtxt, $email_send, $attachmentdir, $attachments, $attachments_view, $download_dir, $defaultpopserver, $singleaccount, $singleaccountname, $numaccounts, $imgpath, $filter_forward, $moderate, $admingraphic, $httpref, $httprefmax, $CensorMode, $CensorReplace) = sql_fetch_row($result, $dbi);
#
#-----[ IN-LINE FIND ]------------------------------------------
#
$user_news,
#
#-----[ IN-LINE AFTER ADD ]------------------------------------------
#
$usr_exp,
#
#-----[ FIND ]------------------------------------------
#
echo "<input type='radio' name='xuser_news' value='1'>"._YES."
<input type='radio' name='xuser_news' value='0' checked>"._NO."";
}
#
#-----[ AFTER, ADD ]------------------------------------------
#
echo "</td></tr><tr><td>"
.""._ACCEXPIRATION."</td><td><input type='text' name='xusr_exp' value='$usr_exp' size='2' maxlength='2'>"._ACCEXPIRATIONDAYS."";
#
#-----[ FIND ]------------------------------------------
#
function ConfigSave ($xsitename, $xnukeurl, $xsite_logo, $xslogan, $xstartdate, $xadminmail, $xanonpost, $xDefault_Theme, $xfoot1, $xfoot2, $xfoot3, $xcommentlimit, $xanonymous, $xminpass, $xpollcomm, $xarticlecomm, $xbroadcast_msg, $xmy_headlines, $xtop, $xstoryhome, $xuser_news, $xoldnum, $xultramode, $xbanners, $xbackend_title, $xbackend_language, $xlanguage, $xlocale, $xmultilingual, $xuseflags, $xnotify, $xnotify_email, $xnotify_subject, $xnotify_message, $xnotify_from, $xfootermsgtxt, $xemail_send, $xattachmentdir, $xattachments, $xattachments_view, $xdownload_dir, $xdefaultpopserver, $xsingleaccount, $xsingleaccountname, $xnumaccounts, $ximgpath, $xfilter_forward, $xmoderate, $xadmingraphic, $xhttpref, $xhttprefmax, $xCensorMode, $xCensorReplace) {
#
#-----[ IN-LINE FIND ]------------------------------------------
#
$xuser_news,
#
#-----[ IN-LINE AFTER ADD ]------------------------------------------
#
$xusr_exp,
#
#-----[ FIND ]------------------------------------------
#
sql_query("UPDATE ".$prefix."_config SET sitename='$xsitename', nukeurl='$xnukeurl', site_logo='$xsite_logo', slogan='$xslogan', startdate='$xstartdate', adminmail='$xadminmail', anonpost='$xanonpost', Default_Theme='$xDefault_Theme', foot1='$xfoot1', foot2='$xfoot2', foot3='$xfoot3', commentlimit='$xcommentlimit', anonymous='$xanonymous', minpass='$xminpass', pollcomm='$xpollcomm', articlecomm='$xarticlecomm', broadcast_msg='$xbroadcast_msg', my_headlines='$xmy_headlines', top='$xtop', storyhome='$xstoryhome', user_news='$xuser_news', oldnum='$xoldnum', ultramode='$xultramode', banners='$xbanners', backend_title='$xbackend_title', backend_language='$xbackend_language', language='$xlanguage', locale='$xlocale', multilingual='$xmultilingual', useflags='$xuseflags', notify='$xnotify', notify_email='$xnotify_email', notify_subject='$xnotify_subject', notify_message='$xnotify_message', notify_from='$xnotify_from', footermsgtxt='$xfootermsgtxt', email_send='$xemail_send', attachmentdir='$xattachmentdir', attachments='$xattachments', attachments_view='$xattachments_view', download_dir='$xdownload_dir', defaultpopserver='$xdefaultpopserver', singleaccount='$xsingleaccount', singleaccountname='$xsingleaccountname', numaccounts='$xnumaccounts', imgpath='$ximgpath', filter_forward='$xfilter_forward', moderate='$xmoderate', admingraphic='$xadmingraphic', httpref='$xhttpref', httprefmax='$xhttprefmax', CensorMode='$xCensorMode', CensorReplace='$xCensorReplace'", $dbi);
#
#-----[ IN-LINE FIND ]------------------------------------------
#
storyhome='$xstoryhome',
#
#-----[ IN-LINE AFTER ADD ]------------------------------------------
#
usr_exp='$xusr_exp',
#
#-----[ FIND ]------------------------------------------
#
ConfigSave ($xsitename, $xnukeurl, $xsite_logo, $xslogan, $xstartdate, $xadminmail, $xanonpost, $xDefault_Theme, $xfoot1, $xfoot2, $xfoot3, $xcommentlimit, $xanonymous, $xminpass, $xpollcomm, $xarticlecomm, $xbroadcast_msg, $xmy_headlines, $xtop, $xstoryhome, $xuser_news, $xoldnum, $xultramode, $xbanners, $xbackend_title, $xbackend_language, $xlanguage, $xlocale, $xmultilingual, $xuseflags, $xnotify, $xnotify_email, $xnotify_subject, $xnotify_message, $xnotify_from, $xfootermsgtxt, $xemail_send, $xattachmentdir, $xattachments, $xattachments_view, $xdownload_dir, $xdefaultpopserver, $xsingleaccount, $xsingleaccountname, $xnumaccounts, $ximgpath, $xfilter_forward, $xmoderate, $xadmingraphic, $xhttpref, $xhttprefmax, $xCensorMode, $xCensorReplace);
#
#-----[ IN-LINE FIND ]------------------------------------------
#
$xuser_news,
#
#-----[ IN-LINE AFTER ADD ]------------------------------------------
#
$xusr_exp,
#
#-----[ OPEN ]------------------------------------------
#
modules/Your_Account/index.php
#
#-----[ FIND ]------------------------------------------
#
function activate($username, $check_num) {
global $db, $user_prefix, $module_name, $language;
#
#-----[ REPLACE WITH ]------------------------------------------
#
function activate($username, $check_num) {
global $db, $user_prefix, $module_name, $language, $usr_exp;
#
#-----[ FIND ]------------------------------------------
#
$past = time()-86400;
$db->sql_query("DELETE FROM ".$user_prefix."_users_temp WHERE time < $past");
#
#-----[ REPLACE WITH ]------------------------------------------
#
if (is_numeric($usr_exp) && $usr_exp > 0) {
$exp_usr = 86400*$usr_exp;
} else {
$exp_usr = 0;
}
$past = time()-$exp_usr;
if ($usr_exp != 0) {
$db->sql_query("DELETE FROM ".$user_prefix."_users_temp WHERE time < '$past'");
}
#
#-----[ OPEN ]------------------------------------------
#
mainfile.php
#
#-----[ FIND ]------------------------------------------
#
$sql = "SELECT sitename, nukeurl, site_logo, slogan, startdate, adminmail, anonpost, Default_Theme, foot1, foot2, foot3, commentlimit, anonymous, minpass, pollcomm, articlecomm, broadcast_msg, my_headlines, top, storyhome, user_news, oldnum, ultramode, banners, backend_title, backend_language, language, locale, multilingual, useflags, notify, notify_email, notify_subject, notify_message, notify_from, footermsgtxt, email_send, attachmentdir, attachments, attachments_view, download_dir, defaultpopserver, singleaccount, singleaccountname, numaccounts, imgpath, filter_forward, moderate, admingraphic, httpref, httprefmax, CensorMode, CensorReplace, copyright, Version_Num FROM ".$prefix."_config";
#
#-----[ IN-LINE FIND ]------------------------------------------
#
user_news,
#
#-----[ IN-LINE AFTER ADD ]------------------------------------------
#
usr_exp,
#
#-----[ FIND ]------------------------------------------
#
$user_news = $row[user_news];
$user_news = intval($user_news);
#
#-----[ AFTER ADD ]------------------------------------------
#
$usr_exp = $row[usr_exp];
$usr_exp = intval($usr_exp);
#
#-----[ OPEN ]----------------------------------
#
admin/language/lang-yourlang.php
#
#-----[ FIND ]------------------------------------------
#
?>
#
#-----[ BEFORE ADD ]------------------------------------------
#
define("_ACCEXPIRATION","Account Activation Expiration:");
define("_ACCEXPIRATIONDAYS","-Day(s) (Enter 0 for no expiration)");
#
#-----[ SAVE & CLOSE ALL FILES ]--------------------------
#
#
#-----[ RUN THROUGH PHPMYADMIN ]----------------------------------
#
ALTER TABLE nuke_config ADD usr_exp tinyint(1) NOT NULL default '1';
#End |
|
|