Welcome, Guest
Username: Password: Remember me

TOPIC: [SOLVED] Don't show time in mod_jem

[SOLVED] Don't show time in mod_jem 1 month 1 week ago #25459

  • jojo12
  • jojo12's Avatar
  • Offline
  • Moderator
  • Posts: 2945
  • Thank you received: 293
  • Karma: 45
I found a solution for you, because you only need no time in every place (even not in simple list)
And remember: This is a hack, after an update you have to redo:
in modules/mod_jem/helper.php
you look for
$lists[$i]->dateinfo = JemOutput::formatDateTime($row->dates, $row->times, $row->enddates, $row->endtimes, 
$dateFormat, $timeFormat, $addSuffix);
and replace it with
$lists[$i]->dateinfo = JemOutput::formatDateTime($row->dates, $row->times, $row->enddates, $row->endtimes, $row->jemsettings->showtime, $dateFormat, $timeFormat, $addSuffix);

Go then to settings and choose in list layout "no time display"
5.5.5-10.0.30-MariaDB-0+deb8u1
PHP 7.2.9 on different sites
Apache
JEM 2.2.3+ template overrides with JEM RESPONSIVE and specials with Joomla! 3.8.13 stable on livesites
ja_simply, ja_purity_iii, multilingual DE EN IT FR
The administrator has disabled public write access.

[SOLVED] Don't show time in mod_jem 1 month 1 week ago #25463

  • biosin
  • biosin's Avatar
  • Offline
  • Fresh Boarder
  • Posts: 6
  • Karma: 0
Undefined property: stdClass::$jemsettings

Also, my output.class.php function has the a different definition:
static public function formatDateTime($dateStart, $timeStart ='', $dateEnd = '', $timeEnd = '', $dateFormat = '', $timeFormat = '', $addSuffix = true, $showTime = true, $showDayLink = false)

Anyway, your fix, even if it worked, wouldn't be more helpful than the one I posted in the other thread:
$lists[$i]->dateinfo = JemOutput::formatDateTime($row->dates, $row->times, $row->enddates, $row->endtimes,
			                                                 $dateFormat, $timeFormat, $addSuffix, false);
The administrator has disabled public write access.

[SOLVED] Don't show time in mod_jem 1 month 1 week ago #25465

  • jojo12
  • jojo12's Avatar
  • Offline
  • Moderator
  • Posts: 2945
  • Thank you received: 293
  • Karma: 45
yes, you're right. My solution gives this notice. When I disable the error notices, it works without any visible problems: only date, no comma, no time.
Perhaps it needs some definition in this helper file. Perhaps helps an other person, because me I am not a programmer!
5.5.5-10.0.30-MariaDB-0+deb8u1
PHP 7.2.9 on different sites
Apache
JEM 2.2.3+ template overrides with JEM RESPONSIVE and specials with Joomla! 3.8.13 stable on livesites
ja_simply, ja_purity_iii, multilingual DE EN IT FR
The administrator has disabled public write access.

[SOLVED] Don't show time in mod_jem 1 month 3 days ago #25467

  • jojo12
  • jojo12's Avatar
  • Offline
  • Moderator
  • Posts: 2945
  • Thank you received: 293
  • Karma: 45
my solution:
I added in site/modules/mod_jem/helper.php in about line 34
$showTime = false;
and as I wrote before then in about line 126 $showtime:
$lists[$i]->dateinfo = JemOutput::formatDateTime($row->dates, $row->times, $row->enddates, $row->endtimes, $showTime, $dateFormat, $timeFormat, $addSuffix);

even with error reporting "develop" I get no error notification.
5.5.5-10.0.30-MariaDB-0+deb8u1
PHP 7.2.9 on different sites
Apache
JEM 2.2.3+ template overrides with JEM RESPONSIVE and specials with Joomla! 3.8.13 stable on livesites
ja_simply, ja_purity_iii, multilingual DE EN IT FR
The administrator has disabled public write access.
Time to create page: 0.159 seconds

Donate

If you find JEM useful and if you use it on your site, please consider a donation to the project.

Private Messages

You are not logged in.

Follow us......