By kellyllek on
I have made a calendar block view on the home page here: http://www.stannespack500.org/ (on the right)
It is working, but events that don't have a specific time automatically become "All Day" events. That is fine, but how do I remove the "All Day" from those listings? I can't find the label. I know it should be simple but my head is about to explode from working the whole calendar thing out!
Thanks for any help...
Edit, unfortunately the client just changed the example by including all the times for events. But I still have the same issue with events where time is not specified.
Comments
Possible solution
Sorry if this doesn't answer the question, but I just ovverrided the theme_date_all_day_label() function found within the date.theme file of the date module (within the date/date directory)
This simple function allows you to customize the text that should display for an all day event. If you just leave an empty string inside the function rather then the text all day, then you will remove the all day text from the calendar. Granted, you should override this function in your template.php file rather than in the core module file by replacing theme with your theme name, in my case phptemplate_date_all_day_label()
Function as listed in my template.php file
function phptemplate_date_all_day_label() {
/** This overrides a theme found in the date module so that "All Day" will not display on the calendar.
To return to normal function replace the line with return t('(All day)'); or any other text that you would rather display
for an all day event. Might be better to override the whole them function rather than the label but this is an easy fix **/
return t('');
}
Worked perfectly
Thanks a lot. Just added this to template.php, cleared cache and it does exactly what I needed.
Update!
I just tried this code, and it didn't work. Instead of displaying nothing, it displayed 12 (why 12, I don't know). To fix this, I added the code for a space symbol,
.Here's the updated code snippet for anyone else that wants to do this.
--
David Needham
Great Fix!
graham2332 comment worked!
Thanks Graham! You saved me!
Removing (All day)
This thread might be useful, too:
http://drupal.org/node/367842
Way to go!
The first tip made everything to work.
Thank you graham2323.
Absolutely
I owe him lunch. It's on me.
With the new release 6.2.8 this became an issue for me.
My client complained that all of a sudden the words (All Day) were displaying after his exhibition dates. I told him he was crazy and that we had created a Custom Date format (at admin/settings/date-time/formats) for the date display.
Turns out what ever revision #1013662 did it added (All Day) to our custom date.
Fortunately, for this form I quickly found the answer and added:
To my template.php page.
Note to self: Read the Release Notes carefully!
function date_t($string,
function date_t($string, $context, $langcode = NULL)
Had to specify first argument: