コード例 #1
0
ファイル: settings.php プロジェクト: justangel/izap-videos
		<?php 
$default_setting = izap_is_win_izap_videos() ? elgg_get_plugins_path() . '' . GLOBAL_IZAP_VIDEOS_PLUGIN . '/ffmpeg/bin/ffmpeg.exe' . ' -y -i [inputVideoPath] -vframes 1 -ss 00:00:10 -an -vcodec png -f rawvideo -s 320x240 [outputImage]' : exec("which ffmpeg") . ' -y -i [inputVideoPath] -vframes 1 -ss 00:00:10 -an -vcodec png -f rawvideo -s 320x240 [outputImage]';
$thumbnail_cmd = elgg_get_plugin_setting('izapVideoThumb', 'izap-videos');
echo elgg_view('input/text', array('name' => 'params[izapVideoThumb]', 'value' => $thumbnail_cmd ? $thumbnail_cmd : $default_setting));
?>
  </label>
</p>

<!--Onserver and Youtube Settings Start Here-->
<div>
  <label><?php 
echo elgg_echo('izap_videos:adminSettings:onServerVideos');
?>
</label>
	<?php 
echo elgg_view('input/radio', array('name' => 'params[Onserver_enabled_izap_videos]', 'id' => 'onserver', 'value' => izap_plugin_setting(array('name' => 'Onserver_enabled_izap_videos', 'plugin' => GLOBAL_IZAP_VIDEOS_PLUGIN, 'value' => 'no')), 'options' => array(elgg_echo('izap-videos:adminSettings:my-server') => 'yes', elgg_echo('izap-videos:adminSettings:youtube-server') => 'youtube', elgg_echo('izap-videos:adminSettings:disable') => 'no')));
?>
</div>

<?php 
$onserver_setting = elgg_get_plugin_setting('Onserver_enabled_izap_videos', 'izap-videos');
if ($onserver_setting == 'yes' || $onserver_setting == 'no') {
    ?>
	<div id="youtube_key_youtube" style="display: none;">
		<label>
			<?php 
    echo elgg_echo('Youtube Developer Key');
    ?>
</label>
		<?php 
    $saved_data = elgg_get_plugin_setting('youtubeDeveloperKey', 'izap-videos');
コード例 #2
0
ファイル: izap-videos.php プロジェクト: justangel/izap-videos
/**
 * Check whether offserver videos are enabled in admin settings
 * 
 * @return string   string of enable/disable offserver settings
 * 
 * @version 5.0
 */
function izap_is_offserver_enabled_izap_videos()
{
    $setting = izap_plugin_setting(array('name' => 'Offserver_enabled_izap_videos', 'plugin' => GLOBAL_IZAP_VIDEOS_PLUGIN));
    if ((string) $setting === 'no') {
        return false;
    }
    return $setting;
}