Forums / Suggestions / A new sort method of objects?

A new sort method of objects?

Author Message

Jorge estévez

Thursday 17 March 2005 1:44:44 pm

Hello...

Can ezcrew add a new sort method of objects?

Heres the Idea:

Developing a news site for a client I came up with the need of a new sort method in ezpublish (not implemented in current versions)

I would like to sort my items in the Admin site with a priority

parameter. Instead of having the default value (0) as the default value, once I create an item
(class object) I would like to have (by default) a number equal to the year+date+minute+second set as the default priority number.

This method will allow in my News web site to have articles ordered by the number generated (equal to the curent date) witch of course will represent information about the moment it was published

The coded number will look something like this:

2005, 25th, january at 9am will be: 200501250900

Being:

25012005 the date

09 the hour (24 hour system)

00 the seconds

Why all that mess?

Having this kind of settings I will be able to modify an articles number (date or time parameters within the new coded number) so It will get assigned to a new priority order and remain as the top article for a period of time, taking for example an article made the 20th of January if I change the date to the 30th of February I will be active as the most recent article for 10 days since published so the article will not get old and "drop down from the list", as days go by other articles get inserted but as their number will be less that the one modified they will be sorted bellow the one modified.

I am trying to figure out a more "human or understandable" method that does not use the simple number as the priority thus it could be more confuse to arrange articles in the site and cannot be able to set an article as the TOP one for a period of time.

I think using a method like this one will help keep tracking of priority+time on articles (publish date) and be able to keep files sorted (active) by it's published date.

Thanks,
jorge estevez rams

Diseño Web Cuba
Web Design Cuba
www.elfosdesign.com

Jorge estévez

Tuesday 05 April 2005 6:52:09 am

Can anyone comment on this idea please?

Thanks

Diseño Web Cuba
Web Design Cuba
www.elfosdesign.com

Paul Forsyth

Tuesday 05 April 2005 7:21:16 am

You should be able to enter your priority number in the template.

There is one major problem though.

The priority database column only has space for an integer with a length of 11 characters. Your priority string has twelve characters.

Maybe if you adjust your string to fit it may work?

paul

Jorge estévez

Tuesday 12 April 2005 9:21:30 pm

If I do shorten up the number to 11 chars, can you please tell me the files I should change to make the implementation work out?

Could it be taken into consideration for future versions?

thanks!

Diseño Web Cuba
Web Design Cuba
www.elfosdesign.com

Jorge estévez

Tuesday 19 April 2005 2:50:07 pm

Please help...
thanks

Diseño Web Cuba
Web Design Cuba
www.elfosdesign.com

eZ debug

Timing: Jan 18 2025 11:09:48
Script start
Timing: Jan 18 2025 11:09:48
Module start 'content'
Timing: Jan 18 2025 11:09:49
Module end 'content'
Timing: Jan 18 2025 11:09:49
Script end

Main resources:

Total runtime0.5507 sec
Peak memory usage4,096.0000 KB
Database Queries200

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0061 588.8281180.8359
Module start 'content' 0.00610.4147 769.6641528.2422
Module end 'content' 0.42080.1298 1,297.9063340.2188
Script end 0.5506  1,638.1250 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00400.7262210.0002
Check MTime0.00140.2540210.0001
Mysql Total
Database connection0.00080.141610.0008
Mysqli_queries0.479487.05772000.0024
Looping result0.00190.34771980.0000
Template Total0.521194.620.2606
Template load0.00210.374220.0010
Template processing0.519094.252420.2595
Template load and register function0.00020.028010.0002
states
state_id_array0.00100.190310.0010
state_identifier_array0.00140.246120.0007
Override
Cache load0.00170.3158390.0000
Sytem overhead
Fetch class attribute can translate value0.00130.234630.0004
Fetch class attribute name0.00090.161550.0002
XML
Image XML parsing0.00040.081230.0001
class_abstraction
Instantiating content class attribute0.00000.001450.0000
General
dbfile0.00390.7024210.0002
String conversion0.00000.000930.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

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
5content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
7content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
3content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 17
 Number of unique templates used: 5

Time used to render debug report: 0.0002 secs