Changeset 5433 for extensions


Ignore:
Timestamp:
Mar 28, 2010, 9:46:42 PM (14 years ago)
Author:
grum
Message:

Update the plugin for compatibility with Piwigo 2.1

Location:
extensions/UserStat
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • extensions/UserStat/admin/userstat_admin.tpl

    r4270 r5433  
    1 <div class="titrePage">
    2   <h2 style="position:absolute;right:0px;top:32px;height:auto;font-size:12px;font-weight:normal;">:: {$plugin.USERSTAT_VERSION} ::</h2>
    3   <h2>{'us_titlePage'|@translate} <span style="font-size:-1;font-weight:normal;">{$TABSHEET_TITLE}</span></h2>
     1<h2 style="float:right;top:-24px;position:relative;height:auto;font-size:12px;font-weight:normal;">{$plugin.USERSTAT_VERSION}</h2>
    42
    5   {$tabsheet}
     3<div style="position:relative;top:-24px;clear:right;">
    64</div>
    75
    8 {if isset($datas)}
    9   {$datas.USERSTAT_NFO_STAT}
    10   <h3>{$datas.L_STAT_TITLE}</h3>
    11 
    12 {/if}
     6{$tabsheet}
    137
    148{$USERSTAT_BODY_PAGE}
  • extensions/UserStat/admin/userstat_global.tpl

    r4270 r5433  
    5353  {foreach from=$datas.templatesUsers key=name item=data}
    5454    <tr class="StatTableRow">
    55       <td>{$data.template}</td>
     55      <td>{$data.theme}</td>
    5656      <td>{$data.nbUsers}</td>
    5757    </tr>
  • extensions/UserStat/main.inc.php

    r4273 r5433  
    22/*
    33Plugin Name: UserStat
    4 Version: 1.0.0
     4Version: 1.1.0
    55Description: Statistiques utilisateurs / Users statistics
    66Plugin URI: http://phpwebgallery.net/ext/extension_view.php?eid=321
     
    2424| release | date       |
    2525| 1.0.0   | 2009/11/15 | * first public release
    26 |         |            |
     26| 1.1.0   | 2010/03/28 | * compatibility with Piwigo 2.1
    2727|         |            |
    2828|         |            |
     
    5454define('USERSTAT_PATH' , PHPWG_PLUGINS_PATH . USERSTAT_DIR . '/');
    5555
    56 define('USERSTAT_VERSION' , '1.0.0'); // => ne pas oublier la version dans l'entête !!
     56define('USERSTAT_VERSION' , '1.1.0'); // => ne pas oublier la version dans l'entête !!
    5757
    5858global $prefixeTable;
  • extensions/UserStat/maintain.inc.php

    r4270 r5433  
    1616if (!defined('PHPWG_ROOT_PATH')) { die('Hacking attempt!'); }
    1717
    18 define('USERSTAT_DIR' , basename(dirname(__FILE__)));
    19 define('USERSTAT_PATH' , PHPWG_PLUGINS_PATH . USERSTAT_DIR . '/');
     18if(!defined('USERSTAT_DIR')) define('USERSTAT_DIR' , basename(dirname(__FILE__)));
     19if(!defined('USERSTAT_PATH')) define('USERSTAT_PATH' , PHPWG_PLUGINS_PATH . USERSTAT_DIR . '/');
    2020
    2121
     
    2323
    2424/* -----------------------------------------------------------------------------
    25 AStat-2 needs the Grum Plugin Classe
     25UserStat needs the Grum Plugin Classe
    2626----------------------------------------------------------------------------- */
    2727$gpc_installed=false;
     
    2929{
    3030  @include_once(PHPWG_PLUGINS_PATH.'grum_plugins_classes-2/main.inc.php');
    31   // need GPC release greater or equal than 2.0.1
    32   if(checkGPCRelease(2,0,1))
     31  // need GPC release greater or equal than 2.0.5
     32  if(checkGPCRelease(2,0,5))
    3333  {
    3434    @include_once("userstat_aim.class.inc.php");
     
    3939function gpcMsgError(&$errors)
    4040{
    41   array_push($errors, sprintf(l10n('us_gpc2_not_installed'), "2.0.1"));
     41  array_push($errors, sprintf(l10n('us_gpc2_not_installed'), "2.0.5"));
    4242}
    4343// -----------------------------------------------------------------------------
  • extensions/UserStat/userstat_aip.class.inc.php

    r4270 r5433  
    201201    if($result)
    202202    {
    203       while($row=mysql_fetch_assoc($result))
     203      while($row=pwg_db_fetch_assoc($result))
    204204      {
    205205        $row['indent']=substr_count($row['global_rank'], '.');
     
    243243    if($result)
    244244    {
    245       $row=mysql_fetch_assoc($result);
     245      $row=pwg_db_fetch_assoc($result);
    246246      return($row["username"]);
    247247    }
     
    277277    if($result)
    278278    {
    279       while($row=mysql_fetch_row($result))
     279      while($row=pwg_db_fetch_row($result))
    280280      {
    281281        $returned[]=Array(
     
    304304    if($result)
    305305    {
    306       while($row=mysql_fetch_assoc($result))
     306      while($row=pwg_db_fetch_assoc($result))
    307307      {
    308308        $row["humanReadable"]=$list[$row["language"]];
     
    323323    $returned = array();
    324324
    325     $sql="SELECT count(user_id) as nbUsers, template FROM ".USER_INFOS_TABLE." GROUP BY template ORDER BY nbUsers DESC";
    326     $result=pwg_query($sql);
    327     if($result)
    328     {
    329       while($row=mysql_fetch_assoc($result))
     325    $sql="SELECT count(user_id) as nbUsers, theme FROM ".USER_INFOS_TABLE." GROUP BY theme ORDER BY nbUsers DESC";
     326    $result=pwg_query($sql);
     327    if($result)
     328    {
     329      while($row=pwg_db_fetch_assoc($result))
    330330      {
    331331        $returned[]=$row;
     
    359359    $sql="
    360360SELECT name,
    361        MAX(id) AS id,
     361       id,
    362362       MAX(nbRates) AS nbRates,
    363363       MAX(maxRate) AS maxRate,
     
    409409    if($result)
    410410    {
    411       while($row=mysql_fetch_assoc($result))
     411      while($row=pwg_db_fetch_assoc($result))
    412412      {
    413413        $returned[]=$row;
     
    506506    if($result)
    507507    {
    508       while($row=mysql_fetch_assoc($result))
     508      while($row=pwg_db_fetch_assoc($result))
    509509      {
    510510        $returned[$row['categoryId']]=$row;
Note: See TracChangeset for help on using the changeset viewer.