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