- Posts: 43
- Thank you received: 0
sermon_time
21 Sep 2013 17:33 - 21 Sep 2013 17:34 #3889
by marsu
sermon_time was created by marsu
Last edit: 21 Sep 2013 17:34 by marsu.
Please Log in or Create an account to join the conversation.
- Thomas Hunziker
- Offline
- Administrator
22 Sep 2013 08:13 #3892
by Thomas Hunziker
Replied by Thomas Hunziker on topic sermon_time
I have an idea, yes. And it's easy
I'm not at my computer until tomorrow but you can have a look at the JHtml:Date() function. You need that twice, once for the month and once for the day. The function takes a format string where you can only return the day or month part if you like. Usually SermonSpeaker takes this string from the language files using JText but you can also use you own format.
I'm not at my computer until tomorrow but you can have a look at the JHtml:Date() function. You need that twice, once for the month and once for the day. The function takes a format string where you can only return the day or month part if you like. Usually SermonSpeaker takes this string from the language files using JText but you can also use you own format.
Please Log in or Create an account to join the conversation.
- Thomas Hunziker
- Offline
- Administrator
22 Sep 2013 23:22 #3894
by Thomas Hunziker
Replied by Thomas Hunziker on topic sermon_time
Something like that should do what you want:
For the format string you can have a look at php.net/manual/function.date.php
Code:
<span class="month"><?php echo JHtml::Date($item->sermon_date, 'M', true); ?></span>
<span class="day"><?php echo JHtml::Date($item->sermon_date, 'j', true); ?></span>
For the format string you can have a look at php.net/manual/function.date.php
Please Log in or Create an account to join the conversation.
24 Sep 2013 21:44 - 24 Sep 2013 21:45 #3899
by marsu
Replied by marsu on topic sermon_time
thx!
if somebody needs it:
if somebody needs it:
Code:
<date style="border-right: 1px solid;
color: #303030;
float: left;
font-family: Arial,Helvetica,sans-serif;
margin-right: 15px;
padding: 2px 5px;
text-align: center;
width: 30px;">
<span style="display: block;
font-size: 8px;
line-height: 8px;
margin-bottom: 1px;
text-transform: uppercase;"><?php echo JHtml::Date($item->sermon_date, 'M', true); ?></span>
<span style=" display: block;
font-size: 12px;
font-weight: bold;
line-height: 12px;"><?php echo JHtml::Date($item->sermon_date, 'j', true); ?></span>
Last edit: 24 Sep 2013 21:45 by marsu.
Please Log in or Create an account to join the conversation.
- Thomas Hunziker
- Offline
- Administrator
24 Sep 2013 21:56 #3900
by Thomas Hunziker
Replied by Thomas Hunziker on topic sermon_time
Do you have a page where I can see how it looks? Sounds like an interesting thing to improve the tiles layouts
Please Log in or Create an account to join the conversation.
Time to create page: 0.115 seconds