Ignore:
Timestamp:
Jan 18, 2014, 2:19:26 PM (11 years ago)
Author:
Miklfe
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/Slide/Slide.php

    r21579 r26857  
    11<?php
    22if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
     3include_once(PHPWG_ROOT_PATH.'include/functions_plugins.inc.php');
    34
    4 global $conf, $template,$smarty, $repeat;
     5global $conf, $template,$smarty, $repeat, $user, $page;
    56        $params = array_merge(unserialize($conf['Slide']));
    67       
     
    1516                ',$smarty, $repeat);
    1617                };
    17 
    18 
    19 
    2018               
    2119               
     20               
     21$plug_act = array();           
     22$withlightbox = get_db_plugins('active' , 'lightbox');
     23if($withlightbox)
     24        {
     25        include_once(LIGHTBOX_PATH.'functions.inc.php');
     26        $params = unserialize($conf['lightbox']);       
     27        $template->func_combine_css(array('path'=>'plugins/lightbox/theme/'.$params['theme'].'/colorbox.css'));
     28       
     29        $conf['lightbox_rel'] = isset($conf['lightbox_rel']) ? ++$conf['lightbox_rel'] : 0;
     30       
     31        $lightbox_data = array(
     32                "transition" => $params['transition'],
     33                "speed" => $params['transition_speed'],
     34                "initialWidth" => (!empty($params['initial_width']) ? $params['initial_width'] : $config_default['initial_width']),
     35                "initialHeight" => (!empty($params['initial_height']) ? $params['initial_height'] : $config_default['initial_height']),
     36                "width" => (!empty($params['fixed_width']) ? '"'.$params['fixed_width'].'"' : 'false'),
     37                "height" => (!empty($params['fixed_height']) ? '"'.$params['fixed_height'].'"' : 'false'),
     38                "catid" =>  @$page['category']['id'],
     39                "section" => @$page['section'],
     40                "tagids" => @implode(',', @$page['tag_ids'])
     41        );
     42       
     43$lightbox_data = json_encode( $lightbox_data );
     44$template->assign('lightbox_data', $lightbox_data);
     45
     46array_push($plug_act, 'lightbox');
     47};
     48       
     49$withGthumb = get_db_plugins('active' , 'GThumb');
     50if($withGthumb)
     51        {
     52        $template->func_combine_css(array('path'=>'plugins/GThumb/template/gthumb.css'));
     53        $params = $conf['GThumb'];
     54        $GThumb_data = json_encode($params);
     55        $template->assign('slideGThumb', $GThumb_data);
     56        $template->assign('GThumb_derivative_params', ImageStdParams::get_custom(9999, $conf['GThumb']['height']));
     57        array_push($plug_act, 'GThumb');
     58};
     59
     60$withEC = get_db_plugins('active' , 'EasyCaptcha');
     61if($withEC)
     62        {
     63        //$template->func_combine_css(array('path'=>'plugins/EasyCaptcha/template/drag.css'));
     64        //$template->func_combine_css(array('path'=>'plugins/EasyCaptcha/template/tictac.css'));
     65        $params = $conf['EasyCaptcha'];
     66        $EasyCaptcha_data = json_encode($params);
     67        $template->assign('slideEasyCaptcha', $EasyCaptcha_data);
     68        array_push($plug_act, 'EasyCaptcha');
     69};
     70
     71$template->assign('pluginActive' , $plug_act);
     72
    2273?>
Note: See TracChangeset for help on using the changeset viewer.