Changeset 19811
- Timestamp:
- Jan 4, 2013, 10:49:31 PM (12 years ago)
- Location:
- extensions/pdf2tab
- Files:
-
- 11 added
- 1 deleted
- 14 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/pdf2tab/include/picture.inc.php
r19673 r19811 5 5 6 6 function pdf2tab_add_links_picture($content, $element_info) { 7 include_once('constants.inc.php'); 8 9 if (in_array(strtolower(substr(strrchr($element_info['file'], "."),1)), $supported_extensions)) { 7 global $conf; 8 9 $conf_pdf2tab = unserialize($conf['pdf2tab']); 10 11 if (in_array(strtolower(substr(strrchr($element_info['file'], "."),1)), $conf_pdf2tab['extensions'])) { 10 12 $content = pdf2tab_add_link_image($content, $element_info); 11 13 $content = pdf2tab_add_link_beside_image($content, $element_info); … … 17 19 function pdf2tab_add_link_image($content, $element_info) { 18 20 preg_match('/<\s*img\s+[^>]*?src\s*=\s*(\'|\")(.*?)\\1[^>]*?\/?\s*>/i',$content,$match); 19 $content = str_replace($match[0],'<a href="'.$element_info['element_url'].'" target="_blank" title="'.l10n(' Open the file in a new tab').'">'.$match[0].'</a>',$content);21 $content = str_replace($match[0],'<a href="'.$element_info['element_url'].'" target="_blank" title="'.l10n('pdf2tab_tooltip').'">'.$match[0].'</a>',$content); 20 22 21 23 return $content; … … 23 25 24 26 function pdf2tab_add_link_beside_image($content, $element_info) { 25 $content .= '<p class="imageComment"><a href="'.$element_info['element_url'].'" target="_blank" title="'.l10n(' Open the file in a new tab').'">'.l10n('Open the file in a new tab').'</a>';27 $content .= '<p class="imageComment"><a href="'.$element_info['element_url'].'" target="_blank" title="'.l10n('pdf2tab_tooltip').'">'.l10n('pdf2tab_tooltip').'</a>'; 26 28 27 29 return $content; -
extensions/pdf2tab/include/thumbnails.inc.php
r19674 r19811 5 5 6 6 function pdf2tab_thumbnails($tpl_thumbnails_var) { 7 global $template; 8 include_once('constants.inc.php'); 7 global $template, $conf; 8 9 $conf_pdf2tab = unserialize($conf['pdf2tab']); 9 10 10 11 $template->set_prefilter('index_thumbnails', 'pdf2tab_add_tag_thumbnails'); 11 12 12 $template->assign('pdf2tab_supported_extensions', $ supported_extensions);13 $template->assign('pdf2tab_supported_extensions', $conf_pdf2tab['extensions']); 13 14 $template->set_filename('pdf2tab_template_thumbnails', PDF2TAB_ABSOLUTE_PATH.'template/thumbnails.tpl'); 14 15 $template->concat('PLUGIN_INDEX_CONTENT_END', $template->parse('pdf2tab_template_thumbnails', true)); -
extensions/pdf2tab/language/da_DK/plugin.lang.php
r19673 r19811 21 21 // | USA. | 22 22 // +-----------------------------------------------------------------------+ 23 $lang[' Open the file in a new tab'] = 'Åbn filen i et nyt faneblad';23 $lang['pdf2tab_tooltip'] = 'Åbn filen i et nyt faneblad'; 24 24 ?> -
extensions/pdf2tab/language/de_DE/plugin.lang.php
r19673 r19811 21 21 // | USA. | 22 22 // +-----------------------------------------------------------------------+ 23 $lang[' Open the file in a new tab'] = 'Öffne die Datei in einem neuen Tab';23 $lang['pdf2tab_tooltip'] = 'Öffne die Datei in einem neuen Tab'; 24 24 ?> -
extensions/pdf2tab/language/el_GR/plugin.lang.php
r19673 r19811 21 21 // | USA. | 22 22 // +-----------------------------------------------------------------------+ 23 $lang[' Open the file in a new tab'] = 'Ανοίξτε το αρχείο σε μια νέα καρτέλα';23 $lang['pdf2tab_tooltip'] = 'Ανοίξτε το αρχείο σε μια νέα καρτέλα'; 24 24 ?> -
extensions/pdf2tab/language/en_UK/plugin.lang.php
r19673 r19811 1 1 <?php 2 2 //picture.php 3 $lang['Open the file in a new tab'] = 'Open the file in a new tab'; 3 $lang['pdf2tab_tooltip'] = 'Open the file in a new tab'; 4 5 //admin_config.php 6 $lang['pdf2tab_name'] = 'PDF2Tab Plugin'; 7 $lang['pdf2tab_configuration'] = 'Configuration'; 8 $lang['pdf2tab_supported_extensions_description'] = 'Type in the extensions PDF2Tab will handle.'; 9 $lang['pdf2tab_hint_text'] = 'Type in an extension'; 4 10 ?> -
extensions/pdf2tab/language/es_ES/plugin.lang.php
r19673 r19811 1 1 <?php 2 2 //picture.php 3 $lang[' Open the file in a new tab'] = 'Abrir el archivo en una nueva pestaña';3 $lang['pdf2tab_tooltip'] = 'Abrir el archivo en una nueva pestaña'; 4 4 ?> -
extensions/pdf2tab/language/fr_FR/plugin.lang.php
r19673 r19811 1 1 <?php 2 2 //picture.php 3 $lang['Open the file in a new tab'] = 'Ouvrir le fichier dans un nouvel onglet'; 3 $lang['pdf2tab_tooltip'] = 'Ouvrir le fichier dans un nouvel onglet'; 4 5 //admin_config.php 6 $lang['pdf2tab_name'] = 'Plugin PDF2Tab'; 7 $lang['pdf2tab_configuration'] = 'Configuration'; 8 $lang['pdf2tab_supported_extensions_description'] = 'Entrer les extensions que PDF2Tab prendra en charge.'; 9 $lang['pdf2tab_hint_text'] = 'Entrer une extension'; 4 10 ?> -
extensions/pdf2tab/language/it_IT/plugin.lang.php
r19793 r19811 21 21 // | USA. | 22 22 // +-----------------------------------------------------------------------+ 23 $lang[' Open the file in a new tab'] = 'Apri il file in una nuova scheda';23 $lang['pdf2tab_tooltip'] = 'Apri il file in una nuova scheda'; 24 24 ?> -
extensions/pdf2tab/language/lv_LV/plugin.lang.php
r19673 r19811 21 21 // | USA. | 22 22 // +-----------------------------------------------------------------------+ 23 $lang[' Open the file in a new tab'] = 'Atvērt failu jaunā cilnē';23 $lang['pdf2tab_tooltip'] = 'Atvērt failu jaunā cilnē'; 24 24 ?> -
extensions/pdf2tab/language/tr_TR/plugin.lang.php
r19673 r19811 21 21 // | USA. | 22 22 // +-----------------------------------------------------------------------+ 23 $lang[' Open the file in a new tab'] = 'Dosyayı yeni bir sekmede aç';23 $lang['pdf2tab_tooltip'] = 'Dosyayı yeni bir sekmede aç'; 24 24 ?> -
extensions/pdf2tab/main.inc.php
r19673 r19811 2 2 /* 3 3 Plugin Name: pdf2tab 4 Version: auto4 Version: 2.4.e 5 5 Description: open pdf files in new tab instead of downloading it 6 Plugin URI: http:// fr.piwigo.org/ext/extension_view.php?eid=6556 Plugin URI: http://piwigo.org/ext/extension_view.php?eid=655 7 7 Author: Julien1311 8 8 */ … … 14 14 define('PDF2TAB_DIR' , basename(dirname(__FILE__))); 15 15 define('PDF2TAB_PATH' , PHPWG_PLUGINS_PATH.PDF2TAB_DIR.'/'); 16 define('PDF2TAB_ADMIN' , get_root_url() . 'admin.php?page=plugin-'.PDF2TAB_DIR); 16 17 18 /* +-----------------------------------------------------------------------+ 19 * | Plugin admin | 20 * +-----------------------------------------------------------------------+ */ 21 22 // Add an entry to the plugins menu 23 add_event_handler('get_admin_plugin_menu_links', 'pdf2tab_admin_menu'); 24 25 function pdf2tab_admin_menu($menu) { 26 array_push($menu, array( 27 'NAME' => 'PDF2Tab', 28 'URL' => PDF2TAB_ADMIN, 29 ) 30 ); 31 return $menu; 32 } 17 33 18 34 /* +-----------------------------------------------------------------------+ 19 35 * | Plugin code | 20 36 * +-----------------------------------------------------------------------+ */ 21 37 22 38 include_once(PDF2TAB_PATH.'include/thumbnails.inc.php'); 23 39 include_once(PDF2TAB_PATH.'include/picture.inc.php'); 40 41 add_event_handler('loc_begin_admin_page', 'pdf2tab_css'); 42 43 function pdf2tab_css() { 44 global $template, $conf; 45 46 //add a stylesheet 47 $template->append('head_elements', '<link rel="stylesheet" type="text/css" href="'.PDF2TAB_PATH.'css/admin.css">'); 48 } 24 49 ?> -
extensions/pdf2tab/maintain.inc.php
r19673 r19811 3 3 4 4 function plugin_install() { 5 5 include_once(dirname(__FILE__).'/install/functions.inc.php'); 6 include_once(dirname(__FILE__).'/install/config_default.inc.php'); 7 8 pdf2tab_install($config_default); 6 9 } 7 10 8 11 function plugin_activate() { 9 12 include_once(dirname(__FILE__).'/install/functions.inc.php'); 13 14 pdf2tab_update_db(); 10 15 } 11 16 12 17 function plugin_uninstall() { 13 18 include_once(dirname(__FILE__).'/install/functions.inc.php'); 19 20 pdf2tab_delete_conf("pdf2tab"); 14 21 } 22 15 23 ?> -
extensions/pdf2tab/template/thumbnails.tpl
r19673 r19811 22 22 }); 23 23 {/literal} 24 $(this).attr("title","{' Open the file in a new tab'|@translate}");24 $(this).attr("title","{'pdf2tab_tooltip'|@translate}"); 25 25 {literal} 26 26 }
Note: See TracChangeset
for help on using the changeset viewer.