Use modified date as Used Date...

Free responsive Joomla 2.5 and 3.x module to present your content with easy and intuitive way.
Rate this topic: Evaluations: 0, 0.00 on the average.Evaluations: 0, 0.00 on the average.Evaluations: 0, 0.00 on the average.Evaluations: 0, 0.00 on the average.Evaluations: 0, 0.00 on the average.Evaluations: 0, 0.00 on the average.
GK User
Sat Apr 28, 2012 8:40 pm
It doesn´t matter how many options you include in your fantastic and great module that someone (me this time) will came asking for another option.
In order to satisfy a customer requirement (its a Restaurant and they have a K2 item for the daily menu and they don´t want to create a new one every day and prefer to modify the item).
The problem cames when show the date. The module only supports create and publish date. In order to automatize and make easier for my customer I would like to add the modified date to the Used Date module option.
I have changed the xml creating another one and created a new language string in the .ini file.
I have reach the conclusion that the modification must be in gk.source.k2.php in gk_classes folder. And I am almost sure that must be in the sql query.
I think that date_publish get the value from publish_up field. But not too much.
I am confused where in the code make the check of the date_publish value assigned in the backend module configuration.
Can you give me a guideline, please ?
I know that if I manage to this it will be lost if I update the module so I give you like a future feature suggestion if you don´t mind ;)

Thanks for your time and support.
User avatar
Fresh Boarder

teitbite
Fri May 04, 2012 1:02 pm
Hi

I'm not sure if I understand, so please read this and correct me. You need to add a new date to an article. Along with published, created, You need to have Used Date. Right ?

Unfortunately this is not an NSP area. NSP is showing a content of joomla/K2 which doesn't have such option. NSP doesn't have it's database and is basicly used to display content from what joomla brings.

So the best way to make it is to use K2 extra fields, and than modificate NSP to use it. Unfortunately such request will be a customization which we do not support, but You can always hire someone to do this. For example me :)
User avatar
Moderator

GK User
Fri Jun 08, 2012 3:57 pm
Hi teitbite,

I think what thomaszgz is trying to do is something similar to what I was looking for.

In the Data Source section your GK4 module allows articles to be sorted by date, title, order, random order and hits amount.

thomaszgz and I are looking for a way to sort via article modification date. The reason for me is I often amend or update info within my articles. I would love to have the module display the most recently updated articles so that my users can keep up to date with the latest amended info.

Hope that makes sense...
User avatar
Senior Boarder

teitbite
Fri Jun 08, 2012 4:37 pm
crashtackle wrote:Hi teitbite,

I think what thomaszgz is trying to do is something similar to what I was looking for.

In the Data Source section your GK4 module allows articles to be sorted by date, title, order, random order and hits amount.

thomaszgz and I are looking for a way to sort via article modification date. The reason for me is I often amend or update info within my articles. I would love to have the module display the most recently updated articles so that my users can keep up to date with the latest amended info.

Hope that makes sense...


Hi

Ok. Than please try something like this. Please edit file /modules/mod_news_pro_gk4/mod_news_pro_gk4.xml and add this code to line 101

Code: Select all
<option value="modified">Modification date</option>


as a new option for select box which looks like that:

Code: Select all
               <field name="news_sort_value" type="list" default="created" label="MOD_NEWS_PRO_GK4_NEWS_SORT_VALUE" description="MOD_NEWS_PRO_GK4_NEWS_SORT_VALUE_DESC">
                            <option value="created">MOD_NEWS_PRO_GK4_DATE</option>
                            <option value="title">MOD_NEWS_PRO_GK4_TITLE</option>
                 <option value="ordering">MOD_NEWS_PRO_GK4_ORDER</option>
                            <option value="fordering">MOD_NEWS_PRO_GK4_FRONTPAGE_ORDER</option>
                            <option value="random">MOD_NEWS_PRO_GK4_RANDOM</option>
                            <option value="hits">MOD_NEWS_PRO_GK4_HITS</option>
<option value="modified">Modification date</option>
                </field>

User avatar
Moderator


cron