Version: 1.00, by Deaths
Developer Last Online: Mar 2009
Version: 3.0.7
Rating:
Released: 03-28-2005
Last Update: 04-04-2005
Installs: 32
No support by the author.
Requested by some people, so here it is!
Basicly the name says it, its an addon for tnguy3n's hack "Download Credit System".
There was a small typo in the install file, if you downloaded before 4-5-2005, please redownload, and redo the edits to attachment.php and newattachment.php!
The install file contains all the info you need.
this is what i have for the attatchment.php edit. at the bottom is the only similar code that i have to the one you say i have to edit. is this correct?
PHP Code:
// Begin Download Credit System
if($vboptions['credit_mode'])
{
// quick check for exceptional groups not restricted by this credit system
if(!in_array($bbuserinfo['usergroupid'], explode(',', $vboptions['credit_noapplied'])))
{
if($bbuserinfo['userid'] != $attachmentinfo['userid'])
{
$usercredits = $bbuserinfo['credits'];
$cost = $vboptions['credit_cost'];
if(($usercredits < $vboptions['credit_cost']))
{
eval(print_standard_error('error_notenuffcredits'));
}
else
{
$DB_site->query_first("UPDATE " . TABLE_PREFIX . "user
SET credits = credits - $cost WHERE userid = $bbuserinfo[userid] ");
}
}
}
}
// End Download Credit System
if ($attachment['postid'] == 0 AND $bbuserinfo['userid'] == $attachmentinfo['userid'])
and this one is for the newattatchemnt.php im not sure if this is correct either. if theres anything you can help me with ide appreciate it. or is it that this addon isnt going to work for my obard?
PHP Code:
eval('$parentattach .= "' . fetch_template('newpost_attachmentbit', 0, 0) . '";');
// Begin Download Credit System
if($vboptions['credit_mode'])
{
// check if the system apply to only certain forums
if(empty($vboptions['credit_sysapplied']) OR in_array($foruminfo['forumid'], explode(',', $vboptions['credit_sysapplied'])))
{
$totalcredits = $attachcount * $vboptions['credit_perattach'];
$DB_site->query_first("UPDATE " . TABLE_PREFIX . "user
SET credits = credits + $totalcredits WHERE userid = $bbuserinfo[userid] ");
}
}
// End Download Credit System
ok hell of a job deaths. this is a great hack and now it works. what ever you changed was my issue. it works fine i tested it every way and i thank you for your time and effort. cant wait for your next projects. now that i know a little more ill try to help you out on the questions.
And everyone make sure to click install! very important
Deaths, quick question: In order to encourage uploads, can this be made that portion of points taken from downloading member is given to member who uploaded? If yes, I could setup a forum like a mp3 portal.
how can i make it so that when i get a new registered user he automatically gets 45 points in his account with out me having to give him points so he can download stuff. that would be an excellent add on for me. cause now i have to give each one points and its a hassle. thanks deaths your the man!