Monday, May 21st

Last update05:36:30 AM GMT

Font Size

Screen

Profile

Layout

Menu Style

Cpanel
Welcome, Guest
Username Password: Remember me

Create J1.6 article via PHP -> j16_assets table
(1 viewing) (1) Guest
  • Page:
  • 1

TOPIC: Create J1.6 article via PHP -> j16_assets table

Create J1.6 article via PHP -> j16_assets table 1 year ago #4174

  • dex
  • OFFLINE
  • Moderator
  • Posts: 779
  • Karma: 12
Hi
Anyone know the anatomy of j16_assets table?
If I create an article via SQL/php, how do I define what goes in j16_assets? (parent-Id, lft, rgt,level)
I've defined a new access control group (say, 'Member') that the article should belong to.
thx
Dex Randall
Joomla! web design and production
Sydney JUG organiser + joomla.org.au site admin
www.spikesystems.com.au
www.twitter.com/dexx

Re: Create J1.6 article via PHP -> j16_assets table 1 year ago #4175

  • eddieajau
  • OFFLINE
  • Administrator
  • Posts: 50
  • Karma: 2
Heh, good question You might have to grab the article model from backend com_content component and go through that - that would be the safest way. The asset table is in a hierarchy. The top most node is represents global configuration, the next level down is each component, the next down are the categories in the component, follow by the articles in the category.

You might be able to get away with just using the article table object, eg:

$table = JTable::getInstance('Article');
$table->title = 'Foo';
// and so on ...

$table->store();

Something like that.

Re: Create J1.6 article via PHP -> j16_assets table 1 year ago #4176

  • dex
  • OFFLINE
  • Moderator
  • Posts: 779
  • Karma: 12
Tips from the top - thanks Andrew
I can run with it from there.
Dex
Dex Randall
Joomla! web design and production
Sydney JUG organiser + joomla.org.au site admin
www.spikesystems.com.au
www.twitter.com/dexx
  • Page:
  • 1
Time to create page: 0.37 seconds
You are here: Forum