How to sort the information collected in the back office?

Author Message

Madani Aziz

Thursday 24 April 2008 11:03:21 am

Hello

I want to khnow if there are possiblites to sort the information collected in the back office and how can i do this ?

Thank you

Carlos Revillo

Thursday 24 April 2008 3:12:45 pm

I think it is not possible "by default" if you don't want to hack some eZPublish code. So, i would do a new extension for this. maybe you can have a look at http://ez.no/ezpublish/documentation/development/extensions.
That is a good point to start.

Anyway, you can still hack ezPublish to order recolected information, maybe by the the date that information was created or modified
You can have a look at kernel/infocollection/collectionlist.php and kernel/classes/informationcollection.php

This class are perfectly documented by eZ crew. if you look at the code you will find

/*!
     \static
     \param $creatorID       - optional, default false, limits the fetched set to a creator_id
     \param $contentObjectID - optional, default false, limits the fetched set of collection to
                               a specific content object
     \param $userIdentifier  - optional, default false, limits the fetched set to a user_identifier
     \param $limitArray      - optional, default false, limits the number of returned results
                               on the form:  array( 'limit' => $limit, 'offset' => $offset )
     \param $sortArray       - optional, default false, how to sort the result,
                               on the form: array( 'field', true/false ), true = asc
     \param $asObject        - optional, default true, specifies if results should be returned as objects.

      Fetches a list of information collections.
    */
    static function fetchCollectionsList( $contentObjectID = false, $creatorID = false , $userIdentifier = false, $limitArray  = false, $sortArray = false, $asObject = true )
    {
															   );

so, you can try to change the call to this function in the first file from


$collections = eZInformationCollection::fetchCollectionsList( $objectID, /* object id */
                                                              false, /* creator id */
                                                              false, /* user identifier */
                                                              array( 'limit' => $limit,'offset' => $offset ) /* limit array */,
															
															   );

to something like


$collections = eZInformationCollection::fetchCollectionsList( $objectID, /* object id */
                                                              false, /* creator id */
                                                              false, /* user identifier */
                                                              array( 'limit' => $limit,'offset' => $offset ) /* limit array */,
															  array('modified', false)
															   );
 

... and see what happens.

Abdelkader RHOUATI

Thursday 24 April 2008 3:59:43 pm

hi Aziz,

i think you must not hack kernel. it's to keap a possibilité to update your ez to an other version.
first search for solution , with extension..

tks

Abdelkader RHOUATI

Blog (french) : http://arhouati.com
----
Extension arh_jdebug : EzDebug using jquery

Piotrek Karaś

Thursday 24 April 2008 9:49:41 pm

Exactly, no need to touch the kernel. Extend instead. And the db schema for collections should be quite straightforward once you study it. Here's an example of extension that uses customized approach to collected info:
http://ez.no/developer/contribs/hacks/ez_my_collected_info
Other, direct db operations should also present to problems.

Good luck!

--
Company: mediaSELF Sp. z o.o., http://www.mediaself.pl
eZ references: http://ez.no/partners/worldwide_partners/mediaself
eZ certified developer: http://ez.no/certification/verify/272585
eZ blog: http://ez.ryba.eu

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 18 2025 19:17:32
Script start
Timing: Jan 18 2025 19:17:32
Module start 'layout'
Timing: Jan 18 2025 19:17:32
Module start 'content'
Timing: Jan 18 2025 19:17:33
Module end 'content'
Timing: Jan 18 2025 19:17:33
Script end

Main resources:

Total runtime0.8529 sec
Peak memory usage4,096.0000 KB
Database Queries64

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0055 589.2969152.6563
Module start 'layout' 0.00550.0027 741.953139.4922
Module start 'content' 0.00820.8432 781.4453631.4375
Module end 'content' 0.85140.0015 1,412.882816.1094
Script end 0.8529  1,428.9922 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00300.3556160.0002
Check MTime0.00130.1466160.0001
Mysql Total
Database connection0.00070.083110.0007
Mysqli_queries0.799093.6825640.0125
Looping result0.00060.0759620.0000
Template Total0.823896.620.4119
Template load0.00190.228220.0010
Template processing0.821896.355620.4109
Template load and register function0.00020.026110.0002
states
state_id_array0.00130.148010.0013
state_identifier_array0.00150.176020.0008
Override
Cache load0.00160.1932300.0001
Sytem overhead
Fetch class attribute can translate value0.00070.078940.0002
Fetch class attribute name0.00150.179860.0003
XML
Image XML parsing0.00150.174040.0004
class_abstraction
Instantiating content class attribute0.00000.001460.0000
General
dbfile0.00160.1885230.0001
String conversion0.00000.000840.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
4content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
9content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
4content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
3content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
2content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 24
 Number of unique templates used: 7

Time used to render debug report: 0.0001 secs