示例#1
0
                <div class="image-tools-section socialize">
                    <h3><?php 
    show_lang_txt('txt_socialize');
    ?>
 <span><?php 
    show_lang_txt('txt_socialize_desc');
    ?>
</span></h3>
                    <div class="input-item">
                        <label><?php 
    show_lang_txt('txt_socialize_label');
    ?>
:</label>
                        <ul class="input-element">
                            <?php 
    show_social_links('<li>', get_image_viewer(), get_image_url());
    ?>
              
                        </ul>
                    </div>
                </div>
    
                <div class="image-tools-section show_directly">
                    <h3><?php 
    show_lang_txt('txt_show_directly');
    ?>
 <span><?php 
    show_lang_txt('txt_show_directly_desc');
    ?>
</span></h3>
                    <div class="input-item"><label for="short-url-internal-<?php 
function get_image_by_template($template = '', $before = '', $after = '')
{
    if ($template == '' || $template == 'default') {
        $template = '<img width="%IMAGE_WIDTH%" height="%IMAGE_HEIGHT%" id="%IMAGE_ID%" src="%IMAGE_URL%" alt="%IMAGE_FILENAME%" />';
    }
    $template = $before . $template . $after;
    $patterns = array('IMAGE_ID' => get_image_id(), 'IMAGE_REAL_ID' => get_image_real_id(), 'IMAGE_FILENAME' => get_image_filename(), 'IMAGE_URL' => get_image_url(), 'IMAGE_VIEWER' => get_image_viewer(), 'IMAGE_SHORTURL' => get_image_shorturl(), 'IMAGE_WIDTH' => get_image_width(), 'IMAGE_HEIGHT' => get_image_height(), 'IMAGE_SIZE' => get_image_size(), 'IMAGE_SIZE_BYTES' => get_image_size_bytes(), 'IMAGE_THUMB_WIDTH' => get_image_thumb_width(), 'IMAGE_THUMB_HEIGHT' => get_image_thumb_height(), 'IMAGE_THUMB_URL' => get_image_thumb_url());
    return preg_replace('/%([a-z_]+)%/ie', '$patterns["$1"]', $template);
}