Ignore:
Timestamp:
Feb 3, 2014, 3:41:41 PM (10 years ago)
Author:
JanisV
Message:

Added basic customization

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/Fotorama/main.inc.php

    r27039 r27148  
    22/*
    33Plugin Name: Fotorama
    4 Version: 2.6.a
     4Version: 2.6.d
    55Description: Fotorama based full-screen slideshow
    66Author: JanisV
     
    1313if (mobile_theme()) return;
    1414
    15 define('FOTORAMA_PATH' , PHPWG_PLUGINS_PATH . basename(dirname(__FILE__)) . '/');
     15define('FOTORAMA_ID',       basename(dirname(__FILE__)));
     16define('FOTORAMA_PATH' ,    PHPWG_PLUGINS_PATH . FOTORAMA_ID . '/');
     17define('FOTORAMA_ADMIN',    get_root_url() . 'admin.php?page=plugin-' . FOTORAMA_ID);
    1618
    1719add_event_handler('init', 'Fotorama_init');
     20if (defined('IN_ADMIN'))
     21{
     22  add_event_handler('get_admin_plugin_menu_links', 'Fotorama_admin_menu');
     23}
    1824
    1925function Fotorama_init()
    2026{
    21   global $conf, $user, $page;
     27  global $conf;
    2228 
     29  load_language('plugin.lang', FOTORAMA_PATH);
     30
     31  $conf['Fotorama'] = unserialize($conf['Fotorama']);
     32
    2333  add_event_handler('loc_end_picture', 'Fotorama_end_picture');
    2434  add_event_handler('loc_end_page_header', 'Fotorama_end_page_header');
    2535}
     36
    2637function Fotorama_end_picture()
    2738{
     
    94105    $template->assign('items', $picture);
    95106    $template->assign('current_rank', $page['current_rank']);
     107    $template->assign(array('Fotorama' => $conf['Fotorama']));
    96108    $template->set_filenames( array('slideshow' => realpath(FOTORAMA_PATH.'template/slideshow.tpl')));
    97109  }
     
    112124}
    113125
     126function Fotorama_admin_menu($menu)
     127{
     128  $menu[] = array(
     129    'NAME' => 'Fotorama',
     130    'URL'  => FOTORAMA_ADMIN,
     131  );
     132
     133  return $menu;
     134}
     135
    114136?>
Note: See TracChangeset for help on using the changeset viewer.