function img_assist_loader in Image Assist 5
Same name and namespace in other branches
- 5.3 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 470 - Image Assist module
Code
function img_assist_loader() {
$editor = arg(2) ? arg(2) : 'textarea';
$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 .= "\n<script type=\"text/javascript\"><!--\n";
$output .= ' var BASE_URL = "' . base_path() . '";' . "\n";
$output .= "--></script>\n";
$path = drupal_get_path('module', 'img_assist');
$output .= '<script type="text/javascript" src="' . base_path() . $path . '/img_assist.js"></script>' . "\n";
if ($editor == 'tinymce') {
$tinymce_path = drupal_get_path('module', 'tinymce');
$tinymce_js = base_path() . $tinymce_path . '/tinymce/jscripts/tiny_mce/tiny_mce_popup.js';
$output .= '<script type="text/javascript" src="' . $tinymce_js . '"></script>' . "\n";
}
$editor_js = base_path() . $path . '/img_assist_' . $editor . '.js';
$output .= '<script type="text/javascript" src="' . $editor_js . '"></script>' . "\n";
$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;
}