Viewing 8 posts - 16 through 23 (of 23 total)
  • Author
    Posts
  • Phill Moderator
    #410800

    How is that for you Phil?

    mfcphil Friend
    #410801

    <em>@phill luckhurst 265404 wrote:</em><blockquote>How is that for you Phil?</blockquote>

    I believe you’ve done it……What did you do Phil?

    Phill Moderator
    #410807

    I have made a few edits to the default_item.php file. Here is the final code I used.

    <?php

    /*

    * ------------------------------------------------------------------------

    * JA Community PLus Template for Joomla 1.7.x

    * ------------------------------------------------------------------------

    * Copyright (C) 2004-2011 JoomlArt.com. All Rights Reserved.

    * @license - PHP files are GNU/GPL V2. CSS / JS are Copyrighted Commercial,

    * bound by Proprietary License of JoomlArt. For details on licensing,

    * Please Read Terms of Use at http://www.joomlart.com/terms_of_use.html.

    * Author: JoomlArt.com

    * Websites: http://www.joomlart.com - http://www.joomlancers.com

    * Redistribution, Modification or Re-licensing of this file in part of full,

    * is bound by the License applied.

    * ------------------------------------------------------------------------

    */

    // no direct access

    defined('_JEXEC') or die('Restricted access');

    // Create a shortcut for params.

    $params = &$this->item->params;

    $canEdit = $this->item->params->get('access-edit');

    ?>

    <div class="contentpaneopen<?php echo $this->escape($this->item->params->get( 'pageclass_sfx' )); ?> clearfix">

    <?php if (!$this->item->params->get('show_intro')) :

    echo $this->item->event->afterDisplayTitle;

    endif; ?>

    <?php

    //get images

    $regex = '#<img[^>]*>#';

    $image = '';

    ?>

    <?php echo $this->item->event->beforeDisplayContent; ?>

    <div class="article-content-wrap clearfix">

    <?php if ($this->item->params->get('show_title')) : ?>

    <h2 class="contentheading<?php echo $this->escape($this->item->params->get( 'pageclass_sfx' )); ?>">

    <?php if ($this->item->params->get('link_titles') && $this->item->params->get('access-view')) : ?>

    <a href="<?php echo JRoute::_(ContentHelperRoute::getArticleRoute($this->item->slug, $this->item->catid)); ?>"> <?php echo $this->escape($this->item->title); ?> </a>

    <?php else : ?>

    <?php echo $this->escape($this->item->title); ?>

    <?php endif; ?>

    </h2>

    <?php endif; ?>

    <div class="article-content fp-article-content">

    <?php if (isset ($this->item->toc)) : ?>

    <?php echo $this->item->toc; ?>

    <?php endif; ?>

    <?php echo $this->item->introtext; ?> <?php if ($image) : ?>

    <div> <?php echo $image ?> </div>

    <?php endif; ?></div>

    </div>

    <!-- Article tools -->

    <?php

    if (($params->get('show_author')) or ($params->get('show_category')) or ($params->get('show_create_date')) or ($params->get('show_modify_date')) or ($params->get('show_publish_date')) or ($params->get('show_parent_category')) or ($params->get('show_hits'))

    ) :

    ?>

    <div class="blog-article-tools clearfix">

    <dl class="article-info">

    <?php if ($this->item->params->get('show_create_date')) : ?>

    <dd class="create">

    <?php $created = T3Hook::_('t3_date_format', array($this->item->created, 'frontpage.created'));

    if (!$created) $created = JHTML::_('date', $this->item->created, JText::_('DATE_FORMAT_LC3')) ?>

    <?php echo $created ?> </dd>

    <?php endif; ?>

    <?php if (($this->item->params->get('show_author'))) : ?>

    <dd class="createdby"> by <span>

    <?php JText::printf(($this->item->created_by_alias ? $this->escape($this->item->created_by_alias) : $this->escape($this->item->author)) ); ?>

    </span> </dd>

    <?php endif; ?>

    <?php if ($params->get('show_parent_category') || $params->get('show_category')) : ?>

    <?php if ($params->get('show_parent_category') && $this->item->parent_id != 1) : ?>

    <dd class="parent-category-name"> <strong><?php echo JText::_('SECTION'); ?>: </strong>

    <?php $title = $this->escape($this->item->parent_title);

    $url = '<a href="' . JRoute::_(ContentHelperRoute::getCategoryRoute($this->item->parent_slug)) . '">' . $title . '</a>'; ?>

    <?php if ($params->get('link_parent_category') AND $this->item->parent_slug) : ?>

    <?php echo JText::sprintf('COM_CONTENT_PARENT', $url); ?>

    <?php else : ?>

    <?php echo JText::sprintf('COM_CONTENT_PARENT', $title); ?>

    <?php endif; ?>

    <?php if ($params->get('show_category')) : ?>

    <?php echo ' - '; ?>

    <?php endif; ?>

    </dd>

    <?php endif; ?>

    <?php if ($params->get('show_category')) : ?>

    <dd class="category-name">

    <?php $title = $this->escape($this->item->category_title);

    $url = '<a href="'.JRoute::_(ContentHelperRoute::getCategoryRoute($this->item->catslug)).'">'.$title.'</a>';?>

    <?php if ($params->get('link_category') AND $this->item->catslug) : ?>

    <?php echo JText::sprintf('COM_CONTENT_CATEGORY', $url); ?>

    <?php else : ?>

    <?php echo JText::sprintf('COM_CONTENT_CATEGORY', $title); ?>

    <?php endif; ?>

    </dd>

    <?php endif; ?>

    <?php endif; ?>

    <?php if ($this->item->params->get('show_hits')) : ?>

    <dd class="hits">

    <?php echo JText::_('Hits'); ?>: <?php echo $this->item->hits; ?>

    </dd>

    <?php endif; ?>

    </dl>

    <?php if ($params->get('show_print_icon') || $params->get('show_email_icon') || $canEdit) : ?>

    <ul class="actions">

    <?php if ($this->params->get('show_email_icon')) : ?>

    <li class="email-icon"> <?php echo JHTML::_('icon.email', $this->item, $this->item->params); ?> </li>

    <?php endif; ?>

    <?php if ( $this->params->get( 'show_print_icon' )) : ?>

    <li class="print-icon"> <?php echo JHTML::_('icon.print_popup', $this->item, $this->item->params); ?> </li>

    <?php endif; ?>

    <?php if ($this->params->get('show_pdf_icon')) : ?>

    <li> <?php echo JHTML::_('icon.pdf', $this->item, $this->item->params); ?> </li>

    <?php endif; ?>

    <?php if ($canEdit) : ?>

    <li class="edit-icon"> <?php echo JHtml::_('icon.edit', $this->item, $params); ?> </li>

    <?php endif; ?>

    </ul>

    <?php endif; ?>

    <?php if ($this->item->params->get('show_readmore') && $this->item->readmore) :

    if ($this->item->params->get('access-view')) :

    $link = JRoute::_(ContentHelperRoute::getArticleRoute($this->item->slug, $this->item->catid));

    else :

    $menu = JFactory::getApplication()->getMenu();

    $active = $menu->getActive();

    $itemId = $active->id;

    $link1 = JRoute::_('index.php?option=com_users&view=login&&Itemid=' . $itemId);

    $returnURL = JRoute::_(ContentHelperRoute::getArticleRoute($this->item->slug, $this->item->catid));

    $link = new JURI($link1);

    $link->setVar('return', base64_encode($returnURL));

    endif;

    ?>

    <p class="readmore"> <a href="<?php echo $link; ?>" title="<?php echo $this->escape($this->item->title); ?>">

    <?php if (!$this->item->params->get('access-view')) : ?>

    <span><?php echo JText::_('Register to read more...'); ?></span>

    <?php else : ?>

    <span><?php echo JText::_('Read more...'); ?></span>

    <?php endif; ?>

    </a> </p>

    <?php endif; ?>

    </div>

    <?php endif; ?>

    <!-- //Article tools -->

    <?php if ( intval($this->item->modified) != 0 && $this->item->params->get('show_modify_date')) : ?>

    <p class="modifydate">

    <?php $modified = T3Hook::_('t3_date_format', array($this->item->modified, 'frontpage.modified'));

    if (!$modified) $modified = JHTML::_('date', $this->item->modified, JText::_('DATE_FORMAT_LC2')) ?>

    <?php echo JText::sprintf('LAST_UPDATED2', $modified); ?> </p>

    <?php endif; ?>

    <?php if ($this->item->params->get('show_url') && $this->item->urls) : ?>

    <p class="article-url"> <a href="http://<?php echo $this->escape($this->item->urls) ; ?>" target="_blank"><?php echo $this->escape($this->item->urls); ?></a> </p>

    <?php endif; ?>

    </div>

    <div class="item-separator"></div>

    <?php echo $this->item->event->afterDisplayContent; ?>

    mfcphil Friend
    #410808

    you know when really you shouldn’t have asked…..:D:D:D

    how come this was only not working on the home/feature page? do you know?

    Phill Moderator
    #410821

    Yep, the designers put some code in the above file to fix the layout of the frontpage to their specific layout. I simply removed that code and place the image in the same div as the content.

    JA often use these sorts of forced layouts to make life easy for users who struggle to do these kinds of things. It does make it easy for people who want to layout something in their own style though.

    Actually, thinking about it we could have done things differently here. We could have used the template manager to hide the main content block completely on the frontpage only. We could then have put your little layout in a module in the same position.

    mfcphil Friend
    #410822

    oh….thats sounds like it would have been a good idea!

    Phill Moderator
    #410823

    Feel free to give that a go insetad. I have left the original default_item.php in the folder.

    Once restored (take a backup of my work incase you prefer it that way) you can try the following.

    Go into the template manager and make a copy of the profile you are using (profiles tab). In the copy select “Hide Main Content Block” and set it to hide.

    The go to the global tab and in the page assignments you can select that profile to appear on the featured (used to be called frontpage) page only.

    We then enable the content-mass-top position (I do not think it has been included in the xml file for the layout you are using bu that is a simple edit) and you can then put your content in a module in that position.

    mfcphil Friend
    #410825

    JA has come a long way!!! 😮

Viewing 8 posts - 16 through 23 (of 23 total)

This topic contains 23 replies, has 2 voices, and was last updated by  mfcphil 13 years, 2 months ago.

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