link on the main picture item K2

Responsive community-minded music Joomla template with JomSocial extension support.
Rate this topic: Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.1.00 out of 6 based on 1 vote(s)
GK User
Tue Jun 17, 2014 4:20 pm
Reply with quote
Report this post
Hi,
maybe it's a request naive, but I could not find how to remove the link from the main articles of k2. I also added the popup on the images in the articles, but do not work on iPad and tablet and does not display the image itself,

thanks

http://www.extrasound.biz/index.php/it/ ... rlimpopoli

Fabrizio
User avatar
Senior Boarder

GK User
Tue Jun 17, 2014 4:45 pm
Reply with quote
Report this post
Hello,

Please open the html/com_k2/templates/default/item.php file and please change the following fragment:

Code: Select all
<div class="itemImageBlock"> <a class="itemImage modal" rel="{handler: 'image'}" href="<?php echo $this->item->imageXLarge; ?>" title="<?php echo JText::_('K2_CLICK_TO_PREVIEW_IMAGE'); ?>"> <img src="<?php echo $this->item->image; ?>" alt="<?php if(!empty($this->item->image_caption)) echo K2HelperUtilities::cleanHtml($this->item->image_caption); else echo K2HelperUtilities::cleanHtml($this->item->title); ?>" style="width:<?php echo $this->item->imageWidth; ?>px; height:auto;" /> </a>


to:

Code: Select all
<div class="itemImageBlock"> <img src="<?php echo $this->item->image; ?>" alt="<?php if(!empty($this->item->image_caption)) echo K2HelperUtilities::cleanHtml($this->item->image_caption); else echo K2HelperUtilities::cleanHtml($this->item->title); ?>" style="width:<?php echo $this->item->imageWidth; ?>px; height:auto;" />
User avatar
Administrator

GK User
Thu Jun 19, 2014 10:33 pm
Reply with quote
Report this post
Hi and thank you,
now popup are working, but the link on main image of k2 articles working again, there was a little difference on code
Code: Select all
<div class="itemImageBlock">
        <span class="itemImage">
           <a class="modal" rel="{handler: 'image'}" href="<?php echo $this->item->imageXLarge; ?>" title="<?php echo JText::_('K2_CLICK_TO_PREVIEW_IMAGE'); ?>">
              <img src="<?php echo $this->item->image; ?>" alt="<?php if(!empty($this->item->image_caption)) echo K2HelperUtilities::cleanHtml($this->item->image_caption); else echo K2HelperUtilities::cleanHtml($this->item->title); ?>" style="width:<?php echo $this->item->imageWidth; ?>px; height:auto;" />
           </a>

I replce it with
Code: Select all
<div class="itemImageBlock">
        <span class="itemImage">
           <img src="<?php echo $this->item->image; ?>" alt="<?php if(!empty($this->item->image_caption)) echo K2HelperUtilities::cleanHtml($this->item->image_caption); else echo K2HelperUtilities::cleanHtml($this->item->title); ?>" style="width:<?php echo $this->item->imageWidth; ?>px; height:auto;" />


bye
User avatar
Senior Boarder

GK User
Fri Jun 20, 2014 10:12 am
Reply with quote
Report this post
I forgot, now the site is

www.maforlimpopoli.it

and K2 item

http://www.maforlimpopoli.it/it/percors ... nfore.html

thanks

Fabrizio
User avatar
Senior Boarder

GK User
Fri Jun 20, 2014 5:47 pm
Reply with quote
Report this post
I'm confused now - did you solved the problem or not?
User avatar
Administrator

GK User
Fri Jun 20, 2014 6:14 pm
Reply with quote
Report this post
only about the popups, but main picture of k2 items not, when browsing ipad always opens the image even if you do not want because it fills the screen,

thanks

Fabrizio
User avatar
Senior Boarder

GK User
Sat Jun 21, 2014 10:49 pm
Reply with quote
Report this post
Still I don't understand - as I see in your posts you have replaced the link around the image with span so there is no link for the popup or image display now.
User avatar
Administrator

GK User
Wed Jun 25, 2014 11:54 am
Reply with quote
Report this post
1 - popups now open
2 - the main images of the k2 items with links are annoying to navigate with ipad, just touch the screen to open up. I would like to remove the link to themselves

thanks

Fabrizio
User avatar
Senior Boarder

GK User
Sat Jun 28, 2014 12:34 pm
Reply with quote
Report this post
So the only solution is removing links around the main images in the html/com_k2/templates/default/item.php file.
User avatar
Administrator

GK User
Sat Jun 28, 2014 5:04 pm
Reply with quote
Report this post
Thanks, but please help me, I don't know PHP language, only something of HTML

Code: Select all
<?php if($params->get('itemImage') && !empty($this->item->image)): ?>
          <div class="itemImageBlock"> <a class="itemImage modal" rel="{handler: 'image'}" href="<?php echo $this->item->imageXLarge; ?>" title="<?php echo JText::_('K2_CLICK_TO_PREVIEW_IMAGE'); ?>"> <img src="<?php echo $this->item->image; ?>" alt="<?php if(!empty($this->item->image_caption)) echo K2HelperUtilities::cleanHtml($this->item->image_caption); else echo K2HelperUtilities::cleanHtml($this->item->title); ?>" style="width:<?php echo $this->item->imageWidth; ?>px; height:auto;" /> </a>
                    <?php if($params->get('itemImageMainCredits') && !empty($this->item->image_credits)): ?>
                    <span class="itemImageCredits"><?php echo $this->item->image_credits; ?></span>
                    <?php endif; ?>
                    <?php if($params->get('itemImageMainCaption') && !empty($this->item->image_caption)): ?>
                    <span class="itemImageCaption"><?php echo $this->item->image_caption; ?></span>
                    <?php endif; ?>
          </div>
          <?php endif; ?>


I think these lines of code, but what exactly, I would like to remove the link that is the magnification of the image, also in the category of k2. For tablets and smartphones are a torture.

thank you very much

Fabrizio
User avatar
Senior Boarder

GK User
Sun Jun 29, 2014 1:55 pm
Reply with quote
Report this post
Please change the mentioned code fragment to:

Code: Select all
<?php if($params->get('itemImage') && !empty($this->item->image)): ?>
          <div class="itemImageBlock"> <span class="itemImage"> <img src="<?php echo $this->item->image; ?>" alt="<?php if(!empty($this->item->image_caption)) echo K2HelperUtilities::cleanHtml($this->item->image_caption); else echo K2HelperUtilities::cleanHtml($this->item->title); ?>" style="width:<?php echo $this->item->imageWidth; ?>px; height:auto;" /> </span>
                    <?php if($params->get('itemImageMainCredits') && !empty($this->item->image_credits)): ?>
                    <span class="itemImageCredits"><?php echo $this->item->image_credits; ?></span>
                    <?php endif; ?>
                    <?php if($params->get('itemImageMainCaption') && !empty($this->item->image_caption)): ?>
                    <span class="itemImageCaption"><?php echo $this->item->image_caption; ?></span>
                    <?php endif; ?>
          </div>
          <?php endif; ?>
User avatar
Administrator

GK User
Mon Jun 30, 2014 9:17 am
Reply with quote
Report this post
thanks, I'm happy now :)
User avatar
Senior Boarder


cron