| 1 |
<?php
|
| 2 |
// $Id: imagecache_textactions.module,v 1.2 2008/08/19 14:40:44 dman Exp $
|
| 3 |
/**
|
| 4 |
* @file Provide text manipulation process for imagecache.
|
| 5 |
*
|
| 6 |
* Ported by dman
|
| 7 |
* from http://drupal.org/node/264862#comment-865490 by patrickharris
|
| 8 |
*
|
| 9 |
*/
|
| 10 |
|
| 11 |
require_once('utility.inc'); // For simple color routines
|
| 12 |
|
| 13 |
/**
|
| 14 |
* Implementation of hook_imagecache_actions().
|
| 15 |
*/
|
| 16 |
function imagecache_textactions_imagecache_actions() {
|
| 17 |
$actions = array(
|
| 18 |
'textactions_text2canvas' => array(
|
| 19 |
'name' => t('Text: Static text.'),
|
| 20 |
'description' => t('Add static or dynamic (coded) text to an image.'),
|
| 21 |
'file' => 'textactions.inc',
|
| 22 |
),
|
| 23 |
);
|
| 24 |
|
| 25 |
return $actions;
|
| 26 |
}
|
| 27 |
|
| 28 |
function imagecache_textactions_install() {
|
| 29 |
cache_clear_all('imagecache_actions', 'cache');
|
| 30 |
}
|
| 31 |
|
| 32 |
function imagecache_textactions_help($path, $arg) {
|
| 33 |
switch ($path) {
|
| 34 |
case 'admin/help#imagecache_textactions':
|
| 35 |
$output = `find /usr/share/fonts -name \*.ttf`;
|
| 36 |
return "Fonts Found : <pre>" . $output . "</pre>";
|
| 37 |
}
|
| 38 |
}
|
| 39 |
|
| 40 |
/**
|
| 41 |
* Need to register the theme functions we expect to use
|
| 42 |
*/
|
| 43 |
function imagecache_textactions_theme() {
|
| 44 |
return array(
|
| 45 |
'canvasactions_rgb_form' => array(
|
| 46 |
'file' => 'utility.inc',
|
| 47 |
'arguments' => array('form' => NULL),
|
| 48 |
),
|
| 49 |
'canvasactions_rgb' => array(
|
| 50 |
'file' => 'utility.inc',
|
| 51 |
'arguments' => array('rgb' => NULL),
|
| 52 |
),
|
| 53 |
);
|
| 54 |
}
|