Changes between Version 1 and Version 2 of PerAppCredit


Ignore:
Timestamp:
Aug 15, 2014, 4:20:09 PM (10 years ago)
Author:
davea
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • PerAppCredit

    v1 v2  
    1616== Displaying per-app credit ==
    1717
    18 To display per-app credit on your web site,
     18Per-app credit is displayed and exported in terms of '''sub-projects'''.
     19A sub-project is a named set of apps.
     20Define your sup-projects in ''html/project/project.inc'' in the form
     21{{{
     22$sub_projects = array(
     23    array("name" => "Remote Test", "appids" => array(16)),
     24    array("name" => "Uppercase", "appids" => array(1, 25)),
     25);
     26}}}
     27
     28To display per-app credit on your web site
     29(in the user and team pages)
    1930you must supply functions
    2031{{{
     
    2839The example file '''boinc/html/project.sample/project.inc'''
    2940contains 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
     41Remove the '''if(0)''' and change the sub-project specs to suit your project.
     42
     43== Exporting per-app credit ==
     44
     45The script '''html/ops/export_credit_by_app.php''' exports per-app credit as two files
     46'''user_work.gz''' and '''team_work.gz''' in your html/stats directory.
     47Run this as a periodic task, with an entry of the form
    3248{{{
    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 }
     49<task>
     50   <cmd>run_in_ops ./export_credit_by_app.php</cmd>
     51   <period>24 hours</period>
     52   <output>export_credit_by_app.out</output>
     53</task>
    4254}}}
    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".
     55in your config.xml