| 80 |
* Implementation of hook_filter_tips(). |
* Implementation of hook_filter_tips(). |
| 81 |
*/ |
*/ |
| 82 |
function chipin_filter_tips($delta, $format, $long = FALSE) { |
function chipin_filter_tips($delta, $format, $long = FALSE) { |
| 83 |
return t('ChipIn Flash widgets can easily be added to this post.'); |
if (variable_get('chipin_link', 'icon') == 'icon') { |
| 84 |
|
$type = t('icon'); |
| 85 |
|
} |
| 86 |
|
else { |
| 87 |
|
$type = t('link'); |
| 88 |
|
} |
| 89 |
|
switch ($long) { |
| 90 |
|
case 0: |
| 91 |
|
return t('Click the ChipIn %type above to add a ChipIn widget to this post.', array('%type' => $type)); |
| 92 |
|
case 1: |
| 93 |
|
return t('Click the ChipIn %type below any text box to add a ChipIn widget to that post.', array('%type' => $type)); |
| 94 |
|
} |
| 95 |
} |
} |
| 96 |
|
|
| 97 |
/** |
/** |
| 371 |
$form['insert'] = array( |
$form['insert'] = array( |
| 372 |
'#type' => 'submit', |
'#type' => 'submit', |
| 373 |
'#value' => t('Insert Widget Code'), |
'#value' => t('Insert Widget Code'), |
| 374 |
'#attributes' => array('onclick' => 'parent.insertWidgetCode()', 'style' => 'float:left;', 'id' => 'insert'), |
'#attributes' => array('onclick' => 'parent.insertWidgetCode(); return false;', 'style' => 'float:left;', 'id' => 'insert'), |
| 375 |
); |
); |
| 376 |
$form['cancel'] = array( |
$form['cancel'] = array( |
| 377 |
'#type' => 'button', |
'#type' => 'button', |
| 740 |
function theme_chipin_textarea_link($element, $link) { |
function theme_chipin_textarea_link($element, $link) { |
| 741 |
$output = '<div class="chipin-button"><a class="chipin-link" id="chipin-link-'. $element['#id'] .'" title="'. t('Add a ChipIn Money Collection Widget') .'" href="'. url('chipin/wizard/textarea', 'textarea='. $element['#name']) .'" onclick="window.open(this.href, \'chipin_link\', \'width=705,height=550,scrollbars=no,status=no,resizable=yes,toolbar=no,menubar=no\'); return false">'; |
$output = '<div class="chipin-button"><a class="chipin-link" id="chipin-link-'. $element['#id'] .'" title="'. t('Add a ChipIn Money Collection Widget') .'" href="'. url('chipin/wizard/textarea', 'textarea='. $element['#name']) .'" onclick="window.open(this.href, \'chipin_link\', \'width=705,height=550,scrollbars=no,status=no,resizable=yes,toolbar=no,menubar=no\'); return false">'; |
| 742 |
if ($link == 'icon') { |
if ($link == 'icon') { |
| 743 |
$output .= '<img src="'. base_path() . drupal_get_path('module', 'chipin') .'/images/logo.chipin.tagline.png" border="0" width="80" height="27" />'; |
$output .= '<img src="'. base_path() . drupal_get_path('module', 'chipin') .'/images/chipin.logo.gif" border="0" width="99" height="42" />'; |
| 744 |
} |
} |
| 745 |
else { |
else { |
| 746 |
$output .= t('Add a ChipIn Money Collection Widget'); |
$output .= t('Add a ChipIn Money Collection Widget'); |