Changeset 11075
- Timestamp:
- May 27, 2011, 5:56:35 PM (13 years ago)
- Location:
- extensions/Copyrights
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/Copyrights/main.inc.php
r10931 r11075 1 1 <?php 2 2 /* 3 Plugin Name: Copyrights 3 Plugin Name: Copyrights_TEST 4 4 Version: Alpha 5 5 Description: Create copyrights and assign them to your photos. … … 32 32 if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!'); 33 33 34 define('COPYRIGHTS_PATH', 35 PHPWG_PLUGINS_PATH.basename(dirname(__FILE__)) . '/'); // The plugin path 34 define('COPYRIGHTS_PATH', PHPWG_PLUGINS_PATH.basename(dirname(__FILE__)) . '/'); // The plugin path 36 35 define('COPYRIGHTS_WEB_PATH', get_root_url().'admin.php?page=plugin-copyrights'); 36 // Whats the difference between "COPYRIGHTS_PATH" and "COPYRIGHTS_WEB_PATH" ??? 37 37 38 38 global $prefixeTable; … … 42 42 include_once(COPYRIGHTS_PATH . 'include/functions.inc.php'); 43 43 44 /* Plugin admin */ 44 45 /* +-----------------------------------------------------------------------+ 46 * | Plugin admin | 47 * +-----------------------------------------------------------------------+ */ 48 49 45 50 add_event_handler('get_admin_plugin_menu_links', 'copyrights_admin_menu'); 46 51 function copyrights_admin_menu($menu) { … … 54 59 return $menu; 55 60 } 61 62 63 /* +-----------------------------------------------------------------------+ 64 * | Plugin image | 65 * +-----------------------------------------------------------------------+ */ 66 67 68 //if (script_basename() == 'picture') // Why should i want this "if" here? 69 include_once(dirname(__FILE__).'/image.php'); 70 71 72 /* +-----------------------------------------------------------------------+ 73 * | Plugin batchmanager | 74 * +-----------------------------------------------------------------------+ */ 75 76 77 // @Johan: Misschien een goed idee om dit ook in een apart php scriptje te zetten, voor de overzichtelijkheid. 78 // En om deze reden (Citaat uit de piwigo docs http://piwigo.org/doc/doku.php?id=en:plugins): 79 // Code size 80 // When PWG loads the plugins, it will include every main.inc.php. 81 // Don't put in your main.inc.php 3000 lines of code just to add a page on the administration menu. 82 // Split you main.inc.php in several files and feel free to add include_once inside functions defined in main.inc.php as much as you want. 83 56 84 57 85 // Add copyrights drop down menu to the batch manager -
extensions/Copyrights/maintain.inc.php
r10973 r11075 29 29 name varchar(255) UNIQUE NOT NULL, 30 30 url varchar(255) NOT NULL, 31 desc text DEFAULT NULL,31 descr text DEFAULT NULL, 32 32 visible bool DEFAULT 0, 33 33 PRIMARY KEY (cr_id) … … 46 46 47 47 function plugin_activate() { 48 global $prefixeTable;48 /*global $prefixeTable; 49 49 50 50 $query = " … … 55 55 if (0 == $counter) { 56 56 copyrights_create_default(); 57 } 57 }*/ 58 58 } 59 59 … … 143 143 ); 144 144 } 145 146 ?>
Note: See TracChangeset
for help on using the changeset viewer.