Cacti not showing right top icons after PA install

Support for the Plugin Architecture

Moderators: Developers, Moderators

Post Reply
Fjugy
Posts: 5
Joined: Fri Feb 27, 2009 12:29 pm

Cacti not showing right top icons after PA install

Post by Fjugy »

not sure if its problem for all, and havent found such topic here.

Here is what i had:
cacti 0.8.7d, PA2.4

After installation from prepatched files my topright icons disapered whenever i choose anything except for grapth tab. I found that problem was with php parsing server params.

original line of code code in PA for top_graph_header.php was

Code: Select all

<?php if ((!isset($_SESSION["sess_user_id"])) || ($current_user["graph_settings"] == "on")) { print '<a href="'. $config['url_path'] . 'graph_settings.php"><img src="'. $config['url_path'] . 'images/tab_settings'; if (basename($_SERVER["PHP_SELF"]) == "graph_settings.php") { print "_down"; } print '.gif" border="0" alt="Settings" align="absmiddle"></a>';}?>&nbsp;&nbsp;<?php if ((!isset($_SESSION["sess_user_id"])) || ($current_user["show_tree"] == "on")) {?><a href="<?php echo $config['url_path']; ?>graph_view.php?action=tree"><img src="<?php echo $config['url_path']; ?>images/tab_mode_tree<?php if ($_REQUEST["action"] == "tree") { print "_down"; }?>.gif" border="0" title="Tree View" alt="Tree View" align="absmiddle"></a><?php }?><?php if ((!isset($_SESSION["sess_user_id"])) || ($current_user["show_list"] == "on")) {?><a href="<?php echo $config['url_path']; ?>graph_view.php?action=list"><img src="<?php echo $config['url_path']; ?>images/tab_mode_list<?php if ($_REQUEST["action"] == "list") { print "_down"; }?>.gif" border="0" title="List View" alt="List View" align="absmiddle"></a><?php }?><?php if ((!isset($_SESSION["sess_user_id"])) || ($current_user["show_preview"] == "on")) {?><a href="<?php echo $config['url_path']; ?>graph_view.php?action=preview"><img src="<?php echo $config['url_path']; ?>images/tab_mode_preview<?php if ($_REQUEST["action"] == "preview") { print "_down"; }?>.gif" border="0" title="Preview View" alt="Preview View" align="absmiddle"></a><?php }?>&nbsp;<br>
all sections with

Code: Select all

<?php if ($_REQUEST["action"] == 
caused errros saying no action specified.
i modified it to

Code: Select all

if (isset($_REQUEST["action"]) && $_REQUEST["action"] == 
so my line looks like

Code: Select all

<?php if ((!isset($_SESSION["sess_user_id"])) || ($current_user["graph_settings"] == "on")) { print '<a href="'. $config['url_path'] . 'graph_settings.php"><img src="'. $config['url_path'] . 'images/tab_settings'; if (basename($_SERVER["PHP_SELF"]) == "graph_settings.php") { print "_down"; } print '.gif" border="0" alt="Settings" align="absmiddle"></a>';}?>&nbsp;&nbsp;<?php if ((!isset($_SESSION["sess_user_id"])) || ($current_user["show_tree"] == "on")) {?><a href="<?php echo $config['url_path']; ?>graph_view.php?action=tree"><img src="<?php echo $config['url_path']; ?>images/tab_mode_tree<?php if (isset($_REQUEST["action"]) && $_REQUEST["action"] == "tree") { print "_down"; }?>.gif" border="0" title="Tree View" alt="Tree View" align="absmiddle"></a><?php }?><?php if ((!isset($_SESSION["sess_user_id"])) || ($current_user["show_list"] == "on")) {?><a href="<?php echo $config['url_path']; ?>graph_view.php?action=list"><img src="<?php echo $config['url_path']; ?>images/tab_mode_list<?php if (isset($_REQUEST["action"]) && $_REQUEST["action"] == "list") { print "_down"; }?>.gif" border="0" title="List View" alt="List View" align="absmiddle"></a><?php }?><?php if ((!isset($_SESSION["sess_user_id"])) || ($current_user["show_preview"] == "on")) {?><a href="<?php echo $config['url_path']; ?>graph_view.php?action=preview"><img src="<?php echo $config['url_path']; ?>images/tab_mode_preview<?php if (isset($_REQUEST["action"]) &&  $_REQUEST["action"] == "preview") { print "_down"; }?>.gif" border="0" title="Preview View" alt="Preview View" align="absmiddle"></a><?php }?>&nbsp;<br>
after this modification i have no problems with icons.

Hope it will help someone :)
nationals
Cacti User
Posts: 76
Joined: Wed Aug 27, 2008 5:21 am
Location: China
Contact:

Post by nationals »

I have modify the pa 2.4 file and upload it to:

http://forums.cacti.net/viewtopic.php?t=31443

pls get it in and test it.
bdiez
Posts: 15
Joined: Thu Sep 08, 2005 8:09 am
Location: Spain

Re: Cacti not showing right top icons after PA install

Post by bdiez »

Hello.

I was having the same problem as Fjugy in a new Cacti installation over Windows. After PIA 2.4 install (brand new, from cactiusers.org) the Tree, List and Preview top-right icons are missed in some situations.



I've downloaded the modified PIA 2.4 version from here and replaced the "top_graph_header.php" file using the new one found here, but unfortunately this has not solved the problem for me. After diggign a little more I've found another PIA 2.4 correction from TheWitness in the following post:

http://forums.cacti.net/viewtopic.php?t ... c&start=30

...and using this other "top_graph_header.php" version the problem has gone.

In any case thank you very much to both for the help given to solve this problem.

Bernardo
Post Reply

Who is online

Users browsing this forum: No registered users and 7 guests