plugin_hook cacti_image

Discussions on developing plugins for the Cacti Plugin Architecture

Moderators: Developers, Moderators

Post Reply
ebini
Posts: 21
Joined: Mon Mar 23, 2009 9:55 am

plugin_hook cacti_image

Post by ebini »

Hi,

i want to use the plugin-hook "cacti_image".

When i enter the path to an image

Code: Select all

api_plugin_register_hook('myplugin', 'cacti_image', '','images/logo.gif');
the login pages shows the gif like "cat logo.gif"
GIF89aí[÷ÿ˜ÔZ6”'P—A‹Éfu (...)

and the cacti_login_logo below.

Can somebody please send an example how to use this hook?

cacti version : 0.8.7e
Plugin Architecture Version: 2.5

Thanks in advance

Ebini
ebini
Posts: 21
Joined: Mon Mar 23, 2009 9:55 am

Post by ebini »

i found a solution.

i solved this by this way:
api_plugin_register_hook('myplugin', 'cacti_image', 'show_image','includes/show_image.php');

the function prints the image-src-html code.

but is this the correct way? i found the following documentation:

http://cactiusers.org/wiki/Hooks
The option passed to this hook is the path of the image
ebini
Posts: 21
Joined: Mon Mar 23, 2009 9:55 am

Post by ebini »

o.k. this was silly of my.

Just return the path to the image in the called function.

=> Solved.
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests