Changes between Initial Version and Version 1 of PerAppCredit


Ignore:
Timestamp:
Aug 15, 2014, 1:58:50 PM (10 years ago)
Author:
davea
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • PerAppCredit

    v1 v1  
     1= Per-app credit =
     2
     3By default, BOINC maintains the credit granted to
     4teams, users, and hosts, both total and average.
     5You can optionally maintain credit for teams and users
     6on a per-application basis.
     7This information is stored in DB tables '''credit_user''' and '''credit_team'''.
     8Note: doing this will increase DB size and server load.
     9
     10To maintain per-app credit, put
     11{{{
     12<credit_by_app/>
     13}}}
     14in your config.xml file.
     15
     16== Displaying per-app credit ==
     17
     18To display per-app credit on your web site,
     19you must supply functions
     20{{{
     21project_user_credit($user)
     22project_team_credit($team)
     23}}}
     24in your '''html/project/project.inc'''.
     25These functions must generate table rows describing
     26the credit granted to each app for the given user or team.
     27
     28The example file '''boinc/html/project.sample/project.inc'''
     29contains an example of how to do this.
     30It uses helper functions to do the DB lookups and generate the HTML.
     31The part you supplies looks like
     32{{{
     33function project_user_credit($user){
     34    show_app_credit_user($user, "Remote Test", array(16));
     35    show_app_credit_user($user, "Uppercase", array(1, 25));
     36}
     37
     38function project_team_credit($team) {
     39    show_app_credit_team($team, "Remote Test", array(16));
     40    show_app_credit_team($team, "Uppercase", array(1, 25));
     41}
     42}}}
     43
     44You supply the application names and IDs.
     45You can combine multiple apps;
     46in this case, credit for apps 1 and 25 are summed
     47and displayed as 'Uppercase".