Есть код
<a class="img-photo_allery" href="<?php echo html_image_src($item['photo_allery'], 'big');?>" rel="gal"> <?php echo html_image($item['photo_allery'], 'small', $item['title']) ; ?> </a>
Например как сейчас выводится автоматически.
<div class="field ft_images f_photo_allery"> <div class="value"> <a class="img-photo_allery" href="/upload/000/u3/002/808340a0.jpg" rel="gal"><img src="/upload/000/u3/002/cfafadac.jpg" border="0"></a> <a class="img-photo_allery" href="/upload/000/u3/002/75bd96f8.jpg" rel="gal"><img src="/upload/000/u3/002/8af9bbf2.jpg" border="0"></a> <a class="img-photo_allery" href="/upload/000/u3/002/18376df6.jpg" rel="gal"><img src="/upload/000/u3/002/aae343f4.jpg" border="0"></a> <a class="img-photo_allery" href="/upload/000/u3/002/2920fe66.jpg" rel="gal"><img src="/upload/000/u3/002/f6805635.jpg" border="0"></a> <a class="img-photo_allery" href="/upload/000/u3/002/a4c645c8.jpg" rel="gal"><img src="/upload/000/u3/002/2bb5eee7.jpg" border="0"></a> <a class="img-photo_allery" href="/upload/000/u3/002/44b73def.jpg" rel="gal"><img src="/upload/000/u3/002/e448c317.jpg" border="0"></a> <a class="img-photo_allery" href="/upload/000/u3/002/58dbc24a.jpg" rel="gal"><img src="/upload/000/u3/002/96feabf0.jpg" border="0"></a> <script>$(document).ready(function() { icms.modal.bindGallery(".img-photo_allery"); });</script> </div> </div>