function img_assist_loader in Image Assist 5.3
Same name and namespace in other branches
- 5 img_assist.module \img_assist_loader()
- 5.2 img_assist.module \img_assist_loader()
- 6.2 img_assist.module \img_assist_loader()
- 6 img_assist.module \img_assist_loader()
Output main img_assist interface HTML.
@todo Remove hard-coded TinyMCE integration.
Related topics
1 string reference to 'img_assist_loader'
- img_assist_menu in ./
img_assist.module - Implementation of hook_menu().
File
- ./
img_assist.module, line 552 - Image Assist module
Code
function img_assist_loader() {
$path = drupal_get_path('module', 'img_assist');
$caller = arg(2) ? arg(2) : 'textarea';
drupal_add_js($path . '/img_assist_popup.js');
if (module_exists('wysiwyg') && ($editor = wysiwyg_get_editor($caller))) {
if ($editor['name'] == 'tinymce') {
drupal_add_js($editor['library path'] . '/tiny_mce_popup.js');
}
}
else {
$caller = 'textarea';
}
drupal_add_js($path . '/img_assist_' . $caller . '.js');
$output = '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN">' . "\n";
$output .= "<html>\n";
$output .= "<head>\n";
$output .= '<title>' . t('Add image') . "</title>\n";
$output .= drupal_get_js();
$output .= "</head>\n\n";
$output .= '<frameset rows="38, *" onload="initLoader()" frameborder="0" border="0" framespacing="0">' . "\n";
$output .= '<frame name="img_assist_header" src="" class="img_assist_header" noresize="noresize" />' . "\n";
$output .= '<frame name="img_assist_main" src="" class="img_assist_main" noresize="noresize" />' . "\n";
$output .= "</frameset>\n";
$output .= "</html>\n";
echo $output;
exit;
}