예제 #1
0
                if ($ref_image != false && $thumbnail != false && $building['main_image'] != $image_id) {
                    if (($index - 1) % 3 == 0) {
                        $toggle_div = true;
                        ?>
								<div class="row">
								<?php 
                    }
                    $image_category = Idp_Main::getImageCategory($image_id);
                    if (!empty($image_category) && $image_category[0]->id > 0) {
                        $image_title = $image_category[0]->name;
                        $image_category = preg_replace('/\\s+/', '', $image_category[0]->name);
                    } else {
                        $image_category = "";
                        $image_title = "";
                    }
                    $image_tags = Idp_Main::getImageTags($image_id);
                    $image_tags_string = "";
                    foreach ($image_tags as $image_tag) {
                        $image_tags_string .= preg_replace('/\\s+/', '', $image_tag->name) . " ";
                    }
                    ?>
							<div class="col-sm-4 col-md-4 highlighter-images <?php 
                    echo $image_category . " " . $image_tags_string;
                    ?>
">
								<a href="<?php 
                    echo $ref_image[0];
                    ?>
" data-lightbox="buildingimages" class="thumbnail" title="<?php 
                    echo $image_title;
                    ?>
예제 #2
0
							</form>
							<button type="button" class="btn btn-default" data-dismiss="modal"><?php 
_e('Cancel');
?>
</button>
							<button type="button" class="btn btn-primary" id="submitCrop"><?php 
_e('Crop', 'idp-theme');
?>
</button>
						</div>
					</div>
				</div>
			</div>			
			
			<?php 
$tags = Idp_Main::getImageTags();
?>
			
			
            <div id="imageTagsModal" name="imageTagsModal" class="modal fade" role="dialog" aria-labelledby="imageTagsModal" aria-hidden="true">	
				<div class="modal-dialog modal-lg">
					<div class="modal-content">
						<div class="modal-header">
							<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
							<h3 id="imageTagsModalLabel"><?php 
_e('Image tags', 'idp-theme');
?>
</h3>
						</div>
						<div class="modal-body">
							<div class="row">
예제 #3
0
function printCategoryAndTags($attachment_id)
{
    $category = Idp_Main::getImageCategory($attachment_id);
    $tags = Idp_Main::getImageTags($attachment_id);
    if (!empty($category) && $category[0]->id > 0) {
        $result = "<span class=\"label label-warning\">" . $category[0]->name . "</span> ";
    } else {
        $result = "";
    }
    foreach ($tags as $tag) {
        $result = $result . "<span class=\"label label-info\">" . $tag->name . "</span> ";
    }
    if ($result != "") {
        $result = "<small>" . $result . "</small>";
    }
    return $result;
}