List Manager Forum

Date setup

User moon_906 2013-02-10 11:33:50

Hi, im using ListManager 0.03 and i would like to show the data as d%m%Y% is it possible? And is it possible to show data ordered by date (recent first)?

Thanks

Moonsoft support 2013-02-11 10:01:26

Hello,
with version 0.0.3 of List Manager you have limited options, we can point you some tweaks to make the changes, but we're afraid you can't apply of all them at the same time, here the options:

- to configure a default order: you can use the 'order' parameter to order the front-view by default. Place there the name of the column you want the order to be applied to. This order is ascending, so if you want a descending view, you also have to modify the front-end view:

Edit


joomla\modules\mod_listmanager\tmpl\content.php


and search for this section

if(colorder!=-1)

orderForColumn(idorder,colorder);


(replace brackets for the proper less than and greater than symbols, you just have to duplicate the line and and the {} signs to get this:)

if(colorder!=-1){

orderForColumn(idorder,colorder);
orderForColumn(idorder,colorder);

}


This way you will have ascending order.


- Date format:

Date format is defined when creating calendar objects, so you should search for this block:



Calendar.setup({inputField:\'fld_'.$seed.$field.'\',ifFormat:\'%Y-%m-%d\',button:\'fld_'.$seed.$field.'_img\'});


and modify the ifFormat parameter (for your case, the line would be as follows:)


Calendar.setup({inputField:\'fld_'.$seed.$field.'\',ifFormat:\'%d-%m-%Y\',button:\'fld_'.$seed.$field.'_img\'});


For the front end
joomla\modules\mod_listmanager\tmpl\content.php
And for the backend

joomla\administrator\components\com_listmanager\views\listing\tmpl\editdata.php

But as you're changing the default format, this change is incompatible with the change to configure order.


Hope this helps, best regards

Moonsoft Team

User moon_906 2013-02-12 17:51:09

Hi considering that both tweaks are incopatibles, i prefer now the right order...
But it isnt so clear how to do it.

May I send you the file content.php and so you can edit it?

Thanks

Moonsoft support 2013-02-12 18:11:15

Hello,
in order to have the descending order, just follow this steps:

- Go to your component/module configuration and write the name of your date column at the parameter 'Order'.
- Edit

joomla\modules\mod_listmanager\tmpl\content.php

search for this section (about line 415)

if(colorder!=-1)

orderForColumn.....etc......;


just copy and paste the orderForColum line, we want to duplicate it. And add open and close keys symbols { } surrounding the two lines, this is the result:

if(colorder!=-1){

orderForColumn.....;
orderForColumn.....;

}


This should do the work.

Regards

Edited by MSTeam - 12.02.2013 18:16

User moon_906 2013-02-12 20:05:47

Now I have understood,

I applied your tweak but it works with the module loaded in the content:
http://www.comune.baiano.av.it/index.php/component/k2/item/104-prova-ammi.html

not with the main component:
http://www.comune.baiano.av.it/index.php/amministrazione-aperta.html

For me is good as result but the page has not a good aspect.

Im sorry for boring you... I hope to move the website to joomla 2.5 soon, but now I have to do all the best with this version.

Thanks a Lot
Pellegrino

Moonsoft support 2013-02-12 20:20:45

Hello,
right, if you finally upgrade to joomla 2.5, the LM version includes both date format and more advanced ordering functions. In the meantime, we can see at your first example that the 'order' parameter has the right value:

Pubblicazione

so the order is properly applied.

But on the second page we find that parameter comes empty to the page, so no ordering is done. Could you please double-check that you have entered 'Pubblicazione' value at the 'order' parameter of the component?

Thank you, regards

User moon_906 2013-02-12 22:19:44

Sorry again, but i don't find the value order in the component.

When i Open the component i can modify 4 things:

1-edit list fields
2-manage data
3-configure access control
4-export data


In the module was easy to modify..

Thanks for patience

Moonsoft support 2013-02-13 09:08:04

Hello,
the component parameters are the same than the module ones. You will find them editing your menu item (at your joomla menu, not at the LM backend). It's the same parameter section you used to select which list should be published at that menu entry.
Hope this helps, regards

User moon_906 2013-02-13 17:40:49

I found It,

thanks!!!

...
Support/development

Perfect for small code changes or to correct any bug at your site

Buy now!
...
Support/development 40 hours

With the peace of mind of having a professional team at your service (20% discount)

Buy now!