"Fossies" - the Fresh Open Source Software Archive

Member "betterawstats/core/extras.inc.php" (17 Mar 2008, 3433 Bytes) of package /linux/www/old/betterawstats-1.0.zip:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) PHP source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file.

    1 <?php
    2 /**
    3  * betterawstats - an alternative display for awstats data
    4  *
    5  * @author      Oliver Spiesshofer, support at betterawstats dot com
    6  * @copyright   2008 Oliver Spiesshofer
    7  * @version     1.0
    8  * @link        http://betterawstats.com
    9 
   10  * Based on the GPL AWStats Totals script by:
   11  * Jeroen de Jong <jeroen@telartis.nl>
   12  * copyright   2004-2006 Telartis
   13  * version 1.13 (http://www.telartis.nl/xcms/awstats)
   14  *
   15  * This program is free software; you can redistribute it and/or
   16  * modify it under the terms of the GNU General Public License
   17  * as published by the Free Software Foundation; either version 2
   18  * of the License, or (at your option) any later version.
   19  *
   20  * This program is distributed in the hope that it will be useful,
   21  * but WITHOUT ANY WARRANTY; without even the implied warranty of
   22  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   23  * GNU General Public License for more details.
   24  *
   25  * You should have received a copy of the GNU General Public License
   26  * along with this program; if not, write to the Free Software
   27  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
   28  */
   29 
   30 // DO NOT EDIT THESE 3 LINES
   31 if (strpos ($_SERVER['PHP_SELF'], 'extras.inc.php') !== false) {
   32     die ('This file can not be used on its own!');
   33 }
   34 
   35 // EDIT BELOW HERE
   36 // Please make sure to read /docs/install.txt to see all places where you have to
   37 // edit items to see your extras
   38 // In order to add new sections of extras to the site, please make copies of the
   39 // section below. change all occurences of extra_1 to extra_2 etc and all EXTRA_1
   40 // to EXTRA_2 etc. Also change the texts as indicated.
   41 
   42 // copy section starts below here
   43 function baw_display_extra_1($set) {  // <- change extra_1 to extra_2, 3, 4 etc
   44     global $BAW_MES, $BAW_CURR, $BAW_D, $BAW_CONF, $BAW_LIB, $BAW_CONF_DIS_DEF;
   45     $format = array( // change the 'Screen colors' to other titles below here
   46         0 => array ('title'=> 'Screen colors', 'format' => 'layout_text'),
   47         1 => array ('percent' => true, 'title'=> $BAW_MES[57], 'format' => 'layout_hits')
   48     );
   49     $newval = array(); // change the two following lines from EXTRA_1 to EXTRA_2, 3, 4 etc
   50     if ($val = baw_data($BAW_CURR['site_name'], 'EXTRA_1', $BAW_CURR['yearmonth'])) {
   51         foreach ($val as $type => $data) {
   52             $newval[$type] = array($type, $data[1]) ;
   53         }
   54     } else if ($BAW_CONF['hideempty']){
   55         return '';
   56     }
   57     $newval = baw_array_sorting($newval, $set['sort'], $set['sort_dir']);
   58     $out = '';
   59     if ($set['table']) {
   60         $out .= baw_render_table($set['name'], $newval, $format, false, $set['total'], $set['top_x']);
   61     }
   62     return $out;
   63 }
   64 // copy section ends above here
   65 
   66 // insert copies here
   67 
   68 // Please make sure to read /docs/install.txt to see all places where you have to
   69 // edit items to see your extras
   70 // to add more extras-sections, please copy the following section as often as
   71 // you need and edit the extras_1 to extras_2 etc. Also change the text to
   72 // the desired descriptions.
   73 
   74 // copy section start below here
   75 $BAW_CONF_DIS_DEF['extra_1'] = array ( // please make sure this is unique
   76     'help' => 'Screen colors of users', // help for config
   77     'name' => "Color depth",  // display name
   78     'sorting' => array( // what fields can it be sorted by?
   79         0 => 'Color depth in bits',
   80         1 => $BAW_MES[57]
   81     )
   82 );
   83 // copy section end above here
   84 
   85     // insert copies here
   86 
   87 ?>