<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><div>Hi Mike</div><div><br></div><div><span class="Apple-tab-span" style="white-space:pre">        </span>See line 73 of the cgi/latest script -- there's a block that looks like this:</div><div><br></div><div><span class="Apple-tab-span" style="white-space:pre">        </span><a href="https://github.com/eprints/eprints/blob/3.3/cgi/latest#L73">https://github.com/eprints/eprints/blob/3.3/cgi/latest#L73</a></div><div><br><span class="Apple-tab-span" style="white-space:pre">        </span>else<br><span class="Apple-tab-span" style="white-space:pre">        </span>{<br><span class="Apple-tab-span" style="white-space:pre">                </span>my $dow = (localtime(time-$d*86400))[6];<br><span class="Apple-tab-span" style="white-space:pre">                </span>$day = $session-&gt;html_phrase( "cgi/latest:day_".$dow );<br><span class="Apple-tab-span" style="white-space:pre">        </span>}<br><br></div><div><span class="Apple-tab-span" style="white-space:pre">        </span>If you look at the documentation for localtime (&nbsp;<a href="http://perldoc.perl.org/functions/localtime.html">http://perldoc.perl.org/functions/localtime.html</a>&nbsp;), you'll see that it returns an array of 'bits' of the date (with the weekday at index 6, which is what is collected above).</div><div><br></div><div><span class="Apple-tab-span" style="white-space:pre">        </span>Something like this should work:</div><div><br></div><div><span class="Apple-tab-span" style="white-space:pre">                </span>my $date_string = EPrints::Time::human_time($time-$d*86400);</div><div><br></div><div><span class="Apple-tab-span" style="white-space:pre">        </span>OR</div><div><br></div><div><span class="Apple-tab-span" style="white-space:pre">                </span>my (<span class="i" style="color: rgb(0, 104, 139); font-family: monospace; font-size: 12.4800004959106px; white-space: pre-wrap; widows: 1;">$sec</span><span class="cm" style="font-family: monospace; font-size: 12.4800004959106px; white-space: pre-wrap; widows: 1;">,</span><span class="i" style="color: rgb(0, 104, 139); font-family: monospace; font-size: 12.4800004959106px; white-space: pre-wrap; widows: 1;">$min</span><span class="cm" style="font-family: monospace; font-size: 12.4800004959106px; white-space: pre-wrap; widows: 1;">,</span><span class="i" style="color: rgb(0, 104, 139); font-family: monospace; font-size: 12.4800004959106px; white-space: pre-wrap; widows: 1;">$hour</span><span class="cm" style="font-family: monospace; font-size: 12.4800004959106px; white-space: pre-wrap; widows: 1;">,</span><span class="i" style="color: rgb(0, 104, 139); font-family: monospace; font-size: 12.4800004959106px; white-space: pre-wrap; widows: 1;">$mday</span><span class="cm" style="font-family: monospace; font-size: 12.4800004959106px; white-space: pre-wrap; widows: 1;">,</span><span class="i" style="color: rgb(0, 104, 139); font-family: monospace; font-size: 12.4800004959106px; white-space: pre-wrap; widows: 1;">$mon</span><span class="cm" style="font-family: monospace; font-size: 12.4800004959106px; white-space: pre-wrap; widows: 1;">,</span><span class="i" style="color: rgb(0, 104, 139); font-family: monospace; font-size: 12.4800004959106px; white-space: pre-wrap; widows: 1;">$year</span><span class="cm" style="font-family: monospace; font-size: 12.4800004959106px; white-space: pre-wrap; widows: 1;">,</span><span class="i" style="color: rgb(0, 104, 139); font-family: monospace; font-size: 12.4800004959106px; white-space: pre-wrap; widows: 1;">$wday</span><span class="cm" style="font-family: monospace; font-size: 12.4800004959106px; white-space: pre-wrap; widows: 1;">,</span><span class="i" style="color: rgb(0, 104, 139); font-family: monospace; font-size: 12.4800004959106px; white-space: pre-wrap; widows: 1;">$yday</span><span class="cm" style="font-family: monospace; font-size: 12.4800004959106px; white-space: pre-wrap; widows: 1;">,</span><span class="i" style="color: rgb(0, 104, 139); font-family: monospace; font-size: 12.4800004959106px; white-space: pre-wrap; widows: 1;">$isdst</span>) = localtime(time-$d*86400);</div><div><span class="Apple-tab-span" style="white-space:pre">                </span>my $date_string = join('/', ($mday, $mon, $year)); #or however you want to build your date string.</div><div><br></div><div><span class="Apple-tab-span" style="white-space:pre">        </span>...then replicate the line that passes this value to a phrase (you should probably create a new one).</div><div><br></div><div><span class="Apple-tab-span" style="white-space:pre">        </span>(note that I've just typed these code fragments into my email, so they may not even compile)</div><div><br></div><div><span class="Apple-tab-span" style="white-space:pre">        </span>As a best practice, you should copy the script and modify in a different file (call it latest-6-months or something), and then link to it from your repository.</div><div><br></div><div><div apple-content-edited="true"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><div>--<br>Adam Field<br>Business Relationship Manager and Community Lead<br>EPrints Services</div><div><br></div><div>I am currently not working in the UK. &nbsp;Due to timezone differences (GMT -9) email responses may take longer.</div><div><br></div></div></div></div><br><div><div>On 10 Jul 2015, at 04:42, Michael Street &lt;<a href="mailto:mstreet@yorku.ca">mstreet@yorku.ca</a>&gt; wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><font face="Default Sans Serif,Verdana,Arial,Helvetica,sans-serif" size="2">
Hi,<div><br></div><div>Thanks for the help everyone. &nbsp;Is it possible to have it show the full date of the submission as the section title, rather than just the day? &nbsp;We're going back 6 months so a proper date is needed.</div>
<div><br></div><div>Thanks,</div><div>Mike.</div><div><br><div><br><font color="#990099">
-----<a href="mailto:eprints-tech-bounces@ecs.soton.ac.uk">eprints-tech-bounces@ecs.soton.ac.uk</a> wrote: -----</font><div style="padding-left:5px;">
<div style="padding-right:0px;padding-left:5px;border-left:solid black 2px;">
To: "'<a href="mailto:eprints-tech@ecs.soton.ac.uk">eprints-tech@ecs.soton.ac.uk</a>'" &lt;<a href="mailto:eprints-tech@ecs.soton.ac.uk">eprints-tech@ecs.soton.ac.uk</a>&gt;<br>
From: John Salter <j.salter@leeds.ac.uk><br>Sent by: <a href="mailto:eprints-tech-bounces@ecs.soton.ac.uk">eprints-tech-bounces@ecs.soton.ac.uk</a><br>
Date: 07/07/2015 05:08AM<br>Subject: [EP-tech] Re: Edit 'Latest Additions' page<br>
<br><!--[if gte mso 9]><xml><o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml><o:shapelayout v:ext="edit"><o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--><div class="WordSection1"><p class="MsoNormal">
<span style="font-size: 11pt; font-family: Calibri, sans-serif;"><font color="#1f497d">
Hi Mike,<o:p></o:p></font></span></p><p class="MsoNormal"><span style="font-size: 11pt; font-family: Calibri, sans-serif;">
<font color="#1f497d">The code that is called is ~/cgi/latest<o:p></o:p>
</font></span></p><p class="MsoNormal"><span style="font-size: 11pt; font-family: Calibri, sans-serif;">
<font color="#1f497d"><o:p>&nbsp;</o:p></font></span></p><p class="MsoNormal">
<span style="font-size: 11pt; font-family: Calibri, sans-serif;"><font color="#1f497d">
Instead of editing the copy there, make a copy:<o:p></o:p></font></span>
</p><p class="MsoNormal"><span style="font-size: 11pt; font-family: Calibri, sans-serif;">
<font color="#1f497d">~/archives/ARCHIVEID/cgi/latest<o:p></o:p></font>
</span></p><p class="MsoNormal"><span style="font-size: 11pt; font-family: Calibri, sans-serif;">
<font color="#1f497d"><o:p>&nbsp;</o:p></font></span></p><p class="MsoNormal">
<span style="font-size: 11pt; font-family: Calibri, sans-serif;"><font color="#1f497d">
Look for the line:<o:p></o:p></font></span></p><p class="MsoNormal" style="text-indent:36.0pt">
<span style="font-size: 11pt; font-family: Calibri, sans-serif;"><font color="#1f497d">
my $date = time() - 86400 * 7; # 7 days<o:p></o:p></font></span></p><p class="MsoNormal">
<span style="font-size: 11pt; font-family: Calibri, sans-serif;"><font color="#1f497d">
you can change that to suit.<o:p></o:p></font></span></p><p class="MsoNormal">
<span style="font-size: 11pt; font-family: Calibri, sans-serif;"><font color="#1f497d">
You’ll also need to change the line that starts:<o:p></o:p></font></span>
</p><p class="MsoNormal" style="text-indent:36.0pt"><span style="font-size: 11pt; font-family: Calibri, sans-serif;">
<font color="#1f497d">for( my $d=0; $d&lt;7; ++$d )<o:p></o:p></font></span>
</p><p class="MsoNormal"><span style="font-size: 11pt; font-family: Calibri, sans-serif;">
<font color="#1f497d">- which steps through the number of days and creates a section for each one.<o:p>
</o:p></font></span></p><p class="MsoNormal"><span style="font-size: 11pt; font-family: Calibri, sans-serif;">
<font color="#1f497d"><o:p>&nbsp;</o:p></font></span></p><p class="MsoNormal">
<span style="font-size: 11pt; font-family: Calibri, sans-serif;"><font color="#1f497d">
There is also the ~/cgi/latest_tool script.<o:p></o:p></font></span></p><p class="MsoNormal"><span style="font-size: 11pt; font-family: Calibri, sans-serif;">
<font color="#1f497d">This reads the ‘latest_tool_modes’ from the archive config, which my default is in ~/archives/ARCHIVEID/cfg/cfg.d/latest_tool.pl<o:p>
</o:p></font></span></p><p class="MsoNormal"><span style="font-size: 11pt; font-family: Calibri, sans-serif;">
<font color="#1f497d">You can do some useful things with this – as it allows you to specify a specific citation style to use, and to create a named mode that can be a filtered subset
 of items – e.g. you could create a subject- or division-specific ‘latest’ list – and create a citation style that embeds Altmetrics in it.<o:p>
</o:p></font></span></p><p class="MsoNormal"><span style="font-size: 11pt; font-family: Calibri, sans-serif;">
<font color="#1f497d"><o:p>&nbsp;</o:p></font></span></p><p class="MsoNormal">
<span style="font-size: 11pt; font-family: Calibri, sans-serif;"><font color="#1f497d">
Cheers,<o:p></o:p></font></span></p><p class="MsoNormal"><span style="font-size: 11pt; font-family: Calibri, sans-serif;">
<font color="#1f497d">John<o:p></o:p></font></span></p><p class="MsoNormal">
<span style="font-size: 11pt; font-family: Calibri, sans-serif;"><font color="#1f497d">
<o:p>&nbsp;</o:p></font></span></p><p class="MsoNormal"><span style="font-size: 11pt; font-family: Calibri, sans-serif;">
<font color="#1f497d"><o:p>&nbsp;</o:p></font></span></p><p class="MsoNormal">
<span style="font-size: 11pt; font-family: Calibri, sans-serif;"><font color="#1f497d">
<o:p>&nbsp;</o:p></font></span></p><p class="MsoNormal"><span style="font-size: 11pt; font-family: Calibri, sans-serif;">
<font color="#1f497d"><o:p>&nbsp;</o:p></font></span></p><p class="MsoNormal">
<b><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;">
From:</span></b><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;">
 <a href="mailto:eprints-tech-bounces@ecs.soton.ac.uk">eprints-tech-bounces@ecs.soton.ac.uk</a> [<a href="mailto:eprints-tech-bounces@ecs.soton.ac.uk">mailto:eprints-tech-bounces@ecs.soton.ac.uk</a>]
<b>On Behalf Of </b>Michael Street<br><b>Sent:</b> 06 July 2015 21:55<br>
<b>To:</b> <a href="mailto:eprints-tech@ecs.soton.ac.uk">eprints-tech@ecs.soton.ac.uk</a><br><b>Subject:</b> [EP-tech] Edit 'Latest Additions' page<o:p>
</o:p></span></p><p class="MsoNormal"><o:p>&nbsp;</o:p></p><p class="MsoNormal">
<span style="font-size:10.0pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;">
Hi,<o:p></o:p></span></p><div><p class="MsoNormal"><span style="font-size:10.0pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;">
<o:p>&nbsp;</o:p></span></p></div><div><p class="MsoNormal"><span style="font-size:10.0pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;">
Can someone point me to where I can edit the 'Latest Additions' to configure it go back further in time?<o:p>
</o:p></span></p></div><div><p class="MsoNormal"><span style="font-size:10.0pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;">
<br>Thanks,<o:p></o:p></span></p></div><div><p class="MsoNormal"><span style="font-size:10.0pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;">
Mike<o:p></o:p></span></p></div></div><div><font face="Courier New,Courier,monospace" size="3">
*** Options: <a href="http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech">
http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech</a><br>*** Archive: <a href="http://www.eprints.org/tech.php/">
http://www.eprints.org/tech.php/</a><br>*** EPrints community wiki: <a href="http://wiki.eprints.org/">
http://wiki.eprints.org/</a><br>*** EPrints developers Forum: <a href="http://forum.eprints.org/">
http://forum.eprints.org/</a><br></font></div></j.salter@leeds.ac.uk></div>
</div></div></div><div></div></font>
*** Options: <a href="http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech">http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech</a><br>*** Archive: <a href="http://www.eprints.org/tech.php/">http://www.eprints.org/tech.php/</a><br>*** EPrints community wiki: <a href="http://wiki.eprints.org/">http://wiki.eprints.org/</a><br>*** EPrints developers Forum: <a href="http://forum.eprints.org/">http://forum.eprints.org/</a><br></blockquote></div><br></body></html>