Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to detect unpublished content in Joomla db?

Tags:

joomla

I'll probably must create import script from Joomla.

How I can detect that selected content is not published?

I see three columns in jos_content table:

  • publish_up
  • publish_down
  • published

I need to be sure what these columns means, to know which content is published or not.

E.g. content item:

publish_up 2008-07-09 11:17:43
publish_down 2008-10-16 00:00:00
published 2008-07-09 11:17:43

is publishes or not?

I can't check in by myself in administration panel because something is broken in the website right know, so db is the only option for me now.

like image 207
keram Avatar asked Aug 09 '12 15:08

keram


2 Answers

You have to look for 'state' values in the #_content table.

According to https://github.com/joomla/joomla-cms/blob/staging/administrator/components/com_content/models/forms/article.xml, state values are:

0 = unpublished

1 = published

2 = archived

-2 = trashed / marked for deletion

You also need to check the publish_up and publish_down dates.

like image 102
effectica Avatar answered Nov 01 '22 01:11

effectica


'state' values can be: -1 = archived

Not right.. 2 = archived (Joomla 3.3.6)

like image 20
Smolinsky Alexey Avatar answered Nov 01 '22 00:11

Smolinsky Alexey