| 2 | | |
| 3 | | // This is a PLUGIN TEMPLATE. |
| 4 | | |
| 5 | | // Copy this file to a new name like abc_myplugin.php. Edit the code, then |
| 6 | | // run this file at the command line to produce a plugin for distribution: |
| 7 | | // $ php abc_myplugin.php > abc_myplugin-0.1.txt |
| 8 | | |
| 9 | | // Plugin name is optional. If unset, it will be extracted from the current |
| 10 | | // file name. Plugin names should start with a three letter prefix which is |
| 11 | | // unique and reserved for each plugin author ("abc" is just an example). |
| 12 | | // Uncomment and edit this line to override: |
| 13 | | $plugin['name'] = 'ort_feriados'; |
| 14 | | |
| 15 | | // Allow raw HTML help, as opposed to Textile. |
| 16 | | // 0 = Plugin help is in Textile format, no raw HTML allowed (default). |
| 17 | | // 1 = Plugin help is in raw HTML. Not recommended. |
| 18 | | # $plugin['allow_html_help'] = 1; |
| 19 | | |
| 20 | | $plugin['version'] = '0.7'; |
| 21 | | $plugin['author'] = 'D.O.Yokhdar'; |
| 22 | | $plugin['author_uri'] = 'http://semap.baby.com.ar'; |
| | 2 | // $Id$ |
| | 3 | |
| | 4 | // Generamos el final del numero de version en base a la revision del repositorio subversion |
| | 5 | $svn['Rev'] = '$Rev$'; |
| | 6 | $svn['Id'] = '$Id$'; |
| | 7 | $svn['HeadURL'] = '$HeadURL$'; |
| | 8 | preg_match('/Rev: ([[:digit:]]+)/',$svn['Rev'],$svn_revision); |
| | 9 | preg_match('/Id: ([[:graph:]]+).php/',$svn['Id'],$svn_basename); |
| | 10 | preg_match('/HeadURL: ([[:graph:]]+).php/',$svn['HeadURL'],$svn_headurl); |
| | 11 | |
| | 12 | $plugin['version'] = '0.7-r'.$svn_revision[1]; |
| | 13 | $plugin['author_uri'] = $svn_headurl[1].'.txt'; |
| | 14 | $plugin['name'] = $svn_basename[1]; |
| | 15 | |
| | 16 | |
| | 17 | |
| | 18 | |
| | 19 | // ACA PONER LOS NOMBRES DE LOS AUTORES |
| | 20 | $plugin['author'] = 'Darío Yokhdar (Tutor: Mariano Absatz)'; |
| | 21 | |
| | 22 | // si comentamos la linea siguiente, el URL va a apuntar a la ultima version del plugin en el subversion |
| | 23 | $plugin['author_uri'] = 'http://semap.baby.com.ar/'; |
| | 24 | |
| | 25 | |
| | 26 | // ACA PONER UNA DESCRIPCION MUY BREVE DEL PLUGIN |
| 25 | | // Plugin load order: |
| 26 | | // The default value of 5 would fit most plugins, while for instance comment |
| 27 | | // spam evaluators or URL redirectors would probably want to run earlier |
| 28 | | // (1...4) to prepare the environment for everything else that follows. |
| 29 | | // Values 6...9 should be considered for plugins which would work late. |
| 30 | | // This order is user-overrideable. |
| 31 | | $plugin['order'] = '5'; |
| 32 | | |
| 33 | | // Plugin 'type' defines where the plugin is loaded |
| 34 | | // 0 = public : only on the public side of the website (default) |
| 35 | | // 1 = public+admin : on both the public and admin side |
| 36 | | // 2 = library : only when include_plugin() or require_plugin() is called |
| 37 | | // 3 = admin : only on the admin side |
| 38 | | $plugin['type'] = '0'; |
| 39 | | |
| 40 | | // Plugin "flags" signal the presence of optional capabilities to the core plugin loader. |
| 41 | | // Use an appropriately OR-ed combination of these flags. |
| 42 | | // The four high-order bits 0xf000 are available for this plugin's private use |
| 43 | | if (!defined('PLUGIN_HAS_PREFS')) define('PLUGIN_HAS_PREFS', 0x0001); // This plugin wants to receive "plugin_prefs.{$plugin['name']}" events |
| 44 | | if (!defined('PLUGIN_LIFECYCLE_NOTIFY')) define('PLUGIN_LIFECYCLE_NOTIFY', 0x0002); // This plugin wants to receive "plugin_lifecycle.{$plugin['name']}" events |
| 45 | | |
| 46 | | $plugin['flags'] = '0'; |
| | 29 | |
| | 30 | // TIPO DE PLUGIN - define donde se carga el plugin |
| | 31 | // 0 = public : solo se carga del lado publico de la web (default) |
| | 32 | // 1 = public+admin : se carga del lado publico de la web y del lado del administrador del textpattern |
| | 33 | // 2 = library : solo se carga cuando se lo invoca expresamente usando include_plugin() o require_plugin() |
| | 34 | // 3 = admin : solo se carga del lado del administrador del textpattern |
| | 35 | $plugin['type'] = 0; |
| | 36 | |
| | 37 | |
| | 38 | // Orden de carga de este plugin respecto de otros |
| | 39 | // el default (5) deberia andar para la mayoria de los plugins, |
| | 40 | // los que deben evaluar si un comentario es spam o los redirectores de URL deberian correr antes (1 a 4) |
| | 41 | // para preparar el entorno para lo que sigue |
| | 42 | // los órdenes de 6 a 9 se pueden considerar para plugins que tienen que ejecutarse tarde |
| | 43 | // El orden lo puede modificar el usuario |
| | 44 | $plugin['order'] = 5; |
| | 45 | |
| | 46 | |
| | 47 | // Dejar en 0 para escribir el help en Textile (MUY RECOMENDADO) |
| | 48 | // Poner 1 para escribir el help en HTML (NO HACERLO) |
| | 49 | $plugin['allow_html_help'] = 0; |
| | 50 | |
| | 51 | |
| | 52 | // Los 'flags' del plugin indican al cargador de plugins del core la presencia de capacidades opcionales. |
| | 53 | // Usá una combinación OR de estos flags. |
| | 54 | // Los cuatro bits más altos (0xf000) son para us privado de este plugin. |
| | 55 | if (!defined('PLUGIN_HAS_PREFS')) define('PLUGIN_HAS_PREFS', 0x0001); // Este plugin quiere recibir eventos "plugin_prefs.{$plugin['nombre']}" |
| | 56 | if (!defined('PLUGIN_LIFECYCLE_NOTIFY')) define('PLUGIN_LIFECYCLE_NOTIFY', 0x0002); // Este plugin quiere recibir eventos "plugin_lifecycle.{$plugin['name']}" |
| | 57 | |
| | 58 | # $plugin['flags'] = PLUGIN_HAS_PREFS | PLUGIN_LIFECYCLE_NOTIFY; |
| | 59 | |
| | 60 | // El 'textpack' del plugin es opcional. Esto provee textos i18n para ser utilizados en conjunto con gTxt(). |
| | 61 | // Sintáxis: |
| | 62 | // ## comentario arbitrario |
| | 63 | // #@evento |
| | 64 | // #@language CODIGO-ISO-DE-IDIOMA |
| | 65 | // ort_cadena_de_texto => Texto localizado en el idioma |
| | 66 | |
| | 67 | /** Descomentar esto si se necesita un textpack |
| | 68 | $plugin['textpack'] = <<< EOT |
| | 69 | #@admin |
| | 70 | #@language en-gb |
| | 71 | ort_cadena => Sample String |
| | 72 | ort_otra => One more |
| | 73 | #@language es-es |
| | 74 | ort_cadena => Texto de ejemplo |
| | 75 | ort_otra => Uno más |
| | 76 | EOT; |
| | 77 | **/ |
| | 78 | // Fin del textpack |