xtech Posted May 2, 2015 Share Posted May 2, 2015 Hi, i am trying to get used to the databases in Pages. So far i have been able to replicate the famous "bug tracker". I hope someone who's handy at databases in Pages could tell me how to:1) After 15 days have passed since a user has posted a record, a button to "bump" the record up in the listing should appear on the record display screen. How do i do this? 2) The "Bump" would have to set the publish date of the record as "today's date", as they are ordered by publising data (most recent on the top). How can i do this? I would be very grateful if someone could help me. P.S. - Please move this topic if it's not on the right place. Link to comment Share on other sites More sharing options...
不中用 Posted May 3, 2015 Share Posted May 3, 2015 Hi, i am trying to get used to the databases in Pages. So far i have been able to replicate the famous "bug tracker". I hope someone who's handy at databases in Pages could tell me how to:1) After 15 days have passed since a user has posted a record, a button to "bump" the record up in the listing should appear on the record display screen. How do i do this? 2) The "Bump" would have to set the publish date of the record as "today's date", as they are ordered by publising data (most recent on the top). How can i do this? I would be very grateful if someone could help me. P.S. - Please move this topic if it's not on the right place. . You can't setup new tasks in IPS (except writing a new plugin) and bind it with a database command (some PHP code) .. You could do it easily in MySQL and the MySQL event scheduler .. let a query run daily (or twice daily) that can find & change the date/time (or make the "bump" button visible) .. . Link to comment Share on other sites More sharing options...
xtech Posted May 3, 2015 Author Share Posted May 3, 2015 .You can't setup new tasks in IPS (except writing a new plugin) and bind it with a database command (some PHP code) ..You could do it easily in MySQL and the MySQL event scheduler .. let a query run daily (or twice daily) that can find & change the date/time (or make the "bump" button visible) .. IN10TION thank you but i do not intend to make it automated nor periodical. I could easily schedule it through a SQL, it's true.But what i want is that the user that created the record could manually "bump" it after 15 days have passed since the record creation. I suppose that i can change the display template and set it something like this (pseudocode): If ((today- date_of_record) > 15 days) -> show "bump" buttonThe "bump to button" would have the following action:- Date_of_record = todayThis would be enough. How can i do this? Link to comment Share on other sites More sharing options...
xtech Posted May 4, 2015 Author Share Posted May 4, 2015 Can somebody help, pls? Link to comment Share on other sites More sharing options...
xtech Posted May 5, 2015 Author Share Posted May 5, 2015 bump Link to comment Share on other sites More sharing options...
不中用 Posted May 5, 2015 Share Posted May 5, 2015 IN10TION thank you but i do not intend to make it automated nor periodical. I could easily schedule it through a SQL, it's true.But what i want is that the user that created the record could manually "bump" it after 15 days have passed since the record creation. I suppose that i can change the display template and set it something like this (pseudocode): If ((today- date_of_record) > 15 days) -> show "bump" buttonThe "bump to button" would have the following action:- Date_of_record = todayThis would be enough. How can i do this?.If you really want to get it nicely done it must work under PHP .. only templates/css will not update the database without submitting a comment ..You could duplicate the submit comment button (give it a bump name) and let it submit a comment to bump .. like everyone is doing anyway .. how you would stop this day by day bumping ? Or you not allow comments ? This should be one piece of the puzzle :$record->record_publish_date . Link to comment Share on other sites More sharing options...
xtech Posted May 5, 2015 Author Share Posted May 5, 2015 You could duplicate the submit comment button (give it a bump name) and let it submit a comment to bump .. like everyone is doing anyway .. how you would stop this day by day bumping ? Or you not allow comments ? This should be one piece of the puzzle : $record->record_publish_date . Thank you for your suggestion, seems like a good idea. I'll try to do it Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.