Changeset 30429 for extensions/see_photos_by_user
- Timestamp:
- Nov 11, 2014, 7:24:52 PM (10 years ago)
- Location:
- extensions/see_photos_by_user
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/see_photos_by_user/admin.php
r30415 r30429 23 23 'SPBU5' => $conf['see_photos_by_user_color'], 24 24 'SPBU6' => $conf['see_photos_by_user_show_user_home'], 25 'SPBU7' => $conf['see_photos_by_user_shape'], 25 26 'SPBA_PATH2'=> get_root_url() . SPBA_PATH, 26 27 ) … … 60 61 61 62 $SPBU4T2 = array( 62 l10n('nothing'),63 // l10n('nothing'), 63 64 l10n('users cloud'), 64 65 l10n('cumulus users cloud'), … … 67 68 68 69 $SPBU42 = array( 69 '-1',70 // '-1', 70 71 '1', 71 72 '2', … … 75 76 $template->assign('spbu6', $SPBU42); 76 77 $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); 77 97 78 98 if (isset($_POST['submitspbu'])) { … … 91 111 conf_update_param('see_photos_by_user_color', $_POST['insspbu5']); 92 112 conf_update_param('see_photos_by_user_show_user_home', $_POST['insspbu6']); 93 113 conf_update_param('see_photos_by_user_shape', $_POST['insspbu7']); 94 114 if (!$page['errors']) { 95 115 array_push($page['infos'], l10n('Update Complete')); … … 104 124 'SPBU5' => stripslashes($_POST['insspbu5']), 105 125 'SPBU6' => stripslashes($_POST['insspbu6']), 126 'SPBU7' => stripslashes($_POST['insspbu7']), 106 127 ) 107 128 ); 108 129 } 109 130 110 $template->set_filenames(array('plugin_admin_content' => dirname(__FILE__) .'/admin.tpl'));111 $template->assign_var_from_handle('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'); 112 133 ?> -
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"} 1 3 {combine_script id="farbtastic" load='footer' require="jquery" path=$SPBA_PATH2|@cat:"js/farbtastic/farbtastic.js"} 2 4 {combine_css path=$SPBA_PATH2|@cat:"js/farbtastic/farbtastic.css"} 5 3 6 {footer_script} 4 // init colorpicker 5 jQuery('#colorpicker').farbtastic('#hexval'); 7 jQuery(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 }); 6 47 {/footer_script} 48 49 {html_style} 50 .uirange{ 51 margin:10px; 52 margin-left: 40px; 53 } 54 {/html_style} 7 55 8 56 <div class="titrePage"> … … 11 59 12 60 <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}"/> 16 66 </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}"/> 20 70 </p> 21 71 <p> … … 25 75 <p> 26 76 <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> 28 78 </p> 29 79 <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> 32 82 </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> 38 94 <p> 39 95 <input class="submit" type="submit" name="submitspbu" value="{'Submit'|@translate}"> 40 96 </p> 97 </fieldset> 41 98 </form> 42 99 -
extensions/see_photos_by_user/js/see.js
r30403 r30429 3 3 var textcolor; 4 4 var outline; 5 var shapesee; 5 6 $('.seepbu').each(function(){ 6 7 … … 14 15 }*/ 15 16 17 var col=$("body").css('color'); 18 shapesee=$(this).data('shape'); 19 16 20 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; 20 26 21 27 }); 22 28 23 29 if( ! $('#myCanvas').tagcanvas({ 30 shape: shapesee, 24 31 textColour: textcolor, 25 32 outlineColour: outline, … … 29 36 depth : 0.75 30 37 //dragControl:true, 31 //shape: "sphere"38 32 39 })) { 33 40 // TagCanvas failed to load 34 41 $('#myCanvasContainer').hide(); 35 42 } 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 36 53 }); 37 54 -
extensions/see_photos_by_user/language/en_UK/plugin.lang.php
r30415 r30429 22 22 $lang['Show menu'] = 'Show menu'; 23 23 $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 24 32 ?> -
extensions/see_photos_by_user/language/fr_FR/plugin.lang.php
r30415 r30429 21 21 $lang['users cloud'] = 'nuage d\'utilisateurs'; 22 22 $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'; 25 32 ?> -
extensions/see_photos_by_user/main.inc.php
r30415 r30429 15 15 define('SPBA_DIR', basename(dirname(__FILE__))); 16 16 define('SPBA_PATH', PHPWG_PLUGINS_PATH . SPBA_DIR . '/'); 17 define('SPBA_ADMIN',get_root_url().'admin.php?page=plugin-'.SPBA_DIR); 17 18 load_language('plugin.lang', SPBA_PATH); 18 19 … … 136 137 137 138 function SPBA_admin_menu($menu) { 138 load_language('plugin.lang', SPBA_PATH);139 /*load_language('plugin.lang', SPBA_PATH); 139 140 array_push( 140 141 $menu, array( … … 142 143 'URL' => get_admin_plugin_menu_link(SPBA_PATH . 'admin.php') 143 144 ) 145 );*/ 146 load_language('plugin.lang', SPBA_PATH); 147 $menu[] = array( 148 'NAME' => l10n('Photos by user'), 149 'URL' => SPBA_ADMIN, 144 150 ); 145 151 152 146 153 return $menu; 147 154 } -
extensions/see_photos_by_user/maintain.class.php
r30424 r30429 42 42 conf_update_param('see_photos_by_user_color', '#ffffff',true); 43 43 } 44 if (!isset($conf['see_photos_by_user_shape'])) { 45 conf_update_param('see_photos_by_user_shape', 'sphere',true); 46 } 44 47 } 45 48 -
extensions/see_photos_by_user/pagespba.php
r30415 r30429 81 81 'USERSSPBYLC' => $userslistecloud['PBU'], 82 82 'USERSSPBYCOLOR' => $conf['see_photos_by_user_color'], 83 'USERSSPBYSHAPE' => $conf['see_photos_by_user_shape'], 83 84 'USERSSPBYWEIGHT' => $wheight, 84 85 ); -
extensions/see_photos_by_user/pagespba.tpl
r30415 r30429 18 18 {foreach from=$userslistecloud1 item=userslistecloud} 19 19 <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> 21 21 </li> 22 22 {/foreach} … … 29 29 <div id="fullTagCloud"> 30 30 {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> 32 32 {/foreach} 33 33 </div>
Note: See TracChangeset
for help on using the changeset viewer.