Beispiel #1
0
"><a href="<?php 
    show_image_url();
    ?>
"><?php 
    show_lang_txt('txt_show_directly_link');
    ?>
</a>:</label> <input type="text" id="direct-link-<?php 
    show_image_id();
    ?>
" value="<?php 
    show_image_url();
    ?>
" /></div>
                    
                    <?php 
    if (is_config_short_url() && is_user_preference_short_url()) {
        ?>
                    <div class="input-item"><label for="short-url-service-<?php 
        show_image_id();
        ?>
"><a id="short-url-service-link" href="<?php 
        //show_short_url('service');
        ?>
"><?php 
        show_tinyurl_service();
        ?>
</a>:</label> <input type="text" id="short-url-service-<?php 
        show_image_id();
        ?>
" value="<?php 
        show_image_shorturl_service();
Beispiel #2
0
$upload = new Upload($to_upload);
if ($is_remote) {
    $upload->is_remote = true;
}
$upload->img_upload_path = __CHV_PATH_IMAGES__;
if (isset($to_resize)) {
    $upload->resize_width = $to_resize;
}
$upload->thumb_width = chevereto_config('thumb_width');
$upload->thumb_height = chevereto_config('thumb_height');
$upload->max_size = return_bytes(chevereto_config('max_filesize'));
$upload->storage = chevereto_config('storage');
/*** Do the thing? ***/
if ($upload->process()) {
    $imageInfo = $upload->image_info;
    if (is_config_short_url() && (is_user_preference_short_url() or $_REQUEST['doShort'] == 'true')) {
        require __CHV_PATH_INCLUDES__ . 'shorturl.php';
        switch (chevereto_config('short_url_image')) {
            default:
            case 'shorturl':
                $short_url = 'image_shorturl';
                break;
            case 'direct':
                $short_url = 'image_url';
                break;
            case 'viewer':
                $short_url = 'image_viewer';
                break;
        }
        $short_url = $upload->image_info[$short_url];
        $imageInfo['image_shorturl_service'] = $ShortURL->get_ShortURL($short_url);