Show article end of publishing date and sort by that date? - Joomla! Forum - community, help and support


hello,

i wandering if possible modify core joomla 2.5 files in order display article end of publishing date in category blog layout , sort articles date?

thanking in advance!

you can both of these (show end date , sort end date), , can without editing core files.

the following advice assumes competent enough in php understand existing code , implement additions/changes.

the safe way apply custom changes override view file module or component. in case, files override found in

code: select all

/components/com_content/views/category/tmpl/
display end date, override blog_item.php (as file contains code formats/displays item. change sort order, can done in blog.php, might more intuitive if override blog_children.php, file iterates through items.

you need copy these 2 files , place them here:

code: select all

/templates/<current-template>/html/com_content/category/<files>
<current-template> name of template have set default, , <files> represents copied files pasted here (blog_item.php , blog_children.php). further, may need add directories /com_content/category/ if not there.

the copied files pasted ones edit. override core files , not overwritten core updates.

the easier change add end date. need @ code understand each part of article being displayed, , insert (where want) line displays end date. find examples in file displaying create , published dates. end date uses field publish_down.

to reorder array of items (in blog_childern.php), can use php function usort(). see in code, array sorted expressed $this->children[$this->category->id]. function usort() requires write short comparison function passed usort(), see discussion of function here: http://php.net/manual/en/function.usort.php

again, doable without hacking core files, , hacking core files bad choice.





Comments

Popular posts from this blog

How to change text Component easybook reloaded *newbee* - Joomla! Forum - community, help and support

After Effect warning: A problem occurred when processing OpenGL commands

Preconditions Failed. - Joomla! Forum - community, help and support