[EventCalendar] Is there a way to add spans around each date element in an upcoming eventlist?

Jonah West jonah at jonahcoyote.com
Sat Jul 4 16:41:02 UTC 2009


Hey Larissa,

If you're using 3.2 beta2 you can turn the iconlets feature on which  
almost achieves what you want and then you just need to modify the  
code a little in template_functions_new.php around line 644 - 703 to  
change the markup for the iconlet. Try that out...

Alternatively, I also played with some of the code in  
template_functions.php to wrap the data in my own markup like so:

define('EC3_DEFAULT_TEMPLATE_EVENT','<a href="%LINK%">%TITLE% (%TIME 
%)</a>');
define('EC3_DEFAULT_TEMPLATE_DAY',  '%DATE%:');
define('EC3_DEFAULT_DATE_FORMAT',   'j F');
define('EC3_DEFAULT_TEMPLATE_MONTH','');
define('EC3_DEFAULT_MONTH_FORMAT',  'F Y');
define('EC3_DEFAULT_FORMAT_SINGLE','<li class="day">%1$s</li>');
define('EC3_DEFAULT_FORMAT_RANGE','<li class="time">%1$s %3$s %2$s</ 
li>');
define('EC3_DEFAULT_FORMAT_WRAPPER','<div  
class="ec3_schedule"><h3>Event Dates and Times</h3><ul>%s</ul></div>');

Thanks not exactly what you want to do but I hope that gives you some  
hints.

- Jonah

On Jul 4, 2009, at 11:17 AM, Larissa Meek wrote:

> I wanted to style the dates in an upcoming event list to look like a  
> date badge. Like the example in this tutolrial: http://oncemade.com/2009/04/26/create-date-badge-with-wordpress-and-css/
>
> Basically I need to add span tags around the EC3_DEFAULT_DATE_FORMAT  
> output so instead of it simply listing:
>
> Sunday, June 28th
>
> I would like this:
>
> <span class="day_name">Thursday</span>
> <span class="month_name">June</span>
> <span class="day_number">28th</span>
>
>
> The name of the classes doesn't matter -as long as I have the  
> ability to style each element. I attempted to play with the PHP code  
> trying to inject spans into the templatefunctions.php file but to no  
> avail I just broke the plugin. I'm not a pro at PHP but I get the  
> basics.
>
> define('EC3_DEFAULT_DATE_FORMAT',   'l, F jS');
>
> Is there a way to seperate the elements above with <span></span> and  
> a class?
>
> Thanks!
>
>
> _______________________________________________
> Blog: http://wpcal.firetree.net/
> EventCalendar at firetree.net mailing list
> Unsubscribe: http://penguin.firetree.net/eventcalendar

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://penguin.firetree.net/pipermail/eventcalendar/attachments/20090704/e1c86246/attachment.html


More information about the EventCalendar mailing list