Viewing 2 posts - 16 through 17 (of 17 total)
  • Author
    Posts
  • dpchap015 Friend
    #513539

    @ninja Lead

    for the video and gallery article you can guide me if its possible..
    i will do it on my end.

    .AND this is totally a bug of the template.

    <blockquote>
    this is not bug from our product, my post before will only help to rid the image included within articles but the best way you need to change from article on your site</blockquote>

    and for Readmore .. i cant edit my 700 articles.>:(
    and the option given by you of readmore limit(template options) is not working at all.its a bug in your template. fix it in next version

    dpchap015 Friend
    #521304

    <em>@Ninja Lead 399397 wrote:</em><blockquote>Thanks for request but this is more of customization request for video and gallary .content type and customization support is out of JA support scope. You should hire a developer to carry out such work </blockquote> @ninja Lead

    sidebar in gallary type article
    open template/html/com_content/article/default_text

    [PHP]<?php if (preg_match_all(‘#<img[^>]+>#iU’, $this->item->text, $imgs)) : ?>
    <?php
    //remove the text
    $this->item->text = preg_replace(‘#<img[^>]+>#iU’, ”, $this->item->text);

    //collect all images
    $img_data = array();

    // parse image attributes
    foreach ($imgs[0] as $img_tag) {
    $img_data[$img_tag] = JUtility::parseAttributes($img_tag);
    }

    $total = count($img_data);

    if ($total > 0) : ?>
    <div class=”gallery-item”>

    <div id=”magz-carousel-<?php echo $this->item->id ?>” class=”carousel slide”>
    <ol class=”carousel-indicators”>
    <?php for ($i = 0; $i < $total; $i++) : ?>
    <li data-target=”#magz-carousel-<?php echo $this->item->id ?>”
    data-slide-to=”<?php echo $i ?>”<?php echo($i == 0 ? ‘ class=”active”‘ : ”) ?>></li>
    <?php endfor; ?>
    </ol>
    <div class=”carousel-inner”>

    <?php $j = 0;

    foreach ($img_data as $img => $attr) : ?>

    <div class=”item<?php echo($j == 0 ? ‘ active’ : ”) ?>”>
    <?php if ((isset($attr[‘title’]) && $attr[‘title’])) : ?>
    <div class=”carousel-header”>
    <?php if (isset($attr[‘title’]) && $attr[‘title’]) : ?>
    <h4><?php echo htmlspecialchars_decode($attr[‘title’]) ?></h4>
    <?php endif ?>
    </div>
    <?php endif ?>

    <?php echo $img ?>

    <?php if ((isset($attr[‘alt’]) && $attr[‘alt’])) : ?>
    <div class=”carousel-caption”>
    <?php if (isset($attr[‘alt’]) && $attr[‘alt’]) : ?>
    <p><?php echo htmlspecialchars_decode($attr[‘alt’]) ?></p>
    <?php endif ?>
    </div>
    <?php endif ?>
    </div>

    <?php
    $j++;
    endforeach;
    ?>
    </div>
    <a class=”carousel-control left” href=”#magz-carousel-<?php echo $this->item->id ?>”
    data-slide=”prev”>‹</a>
    <a class=”carousel-control right” href=”#magz-carousel-<?php echo $this->item->id ?>”
    data-slide=”next”>›</a>
    </div>

    <ul id=”magz-carousel-<?php echo $this->item->id ?>-thumbnails” class=”thumbnails”>
    <?php $j = 0; ?>
    <?php foreach ($img_data as $img => $attr) : ?>
    <li class=”span1″>
    <a href=”<?php echo isset($attr[‘src’]) ? $attr[‘src’] : ” ?>”
    class=”thumbnail<?php echo($j == 0 ? ‘ active’ : ”) ?>”
    data-target=”#magz-carousel-<?php echo $this->item->id ?>”
    data-slide-to=”<?php echo $j ?>”>
    <?php echo $img ?>
    </a>
    </li>
    <?php $j++; ?>
    <?php endforeach ?>
    </ul>
    </div>

    <script type=”text/javascript”>
    (function ($) {
    $(document).ready(function ($) {
    $(‘#magz-carousel-<?php echo $this->item->id ?>’)
    .carousel()
    .on(‘slid’, function () {

    $(‘#magz-carousel-<?php echo $this->item->id ?>-thumbnails’)
    .find(‘.thumbnail’).removeClass(‘active’)
    .eq($(this).find(‘.item.active’).index())
    .addClass(‘active’);
    });
    })
    })(jQuery);
    </script>

    <?php endif ?>
    <?php endif ?>

    <?php
    $replaced = 0;
    $text = str_replace(‘<div id=”disqus_thread”></div>’, ”, $this->item->text, $replaced);
    $text = preg_replace(‘@<a href=”http://disqus.com” class=”dq-powered”>(.*?)</a>@ms’, ”, $text);
    $this->item->replaced = $replaced;

    echo preg_replace(‘/<p>(*?|(?R))</p>/imsU’, ”, $text);
    ?>

    <footer class=”article-footer clearfix”>
    <?php if ($params->get(‘show_modify_date’)) : ?>
    <dl class=”article-info pull-left”>
    <dt class=”article-info-term”><?php echo JText::_(‘TPL_ARTICLE_FOOTER_INFO’); ?></dt>
    <dd class=”modified”>
    <?php echo JText::sprintf(‘COM_CONTENT_LAST_UPDATED’, ‘<span>’ . JHtml::_(‘date’, $this->item->modified, JText::_(‘DATE_FORMAT_LC3’)) . ‘</span>’); ?>
    </dd>
    </dl>
    <?php endif; ?>
    <div class=”tag-names pull-right”>
    <?php if ($params->get(‘show_tags’, 1) && !empty($this->item->tags)) : ?>
    <?php $this->item->tagLayout = new JLayoutFile(‘joomla.content.tags’); ?>
    <?php echo $this->item->tagLayout->render($this->item->tags->itemTags); ?>
    <?php endif; ?>
    </div>
    </footer>

    <?php if (!empty($this->item->pagination) && $this->item->pagination && $this->item->paginationposition && !$this->item->paginationrelative): ?>
    <hr class=”divider-vertical”/>
    <?php echo $this->item->pagination; ?>
    <?php endif; ?>

    <?php if (isset($urls) && ((!empty($urls->urls_position) && ($urls->urls_position == ‘1’)) || ($params->get(‘urls_position’) == ‘1’))): ?>
    <?php echo $this->loadTemplate(‘links’); ?>
    <?php endif; ?>

    <?php if (!$params->get(‘access-view’) && $params->get(‘show_noauth’) == true and $user->get(‘guest’)) : ?>

    <?php echo $this->item->introtext; ?>
    <?php //Optional link to let them register to see the whole article. ?>
    <?php if ($params->get(‘show_readmore’) && $this->item->fulltext != null) :
    $link1 = JRoute::_(‘index.php?option=com_users&view=login’);
    $link = new JURI($link1);
    ?>
    <section class=”readmore”>
    <a href=”<?php echo $link; ?>”>
    <span>
    <?php $attribs = json_decode($this->item->attribs); ?>
    <?php
    if ($attribs->alternative_readmore == null) :
    echo JText::_(‘COM_CONTENT_REGISTER_TO_READ_MORE’);
    elseif ($readmore = $this->item->alternative_readmore) :
    echo $readmore;

    if ($params->get(‘show_readmore_title’, 0) != 0) :
    echo JHtml::_(‘string.truncate’, ($this->item->title), $params->get(‘readmore_limit’));
    endif;

    elseif ($params->get(‘show_readmore_title’, 0) == 0) :
    echo JText::sprintf(‘COM_CONTENT_READ_MORE_TITLE’);
    else :
    echo JText::_(‘COM_CONTENT_READ_MORE’);
    echo JHtml::_(‘string.truncate’, ($this->item->title), $params->get(‘readmore_limit’));
    endif;
    ?>
    </span>
    </a>
    </section>
    <?php endif; ?>
    <?php endif; ?>
    [/PHP]

    paste this code after the line 67

    <div class=”article-body <?php echo $t3app->getClass($layout, $col) ?>” <?php echo $t3app->getData ($layout, $col++) ?>>:D

Viewing 2 posts - 16 through 17 (of 17 total)

This topic contains 17 replies, has 3 voices, and was last updated by  dpchap015 10 years, 9 months ago.

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