modules

09
Feb
2016

things I learned about color module

Posted by hamu

Problem:

Changing theme colors using the admin area failed.

Solution:

The logo.png file was missing from the theme's root folder, probably causing a uncaught exception that caused the bug. After locating the image file in thr correct place (root folder), the problem ceased.

Pre-defined color schemes

Pre-defined color schemes are declared in 'color.inc' file, as an array inside 'schemes' array, and are executed in 'preview.js'. So we can use these 2 files to add color definitions to the theme.

Need: I have a content type with a File field. When this field is displayed, I want it to show only icon without any text.
The current formats are either "Generic file" (icon + file name), "Table of files" (icon + file name + size) and "URL to file" (the entire file's URL).
I want to add a format "File icon", that will display an icon that utilizes as a link to the file.

What I did:
I created a very simple module called "File icon". I placed the file_icon directory in sites\default\modules