EPrints Technical Mailing List Archive

Message: #03148


< Previous (by date) | Next (by date) > | < Previous (in thread) | Next (in thread) > | Messages - Most Recent First | Threads - Most Recent First

[EP-tech] Re: Browse pages


Thanks Alan,

Although it looks like this relates to the generation of the A-Z menu
rather than the individual lists.


On 11/06/2014 14:08, "Alan.Stiles" <alan.stiles@open.ac.uk> wrote:

>Further to this - here is the original message from 2011 - don't worry
>about a lot of the extra fields details in the messages themselves - the
>views_render_menu.txt attachment at the end is the significant code
>http://www.eprints.org/tech.php/15588.html
>
>
>-----Original Message-----
>From: Alan.Stiles [mailto:alan.stiles@open.ac.uk]
>Sent: 11 June 2014 13:58
>To: eprints-tech@ecs.soton.ac.uk
>Subject: [EP-tech] Re: Browse pages
>
>Hi Andrew,
>
>In our authors browse view configuration we have the following
>significant differences
>       ...
>       group_range_function =>
>"EPrints::Update::Views::cluster_ranges_30",
>       grouping_function => "group_by_author",
>       group_sorting_function => "alpha_first", }
>
>And in another .pl file in cfg.d we have the 2 non-standard functions
>defined to 1/. group them alphabetically by author family name initial
>and sort them by our desired alpha pattern and 2/. Define the ordering of
>the groupings (A-Z followed by 0-9 then other characters), which I
>wouldn't worry about at the moment..
>If you like, I could try and explain what the group_by_author function is
>doing, but the actual code is specific to some custom fields so wouldn't
>necessarily be all that useful to the world, although I think my
>predecessor did share it in 2011.
>
>Alan
>
>-----Original Message-----
>From: Andrew Beeken [mailto:anbeeken@lincoln.ac.uk]
>Sent: 11 June 2014 11:19
>To: eprints-tech@ecs.soton.ac.uk
>Subject: [EP-tech] Re: Browse pages
>
>Thanks all for the help on this. I think it’s started to get in there!
>I’ve managed to make the changes I needed to the screen, but I’m still
>struggling with the view. I get what needs to be done, however when I
>change up the requisite view function in views.pl I get nothing.
>
>For some reason the output of our creators is not in alphabetical order.
>The function in views.pl is:
>
>{
>                id => "creators",
>                allow_null => 0,
>                hideempty => 1,
>                menus => [
>                        {
>                                fields => [ "creators_browse_id" ],
>                                new_column_at => [1, 1],
>                                mode => "sections",
>                                open_first_section => 1,
>                                group_range_function =>
>"EPrints::Update::Views::cluster_ranges_30",
>                                grouping_function =>
>"EPrints::Update::Views::group_by_a_to_z",
>                        },
>                ],
>                order => "-date/title",
>                variations => [
>                        "type",
>                        "DEFAULT",
>                ],
>        },
>
>
>And you can see an output from that here:
>http://eprints.lincoln.ac.uk/view/creators/index.M.html
>
>I have looked here: http://wiki.eprints.org/w/Views.pl and implemented
>some of the different parameters into the function, but the view does not
>change. I’m restarting the server and setting “Regenerate views” in admin
>(all done on a local copy which is a replica of the live copy)
>
>I’m wondering if I’m missing something?
>
>
>
>On 10/06/2014 12:41, "Jan Ploski" <jpl@plosquare.com> wrote:
>
>>The "browse by" pages are called "views".
>>
>>The module EPrints::Update::Views, traditionally invoked by the
>>generate_views script and in newer versions of EPrints also triggered
>>by requesting a stale view page, generates a separate HTML file for
>>each view and for the summaries (how this occurs and which views are
>>generated is driven by specifications in cfg.d/views.pl of your archive).
>>
>>In general, EPrints creates the XHTML document structure in memory
>>first (by calling "appendChild" for each node) and in a final step it
>>converts the content of this structure into a string, which is written
>>either straight to browser or to a file.
>>
>>Strings that appear in the GUI are not found directly in the source
>>code, instead they reside in phrases XML files. So typically you search
>>the phrases files first to locate a piece of GUI (watching out for line
>>breaks etc.), and in the next step you search for the phrase id in the
>>source. However, with views it may not be the best approach because
>>they mostly consist of data from the database, with few fixed phrases
>>on which to base your search.
>>
>>You should just put some print STDERR "debug\n"; statements (goes to
>>Apache rror log) or alter EPrint::Update::Views code and then observe
>>what effect this has on the output of bin/generate_views.pl
>>
>>"Manage deposits" is quite a different story, it's a "screen"
>>(implemented in EPrints::Plugin::Screen::EPrint::Deposit), as are most
>>pages you see while navigating through EPrints. However, the output is
>>done pretty much the same way, XHTML document structure constructed by
>>the screen module, then output centrally. Note that the module
>>Repository.pm (formerly Session.pm) contains quite a few functions that
>>add more complex content to the XHTML document (they are called
>>render_xxx there).
>>
>>On 06/10/2014 11:50 AM, Andrew Beeken wrote:
>>> Any thoughts? I find the method that EPrints uses to put pages
>>>together  rather impenetrable so any assistance would be great. I¹m
>>>now also looking  at the Manage Deposits page and trying to make some
>>>adjustments to the  form there, however gripping for specific phrases
>>>from the form turns up  nothing.
>>>
>>> On 06/06/2014 14:42, "Andrew Beeken" <anbeeken@lincoln.ac.uk> wrote:
>>>
>>>> Afternoon!
>>>>
>>>> I¹m trying to understand how the ³Browse² pages are put together,
>>>> specifically the ³Browse by creator² pages. I¹ve tracked down the
>>>> functions that seem to pull the content from the database but I¹m
>>>> not sure how this is then translated into a displayable page. Any
>>>>pointers?
>>>>
>>>> Andrew
>>>>
>>>> The University of Lincoln, located in the heart of the city of
>>>> Lincoln, has established an international reputation based on high
>>>> student satisfaction, excellent graduate employment and world-class
>>>>research.
>>>>
>>>> The information in this e-mail and any attachments may be
>>>>confidential.
>>>> If you have received this email in error please notify the sender
>>>>immediately and remove it from your system. Do not disclose the
>>>>contents  to another person or take copies.
>>>>
>>>> Email is not secure and may contain viruses. The University of
>>>> Lincoln makes every effort to ensure email is sent without viruses,
>>>> but cannot guarantee this and recommends recipients take appropriate
>>>>precautions.
>>>>
>>>> The University may monitor email traffic data and content in
>>>> accordance with its policies and English law. Further information can
>>>>be found at:
>>>> http://www.lincoln.ac.uk/legal.
>>>>
>>>> *** Options:
>>>>http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech
>>>> *** Archive: http://www.eprints.org/tech.php/
>>>> *** EPrints community wiki: http://wiki.eprints.org/
>>>> *** EPrints developers Forum: http://forum.eprints.org/
>>>
>>>
>>> *** Options:
>>>http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech
>>> *** Archive: http://www.eprints.org/tech.php/
>>> *** EPrints community wiki: http://wiki.eprints.org/
>>> *** EPrints developers Forum: http://forum.eprints.org/
>>>
>>*** Options:
>>http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech
>>*** Archive: http://www.eprints.org/tech.php/
>>*** EPrints community wiki: http://wiki.eprints.org/
>>*** EPrints developers Forum: http://forum.eprints.org/
>
>
>*** Options: http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech
>*** Archive: http://www.eprints.org/tech.php/
>*** EPrints community wiki: http://wiki.eprints.org/
>*** EPrints developers Forum: http://forum.eprints.org/
>-- The Open University is incorporated by Royal Charter (RC 000391), an
>exempt charity in England & Wales and a charity registered in Scotland
>(SC 038302). The Open University is authorised and regulated by the
>Financial Conduct Authority.
>
>*** Options: http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech
>*** Archive: http://www.eprints.org/tech.php/
>*** EPrints community wiki: http://wiki.eprints.org/
>*** EPrints developers Forum: http://forum.eprints.org/
>
>*** Options: http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech
>*** Archive: http://www.eprints.org/tech.php/
>*** EPrints community wiki: http://wiki.eprints.org/
>*** EPrints developers Forum: http://forum.eprints.org/