Cacti (home)ForumsDocumentation
Cacti: offical forums and support
It is currently Wed Jul 26, 2017 4:00 pm

All times are UTC - 5 hours




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: Updating the Banner plugin for Cacti v1.1.x
PostPosted: Wed Jun 14, 2017 6:07 am 
Offline

Joined: Wed Jun 14, 2017 5:35 am
Posts: 1
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:
<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:
File comment: Banner Plugin v1.00
banner.tar.gz [20.5 KiB]
Downloaded 6 times
Top
 Profile  
 
 Post subject: Re: Updating the Banner plugin for Cacti v1.1.x
PostPosted: Wed Jun 14, 2017 4:06 pm 
Offline
Cacti User
User avatar

Joined: Wed Jul 20, 2016 8:00 pm
Posts: 80
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 - 0.8.8h
Poller Type - CMD
Weathermap 0.98a
Server Info - Linux 3.10.0 - Centos 6
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


Top
 Profile  
 
 Post subject: Re: Updating the Banner plugin for Cacti v1.1.x
PostPosted: Sat Jul 08, 2017 9:29 pm 
Offline
Cacti User
User avatar

Joined: Mon Jan 05, 2015 10:10 am
Posts: 413
I would rewrite the whole thing in javascript using jQuery. Still a plugin of course.

_________________
Before history, there was a paradise, now dust.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

Protected by Anti-Spam ACP Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group