This forum is for module development and code related questions, not general module support. For general support, use the Post installation forum.

Acidfree screen size (large size) not sizing correctly

I am hoping an experienced Acidfree user or the brilliant Mr. Mauery himself might be able to assist with this: I have a site set up in Drupal 4.7.3 on Apache with GD installed but not exiftran or jpegtran. I am using Acidfree to manage some photos, and it's working well except for one thing: the "Resolution of screen size image" is not being honored.

CCK - Add a color (+with the V.5 color picker) field

as written here:

A new CCK widget is needed:
* Allow user to add a color field.
* Color could be added manually or using the color picker (as it appears in YOUR SITE/admin/build/themes/settings/garland
* As a designer I think that the color system should be by default the same as the color picker, but also can be of differnet color systems (i.e pantone).

Anyone for the challenge?

Dynamic display using javascript?

I'm sure this must be possible, but I don't know anything about how js works with Drupal and I can't seem to find any; a) instructions or, b) examples that I can follow easily... Here's what I'd like to do:

I have several .inc files which contain (for example);

function tablemanager_field_barchart_name($field) {
  return t('Bar Chart');
} // tablemanager_field_barchart_name

function tablemanager_field_barchart_table_form(&$form, $col, $default = "0\n500") {
  $default = explode("\n", $default);
  $form['dynamic']['low'.$col] = array(
    '#type' => 'textfield',
    '#title' => t('Enter lowest value enterable for bar charts'),
    '#size' => 4,
    '#maxlength' => 4,
    '#default_value' => $default[0],
    '#required' => TRUE,
  );
  $form['dynamic']['high'.$col] = array(
    '#type' => 'textfield',
    '#title' => t('Enter highest value enterable for bar charts'),
    '#size' => 4,
    '#maxlength' => 4,
    '#default_value' => $default[1],
    '#required' => TRUE,
  );
} // tablemanager_field_barchart_table_form

I have a form hook which adds the form data to the form if the _table_form hook is selected from an array of the field names. At the moment the whole page needs to refresh when a new field type is selected to alter the extra settings which are displayed. (Just via an onClick... node-form.submit js call).

<?php
$form['add']['newheader'] = array(

filter_form() use outside of node forms - bug?

I'm trying to use filter_form() to add a filter selection menu to a settings form. Part of the requirement is that the selected format value is stored within the forms tree structure array, rather than being flattened.

For a test I created this tiny module to display a form. When submitted it dumps the tree structure.

<?php
function test_settings() {

	$form['fields1'] = array('#type' => 'fieldset', '#tree' => TRUE);

	$form['fields1']['test'] = array(
	'#type' => 'textfield',
	'#title' => t('test'), '#default_value' => 'meow');

	$form['fields1']['format1'] = filter_form(1, 0, array('format1'));

	$form['fields1']['fields2'] = array('#type' => 'fieldset','#tree' => TRUE);
	$form['fields1']['fields2']['test2'] = array(
	'#type' => 'textfield',
	'#title' => t('test2'),
	'#default_value' => 'blah');
	$form['fields1']['fields2']['format2'] = filter_form(2, 0, array('format2'));

	$form['#validate'] = array('test_validate' => array());

	return $form;
}

function test_validate($id, $vars) {
dprint_r($vars);
exit;
}

?>

If you create and activate the module you may view the form by visiting ?q=admin/settings/test

The resulting tree structure looks like:

Array
(
[fields1] => Array
(
[test] => meow
[fields2] => Array
(
[test2] => blah
)

Mass URL aliasing

Hello
I want to use Mass URL aliasing. I understand this is a PHP function, but what exactly I need to do to use this function?

For example I have this URL at "Post New Forum topic": http://mypage.com/node/add/forum/0 I want to change the URL to: http://mypage.com/forum/addpost/0

and the same thing for each number (0 to ......)

Of course I want to rewrite more URL. Please help me a bit with some idea to use this function.

convert node to plain text for inclusion in an email

I'm currently modifying a module (subscriptions) to include the body text of a node in an email sent out to users.

However, the node body I get from the node_revisions database table has all of the html tags through it (

etc). Is there a simple way I can convert the node body text from html -> plain text so that I can include it in a plain text email?

Thanks for your suggestions...

G.

Pages

Subscribe with RSS Subscribe to RSS - Module development and code questions