[7862] | 1 | <?php |
---|
| 2 | /* |
---|
| 3 | Plugin Name: pAnchor |
---|
| 4 | Version: 0.5b |
---|
| 5 | Description: (beta) Improved piwigo picture browsing by adding HTML anchor to page and navigation URLs. |
---|
| 6 | Plugin URI: |
---|
| 7 | Author: stellablue |
---|
| 8 | Author URI: |
---|
| 9 | */ |
---|
| 10 | |
---|
| 11 | if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!'); |
---|
| 12 | //plug-in dir name |
---|
| 13 | define('PANCHOR_DIR' , basename(dirname(__FILE__))); |
---|
| 14 | //full path to plugin |
---|
| 15 | define('PANCHOR_PATH' , PHPWG_PLUGINS_PATH . PANCHOR_DIR . '/'); |
---|
| 16 | //version |
---|
| 17 | define('PANCHOR_VER' , '0.5'); |
---|
| 18 | //name of anchor tag |
---|
| 19 | define('PANCHOR_NAME' , 'pic'); |
---|
| 20 | |
---|
| 21 | |
---|
| 22 | |
---|
| 23 | //CUSTOMIZATION VARS |
---|
| 24 | //name of div id to preceed with pAnchor tag for picture.tpl |
---|
| 25 | //these tags could template dependent |
---|
| 26 | define('PANCHOR_PICTURE_SEARCH_TAG', '<div id="imageHeaderBar"'); |
---|
| 27 | //name of div id to preceed with pAnchor tag for slideshow.tpl |
---|
| 28 | define('PANCHOR_SLIDESHOW_SEARCH_TAG', '<div id="imageHeaderBar"'); |
---|
| 29 | //css fine adj is a pixel offset (y direction vertical) |
---|
| 30 | define('PANCHOR_CSS_FINE_ADJ_PICTURE', '-20'); |
---|
| 31 | define('PANCHOR_CSS_FINE_ADJ_SLIDESHOW', '-40'); |
---|
| 32 | |
---|
| 33 | //Experimental feature!! - an automatic easing scroll can be implement via javascript |
---|
| 34 | //it is a nice smooth scroll to the pAnchor when navigating to picture or slideshow |
---|
| 35 | //from another page (that does not have # in url), versus a jump. - a nice effect!! |
---|
| 36 | //this feature will be DISABLED by default while experimental. |
---|
| 37 | define('PANCHOR_EASE_ENABLE', false); |
---|
| 38 | |
---|
| 39 | //CSS for pAnchor |
---|
| 40 | //test and adjust CSS parameter in main.inc.php to fine tune as different browsers |
---|
| 41 | //can have subtle differences in anchor point. |
---|
| 42 | define('PANCHOR_CSS_PICTURE', '<style type="text/css"><!-- #pAnchor { position:relative; top: '.PANCHOR_CSS_FINE_ADJ_PICTURE.'px; } --> </style>'); |
---|
| 43 | define('PANCHOR_CSS_SLIDESHOW', '<style type="text/css"><!-- #pAnchor { position:relative; top: '.PANCHOR_CSS_FINE_ADJ_SLIDESHOW.'px; } --> </style>'); |
---|
| 44 | |
---|
| 45 | //include the plugin code |
---|
| 46 | include_once( PANCHOR_PATH . 'pAnchor.php'); |
---|
| 47 | ?> |
---|