Is it possible to modify the "most recent" block so that it also displays the date and time the story was posted? By default it only displays this...
"TITLE by AUTHOR RATING
SHORT DESCRIPTION"
Thanks for any help in achieving this.
eFic doesn't log when a chapter was posted, so the only date that could display would probably be the last updated or posted originally? Unless you added a chapter date. 🙂
Try {updated} as a skin variable.
ETA:
You'll have to include it in the blocks admin panel/tpl file.
archive:
site:
Available for skin/mod commission! 🙂
My most recent block displays when a chapter was added (not updated). Let me see if I can figure out how I did it...
In your recent.php, find around line 16
include(_BASEDIR."includes/storyblock.php");
and add this after
$tpl->assign("recent_update" , date("m/d", $stories['updated']) );
You'll have to make sure your recent block is set to "use tpl" and add {recent_update} to your index.tpl
"m/d" will only display the month and the date. For other date strings, see this page: http://us2.php.net/manual/en/function.date.php
I followed your instructions Carissa but I dont notice any changes.
I added the code for the recent update,I also edited both the skin and the base index.tpl to add the {recent_update} (just because I wasnt sure which one needed it) and yes I changed the block to use the tpl.
Check for a variables.php file in your skin and any lines mentioning the recent block.
$blocks["recent"]["status"] = 2;
$blocks['recent']['tpl'] = 0;
this? I'm assuming I need to edit the 0 into a 1?
Yes, or if you're going to want the date to appear in every skin, then just remove that line.
Well that had an effect. When I change that variable the recent block comes up almost empty. all I see is "on" which I have a feeling comes from my skin index.tpl which has this section...
<div class="block">
<div class="title">{recent_title}</div>
<div class="content">{recent_content} on {recent_update}</div>
</div>
So why would it only display the "on" and not the content from the tags?
Because you switched to use tpls so that means you'll have to use the variables. Mine looks like this:
<div class="block">
<div class="title">{recent_title}</div>
<!-- START BLOCK : recentblock -->
<div class="title">{recent_update} - {title} by {author} [{rating}]</div>
<div class="content">{summary}</div>
<!-- END BLOCK : recentblock -->
</div>
Adjust as necessary.
ETA: To fix coding.
