Jump to content

Last modified for knowledgbase articles?


leemason

Recommended Posts

i know with announcements you can get the last modified from the db.

 

im creating a sitemap addon (nearly finished) and it would be great if i could get the last modified for each knowledgebase article.

 

i know this info isnt stored as a value for the articles, but does anyone know a way to use the logs, or a built in mysql command to find the modified date for each row?

Link to comment
Share on other sites

i just found an article which would allow me to alter the table and add a TIMESTAMP row, the set all rows to current time (and update when row is updated later on).

 

I can see this working great, but i would just like to know if the whmcs see altering core tables as bad pratice?

 

should i create a custom table to store this data? and use hooks to check for article updates? or do you think it is okay to alter core tables??

 

this is the article

 

http://pointbeing.net/weblog/2008/03/mysql-versus-postgresql-adding-a-last-modified-column-to-a-table.html

Link to comment
Share on other sites

after speaking with the support team, my doubts have been confirmed.

 

WHMCS WOULD ADVISE *NOT* TO MODIFY CORE TABLES

 

This is as expected really as it could cause problems.

 

I will have to go down the route of creating a custom table, or getting the team to add either:

 

A: a hook for when knowledgebase articles are saved (so i can capture this information in a seperate table)

 

B: request a last mod field be added to the core knowledgebase articles table.

 

 

ticket still in progress so i will update when i have more.

 

 

all developers please take note of the above advice, do not alter core tables.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

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

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated