SimplePortal

Support => English Support => Topic started by: Rothana on November 03, 2014, 08:59:34 PM

Title: Calendar Information Block - Display Date Before Event Name
Post by: Rothana on November 03, 2014, 08:59:34 PM
I have done my due diligence in trying to find a post that answers this question.

I would like to change the display order in the Calendar Info block - date first then event name.

I am not showing birthdays or holidays, only care about events.

I see the place to change that is in PortalBlocks.php, lines 1944-1966.  However, every attempt I make to "rearrange" the code to display date then event breaks my forum.

Can someone show me what the code should look like?  Any assistance would be appreciated.
Title: Re: Calendar Information Block - Display Date Before Event Name
Post by: phantomm on November 06, 2014, 12:57:06 PM
Open file: ./Sources/PortalBlocks.php and make this changes:

Code: (Find) [Select]
<li>', sp_embed_image('event'), ' ', $event['link'], !$show_titles ? ' - ' . timeformat(forum_time(), '%d %b') : '', '</li>';
Code: (Replace with) [Select]
<li>', sp_embed_image('event'), ' ',!$show_titles ? '' . timeformat(forum_time(), '%d %b') : '',' ', $event['link'], '</li>';
Code: (Find) [Select]
<li>', sp_embed_image('event'), ' ', $event['link'], ' - ', timeformat(strtotime($startdate), '%d %b'), '</li>';
Code: (Replace with) [Select]
<li>', sp_embed_image('event'), ' ', timeformat(strtotime($startdate), '%d %b'), ' - ', $event['link'], '</li>';
Preview:
(http://i.imgur.com/iCwYaWx.png)
SimplePortal 2.3.8 © 2008-2024, SimplePortal