DONE: DOWN Image for Console/Graph/Plugins Tabs...

Anything that you think should be in Cacti.

Moderators: Developers, Moderators

Post Reply
User avatar
twelzy
Cacti User
Posts: 83
Joined: Wed Mar 30, 2005 6:48 pm
Location: BRAZIL/Brasilia

DONE: DOWN Image for Console/Graph/Plugins Tabs...

Post by twelzy »

Hi everybody!

I think that would be great have the image tabs of the console/graph/plugins in red when selected, like the settings/tree/list/preview tabs!

Thanks in advance!
(And sorry for my poor English)
Last edited by twelzy on Fri Jan 26, 2007 3:03 pm, edited 2 times in total.
Thanks in advance!
(And sorry for my poor English...)
_______________________________________
twelzy (Enio Sanches)
User avatar
twelzy
Cacti User
Posts: 83
Joined: Wed Mar 30, 2005 6:48 pm
Location: BRAZIL/Brasilia

Post by twelzy »

Well,


I decided to do it by my self!

The images are attached.
(I think I didn't forgot anyone!)

Now we have to modify some files...

- "Console" Tab (include/top_header.php):
Change:

Code: Select all

&nbsp;<a href="<?php echo $config['url_path']; ?>index.php"><img src="<?php echo $config['url_path']; ?>images/tab_console.gif" alt="Console" align="absmiddle" border="0"></a><a href="<?php echo $config['url_path']; ?>graph_view.php"><img src="<?php echo $config['url_path']; ?>images/tab_graphs.gif" alt="Console" align="absmiddle" border="0"></a><?php
For:

Code: Select all

&nbsp;<a href="<?php echo $config['url_path']; ?>index.php"><img src="<?php echo $config['url_path']; ?>images/tab_console<?php if (basename($_SERVER["PHP_SELF"]) != "graph_view.php") { echo "_down"; }?>.gif" alt="Console" align="absmiddle" border="0"></a><a href="<?php echo $config['url_path']; ?>graph_view.php"><img src="<?php echo $config['url_path']; ?>images/tab_graphs.gif" alt="Console" align="absmiddle" border="0"></a><?php

- "Graphs" Tab (include/top_graph_header.php):
Change:

Code: Select all

&nbsp;<?php if ($show_console_tab == true) {?><a href="<?php echo $config['url_path']; ?>index.php"><img src="<?php echo $config['url_path']; ?>images/tab_console.gif" alt="Console" align="absmiddle" border="0"></a><?php }?><a href="<?php echo $config['url_path']; ?>graph_view.php"><img src="<?php echo $config['url_path']; ?>images/tab_graphs.gif" alt="Graphs" align="absmiddle" border="0"></a><?php
For:

Code: Select all

&nbsp;<?php if ($show_console_tab == true) {?><a href="<?php echo $config['url_path']; ?>index.php"><img src="<?php echo $config['url_path']; ?>images/tab_console.gif" alt="Console" align="absmiddle" border="0"></a><?php }?><a href="<?php echo $config['url_path']; ?>graph_view.php"><img src="<?php echo $config['url_path']; ?>images/tab_graphs<?php if (basename($_SERVER["PHP_SELF"]) == "graph_view.php") { echo "_down"; }?>.gif" alt="Graphs" align="absmiddle" border="0"></a><?php

- "Cacti Reports" Plugin Tab (plugins/cactireports/setup.php):
Change:

Code: Select all

print '<a href="' . $config['url_path'] . 'plugins/cactireports/report_view.php"><img src="' . $config['url_path'] . 'plugins/cactireports/images/tab_reports.gif" alt="Reports" align="absmiddle" border="0"></a>';
For:

Code: Select all

print '<a href="' . $config['url_path'] . 'plugins/cactireports/report_view.php"><img src="' . $config['url_path'] . 'plugins/cactireports/images/tab_reports'; if (basename($_SERVER["PHP_SELF"]) == "report_view.php") { print "_down"; } print '.gif" alt="Reports" align="absmiddle" border="0"></a>';

- "Cycle" Plugin Tab (plugins/cycle/setup.php):
Change:

Code: Select all

print '<a href="' . $config['url_path'] . 'plugins/cycle/cycle.php"><img src="' . $config['url_path'] . 'plugins/cycle/images/tab_cycle.gif" alt="cycle" align="absmiddle" border="0"></a>';
For:

Code: Select all

print '<a href="' . $config['url_path'] . 'plugins/cycle/cycle.php"><img src="' . $config['url_path'] . 'plugins/cycle/images/tab_cycle'; if (basename($_SERVER["PHP_SELF"]) == "cycle.php") { print "_down"; } print '.gif" alt="cycle" align="absmiddle" border="0"></a>';

- "Devices" Plugin Tab (plugins/devices/setup.php):
Change:

Code: Select all

print '<a href="' . $config['url_path'] . 'plugins/devices/devices.php"><img src="' . $config['url_path'] . 'plugins/devices/images/tab_devices.png" alt="Devices" align="absmiddle" border="0"></a>';
For:

Code: Select all

print '<a href="' . $config['url_path'] . 'plugins/devices/devices.php"><img src="' . $config['url_path'] . 'plugins/devices/images/tab_devices'; if (basename($_SERVER["PHP_SELF"]) == "devices.php") { print "_down"; } print '.gif" alt="Devices" align="absmiddle" border="0"></a>';
- "Discover" Plugin Tab (plugins/dicovery/setup.php):
Change:

Code: Select all

print '<a href="' . $config['url_path'] . 'plugins/discovery/discover.php"><img src="' . $config['url_path'] . 'plugins/discovery/images/tab_discover.gif" alt="Discover" align="absmiddle" border="0"></a>';
For:

Code: Select all

print '<a href="' . $config['url_path'] . 'plugins/discovery/discover.php"><img src="' . $config['url_path'] . 'plugins/discovery/images/tab_discover'; if (basename($_SERVER["PHP_SELF"]) == "discover.php") { print "_down"; } print '.gif" alt="Discover" align="absmiddle" border="0"></a>';

- "IP Subnet Calculator" Plugin Tab (plugins/ipsubnet/setup.php):
Change:

Code: Select all

print '<a href="' . $config['url_path'] . 'plugins/ipsubnet/ipsubnet.php"><img src="' . $config['url_path'] . 'plugins/ipsubnet/images/tab_ipsubnet.gif" alt="ipsubnet" align="absmiddle" border="0"></a>';
For:

Code: Select all

print '<a href="' . $config['url_path'] . 'plugins/ipsubnet/ipsubnet.php"><img src="' . $config['url_path'] . 'plugins/ipsubnet/images/tab_ipsubnet'; if (basename($_SERVER["PHP_SELF"]) == "ipsubnet.php") { print "_down"; } print '.gif" alt="ipsubnet" align="absmiddle" border="0"></a>';

- "Links" Plugin Tab (plugins/links/setup.php):
Change:

Code: Select all

print '<a href="' . $config['url_path'] . 'plugins/links/links.php"><img src="' . $config['url_path'] . 'plugins/links/images/tab_links.png" alt="Links" align="absmiddle" border="0"></a>';
For:

Code: Select all

print '<a href="' . $config['url_path'] . 'plugins/links/links.php"><img src="' . $config['url_path'] . 'plugins/links/images/tab_links'; if (basename($_SERVER["PHP_SELF"]) == "links.php") { print "_down"; } print '.png" alt="Links" align="absmiddle" border="0"></a>';

- "Mac Track" Plugin Tab (plugins/mactrack/setup.php):
Change:

Code: Select all

print '<a href="' . $config['url_path'] . 'plugins/mactrack/mactrack_view.php"><img src="' . $config['url_path'] . 'plugins/mactrack/images/tab_mactrack.gif" alt="Mac Device Tracker" align="absmiddle" border="0"></a>';
For:

Code: Select all

print '<a href="' . $config['url_path'] . 'plugins/mactrack/mactrack_view.php"><img src="' . $config['url_path'] . 'plugins/mactrack/images/tab_mactrack'; if (basename($_SERVER["PHP_SELF"]) == "mactrack_view.php") { print "_down"; } print '.gif" alt="Mac Device Tracker" align="absmiddle" border="0"></a>';
- "Manage" Plugin Tab (plugins/manage/setup.php):
Change:

Code: Select all

print '<a href="' . $config['url_path'] . 'plugins/manage/manage.php?simple='.$v.'"><img src="' . $config['url_path'] . 'plugins/manage/images/tab_manage.gif" alt="Manage" align="absmiddle" border="0"></a>';
For:

Code: Select all

print '<a href="' . $config['url_path'] . 'plugins/manage/manage.php?simple='.$v.'"><img src="' . $config['url_path'] . 'plugins/manage/images/tab_manage'; if (basename($_SERVER["PHP_SELF"]) == "manage.php") { print "_down"; } print '.gif" alt="Manage" align="absmiddle" border="0"></a>';

- "Monitor" Plugin Tab (plugins/monitor/setup.php):
Change:

Code: Select all

print '<a href="' . $config['url_path'] . 'plugins/monitor/monitor.php"><img src="' . $config['url_path'] . 'plugins/monitor/images/tab_monitor.gif" alt="Monitor" align="absmiddle" border="0"></a>';
For:

Code: Select all

print '<a href="' . $config['url_path'] . 'plugins/monitor/monitor.php"><img src="' . $config['url_path'] . 'plugins/monitor/images/tab_monitor'; if (basename($_SERVER["PHP_SELF"]) == "monitor.php") { print "_down"; } print '.gif" alt="Monitor" align="absmiddle" border="0"></a>';

- "NTop" Plugin Tab (plugins/ntop/setup.php):
Change:

Code: Select all

print '<a href="' . $config['url_path'] . 'plugins/ntop/ntop.php"><img src="' . $config['url_path'] . 'plugins/ntop/images/tab_ntop.gif" alt="ntop" align="absmiddle" border="0"></a>';
For:

Code: Select all

print '<a href="' . $config['url_path'] . 'plugins/ntop/ntop.php"><img src="' . $config['url_path'] . 'plugins/ntop/images/tab_ntop'; if (basename($_SERVER["PHP_SELF"]) == "ntop.php") { print "_down"; } print '.gif" alt="ntop" align="absmiddle" border="0"></a>';

- "Passwd" Plugin Tab (plugins/passwd/setup.php):
Change:

Code: Select all

print '<a href="' . $config['url_path'] . 'plugins/passwd/passwd.php"><img src="' . $config['url_path'] . 'plugins/passwd/images/tab_passwd.gif" alt="Change Password" align="absmiddle" border="0"></a>';
For:

Code: Select all

print '<a href="' . $config['url_path'] . 'plugins/passwd/passwd.php"><img src="' . $config['url_path'] . 'plugins/passwd/images/tab_passwd'; if (basename($_SERVER["PHP_SELF"]) == "passwd.php") { print "_down"; } print '.gif" alt="Change Password" align="absmiddle" border="0"></a>';

- "Syslog (Haloe)" Plugin Tab (plugins/haloe/setup.php):
Change:

Code: Select all

print '<a href="' . $config['url_path'] . 'plugins/haloe/haloe.php"><img src="' . $config['url_path'] . 'plugins/haloe/images/tab_haloe.gif" alt="haloe" align="absmiddle" border="0"></a>';
For:

Code: Select all

print '<a href="' . $config['url_path'] . 'plugins/haloe/haloe.php"><img src="' . $config['url_path'] . 'plugins/haloe/images/tab_haloe'; if (basename($_SERVER["PHP_SELF"]) == "haloe.php") { print "_down"; } print '.gif" alt="haloe" align="absmiddle" border="0"></a>';

- "Thold" Plugin Tab (plugins/thold/setup.php):
Change:

Code: Select all

print '<a href="' . $config['url_path'] . 'plugins/thold/graph_thold.php"><img src="' . $config['url_path'] . 'plugins/thold/images/tab_thold.gif" alt="thold" align="absmiddle" border="0"></a>';
For:

Code: Select all

print '<a href="' . $config['url_path'] . 'plugins/thold/graph_thold.php"><img src="' . $config['url_path'] . 'plugins/thold/images/tab_thold'; if (basename($_SERVER["PHP_SELF"]) == "graph_thold.php") { print "_down"; } print '.gif" alt="thold" align="absmiddle" border="0"></a>';

- "Uptime" Plugin Tab (plugins/uptime/setup.php):
Change:

Code: Select all

print '<a href="' . $config['url_path'] . 'plugins/uptime/uptime.php"><img src="' . $config['url_path'] . 'plugins/uptime/images/tab_uptime.gif" alt="Uptime" align="absmiddle" border="0"></a>';
For:

Code: Select all

print '<a href="' . $config['url_path'] . 'plugins/uptime/uptime.php"><img src="' . $config['url_path'] . 'plugins/uptime/images/tab_uptime'; if (basename($_SERVER["PHP_SELF"]) == "uptime.php") { print "_down"; } print '.gif" alt="Uptime" align="absmiddle" border="0"></a>';

- "Weathermap" Plugin Tab (plugins/weathermap/setup.php):
Change:

Code: Select all

print '<a href="' . $config['url_path'] . 'plugins/weathermap/weathermap-cacti-plugin.php"><img src="' . $config['url_path'] . 'plugins/weathermap/images/tab_weathermap.png" alt="Weathermap" align="absmiddle" border="0"></a>';
For:

Code: Select all

print '<a href="' . $config['url_path'] . 'plugins/weathermap/weathermap-cacti-plugin.php"><img src="' . $config['url_path'] . 'plugins/weathermap/images/tab_weathermap'; if (basename($_SERVER["PHP_SELF"]) == "weathermap-cacti-plugin.php") { print "_down"; } print '.png" alt="Weathermap" align="absmiddle" border="0"></a>';
Attachments
Tab Images (DOWN).rar
(43.43 KiB) Downloaded 222 times
Thanks in advance!
(And sorry for my poor English...)
_______________________________________
twelzy (Enio Sanches)
User avatar
twelzy
Cacti User
Posts: 83
Joined: Wed Mar 30, 2005 6:48 pm
Location: BRAZIL/Brasilia

Post by twelzy »

Here is a sample image...
Attachments
sample.gif
sample.gif (21.54 KiB) Viewed 3106 times
Thanks in advance!
(And sorry for my poor English...)
_______________________________________
twelzy (Enio Sanches)
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest