Page 1 of 1

iPod Calendar like Date in Theme

Posted: 25. March 2009 20:43
by Twizted
Your Portal Version: 1.0.2
Your phpBB Type: Standard phpBB3
MODs installed: No
Your knowledge: Advanced Knowledge
Boardlink: Local development server

What have you done before the problem was there?
N/A

What have you already tryed to solve the problem?
Studied extensively the language files and code to try to manipulate it myself.

Description and Message
I am trying without success to break down the date that is shown on news posts on the front page. The theme I am developing will have the date (Month and Day) shown like that of a iPod Touch Calendar icon only instead of the Day of the week and day (number) it would be the Month and Day (number)

Image

How would I have to do this. I have tried to no avail so now I ask you, the professionals... :)

Thanks

Re: iPod Calendar like Date in Theme

Posted: 26. March 2009 03:27
by Twizted
Success!!!

Thanks to some help from Daz over at phpbb.com I got it working...

http://www.phpbb.com/community/viewtopi ... &p=9057485

I placed this in my /portal/blocks/news.php at around line 59 and 90

Code: Select all

                'POST_DATE_DAY'      => date('j', strtotime($fetch_news[$i]['topic_time'])),
                'POST_DATE_MONTH'   => date('n', strtotime($fetch_news[$i]['topic_time'])),
                'POST_DATE_YEAR'   => date('F', strtotime($fetch_news[$i]['topic_time'])),
And this allowed me to use

Code: Select all

{news_row.POST_DATE_DAY}
{news_row.POST_DATE_MONTH}
{news_row.POST_DATE_YEAR}
to format my post date on the news posts which you can see at http://dragonmodz.eccomputerwizards.com/

The theme is still quite broken since it is still in development and this is just thrown into a publicly viewable area to show this feature.

Re: iPod Calendar like Date in Theme

Posted: 26. March 2009 11:59
by thomas.d
Very cool!