Jump to content

How to make a "bump" button for records in databases? - PAGES


xtech

Recommended Posts

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

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

​.

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" button

The "bump to button" would have the following action:

- Date_of_record = today

This would be enough. How can i do this?

Link to comment
Share on other sites

 

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" button

The "bump to button" would have the following action:

- Date_of_record = today

This 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

​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

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...