Changeset 9737


Ignore:
Timestamp:
Mar 17, 2011, 12:35:45 AM (10 years ago)
Author:
patdenice
Message:

Compatible 2.2

Location:
extensions/PWG_Stuffs/trunk
Files:
20 edited

Legend:

Unmodified
Added
Removed
  • extensions/PWG_Stuffs/trunk/admin/add_module.inc.php

    r9600 r9737  
    1616
    1717// Save module
    18 if (isset($_POST['submit']) and !is_adviser())
     18if (isset($_POST['submit']))
    1919{
    2020  @include($module_path.'config.inc.php');
  • extensions/PWG_Stuffs/trunk/admin/manage.inc.php

    r9449 r9737  
    66
    77// Delete module
    8 if (isset($_GET['del']) and !is_adviser())
     8if (isset($_GET['del']))
    99{
    1010  pwg_query('DELETE FROM ' . STUFFS_TABLE . ' WHERE id = ' . $_GET['del'] . ' LIMIT 1;');
     
    1313
    1414// Save order
    15 if (isset($_POST['submitOrder']) and !is_adviser())
     15if (isset($_POST['submitOrder']))
    1616{
    1717  asort($_POST['position'], SORT_NUMERIC);
     
    8686    'ID' => $module['id'],
    8787    'U_EDIT' => PHPWG_ROOT_PATH . 'admin.php?page=plugin&section=' . STUFFS_DIR . '%2Fadmin%2Fadmin.php&tab=edit_module&edit='.$module['id'],
    88     'U_DELETE' => !is_adviser() ? PHPWG_ROOT_PATH . 'admin.php?page=plugin&section=' . STUFFS_DIR . '%2Fadmin%2Fadmin.php&del=' . $module['id'] : '',
     88    'U_DELETE' => PHPWG_ROOT_PATH . 'admin.php?page=plugin&section=' . STUFFS_DIR . '%2Fadmin%2Fadmin.php&del=' . $module['id'],
    8989    'MISSING' => $missing_message,
    9090    )
  • extensions/PWG_Stuffs/trunk/admin/new.inc.php

    r9383 r9737  
    44
    55//Ajout d'un module
    6 if (isset($_POST['addModule']) and !is_adviser())
     6if (isset($_POST['addModule']))
    77{
    88  if (!isset($_POST['module']))
  • extensions/PWG_Stuffs/trunk/admin/template/add_module.tpl

    r9600 r9737  
    1 {known_script id="jquery" src=$ROOT_URL|@cat:"themes/default/js/jquery.packed.js"}
    21{include file='include/autosize.inc.tpl'}
    32{html_head}{literal}
     
    9695</fieldset>
    9796{/if}
    98 <p><input class="submit" type="submit" value="{'Submit'|@translate}" name="submit" {$TAG_INPUT_ENABLED}/></p>
     97<p><input class="submit" type="submit" value="{'Submit'|@translate}" name="submit"/></p>
    9998</form>
  • extensions/PWG_Stuffs/trunk/admin/template/manage.tpl

    r9449 r9737  
    1 {known_script id="jquery.ui" src=$ROOT_URL|@cat:"themes/default/js/ui/packed/ui.core.packed.js" }
    2 {known_script id="jquery.ui.sortable" src=$ROOT_URL|@cat:"themes/default/js/ui/packed/ui.sortable.packed.js" }
    3 
    4 {html_head}
    5 {literal}
     1{html_head}{literal}
    62<style type="text/css">
    73#categoryOrdering li {
     
    1915}
    2016</style>
     17{/literal}{/html_head}
     18
     19{footer_script require='jquery.ui.sortable}
     20
     21{literal}
     22jQuery().ready(function(){
     23  jQuery(".catPos").hide();
     24  jQuery(".drag_button").show();
     25  jQuery(".categoryLi").css("cursor","move");
     26  jQuery(".categoryUl").sortable({
     27    axis: "y",
     28    opacity: 0.8
     29  });
     30  jQuery("#categoryOrdering").submit(function(){
     31    ar = jQuery('.categoryUl').sortable('toArray');
     32    for(i=0;i<ar.length;i++) {
     33      module = ar[i].split('module_');
     34      document.getElementsByName('position[' + module[1] + ']')[0].value = i;
     35    }
     36  });
     37});
    2138{/literal}
    22 {/html_head}
    2339
    24 <script type="text/javascript">
    25   jQuery().ready(function(){ldelim}
    26     jQuery(".catPos").hide();
    27     jQuery(".drag_button").show();
    28     jQuery(".categoryLi").css("cursor","move");
    29     jQuery(".categoryUl").sortable({ldelim}
    30       axis: "y",
    31       opacity: 0.8
    32     });
    33     jQuery("#categoryOrdering").submit(function(){ldelim}
    34       ar = jQuery('.categoryUl').sortable('toArray');
    35       for(i=0;i<ar.length;i++) {ldelim}
    36         module = ar[i].split('module_');
    37         document.getElementsByName('position[' + module[1] + ']')[0].value = i;
    38       }
    39     });
    40   });
    41 </script>
     40{/footer_script}
    4241
    4342<div class="titrePage">
     
    9897  <p style="text-align: center;">
    9998  <br />
    100     <input class="submit" name="submitOrder" type="submit" value="{'Save order'|@translate}" {$TAG_INPUT_ENABLED} />
     99    <input class="submit" name="submitOrder" type="submit" value="{'Save order'|@translate}" />
    101100  </p>
    102101</form>
  • extensions/PWG_Stuffs/trunk/class.inc.php

    r9736 r9737  
    1818    {
    1919      $this->prefixe = 'PLUGIN_PICTURE_';
    20       $template->set_prefilter('header', array('stuffs', 'prefilter_picture_css'));
     20      $template->func_combine_css(array(
     21        'path' => 'plugins/PWG_Stuffs/theme/stuffs_picture.css',
     22        ),
     23        $smarty
     24      );
    2125      pwgs_picture_special_sections();
    2226    }
    2327    else
    2428    {
    25       $template->set_prefilter( 'header', array('stuffs', 'prefilter_index_css') );
     29      $template->func_combine_css(array(
     30        'path' => 'plugins/PWG_Stuffs/theme/stuffs_index.css',
     31        ),
     32        $smarty
     33      );
    2634    }
    2735
     
    184192    $this->blocks[$this->pos][] = $block;
    185193  }
    186 
    187   static function prefilter_index_css($source, &$smarty)
    188   {
    189     $css = array(
    190       '<link rel="stylesheet" type="text/css" href="{$ROOT_URL}plugins/'.STUFFS_DIR.'/theme/stuffs_index.css">'
    191     );
    192 
    193     foreach ($smarty->get_template_vars('themes') as $theme)
    194     {
    195       if (file_exists(PHPWG_THEMES_PATH.$theme['id'].'/stuffs_index.css'))
    196       {
    197         array_push($css, '<link rel="stylesheet" type="text/css" href="{$ROOT_URL}themes/'.$theme['id'].'/stuffs_index.css">');
    198       }
    199     }
    200 
    201     $source = str_replace("\n</head>", "\n".implode( "\n", $css )."\n</head>", $source);
    202 
    203     return $source;
    204   }
    205 
    206   static function prefilter_picture_css($source, &$smarty)
    207   {
    208     $css = array(
    209       '<link rel="stylesheet" type="text/css" href="{$ROOT_URL}plugins/'.STUFFS_DIR.'/theme/stuffs_picture.css">'
    210     );
    211 
    212     foreach ($smarty->get_template_vars('themes') as $theme)
    213     {
    214       if (file_exists(PHPWG_THEMES_DIR.$theme['id'].'/stuffs_picture.css'))
    215       {
    216         array_push($css, '<link rel="stylesheet" type="text/css" href="{$ROOT_URL}themes/'.$theme['id'].'/stuffs_picture.css">');
    217       }
    218     }
    219 
    220     if (!empty($css))
    221     {
    222       $source = str_replace("\n</head>", "\n".implode( "\n", $css )."\n</head>", $source);
    223     }
    224 
    225     return $source;
    226   }
    227194}
    228195
  • extensions/PWG_Stuffs/trunk/modules/BestRated/config.inc.php

    r9410 r9737  
    1212
    1313// Enregistrement de la configuration
    14 if (isset($_POST['submit']) and !is_adviser())
     14if (isset($_POST['submit']))
    1515{
    1616  $datas = array(
  • extensions/PWG_Stuffs/trunk/modules/Citation/config.inc.php

    r3694 r9737  
    1414$available_languages = get_languages();
    1515// Save configuration
    16 if (isset($_POST['submit']) and !is_adviser()) {
     16if (isset($_POST['submit'])) {
    1717  $new_data = array();
    1818  foreach (array_keys($available_languages) as $current_lang) {
  • extensions/PWG_Stuffs/trunk/modules/LastComs/config.inc.php

    r3609 r9737  
    55
    66// Enregistrement de la configuration
    7 if (isset($_POST['submit']) and !is_adviser())
     7if (isset($_POST['submit']))
    88{
    99  if (empty($_POST['nb_comments']))
  • extensions/PWG_Stuffs/trunk/modules/LastComs/main.inc.php

    r9369 r9737  
    88// +-----------------------------------------------------------------------+
    99// comments deletion
    10 if (isset($_GET['delete']) and is_numeric($_GET['delete']) and is_admin() and !is_adviser())
     10if (isset($_GET['delete']) and is_numeric($_GET['delete']) and is_admin())
    1111{
    1212    check_status(ACCESS_ADMINISTRATOR);
     
    2020
    2121// comments validation
    22 if (isset($_GET['validate']) and is_numeric($_GET['validate']) and is_admin() and !is_adviser())
     22if (isset($_GET['validate']) and is_numeric($_GET['validate']) and is_admin())
    2323{
    2424    check_status(ACCESS_ADMINISTRATOR);
  • extensions/PWG_Stuffs/trunk/modules/Logon/config.inc.php

    r9369 r9737  
    99
    1010// Enregistrement de la configuration
    11 if (isset($_POST['submit']) and !is_adviser()) {
     11if (isset($_POST['submit'])) {
    1212  if (!isset($_POST['remove_menubar_block'])) $_POST['remove_menubar_block']  = '0';
    1313    $datas = array($_POST['remove_menubar_block']);
  • extensions/PWG_Stuffs/trunk/modules/MostVisited/config.inc.php

    r9410 r9737  
    1212
    1313// Enregistrement de la configuration
    14 if (isset($_POST['submit']) and !is_adviser())
     14if (isset($_POST['submit']))
    1515{
    1616  $datas = array(
  • extensions/PWG_Stuffs/trunk/modules/Personal/config.inc.php

    r9601 r9737  
    66
    77// Enregistrement de la configuration
    8 if (isset($_POST['submit']) and !is_adviser()) {
     8if (isset($_POST['submit'])) {
    99  $datas = stripslashes($_POST['personal_content']);
    1010}
  • extensions/PWG_Stuffs/trunk/modules/Random/config.inc.php

    r9410 r9737  
    1212
    1313// Enregistrement de la configuration
    14 if (isset($_POST['submit']) and !is_adviser())
     14if (isset($_POST['submit']))
    1515{
    1616  $datas = array(
  • extensions/PWG_Stuffs/trunk/modules/Recent/config.inc.php

    r9410 r9737  
    1212
    1313// Enregistrement de la configuration
    14 if (isset($_POST['submit']) and !is_adviser())
     14if (isset($_POST['submit']))
    1515{
    1616  $datas = array(
  • extensions/PWG_Stuffs/trunk/modules/Tags/config.inc.php

    r3609 r9737  
    55
    66// Enregistrement de la configuration
    7 if (isset($_POST['submit']) and !is_adviser())
     7if (isset($_POST['submit']))
    88{
    99  $datas = array($_POST['tag_display']);
  • extensions/PWG_Stuffs/trunk/theme/stuffs_index.css

    r5727 r9737  
    1111}
    1212
    13 .stuffs {
     13#the_page .stuffs {
    1414  margin: 0 0 1em;
    1515  overflow: hidden;
    1616}
    1717
    18 .right_block {
     18#the_page .right_block {
    1919  float: right;
    2020  margin: 0 0 0 1em;
    2121}
    2222
    23 .left_block {
     23#the_page .left_block {
    2424  float: left;
    2525  margin: 0 1em 0 0;
    2626}
    2727
    28 .middle_block {
     28#the_page .middle_block {
    2929  overflow: hidden;
    3030  margin: auto;
  • extensions/PWG_Stuffs/trunk/theme/template/stuffs_blocks.tpl

    r5727 r9737  
    99        {if !empty($block.U_EDIT)}
    1010        <ul class="categoryActions">
    11           <li><a href="{$block.U_EDIT}" title="{'edit'|@translate}"><img src="{$ROOT_URL}{$themeconf.icon_dir}/category_edit.png" class="button" alt="{'edit'|@translate}"/></a></li>
     11          <li><a href="{$block.U_EDIT}" title="{'edit'|@translate}" class="pwg-state-default pwg-button">
     12            <span class="pwg-icon pwg-icon-category-edit"> </span><span class="pwg-button-text">{'edit'|@translate}</span>
     13                        </a></li>
    1214        </ul>
    1315        {/if}
  • extensions/PWG_Stuffs/trunk/theme/template/stuffs_lastcoms.tpl

    r5727 r9737  
    1414    <div class="description">
    1515      {if isset($comment.U_DELETE) or isset($comment.U_VALIDATE) }
    16       <ul class="actions" style="float:right">
     16      <div class="actions" style="float:right">
    1717        {if !empty($comment.U_DELETE)}
    18         <li>
    19           <a href="{$comment.U_DELETE}" title="{'delete this comment'|@translate}">
     18          <a href="{$comment.U_DELETE}" title="{'delete this comment'|@translate}" onClick="return confirm('{'Are you sure?'|@translate|@escape:'javascript'}');">
    2019            <img src="{$ROOT_URL}{$themeconf.icon_dir}/delete.png" class="button" alt="[delete]" />
    2120          </a>
    22         </li>
    2321        {/if}
    2422        {if !empty($comment.U_VALIDATE)}
    25         <li>
    2623          <a href="{$comment.U_VALIDATE}" title="validate this comment">
    2724            <img src="{$ROOT_URL}{$themeconf.icon_dir}/validate_s.png" class="button" alt="[validate]" />
    2825          </a>
    29         </li>
    3026        {/if}
    31       </ul>
     27      </div>
    3228      {/if}
    3329      <span class="author">{$comment.AUTHOR}</span> - <span class="date">{$comment.DATE}</span>
  • extensions/PWG_Stuffs/trunk/theme/template/stuffs_thumbnails.tpl

    r9581 r9737  
    11{assign var='thumbnails' value=$block.thumbnails}
     2<ul class="thumbnails" id="thumbnails">
    23{include file='thumbnails.tpl'|@get_extent:'index_thumbnails'}
     4</ul>
Note: See TracChangeset for help on using the changeset viewer.