Forums / Developer / How can I change the default Sort by priority number?

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