Forums

Problem extending NGG (4 posts)

  1. Hpatoio
    Member
    Posted 3 years ago #

    Hello, I'm extending NGG because I need an extra feature.

    I'm trying to add a column to the "Manage Gallery" page with the filter "ngg_manage_gallery_custom_column".

    So I wrote :
    add_action ('ngg_manage_gallery_custom_column', 'my_action');

    Then I declared my_function in this way :
    function my_action($column_code, $pid)

    my_action is called but just one parameter ($column_code) is passed.

    Where am I wrong ? NGG version is 0.99.1

    Regards

    --
    Simone

  2. Alex Rabe
    Member
    Posted 3 years ago #

    See http://codex.wordpress.org/Function_Reference/add_action , you need to use $accepted_args = 2

    add_action ('ngg_manage_gallery_custom_column', 'my_action', 10 ,2);
  3. Hpatoio
    Member
    Posted 3 years ago #

    Thanks ! It works perfectly !

    --
    Simone

  4. rheric
    Member
    Posted 3 years ago #

    Hey,

    I love this plugin, and would like to do something similar. Just need to add a few columns of info about images.

    I'm somewhat new to writing plugins, though I feel pretty comfortable with PHP. Can you give me an idea of how this is done?

    Thanks!

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags