samtiria / nextgen-gallery

Automatically exported from code.google.com/p/nextgen-gallery
0 stars 0 forks source link

Additional Hooks #318

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
I have add some additional hooks. I have renamed the 
'ngg_manage_gallery_columns' filter to 'ngg_manage_image_columns' and the 
'ngg_manage_gallery_custom_column' action to 'ngg_manage_image_custom_column' 
at 'manage-images.php' because it makes more sense, I think. I have added a 
filter named 'ngg_manage_gallery_column' and a action named 
'ngg_manage_gallery_custom_column', now in the right context at the 
'manage-galleries.php', to extend the gallery overview columns. The last filter 
is located at the 'manage-album.php' named 'ngg_display_album_item_content' 
that you can show additional informations there. A patch is attached.

Original issue reported on code.google.com by alexande...@gmail.com on 23 Sep 2010 at 7:54

Attachments:

GoogleCodeExporter commented 8 years ago
Ok, added in r822

Original comment by alex.cologne on 23 Sep 2010 at 8:06

GoogleCodeExporter commented 8 years ago
One more additional hook named 'ngg_image_create'. This one is a action which 
is executed if an image object is called. And a modification to at the admin 
panel for the image path. This modification puts the random number to the end 
if the image path is a url with parameters.

Original comment by alexande...@gmail.com on 30 Sep 2010 at 3:07

Attachments:

GoogleCodeExporter commented 8 years ago
I've trigged 'ngg_added_new_image' when a images is "added" and 
'ngg_created_new_gallery' when a gallery is created. 

The hook 'ngg_image_create' could be in this context misunderstand. Could we 
use 'ngg_get_image' or 'ngg_get_image_object' ?

Original comment by alex.cologne on 30 Sep 2010 at 5:55

GoogleCodeExporter commented 8 years ago
You are right. That's a better name.

Original comment by alexande...@gmail.com on 30 Sep 2010 at 6:29

GoogleCodeExporter commented 8 years ago
Why do you convert the object into an array, any reason ?

Original comment by alex.cologne on 30 Sep 2010 at 6:36

GoogleCodeExporter commented 8 years ago
No there is no reason. But I need a reference on the object, is there an 
alternative way to get a reference on the object?

Original comment by alexande...@gmail.com on 30 Sep 2010 at 6:39

GoogleCodeExporter commented 8 years ago
Mhh, could be add_filter not better in this case, what would you like to 
archive ?

Original comment by alex.cologne on 30 Sep 2010 at 6:47

GoogleCodeExporter commented 8 years ago
I think you can't assign the object to it self in the object constructor. My 
aim is to manipulate the object. I think the wordpress function 
do_action_ref_array converts the object to an array and assign the changed 
values to the object, but the object is still a object.

Original comment by alexande...@gmail.com on 30 Sep 2010 at 6:51

GoogleCodeExporter commented 8 years ago
You are right, added new hook 'ngg_get_images' in r826

Original comment by alex.cologne on 30 Sep 2010 at 7:17

GoogleCodeExporter commented 8 years ago
As you released the plugin , we close this issue.

Original comment by alex.cologne on 11 Oct 2010 at 9:59

GoogleCodeExporter commented 8 years ago
need to reopen, as I'm working today on album.php.

You filter :

apply_filters('ngg_display_album_item_content', $obj['id']) inside album.php 
echo the ID number if your plugin is not active. I suggest to rework this into 
a action hook :

do_action('ngg_display_album_item_content', $obj['id'])

Original comment by alex.cologne on 16 Oct 2010 at 11:19

GoogleCodeExporter commented 8 years ago
Changed in r831 into a action hook, let me know if this is a problem for you

Original comment by alex.cologne on 16 Oct 2010 at 1:51

GoogleCodeExporter commented 8 years ago
in r859 revert r831, apply filter again

Original comment by alex.cologne on 14 Nov 2010 at 8:25