<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">Hi Seb,<br>
<br>
A slightly simpler approach:<br>
<br>
On your page:<br>
<br>
<div id="fplatest"/><br>
<script type="text/javascript"><br>
new Ajax.Updater( 'fplatest', '/cgi/latest_tool', {
parameters: { "mode":"fplatest", "mainonly":"yes" } } );<br>
</script><br>
<br>
In your local configuration
(archives/<id>/cfg/cfg.d/latest_modes.pl):<br>
<br>
<meta http-equiv="content-type" content="text/html;
charset=ISO-8859-1">
<pre style="color: rgb(0, 0, 0); font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; white-space: pre-wrap;">$c->{latest_tool_modes} = {
        default => { citation => "result" },
        fplatest => { citation => "result", max => 3 },
};</pre>
<br>
That will display the last 3 items, rendered using the
"result.xml" citation.<br>
<br>
(an other) Seb<br>
<br>
<br>
On 07/08/14 17:42, Enio Carboni wrote:<br>
</div>
<blockquote cite="mid:53E3AC71.1030804@gmail.com" type="cite">
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
<div class="moz-cite-prefix">Hi Sebastian,<br>
<br>
i think you can try to add a little Ajax code to the
index.xpage <span id="result_box" class="short_text" lang="en"><span
class="hps">where</span> <span class="hps">would you want</span>
<span class="hps">to be displayed the "latest_tool chunk"<br>
</span></span>
<ul>
<li><span id="result_box" class="short_text" lang="en"><span
class="hps">/image/roller.gif: </span></span><span
id="result_box" class="short_text" lang="en"><span
class="hps"><span id="result_box" class="" lang="en"><span
class="hps">you should download</span> <span
class="hps">it</span> <span class="hps">in</span> <span
class="hps">another</span> <span class="hps">place</span></span></span></span></li>
<li><span id="result_box" class="short_text" lang="en"><span
class="hps"><span id="result_box" class="" lang="en"><span
class="hps">the parameters: n=5 is the number of
elements to display</span></span></span></span></li>
</ul>
<blockquote>
<pre><span id="result_box" class="short_text" lang="en"><span class="hps"><div></span></span></pre>
<pre><span id="result_box" class="short_text" lang="en"><span class="hps"> <div id="latest_tool_lookup_status" style="width:68%;"></span></span></pre>
<pre><span id="result_box" class="short_text" lang="en"><span class="hps"> <p style="font-size:0.9em;"></span></span><span id="result_box" class="short_text" lang="en"><span class="hps"><span id="result_box" class="" lang="en"><span class="hps">Loading</span> <span class="hps">latest documents</span> <span class="hps">in</span> <span class="hps alt-edited">progress</span></span> <img valign="middle" border="0" src="/images/roller.gif" alt="wait ..."/></p></span></span></pre>
<pre><span id="result_box" class="short_text" lang="en"><span class="hps"> </div></span></span></pre>
<pre><span id="result_box" class="short_text" lang="en"><span class="hps"> <div style="display:none; font-size:1.0em; font-weigth:normal;" id="latest_tool_lookup"></div></span></span></pre>
<pre><span id="result_box" class="short_text" lang="en"><span class="hps"></div></span></span></pre>
<pre><span id="result_box" class="short_text" lang="en"><span class="hps"><script type="text/javascript"></span></span></pre>
<pre><span id="result_box" class="short_text" lang="en"><span class="hps"> <!--</span></span></pre>
<pre><span id="result_box" class="short_text" lang="en"><span class="hps"> $("mail_title").style.display="none";</span></span></pre>
<pre><span id="result_box" class="short_text" lang="en"><span class="hps"> ajax = new Ajax.Request('/cgi/latest_tool',</span></span></pre>
<pre><span id="result_box" class="short_text" lang="en"><span class="hps"> {method: 'get',</span></span></pre>
<pre><span id="result_box" class="short_text" lang="en"><span class="hps"> parameters: 'n=5',</span></span></pre>
<pre><span id="result_box" class="short_text" lang="en"><span class="hps"> contentType: "application/xml",</span></span></pre>
<pre><span id="result_box" class="short_text" lang="en"><span class="hps"> onSuccess: function(transport) {</span></span></pre>
<pre><span id="result_box" class="short_text" lang="en"><span class="hps"> $("latest_tool_lookup_status").style.display="none";</span></span></pre>
<pre><span id="result_box" class="short_text" lang="en"><span class="hps"> var parser = new DOMParser();</span></span></pre>
<pre><span id="result_box" class="short_text" lang="en"><span class="hps"> var xmlDoc = parser.parseFromString(transport.responseText, "application/xml");</span></span></pre>
<pre><span id="result_box" class="short_text" lang="en"><span class="hps"> tables=xmlDoc.getElementsByTagName("table");</span></span></pre>
<pre><span id="result_box" class="short_text" lang="en"><span class="hps"> for (i=0;i<tables.length;i++) {</span></span></pre>
<pre><span id="result_box" class="short_text" lang="en"><span class="hps"> if (tables[i].getAttribute('class')=='ep_tm_main') {</span></span></pre>
<pre><span id="result_box" class="short_text" lang="en"><span class="hps"> $("latest_tool_lookup").appendChild(tables[i]);</span></span></pre>
<pre><span id="result_box" class="short_text" lang="en"><span class="hps"> }</span></span></pre>
<pre><span id="result_box" class="short_text" lang="en"><span class="hps"> }</span></span></pre>
<pre><span id="result_box" class="short_text" lang="en"><span class="hps"> $("latest_tool_lookup").style.display="block";</span></span></pre>
<pre><span id="result_box" class="short_text" lang="en"><span class="hps"> },</span></span></pre>
<pre><span id="result_box" class="short_text" lang="en"><span class="hps"> onFailure: function() {</span></span></pre>
<pre><span id="result_box" class="short_text" lang="en"><span class="hps"> }</span></span></pre>
<pre><span id="result_box" class="short_text" lang="en"><span class="hps"> }</span></span></pre>
<pre><span id="result_box" class="short_text" lang="en"><span class="hps"> );</span></span></pre>
<pre><span id="result_box" class="short_text" lang="en"><span class="hps"> --></span></span></pre>
<pre><span id="result_box" class="short_text" lang="en"><span class="hps"></script></span></span></pre>
</blockquote>
<pre><span id="result_box" class="short_text" lang="en"><span class="hps"></span></span></pre>
<br>
Enio<br>
<br>
Il 07/08/2014 16:17, Sebastian Nozzi ha scritto:<br>
</div>
<blockquote
cite="mid:EMEW3|d5f554ccba7e17aef2bd302ede9bff10q76FI714eprints-tech-bounces|ecs.soton.ac.uk|53E38A74.10001@ist.ac.at"
type="cite">
<pre wrap="">Hello,
do you know how to change the start-page to have a list of "latest
additions" like the one seen here?
<a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://epub.wu.ac.at/">http://epub.wu.ac.at/</a>
So far I've found out that the file to edit is:
./cfg/lang/en/static/index.xpage
inside my archive, and that the information I need comes from the
"./cgi/latest_tool" CGI-script.
But I'm not sure how to invoke that script to get an output as in the
web-page I mentioned.
Any hints would be greatly appreciated.
Best regards,
Sebastian
</pre>
</blockquote>
<br>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">*** Options: <a class="moz-txt-link-freetext" href="http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech">http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech</a>
*** Archive: <a class="moz-txt-link-freetext" href="http://www.eprints.org/tech.php/">http://www.eprints.org/tech.php/</a>
*** EPrints community wiki: <a class="moz-txt-link-freetext" href="http://wiki.eprints.org/">http://wiki.eprints.org/</a>
*** EPrints developers Forum: <a class="moz-txt-link-freetext" href="http://forum.eprints.org/">http://forum.eprints.org/</a>
</pre>
</blockquote>
<br>
</body>
</html>