maternal
Welcome, Guest. Please login or register.
Did you miss your activation email?

 
Advanced search

18633 Posts in 5522 Topics- by 9326 Members - Latest Member: TD

May 19, 2013, 09:12:21 AM
JOOM::GALLERY::FORUMJoomGallery 1.5 MVC - ExtensionsMambots / PluginsSolved Topics: Mambots / PluginsJoomAutoCat create subcategory in newly created category
Pages: [1]
Print
Author Topic: JoomAutoCat create subcategory in newly created category  (Read 7881 times)
0 Members and 1 Guest are viewing this topic.
Kage Musha
Newbie
*
Offline Offline

Posts: 2


View Profile
« on: December 08, 2009, 03:29:35 PM »

Hello,

First of all excellent Gallery and excellent plugin.
Creating a category works fine with the plugin.
But what I want is that it creates a subcategory in the category it just created.
My question is how do I get the code to pass me the Unique ID (catid) of the newly created category, so I can use it as the parent for another category created.

Plugin behaviour:
- Create category (in parent taken from plugin config parameter)
- Create another category (in parent which was the category created just before)

So how do I get the ID of the just newly created Category.
Thanks in advance.
« Last Edit: December 08, 2009, 03:57:54 PM by Kage Musha » Logged
Chraneco
Developer-Team
Hero Member
*****
Offline Offline

Posts: 3131


View Profile
« Reply #1 on: December 08, 2009, 03:50:21 PM »

Hi,

in the PHP file of the plugin you will find the following code

Code
$jinterface->createCategory($category);

The interface function 'createCategory()' returns the ID of the successfully created category.

Regards
Chraneco
Logged
Kage Musha
Newbie
*
Offline Offline

Posts: 2


View Profile
« Reply #2 on: December 08, 2009, 03:57:43 PM »

wow, can't believe I missed this line in interface.class.php
Code:
return $row->cid;

Thank you for the prompt reply!

Just quickly tested it and it works, now I can go auto create many categories and subcategories :D
Logged
legend74
Newbie
*
Offline Offline

Posts: 2


View Profile
« Reply #3 on: July 03, 2012, 06:56:40 PM »

Hi,
Sorry for my bad English, I'll try to make me understand.

I wish JoomAutoCat (latest version) create a personal (four) subcategories for each user, it is still possible? what code should I enter and where?
Thanks in advance to everyone.
Logged
Pages: [1]
Print
Jump to:  

Theme orange-lt created by panic

Bad Behavior has blocked 743 access attempts in the last 7 days.

maternal