Changeset 6515 for extensions/rightClick
- Timestamp:
- Jun 10, 2010, 9:43:05 PM (14 years ago)
- Location:
- extensions/rightClick
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/rightClick/language/en_UK/description.txt
r6502 r6515 1 1 rightClick deactivates the context menu on websized pictures and more. 2 Picture page, akBookStyle, Lightbox, HD Shadowbox and photoWidget are protected by default. 3 Other valid jQuery selectors could be added to the default list. 2 Picture page, akBookStyle, Lightbox and HD Shadowbox are protected by default. 4 3 By default, webmaster and administors keep the right-click available. 5 4 6 Context menus are disable on main browsers. 7 Please, remind that rightClick is not a full secured solution against image copy. 5 Please, remind that rightClick is not a full secured solution against image copy. -
extensions/rightClick/language/fr_FR/description.txt
r6502 r6515 1 1 rightClick désactive le menu contextuel sur les images de taille web et plus encore. 2 La page Picture, akBookStyle, Lightbox, HD Shadowbox et photoWidget sont protégés par défaut. 3 Tout autre selecteur jQuery valide pourrait être ajouté à cette liste par défaut. 2 La page Picture, akBookStyle, Lightbox et HD Shadowbox sont protégés par défaut. 4 3 Par défaut encore, le webmaster et les administeurs conservent l'usage du clic-droit. 5 4 6 Les menus contextuels sont désactivés sur les principaux navigateurs.7 5 Merci de garder à l'esprit que rightClick n'est pas une sécurité totale contre la copie des images. -
extensions/rightClick/main.inc.php
r6502 r6515 2 2 /* 3 3 Plugin Name: rightClick 4 Version: 2.1. a4 Version: 2.1.b 5 5 Description: rightClick deactivates the context menu on websized pictures and more. 6 6 Plugin URI: http://piwigo.org/ext/extension_view.php?eid=401 … … 12 12 define('RIGHTCK_DIR' , basename(dirname(__FILE__))); 13 13 define('RIGHTCK_PATH' , PHPWG_PLUGINS_PATH . RIGHTCK_DIR . '/'); 14 define('RIGHTCK_VER' , '2.1. a');14 define('RIGHTCK_VER' , '2.1.b'); 15 15 include_once( RIGHTCK_PATH . 'rightClick_protect.php'); 16 16 ?> -
extensions/rightClick/rightClick_protect.php
r6502 r6515 9 9 function rightClick_protect() { 10 10 global $template, $user, $conf; 11 if (!isset($conf['rightClick_level'])) list ($Maxlvl) = array_slice($conf['available_permission_levels'],-1);11 if (!isset($conf['rightClick_level'])) $Maxlvl = max($conf['available_permission_levels']); 12 12 else $Maxlvl = $conf['rightClick_level']; 13 13 if ($user['level'] >= $Maxlvl) return; 14 $default = array( '#theImage img', '# photoWidget', 'img#akPicture', 'img#cboxPhoto', 'img#sb-body-inner', );14 $default = array( '#theImage img', '#akPicture', '#colorbox', '#sb-container', ); 15 15 if (!isset($conf['rightClick_selectors'])) $conf['rightClick_selectors'] = array(); 16 $conf['rightClick_selectors'] = array_unique( $default + $conf['rightClick_selectors']);16 $conf['rightClick_selectors'] = array_unique( array_merge($default, $conf['rightClick_selectors']) ); 17 17 18 18 $template->set_filenames(array( -
extensions/rightClick/template/rightClick_protect.tpl
r6502 r6515 1 1 {known_script id="jquery" src=$ROOT_URL|cat:"themes/default/js/jquery.packed.js"} 2 2 {html_head} 3 <!-- Pro vided informationby the "rightClick" plugin (version {$RIGHTCK.Version}): {$RIGHTCK.Dir}/template/rightClick_protect.tpl -->3 <!-- Protected images by the "rightClick" plugin (version {$RIGHTCK.Version}): {$RIGHTCK.Dir}/template/rightClick_protect.tpl --> 4 4 <script type="text/javascript"> 5 jQuery.noConflict(); 6 jQuery(document).ready(function($) {*Smarty*}{ldelim} 7 {*Smarty*}{foreach item=selector from=$RIGHTCK.Selectors name=select} 8 $({*Smarty*}'{$selector}').addClass('rightClick'); 9 {*Smarty*}{/foreach} 10 $(".rightClick").each( function() {*Smarty*}{ldelim} 11 $(this)[0].oncontextmenu = function() {*Smarty*}{ldelim} 5 jQuery(document).ready(function($) {ldelim} 6 {foreach item=selector from=$RIGHTCK.Selectors name=select} 7 $('{$selector}').each( function() {ldelim} 8 $(this)[0].oncontextmenu = function() {ldelim} 12 9 return false; 13 10 } 14 }); 11 }); 12 {/foreach} 15 13 }); 16 14 </script>
Note: See TracChangeset
for help on using the changeset viewer.