/[drupal]/contributions/modules/imagecache_actions/imagecache_textactions.module
ViewVC logotype

Contents of /contributions/modules/imagecache_actions/imagecache_textactions.module

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.3 - (show annotations) (download) (as text)
Wed Oct 8 07:20:03 2008 UTC (13 months, 2 weeks ago) by dman
Branch: MAIN
CVS Tags: HEAD
Branch point for: DRUPAL-5--2
Changes since 1.2: +26 -7 lines
File MIME type: text/x-php
Merged the textactions into one form
Repaired a little for D6 Validation changes
Added system font detection help text (may not work for everyone)
more code review to come
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 }

  ViewVC Help
Powered by ViewVC 1.1.2