--- affiliates.module 2009-04-16 10:53:30.000000000 +0200 +++ affiliatesNEW.module 2009-06-20 23:26:34.000000000 +0200 @@ -383,6 +383,7 @@ function affiliate_form_button_add_edit( '#default_value' => $affiliate->type, '#options' => array( 'image' => 'Image', + 'flash' => 'Flash', 'text' => 'Text', ), ); @@ -405,8 +406,8 @@ function affiliate_form_button_add_edit( '#type' => 'textfield', '#title' => t('Hosted button URL'), '#default_value' => $affiliate->anchor, - '#size' => 40, - '#maxlength' => 256, + '#size' => 80, + '#maxlength' => 2048, '#description' => t('If your button is hosted elsewhere, enter the URL here.') ); @@ -492,6 +493,9 @@ function affiliate_form_button_add_edit_ } $button_url = $_FILES['files']['name']['image'] ? $base_url .'/'. $directory .'/'. $_FILES['files']['name']['image'] : $form_values['anchor']; } + else if ($form_values['type'] == 'flash') { + $button_url = $form_values['anchor']; + } else { $button_url = ""; } @@ -960,25 +964,42 @@ function affiliates_list() { // what they're going to be adding to their site. $output .= "\nanchor . "\"/>
"; } + else if ($row->type == "flash") { + // Print flash code + $output .= $row->anchor ."
"; + + } else { // Print text code. $output .= $row->label . "
"; } // Now add the textarea for copying the code. + + $output .= "
\n"; + $output .= "
\n"; //Now add the label assigned through the admin interface. $output .= $row->label . " : " . $row->points . " points

"; }