test
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • cstibi Friend
    #140922

    There is no article separator and extra line feed after articles in section blog view

    cstibi Friend
    #303832

    What have to modify in the files in my templates/ja_ruby/html/com_content/section folder to correct this problem?

    Css Magician Friend
    #303892

    <em>@cstibi 127599 wrote:</em><blockquote>What have to modify in the files in my templates/ja_ruby/html/com_content/section folder to correct this problem?</blockquote>

    Hi cstibi,

    yeah, that is a good idea

    cstibi Friend
    #303900

    Good idea… thanks!
    But I’m not a .php programmmer, don’t know what files/rows I have to modify

    Css Magician Friend
    #303907

    <em>@cstibi 127688 wrote:</em><blockquote>Good idea… thanks!
    But I’m not a .php programmmer, don’t know what files/rows I have to modify</blockquote>

    Hi cstibi ,

    Open templates/ja_ruby/html/com_content/section/blog.php
    replace all to code :
    [PHP]
    <?php // @version $Id: blog.php 10381 2008-06-01 03:35:53Z pasamio $
    defined(‘_JEXEC’) or die(‘Restricted access’);
    $cparams = JComponentHelper::getParams (‘com_media’);
    ?>

    <div id=”ja-contentheading”>
    <?php if ($this->params->get(‘show_page_title’)) : ?>
    <h1 class=”componentheading<?php echo $this->params->get(‘pageclass_sfx’); ?>”>
    <?php echo $this->escape($this->params->get(‘page_title’)); ?></h1>
    <?php endif; ?>

    <div class=”blog<?php echo $this->params->get(‘pageclass_sfx’); ?> clearfix”>

    <?php if ($this->params->def(‘show_description’, 1) || $this->params->def(‘show_description_image’, 1)) : ?>
    <div class=”contentdescription<?php echo $this->params->get(‘pageclass_sfx’); ?>”>

    <?php if ($this->params->get(‘show_description_image’) && $this->category->image) : ?>
    <img src=”<?php echo $this->baseurl . $cparams->get(‘image_path’) . ‘/’ . $this->category->image; ?>” class=”image_<?php echo $this->category->image_position; ?>” />
    <?php endif; ?>

    <?php if ($this->params->get(‘show_description’) && $this->category->description) :
    echo $this->category->description;
    endif; ?>

    <?php if ($this->params->get(‘show_description_image’) && $this->category->image) : ?>
    <div class=”wrap_image”> </div>
    <?php endif; ?>

    </div>
    <?php endif; ?>

    <?php $i = $this->pagination->limitstart;
    $rowcount = $this->params->def(‘num_leading_articles’, 1);
    for ($y = 0; $y < $rowcount && $i < $this->total; $y++, $i++) : ?>
    <div class=”leading<?php echo $this->params->get(‘pageclass_sfx’); ?>”>
    <?php $this->item =& $this->getItem($i, $this->params);
    //Leading image size
    $this->imageWidth = 559;
    $this->imageHeight =237;
    echo $this->loadTemplate(‘item’); ?>
    </div>
    <span class=”leading_separator<?php echo $this->params->get(‘pageclass_sfx’); ?>”> </span>
    <?php endfor; ?>

    <?php $introcount = $this->params->def(‘num_intro_articles’, 4);
    //intro image size
    $this->imageWidth = 260;
    $this->imageHeight = 120;
    if ($introcount) :
    $colcount = $this->params->def(‘num_columns’, 2);
    if ($colcount == 0) :
    $colcount = 1;
    endif;
    $rowcount = (int) $introcount / $colcount;
    $ii = 0;
    for ($y = 0; $y < $rowcount && $i < $this->total; $y++) : ?>
    <div class=”article_row<?php echo $this->params->get(‘pageclass_sfx’); ?> clearfix”>
    <?php for ($z = 0; $z < $colcount && $ii < $introcount && $i < $this->total; $z++, $i++, $ii++) : ?>
    <div class=”article_column column<?php echo $z + 1; ?> cols<?php echo $colcount; ?>” >
    <?php $this->item =& $this->getItem($i, $this->params);
    echo $this->loadTemplate(‘item’); ?>
    </div>
    <span class=”article_separator”> </span>
    <?php endfor; ?>
    <span class=”row_separator<?php echo $this->params->get(‘pageclass_sfx’); ?>”> </span>
    </div>
    <?php endfor;
    endif; ?>

    <?php $numlinks = $this->params->def(‘num_links’, 4);
    if ($numlinks && $i < $this->total) : ?>
    <div class=”blog_more<?php echo $this->params->get(‘pageclass_sfx’); ?>”>
    <?php $this->links = array_slice($this->items, $i – $this->pagination->limitstart, $i – $this->pagination->limitstart + $numlinks);
    echo $this->loadTemplate(‘links’); ?>
    </div>
    <?php endif; ?>

    <?php if ($this->params->def(‘show_pagination’, 2) == 1 || ($this->params->get(‘show_pagination’) == 2 && $this->pagination->get(‘pages.total’) > 1)) : ?>
    <?php if( $this->pagination->get(‘pages.total’) > 1 ) : ?>
    <p class=”pagenavcounter”>
    <?php echo $this->pagination->getPagesCounter(); ?>
    </p>
    <?php endif; ?>
    <?php if ($this->params->def(‘show_pagination_results’, 1)) : ?>
    <?php echo $this->pagination->getPagesLinks(); ?>
    <?php endif; ?>
    <?php endif; ?>

    </div>

    </div>

    [/PHP]

    and open templates/ja_ruby/html/com_content/section/blog_item.php replace all to code :
    [PHP]
    <?php // @version $Id: blog_item.php 11386 2009-01-04 02:34:35Z ian $
    defined(‘_JEXEC’) or die(‘Restricted access’);
    ?>
    <?php
    global $mainframe;
    require_once (JPATH_SITE.DS.’templates’.DS.$mainframe->getTemplate().DS.’ja_templatetools_1.5.php’);
    $image = JA_Tools::extractImage ($this->item, true, $this->imageWidth, $this->imageHeight);
    ?>

    <?php if ($this->user->authorize(‘com_content’, ‘edit’, ‘content’, ‘all’) || $this->user->authorize(‘com_content’, ‘edit’, ‘content’, ‘own’)) : ?>
    <div class=”contentpaneopen_edit<?php echo $this->item->params->get(‘pageclass_sfx’); ?>”>
    <?php echo JHTML::_(‘icon.edit’, $this->item, $this->item->params, $this->access); ?>
    </div>
    <?php endif; ?>

    <div class=”contentpaneopen<?php echo $this->item->params->get( ‘pageclass_sfx’ ); ?> clearfix”>

    <?php if (!$this->item->params->get(‘show_intro’)) :
    echo $this->item->event->afterDisplayTitle;
    endif; ?>

    <?php if (($this->item->params->get(‘show_section’) && $this->item->sectionid) || ($this->item->params->get(‘show_category’) && $this->item->catid)) : ?>
    <p class=”pageinfo”>
    <?php if ($this->item->params->get(‘show_section’) && $this->item->sectionid && isset($this->item->section)) : ?>
    <span>
    <?php if ($this->item->params->get(‘link_section’)) : ?>
    <?php echo ‘<a href=”‘.JRoute::_(ContentHelperRoute::getSectionRoute($this->item->sectionid)).'”>’; ?>
    <?php endif; ?>
    <?php echo $this->item->section; ?>
    <?php if ($this->item->params->get(‘link_section’)) : ?>
    <?php echo ‘</a>’; ?>
    <?php endif; ?>
    <?php if ($this->item->params->get(‘show_category’)) : ?>
    <?php echo ‘ – ‘; ?>
    <?php endif; ?>
    </span>
    <?php endif; ?>
    <?php if ($this->item->params->get(‘show_category’) && $this->item->catid) : ?>
    <span>
    <?php if ($this->item->params->get(‘link_category’)) : ?>
    <?php echo ‘<a href=”‘.JRoute::_(ContentHelperRoute::getCategoryRoute($this->item->catslug, $this->item->sectionid)).'”>’; ?>
    <?php endif; ?>
    <?php echo $this->item->category; ?>
    <?php if ($this->item->params->get(‘link_category’)) : ?>
    <?php echo ‘</a>’; ?>
    <?php endif; ?>
    </span>
    <?php endif; ?>
    </p>
    <?php endif; ?>

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

    <div class=”article-content”><div class=”ja-innerpad”>

    <?php if ($this->item->params->get(‘show_url’) && $this->item->urls) : ?>
    <span class=”small”>
    <a href=”<?php echo $this->item->urls; ?>” target=”_blank”>
    <?php echo $this->item->urls; ?></a>
    </span>
    <?php endif; ?>

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

    <?php if ($this->item->params->get(‘show_title’)) : ?>
    <h2 class=”contentheading<?php echo $this->item->params->get(‘pageclass_sfx’); ?>”>
    <?php if ($this->item->params->get(‘link_titles’) && $this->item->readmore_link != ”) : ?>
    <a href=”<?php echo $this->item->readmore_link; ?>” class=”contentpagetitle<?php echo $this->item->params->get(‘pageclass_sfx’); ?>”>
    <?php echo $this->escape($this->item->title); ?></a>
    <?php else :
    echo $this->escape($this->item->title);
    endif; ?>
    </h2>
    <?php endif; ?>

    <?php if ((intval($this->item->modified) !=0 && $this->item->params->get(‘show_modify_date’)) || ($this->item->params->get(‘show_author’) && ($this->item->author != “”)) || ($this->item->params->get(‘show_create_date’))) : ?>

    <div class=”article-toolswrap”>
    <div class=”article-tools clearfix”>
    <div class=”article-meta”>

    <?php if ($this->item->params->get(‘show_create_date’)) : ?>
    <span class=”createdate”>
    <?php echo JHTML::_(‘date’, $this->item->created, ‘%a – %d <span class=”month”>%b</span> %y’); ?>
    </span>
    <?php endif; ?>

    <?php if (($this->item->params->get(‘show_author’)) && ($this->item->author != “”)) : ?>
    <span class=”createdby”>
    <?php JText::printf(‘Written by’, ($this->item->created_by_alias ? $this->item->created_by_alias : $this->item->author)); ?>
    </span>
    <?php endif; ?>

    </div>

    <?php if ($this->item->params->get(‘show_pdf_icon’) || $this->item->params->get(‘show_print_icon’) || $this->item->params->get(‘show_email_icon’)) : ?>
    <!– BUTTON HEADING –>
    <div class=”buttonheading”>
    <?php if ($this->item->params->get(‘show_email_icon’)) : ?>
    <span>
    <?php echo JHTML::_(‘icon.email’, $this->item, $this->item->params, $this->access); ?>
    </span>
    <?php endif; ?>

    <?php if ( $this->item->params->get( ‘show_print_icon’ )) : ?>
    <span>
    <?php echo JHTML::_(‘icon.print_popup’, $this->item, $this->item->params, $this->access); ?>
    </span>
    <?php endif; ?>

    <?php if ($this->item->params->get(‘show_pdf_icon’)) : ?>
    <span>
    <?php echo JHTML::_(‘icon.pdf’, $this->item, $this->item->params, $this->access); ?>
    </span>
    <?php endif; ?>
    </div>
    <!– // BUTTON HEADING –>
    <?php endif; ?>

    <?php if ($this->item->params->get(‘show_url’) && $this->item->urls) : ?>
    <span class=”article-url”>
    <a href=”http://<?php echo $this->item->urls ; ?>” target=”_blank”>
    <?php echo $this->item->urls; ?></a>
    </span>
    <?php endif; ?>

    </div>
    </div>
    <?php endif; ?>

    <div class=”img-desc clearfix”>
    <?php echo $image; ?>
    </div>

    <div class=”ja-article-content”>
    <?php echo JFilterOutput::ampReplace($this->item->text); ?>
    </div>

    <!– MODIFY DATE –>
    <?php if ( intval($this->item->modified) != 0 && $this->item->params->get(‘show_modify_date’)) : ?>
    <span class=”modifydate”>
    <?php echo JText::sprintf(‘LAST_UPDATED2’, JHTML::_(‘date’, $this->item->modified, ‘%a – %d <span class=”month”>%b</span> %y’)); ?>
    </span>
    <?php endif; ?>
    <!– //MODIFY DATE –>

    <?php if ($this->item->params->get(‘show_readmore’) && $this->item->readmore) : ?>
    <a href=”<?php echo $this->item->readmore_link; ?>” title=”<?php echo $this->item->title; ?>” class=”readon<?php echo $this->item->params->get(‘pageclass_sfx’); ?>”>
    <?php if ($this->item->readmore_register) :
    echo JText::_(‘Register to read more…’);
    elseif ($readmore = $this->item->params->get(‘readmore’)) :
    echo $readmore;
    else :
    echo JText::_(‘More info +’);
    endif; ?></a>
    <?php endif; ?>

    </div></div>

    </div>

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

    [/PHP]
    Good luck for you

    cstibi Friend
    #303922

    Hi duchh, thank you very much!

    Your solution is ok, but it would be better if the and the will be in one row,
    like this: 2009.05.07 | section name

    thanks,
    cstibi

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

This topic contains 6 replies, has 2 voices, and was last updated by  cstibi 15 years, 7 months ago.

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