clipbucket/upload/admin_area/styles/cbv3/layout/recreate_thumbs.html
Fawaz ef791c0b7c Fixed : Admin Area Recreate thumbs page
Added : Set as avatar code
Added : Avatar Collection for user
Added : new param avatar_collection in get_collections() method
Fixed : crop value in thumbs_dimensions
Added : is_avatar param in get_photos() method
Added : photo_dimensions filter in generate_photos() method
Fixed : insert_photo() method
Moved : insert_photo_colors in insert_photo() method from view_item.php page
Updated : get_image_type() method
Updated : getFileSmarty() method
Added : An anchor in getFileSmarty() 'photo_thumb'
Fixed : cropping cases in resizer.class.php
Updated : $Upload->upload_user_file to upload_new_avatar
Removed : cb_create_user_avatar_collection() from common.php
Registered : delete_photo_avatar() function @delete_photo
Added : validate_image_file() function. It uses our old image.class.php method
Added : get_mature_thumb() function. It has three parameters, object_array, size, output. You can also register custom thumb @mature_thumb
Added : Few new functions for photos. get_all_custom_size_photos(), get_photo_dimensions(), clean_custom_photo_size(), get_avatar_photos() and is_photo_viewable()
Added : new js function, displayConfirm(). It accepts four parameters. id( modal box id), confirmMessage( modal box body), onConfirm( either url or function ) and heading(modal box header)
2012-05-28 07:10:27 +00:00

248 lines
No EOL
14 KiB
HTML

{if $mode == 'single'}
<h2>Re-create Photos</h2>
<form action="recreate_thumbs.php?mode={$mode}&amp;photo={$data.photo_id}" method="post" enctype="multipart/form-data">
<a href="edit_photo.php?photo={$p.photo_id}">&laquo; Back to Edit Details</a>
<div style="height:5px;"></div>
<fieldset class="fieldset" style="padding:10px;">
<legend style="font:bold 11px Tahoma; text-transform:uppercase; background:#FFF; padding:0 20px;">Settings on which photos will be re-created</legend>
<li class="clearfix myAdminList" style="padding-bottom:5px;">
<div class="moveL PhotoID" style="width:10%">Ratio</div>
<div class="moveL"><input disabled="disabled" value="{$Cbucket->configs.photo_ratio}" class="disabled" /></div>
</li>
<li class="clearfix myAdminList" style="padding-bottom:5px;">
<div class="moveL PhotoID" style="width:10%">Thumb Size</div>
<div class="moveL"><input disabled="disabled" value="{$Cbucket->configs.photo_thumb_width}" class="disabled" /> x <input disabled="disabled" value="{$Cbucket->configs.photo_thumb_height}" class="disabled" /></div>
</li>
<li class="clearfix myAdminList" style="padding-bottom:5px;">
<div class="moveL PhotoID" style="width:10%">Medium Size</div>
<div class="moveL"><input disabled="disabled" value="{$Cbucket->configs.photo_med_width}" class="disabled" /> x <input disabled="disabled" value="{$Cbucket->configs.photo_med_height}" class="disabled" /></div>
</li>
<li class="clearfix myAdminList" style="padding-bottom:5px;">
<div class="moveL PhotoID" style="width:10%">Large Size</div>
<div class="moveL"><input disabled="disabled" value="{$Cbucket->configs.photo_lar_width}" class="disabled" /></div>
</li>
<li class="clearfix myAdminList" style="padding-bottom:5px;">
<div class="moveL PhotoID" style="width:10%">Cropping</div>
<div class="moveL">
{assign var=cropping value=$Cbucket->configs.photo_crop}
{if $cropping == 1}
<span class="AdminBoldText">Enabled</span>
{else}
Disabled
{/if}
</div>
</li>
<li class="clearfix myAdminList" style="padding-bottom:5px;">
<div class="moveL PhotoID" style="width:10%">Watermarking</div>
<div class="moveL">
{assign var=watermark value=$Cbucket->configs.watermark_photo}
{if $watermark == 1}
<span class="AdminBoldText">Enabled</span> | <span class="AdminBoldText">Placement</span> - <input disabled="disabled" value="{$Cbucket->configs.watermark_placement}" class="disabled" />
{else}
<span class="AdminBoldText">Disabled</span>
{/if}
</div>
</li>
<li class="clearfix myAdminList" style="padding-bottom:5px; background:#EEE;">
<div class="moveL PhotoID" style="width:10%">&nbsp;</div>
<div class="moveL">
<span class="AdminBoldText" style="color:#333;">Update settings if they are not according to your needs.</span>
</div>
</li>
</fieldset>
<div style="height:5px; clear:both;"></div>
<a href="recreate_thumbs.php?mode={$mode}&amp;photo={$p.photo_id}&amp;recreate=true" style="margin-bottom:5px;" class="myAdminButton moveR">Re-create Photo</a>
<br/><br/>
<ul class="thumbnails">
{foreach from=$files item=file}
<li class="inlineblock " style="float: none; vertical-align: top">
<div class="thumbnail">
<img src="{$file}" style="max-width:260px;" />
<div class="caption">
<h5>Size : {$cbphoto->get_image_type( $file )}</h5>
</div>
</div>
</li>
{/foreach}
</ul>
</form>
{/if}
{if $mode == 'mass' || $mode == ''}
<h2>Mass Re-creation of Photos</h2>
<div style="height:10px; clear:both;"></div>
<span class="AdminBoldText">This will re-create all the photos uploaded on your website, according to the settings shown below</span>
<div class="AdminBoldText" style="color:#ed0000; font:normal 10px Tahoma, Geneva, sans-serif; margin-top:5px;">Take caution while using Mass Recreation. Use MAX of 5 photos per GO.</div>
<div style="height:5px; clear:both;"></div>
<fieldset class="fieldset" style="padding:10px;">
<legend style="font:bold 11px Tahoma; text-transform:uppercase; background:#FFF; padding:0 20px;">Settings on which photos will be re-created</legend>
<li class="clearfix myAdminList" style="padding-bottom:5px;">
<div class="moveL PhotoID" style="width:10%">Ratio</div>
<div class="moveL"><input disabled="disabled" value="{$Cbucket->configs.photo_ratio}" class="disabled" /></div>
</li>
<li class="clearfix myAdminList" style="padding-bottom:5px;">
<div class="moveL PhotoID" style="width:10%">Thumb Size</div>
<div class="moveL"><input disabled="disabled" value="{$Cbucket->configs.photo_thumb_width}" class="disabled" /> x <input disabled="disabled" value="{$Cbucket->configs.photo_thumb_height}" class="disabled" /></div>
</li>
<li class="clearfix myAdminList" style="padding-bottom:5px;">
<div class="moveL PhotoID" style="width:10%">Medium Size</div>
<div class="moveL"><input disabled="disabled" value="{$Cbucket->configs.photo_med_width}" class="disabled" /> x <input disabled="disabled" value="{$Cbucket->configs.photo_med_height}" class="disabled" /></div>
</li>
<li class="clearfix myAdminList" style="padding-bottom:5px;">
<div class="moveL PhotoID" style="width:10%">Large Size</div>
<div class="moveL"><input disabled="disabled" value="{$Cbucket->configs.photo_lar_width}" class="disabled" /></div>
</li>
<li class="clearfix myAdminList" style="padding-bottom:5px;">
<div class="moveL PhotoID" style="width:10%">Cropping</div>
<div class="moveL">
{assign var=cropping value=$Cbucket->configs.photo_crop}
{if $cropping == 1}
<span class="AdminBoldText">Enabled</span>
{else}
Disabled
{/if}
</div>
</li>
<li class="clearfix myAdminList" style="padding-bottom:5px;">
<div class="moveL PhotoID" style="width:10%">Watermarking</div>
<div class="moveL">
{assign var=watermark value=$Cbucket->configs.watermark_photo}
{if $watermark == 1}
<span class="AdminBoldText">Enabled</span> | <span class="AdminBoldText">Placement</span> - <input disabled="disabled" value="{$Cbucket->configs.watermark_placement}" class="disabled" />
{else}
<span class="AdminBoldText">Disabled</span>
{/if}
</div>
</li>
<li class="clearfix myAdminList" style="padding-bottom:5px; background:#EEE;">
<div class="moveL PhotoID" style="width:10%">&nbsp;</div>
<div class="moveL">
<span class="AdminBoldText" style="color:#333;">Update settings if they are not according to your needs.</span>
</div>
</li>
</fieldset>
<div style="height:5px; clear:both;"></div>
<div class="moveL">
<span class="AdminBoldText">Loop Size</span> - <input type="text" name="textfield" style="width:60px; font:normal 11px Tahoma" value="{$loop_size}" id="the_loop_size" /><br/>
<div class="smallText" style="margin-top:2px">Number of photos to re-create in one go.</div>
</div>
<form name="mass_recreation" method="get" action="">
<input type="hidden" name="loop_size" value="" id="loop_start" />
<input type="submit" name="mass_recreation" id="mass_recreation" value="Start Recreation" class="myAdminButton moveR"
onclick="$('#loop_start').val($('#the_loop_size').val())"/>
</form>
{if $indexing}
<div align="right" style="padding:5px">{$from} - {$to} of {$total}</div>
<ul>
{foreach from=$index_msgs item=themsg}
<li>{$themsg}</li>
{/foreach}
</ul>
{if $stop_loop!='yes'}
<script type="text/javascript">
var start_index = '{$next_index}';
var loop_size = '{$smarty.get.loop_size}';
var mode = '{$mode}';
var button = '{$button}';
{literal}$(document).oneTime(2000,function(){$(window.location).attr('href', '?loop_size='+loop_size+'&'+button+'=yes&start_index='+start_index)});{/literal}
</script>
redirecting....do not close this window
{else}
Re-creation of photos have been completed.
{/if}
{/if}
{/if}
{if $mode == "collection"}
<h2>Recreate Photos</h2>
<div style="height:10px; clear:both;"></div>
{if $items}
{assign var=cid value=$items[0].collection_id}
{assign var=c_name value=$items[0].collection_id|get_collection_field}
<span style="font:bold 14px Arial; text-transform:uppercase;">{$c_name}</span>
<span style="font:bold 11px Tahoma;">
- <a href="{$cbcollection->collection_links($items[0].collection_id,'vc')}">View Collection</a> -
<a href="{$baseurl}/admin_area/edit_collection.php?collection={$cid}">Edit Collection</a> -
<a href="{$baseurl}/admin_area/manage_items.php?collection={$cid}&amp;type={$items[0].collection_id|get_collection_field:type}">Manage Items</a>
</span>
<fieldset class="fieldset" style="padding:10px;">
<legend style="font:bold 11px Tahoma; text-transform:uppercase; background:#FFF; padding:0 20px;">Settings on which photos will be re-created</legend>
<li class="clearfix myAdminList" style="padding-bottom:5px;">
<div class="moveL PhotoID" style="width:10%">Ratio</div>
<div class="moveL"><input disabled="disabled" value="{$Cbucket->configs.photo_ratio}" class="disabled" /></div>
</li>
<li class="clearfix myAdminList" style="padding-bottom:5px;">
<div class="moveL PhotoID" style="width:10%">Thumb Size</div>
<div class="moveL"><input disabled="disabled" value="{$Cbucket->configs.photo_thumb_width}" class="disabled" /> x <input disabled="disabled" value="{$Cbucket->configs.photo_thumb_height}" class="disabled" /></div>
</li>
<li class="clearfix myAdminList" style="padding-bottom:5px;">
<div class="moveL PhotoID" style="width:10%">Medium Size</div>
<div class="moveL"><input disabled="disabled" value="{$Cbucket->configs.photo_med_width}" class="disabled" /> x <input disabled="disabled" value="{$Cbucket->configs.photo_med_height}" class="disabled" /></div>
</li>
<li class="clearfix myAdminList" style="padding-bottom:5px;">
<div class="moveL PhotoID" style="width:10%">Large Size</div>
<div class="moveL"><input disabled="disabled" value="{$Cbucket->configs.photo_lar_width}" class="disabled" /></div>
</li>
<li class="clearfix myAdminList" style="padding-bottom:5px;">
<div class="moveL PhotoID" style="width:10%">Cropping</div>
<div class="moveL">
{assign var=cropping value=$Cbucket->configs.photo_crop}
{if $cropping == 1}
<span class="AdminBoldText">Enabled</span>
{else}
Disabled
{/if}
</div>
</li>
<li class="clearfix myAdminList" style="padding-bottom:5px;">
<div class="moveL PhotoID" style="width:10%">Watermarking</div>
<div class="moveL">
{assign var=watermark value=$Cbucket->configs.watermark_photo}
{if $watermark == 1}
<span class="AdminBoldText">Enabled</span> | <span class="AdminBoldText">Placement</span> - <input disabled="disabled" value="{$Cbucket->configs.watermark_placement}" class="disabled" />
{else}
<span class="AdminBoldText">Disabled</span>
{/if}
</div>
</li>
<li class="clearfix myAdminList" style="padding-bottom:5px; background:#EEE;">
<div class="moveL PhotoID" style="width:10%">&nbsp;</div>
<div class="moveL">
<span class="AdminBoldText" style="color:#333;">Update settings if they are not according to your needs.</span>
</div>
</li>
</fieldset>
<form action="" method="post" name="collection_photos_recreate">
<fieldset class="fieldset" style="padding:10px;">
<legend style="font:bold 11px Tahoma; text-transform:uppercase; background:#FFF; padding:0 20px;">Photos</legend>
<table border="0" cellspacing="0">
{section name=list loop=$items}
<td style="display:inline-block; padding:5px;">
<div style="position:relative">
<input type="checkbox" value="{$items[list].photo_id}" id="photo_{$items[list].photo_id}" style="position:absolute; top:1px; right:1px; " name="check_photo[]" />
<label for="photo_{$items[list].photo_id}">{get_photo output=html details=$items[list] style='padding:1px; border:1px solid #aaa'}</label>
</div>
</td>
{/section}
</table>
</fieldset>
<div class="AdminBoldText moveL" style="padding:10px 0 0;">Select photos you want to re-created | </div>
<label for="id_selectALL" class="myAdminButton clearfix moveL" type="button" name="checkall" onclick="checkUncheckAll(this);" style="margin:5px 0 0 5px">Select All</label><input type="checkbox" id="id_selectALL" style="visibility:hidden;" name="checkall" onclick="checkUncheckAll(this);"/>
<div style="margin-top:5px;" class="moveR"><input type="submit" name="recreating" value="Re-create Photos" class="myAdminButton"/></div>
</form>
{else}
{/if}
{/if}