-
AuthorPosts
-
November 20, 2016 at 11:16 pm #987914
Hi I have diffrent Problems with the date format. Some settings I could fix with the setings in the Modules from Jevents and the Overwrite for Language file, but some I can not find out where to setup… Can you have a idea?
See the pictures
Thanks
And a text little format Issue…
- Ninja Lead Moderator
Ninja Lead
- Join date:
- November 2014
- Posts:
- 16064
- Downloads:
- 310
- Uploads:
- 2864
- Thanks:
- 341
- Thanked:
- 3854 times in 3563 posts
November 21, 2016 at 3:11 am #987990Hi,
You can fix the date problem from event page on your site as below
- Open templates/ja_events_ii/html/com_jevents/default/range/listevents_body.php file
find and change
$class = $datenow->toFormat('%Y-%m-%d')>$row->startDate() ? "pastevent":"";
to
$class = $datenow->toFormat('%d-%M-%Y')>$row->startDate() ? "pastevent":"";
And a text little format Issue…
I could not see this on your site please let me know where to see it on your site
Regards
November 21, 2016 at 6:31 am #988036Hi Ninja Lead Thanks vor help. Sorry but your post did not work. Nothing happend. The Time is still in the format YYYY-MM-DD and it should be DD. MM. YYYY >> It is also important that we have a dot with a space ". " an not "-". And also the end Time is shown if we set it to no sepc. endtime (23:59:59) and On the homepage (klick to: http://www2.oberdorf.info/index.php) then there you can see how it should look like on http://www2.oberdorf.info/index.php/events
Here ist the Code in listevents_body.php
<?php
defined(‘_JEXEC’) or die(‘Restricted access’);$data = $this->data;
$Itemid = JEVHelper::getItemid();
?>
<div class="ja-events-list row equal-height equal-height-child">
<?php
$num_events = count($data[‘rows’]);
$chdate ="";
if( $num_events > 0 ){for( $r = 0; $r < $num_events; $r++ ){ $row = $data['rows'][$r]; $event_day_month_year = $row->dup() . $row->mup() . $row->yup(); // Ensure we reflect multiday setting if (!$row->eventOnDate(JevDate::mktime(0,0,0,$row->mup(),$row->dup(),$row->yup()))) continue; if(( $event_day_month_year <> $chdate ) && $chdate <> '' ){ } $datenow = JEVHelper::getNow(); $class = $datenow->toFormat('%d-%M-%Y')>$row->startDate() ? "pastevent":""; if( $event_day_month_year <> $chdate ){ $date =JEventsHTML::getDateFormat( $row->yup(), $row->mup(), $row->dup(), 1 ); } if( $event_day_month_year <> $chdate ){ } $link = $row->viewDetailLink($row->yup(), $row->mup(), $row->dup(), $Itemid); $listyle = 'style="background-color:'.$row->bgcolor().';"'; echo "<div class='col-sm-6 col-md-6 col-lg-4 col ".$class."'><div class='inner'>"; if ($row->get('imageimg1')) { ?> <div class="item-image"> <div class="img-intro-left"> <a href="<?php echo $link; ?>" title="<?php echo $row->title(); ?>" class="item-link"> <?php if ($row->customfields["event_span"]["value"] >= 2) { echo $row->get("imageimg1"); } else { echo $row->get("thumbimg1"); }?> </a> </div> </div> <?php } ?> <p <?php echo $listyle; ?> class="category" <?php $category_url = JRoute::_("index.php?option=com_jevents&view=range&layout=listevents&Itemid=".$Itemid."&catids=".$row->catid.""); ?> <a href="<?php echo $category_url; ?> "> <?php echo $row->catname(); ?></a> </p> <div class="item-main clearfix"> <!-- Item header --> <div class="header item-header clearfix"> <?php echo '<h2><a href="' . $row->viewDetailLink($row->yup(), $row->mup(), $row->dup(), $Itemid) . '">' . $row->title() . ' </a></h2>'; ?> <dl class="article-info"> <dd> <span class="icon-calendar"></span> <?php echo $row->startDate(); ?> </dd> <dd> <span class="icon-time"></span> <?php echo JEVHelper::getTime($row->getUnixStartTime(), $row->hup(), $row->minup()) . ' - '; echo JEVHelper::getTime($row->getUnixEndTime(), $row->hdn(), $row->mindn()); ?> </dd> <dd style="float:none;"> <span class="icon-globe"></span> <?php echo $row->location(); ?> </dd> </dl> <?php ?> </div> </div> <?php echo "</div></div>\n"; $chdate = $event_day_month_year; } } else { echo '<div class="col-sm-12"><p>' . "\n"; echo JText::_('JEV_NO_EVENTS') . '</p></div>'; } ?>
<?php
// Create the pagination object
if ($data["total"]>$data["limit"]){
$this->paginationForm($data["total"], $data["limitstart"], $data["limit"]);
}
?>Should it not be here: echo $row->startDate(); the changes?
See my file attched.
The Text issues you can see it on the 3. Picture above (again here)
Regards
Ninja Lead ModeratorNinja Lead
- Join date:
- November 2014
- Posts:
- 16064
- Downloads:
- 310
- Uploads:
- 2864
- Thanks:
- 341
- Thanked:
- 3854 times in 3563 posts
November 22, 2016 at 7:02 am #988454Hi,
Try to use my solution below
- Open templates/ja_events_ii/html/com_jevents/default/range/listevents_body.php file
find and change
<?php echo $row->startDate(); ?>
to
<?php echo JHtml::_('date', $row->startDate(), 'd. M. Y'); ?>
- About the text issue, you can add the CSS style below to templates/ja_events_ii/css/custom.css file
span.icon-hand-right + strong { overflow: hidden;display:block; } span.icon-hand-right { float: left; } .mod_events_latest_table.jevbootstrap .mod_events_latest .inner a { min-height: 20px; }
Hope it helps
Regards
November 24, 2016 at 4:28 pm #989414Hi Ninja
Thanks. This two things are working… But what is about the "not spezified endtime" as shown 23:59 that should not be shown…
See the home page… there ist a simple…Regards Theo
Ninja Lead ModeratorNinja Lead
- Join date:
- November 2014
- Posts:
- 16064
- Downloads:
- 310
- Uploads:
- 2864
- Thanks:
- 341
- Thanked:
- 3854 times in 3563 posts
November 25, 2016 at 1:45 am #989545Hi,
If you want to do that. May you need to make a custom work from JEVENTS component
Open components/com_jevents/libraries/helper.php fle
- find line 371
return JevDate::strftime("%#I:%M%p", $date);
change to
return JevDate::strftime("%#I:%M", $date);
- Find line 375
return strtolower(JevDate::strftime("%I:%M%p", $date));
change to
return strtolower(JevDate::strftime("%I:%M", $date));
Hope it helps
Regards
November 29, 2016 at 2:20 pm #990903This reply has been marked as private.Ninja Lead ModeratorNinja Lead
- Join date:
- November 2014
- Posts:
- 16064
- Downloads:
- 310
- Uploads:
- 2864
- Thanks:
- 341
- Thanked:
- 3854 times in 3563 posts
November 30, 2016 at 8:35 am #991173Hi,
You can try to use this way
- Open templates/ja_events_ii/html/com_jevents/default/range/listevents_body.php file
find and change
echo JEVHelper::getTime($row->getUnixStartTime(), $row->hup(), $row->minup()) . ' - '; echo JEVHelper::getTime($row->getUnixEndTime(), $row->hdn(), $row->mindn());
to
echo JHtml::_('date', $row->_startrepeat, "H:i"). ' - '; echo JHtml::_('date', $row->_endrepeat, "H:i");
Let me know if it helps.
Regards
AuthorPostsViewing 8 posts - 1 through 8 (of 8 total)This topic contains 7 replies, has 2 voices, and was last updated by Ninja Lead 7 years, 11 months ago.
We moved to new unified forum. Please post all new support queries in our New Forum
Jump to forum