Esempio n. 1
0
<?php

// $Header$
// Copyright (c) 2002-2003, Luis Argerich, Garland Foster, Eduardo Polidor, et. al.
// All Rights Reserved. See below for details and a complete list of authors.
// Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See http://www.gnu.org/copyleft/lesser.html for details.
$formCmsSettings = array('articles_attachments' => array('label' => 'File Attachments', 'note' => 'Allow the attachment of files to an article. This feature is required if you want to have individual article images.'), 'articles_display_filter_bar' => array('label' => 'Articles Filter', 'note' => 'Allows admins to quickly filter articles based on status, topic and type.'), 'articles_submissions_rnd_img' => array('label' => 'Prevent Spam', 'note' => 'This will generate a random number as an image which the user has to confirm.'), 'articles_auto_approve' => array('label' => 'Auto Approve Articles', 'note' => 'Allow User ratings to Auto Approve Articles'));
$gBitSmarty->assign('formCmsSettings', $formCmsSettings);
$articleDateThreshold = array('' => tra('never'), 'always' => tra('always'), 'year' => tra('up to a year'), 'month' => tra('up to a month'), 'week' => tra('up to a week'), 'day' => tra('up to a day'), 'hour' => tra('up to an hour'));
$gBitSmarty->assign('articleDateThreshold', $articleDateThreshold);
$formArticleListing = array("articles_list_title" => array('label' => 'Title', 'note' => 'List the title of the article.'), "articles_list_type" => array('label' => 'Type', 'note' => 'Display what type of article it is.'), "articles_list_topic" => array('label' => 'Topic', 'note' => 'Display the article topic.'), "articles_list_date" => array('label' => 'Creation Date', 'note' => 'Display when the article was submitted first.'), "articles_list_expire" => array('label' => 'Expiration Date', 'note' => 'Display when the article will expire.'), "articles_list_author" => array('label' => 'Author', 'note' => 'Display the name of the author of an article.'), "articles_list_reads" => array('label' => 'Hits', 'note' => 'Display the number of times a given article has been accessed.'), "articles_list_size" => array('label' => 'Size', 'note' => 'Display the size of any given article.'), "articles_list_img" => array('label' => 'Image', 'note' => 'Display the image that is associated with a given article.'), "articles_list_status" => array('label' => 'Status', 'note' => 'This will indicate whether a given article has been submitted or has been approved.'));
$gBitSmarty->assign('formArticleListing', $formArticleListing);
$gBitSmarty->assign('imageSizes', get_image_size_options(FALSE));
if (!empty($_REQUEST['store_settings'])) {
    $featureToggles = array_merge($formArticleListing, $formCmsSettings);
    foreach ($featureToggles as $item => $data) {
        simple_set_toggle($item, ARTICLES_PKG_NAME);
    }
    simple_set_int("articles_max_list", ARTICLES_PKG_NAME);
    simple_set_int("articles_description_length", ARTICLES_PKG_NAME);
    simple_set_value("articles_image_size", ARTICLES_PKG_NAME);
}
Esempio n. 2
0
/**
 * required setup
 */
require_once '../kernel/setup_inc.php';
require_once FISHEYE_PKG_PATH . 'FisheyeGallery.php';
require_once FISHEYE_PKG_PATH . 'FisheyeImage.php';
global $gBitSystem;
include_once FISHEYE_PKG_PATH . 'gallery_lookup_inc.php';
// Ensure the user has the permission to create new image galleries
if ($gContent->isValid()) {
    $gContent->verifyUpdatePermission();
} else {
    $gContent->verifyCreatePermission();
}
if ($gBitUser->hasPermission('p_fisheye_change_thumb_size')) {
    $gBitSmarty->assign('thumbnailSizes', get_image_size_options(NULL));
}
$gBitSmarty->assign('galleryPaginationTypes', $gContent::getAllLayouts());
if (!empty($_REQUEST['savegallery'])) {
    if ($_REQUEST['gallery_pagination'] == 'auto_flow') {
        $_REQUEST['rows_per_page'] = $_REQUEST['total_per_page'];
        $_REQUEST['cols_per_page'] = '1';
    } elseif ($_REQUEST['gallery_pagination'] == 'simple_list') {
        $_REQUEST['rows_per_page'] = $_REQUEST['lines_per_page'];
        $_REQUEST['cols_per_page'] = '1';
    } elseif ($_REQUEST['gallery_pagination'] == 'matteo') {
        $_REQUEST['rows_per_page'] = $_REQUEST['images_per_page'];
        $_REQUEST['cols_per_page'] = '1';
    }
    if ($gContent->store($_REQUEST)) {
        $gContent->storePreference('is_public', !empty($_REQUEST['is_public']) ? $_REQUEST['is_public'] : NULL);
Esempio n. 3
0
<?php

require_once '../../../kernel/setup_inc.php';
include_once KERNEL_PKG_PATH . 'simple_form_functions_lib.php';
$gBitSystem->verifyPermission('p_admin');
if (function_exists('shell_exec')) {
    $gBitSmarty->assign('ffmpeg_path', shell_exec('which ffmpeg'));
    $gBitSmarty->assign('mp4box_path', shell_exec('which MP4Box'));
}
if (extension_loaded('ffmpeg')) {
    $gBitSmarty->assign('ffmpeg_extension', TRUE);
}
$feedback = array();
$options = array('me_method' => array('me_method' => 'me_method', 'me' => 'me'), 'mp3_lib' => array('libmp3lame' => 'libmp3lame', 'mp3' => 'mp3'), 'video_codec' => array('flv' => 'Flashvideo using flv codec', 'h264' => 'MP4/AVC using h264 codec', 'h264-2pass' => 'MP4/AVC using h264 codec - 2 passes'), 'video_bitrate' => array(160000 => 200, 240000 => 300, 320000 => 400, 400000 => 500, 480000 => 600, 560000 => 700, 640000 => 800), 'video_width' => array(240 => 240, 320 => 320, 480 => 480, 640 => 640), 'audio_bitrate' => array(32000 => 32, 64000 => 64, 96000 => 96, 128000 => 128), 'audio_samplerate' => array(11025 => 11025, 22050 => 22050, 44100 => 44100));
$options['display_size'] = get_image_size_options('Same as encoded video');
$gBitSmarty->assign('options', $options);
if (!empty($_REQUEST['plugin_settings'])) {
    $videoSettings = array('ffmpeg_path' => array('type' => 'text'), 'ffmpeg_mp3_lib' => array('type' => 'text'), 'ffmpeg_me_method' => array('type' => 'text'), 'mp4box_path' => array('type' => 'text'), 'mime_video_video_codec' => array('type' => 'text'), 'mime_video_video_bitrate' => array('type' => 'numeric'), 'mime_video_force_encode' => array('type' => 'checkbox'), 'mime_video_audio_samplerate' => array('type' => 'numeric'), 'mime_video_audio_bitrate' => array('type' => 'numeric'), 'mime_video_width' => array('type' => 'numeric'), 'mime_video_default_size' => array('type' => 'text'), 'mime_video_backcolor' => array('type' => 'text'), 'mime_video_frontcolor' => array('type' => 'text'));
    foreach ($videoSettings as $item => $data) {
        if ($data['type'] == 'checkbox') {
            simple_set_toggle($item, LIBERTY_PKG_NAME);
        } elseif ($data['type'] == 'numeric') {
            simple_set_int($item, LIBERTY_PKG_NAME);
        } else {
            $gBitSystem->storeConfig($item, !empty($_REQUEST[$item]) ? $_REQUEST[$item] : NULL, LIBERTY_PKG_NAME);
        }
    }
    $feedback['success'] = tra('The plugin was successfully updated');
}
$gBitSmarty->assign('feedback', $feedback);
$gBitSystem->display('bitpackage:liberty/mime/video/admin.tpl', tra('Flashvideo Plugin Settings'), array('display_mode' => 'admin'));