-
AuthorPosts
-
sanjiovani Friend
sanjiovani
- Join date:
- September 2006
- Posts:
- 217
- Downloads:
- 0
- Uploads:
- 32
- Thanks:
- 15
- Thanked:
- 1 times in 1 posts
August 19, 2014 at 9:17 pm #200642hello I have been trying to get an answer as to how to change the default display for all videos – currently the video displays on the ‘change modal’ and displays in a lightbox – i would like to change the default so that it automatically publishes on the k2 item page full width below the main text – please advise – thank you
sanjiovani Friendsanjiovani
- Join date:
- September 2006
- Posts:
- 217
- Downloads:
- 0
- Uploads:
- 32
- Thanks:
- 15
- Thanked:
- 1 times in 1 posts
August 20, 2014 at 6:40 am #546645further i would like to remove the button launch demo modal
The video ideally needs to be placed in the content which will increase the views
Thanks
Adam M ModeratorAdam M
- Join date:
- May 2014
- Posts:
- 5159
- Downloads:
- 33
- Uploads:
- 66
- Thanks:
- 95
- Thanked:
- 1271 times in 1235 posts
August 20, 2014 at 9:57 am #546690Hi,
Please follow these steps below :
1. Open file root_folder/templates/ja_obelisk/html/com_k2/ja_obelisk/item.php, look for this code below >>> highlight it and choose cut :
<?php
/*
* Override k2 media
* Using modal of bootstrap
* */
if($this->item->params->get('itemVideo') && !empty($this->item->video)): ?>
<!-- Button to trigger modal -->
<a href="#myModal" role="button" class="btn" data-toggle="modal">Launch demo modal</a><!-- Modal -->
<div id="myModal" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h3><?php echo JText::_('K2_MEDIA'); ?></h3>
</div>
<div class="modal-body">
<div class="itemVideoBlock">
<?php if($this->item->videoType=='embedded'): ?>
<div class="itemVideoEmbedded">
<?php
//Override
echo JAObeliskHelper::getMedia($this->item->video,420,315);
?>
</div>
<?php else: ?>
<span class="itemVideo"><?php echo $this->item->video; ?></span>
<?php endif; ?><?php if($this->item->params->get('itemVideoCaption') && !empty($this->item->video_caption)): ?>
<span class="itemVideoCaption"><?php echo $this->item->video_caption; ?></span>
<?php endif; ?><?php if($this->item->params->get('itemVideoCredits') && !empty($this->item->video_credits)): ?>
<span class="itemVideoCredits"><?php echo $this->item->video_credits; ?></span>
<?php endif; ?>
<div class="clr"></div>
</div>
</div>
</div><?php endif; ?>
2. Search for this section in the same file :
<?php else: ?>
<!-- Item text -->
<div class="itemFullText">
<?php echo JAObeliskHelper::photogallery($this->item->introtext,'span2'); ?>
</div>
<?php endif; ?><div class="clr"></div>
3. Paste the code in point 1 right below but you will have to remove some redundant parts, the remaining code will look similar as below :
if($this->item->params->get('itemVideo') && !empty($this->item->video)): ?>
<div class="itemVideoBlock">
<?php if($this->item->videoType=='embedded'): ?>
<div class="itemVideoEmbedded">
<?php
//Override
echo JAObeliskHelper::getMedia($this->item->video,420,315);
?>
</div>
<?php else: ?>
<span class="itemVideo"><?php echo $this->item->video; ?></span>
<?php endif; ?><?php if($this->item->params->get('itemVideoCaption') && !empty($this->item->video_caption)): ?>
<span class="itemVideoCaption"><?php echo $this->item->video_caption; ?></span>
<?php endif; ?><?php if($this->item->params->get('itemVideoCredits') && !empty($this->item->video_credits)): ?>
<span class="itemVideoCredits"><?php echo $this->item->video_credits; ?></span>
<?php endif; ?>
<div class="clr"></div>
<?php endif; ?>Save your file and recheck.
sanjiovani Friendsanjiovani
- Join date:
- September 2006
- Posts:
- 217
- Downloads:
- 0
- Uploads:
- 32
- Thanks:
- 15
- Thanked:
- 1 times in 1 posts
August 24, 2014 at 3:42 am #547030thanks I tried that but unfortunately the k2 item page stopped working
-
AuthorPosts
This topic contains 5 replies, has 2 voices, and was last updated by Adam M 10 years, 4 months ago.
We moved to new unified forum. Please post all new support queries in our New Forum