You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Firstly, I've made this work by copying and pasting the pwg.categories methods verbartim into my plugin (PiwigoClientExt), then tweaking as below. I had to do this because unfortunately I couldn't see a way of accessing the details about the call (more than just source method name) from within the get_extended_desc method. This code will be released shortly if that will make the proposed fix clearer.
To support this, I propose the following alterations: To the Piwigo Project
All calls to 'render_category_description' must have parameters changed to allow an array, allowing indication as to whether this item is the subject of the call or just a sub category within the subject (if a category id is provided to categories.getList, then that categoryId would be the subject. If none provided, then none will be the subject).
function get_extended_desc($param1, $params)
{
if (is_array($params)) {
// This has been called by our code (It's a string if it hasn't)
$extDescType = 'subcatify_category_description';
if($params['isSubject']) {
$extDescType = 'main_page_category_description';
}
return trigger_change(
'render_category_description',
$params['text'],
$extDescType
);
//This category : main_page_category_description
//Sub category summary version : subcatify_category_description
}
// NOTE: $param1 is the caller method in the new code (because we pass the other data in the params object),
// but the raw description text in the Piwigo Team Code.
return $param1;
}
The text was updated successfully, but these errors were encountered:
Firstly, I've made this work by copying and pasting the pwg.categories methods verbartim into my plugin (PiwigoClientExt), then tweaking as below. I had to do this because unfortunately I couldn't see a way of accessing the details about the call (more than just source method name) from within the get_extended_desc method. This code will be released shortly if that will make the proposed fix clearer.
To support this, I propose the following alterations:
To the Piwigo Project
All calls to
'render_category_description'
must have parameters changed to allow an array, allowing indication as to whether this item is the subject of the call or just a sub category within the subject (if a category id is provided to categories.getList, then that categoryId would be the subject. If none provided, then none will be the subject).example call
To this project
The text was updated successfully, but these errors were encountered: