I'm trying to create a widget that includes the next six upcoming calendar events, and I'd like it to bold those events for just today. I have the calendar entry part working fine, but the bold part eludes me. Conceptually I know how to do it -- make a conditional formatting check -- but every time I try to code it, it doesn't work. So would someone be so kind as to look at what I currently have and tell me specifically how to code it properly?
Here's what I have for the entries:
#C0SM/d EEE hh:mma# #C0TITLE#
#C1SM/d EEE hh:mma# #C1TITLE#
...and so on. So if today is August 15 and the first event is August 15, and the second event is August 20, the widget currently shows something like this:
8/15 Sat 12:00PM Post to XDA and ask for help
8/20 Thu 03:00PM Check XDA for feedback
How I'd LIKE it to look would be like this:
8/15 Sat 12:00PM Post to XDA and ask for help
8/20 Thu 03:00PM Check XDA for feedback
If someone could reply to this with the exact, proper coding to make that would be fantastic. Thanks!
You can use an advanced parameters...
Code:
$#C0SMdy#=#DMdy#?{b}#C0SM/d EEE hh:mma# #C0TITLE#{/b}:#C0SM/d EEE hh:mma# #C0TITLE#$
and repeat for each entry in your list. I'm not certain how to set the calendar item to any date though.
Note: replace { and } with [ and ] for {b} and {/b}. When I placed the correct tag in the coding, it showed as bold here.
Related
I have a sort of agenda made in Zooper of my upcoming calendar appointments, but some events last more than a day (weekend away etc). How can I make this show a start and end date, instead of just the start? At the moment I have, for example:
Saturday 23 November - buy sausages - 11.00
Friday 29 November - weekend away - all day
Wednesday 4 December - do a big poo - all day
How could I make it say:
Saturday 23 November - buy sausages - 11.00
Fri 29 Nov - Sun 1 Dec - weekend away - all day
Wednesday 4 December - do a big poo - all day
Is this even possible? To normally show the date, but if the apoointment lasts more than a day make it show the start and end date? I'm trying to learn it but programming isn't my strong point! Thanks for any help.
edithswanneck said:
I have a sort of agenda made in Zooper of my upcoming calendar appointments, but some events last more than a day (weekend away etc). How can I make this show a start and end date, instead of just the start? At the moment I have, for example:
Saturday 23 November - buy sausages - 11.00
Friday 29 November - weekend away - all day
Wednesday 4 December - do a big poo - all day
How could I make it say:
Saturday 23 November - buy sausages - 11.00
Fri 29 Nov - Sun 1 Dec - weekend away - all day
Wednesday 4 December - do a big poo - all day
Is this even possible? To normally show the date, but if the apoointment lasts more than a day make it show the start and end date? I'm trying to learn it but programming isn't my strong point! Thanks for any help.
Click to expand...
Click to collapse
Zooper has two date tags per calendar event #C0S...# for the start date and #C0E...# for the end date. What you have to do is compare if the day/month combo of the start is equal to that of the end date and then show different strings based on that. In Zooper conditionals, this should look like this:
Code:
$#C0SddMM# = #C0EddMM#?<your same day string here>:<your different day string here>$
Hope this helps you out
Hi, thanks for that, but I'm afraid I'm totally lost still. I have this at the moment. So I'd change the first part (C0SEEEE dd MMMM, C1SEEEE etc) to what you said, but what exactly am I putting in the same/different day string bit?
Code:
[b]#C0SEEEE dd MMMM#[/b] - #C0TITLE# - $#C0D#=1?All Day:#C0SHH.mm#$
[b]#C1SEEEE dd MMMM#[/b] - #C1TITLE# - $#C1D#=1?All Day:#C1SHH.mm#$
[b]#C2SEEEE dd MMMM#[/b] - #C2TITLE# - $#C2D#=1?All Day:#C2SHH.mm#$
I'm away for a couple of days so if I don't reply soon I'm not being rude. Thanks again.
edithswanneck said:
Hi, thanks for that, but I'm afraid I'm totally lost still. I have this at the moment. So I'd change the first part (C0SEEEE dd MMMM, C1SEEEE etc) to what you said, but what exactly am I putting in the same/different day string bit?
Code:
[b]#C0SEEEE dd MMMM#[/b] - #C0TITLE# - $#C0D#=1?All Day:#C0SHH.mm#$
[b]#C1SEEEE dd MMMM#[/b] - #C1TITLE# - $#C1D#=1?All Day:#C1SHH.mm#$
[b]#C2SEEEE dd MMMM#[/b] - #C2TITLE# - $#C2D#=1?All Day:#C2SHH.mm#$
I'm away for a couple of days so if I don't reply soon I'm not being rude. Thanks again.
Click to expand...
Click to collapse
Here is my solution for the first day. Didn't test it in Zooper though.
HTML:
[b]$#C0SddMM# = #C0EddMM#?#C0SEEEE dd MMMM#:#C0SEEE dd MMM# - #C0EEEE dd MMM#$[/b] - #C0TITLE# - $#C0D#=1?All Day:#C0SHH.mm#$
Perfect, thanks very much!
And then a new problem arrives! The 1-day (all day) events are shown as a 2-day event, as here http://forum.xda-developers.com/showthread.php?t=2522974 I can't find the other thread he started, I'm guessing there's no workaround for that yet then if it's a Google matter?
Is there a way to highlight today's events in a different color font using the Zooper Themer Widget? I know this can be done using the integrated Zooper Calendar Widget (old Simple Calendar Widget) but I like the flexibility afforded by the Themer version. Perhaps using conditionals to test if an event occurs today?
thunderboy19 said:
Is there a way to highlight today's events in a different color font using the Zooper Themer Widget? I know this can be done using the integrated Zooper Calendar Widget (old Simple Calendar Widget) but I like the flexibility afforded by the Themer version. Perhaps using conditionals to test if an event occurs today?
Click to expand...
Click to collapse
bump!
Hi.
I use this code under Advanced Parameters to highlight (bright yellow) today events:
[c]$#C0SD#=#SDATED#?#ffffff00#$[/c]
if you have several lines in your calendar showing next events you have to change the number 0 in C0SD to the apropiate one (0=first event, 1=second event and so on)
@cierzo I tried what you suggested, but that's just not working. So by trial and error, I got this, and its working. It highlights the "Today Events" in white otherwise they're left gray (default color, in my case)
[c]$#C0SEEEE#=#DEEEE#?#ffffffff$[/c]
@thunderboy19 hope this helps.
Was thinking of the same issue yesterday, until I found your post.
sent from my BatPhone.
According to this page
w w w .zooper.org/wp/android/zw/variables-reference[/url]
(sorry, can't post links so, please, remove spaces to get there)
#DEEEE# stores the name of the day in long format so I think that your code will highlight any future event at the same weekday than today.
Don't know where I found the code that I posted but definetly is not correct thought worked for me.
Try this one instead:
[c]$#C0SyD#=#DyD#?#ffffffff$[/c]
"y" stands for year and "D" stands for day of year.
This should work fine
@cierzo my parameter is working just fine actually.
sent from my BatPhone.
karanrajkapur said:
@cierzo my parameter is working just fine actually.
sent from my BatPhone.
Click to expand...
Click to collapse
Try creating your next event (must be the first one as you are using C0S, can be in second, third,... using C1S, C2S...) on next friday, please.
cierzo said:
Try creating your next event (must be the first one as you are using C0S, can be in second, third,... using C1S, C2S...) on next friday, please.
Click to expand...
Click to collapse
@cierzo Well I have fb sync enabled, so I just changed the system date to 11th (as you might see in the screenshot) & it's just working fine. And its not that I'm arguing our trying to challenge your skill set, it's just what I came across over my usage experience. I may or may not be correct, but I'd learn by making corrections whenever this'd give any issues. No offence. Peace.
sent from my BatPhone.
No offence, dont' worry.
FIY I just tested your code and it's working as I said before: it highlights future events.
Anyway it's a fantasting widget with lots of possibilities.
I'll keep reading.
Cheers.
cierzo said:
No offence, dont' worry.
FIY I just tested your code and it's working as I said before: it highlights future events.
Anyway it's a fantasting widget with lots of possibilities.
I'll keep reading.
Cheers.
Click to expand...
Click to collapse
I suppose you're not changing the parameter values for the succeeding events. Like
C0SEEE for 1st,
C1SEEE for 2nd and,
C2SEEE for 3rd.
Cz all the events would be highlighted if you'd have set "C0SEEE" in all the lines. Hope you understood.
>>XPERIA Neo V<<
karanrajkapur said:
I suppose you're not changing the parameter values for the succeeding events. Like
C0SEEE for 1st,
C1SEEE for 2nd and,
C2SEEE for 3rd.
Cz all the events would be highlighted if you'd have set "C0SEEE" in all the lines. Hope you understood.
>>XPERIA Neo V<<
Click to expand...
Click to collapse
Let me explain:
Today is Saturday, April 5th
Imagine you have three events shown in your calendar and those events are today, next monday and next saturday
The #DEEEE# variable stores today's value: Saturday
#C0SEEE# stores 1st event day: Saturday. As #C0SEEE# = #DEEEE# ==> Highlighted
#C1SEEE# stores 2st event day: Monday. As #C1SEEE# != #DEEEE# ==> Normal
#C2SEEE# stores 3st event day: Saturday. As #C2SEEE# = #DEEEE# ==> Highlighted
(!= stands for not equal)
If you use other date values:
#DyD# stores 201495 (year 2014, 95th day of the year)
#C0SyD# stores 201495
#C1SyD# stores 201497
#C2SyD# stores 2014102
As you can see, only the first event value is equal to today's value.
@cierzo Now I got exactly what you meant.
Apologies.
Thanks bro.
>>XPERIA Neo V<<
I just came across this post and was hoping someone could fill me in. If my first event occurs today, then all the events are highlighted. Please let me know what I did wrong.
For the rich text I did edit text manually:
Code:
[tr=0,40][b ]#C0TITLE#[/b][/tr]
[c=#ffcccccc][tr=55][sr=0.7]#C0SMMM d HH:mm# - #C0EHH:mm# #C0LOC#[/sr][/tr][/c]
[tr=0,40][b ]#C1TITLE#[/b][/tr]
[c=#ffcccccc][tr=55][sr=0.7]#C1SMMM d HH:mm# - #C1EHH:mm# #C1LOC#[/sr][/tr][/c]
[tr=0,40][b ]#C2TITLE#[/b][/tr]
[c=#ffcccccc][tr=55][sr=0.7]#C2SMMM d HH:mm# - #C2EHH:mm# #C2LOC#[/sr][/tr][/c]
With advanced parameters:
Code:
$#C0SyD#=#DyD#?[c]#ffb8860b[/c]$
$#C1SyD#=#DyD#?[c]#ffb8860b[/c]$
$#C2SyD#=#DyD#?[c]#ffb8860b[/c]$
Hi,
I already made some calender widgets and it worked fine so far. Now I want something new, but don't know how to do. Let me explain:
I would like to pick up the first day with calendar event and then list time1 and event1 for day1 followed by time2 and event2 for day1.
Then show next date/day with calender event and then list time1 and event1 for day2 followed by time2 and event2 for day2, then time3 and event3 for day two and so on.
I found no samples for a solution, but maybe one of you has an idea how to do this?
Thanks
Joern
I'm not sure I understand your intent correctly, but it sounds like you're just making a calendar with a list of the upcoming events, is that correct? I have a widget for that. I can't attach the .zw file (and for some reason, can't make a zip - I'll have to look into that), but here's my template: https://dl.dropboxusercontent.com/u/9467385/calendar-tron.zw
The way I have it structured is 6x Rich Text, 3 for event names, 3 for the times. Here's the text I entered for each.
Name #1: #C0TITLE# (that's a zero, not the letter O)
Time #1: #C0SHH:mm#-#C0EHH:mm# (that prints the start and end times)
For the following events, just change the 0 to 1 for the next, then 2 for the next, etc.
Hope this helps.
All I need to know is in Zooper... can I display an image instead of the text displaying the day of the week... so for example... if I want to display a draw of a camel on Wednesday instead of the text 'Wednesday' or 'Wed' etc. can I do do this? I am sure it is possible... I just cannot figure out HOW Thanks for any help!
As you can tell from the below sample you can see that you should me able to write an expression that would allow you to not only change the date and time but to do exactly what you want. If you need any help please pm me and I'll help you out any way I can.
Cheers!
If I've been of help please hit the thanks button.
I$#BLEVN#>10?Good!:Look for a charger!$ will render “Good!” if battery level is greater than 10 or “Look for a charger!” otherwise
Rich Text [c=$#BLEVN# 10 && #BLEVN < 25 ? #FFFF00$$#BLEVN# >= 25 ? #00FF00$]#BLEVN#%[/c] will write battery level (es 10%) in RED if battery is 1) ? #C0EEEE$ will write first calendar entry day name writing “Today” if its today, “Tomorrow” if tomorrow, the name of the day otherwise
$#C0SHH:mm#!=00:00$ will render the starting HH:mm of first calendar event only if it is different than “00:00″
Is it August $#DM#=8?Yes:No$ will render “Is it August: Yes” during August, “Is it August: No” otherwise
$#LCN#!=Germany$ will render the Country name only if its not Germany (nothing otherwise)
$#C0D#=1?#C0Shh\:mm#$ will show the time of first calendar event start in 12 h format only if the entry is not an all day event (please remember to*escape*the “:” into “\:” otherwise it will be considered an “else” block!)
KiRyah said:
As you can tell from the below sample you can see that you should me able to write an expression that would allow you to not only change the date and time but to do exactly what you want. If you need any help please pm me and I'll help you out any way I can.
Cheers!
If I've been of help please hit the thanks button.
I$#BLEVN#>10?Good!:Look for a charger!$ will render “Good!” if battery level is greater than 10 or “Look for a charger!” otherwise
Rich Text [c=$#BLEVN# 10 && #BLEVN < 25 ? #FFFF00$$#BLEVN# >= 25 ? #00FF00$]#BLEVN#%[/c] will write battery level (es 10%) in RED if battery is 1) ? #C0EEEE$ will write first calendar entry day name writing “Today” if its today, “Tomorrow” if tomorrow, the name of the day otherwise
$#C0SHH:mm#!=00:00$ will render the starting HH:mm of first calendar event only if it is different than “00:00″
Is it August $#DM#=8?Yes:No$ will render “Is it August: Yes” during August, “Is it August: No” otherwise
$#LCN#!=Germany$ will render the Country name only if its not Germany (nothing otherwise)
$#C0D#=1?#C0Shh\:mm#$ will show the time of first calendar event start in 12 h format only if the entry is not an all day event (please remember to*escape*the “:” into “\:” otherwise it will be considered an “else” block!)
Click to expand...
Click to collapse
Hi! I saw this post of yours, I know it is late but I am trying to edit my calendar widget so that it displays the event in this format: *Month* *Day* *Day of the Week* *Time (if not an all day event)* *Event Title*
For example my first upcoming event is: Suits Season 5 Return @ January 27 at 6PM.
So the only way I could tweak it as closely to my preference displays as "Wed Jan 27 6:00PM Suits Season 5 Return". This is REALLY close to how I am trying to get it but the rich text is a bit complicated for me.
As of right now my current rich text is: #C0SEEE MMM d hh:mma# #C0TITLE#
I am trying to have it say, "Jan 27 - Wed - 6:00PM Suits Season 5 Return" AS well as for the time to disappear if it were an all day event instead. Do you think you can help me out with this? I tried to copy and paste in some of your code it wasn't really working for me.
I recently downloaded a pack for my Zooper Pro Widget which is supposed to show the weather and the next three events. All was going well until I realised all events were, seemingly, on a Monday. I went to set the date to, using today as an example, 05/08/15 (or similar), and thought I had it. However, all events are now seemingly happening on Mon 05/08, which definitely isn't right!
Can anybody help me set the current format to "Day of Week, Short Date, Event Name"?
The current code and how they show up for the three shown events are as follows.
i) Mon 5/8 - Book injection for 07/09/15
"[ b ]#C0SEEE # #Dd #/#DM #[/b ] - #C0TITLE#"
What I want: Mon 10/08 - Book injection for 07/09/15
I've put spaces in the code just so it doesn't go bold, etc. on here.
The next two are roughly the same but with different event names and the 0s replaced with 1s and 2s.
Any help guys?
Thanks
David.273 said:
i) Mon 5/8 - Book injection for 07/09/15
"[ b ]#C0SEEE # #Dd #/#DM #[/b ] - #C0TITLE#"
What I want: Mon 10/08 - Book injection for 07/09/15
Click to expand...
Click to collapse
Use: #C0SE dd/MM# - #C0TITLE#
What's happening with your code is its getting the event 0 day (#C0SEEE#), then today's date and month (#Dd# and #DM#). To get event 0's date and month (and whatever else) you apply the date codes to the #C0S...# code. So #C0Sdd# and #C0SMM# would work, but it is easier to combine them.