Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Delegate Request (Categories)
Hi!
I need a delegate concerning removing categories:
Vanilla.Control.CategoryForm.php, line 70 (just before redirecting):
I need a delegate concerning removing categories:
Vanilla.Control.CategoryForm.php, line 70 (just before redirecting):
$this->DelegateParameters['RemovedCategory'] = $CategoryID;
$this->DelegateParameters['ReplacementCategory'] = $ReplacementCategoryID;
$this->CallDelegate('PostRemoveCategory');
0
This discussion has been closed.
Comments
} elseif ($this->PostBackAction == 'ProcessCategoryRemove' && $this->IsValidFormPostBack()) { if ($this->Context->Session->User->Permission('PERMISSION_REMOVE_CATEGORIES')) { if ($this->CategoryManager->RemoveCategory($CategoryID, $ReplacementCategoryID)) { $this->DelegateParameters['RemovedCategory'] = $CategoryID; $this->DelegateParameters['ReplacementCategory'] = $ReplacementCategoryID; $this->CallDelegate('PostRemoveCategory'); $RedirectUrl = GetUrl( $this->Context->Configuration, $this->Context->SelfUrl, '', '', '', '', 'PostBackAction=Categories&Action=Removed'); } } else { $this->IsPostBack = 0; }
maybe I come up with more in a few, I'll let you know
thanks again!
I'd like to update the xml file also reflecting the reordering of the categories via the settings->categories form, but AFAIK, this is done directly via AJAX, and I don't know exactly how to update my file in consequence.
If you file like it, you can write the modification needed (a new CatagoryManager method and a patch to the ajax script) and I will add it (we will do it anyway, you can write a simple patch for your extension).
what do you mean by "ajax request can load extension"?
if ($Configuration['AJAX_USE_EXTENSIONS']) { include($Configuration['APPLICATION_PATH'].'conf/extensions.php'); ob_end_clean(); ob_start();