Updating the Banner plugin for Cacti v1.1.x

Discussions on developing plugins for the Cacti Plugin Architecture

Moderators: Developers, Moderators

Post Reply
name
Posts: 1
Joined: Wed Jun 14, 2017 5:35 am

Updating the Banner plugin for Cacti v1.1.x

Post by name »

Hi,

I am updating the banner plugin (http://docs.cacti.net/userplugin:banner) for PIA 3.1/Cacti v1.1.x (1.1.10).
For those who don't know what it is, it is a plugin you can use to display a banner at the top of Cacti so that users can be informed of certain events (for instance Scheduled Downtime, etc.).

Currently I am running into two problems.

Cacti doesn't support the "body_style" plugin hook anymore. I have replaced the <body> tag in include/top_graph_header.php and in include/top_header.php to:

Code: Select all

<body <?php print api_plugin_hook_function("body_style", "");?>>
The plugin works for the themes: Classic, Dark, Modern, but I have an issue with Paper-plane and Paw.

Because the plugin takes in some room on the last two themes the scroll bar is changed. If for instance try to change a users Theme, the Return and Save buttons drop off the screen, so you can't select them.

Attached my codechange for the the plugin, I haven't changed the original developer, because he did a lot more than me.

I hope someone can help me on how I could integrate the plugin better into the net Plugin Architecture?

Thank you in advance.
Attachments
banner.tar.gz
Banner Plugin v1.00
(20.5 KiB) Downloaded 253 times
User avatar
Pucho
Cacti User
Posts: 185
Joined: Wed Jul 20, 2016 8:00 pm

Re: Updating the Banner plugin for Cacti v1.1.x

Post by Pucho »

Have you read this? https://github.com/Cacti/cacti/wiki/PluginMigration

I can't help you much there but it might worth the read.
Cacti - 1.2.15
Poller Type - Spine
Weathermap 0.98a
Server Info - Linux 3.10.0 - Centos 7
Web Server - Apache/2.4.6 PHP 5.4.16
MySQL - 5.5 ;RRDTool - 1.4.8 ;SNMP - 5.7.2
Religion - Anti forum pets
User avatar
Osiris
Cacti Guru User
Posts: 1424
Joined: Mon Jan 05, 2015 10:10 am

Re: Updating the Banner plugin for Cacti v1.1.x

Post by Osiris »

I would rewrite the whole thing in javascript using jQuery. Still a plugin of course.
Before history, there was a paradise, now dust.
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests