Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • sanjiovani Friend
    #200642

    hello 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 Friend
    #546645

    further 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 Moderator
    #546690

    Hi,

    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 Friend
    #547030

    thanks I tried that but unfortunately the k2 item page stopped working

    Adam M Moderator
    #547078

    Hi,

    I checked your site and see that you managed to move the video below your main content. Could you please confirm your current status ?

Viewing 5 posts - 1 through 5 (of 5 total)

This topic contains 5 replies, has 2 voices, and was last updated by  Adam M 10 years, 3 months ago.

We moved to new unified forum. Please post all new support queries in our New Forum