Changeset 30429 for extensions


Ignore:
Timestamp:
Nov 11, 2014, 7:24:52 PM (10 years ago)
Author:
ddtddt
Message:

[extensions] - see_photos_by_user use new url

Location:
extensions/see_photos_by_user
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • extensions/see_photos_by_user/admin.php

    r30415 r30429  
    2323            'SPBU5' => $conf['see_photos_by_user_color'],
    2424            'SPBU6' => $conf['see_photos_by_user_show_user_home'],
     25            'SPBU7' => $conf['see_photos_by_user_shape'],
    2526            'SPBA_PATH2'=> get_root_url() . SPBA_PATH,
    2627        )
     
    6061
    6162$SPBU4T2 = array(
    62     l10n('nothing'),
     63  //  l10n('nothing'),
    6364    l10n('users cloud'),
    6465    l10n('cumulus users cloud'),
     
    6768
    6869$SPBU42 = array(
    69     '-1',
     70  //  '-1',
    7071    '1',
    7172    '2',
     
    7576$template->assign('spbu6', $SPBU42);
    7677$template->assign('spbuT6', $SPBU4T2);
     78
     79$SPBU7 = array(
     80    'sphere',
     81    'vcylinder',
     82    'hcylinder',
     83    'vring',
     84    'hring',
     85);
     86
     87$SPBUT7 = array(
     88    l10n('sphere'),
     89    l10n('vertical cylinder'),
     90    l10n('horizontal cylinder'),
     91    l10n('vertical ring'),
     92    l10n('horizontal ring'),
     93);
     94
     95$template->assign('spbu7', $SPBU7);
     96$template->assign('spbuT7', $SPBUT7);
    7797
    7898if (isset($_POST['submitspbu'])) {
     
    91111    conf_update_param('see_photos_by_user_color', $_POST['insspbu5']);
    92112    conf_update_param('see_photos_by_user_show_user_home', $_POST['insspbu6']);
    93 
     113    conf_update_param('see_photos_by_user_shape', $_POST['insspbu7']);
    94114    if (!$page['errors']) {
    95115        array_push($page['infos'], l10n('Update Complete'));
     
    104124                'SPBU5' => stripslashes($_POST['insspbu5']),
    105125                'SPBU6' => stripslashes($_POST['insspbu6']),
     126                'SPBU7' => stripslashes($_POST['insspbu7']),
    106127            )
    107128    );
    108129}
    109130
    110 $template->set_filenames(array('plugin_admin_content' => dirname(__FILE__) . '/admin.tpl'));
    111 $template->assign_var_from_handle('ADMIN_CONTENT', 'plugin_admin_content');
     131$template->set_filenames(array('plugin_admin_content' => dirname(__FILE__).'/admin.tpl'));
     132$template->assign_var_from_handle('ADMIN_CONTENT','plugin_admin_content');
    112133?>
  • extensions/see_photos_by_user/admin.tpl

    r30415 r30429  
     1{combine_script id='jquery.ui.slider' require='jquery.ui' load='footer' path='themes/default/js/ui/minified/jquery.ui.slider.min.js'}
     2{combine_css path="themes/default/js/ui/theme/jquery.ui.slider.css"}
    13{combine_script id="farbtastic" load='footer' require="jquery" path=$SPBA_PATH2|@cat:"js/farbtastic/farbtastic.js"}
    24{combine_css path=$SPBA_PATH2|@cat:"js/farbtastic/farbtastic.css"}
     5
    36{footer_script}
    4 // init colorpicker
    5 jQuery('#colorpicker').farbtastic('#hexval');
     7jQuery(function($) {
     8// slide
     9    $('.range').each(function(){
     10        var cls=$(this).attr('class');
     11        var elem=$(this).parent();
     12        var input=elem.find('input');
     13        var options={};
     14        elem.append('<div class="uirange"></div>');
     15        options.slide=function(event,ui){
     16            elem.find('label span').empty().append(ui.value);
     17            input.val(ui.value);
     18        }
     19        options.value=input.val();
     20        options.range='min';
     21        options.min=$(this).data('min');
     22        options.max=$(this).data('max');
     23        elem.find('.uirange').slider(options);
     24        elem.find('label span').empty().append(input.val());
     25        input.hide();
     26    });
     27   
     28// schow option cumulus if option is select
     29    $("input[name=insspbu6]:checked").each(function(){
     30        if($(this).val()==2){
     31            $('.optionseecolor').show();
     32        }
     33   });
     34
     35   $("input[name=insspbu6]").change(function(){
     36        if($(this).attr("value")==2){
     37            $('.optionseecolor').show();
     38        }else{
     39            $('.optionseecolor').hide();
     40        }
     41   });
     42
     43   // init colorpicker
     44    $('#colorpicker').farbtastic('#hexval');
     45   
     46});
    647{/footer_script}
     48
     49{html_style}
     50.uirange{
     51    margin:10px;
     52    margin-left: 40px;
     53}
     54{/html_style}
    755
    856<div class="titrePage">
     
    1159
    1260<form method="post">
    13     <p>
    14         <strong>{'Minimal number photos for show users'|@translate}</strong>
    15         <input type="text" name="insspbu1" value="{$SPBU1}" size="10" maxlength="10">
     61 <fieldset>
     62  <legend>{'Configuration'|translate}</legend>
     63    <p class="input" style="width: 700px;">
     64        <label for="range"><strong>{'Minimal number photos for show users'|@translate} </strong><span></span></label>
     65        <input type="text" name="insspbu1" data-min="0" data-max="1000" class="range" value="{$SPBU1}"/>
    1666    </p>
    17     <p>
    18         <strong>{'Maximal number users'|@translate}</strong>
    19         <input type="text" name="insspbu2" value="{$SPBU2}" size="10" maxlength="10">
     67    <p class="input" style="width: 700px;">
     68        <label for="range"><strong>{'Maximal number users'|@translate} </strong><span></span></label>
     69        <input type="text" name="insspbu2" data-min="10" data-max="1000" class="range" value="{$SPBU2}"/>
    2070    </p>
    2171    <p>
     
    2575    <p>
    2676        <strong>{'Show menu'|@translate}</strong>
    27         {html_radios name="insspbu4" values=$spbu2 output=$spbuT2 selected="{$SPBU4}"}
     77        <div style="padding-left: 100px">{html_radios separator="<br />" name="insspbu4" values=$spbu2 output=$spbuT2 selected="{$SPBU4}"}</div>
    2878    </p>
    2979    <p>
    30         <strong>{'Show home page users'|@translate}</strong>
    31         {html_radios name="insspbu6" values=$spbu6 output=$spbuT6 selected="{$SPBU6}"}
     80        <strong>{'Show home page users'|@translate}</strong><br />
     81    <div id="optionsee6" style="padding-left: 100px">{html_radios separator="<br />" style="padding:15px" name="insspbu6" values=$spbu6 output=$spbuT6 selected="{$SPBU6}"}</div>
    3282    </p>
    33     <p>
    34         <span id="colorpicker"></span>
    35         <input type="text" id="hexval" readonly title='{'You must use colorpicker'|@translate}' name="insspbu5" value="{$SPBU5}" size="7" maxlength="7">
    36     </p>
    37    
     83    <div class="optionseecolor" style="display: none">
     84        <p>
     85            <strong>{'Choose a color'|@translate}</strong><br />
     86            <span id="colorpicker"></span>
     87            <input type="text" id="hexval" readonly title='{'You must use colorpicker'|@translate}' name="insspbu5" value="{$SPBU5}" size="7" maxlength="7">
     88        </p>
     89        <p class="optionseecolor" style="display: none">
     90            <strong>{'Choose a presentation'|@translate}</strong><br />
     91            {html_options name="insspbu7" values=$spbu7 output=$spbuT7 selected="{$SPBU7}"}
     92        </p>
     93    </div>
    3894    <p>
    3995        <input class="submit" type="submit" name="submitspbu" value="{'Submit'|@translate}">
    4096    </p>
     97 </fieldset>
    4198</form>
    4299   
  • extensions/see_photos_by_user/js/see.js

    r30403 r30429  
    33var textcolor;
    44var outline;
     5var shapesee;
    56$('.seepbu').each(function(){
    67   
     
    1415    }*/
    1516   
     17    var col=$("body").css('color');
     18    shapesee=$(this).data('shape');
     19       
    1620    var color = $(this).data('color');
    17     console.log(color);
    18     textcolor = color;
    19     outline =color;
     21        if(color!=''){
     22            col=color
     23        }
     24    textcolor = col;
     25    outline =col;
    2026   
    2127});
    2228 
    2329if( ! $('#myCanvas').tagcanvas({
     30    shape: shapesee,
    2431    textColour: textcolor,
    2532    outlineColour: outline,
     
    2936    depth : 0.75
    3037    //dragControl:true,
    31     //shape: "sphere"
     38   
    3239  })) {
    3340    // TagCanvas failed to load
    3441    $('#myCanvasContainer').hide();
    3542  }
     43
     44       $("input[name=insspbu6]").each(function(){
     45        if($(this).attr("value")==2){
     46            $('.optionseecolor').show();
     47        }else{
     48            $('.optionseecolor').hide();
     49        }
     50   });
     51 
     52 
    3653});
    3754
  • extensions/see_photos_by_user/language/en_UK/plugin.lang.php

    r30415 r30429  
    2222$lang['Show menu'] = 'Show menu';
    2323$lang['Show home page users'] = 'Show home page user';
     24$lang['Choose a color'] = 'Choose a color';
     25$lang['Choose a presentation'] = 'Choose a presentation';
     26$lang['sphere'] = 'sphere';
     27$lang['vertical cylinder'] = 'vertical cylinder';
     28$lang['horizontal cylinder'] = 'horizontal cylinder';
     29$lang['vertical ring'] = 'vertical ring';
     30$lang['horizontal ring'] = 'horizontal ring';
     31
    2432?>
  • extensions/see_photos_by_user/language/fr_FR/plugin.lang.php

    r30415 r30429  
    2121$lang['users cloud'] = 'nuage d\'utilisateurs';
    2222$lang['cumulus users cloud'] = 'nuage animé d\'utilisateurs';
    23 $lang['Show menu'] = 'Montrer menu';
    24 $lang['Show home page users'] = 'Montrer sur la page d\'accueil des utilisateurs';
     23$lang['Show menu'] = 'Afficher dans le menu';
     24$lang['Show home page users'] = 'Afficher sur la page d\'accueil des utilisateurs';
     25$lang['Choose a color'] = 'Choisir une couleur';
     26$lang['Choose a presentation'] = 'Choisir le type de presentation';
     27$lang['sphere'] = 'sphere';
     28$lang['vertical cylinder'] = 'cylindre vertical';
     29$lang['horizontal cylinder'] = 'cylindre horizontal';
     30$lang['vertical ring'] = 'anneau vertical';
     31$lang['horizontal ring'] = 'anneau horizontal';
    2532?>
  • extensions/see_photos_by_user/main.inc.php

    r30415 r30429  
    1515define('SPBA_DIR', basename(dirname(__FILE__)));
    1616define('SPBA_PATH', PHPWG_PLUGINS_PATH . SPBA_DIR . '/');
     17define('SPBA_ADMIN',get_root_url().'admin.php?page=plugin-'.SPBA_DIR);
    1718load_language('plugin.lang', SPBA_PATH);
    1819
     
    136137
    137138function SPBA_admin_menu($menu) {
    138     load_language('plugin.lang', SPBA_PATH);
     139    /*load_language('plugin.lang', SPBA_PATH);
    139140    array_push(
    140141            $menu, array(
     
    142143        'URL' => get_admin_plugin_menu_link(SPBA_PATH . 'admin.php')
    143144            )
     145    );*/
     146    load_language('plugin.lang', SPBA_PATH);
     147    $menu[] = array(
     148    'NAME' => l10n('Photos by user'),
     149    'URL' => SPBA_ADMIN,
    144150    );
    145151
     152 
    146153    return $menu;
    147154}
  • extensions/see_photos_by_user/maintain.class.php

    r30424 r30429  
    4242        conf_update_param('see_photos_by_user_color', '#ffffff',true);
    4343    }
     44    if (!isset($conf['see_photos_by_user_shape'])) {
     45        conf_update_param('see_photos_by_user_shape', 'sphere',true);
     46    }
    4447  }
    4548 
  • extensions/see_photos_by_user/pagespba.php

    r30415 r30429  
    8181                'USERSSPBYLC' => $userslistecloud['PBU'],
    8282                'USERSSPBYCOLOR' => $conf['see_photos_by_user_color'],
     83                'USERSSPBYSHAPE' => $conf['see_photos_by_user_shape'],
    8384                'USERSSPBYWEIGHT' => $wheight,
    8485            );
  • extensions/see_photos_by_user/pagespba.tpl

    r30415 r30429  
    1818    {foreach from=$userslistecloud1 item=userslistecloud}
    1919        <li>
    20             <a href = "{$USERSSPBY}{$userslistecloud.USERSSPBYLID}-{$userslistecloud.USERSSPBYL}">{$userslistecloud.USERSSPBYL} <span data-color="{$userslistecloud.USERSSPBYCOLOR}" data-weight="{$userslistecloud.USERSSPBYLC}" class="menuInfoCat seepbu">[{$userslistecloud.USERSSPBYLC}]</span></a><br>
     20            <a href = "{$USERSSPBY}{$userslistecloud.USERSSPBYLID}-{$userslistecloud.USERSSPBYL}">{$userslistecloud.USERSSPBYL} <span data-shape="{$userslistecloud.USERSSPBYSHAPE}" data-color="{$userslistecloud.USERSSPBYCOLOR}" data-weight="{$userslistecloud.USERSSPBYLC}" class="menuInfoCat seepbu">[{$userslistecloud.USERSSPBYLC}]</span></a><br>
    2121        </li>
    2222     {/foreach}
     
    2929<div id="fullTagCloud">
    3030  {foreach from=$userslistecloud1 item=userslistecloud}
    31       <span><a class="tagLevel{$userslistecloud.USERSSPBYWEIGHT}" style="color:{$userslistecloud.USERSSPBYCOLOR}" href = "{$USERSSPBY}{$userslistecloud.USERSSPBYLID}-{$userslistecloud.USERSSPBYL}">{$userslistecloud.USERSSPBYL}</a></span>
     31      <span><a class="tagLevel{$userslistecloud.USERSSPBYWEIGHT}" href = "{$USERSSPBY}{$userslistecloud.USERSSPBYLID}-{$userslistecloud.USERSSPBYL}" title="[{$userslistecloud.USERSSPBYLC}]">{$userslistecloud.USERSSPBYL}</a></span>
    3232  {/foreach}
    3333</div>
Note: See TracChangeset for help on using the changeset viewer.