I am looking into getting this script from the question Create categories, subcategories and articles using php to run, but I can't seem to understand the basics.
What do I need to do?
Joomla Stack Exchange is a question and answer site for Joomla! administrators, users, developers and designers. It only takes a minute to sign up.
Sign up to join this communityI am looking into getting this script from the question Create categories, subcategories and articles using php to run, but I can't seem to understand the basics.
What do I need to do?
While not clearly explained, this actually looks like a script that does not need to run in Joomla, in the sense that is not a typical MVC extension. So you don't need to edit com_content
or anything like this or to install it in Joomla somehow.
Basically the script is standalone. You just need to put it in the base folder of Joomla. For example name it create-categories.php
and put the code inside. You than call the script with the browser:
www.example.com/create-categories.php
How does this work:
The script basically loads an instance of Joomla, without actually calling the whole website. It allows it to make use of existing classes in order to create articles and categories.
As the answer states, the snippet of code is a basic idea, not something to use in production. It may throw errors or have other problems which you need to debug and therefore you need a good understanding of Joomla.