By Guest on Sunday, 21 May 2017
Replies 14
Likes 0
Views 1.2K
Votes 0
Hello,

I need to emphasize newly created and edited events, e.g. make them bold and red. This needs to be seen in year view and especially in printing layout. How can I do that?

Thanks in advance

Christian Schindler
Hello Christian,

How would you determine a newly created event? i.e. what time scale?

Many thanks
Tony
·
Monday, 22 May 2017 12:05
·
0 Likes
·
0 Votes
·
0 Comments
·
Created or modified no more than 14 days ago.
Sorry I wasn't clear about that.
·
Monday, 22 May 2017 22:23
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello,

I'm just wondering if we add in to {{days past:DAYS_PAST}} to the Layout editor which you can then use in the Class of the row of the layout editor?

Many thanks
Tony
·
Tuesday, 23 May 2017 11:44
·
0 Likes
·
0 Votes
·
0 Comments
·
I'm sorry but {{days past:DAYS_PAST}} didn't have any effect. Also tried JEVAGE, the same.
Couldn't find DAYS_PAST in the list. Only CREATED works - that's not what I want, although I tried somewhere to program my issue via PHP.
The thing is, even if it works for the events list (I had it once working), it's still not printed. Is the printing layout created in a different PHP file?

Greetings
Christian
·
Tuesday, 23 May 2017 20:58
·
0 Likes
·
0 Votes
·
0 Comments
·
By the, if this helps:

PHP Version : 5.6.30
MySQL Version : 5.5.40-log
Server Information : SunOS pubhttp://www5.belwue.de 5.10 Generic_150400-09 sun4u
Fix jQuery? : Yes
Load JEvents Bootstrap CSS? : Yes
Max Input Vars ? : 1000
Club code set? : Yes
User Agent : Mozilla/5.0 (Windows NT 10.0; WOW64; rv:53.0) Gecko/20100101 Firefox/53.0
Joomla : 3.7.1
component_com_jevents : 3.4.39
component_com_jce : 2.6.7.1
module_mod_jevents_cal : 3.4.39
module_mod_jevents_custom : 3.4.39
module_mod_jevents_filter : 3.4.39
module_mod_jevents_latest : 3.4.39
module_mod_jevents_legend : 3.4.39
module_mod_jevents_switchview : 3.4.39
layout_JEventsRuthinLayout : 3.4.6
plugin_content_jevents : 3.4.39
plugin_finder_jevents : 3.4.39
plugin_installer_jeventsinstaller : 3.4.39 (not enabled)
plugin_jevents_jevpopupdetail : 3.4.3 (not enabled)
plugin_search_eventsearch : 3.4.39
plugin_system_gwejson : 3.4.39 (not enabled)
·
Tuesday, 23 May 2017 21:01
·
0 Likes
·
0 Votes
·
0 Comments
·
Ah well, I just found out how to do it again (had the code for "repeat summary" section in defaultloadedfromtemplate on my hard drive all the time - seemingly was overwritten by update...).
But still it's printed black!! The printing view (after first click) ist perfect, but if then press on print button I get events like normal (all in black). Is there another helper for the printing layout??

If you wanna take a look: http://www.rsw.tbb.schule-bw.de/crw/index.php?option=com_jevents&task=year.listevents&year=2017&month=05&day=16&Itemid=1
·
Tuesday, 23 May 2017 21:30
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello,

It's not possible at present. I was asking if that would work for you?

Many thanks
Tony
·
Tuesday, 23 May 2017 22:43
·
0 Likes
·
0 Votes
·
0 Comments
·
Ah, no, it wouldn't. It needs to be visually clear!!
So, please please tell me where the printing layout is built.
·
Wednesday, 24 May 2017 18:04
·
0 Likes
·
0 Votes
·
0 Comments
·
What is we add a number in JEvents which is definable in the config which if event is less that this number in days it has a class of new so you can style it as you wish?

Many thanks
Tony
·
Thursday, 25 May 2017 09:10
·
0 Likes
·
0 Votes
·
0 Comments
·
I do not understand your description. Can you point it out more clearly?

This is the code I used, in /views/default/helpers/defaultloadedfromtemplate.php, beginning on line 943.


$start_publish = $row->getUnixStartDate();
$stop_publish = $row->getUnixEndDate();
$aktuell = strtotime($row->modified()); //vor maximal 7 Tagen eingetragene Links rot darstellen
$time_diff = time() - $aktuell;
if ($time_diff < 7*24*3600) {
$akt_farbe="#FF0000";
}
else {
$akt_farbe="#000000";
}
if ($stop_publish == $start_publish)
{
if ($row->noendtime())
{
$times = ' (<i>'.$start_time.'</i>)';
}
else if ($row->alldayevent())
{
$times = "";
}
else if ($start_time != $stop_time)
{
$times = ' (<i>'.$start_time . ' - ' . $stop_time_midnightFix.'</i>)';
}
else
{
$times = ' (<i>'.$start_time.'</i>)';
}
$times = '<font style="color:'.$akt_farbe.'">'. $start_date . $times . '</font><br/>';
}
·
Friday, 26 May 2017 15:57
·
0 Likes
·
0 Votes
·
0 Comments
·
Nothing new here? I still don't understand how to do your last suggestion...

I am aware now that window.print is a JS method, but by no means I understand why the redded events appear correctly in the popup window, but still are not printed...
·
Sunday, 04 June 2017 17:01
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello,

As stated several times we do not have a way of doing this at present. I am asking you questions as to what would work so I can code this into the next release.

Many thanks
Tony
·
Sunday, 04 June 2017 21:59
·
0 Likes
·
0 Votes
·
0 Comments
·
Hmm, didn't understand that - so yes, the last one sounds reasonable, if the number can be defined accurately.
Still I'd like to know why window.print offers a result that differs from the printed window...
·
Monday, 05 June 2017 11:35
·
0 Likes
·
0 Votes
·
0 Comments
·
Ok I'll try and get this into the next release.

Printing the window is different to the display of the website because this is how your template has done the component.php view. It's standard Joomla! Practice and web practice to be honest. You wouldn't want to print a black page on A4 so a white page is offered and so on.

Many thanks
Tony
·
Monday, 05 June 2017 13:11
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post