hi,
i have a image galary. in that image galary, i want to replace the image with the link to that image.
I tried my best to edit the relavent php coding to replace the image with the link of the image. But couldnt do it.
I have given the relavent php coding in getting the image. I think that php coding can be edited to get the image link
coding,
<div id="gsImageView" class="gbBlock">
<?php if (! empty ( $this->_tpl_vars['theme']['imageViews'] )): ob_start(); ?>
<a href="<?php echo $this->_reg_objects['g'][0]->url(array('arg1' => "view=core.DownloadItem",'arg2' => "itemId=".($this->_tpl_vars['theme']['item']['id']),'forceFullUrl' => true,'forceSessionId' => true), $this);?>
"> <?php echo $this->_reg_objects['g'][0]->text(array('text' => "Download %s",'arg1' => $this->_tpl_vars['theme']['sourceImage']['itemTypeName']['1']), $this);?> </a>
<?php $this->_smarty_vars['capture']['fallback'] = ob_get_contents(); ob_end_clean(); if ($this->_tpl_vars['image']['viewInline']): if (count ( $this->_tpl_vars['theme']['imageViews'] ) > 1): if ($this->_tpl_vars['theme']['imageViewsIndex'] == 1 && count ( $this->_tpl_vars['theme']['imageViews'] ) == 2): ?>
<a href="<?php echo $this->_reg_objects['g'][0]->url(array('params' => $this->_tpl_vars['theme']['pageUrl'],'arg1' => "itemId=".($this->_tpl_vars['theme']['item']['id'])), $this);?>
">
<?php else: $this->assign('imageViewsLink', $this->_tpl_vars['theme']['imageViewsIndex']+1); if ($this->_tpl_vars['imageViewsLink'] == count ( $this->_tpl_vars['theme']['imageViews'] )): $this->assign('imageViewsLink', $this->_tpl_vars['theme']['imageViewsIndex']-1); endif; ?>
</a><a href="<?php echo $this->_reg_objects['g'][0]->url(array('params' => $this->_tpl_vars['theme']['pageUrl'],'arg1' => "itemId=".($this->_tpl_vars['theme']['item']['id']),'arg2' => "imageViewsIndex=".($this->_tpl_vars['imageViewsLink'])), $this);?>
">
<?php endif; endif; if (isset ( $this->_tpl_vars['theme']['photoFrame'] )): $this->_tag_stack[] = array('container', array('type' => "imageframe.ImageFrame",'frame' => $this->_tpl_vars['theme']['photoFrame'],'width' ), $this); $_block_repeat=true; $this->_reg_objects['g'][0]->container($this->_tag_stack[count($this->_tag_stack)-1][1], null, $this, $_block_repeat); while ($_block_repeat) { ob_start(); echo $this->_reg_objects['g'][0]->image(array('id' => "%ID%",'item' ), $this);?>
<?php $_obj_block_content = ob_get_contents(); ob_end_clean(); $_block_repeat=false;echo $this->_reg_objects['g'][0]->container($this->_tag_stack[count($this->_tag_stack)-1][1], $_obj_block_content, $this, $_block_repeat);} array_pop($this->_tag_stack);?>
<?php else: echo $this->_reg_objects['g'][0]->image(array('item' => $this->_tpl_vars['theme']['item'],'image' => $this->_tpl_vars['image'],'fallback' => $this->_smarty_vars['capture']['fallback']), $this);?>
<?php endif; if (count ( $this->_tpl_vars['theme']['imageViews'] ) > 1): ?>
</a>
<?php endif; else: echo $this->_smarty_vars['capture']['fallback']; ?>
<?php endif; else: echo $this->_reg_objects['g'][0]->text(array('text' => "There is nothing to view for this item."), $this);?>
<?php endif; ?>
</div>
can somebody try and help me on doing this. i would be really greatfull
thanks
sisira