Home > Cacti, CactiEZ > SUPERLINKS SHOWS A HALF PAGE WHEN UPGRADING TO CACTI 0.8.7g/PIA2.8

SUPERLINKS SHOWS A HALF PAGE WHEN UPGRADING TO CACTI 0.8.7g/PIA2.8

December 28th, 2010 peter Leave a comment Go to comments

When upgrading Cacti to 0.8.7g/PIA2.8, I have noticed that the superlinks plugin is not working correctly. When clicking on a tab which was created by the superlinks plugin, the html page is showing up only half. There is a tiny scrollbar on the right site within IE. Some browsers like Chrome shows a blank page.

When searching around on the Internet, I found the following solution:

Edit /var/www/html/plugins/superlinks/superlinks.php. Rule number 58 shows the following code:

print ‘<iframe src="’ . $page['contentfile'] . ‘" width="100%" height="100%" frameborder="0"></iframe>’;

Replace this with the following code:

print ‘<iframe id="frame" src="’ . $page['contentfile'] .’" width="100%" height="100%" frameborder="0"></iframe>’;
print "<script type=’text/javascript’>
function resizeIframe() {
var height=window.innerWidth;//Firefox
if (document.documentElement.clientHeight) {
height=document.documentElement.clientHeight;//IE
};
document.getElementById(‘frame’).style.height=parseInt(height-document.getElementById(‘frame’).offsetTop-72)+’px’;
};
document.getElementById(‘frame’).onload = resizeIframe;
window.onresize = resizeIframe;
</script>";

 

Reference:
The forum article on the official cacti forum.
My colleague @booches.nl.

Categories: Cacti, CactiEZ Tags:
  1. No comments yet.
  1. No trackbacks yet.