Cacti (home)ForumsDocumentation
Cacti: offical forums and support
It is currently Sat Jul 20, 2019 2:58 am

All times are UTC - 5 hours




Post new topic Reply to topic  [ 10 posts ] 
Author Message
 Post subject: Colours.
PostPosted: Fri Feb 04, 2005 2:09 pm 
Offline

Joined: Thu Jan 27, 2005 6:30 am
Posts: 17
Hey all,

Not sure if this has been done before, if so, damn. :)

Today I was getting a bit fed up trying to match colours when I wanted to create the awesome 'Fire' effect, so I decided to arrange my colours a bit better.


This is purely cosmetic and will create no additional functionality to the wonderful cacti.
I take no responsibility for these instructions, USE AT YOUR OWN RISK :p (always wanted to say that)



1. With PHPMyAdmin, drop the table 'colors' and import the new colors.sql

With your favourite editor (php expert editor).

2. Open "color.php" located in your cacti root.


Change Line 131:


From This:

Code:
$color_list = db_fetch_assoc("select * from colors order by hex");


To This:

Code:
$color_list = db_fetch_assoc("select * from colors order by id");




3 . Open "html_form.php" located in in "/cacti/lib"


Change line 370:


From This:

Code:
$colors_list = db_fetch_assoc("select id,hex from colors order by hex desc");


To This:

Code:
$colors_list = db_fetch_assoc("select id,hex from colors order by id"); 



Make sure you update your Graph Templates with your new colours :)


Here are some screen shots showing you what I mean.

Before
Image

After
Image


Attachments:
File comment: Colours !!!
colors.txt [5.08 KiB]
Downloaded 1696 times
File comment: After Drop Box
after_drop.jpg
after_drop.jpg [ 29.94 KiB | Viewed 28224 times ]
File comment: Before Drop Box
before_drop.jpg
before_drop.jpg [ 29.48 KiB | Viewed 28223 times ]
Top
 Profile  
 
 Post subject:
PostPosted: Fri Feb 04, 2005 2:10 pm 
Offline

Joined: Thu Jan 27, 2005 6:30 am
Posts: 17
Hmm, have I put this in the right forum category?


Top
 Profile  
 
 Post subject:
PostPosted: Fri Feb 04, 2005 3:03 pm 
Offline
Developer/Forum Admin
User avatar

Joined: Mon Nov 17, 2003 6:35 pm
Posts: 6016
Location: Michigan, USA
Oooooooooo, I like...

Never really paid that close attention to the colors, but often wondered why they where so mixed up.

Btw, if some removes or adds colors, you will still have problems with the order, because of the ID. I will look, maybe I can talk Ian into just having a big list that is generated automatically, instead of storing it in the database.

_________________
Tony Roman
Experience is what causes a person to make new mistakes instead of old ones.
There are only 3 way to complete a project: Good, Fast or Cheap, pick two.
With age comes wisdom, what you choose to do with it determines whether or not you are wise.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Feb 04, 2005 3:50 pm 
Offline

Joined: Thu Jan 27, 2005 6:30 am
Posts: 17
The main objective of this was to create all the colours I would need and then import the table repeating the process if I needed to add more colours :)

I do like your idea, another way is to have the additional id's editable from within Cacti.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Oct 04, 2005 8:46 am 
Offline
User avatar

Joined: Thu Jan 06, 2005 8:09 am
Posts: 20
If you want - here is the entire WWW safe color set - sorted by hue. This is the SQL code that I imported.


Attachments:
colors.txt [18.2 KiB]
Downloaded 1861 times
Colors-small.JPG
Colors-small.JPG [ 105.88 KiB | Viewed 27083 times ]
Top
 Profile  
 
 Post subject:
PostPosted: Wed Oct 05, 2005 2:21 am 
Offline
Cacti User

Joined: Mon Jun 21, 2004 4:06 am
Posts: 124
Location: North of the Netherlands
These little things make cacti from average to perfect. Great work guys.

Michael :lol:


Top
 Profile  
 
 Post subject: Color of font in drop down list
PostPosted: Wed Aug 23, 2006 10:59 am 
Offline

Joined: Fri May 12, 2006 11:09 am
Posts: 9
I've implemented the 327 color list from this thread ( with the sorting ), but you can't read the hex on darker colors because of the font color being black.

How can you change the color of the font for the hex number on the color list?
Or is this done through code?


Any help on this would be appreciated. Thanks.


Top
 Profile  
 
 Post subject: Cacti Colours
PostPosted: Wed Sep 06, 2006 9:18 pm 
Offline

Joined: Mon Aug 21, 2006 1:52 am
Posts: 3
Thanks guys,

A simple but very useful change.

Great work!


Top
 Profile  
 
 Post subject:
PostPosted: Fri Dec 29, 2006 1:44 pm 
Offline
Developer
User avatar

Joined: Thu Dec 02, 2004 2:46 am
Posts: 22376
Location: Muenster, Germany
Find some of my ideas for a solution here: http://forums.cacti.net/viewtopic.php?t=18869
Reinhard

_________________
Official Cacti Documentation
Official Debugging Help
Central Plugin Repository
Central Templates Repository


Top
 Profile  
 
 Post subject:
PostPosted: Sun Oct 19, 2008 5:53 am 
Offline

Joined: Sun Oct 19, 2008 5:48 am
Posts: 4
Location: home or telkom
wow, very useful, makes my graph more colourful than before..
thanks :D


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

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 6 guests


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