Recent Topics

Missing container in bricks skin for item-info-line - how to customize

Started by on Jun 29, 2019 – Contents updated: Jul 01, 2019

Jun 29, 2019 10:19    

Hello

I wanted to add a change date in the info line beneath the title of a post in bricks skin.
First I customized the widget item-info-line, until I realized, that this has no effect on the bricks skin.
So could anyone of you advice me, how to handle this?

Thanks in advance
Will

PS: As a work around I added the widget to single element container. This way the last touched and changed dates are visible for visitors. But most of them look at the dates beneath the Heading and if there is no information that a post, started in 2017 has been updated recently they leave the page because they consinder it rather old.

Jun 29, 2019 12:17

Hi @saunders

Not sure if this is an option for you. You can look at my site https://calstock.org.uk/2015/09/19/the-first-six-pears

or see image below

You will see each post has both the date last updated and the creation date in the heading.

Here follows the code I have in my [skin/single.main.php and page.main.php] for example.

<h2 class="evo_post_title"><?php $Item->title(); ?><span class="updated">Updated: <?php $Item->mod_date($format =  'F jS, Y', $useGM = false ) ?></span></h2>
	 <?php	
	  $Item->author( array(
		 'before'			=> '<span class="author">'.T_('Author:-'),
		 'after' 			=> '</span>',
				) );
	// My alternative as format didn't work on /$Item->issue_date/ as it was not a UNIX timestamp
	  $issued=strtotime($Item->get('issue_date'));
	  echo '<span class="issued">Created: '. date('F jS, Y', $issued) .'</span>';
	 ?>

Jun 29, 2019 13:36

@amoun yes, this is clear information. In my case the subline (item-info) is defined in _item_block.inc
I managed some little customizing like date format but don't know how to add those special lines for printing contents update in echo.


Attachments:

Jun 29, 2019 14:01

Looking at the file /_item_block.inc.php

			// We want to display the post time:
			$Item->issue_time( array(
				'before'      => '',
				'after'       => '',
				'time_format' => 'M j, Y',
			) );

You could comment it out and try

$Item->mod_date($format = 'F jS, Y', $useGM = false)

I can't remember why I added $useGM = false
https://github.com/mgsolipa/b2evolution/commit/1afefe848d5343425c5b7967502a5bfd601a1a07

If it works you then have the two options and then work out where to place either or both

Jun 29, 2019 17:24

Hi again @saunders

I thought I'd look into the issue with your 'bricks' skin so installed it, thinking I could either edit that or find out about your initial issue of 'Missing container'

But what I have noticed is that in the version I have, 7, there exist the files I first mentioned, single.main.phpand page.main.php

So before I go any further, can you confirm if you have these files in what maybe version 6 ??

Jul 01, 2019 10:33

@amoun thank you for your patience and support

For SEO reasons I don't want to have the item info or part of it combined with title or tagged as hx.

Meanwhile I added this line to _item_block.inc.php
$Item->mod_date( $format = ' / j. M Y ', $useGM = false );

Now the item info line shows the "last touched date". That is a progress. mod_date shows last touch but I don't know the tag that shows "content updated.
Additionally I added the item info lline widet to item single container and so the information is given at the end of each post:

In this example "last touched" and "contents updated" share the same date. But there are other pages with different dates. E.g in case I do some work in customizing like adding another category the information only sets "last touched" to the actual date. That is correct, because the post itself has not been updated.

Do you know the Tag for contents updated?

Jul 01, 2019 14:46

Oh! So the 'mod_date' shows last touched not contents updated ??
Will look into it :)
Meanwhile from the data base table [evo_items__item] I can see the options.

This post has 2 feedbacks awaiting moderation...


Form is loading...

Responsive CMS – This forum is powered by b2evolution CMS, a complete engine for your website.