Changeset 9145


Ignore:
Timestamp:
Feb 10, 2011, 10:48:31 AM (13 years ago)
Author:
cljosse
Message:

[whois_online] compatibility with piwigo 2.2

Location:
extensions/whois_online
Files:
3 added
6 edited

Legend:

Unmodified
Added
Removed
  • extensions/whois_online/Changelog.txt.php

    r6388 r9145  
    33Plugin Name: Whois online
    44** History **
     5  2011-02-10 2.2.0
     6                                                 New: Piwigo 2.2 support cljosse
     7
    58  2010-05-27 2.1.d
    69                                                 Translator's description text
  • extensions/whois_online/config.php

    r6214 r9145  
    55/*
    66 TODO list:
    7 - User comments
    8  (Delete all comments or partial delete)
     7- User comments… (Delete all comments or partial delete)
    98- Bots identification (for exclusion maybe a sharing feature with antiaspi to lock user/IP)
    109- hits level (to suggest a new bot)
     
    3433                'double_select' => 'double_select.tpl'
    3534                ));
     35
     36if (!defined('ROOT_URL'))
     37define(  'ROOT_URL',  get_root_url().'/' );
     38
     39$WHOIS_PATH_ABS=str_replace('\\','/',dirname(__FILE__) );
     40if (!defined('WHOIS_PATH_ABS'))
     41define(
     42  'WHOIS_PATH_ABS',   $WHOIS_PATH_ABS."/"
     43);
     44   if (version_compare(PHPWG_VERSION, '2.2', '>=') ) 
     45                $file =WHOIS_PATH_ABS.'template/header_2_2.tpl' ;
     46        else
     47                $file =WHOIS_PATH_ABS.'template/header_2_1.tpl' ;
     48
     49 $template->set_filenames(array('whois_init_header'=> $file ));
     50 $template->assign(Array(
     51       
     52        'Whois_path' => WHOIS_ONLINE_PATH
     53  ));
     54
     55        $template->concat('plugin_admin_content', $template->parse('whois_init_header', true));
     56
    3657
    3758// Tabsheets
  • extensions/whois_online/config.tpl

    r8172 r9145  
    11<div class="titrePage">
    2         <h2>Whois Online</h2>
     2        <h2>Whois Online {'Version'|@translate}:{$Whois_version}</h2>
    33</div>
    4 
     4 
    55<form method="post" action="{$F_ACTION}" class="Whois_Online properties {$themeconf.name}">
    66
     
    153153{literal}
    154154<script type="text/javascript">// <![CDATA[
    155 $(document).ready(function () { 
    156   $("a.load")
     155jQuery(document).ready(function () { 
     156  jQuery("a.load")
    157157  .click(function() {
    158   $("#reloadable").load(this.href);
     158  jQuery("#reloadable").load(this.href);
    159159    return false;
    160160  });
     
    171171<link rel="stylesheet" type="text/css" href="{$Whois_path|@cat:'online.css'}">
    172172{/html_head}
    173 {known_script id="jquery.ui" src=$ROOT_URL|@cat:"template-common/lib/ui/ui.core.packed.js"}
    174 {known_script id="jquery.cluetip" src=$ROOT_URL|@cat:"template-common/lib/plugins/jquery.cluetip.packed.js"}
    175 {known_script id="jquery.tablesorter" src=$Whois_path|@cat:"jquery/tablesorter/jquery.tablesorter.min.js"}
     173{*known_script id="jquery" src=$ROOT_URL|@cat:"themes/default/js/jquery.packed.js"*}
     174{*known_script id="jquery.ui" src=$ROOT_URL|@cat:"themes/default/js/ui/packed/ui.core.packed.js"*}
     175{*known_script id="jquery.cluetip" src=$ROOT_URL|@cat:"themes/default/js/plugins/jquery.cluetip.packed.js"*}
     176{* known_script id="jquery.tablesorter" src=$Whois_path|@cat:"jquery/tablesorter/jquery.tablesorter.min.js" *}
  • extensions/whois_online/include/wo_admin_functions.inc.php

    r6201 r9145  
    8888
    8989// Select the correct menu on loc_end_admin
    90 function whois_select_menu($menu) {
     90function whois_select_menu() {
    9191        global $conf_whois, $template;
    9292        if ($conf_whois['Add icon to History'] or !$conf_whois['Add to Plugins menu'])
  • extensions/whois_online/main.inc.php

    r6388 r9145  
    2323/*
    2424Plugin Name: Whois online
    25 Version: 2.1.d
     25Version: 2.1.e
    2626Description: Who is online?
    27 Plugin URI: http://fr.piwigo.org/ext/extension_view.php?eid=279
     27Plugin URI: http://piwigo.org/ext/extension_view.php?eid=279
    2828Author: Piwigo team
    2929Author URI: http://www.vdigital.org
    3030*/
    31 define('WHOIS_ONLINE_VER', '2.1.d');
     31
    3232global $prefixeTable, $conf;
    3333// $conf['debug_l10n'] = true;
     
    3636define('WHOIS_ONLINE_DIR' , basename(dirname(__FILE__)));
    3737define('WHOIS_ONLINE_PATH' , PHPWG_PLUGINS_PATH . WHOIS_ONLINE_DIR . '/');
     38
     39 
     40                $path = WHOIS_ONLINE_PATH;
     41          $plg_data = implode( '', file($path.'main.inc.php') );
     42          if (preg_match("|Version: (.*)|", $plg_data, $val))
     43          {
     44            $Whois_online_ver = trim($val[1]);
     45          }     
     46     
     47define('WHOIS_ONLINE_VER', $Whois_online_ver);
     48
    3849include_once(WHOIS_ONLINE_PATH.'online.php');
    3950/* History:  WHOIS_ONLINE_PATH.'Changelog.txt.php' */
  • extensions/whois_online/report.tpl

    r6386 r9145  
    1 {known_script id="jquery.cluetip" src=$ROOT_URL|@cat:"plugins/whois_online/jquery/cluetip/jquery.cluetip.min.js" }
     1{*known_script id="jquery.cluetip" src=$ROOT_URL|@cat:"plugins/whois_online/jquery/cluetip/jquery.cluetip.min.js" *}
    22<table class="table2" id="detailedStats">
    33<thead>
     
    9595{literal}
    9696<script type="text/javascript">// <![CDATA[
    97 $(document).ready(function(){
    98   $("#detailedStats").tablesorter( {sortList: [[5,1]]} );}
     97jQuery(document).ready(function(){
     98  jQuery("#detailedStats").tablesorter( {sortList: [[5,1]]} );}
    9999);
    100100jQuery().ready(function(){
Note: See TracChangeset for help on using the changeset viewer.