<div dir="ltr">Hi David,<div><br></div><div>I&#39;m very jealous; that&#39;s exactly what I&#39;m going for, even the clickable &quot;et al&quot; (I thought I might have had an original idea up until I saw that).</div><div><br></div><div>Any guidance you can give me would be brilliant. I may hold off jumping in and editing that file for the time being and do some more investigating.</div><div><br></div><div>Thanks,</div><div>James</div></div><br><div class="gmail_quote"><div dir="ltr">On Wed, Sep 19, 2018 at 9:58 AM David R Newman &lt;<a href="mailto:drn@ecs.soton.ac.uk">drn@ecs.soton.ac.uk</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi James,<br>
<br>
This is what I did for one of the repository I help maintain: <br>
<br>
<a href="http://researchonline.ljmu.ac.uk/7570/" rel="noreferrer" target="_blank">http://researchonline.ljmu.ac.uk/7570/</a><br>
<br>
I should be able to share the code if I can extract it from the rest of<br>
the codebase, as it requires edits to 3-4 files, if I remember<br>
correctly.  Also, if you have other features like people_with_orcids<br>
that modifies the list of authors in the citation in some way (i.e. in<br>
this case add little ORCID buttons to click), then it may require a bit<br>
more of an effort to merge.<br>
<br>
Regards<br>
<br>
David Newman<br>
<br>
On Wed, 2018-09-19 at 09:36 +0100, James Kerwin via Eprints-tech wrote:<br>
&gt; Hi All,<br>
&gt; <br>
&gt; I have been tasked with limiting the number of authors that display<br>
&gt; in any given EPrint Abstract page as when there are many<br>
&gt; authors/creators associated with an EPrint it ruins the abstract<br>
&gt; page.<br>
&gt; <br>
&gt; I have edited default.xml in citations and can make it show ten<br>
&gt; authors and add an &quot;et al&quot; to the end if there are more than ten<br>
&gt; authors. <br>
&gt; <br>
&gt; However, previously the creators/authors list was generated via:<br>
&gt; <br>
&gt; &lt;print expr=&quot;people_with_orcids(creators)&quot; /&gt;<br>
&gt; <br>
&gt; I wasn&#39;t able to iterate through this so I instead used:<br>
&gt; <br>
&gt; &lt;epc:foreach expr=&quot;creators_name&quot; iterator=&quot;name&quot; limit=&quot;10&quot;&gt;<br>
&gt; &lt;print expr=&quot;$name&quot; /&gt;<br>
&gt; <br>
&gt; If I wanted to change the behaviour of &quot;people_with_orcids(creators)<br>
&gt; how would I do this? I don&#39;t need detailed instruction, just a nudge<br>
&gt; towards which file(s) control this if anybody knows.<br>
&gt; <br>
&gt; My suspicion is that I need to change the sub<br>
&gt; &quot;run_people_with_orcids&quot; in a file named <a href="http://z_orcid_support.pl" rel="noreferrer" target="_blank">z_orcid_support.pl</a> in<br>
&gt; ../[Archive_Id]/cfg/cfg.d, but I&#39;m not super excited about chopping<br>
&gt; and changing things without fully knowing if I should (sub snippet<br>
&gt; below).<br>
&gt; <br>
&gt; Thanks,<br>
&gt; James<br>
&gt; <br>
&gt; #Rendering ORCIDs<br>
&gt; {<br>
&gt; package EPrints::Script::Compiled;<br>
&gt; use strict;<br>
&gt;  <br>
&gt; sub run_people_with_orcids<br>
&gt; {<br>
&gt;       my( $self, $state, $value ) = @_;<br>
&gt;  <br>
&gt;       my $session = $state-&gt;{session};<br>
&gt;       my $r = $state-&gt;{session}-&gt;make_doc_fragment;<br>
&gt;  <br>
&gt;       my $creators = $value-&gt;[0];<br>
&gt;  <br>
&gt;       foreach my $i (0..$#$creators)<br>
&gt;       {<br>
&gt;  <br>
&gt;               my $creator = @$creators[$i];<br>
&gt;  <br>
&gt;               if( $i &gt; 0 )<br>
&gt;               {<br>
&gt;                       #not first item (or only one item)<br>
&gt;                       if( $i == $#$creators )<br>
&gt;                       {<br>
&gt;                               #last item<br>
&gt;                               $r-&gt;appendChild( $session-&gt;make_text( &quot;<br>
&gt; and &quot; ) );<br>
&gt;                       }<br>
&gt;                       else<br>
&gt;                       {<br>
&gt;                               $r-&gt;appendChild( $session-&gt;make_text(<br>
&gt; &quot;, &quot; ) );<br>
&gt;                       }<br>
&gt;               }<br>
&gt; <br>
&gt; *** Options: <a href="http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-" rel="noreferrer" target="_blank">http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-</a><br>
&gt; tech<br>
&gt; *** Archive: <a href="http://www.eprints.org/tech.php/" rel="noreferrer" target="_blank">http://www.eprints.org/tech.php/</a><br>
&gt; *** EPrints community wiki: <a href="http://wiki.eprints.org/" rel="noreferrer" target="_blank">http://wiki.eprints.org/</a><br>
&gt; *** EPrints developers Forum: <a href="http://forum.eprints.org/" rel="noreferrer" target="_blank">http://forum.eprints.org/</a><br>
</blockquote></div>