How can I change the default Sort by priority number?

Author Message

Jorge estévez

Wednesday 02 February 2005 5:22:26 am

Hello...

I would like to sort my items in the Admin site with the priority parameter. Instead of having the default value (0) once I create an item (class object) I would like to have (by default) a number equal to the 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 as explained (witch of course will represent information about the moment it was published)

The coded number will look something like this:

January 25, 2005 at 9am will be: 250120050900

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.

Now the problem, thought I didn’t have one? :-)

1. Where can I change the default value of ‘0’ to the coded number date+hour+secong, is it on the PHP part of the site? if so, (having no experience with PHP) read the next line…
2. How can I make this number and assign it to the code, please be specific (knowing I do not have experience with php)

If someone has another Idea please be kind to share it with the ez community (and with me)

Thanks, joe

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

Jorge estévez

Sunday 06 February 2005 7:36:57 pm

can someone help with this please!

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

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 19 2025 11:41:12
Script start
Timing: Jan 19 2025 11:41:12
Module start 'layout'
Timing: Jan 19 2025 11:41:12
Module start 'content'
Timing: Jan 19 2025 11:41:13
Module end 'content'
Timing: Jan 19 2025 11:41:13
Script end

Main resources:

Total runtime1.0570 sec
Peak memory usage4,096.0000 KB
Database Queries52

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0062 589.3047152.6406
Module start 'layout' 0.00620.0025 741.945339.4766
Module start 'content' 0.00881.0467 781.4219457.0234
Module end 'content' 1.05540.0015 1,238.44538.1250
Script end 1.0570  1,246.5703 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00310.2973160.0002
Check MTime0.00140.1308160.0001
Mysql Total
Database connection0.00090.087010.0009
Mysqli_queries1.011595.6911520.0195
Looping result0.00060.0538500.0000
Template Total1.023596.820.5117
Template load0.00190.182720.0010
Template processing1.021696.644620.5108
Template load and register function0.00020.018110.0002
states
state_id_array0.00080.079610.0008
state_identifier_array0.00150.144220.0008
Override
Cache load0.00150.1433230.0001
Sytem overhead
Fetch class attribute can translate value0.00080.072610.0008
Fetch class attribute name0.00120.109020.0006
XML
Image XML parsing0.00010.012210.0001
class_abstraction
Instantiating content class attribute0.00000.000720.0000
General
dbfile0.00150.1437100.0002
String conversion0.00000.000640.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
2content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
4content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
2content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 10
 Number of unique templates used: 5

Time used to render debug report: 0.0001 secs