Color picker for Graphical Text MOD

Post custom hacks and enhancements for phpwcms here only. Maybe some of these things will be included in official release later.
Post Reply
Goran
Posts: 81
Joined: Thu 27. Nov 2003, 11:43
Location: Zagreb, Croatia
Contact:

Color picker for Graphical Text MOD

Post by Goran »


Fill out color value field in Color definitions setting by selecting the color from a popup palette. Based on free javascript Tigra Color Picker.
Image
-------------------------------------------------------------------------------------------------

1. Open include/inc_module/mod_graphical_text/inc_tmpl/gt.color.update.tmpl.php and place this code right after the closing ?> tag:

Code: Select all

<script language=JavaScript src="include/inc_module/mod_graphical_text/picker/picker.js"></script>
2. Add name="tcp" to form properties, like this:

Code: Select all

<form name="tcp" action="phpwcms.php?do=modules&p=2&s=colors&t=<?php echo $action; ?>&color_id=<?php echo $color_id;?>&doit=1" method="post">
3. Replace this code

Code: Select all

<td># <input name="color_info" type="text" id="font_shortname" class="f11b" style="width: 350px" value="<?php echo $color_info; ?>" size="50" maxlength="6"></td>
with this code

Code: Select all

<td># <input name="color_info" type="text" id="font_shortname" class="f11b" style="width: 350px" value="<?php echo $color_info; ?>" size="50" maxlength="6"><a href="javascript:TCP.popup(document.forms['tcp'].elements['color_info'])"><img width="15" height="13" border="0" alt="Click Here to Pick up the color" src="include/inc_module/mod_graphical_text/picker/sel.gif"></a></td>
4. Download picker.zip from here, unzip and move 'picker' folder to include/inc_module/mod_graphical_text/ directory.
Post Reply