vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   [Addon]Download Credit System with uCash (https://vborg.vbsupport.ru/showthread.php?t=79000)

VBUsers 04-04-2005 07:25 PM

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'] == AND $bbuserinfo['userid'] == $attachmentinfo['userid']) 


VBUsers 04-04-2005 07:28 PM

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'00) . '";');
                
// 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

    
}



Deaths 04-05-2005 07:51 AM

Sorry, I've made a little typo.

Redownload the zip, and redo the edits to attachment.php and newattachnent.php.

VBUsers 04-05-2005 08:00 AM

Quote:

Originally Posted by Deaths
Sorry, I've made a little typo.

Redownload the zip, and redo the edits to attachment.php and newattachnent.php.


ok im going to do this now. thanks

VBUsers 04-05-2005 08:24 AM

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 04-05-2005 08:37 AM

Glad to hear you got it to work :).

Lionel 04-20-2005 11:30 AM

Is me who did a bad install or if member does not have enough points, thumb shows as broken?

Lionel 04-20-2005 01:43 PM

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.

Deaths 04-20-2005 02:57 PM

That would be very complicated, as you'd probably have to create a new table for that.

This is simply an addon, and what you are asking is changing a rather simple hack into a major addition.

I'm currently very busy, but when I find some time, I'll try creating it for you. (Can take a couple of weeks, though)

VBUsers 04-27-2005 05:01 PM

i fixed that issue-----
but

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!


All times are GMT. The time now is 05:30 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.01145 seconds
  • Memory Usage 1,756KB
  • 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)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete