Monday, April 6, 2009

Digitalpoint Style "days old" phpBB3 MOD

One of the things I like about the Digitalpoint forum listings is that little gray indicator to the right of thread titles that lets you know how old a topic is in days. I don't think I've seen this handy little notice anywhere other than Digitalpoint (at least before now) and it kinda boggles my mind as to why.

Especially for phpBB3 forums, where adding it is as simple as adding a single line in three files.
Here's a screenshot of the prosilver theme with the MOD applied.

phpBB3 days old mod

And here's what needs to be done, and the order to do it so you don't get any errors during the change.

First open /language/en/viewforum.php and find the following line,
 'VIEW_FORUM_TOPICS'  => '%d topics',


After that line add this line and then save/upload the file.
 'OLD'     => 'old',


Next open /viewforum.php and find the following line,
   'TOPIC_TITLE'  => censor_text($row['topic_title']),


After that line add the following line then save/upload the file.
   'TOPIC_AGE_DAYS' => round((time() - $row['topic_time']) / 86400),


Next open /styles/prosilver/template/viewforum_body.html and find the following piece of code which will be at the end of the line it is on.
<a href="{topicrow.U_VIEW_TOPIC}" class="topictitle">{topicrow.TOPIC_TITLE}</a>


After that line add the following line then save/upload the file.
<!-- IF topicrow.TOPIC_AGE_DAYS > 0 --><small style="color:#999;"> - {topicrow.TOPIC_AGE_DAYS} <!-- IF topicrow.TOPIC_AGE_DAYS > 1 -->{L_DAYS}<!-- ELSE -->{L_DAY}<!-- ENDIF --> {L_OLD}</small><!-- ENDIF -->


Once those changes are made, clear the cache from the ACP and you should be up and running.

Thursday, April 2, 2009

apple-touch-icon

Have you looked at a website lately and saw a meta/link element with a rel attribute of apple-touch-icon wondering what it is ?

Well, it's similar to a favicon, except it's for the iPhone and iPod Touch menu screens. Apple calls them Web Clips.

Here's an actual example from Twitter.



<link href="http://assets1.twitter.com/images/twitter_57.png" rel="apple-touch-icon" />


You can use these elements to define the icon iPhone and iTouch users should use when they save your web appicaitons address on their device. Just like when browser users bookmark a page.

It's basically just a 57x57 pixel PNG image with no special effects applied. The device itself will add rounded corners, a drop-shadow, and a glassy reflection.

Here's some more details from Apple.