attachment; $params = $this->params; // Get the parent id and a few other convenience items $parent_id = $attachment->parent_id; if ( $parent_id === null ) { $parent_id = 0; } // Set up to toggle between uploading file/urls if ( $attachment->uri_type == 'file' ) { $upload_toggle_button_text = JText::_('ATTACH_ENTER_URL_INSTEAD'); $upload_toggle_url = $this->upload_url_url; $upload_button_text = JText::_('ATTACH_UPLOAD_VERB'); } else { $upload_toggle_button_text = JText::_('ATTACH_SELECT_FILE_TO_UPLOAD_INSTEAD'); $upload_toggle_url = $this->upload_file_url; $upload_button_text = JText::_('ATTACH_ADD_URL'); } // If this is for an existing content item, modify the URL appropriately if ( $this->new_parent ) { $upload_toggle_url .= "&parent_id=0,new"; } if ( JRequest::getWord('editor') ) { $upload_toggle_url .= "&editor=" . JRequest::getWord('editor'); } // Needed URLs $save_url = JRoute::_($this->save_url); $base_url = $uri->root(true) . '/'; // Prepare for error displays $upload_id = 'upload'; switch ( $this->error ) { case 'no_file': $upload_id = 'upload_warning'; break; case 'file_too_big': $upload_id = 'upload_warning'; break; case 'file_already_on_server': $upload_id = 'upload_warning'; break; } // If this is an error re-display, display the CSS links directly if ( $this->error ) { echo $this->startHTML(); } // Display the form ?>

parent_entity_name, $attachment->parent_title) ?>

error_msg ): ?>
error_msg; ?>
uri_type == 'file' ): ?>

     verify_url_checked ?> title="" />      relative_url_checked ?> title="" />

may_publish ): ?>
publish; ?>
get('allow_frontend_access_editing', false) ): ?>     
access_level; ?>
get('user_field_1_name', false) ): ?>

get('user_field_2_name', false) ): ?>

get('user_field_3_name', false) ): ?>


get('publish_default', false) && !$this->may_publish ) { $msg = $params->get('auto_publish_warning', ''); if ( JString::strlen($msg) == 0 ) { $msg = JText::_('ATTACH_WARNING_ADMIN_MUST_PUBLISH'); } else { $msg = JText::_($msg); } echo "

$msg

"; } // Show the existing attachments (if any) if ( $parent_id || ($parent_id === 0) ) { require_once(JPATH_SITE.'/components/com_attachments/controllers/attachments.php'); $controller = new AttachmentsControllerAttachments(); $controller->displayString($parent_id, $attachment->parent_type, $attachment->parent_entity, 'ATTACH_EXISTING_ATTACHMENTS', false, false, true, $this->from); } echo "
"; if ( $this->error ) { echo $this->endHTML(); }