primo commit

This commit is contained in:
2024-12-17 17:34:10 +01:00
commit e650f8df99
16435 changed files with 2451012 additions and 0 deletions

View File

@ -0,0 +1 @@
<html><body bgcolor="#FFFFFF"></body></html>

View File

@ -0,0 +1,223 @@
<?php
/**
* Attachments component
*
* @package Attachments
* @subpackage Attachments_Component
*
* @copyright Copyright (C) 2007-2018 Jonathan M. Cameron, All Rights Reserved
* @license http://www.gnu.org/licenses/gpl-3.0.html GNU/GPL
* @link http://joomlacode.org/gf/project/attachments/frs/
* @author Jonathan M. Cameron
*/
// No direct access
defined('_JEXEC') or die('Restricted access');
// Load the tooltip behavior.
JHtml::_('behavior.tooltip');
// Add the plugins stylesheet to style the list of attachments
$document = JFactory::getDocument();
$uri = JFactory::getURI();
$attachment = $this->attachment;
$upload_id = 'upload';
// Show buttons for adding the attachments to other entitites (if appropriate)
$alt_parent_html = '';
$editor = JRequest::getWord('editor');
$exceptions = Array('article', 'category', 'add_to_parent');
if ( !in_array($editor, $exceptions) ) {
$base_url = $uri->base(true) . "/index.php?option=com_attachments&amp;task=attachment.add";
// Add a footer section with buttons to attach files to the supported content types/entities
$alt_parent_html .= '<div id="attachmentsPotentialParents">';
$alt_parent_html .= '<p>';
// For normal LTR, put the label on the left
if ( !$lang->isRTL() ) {
$alt_parent_html .= '<span>' . JText::_('ATTACH_ADD_ATTACHMENT_TO') . '</span> ';
}
// Create all the buttons
foreach ($this->entity_info as $einfo) {
$parent_type = $einfo['parent_type'];
$centity = $einfo['id'];
$cename = $einfo['name'];
if ( ($parent_type != $attachment->parent_type) || ($centity != $attachment->parent_entity) ) {
$url = $base_url . "&amp;parent_type=" . $parent_type;
$tooltip = JText::sprintf('ATTACH_ADD_ATTACHMENT_TO_S_INSTEAD_OF_S_TOOLTIP',
$cename, $attachment->parent_entity_name);
if ( $centity != 'default' ) {
$url .= '.' . $centity;
}
if ( $attachment->uri_type == 'url' ) {
$url .= '&amp;uri=url';
}
$alt_parent_html .= " <a class=\"changeButton\" href=\"$url\" title=\"$tooltip\">$cename</a>";
}
}
// For normal RTL, put the label on the right
if ( $lang->isRTL() ) {
$alt_parent_html .= '<span>' . JText::_('ATTACH_ADD_ATTACHMENT_TO') . '</span>';
}
$alt_parent_html .= '</p>';
$alt_parent_html .= '</div>';
}
if ( $attachment->parent_title ) {
echo "<h1>" . JText::sprintf('ATTACH_PARENT_S_COLON_S', $attachment->parent_entity_name, $attachment->parent_title) . "</h1>";
}
?>
<form class="attachmentsBackend" enctype="multipart/form-data"
name="adminForm" id="adminForm"
action="<?php echo $this->save_url; ?>" method="post">
<fieldset class="adminform">
<legend><?php echo JText::_('ATTACH_ADD_ATTACHMENT'); ?></legend>
<table class="admintable">
<?php if ( !$this->new_parent && !$attachment->parent_id ): ?>
<tr>
<td class="key"><label for="parent_title"><?php echo $this->selpar_label ?></label></td>
<td><?php echo $alt_parent_html; ?>
<input id="parent_title" value="<?php echo $attachment->parent_title ?>" disabled="disabled" type="text" size="60" />&nbsp;
<a class="modal-button" type="button"
href="<?php echo $this->selpar_btn_url ?>" title="<?php echo $this->selpar_btn_tooltip ?>"
rel="{handler: 'iframe', size: {x: 800, y: 450}}"><?php echo $this->selpar_btn_text ?></a>
<input id="parent_id" name="parent_id" value="-1" type="hidden" />
</td>
</tr>
<?php endif; ?>
<?php if ( $attachment->uri_type == 'file' ): ?>
<tr>
<td class="key"><label for="upload" id="upload_file_label"><?php echo JText::_('ATTACH_ATTACH_FILE_COLON') ?></label></td>
<td>
<a class="changeButton" href="<?php echo $this->upload_toggle_url ?>"
title="<?php echo $this->upload_toggle_tooltip; ?>"><?php
echo $this->upload_toggle_button_text;?></a><br />
<input type="file" name="upload" id="<?php echo $upload_id; ?>"
size="74" maxlength="1024" />
</td>
</tr>
<tr>
<td class="key"><label for="display_name" class="hasTip" title="<?php echo $this->display_filename_tooltip; ?>"
><?php echo JText::_('ATTACH_DISPLAY_FILENAME'); ?></label></td>
<td>
<input type="text" name="display_name" id="display_name" size="75" maxlength="80"
title="<?php echo $this->display_filename_tooltip; ?>" class="hasTip"
value="<?php echo $attachment->display_name ?>" /><span class="optional"><?php echo JText::_('ATTACH_OPTIONAL'); ?></span>
</td>
<?php else: ?>
<tr>
<td class="key"><label for="upload" class="hasTip"
title="<?php echo $this->enter_url_tooltip ?>"><?php echo JText::_('ATTACH_ENTER_URL') ?></label></td>
<td>
<label for="verify_url"><?php echo JText::_('ATTACH_VERIFY_URL_EXISTENCE') ?></label>
<input type="checkbox" name="verify_url" value="verify" <?php echo $this->verify_url_checked ?>
title="<?php echo JText::_('ATTACH_VERIFY_URL_EXISTENCE_TOOLTIP'); ?>" />
<label for="url_relative"><?php echo JText::_('ATTACH_RELATIVE_URL') ?></label>
<input type="checkbox" name="url_relative" value="relative" <?php echo $this->relative_url_checked ?>
title="<?php echo JText::_('ATTACH_RELATIVE_URL_TOOLTIP'); ?>" />
<a class="changeButton" href="<?php echo $this->upload_toggle_url ?>"
title="<?php echo $this->upload_toggle_tooltip; ?>"><?php
echo $this->upload_toggle_button_text;?></a><br />
<input type="text" name="url" id="<?php echo $upload_id; ?>"
size="86" title="<?php echo JText::_('ATTACH_ENTER_URL_TOOLTIP'); ?>"
value="<?php echo $attachment->url; ?>" /><br /><?php
echo JText::_('ATTACH_NOTE_ENTER_URL_WITH_HTTP'); ?>
</td>
</tr>
<tr>
<td class="key"><label for="display_name" title="<?php echo $this->display_url_tooltip; ?>" class="hasTip"
><?php echo JText::_('ATTACH_DISPLAY_URL'); ?></label></td>
<td>
<input type="text" name="display_name" id="display_name" size="75" maxlength="80"
title="<?php echo $this->display_url_tooltip; ?>" class="hasTip"
value="<?php echo $attachment->display_name ?>" />&nbsp;<?php echo JText::_('ATTACH_OPTIONAL'); ?>
</td>
</tr>
<?php endif; ?>
<tr>
<td class="key"><label for="description"
title="<?php echo JText::_('ATTACH_DESCRIPTION_DESCRIPTION'); ?>"
><?php echo JText::_('ATTACH_DESCRIPTION'); ?></label></td>
<td>
<input type="text" name="description" id="description"
title="<?php echo JText::_('ATTACH_DESCRIPTION_DESCRIPTION'); ?>"
size="75" maxlength="255" value="<?php echo stripslashes($attachment->description) ?>" />
</td>
</tr>
<?php if ( $this->may_publish ): ?>
<tr>
<td class="key"><label><?php echo JText::_('ATTACH_PUBLISHED'); ?></label></td>
<td><?php echo $this->lists['published']; ?></td>
</tr>
<?php endif; ?>
<tr>
<td class="key"><label for="access" class="hasTip" title="<?php echo $this->access_level_tooltip ?>"><?php echo JText::_('JFIELD_ACCESS_LABEL'); ?></label></td>
<td><?php echo $this->access_level; ?></td>
</tr>
<?php if ( $this->show_user_field_1 ): ?>
<tr>
<td class="key"><label for="user_field_1"><?php echo $this->user_field_1_name; ?></label></td>
<td><input type="text" name="user_field_1" id="user_field_1" size="75" maxlength="100" value="" /></td>
</tr>
<?php endif; ?>
<?php if ( $this->show_user_field_2 ): ?>
<tr>
<td class="key"><label for="user_field_2"><?php echo $this->user_field_2_name; ?></label></td>
<td><input type="text" name="user_field_2" id="user_field_2" size="75" maxlength="100" value="" /></td>
</tr>
<?php endif; ?>
<?php if ( $this->show_user_field_3 ): ?>
<tr>
<td class="key"><label for="user_field_3"><?php echo $this->user_field_3_name; ?></label></td>
<td><input type="text" name="user_field_3" id="user_field_3" size="75" maxlength="100" value="" /></td>
<tr>
<?php endif; ?>
</table>
</fieldset>
<?php if ( $this->new_parent ): ?>
<input type="hidden" name="new_parent" value="1" />
<?php elseif ( $attachment->parent_id ): ?>
<input type="hidden" name="parent_id" value="<?php echo $attachment->parent_id; ?>" />
<?php endif; ?>
<input type="hidden" name="MAX_FILE_SIZE" value="524288" />
<input type="hidden" name="save_type" value="upload" />
<input type="hidden" name="parent_type" value="<?php echo $attachment->parent_type; ?>" />
<input type="hidden" name="parent_entity" value="<?php echo $attachment->parent_entity; ?>" />
<input type="hidden" name="uri_type" value="<?php echo $attachment->uri_type; ?>" />
<input type="hidden" name="option" value="<?php echo $this->option;?>" />
<input type="hidden" name="task" value="attachment.add" />
<input type="hidden" name="from" value="<?php echo $this->from; ?>" />
<?php if ( $this->from == 'closeme' ): ?>
<div class="form_buttons" align="center">
<input type="submit" name="Submit" class="button"
onclick="javascript: submitbutton('attachment.saveNew')"
value="<?php echo JText::_('ATTACH_UPLOAD_VERB'); ?>" />
<span class="right">
<input type="button" name="cancel" value="<?php echo JText::_('ATTACH_CANCEL'); ?>"
onClick="window.parent.SqueezeBox.close();" />
</span>
</div>
<?php endif; ?>
<?php echo JHtml::_( 'form.token' ); ?>
</form>
<?php
// Show the existing attachments
if ( ($attachment->uri_type == 'file') && $attachment->parent_id ) {
/** Get the Attachments controller class */
require_once(JPATH_ADMINISTRATOR.'/components/com_attachments/controllers/list.php');
$controller = new AttachmentsControllerList();
$controller->displayString($attachment->parent_id, $attachment->parent_type, $attachment->parent_entity,
'ATTACH_EXISTING_ATTACHMENTS', false, false, true, $this->from);
}

View File

@ -0,0 +1 @@
<html><body bgcolor="#FFFFFF"></body></html>

View File

@ -0,0 +1,183 @@
<?php
/**
* Attachments component
*
* @package Attachments
* @subpackage Attachments_Component
*
* @copyright Copyright (C) 2007-2018 Jonathan M. Cameron, All Rights Reserved
* @license http://www.gnu.org/licenses/gpl-3.0.html GNU/GPL
* @link http://joomlacode.org/gf/project/attachments/frs/
* @author Jonathan M. Cameron
*/
// no direct access
defined( '_JEXEC' ) or die('Restricted access');
// Access check.
if (!JFactory::getUser()->authorise('core.create', 'com_attachments')) {
return JError::raiseError(404, JText::_('JERROR_ALERTNOAUTHOR') . ' (ERR 172)');
}
/** Define the legacy classes, if necessary */
require_once(JPATH_SITE.'/components/com_attachments/legacy/view.php');
/** Include the Attachments javascript classes */
require_once(JPATH_SITE.'/components/com_attachments/javascript.php');
/**
* HTML View class for adding new attachments
*
* @package Attachments
*/
class AttachmentsViewAdd extends JViewLegacy
{
/**
* Display the add/create view
*/
public function display($tpl = null)
{
// For convenience below
$attachment = $this->attachment;
$parent_id = $attachment->parent_id;
$parent_type = $attachment->parent_type;
$parent_entity = $attachment->parent_entity;
$attachment->parent_entity_name = JText::_('ATTACH_' . $attachment->parent_entity);
$parent_entity_name = $attachment->parent_entity_name;
$params = $this->params;
// Prevent unallowed editing PID PE
if (!$this->parent->userMayAddAttachment($parent_id, $parent_entity, $this->new_parent))
{
$errmsg = JText::sprintf('ATTACH_ERROR_NO_PERMISSION_TO_UPLOAD_S',
$attachment->parent_entity_name);
return JError::raiseError(403, $errmsg . ' (ERR 173)');
}
// Construct derived data
$this->relative_url_checked = $attachment->url_relative ? 'checked="yes"' : '';
$this->verify_url_checked = $attachment->url_verify ? 'checked="yes"' : '';
// Construct some tooltips
$this->enter_url_tooltip = JText::_('ATTACH_ENTER_URL') . '::' . JText::_('ATTACH_ENTER_URL_TOOLTIP');
$this->display_filename_tooltip = JText::_('ATTACH_DISPLAY_FILENAME') . '::' . JText::_('ATTACH_DISPLAY_FILENAME_TOOLTIP');
$this->display_url_tooltip = JText::_('ATTACH_DISPLAY_URL') . '::' . JText::_('ATTACH_DISPLAY_URL_TOOLTIP');
// Add the published selection
$this->lists = Array();
$this->lists['published'] = JHtml::_('select.booleanlist', 'state',
'class="inputbox"', $attachment->state);
// Set up the access field
require_once(JPATH_COMPONENT_ADMINISTRATOR.'/models/fields/accesslevels.php');
$this->access_level = JFormFieldAccessLevels::getAccessLevels('access', 'access', null);
$this->access_level_tooltip = JText::_('JFIELD_ACCESS_LABEL') . '::' . JText::_('JFIELD_ACCESS_DESC');
// Handle user field 1
$show_user_field_1 = false;
$user_field_1_name = $params->get('user_field_1_name', '');
if ( $user_field_1_name != '' ) {
$show_user_field_1 = true;
$this->user_field_1_name = $user_field_1_name;
}
$this->show_user_field_1 = $show_user_field_1;
// Handle user field 2
$show_user_field_2 = false;
$user_field_2_name = $params->get('user_field_2_name', '');
if ( $user_field_2_name != '' ) {
$show_user_field_2 = true;
$this->user_field_2_name = $user_field_2_name;
}
$this->show_user_field_2 = $show_user_field_2;
// Handle user field 3
$show_user_field_3 = false;
$user_field_3_name = $params->get('user_field_3_name', '');
if ( $user_field_3_name != '' ) {
$show_user_field_3 = true;
$this->user_field_3_name = $user_field_3_name;
}
$this->show_user_field_3 = $show_user_field_3;
// Set up to toggle between uploading file/urls
if ( $attachment->uri_type == 'file' ) {
$upload_toggle_button_text = JText::_('ATTACH_ENTER_URL_INSTEAD');
$upload_toggle_tooltip = JText::_('ATTACH_ENTER_URL_INSTEAD_TOOLTIP');
$upload_toggle_url = 'index.php?option=com_attachments&amp;task=attachment.add&amp;uri=url';
}
else {
$upload_toggle_button_text = JText::_('ATTACH_SELECT_FILE_TO_UPLOAD_INSTEAD');
$upload_toggle_tooltip = JText::_('ATTACH_SELECT_FILE_TO_UPLOAD_INSTEAD_TOOLTIP');
$upload_toggle_url = 'index.php?option=com_attachments&amp;task=attachment.add&amp;uri=file';
}
if ( $this->from == 'closeme' ) {
$upload_toggle_url .= '&amp;tmpl=component';
}
if ( $this->from ) {
$upload_toggle_url .= '&amp;from=' . $this->from;
}
// Update the toggle URL to not forget if the parent is not simply an article
if ( !( ($parent_type == 'com_content') && ($parent_entity == 'default')) ) {
$upload_toggle_url .= "&amp;parent_type=$parent_type";
if ( $parent_entity != 'default' ) {
$upload_toggle_url .= ".$parent_entity";
}
}
// If this is for an existing content item, modify the URL appropriately
if ( $this->new_parent ) {
$upload_toggle_url .= "&amp;parent_id=0,new";
}
elseif ( $parent_id && ($parent_id != -1) ) {
$upload_toggle_url .= "&amp;parent_id=$parent_id";
}
if ( JRequest::getWord('editor') ) {
$upload_toggle_url .= "&amp;editor=" . JRequest::getWord('editor');
}
$this->upload_toggle_button_text = $upload_toggle_button_text;
$this->upload_toggle_url = $upload_toggle_url;
$this->upload_toggle_tooltip = $upload_toggle_tooltip;
// Set up the 'select parent' button
$this->selpar_label = JText::sprintf('ATTACH_SELECT_ENTITY_S_COLON', $parent_entity_name);
$this->selpar_btn_text = '&nbsp;' . JText::sprintf('ATTACH_SELECT_ENTITY_S', $parent_entity_name) . '&nbsp;';
$this->selpar_btn_tooltip = JText::sprintf('ATTACH_SELECT_ENTITY_S_TOOLTIP', $parent_entity_name);
$this->selpar_btn_url = $this->parent->getSelectEntityURL($parent_entity);
// Add the style sheets
JHtml::stylesheet('com_attachments/attachments_admin_form.css', Array(), true);
$lang = JFactory::getLanguage();
if ( $lang->isRTL() ) {
JHtml::stylesheet('com_attachments/attachments_admin_form_rtl.css', Array(), true);
}
// Set up mootools/modal
AttachmentsJavascript::setupModalJavascript();
// Set the toolbar
$this->addToolBar();
// Display the form
parent::display($tpl);
}
/**
* Setting the toolbar
*/
protected function addToolBar()
{
JRequest::setVar('hidemainmenu', true);
JToolBarHelper::title(JText::_('ATTACH_ADD_ATTACHMENT'));
JToolBarHelper::apply('attachment.applyNew');
JToolBarHelper::save('attachment.saveNew');
JToolBarHelper::save2new('attachment.save2New');
JToolBarHelper::cancel('attachment.cancel', 'JTOOLBAR_CANCEL');
}
}

View File

@ -0,0 +1 @@
<html><body bgcolor="#FFFFFF"></body></html>

View File

@ -0,0 +1,342 @@
<?php
/**
* Attachments component
*
* @package Attachments
* @subpackage Attachments_Component
*
* @copyright Copyright (C) 2007-2018 Jonathan M. Cameron, All Rights Reserved
* @license http://www.gnu.org/licenses/gpl-3.0.html GNU/GPL
* @link http://joomlacode.org/gf/project/attachments/frs/
* @author Jonathan M. Cameron
*/
// No direct access
defined('_JEXEC') or die('Restricted access');
// Load the tooltip behavior.
JHtml::_('behavior.tooltip');
// Add the plugins stylesheet to style the list of attachments
$user = JFactory::getUser();
$document = JFactory::getDocument();
$app = JFactory::getApplication();
$uri = JFactory::getURI();
// Get the component parameters
jimport('joomla.application.component.helper');
$params = JComponentHelper::getParams('com_attachments');
$secure = $params->get('secure',false);
$attachment = $this->attachment;
if ( $this->change_parent ) {
$parent_id = $this->selpar_parent_id;
}
else {
$parent_id = $attachment->parent_id;
}
// Set up the create/modify dates
jimport( 'joomla.utilities.date' );
$tz = new DateTimeZone( $user->getParam('timezone', $app->getCfg('offset')) );
$cdate = JFactory::getDate($attachment->created);
$cdate->setTimezone($tz);
$created = $cdate->format("Y-m-d H:i", true);
$mdate = JFactory::getDate($attachment->modified);
$mdate->setTimezone($tz);
$modified = $mdate->format("Y-m-d H:i", true);
$update = $this->update;
$change_entity_tooltip = JText::sprintf('ATTACH_CHANGE_ENTITY_S_TOOLTIP',$attachment->parent_entity_name) . '::' .
JText::_('ATTACH_CHANGE_ENTITY_TOOLTIP2');
if ( $update == 'file' )
$enctype = "enctype=\"multipart/form-data\"";
else
$enctype = '';
?>
<?php if ( $this->in_popup ): ?>
<div class="attachmentsBackendTitle">
<h1><?php echo JText::_('ATTACH_UPDATE_ATTACHMENT_COLON') . " " . $attachment->filename; ?></h1>
</div>
<?php endif; ?>
<form class="attachmentsBackend" action="<?php echo $this->save_url; ?>" method="post" <?php echo $enctype ?>
name="adminForm" id="adminForm">
<fieldset class="adminform">
<table class="admintable">
<tbody>
<tr>
<?php if ( $this->change_parent ): ?>
<td class="key"><label for="parent_id"><b><?php
echo $this->selpar_label ?></b></label></td>
<td colspan="5"><input id="parent_title" value="<?php echo $this->selpar_parent_title; ?>"
disabled="disabled" type="text" size="60" />&nbsp;
<a class="modal-button hasTip" type="button" title="<?php echo $this->selpar_btn_tooltip ?>"
href="<?php echo $this->selpar_btn_url ?>"
rel="{handler: 'iframe', size: {x: 700, y: 375}}"><?php echo $this->selpar_btn_text ?></a>
</td>
<?php else: ?>
<td class="key"><label><?php echo
JText::sprintf('ATTACH_ATTACHED_TO', $attachment->parent_entity_name); ?></label></td>
<td class="at_title" colspan="3"><?php
if ( $attachment->parent_id == null ) {
echo '<span class="error">' . $attachment->parent_title . '</span>';
}
else {
echo $attachment->parent_title;
} ?>
<div class="right">
<a class="changeButton hasTip" href="<?php echo $this->change_parent_url; ?>"
title="<?php echo $change_entity_tooltip; ?>"
><?php echo JText::sprintf('ATTACH_CHANGE_ENTITY_S', $attachment->parent_entity_name) ?></a></div>
</td>
<td class="switch" colspan="2"> <?php echo JText::_('ATTACH_SWITCH_TO_COLON') ?>
<?php
// Create all the buttons to switch to other types of parents
foreach ($this->entity_info as $einfo) {
$parent_type = $einfo['parent_type'];
$centity = $einfo['id'];
$cename = $einfo['name'];
if ( ($parent_type != $attachment->parent_type) || ($centity != $attachment->parent_entity) ) {
$url = $this->change_parent_url . "&amp;new_parent_type=" . $parent_type;
$tooltip = JText::sprintf('ATTACH_SWITCH_ATTACHMENT_TO_S_TOOLTIP', $cename) . '::' .
JText::_('ATTACH_SWITCH_ATTACHMENT_TO_TOOLTIP2');
if ( $centity != 'default' ) {
$url .= '.' . $centity;
}
if ( $update == 'file' ) {
$url .= '&amp;update=file';
}
if ( $update == 'url' ) {
$url .= '&amp;update=url';
}
echo "<a class=\"changeButton hasTip\" href=\"$url\" title=\"$tooltip\">$cename</a>";
}
}
?>
</td>
<?php endif; ?>
<tr><td class="key"><label><?php echo JText::_('ATTACH_ATTACHMENT_TYPE'); ?></label></td>
<td colspan="5"><?php echo JText::_('ATTACH_' . JString::strtoupper($attachment->uri_type));?>
<?php if ( ($attachment->uri_type == 'file') && ( $update != 'url' ) ): ?>
<a class="changeButton hasTip" href="<?php echo $this->change_url_url ?>"
title="<?php echo JText::_('ATTACH_CHANGE_TO_URL') . '::' . JText::_('ATTACH_CHANGE_TO_URL_TOOLTIP'); ?>"
><?php echo JText::_('ATTACH_CHANGE_TO_URL') ?></a>
<?php elseif ( ($attachment->uri_type == 'url') && ($update != 'file') ): ?>
<a class="changeButton hasTip" href="<?php echo $this->change_file_url ?>"
title="<?php echo JText::_('ATTACH_CHANGE_TO_FILE') . '::' . JText::_('ATTACH_CHANGE_TO_FILE_TOOLTIP'); ?>"
><?php echo JText::_('ATTACH_CHANGE_TO_FILE') ?></a>
<?php elseif ( (($attachment->uri_type == 'file') && ($update != 'file')) ||
(($attachment->uri_type == 'url') && ($update != 'url')) ): ?>
<a class="changeButton hasTip" href="<?php echo $this->normal_update_url ?>"
title="<?php echo JText::_('ATTACH_NORMAL_UPDATE') . '::' . JText::_('ATTACH_NORMAL_UPDATE_TOOLTIP'); ?>"
><?php echo JText::_('ATTACH_NORMAL_UPDATE') ?></a>
<?php endif; ?>
</td>
</tr>
<?php if ( $update == 'file' ): ?>
<tr>
<td class="key"><label for="upload"><?php echo JText::_('ATTACH_SELECT_FILE_COLON') ?></label></td>
<td colspan="5"><b><?php echo JText::_('ATTACH_SELECT_NEW_FILE_IF_YOU_WANT_TO_UPDATE_ATTACHMENT_FILE') ?></b><br />
<input type="file" name="upload" id="upload" size="68" maxlength="1024" />
</td>
</tr>
<?php elseif ( $update == 'url' ): ?>
<tr>
<td class="key"><label for="upload" class="hasTip"
title="<?php echo $this->enter_url_tooltip ?>"><?php echo JText::_('ATTACH_ENTER_URL') ?></label></td>
<td colspan="5">
<label for="verify_url"><?php echo JText::_('ATTACH_VERIFY_URL_EXISTENCE') ?></label>
<input type="checkbox" name="verify_url" value="verify" <?php echo $this->verify_url_checked ?>
title="<?php echo JText::_('ATTACH_VERIFY_URL_EXISTENCE_TOOLTIP'); ?>" />
&nbsp;&nbsp;&nbsp;&nbsp;
<label for="url_relative"><?php echo JText::_('ATTACH_RELATIVE_URL') ?></label>
<input type="checkbox" name="url_relative" value="relative" <?php echo $this->relative_url_checked ?>
title="<?php echo JText::_('ATTACH_RELATIVE_URL_TOOLTIP'); ?>" />
<br />
<input type="text" name="url" id="upload"
size="70" title="<?php echo JText::_('ATTACH_ENTER_URL_TOOLTIP'); ?>"
value="<?php if ( $attachment->uri_type == 'url' ) { echo $attachment->url; } ?>" />
<br />
<?php echo JText::_('ATTACH_NOTE_ENTER_URL_WITH_HTTP'); ?>
</td>
</tr>
<?php else: ?>
<?php if ( $attachment->uri_type == 'file' ): ?>
<tr>
<td class="key"><label><?php echo JText::_('ATTACH_FILENAME'); ?></label></td>
<td colspan="5"><?php echo $attachment->filename; ?>
<a class="changeButton hasTip" href="<?php echo $this->change_file_url ?>"
title="<?php echo JText::_('ATTACH_CHANGE_FILE') . '::' . JText::_('ATTACH_CHANGE_FILE_TOOLTIP'); ?>"
><?php echo JText::_('ATTACH_CHANGE_FILE') ?></a>
</td>
</tr>
<tr><td class="key"><label><?php echo JText::_('ATTACH_SYSTEM_FILENAME'); ?></label></td>
<td colspan="5"><?php echo $attachment->filename_sys; ?></td>
</tr>
<tr><td class="key"><label><?php echo JText::_('ATTACH_URL_COLON'); ?></label></td>
<td colspan="5"><?php echo $attachment->url; ?></td>
</tr>
<?php elseif ( $attachment->uri_type == 'url' ): ?>
<tr>
<td class="key"><label for="upload"><?php
if ( $attachment->uri_type == 'file' ) {
echo JText::_('ATTACH_ENTER_NEW_URL_COLON');
}
else {
echo JText::_('ATTACH_URL_COLON');
}
?></label></td>
<td colspan="5">
<label for="verify_url"><?php echo JText::_('ATTACH_VERIFY_URL_EXISTENCE') ?></label>
<input type="checkbox" name="verify_url" value="verify" <?php echo $this->verify_url_checked ?>
title="<?php echo JText::_('ATTACH_VERIFY_URL_EXISTENCE_TOOLTIP'); ?>" />
&nbsp;&nbsp;&nbsp;&nbsp;
<label for="url_relative"><?php echo JText::_('ATTACH_RELATIVE_URL') ?></label>
<input type="checkbox" name="url_relative" value="relative" <?php echo $this->relative_url_checked ?>
title="<?php echo JText::_('ATTACH_RELATIVE_URL_TOOLTIP'); ?>" />
<br />
<input type="text" name="url" id="upload" value="<?php echo $attachment->url; ?>"
size="70" title="<?php echo JText::_('ATTACH_ENTER_URL_TOOLTIP'); ?>" />
<input type="hidden" name="old_url" value="<?php echo $attachment->url; ?>" />
</td>
</tr>
<tr>
<td class="key"><label for="url_valid"><?php echo JText::_('ATTACH_URL_IS_VALID') ?></label></td>
<td colspan="5"><?php echo $this->lists['url_valid']; ?></td>
</tr>
<?php endif; ?>
<?php endif; ?>
<?php if ( (($attachment->uri_type == 'file') AND ($update == '')) OR ($update == 'file') ): ?>
<tr><td class="key"><label class="hasTip" for="display_name"
title="<?php echo $this->display_filename_tooltip; ?>"
><?php echo JText::_('ATTACH_DISPLAY_FILENAME'); ?></label></td>
<td colspan="5"><input class="text hasTip" type="text" name="display_name"
id="display_name" size="80" maxlength="80"
title="<?php echo JText::_('ATTACH_DISPLAY_FILENAME_TOOLTIP'); ?>"
value="<?php echo $attachment->display_name;?>"
/>&nbsp;&nbsp;<?php echo JText::_('ATTACH_OPTIONAL'); ?></td>
</tr>
<?php elseif ( (($attachment->uri_type == 'url') AND ($update == '')) OR ($update == 'url') ): ?>
<tr><td class="key"><label class="hasTip" for="display_name"
title="<?php echo $this->display_url_tooltip; ?>"
><?php echo JText::_('ATTACH_DISPLAY_URL'); ?></label></td>
<td colspan="5"><input class="text hasTip" type="text" name="display_name"
id="display_name" size="80" maxlength="80"
title="<?php echo JText::_('ATTACH_DISPLAY_URL_TOOLTIP'); ?>"
value="<?php echo $attachment->display_name;?>"
/>&nbsp;&nbsp;<?php echo JText::_('ATTACH_OPTIONAL'); ?></td>
</tr>
<?php endif; ?>
<tr><td class="key"><label class="hasTip" for="description"
title="<?php echo JText::_('ATTACH_DESCRIPTION') . '::' . JText::_('ATTACH_DESCRIPTION_DESCRIPTION'); ?>"><?php
echo JText::_('ATTACH_DESCRIPTION'); ?></label></td>
<td colspan="5"><input class="text hasTip" type="text" name="description"
title="<?php echo JText::_('ATTACH_DESCRIPTION_DESCRIPTION'); ?>"
id="description" size="80" maxlength="255"
value="<?php echo stripslashes($attachment->description);?>" /></td>
</tr>
<?php if ( $this->may_publish ): ?>
<tr><td class="key"><label><?php echo JText::_('ATTACH_PUBLISHED'); ?></label></td>
<td colspan="5"><?php echo $this->lists['published']; ?></td>
</tr>
<?php endif; ?>
<tr><td class="key"><label for="access" class="hasTip" title="<?php echo $this->access_level_tooltip ?>"><?php echo JText::_('JFIELD_ACCESS_LABEL'); ?></label></td>
<td colspan="5"><?php echo $this->access_level; ?></td>
</tr>
<?php if ( $params->get('user_field_1_name', '') != '' ): ?>
<tr><td class="key"><label for="user_field_1"><?php echo $params->get('user_field_1_name'); ?></label></td>
<td colspan="5"><input class="text" type="text" name="user_field_1"
id="user_field_1" size="80" maxlength="100"
value="<?php echo stripslashes($attachment->user_field_1); ?>" /></td>
</tr>
<?php endif; ?>
<?php if ( $params->get('user_field_2_name', '') != '' ): ?>
<tr><td class="key"><label for="user_field_2"><?php echo $params->get('user_field_2_name'); ?></label></td>
<td colspan="5"><input class="text" type="text" name="user_field_2"
id="user_field_2" size="80" maxlength="100"
value="<?php echo stripslashes($attachment->user_field_2); ?>" /></td>
</tr>
<?php endif; ?>
<?php if ( $params->get('user_field_3_name', '') != '' ): ?>
<tr><td class="key"><label for="user_field_3"><?php echo $params->get('user_field_3_name'); ?></label></td>
<td colspan="5"><input class="text" type="text" name="user_field_3"
id="user_field_3" size="80" maxlength="100"
value="<?php echo stripslashes($attachment->user_field_3); ?>" /></td>
</tr>
<?php endif; ?>
<tr>
<td class="key"><label for="icon_filename"><?php echo JText::_('ATTACH_ICON_FILENAME'); ?></label></td>
<td><?php echo $this->lists['icon_filenames']; ?></td>
<td class="key2"><label><?php echo JText::_('ATTACH_FILE_TYPE'); ?></label></td>
<?php if ($secure) { $ncols = 1; } else { $ncols = 3; }; ?>
<td colspan="<?php echo $ncols ?>"><?php echo $attachment->file_type; ?></td>
<?php if ($secure): ?>
<td class="key hasTip" title="<?php echo $this->download_count_tooltip; ?>">
<label for="download_count"><?php echo JText::_('ATTACH_NUMBER_OF_DOWNLOADS'); ?></label></td>
<td class="hasTip" name="download_count" title="<?php echo $this->download_count_tooltip; ?>"><?php echo $attachment->download_count ?></td>
<?php endif; ?>
</tr>
<tr>
<td class="key"><label><?php echo JText::_('ATTACH_FILE_SIZE'); ?></label></td?>
<td><?php echo $attachment->size_kb; ?> <?php echo JText::_('ATTACH_KB'); ?></td?>
<td class="key2"><label><?php echo JText::_('ATTACH_DATE_CREATED'); ?></label></td>
<td><?php echo $created; ?></td>
<td class="key2"><label><?php echo JText::_('ATTACH_DATE_LAST_MODIFIED'); ?></label></td>
<td><?php echo $modified; ?></td>
</tr>
<tr>
<td class="key"><label><?php echo JText::_('ATTACH_ATTACHMENT_ID'); ?></label></td>
<td><?php echo $attachment->id; ?></td>
<td class="key2"><label><?php echo JText::_('JGLOBAL_FIELD_CREATED_BY_LABEL'); ?></label></td>
<td><?php echo $attachment->creator_name;?></td>
<td class="key2"><label><?php echo JText::_('JGLOBAL_FIELD_MODIFIED_BY_LABEL'); ?></label></td>
<td><?php echo $attachment->modifier_name;?></td>
</tr>
</tbody>
</table>
</fieldset>
<input type="hidden" name="id" value="<?php echo $attachment->id; ?>" />
<input type="hidden" name="update" value="<?php echo $update; ?>" />
<input type="hidden" name="uri_type" value="<?php echo $attachment->uri_type; ?>" />
<input type="hidden" name="parent_id" id="parent_id" value="<?php echo $parent_id; ?>" />
<input type="hidden" name="parent_type" id="parent_type" value="<?php echo $attachment->parent_type; ?>" />
<input type="hidden" name="parent_entity" id="parent_entity" value="<?php echo $attachment->parent_entity; ?>" />
<input type="hidden" name="old_parent_id" value="<?php echo $attachment->parent_id ?>" />
<input type="hidden" name="old_parent_type" value="<?php echo $attachment->parent_type ?>" />
<input type="hidden" name="old_parent_entity" value="<?php echo $attachment->parent_entity ?>" />
<input type="hidden" name="new_parent_type" id="new_parent_type" value="<?php echo $this->new_parent_type; ?>" />
<input type="hidden" name="new_parent_entity" id="new_parent_entity" value="<?php echo $this->new_parent_entity; ?>" />
<input type="hidden" name="old_display_name" value="<?php echo $attachment->display_name; ?>" />
<input type="hidden" name="option" value="<?php echo $this->option;?>" />
<input type="hidden" name="from" value="<?php echo $this->from;?>" />
<input type="hidden" name="task" value="attachment.edit" />
<?php if ( $this->in_popup ): ?>
<div class="form_buttons" align="center">
<input type="submit" name="submit" onclick="javascript: submitbutton('attachment.save')" value="<?php echo JText::_('ATTACH_SAVE'); ?>" />
<span class="right"><input type="button" name="cancel" value="<?php echo JText::_('ATTACH_CANCEL'); ?>"
onClick="window.parent.SqueezeBox.close();" /></span>
</div>
<?php endif; ?>
<?php echo JHtml::_( 'form.token' ); ?>
</form>
<?php
// Show the existing attachments (if any)
if ( $attachment->parent_id AND ($update == 'file') )
{
/** Get the attachments controller class */
require_once(JPATH_ADMINISTRATOR.'/components/com_attachments/controllers/list.php');
$controller = new AttachmentsControllerList();
$controller->displayString($attachment->parent_id, $attachment->parent_type, $attachment->parent_entity,
'ATTACH_EXISTING_ATTACHMENTS', false, false, true, $this->from);
}

View File

@ -0,0 +1 @@
<html><body bgcolor="#FFFFFF"></body></html>

View File

@ -0,0 +1,129 @@
<?php
/**
* Attachments component
*
* @package Attachments
* @subpackage Attachments_Component
*
* @copyright Copyright (C) 2007-2018 Jonathan M. Cameron, All Rights Reserved
* @license http://www.gnu.org/licenses/gpl-3.0.html GNU/GPL
* @link http://joomlacode.org/gf/project/attachments/frs/
* @author Jonathan M. Cameron
*/
// no direct access
defined( '_JEXEC' ) or die('Restricted access');
// Access check.
if ( !( JFactory::getUser()->authorise('core.edit', 'com_attachments') OR
JFactory::getUser()->authorise('core.edit.own', 'com_attachments') ) )
{
return JError::raiseError(404, JText::_('JERROR_ALERTNOAUTHOR') . ' (ERR 177)');
}
/** Define the legacy classes, if necessary */
require_once(JPATH_SITE.'/components/com_attachments/legacy/view.php');
/** Load the Attachments helper */
require_once(JPATH_SITE.'/components/com_attachments/helper.php');
/** Include the Attachments javascript classes */
require_once(JPATH_SITE.'/components/com_attachments/javascript.php');
/**
* HTML View class for editing new attachments
*
* @package Attachments
*/
class AttachmentsViewEdit extends JViewLegacy
{
/**
* Display the edit view
*/
public function display($tpl = null)
{
// For convenience
$attachment = $this->attachment;
// Prevent unallowed editing
if (!$this->attachment->parent->userMayEditAttachment($attachment))
{
$errmsg = JText::_('ATTACH_ERROR_NO_PERMISSION_TO_EDIT');
return JError::raiseError(403, $errmsg . ' (ERR 178)');
}
// Construct derived data
$attachment->parent_entity_name = JText::_('ATTACH_' . $attachment->parent_entity);
if (!isset($attachment->modifier_name))
{
AttachmentsHelper::addAttachmentUserNames($attachment);
}
// Compute the attachment size in kB
$attachment->size_kb = (int)( 10 * $attachment->file_size / 1024.0 ) / 10.0;
// set up lists for form controls
$this->lists = array();
$this->lists['published'] = JHtml::_('select.booleanlist', 'state',
'class="inputbox"', $attachment->state);
$this->lists['url_valid'] = JHtml::_('select.booleanlist', 'url_valid',
'class="inputbox" title="' . JText::_('ATTACH_URL_IS_VALID_TOOLTIP') . '"',
$attachment->url_valid);
// Construct the drop-down list for legal icon filenames
$icon_filenames = array();
require_once(JPATH_COMPONENT_SITE.'/file_types.php');
foreach ( AttachmentsFileTypes::unique_icon_filenames() as $ifname)
{
$icon_filenames[] = JHtml::_('select.option', $ifname);
}
$this->lists['icon_filenames'] =JHtml::_('select.genericlist', $icon_filenames,
'icon_filename', 'class="inputbox" size="1"', 'value', 'text',
$attachment->icon_filename);
// If switching from article to URL default url_verify to true
if (($attachment->uri_type == 'file') AND ($this->update == 'url')) {
$attachment->url_verify = true;
}
// Set up for checkboxes
$this->relative_url_checked = $attachment->url_relative ? 'checked="yes"' : '';
$this->verify_url_checked = $attachment->url_verify ? 'checked="yes"' : '';
// Set up some tooltips
$this->enter_url_tooltip = JText::_('ATTACH_ENTER_URL') . '::' . JText::_('ATTACH_ENTER_URL_TOOLTIP');
$this->display_filename_tooltip = JText::_('ATTACH_DISPLAY_FILENAME') . '::' . JText::_('ATTACH_DISPLAY_FILENAME_TOOLTIP');
$this->display_url_tooltip = JText::_('ATTACH_DISPLAY_URL') . '::' . JText::_('ATTACH_DISPLAY_URL_TOOLTIP');
$this->download_count_tooltip = JText::_('ATTACH_NUMBER_OF_DOWNLOADS') . '::' . JText::_('ATTACH_NUMBER_OF_DOWNLOADS_TOOLTIP');
// Set up mootools/modal
AttachmentsJavascript::setupModalJavascript();
// Add the style sheets
JHtml::stylesheet('com_attachments/attachments_admin_form.css', Array(), true);
$lang = JFactory::getLanguage();
if ( $lang->isRTL() ) {
JHtml::stylesheet('com_attachments/attachments_admin_form_rtl.css', Array(), true);
}
// Set the toolbar
$this->addToolBar();
// Display the form
parent::display($tpl);
}
/**
* Setting the toolbar
*/
protected function addToolBar()
{
JRequest::setVar('hidemainmenu', true);
JToolBarHelper::title(JText::_('ATTACH_EDIT_ATTACHMENT'));
JToolBarHelper::apply('attachment.apply');
JToolBarHelper::save('attachment.save');
JToolBarHelper::cancel('attachment.cancel', 'JTOOLBAR_CLOSE');
}
}

View File

@ -0,0 +1 @@
<html><body bgcolor="#FFFFFF"></body></html>

View File

@ -0,0 +1,87 @@
<?php
/**
* Attachments component
*
* @package Attachments
* @subpackage Attachments_Component
*
* @copyright Copyright (C) 2007-2018 Jonathan M. Cameron, All Rights Reserved
* @license http://www.gnu.org/licenses/gpl-3.0.html GNU/GPL
* @link http://joomlacode.org/gf/project/attachments/frs/
* @author Jonathan M. Cameron
*/
// No direct access
defined('_JEXEC') or die('Restricted access');
// Add the plugins stylesheet to style the list of attachments
$document = JFactory::getDocument();
$uri = JFactory::getURI();
$lists = $this->lists;
// Handle both 2.5 and 3.x
$row_num = JText::_( 'JGRID_HEADING_ROW_NUMBER' );
if ($row_num == 'JGRID_HEADING_ROW_NUMBER') {
$row_num = '#';
}
?>
<form class="attachmentsBackend" enctype="multipart/form-data"
name="adminForm" id="adminForm"
action="<?php echo $this->post_url ?>" method="post">
<fieldset class="adminform">
<legend><?php echo JText::sprintf('ATTACH_SELECT_ENTITY_S', $this->parent_entity_name) ?></legend>
<div class="attachments_filter">
<?php echo JText::_( 'ATTACH_FILTER' ); ?>:
<input type="text" name="search" id="search" value="<?php echo $lists['search'];?>"
class="text_area" onchange="document.adminForm.submit();" />
<button onclick="this.form.submit();"><?php echo JText::_( 'ATTACH_GO' ); ?></button>
<button onclick="document.getElementById('search').value='';this.form.submit();"><?php echo JText::_('ATTACH_RESET') ?></button>
</div>
<table class="adminlist" cellspacing="1">
<thead>
<tr>
<th width="5"><?php echo $row_num ?></th>
<th class="title">
<?php echo JHtml::_('grid.sort', 'ATTACH_TITLE', 'title', @$lists['order_Dir'], @$lists['order'] ); ?>
</th>
<th width="2%" class="title">
<?php echo JHtml::_('grid.sort', 'JGRID_HEADING_ID', 'id', @$lists['order_Dir'], @$lists['order'] ); ?>
</th>
</tr>
</thead>
<tbody>
<?php
$k = 0;
for ($i=0, $n=count( $this->items ); $i < $n; $i++) {
$item = $this->items[$i];
?>
<tr class="<?php echo "row$k" ?>">
<td><?php echo $i ?></td>
<td>
<a style="cursor: pointer;" onclick="window.parent.jSelectParentArticle('<?php echo $item->id; ?>', '<?php echo str_replace(array("'", "\""), array("\\'", ""),$item->title); ?>', '<?php echo JRequest::getVar('object'); ?>');">
<?php echo htmlspecialchars($item->title, ENT_QUOTES, 'UTF-8'); ?></a>
</td>
<td><?php echo $item->id; ?></td>
</tr>
<?php
$k = 1 - $k;
}
?>
</tbody>
</table>
</fieldset>
<input type="hidden" name="parent_type" value="<?php echo $this->parent_type ?>" />
<input type="hidden" name="parent_entity" value="<?php echo $this->parent_entity ?>" />
<input type="hidden" name="option" value="<?php echo $this->option;?>" />
<input type="hidden" name="task" value="selectEntity" />
<input type="hidden" name="from" value="<?php echo $this->from; ?>" />
<input type="hidden" name="filter_order" value="<?php echo $lists['order']; ?>" />
<input type="hidden" name="filter_order_Dir" value="<?php echo $lists['order_Dir']; ?>" />
<?php echo JHtml::_( 'form.token' ); ?>
</form>

View File

@ -0,0 +1 @@
<html><body bgcolor="#FFFFFF"></body></html>

View File

@ -0,0 +1,43 @@
<?php
/**
* Attachments component
*
* @package Attachments
* @subpackage Attachments_Component
*
* @copyright Copyright (C) 2007-2018 Jonathan M. Cameron, All Rights Reserved
* @license http://www.gnu.org/licenses/gpl-3.0.html GNU/GPL
* @link http://joomlacode.org/gf/project/attachments/frs/
* @author Jonathan M. Cameron
*/
// no direct access
defined( '_JEXEC' ) or die('Restricted access');
/** Define the legacy classes, if necessary */
require_once(JPATH_SITE.'/components/com_attachments/legacy/view.php');
/**
* HTML View class for adding new attachments
*
* @package Attachments
*/
class AttachmentsViewEntity extends JViewLegacy
{
/**
* Display the entity view
*/
public function display($tpl = null)
{
// Add the style sheets
JHtml::stylesheet('com_attachments/attachments_admin.css', Array(), true);
$lang = JFactory::getLanguage();
if ( $lang->isRTL() ) {
JHtml::stylesheet('com_attachments/attachments_admin_rtl.css', Array(), true);
}
parent::display($tpl);
}
}

View File

@ -0,0 +1,661 @@
<?php
/**
* Attachments component
*
* @package Attachments
* @subpackage Attachments_Component
*
* @author Jonathan M. Cameron <jmcameron@jmcameron.net>
* @copyright Copyright (C) 2007-2018 Jonathan M. Cameron, All Rights Reserved
* @license http://www.gnu.org/licenses/gpl-3.0.html GNU/GPL
* @link http://joomlacode.org/gf/project/attachments/frs/
*/
// Check to ensure this file is included in Joomla!
defined('_JEXEC') or die();
/** Define the legacy classes, if necessary */
require_once JPATH_SITE . '/components/com_attachments/legacy/view.php';
/**
* View for the help pages
*
* The goal is to provide a PHP programmatic interface to create a help page
* using primarily PHP function calls in the view/template. The styling is
* base on styling of Restructured Text documents rendered into HTML using
* converion tools such as docutils.
*
* @package Attachments
* @since 3.1
*/
class HelpView extends JViewLegacy
{
/**
* Data about each of the document section headers
*
* Should be initialized in the view or templage to contain an array of
* arrays of information about the sections like this:
*
* $this->sections = Array( 1 => Array( 'id' => 'introduction',
* 'code' => 'SECTION_TITLE_1',
* 'title' => JText::_('SECTION_TITLE_1'),
* ...
* ),
*
* where the 'SECTION_TITLE_1' is the language token for the title of
* section 1.
*/
protected $sections = null;
/**
* Flag to show codes
*
*/
protected $show_codes = null;
/**
* Constructor
*
* @param array $config An optional associative array of configuration settings.
*/
public function __construct($config = array())
{
parent::__construct($config);
// Save the plugin type
$this->show_codes = JRequest::getCmd('show') == 'codes';
}
/**
* Add the information about a section to the $sections data
*
* @param int $sectnum the section number (constant)
* @param string $id the section ID string (unique name to be used as anchor target)
* @param string $code the language code for this section title
*
* @return nothing
*/
protected function saveSectionInfo($sectnum, $id, $code)
{
$this->sections[$sectnum] = Array('id' => $id, 'code' => $code, 'title' => JText::_($code));
}
/**
* Construct a tooltip if tooltips are supposed to be shown
*
* @param string $code Language code for the tooltip
*
* @return the tooltip to insert in the html
*/
protected function constructTooltip($code)
{
$tooltip = '';
if ($this->show_codes)
{
$tooltip = " title=\"$code\"";
}
return $tooltip;
}
/**
* Construct the URL with show=codes toggled
*
* @return the URL
*/
protected function toggledURL()
{
$uri = JRequest::getURI();
if ($this->show_codes)
{
$uri = str_replace('&show=codes', '', $uri);
}
else
{
$uri .= '&show=codes';
}
return $uri;
}
/**
* Add a link for the specified section
*
* @param int $sect_num The section number to link to
*
* @return string an html link for the specified section
*/
protected function sectionLink($sect_num)
{
$id = $this->sections[$sect_num]['id'];
$title = $this->sections[$sect_num]['title'];
return "<a class=\"reference internal\" href=\"#$id\">$title</a>";
}
/**
* Construct a link
*
* @param string $url The URL for the link
* @param string $label_code The code for the link label
* @param string $class The class for the link
*
* @return string an html link
*/
protected function link($url, $label_code, $class='')
{
$label = JText::_($label_code);
return "<a $class href=\"$url\">$label</a>";
}
/**
* Replace a series of items from the html using an array of replacements
*
* For example:
* replace('<span>{TEST}-{NUM}</span>', Array('{TEST}' => 'MyTest', '{NUM}' => '23'))
* returns:
* <span>MyTest-23</span>
*
* @param string $html The original HTML string to be modified
* @param array $replacements Array of textual replacments
*
* @return string the original HTML with the replacements performed
*/
protected function replace($html, $replacements)
{
if ( is_array($replacements) )
{
foreach ($replacements as $tag => $replace)
{
$html = str_replace($tag, $replace, $html);
}
}
return $html;
}
/**
* Add a table of contents
*
* @param string $title_code The language code for the title of the table of contents
* @param sting $class The class for the table of contents (default: contents topic)
*
* @return nothing
*/
protected function tableOfContents($title_code, $class = 'contents topic')
{
$title = JText::_($title_code);
$tooltip = $this->constructTooltip($title_code);
$html = "<div class=\"$class\" id=\"contents\">\n";
$html .= " <p class=\"topic-title first\" $tooltip>$title</p>\n";
$html .= " <ul class=\"$class\">\n";
foreach ($this->sections as $sect_num => $sdata)
{
$html .= ' ' . $this->sectionTOC($sect_num);
}
$html .= " </ul>\n";
$html .= "</div> <!-- table of contents -->\n";
echo $html;
}
/**
* Construct a section Table-of-contents line for a section
*
* @param int $sect_num The section number to echo (as a list element)
*
* @return string the table-of-conents list item
*/
protected function sectionTOC($sect_num)
{
$sect_data = $this->sections[$sect_num];
$id = $sect_data['id'];
$title = $sect_data['title'];
$tooltip = $this->constructTooltip($sect_data['code']);
return "<li><a class=\"reference internal\" href=\"#$id\" id=\"id$sect_num\" $tooltip>$title</a></li>\n";
}
/**
* Add the start of a section (using <h1>)
*
* @param int $sect_num The desired section number
*
* @return nothing
*/
protected function startSection($sect_num)
{
$sect_data = $this->sections[$sect_num];
$id = $sect_data['id'];
$text_code = $sect_data['code'];
$tooltip = $this->constructTooltip($sect_data['code']);
$title = $sect_data['title'];
$hclass = 'class="toc-backref"';
$html = "<div class=\"section\" id=\"$id\">\n";
$html .= "<h1><a $hclass href=\"#id$sect_num\" $tooltip>$title</a></h1>\n";
echo $html;
}
/**
* Add the end of a section
*
* @param int $sect_num The desired section number
*
* @return nothing
*/
protected function endSection($sect_num)
{
echo "</div><?-- end of section $sect_num -->\n";
}
/**
* Add the start of a subsection (using <h2>)
*
* @param array $sect_data An array of data for the subsection (providing 'id' and 'title')
*
* @return nothing
*/
protected function startSubSection($sect_data)
{
$id = $sect_data['id'];
$code = $sect_data['code'];
$title = JText::_($code);
$tooltip = $this->constructTooltip($code);
$html = "<div class=\"section\" id=\"$id\">\n";
$html .= "<h2 $tooltip>$title</h2>\n";
echo $html;
}
/**
* Add the start of a subsection (using <h2>)
*
* @param string $title The subsection title (should be same as in the start)
*
* @return nothing
*/
protected function endSubSection($title)
{
echo "</div><?-- end of subsection $title -->\n";
}
/**
* Construct an admonition (note, warning, hint, etc)
*
* @param string $type The type of admonition (hint, note, important, warning)
* @param string $type_code Language token for the name of the admonition (eg, $type)
* @param array $text_codes Array of Language tokens for the body text (as separate paragraphs in the admonition)
* @param array $replacements Array of replacements to be applied to the body text (see replace functin)
* @param bool $terminate Whether to terminatate the <div> that contains the note
*
* @return nothing
*/
protected function addAdmonition($type, $type_code, $text_codes, $replacements = null, $terminate = true)
{
if (!is_array($text_codes))
{
$text_codes = Array($text_codes);
}
$title = JText::_($type_code);
$tooltip = $this->constructTooltip($type_code);
$html = "<div class=\"$type\">\n";
$html .= " <p class=\"first admonition-title\" $tooltip>$title</p>\n";
foreach ($text_codes as $text_code)
{
$text = $this->replace(JText::_($text_code), $replacements);
$tooltip = $this->constructTooltip($text_code);
$html .= " <p class=\"last\" $tooltip>$text</p>\n";
}
if ( $terminate )
{
$html .= "</div>\n";
}
echo $html;
}
/**
* Add the end the admonition
*
* @return nothing
*/
protected function endAdmonition()
{
echo "</div>\n";
}
/**
* Add a 'hint' admonition
*
* @param array $text_codes Array of Language tokens for the body text (as separate paragraphs in the admonition)
* @param array $replacements Array of replacements to be applied to the body text (see replace functin)
* @param bool $terminate Whether to terminatate the <div> that contains the note
*
* @return nothing
*/
protected function addHint($text_codes, $replacements = null, $terminate = true)
{
echo $this->addAdmonition('hint', 'ATTACH_HELP_HINT', $text_codes, $replacements, $terminate);
}
/**
* Add an 'important' admonition
*
* @param array $text_codes Array of Language tokens for the body text (as separate paragraphs in the admonition)
* @param array $replacements Array of replacements to be applied to the body text (see replace functin)
* @param bool $terminate Whether to terminatate the <div> that contains the note
*
* @return nothing
*/
protected function addImportant($text_codes, $replacements = null, $terminate = true)
{
echo $this->addAdmonition('important', 'ATTACH_HELP_IMPORTANT', $text_codes, $replacements, $terminate);
}
/**
* Add a 'note' admonition
*
* @param array $text_codes Array of Language tokens for the body text (as separate paragraphs in the admonition)
* @param array $replacements Array of replacements to be applied to the body text (see replace functin)
* @param bool $terminate Whether to terminatate the <div> that contains the note
*
* @return nothing
*/
protected function addNote($text_codes, $replacements = null, $terminate = true)
{
echo $this->addAdmonition('note', 'ATTACH_HELP_NOTE', $text_codes, $replacements, $terminate);
}
/**
* Add a 'warning' admonition
*
* @param array $text_codes Array of Language tokens for the body text (as separate paragraphs in the admonition)
* @param array $replacements Array of replacements to be applied to the body text (see replace functin)
* @param bool $terminate Whether to terminatate the <div> that contains the note
*
* @return nothing
*/
protected function addWarning($text_codes, $replacements = null, $terminate = true)
{
echo $this->addAdmonition('warning', 'ATTACH_HELP_WARNING', $text_codes, $replacements, $terminate);
}
/**
* Add a paragraph
*
* @param array $text_codes Array of Language tokens for the body text (as separate paragraphs)
* @param array $replacements Array of replacements to be applied to the text (see replace functin)
* @param string $pclass The class for the paragraph HTML <p> element
*
* @return nothing
*/
protected function addParagraph($text_codes, $replacements = null, $pclass = null)
{
if (!is_array($text_codes))
{
$text_codes = Array($text_codes);
}
$html = '';
foreach ($text_codes as $text_code)
{
$text = $this->replace(JText::_($text_code), $replacements);
$tooltip = $this->constructTooltip($text_code);
if ($pclass)
{
$html .= "<p class=\"$pclass hasTip\" $tooltip>" . $text . "</p>\n";
}
else
{
$html .= "<p class=\"hasTip\" $tooltip>" . $text . "</p>\n";
}
}
echo $html;
}
/**
* Add a preformatted block
*
* @param string $text The raw string to print literally
* @param string $class The class for the HTML <pre> block
*
* @return nothing
*/
protected function addPreBlock($text, $class='literal-block')
{
$html = "<pre class=\"$class\">\n";
$html .= $text . "\n";
$html .= "</pre>\n";
echo $html;
}
/**
* Start an a list (unordered by default)
*
* @param string $type The type of list (defaults to unordered <ul>)
* @param string $class The class for the HTML <ul> or <ol> element
*
* @return nothing
*/
protected function startList($type = 'ul', $class='simple')
{
echo "<$type class=\"$class\">\n";
}
/**
* Add a list element
*
* @param array $text_codes Array of Language tokens for the body text (as separate paragraphs inside the list element)
* @param array $replacements Array of replacements to be applied to the text (see replace function)
* @param bool $terminate Whether to terminatate the <li> that contains the text
*
* @return nothing
*/
protected function addListElement($text_codes, $replacements = null, $terminate = true)
{
$html = '<li>';
if (!is_array($text_codes))
{
$text_codes = Array($text_codes);
}
foreach ($text_codes as $text_code)
{
$text = $this->replace(JText::_($text_code), $replacements);
$tooltip = $this->constructTooltip($text_code);
$html .= "<p class=\"hasTip\" $tooltip>$text</p>\n";
}
if ($terminate)
{
$html .= "</li>\n";
}
echo $html;
}
/**
* Add a list element for a definition for a term (a word or phrase)
*
* @param array $text_codes Array of Language tokens for the body text (as separate paragraphs inside the list element)
* @param array $replacements Array of replacements to be applied to the text (see replace function)
* @param bool $terminate Whether to terminatate the <li> that contains the text
*
* @return nothing
*/
protected function addDefinitionListElement($term_code, $definition_codes,
$replacements = null, $terminate = true)
{
// Set up the term
$term_tooltip = $this->constructTooltip($term_code);
if ($term_tooltip)
{
$term_tooltip = " class=\"hasTip\" ".$term_tooltip;
}
$html = "<li><strong $term_tooltip>".JText::_($term_code).':</strong> ';
// Add the definition
if (!is_array($definition_codes))
{
$definition_codes = Array($definition_codes);
}
foreach ($definition_codes as $text_code)
{
$text = $this->replace(JText::_($text_code), $replacements);
$tooltip = $this->constructTooltip($text_code);
$html .= "<p class=\"hasTip\" $tooltip>$text</p>\n";
}
if ($terminate)
{
$html .= "</li>\n";
}
echo $html;
}
/**
* Add the ending of a list element (use with unterminated list element)
*
* @return nothing
*/
protected function endListElement()
{
echo "</li>\n";
}
/**
* Add a link as a list element
*
* @param string $url the URL of the link
* @param string $text_code the language token for the text of the link
*
* @return nothing
*/
protected function addListElementLink($url, $text_code)
{
$text = $this->replace(JText::_($text_code), Array('{LINK}' => $url));
$tooltip = $this->constructTooltip($text_code);
echo "<li><a class=\"reference external\" $tooltip href=\"$url\">$text</a></li>\n";
}
/**
* Add a list elment with raw HTML
*
* @param string $html The HTML to insert into the list element
*
* @return nothing
*/
protected function addListElementHtml($html)
{
echo "<li>$html</li>\n";
}
/**
* Add the end of a list
*
* @param string $type The class for the HTML </ul> or </ol> element
*
* @return nothing
*/
protected function endList($type = 'ul')
{
echo "</$type>\n";
}
/**
* Add a line break
*
* @return nothing
*/
protected function addLineBreak()
{
echo "<br/>\n";
}
/**
* Add a figure: and image with an optional caption
*
* @param string $filename Filename for the image (full path)
* @param string $alt_code Language token for the text to be use for the 'alt' attribute
* @param string $caption_code Language token for the text to use for the caption (OPTIONAL)
* @param string $dclass Class for the figure div
* @param string $img_attribs attributes for the 'img' html tag
*
* @return nothing
*/
protected function addFigure($filename, $alt_code, $caption_code = null, $dclass = 'figure', $img_attribs=array())
{
$html = "<div class=\"$dclass\">\n";
$html .= $this->image($filename, $alt_code, $img_attribs) . "\n";
if ( $caption_code )
{
$html .= "<p class=\"caption\" title=\"$caption_code\">" . JText::_($caption_code) . "</p>\n";
}
$html .= '</div>';
echo $html;
}
/**
* Return an image URL if the file is found
*
* @param string $filename Filename for the image in the media folder (more below)
* @param string $alt_code Language code for text to be inserted into the alt='text' attribute
* @param array $attribs Attributes to be added to the image URL
*
* The file location uses the JHtml::image() function call which expects
* to find images in the [base]/media/com_attachments/images directory.
* This function has the necessary checks to add level of language folders
* (like the translation files). For instance:
*
* For a file:
* [base]/media/com_attachments/images/en-GB/test1.png
* Use:
* $this->image('com_attachments/test1.png')
*
* The language tag will be handled automatically.
*
* @return string image URL (or null if the image was not found)
*/
protected function image($filename, $alt_code, $attribs = Array())
{
$lcode = $this->lang->getTag();
$alt = '';
if ($alt_code)
{
$alt = JText::_($alt_code);
}
// First try the current language
$found = JHtml::image('com_attachments/help/' . $lcode . '/' . $filename, $alt, $attribs, true, true);
if ($found)
{
return JHtml::image('com_attachments/help/' . $lcode . '/' . $filename, $alt, $attribs, true);
}
// If that fails, return the English/en-GB image
if ( $lcode != 'en-GB' )
{
return JHtml::image('com_attachments/help/en-GB/' . $filename, $alt, $attribs, true);
}
// The image was not found for either language so return nothing
return null;
}
}

View File

@ -0,0 +1 @@
<html><body bgcolor="#FFFFFF"></body></html>

View File

@ -0,0 +1,682 @@
<?php
/**
* Attachments component
*
* @package Attachments
* @subpackage Attachments_Component
*
* @copyright Copyright (C) 2007-2018 Jonathan M. Cameron, All Rights Reserved
* @license http://www.gnu.org/licenses/gpl-3.0.html GNU/GPL
* @link http://joomlacode.org/gf/project/attachments/frs/
* @author Jonathan M. Cameron
*/
// Check to ensure this file is included in Joomla!
defined('_JEXEC') or die();
// Load the tooltip behavior.
// JHtml::_('behavior.tooltip');
// Add the CSS for the attachments list (whether we need it or not)
JHtml::stylesheet('com_attachments/attachments_help.css', array(), true);
// If the user specifies 'show=codes' in the url, the language item codes will
// be shown by default. Note that they can still be toggled with the toggles
// at the top right and bottom right of the page.
if (JRequest::getCmd('show') == 'codes') {
JHtml::stylesheet('com_attachments/attachments_help_show_codes.css', array(), true);
}
// Define the section constants
define('SECT_INTRO', 1);
define('SECT_NEW_V3', 2);
define('SECT_FEAT', 3);
define('SECT_UPLOAD', 4);
define('SECT_SETNGS', 5);
define('SECT_PERMS', 6);
define('SECT_ACCESS', 7);
define('SECT_DISPLY', 8);
define('SECT_ATTACH', 9);
define('SECT_FILES', 10);
define('SECT_STYLE', 11);
define('SECT_ICONS', 12);
define('SECT_UTILS', 13);
define('SECT_WARN', 14);
define('SECT_UPGRAD', 15);
define('SECT_UNINST', 16);
define('SECT_MIGRAT', 17);
define('SECT_TRANS', 18);
define('SECT_ACKNOW', 19);
define('SECT_CONTCT', 20);
$this->saveSectionInfo(SECT_INTRO, 'introduction', 'ATTACH_HELP_010000_SECTION_TITLE');
$this->saveSectionInfo(SECT_NEW_V3, 'v3-features', 'ATTACH_HELP_020000_SECTION_TITLE');
$this->saveSectionInfo(SECT_FEAT, 'features', 'ATTACH_HELP_030000_SECTION_TITLE');
$this->saveSectionInfo(SECT_UPLOAD, 'uploading', 'ATTACH_HELP_040000_SECTION_TITLE');
$this->saveSectionInfo(SECT_SETNGS, 'settings', 'ATTACH_HELP_050000_SECTION_TITLE');
$this->saveSectionInfo(SECT_PERMS, 'permissions', 'ATTACH_HELP_060000_SECTION_TITLE');
$this->saveSectionInfo(SECT_ACCESS, 'access-levels', 'ATTACH_HELP_070000_SECTION_TITLE');
$this->saveSectionInfo(SECT_DISPLY, 'display-filenames', 'ATTACH_HELP_080000_SECTION_TITLE');
$this->saveSectionInfo(SECT_ATTACH, 'attaching-urls', 'ATTACH_HELP_090000_SECTION_TITLE');
$this->saveSectionInfo(SECT_FILES, 'attached-to-what', 'ATTACH_HELP_100000_SECTION_TITLE');
$this->saveSectionInfo(SECT_STYLE, 'css-styling', 'ATTACH_HELP_110000_SECTION_TITLE');
$this->saveSectionInfo(SECT_ICONS, 'file-type-icons', 'ATTACH_HELP_120000_SECTION_TITLE');
$this->saveSectionInfo(SECT_UTILS, 'admin-utilities', 'ATTACH_HELP_130000_SECTION_TITLE');
$this->saveSectionInfo(SECT_WARN, 'warnings', 'ATTACH_HELP_140000_SECTION_TITLE');
$this->saveSectionInfo(SECT_UPGRAD, 'upgrading', 'ATTACH_HELP_150000_SECTION_TITLE');
$this->saveSectionInfo(SECT_UNINST, 'uninstalling', 'ATTACH_HELP_160000_SECTION_TITLE');
$this->saveSectionInfo(SECT_MIGRAT, 'migration', 'ATTACH_HELP_170000_SECTION_TITLE');
$this->saveSectionInfo(SECT_TRANS, 'translations', 'ATTACH_HELP_180000_SECTION_TITLE');
$this->saveSectionInfo(SECT_ACKNOW, 'acknowledgments', 'ATTACH_HELP_190000_SECTION_TITLE');
$this->saveSectionInfo(SECT_CONTCT, 'contact', 'ATTACH_HELP_200000_SECTION_TITLE');
// A few other miscellaneous items
$tlc = JText::_('ATTACH_HELP_TOGGLE_LANGUAGE_CODES');
$onContentPrepare = "<tt class=\"docutils literal\">'onContentPrepare'</tt>";
$main_title_tooltip = $this->constructTooltip('ATTACH_HELP_000000_MAIN_TITLE');
$main_version_tooltip = $this->constructTooltip('ATTACH_HELP_000100_MAIN_VERSION');
$toggle_img = JURI::root(true).'/media/system/images/tooltip.png';
?>
<div class="help-document">
<div class="header">
<a id="tc_toggle" title="<? echo $tlc ?>" href="<?php echo $this->toggledURL() ?>"><img src="<?php echo $toggle_img ?>"></a>
<h1 class="title" <?php echo $main_title_tooltip ?>><?php echo $this->logo_img ?><?php echo JText::_('ATTACH_HELP_000000_MAIN_TITLE') ?></h1>
<hr class="header"/>
</div>
<div class="main">
<p class="version"><strong><?php echo $this->version . ' - ' . $this->date ?></strong></p>
<p><strong<?php echo $main_version_tooltip ?>><?php echo JText::_('ATTACH_HELP_000100_MAIN_VERSION') ?></strong></p>
<?php
// ------------------------------------------------------------
// Add the table of contents
$this->tableOfContents('ATTACH_HELP_000200_MAIN_CONTENTS');
// ------------------------------------------------------------
// Introduction
$this->startSection(SECT_INTRO);
$this->addParagraph( 'ATTACH_HELP_010100_TEXT');
$this->addWarning( 'ATTACH_HELP_010200_WARNING');
$this->addNote( 'ATTACH_HELP_010300_NOTE');
$this->addParagraph('ATTACH_HELP_010400_TEXT', Array( '{SECT_TRANS}' => $this->sectionLink(SECT_TRANS) ));
$this->addParagraph('ATTACH_HELP_010500_TEXT');
$this->startList();
$email_list_url = 'http://jmcameron.net/attachments/email-list.html';
$email_list_text = JText::sprintf('ATTACH_HELP_010600_TEXT', $email_list_url);
$this->addListElementHtml("<a class=\"reference external\" href=\"$email_list_url\">$email_list_text</a>");
$this->endList();
$this->endSection(SECT_INTRO);
// ------------------------------------------------------------
// New features in Version 3.1
$this->startSection(SECT_NEW_V3);
$this->startList();
$this->addListElement('ATTACH_HELP_020100_TEXT');
$this->addListElement('ATTACH_HELP_020200_TEXT');
$this->addListElement('ATTACH_HELP_020300_TEXT');
$this->addListElement('ATTACH_HELP_020400_TEXT');
$this->endList();
$this->endSection(SECT_NEW_V3);
// ------------------------------------------------------------
// Major features of the Attachments Extension
$this->startSection(SECT_FEAT);
$this->startList();
$this->addListElement('ATTACH_HELP_030100_TEXT', Array( '{SECT_PERMS}' => $this->sectionLink(SECT_PERMS) ));
$this->addListElement('ATTACH_HELP_030200_TEXT', Array( '{SECT_ACCESS}' => $this->sectionLink(SECT_ACCESS) ));
$this->addListElement('ATTACH_HELP_030300_TEXT');
$this->addListElement('ATTACH_HELP_030400_TEXT');
$this->addListElement('ATTACH_HELP_030500_TEXT');
$this->addListElement('ATTACH_HELP_030600_TEXT');
$this->addListElement('ATTACH_HELP_030700_TEXT');
$this->addListElement('ATTACH_HELP_030800_TEXT');
$this->startList();
$this->addListElement('ATTACH_HELP_030900_TEXT');
$this->addListElement('ATTACH_HELP_031000_TEXT');
$this->addListElement('ATTACH_HELP_031100_TEXT');
$this->addListElement('ATTACH_HELP_031200_TEXT');
$this->addListElement('ATTACH_HELP_031300_TEXT',
Array( '{SECT_FILES}' => $this->sectionLink(SECT_FILES),
'{ONCONTENTPREPARE}' => $onContentPrepare));
$this->endList();
$this->endList();
$this->endSection(SECT_FEAT);
// ------------------------------------------------------------
// Uploading Restrictions
$this->startSection(SECT_UPLOAD);
$this->addParagraph('ATTACH_HELP_040100_TEXT');
$this->addWarning( 'ATTACH_HELP_040200_WARNING');
$this->endSection(SECT_UPLOAD);
// ------------------------------------------------------------
// Attachments Settings
$this->startSection(SECT_SETNGS);
$this->addParagraph('ATTACH_HELP_050100_TEXT');
$this->addNote( 'ATTACH_HELP_050150_NOTE');
// Basic Options
$this->startSubSection(Array( 'id' => 'basic-options',
'code' => 'ATTACH_HELP_050200_SUBSECTION_TITLE'));
echo $this->image('options-basic.png', 'ATTACH_HELP_050200_SUBSECTION_TITLE',
'class="float-right drop-shadow"') . "\n";
$this->startList();
$this->addDefinitionListElement('ATTACH_ATTACHMENTS_PUBLISHED_BY_DEFAULT',
'ATTACH_HELP_050300_TEXT');
$this->addDefinitionListElement('ATTACH_AUTO_PUBLISH_WARNING',
'ATTACH_HELP_050400_TEXT');
$this->addDefinitionListElement('ATTACH_DEFAULT_ACCESS_LEVEL',
'ATTACH_DEFAULT_ACCESS_LEVEL_DESCRIPTION');
$this->addListElement('ATTACH_HELP_050600_TEXT');
$this->addHint( 'ATTACH_HELP_050700_HINT_TEXT');
$this->addDefinitionListElement('ATTACH_MAX_FILENAME_URL_LENGTH',
'ATTACH_HELP_050800_TEXT');
$this->addDefinitionListElement('ATTACH_WHERE_SHOULD_ATTACHMENTS_BE_PLACED',
'ATTACH_HELP_050900_TEXT', null, false);
$this->startList();
$this->addListElement('ATTACH_HELP_051000_TEXT');
$this->addListElement('ATTACH_HELP_051100_TEXT');
$this->addListElement('ATTACH_HELP_051200_TEXT', null, false);
$this->addWarning('ATTACH_HELP_051300_WARNING');
$this->endListElement();
$this->addParagraph( 'ATTACH_HELP_051400_TEXT', null, 'noindent');
$this->addPreBlock("&lt;span class=&quot;hide&quot;&gt;{attachments}&lt;/span&gt;");
$this->addParagraph( 'ATTACH_HELP_051500_TEXT', null, 'noindent');
$this->addWarning( 'ATTACH_HELP_051600_WARNING');
$this->addListElement('ATTACH_HELP_051700_TEXT');
$this->addListElement('ATTACH_HELP_051800_TEXT');
$this->endListElement();
$this->endList();
$this->endListElement();
$this->addDefinitionListElement('ATTACH_ALLOW_FRONTEND_ACCESS_LEVEL_EDITING',
'ATTACH_ALLOW_FRONTEND_ACCESS_LEVEL_EDITING_DESCRIPTION');
$this->endList();
$this->endSubSection('basic-options');
// Formatting options
$this->startSubSection(Array( 'id' => 'formatting-options',
'code' => 'ATTACH_HELP_052000_SUBSECTION_TITLE'));
echo $this->image('options-formatting.png', 'ATTACH_HELP_052000_SUBSECTION_TITLE',
'class="float-right drop-shadow"') . "\n";
$this->startList();
$this->addListElement('ATTACH_HELP_052100_TEXT');
$this->addListElement('ATTACH_HELP_052200_TEXT');
$this->addListElement('ATTACH_HELP_052300_TEXT');
$this->addListElement('ATTACH_HELP_052400_TEXT');
$this->addListElement('ATTACH_HELP_052500_TEXT', null, false);
$this->addWarning('ATTACH_HELP_052600_WARNING');
$this->endListElement();
$this->addListElement('ATTACH_HELP_052650_TEXT');
$this->addListElement('ATTACH_HELP_052700_TEXT');
$this->addListElement('ATTACH_HELP_052800_TEXT',
Array('{DESC}' => JText::_('ATTACH_FORMAT_STRING_FOR_DATES_DESCRIPTION')));
$this->addListElement('ATTACH_HELP_052900_TEXT', null, false);
$this->startList('ol', 'arabic simple');
$this->addListElement('ATTACH_HELP_053000_TEXT',
Array('{LABEL}' => JText::_('ATTACH_SORT_FILENAME')));
$this->addListElement('ATTACH_HELP_053100_TEXT',
Array('{LABEL}' => JText::_('ATTACH_SORT_FILENAME_DESCENDING')));
$this->addListElement('ATTACH_HELP_053200_TEXT',
Array('{LABEL}' => JText::_('ATTACH_SORT_FILE_SIZE')));
$this->addListElement('ATTACH_HELP_053300_TEXT',
Array('{LABEL}' => JText::_('ATTACH_SORT_FILE_SIZE_DESCENDING')));
$this->addListElement('ATTACH_HELP_053400_TEXT',
Array('{LABEL}' => JText::_('ATTACH_SORT_DESCRIPTION')));
$this->addListElement('ATTACH_HELP_053500_TEXT',
Array('{LABEL}' => JText::_('ATTACH_SORT_DESCRIPTION_DESCENDING')));
$this->addListElement('ATTACH_HELP_053600_TEXT',
Array('{LABEL}' => JText::_('ATTACH_SORT_DISPLAY_FILENAME_OR_URL')));
$this->addListElement('ATTACH_HELP_053700_TEXT',
Array('{LABEL}' => JText::_('ATTACH_SORT_DISPLAY_FILENAME_OR_URL_DESCENDING')));
$this->addListElement('ATTACH_HELP_053800_TEXT',
Array('{LABEL}' => JText::_('ATTACH_CREATOR')));
$this->addListElement('ATTACH_HELP_053900_TEXT',
Array('{LABEL}' => JText::_('ATTACH_SORT_CREATED_DATE')));
$this->addListElement('ATTACH_HELP_054000_TEXT',
Array('{LABEL}' => JText::_('ATTACH_SORT_CREATED_DATE_DESCENDING')));
$this->addListElement('ATTACH_HELP_054100_TEXT',
Array('{LABEL}' => JText::_('ATTACH_SORT_MODIFICATION_DATE')));
$this->addListElement('ATTACH_HELP_054200_TEXT',
Array('{LABEL}' => JText::_('ATTACH_SORT_MODIFICATION_DATE_DESCENDING')));
$this->addListElement('ATTACH_HELP_054300_TEXT',
Array('{LABEL}' => JText::_('ATTACH_SORT_ATTACHMENT_ID')));
$this->addListElement('ATTACH_HELP_054400_TEXT',
Array('{LABEL}' => JText::_('ATTACH_USER_DEFINED_FIELD_1')));
$this->addListElement('ATTACH_HELP_054500_TEXT',
Array('{LABEL}' => JText::_('ATTACH_USER_DEFINED_FIELD_2')));
$this->addListElement('ATTACH_HELP_054600_TEXT',
Array('{LABEL}' => JText::_('ATTACH_USER_DEFINED_FIELD_3')));
$this->endList();
$this->endListElement();
$this->endList();
$this->endSubSection('formatting-options');
// Visibilty Options
$this->startSubSection(Array( 'id' => 'visibility-options',
'code' => 'ATTACH_HELP_055000_SUBSECTION_TITLE'));
echo $this->image('options-visibility.png', 'ATTACH_HELP_055000_SUBSECTION_TITLE',
'class="float-right drop-shadow"') . "\n";
$this->addParagraph('ATTACH_HELP_055100_TEXT');
$this->startList();
$this->addListElement('ATTACH_HELP_055200_TEXT');
$this->addListElement('ATTACH_HELP_055300_TEXT');
$this->addListElement('ATTACH_HELP_055400_TEXT');
$this->addListElement('ATTACH_HELP_055500_TEXT');
$this->addListElement('ATTACH_HELP_055600_TEXT');
$this->addListElement('ATTACH_HELP_055700_TEXT');
$this->addListElement('ATTACH_HELP_055800_TEXT',
Array('{DESCRIPTION}' => JText::_('ATTACH_SHOW_GUEST_ACCESS_LEVELS_DESCRIPTION')));
$this->addListElement('ATTACH_HELP_055900_TEXT');
$this->endList();
$this->endSubSection('visibility-options');
// Advanced Options
$this->startSubSection(Array( 'id' => 'advanced-options',
'code' => 'ATTACH_HELP_057000_SUBSECTION_TITLE'));
echo $this->image('options-advanced.png', 'ATTACH_HELP_057000_SUBSECTION_TITLE',
'class="float-right drop-shadow"') . "\n";
$this->startList();
$this->addListElement('ATTACH_HELP_057050_TEXT',
Array('{DESCRIPTION}' => JText::_('ATTACH_MAX_ATTACHMENT_SIZE_DESCRIPTION'),
'{SECT_WARN}' => $this->sectionLink(SECT_WARN)));
$this->addListElement('ATTACH_HELP_057100_TEXT');
$this->addListElement('ATTACH_HELP_057200_TEXT', Array( '{SECT_STYLE}' => $this->sectionLink(SECT_STYLE) ));
$this->addListElement('ATTACH_HELP_057300_TEXT');
$blk1 = "<pre class=\"literal-block\">content/attachments/language/qq-QQ/qq-QQ.plg_content_attachments.ini</pre>\n";
$blk2 = "<pre class=\"literal-block\">language/overrides/en-GB.override.ini</pre>\n";
$this->addListElement('ATTACH_HELP_057400_TEXT', null, false);
$this->addNote(Array('ATTACH_HELP_057500_NOTE', 'ATTACH_HELP_057600_NOTE'),
Array('{BLOCK1}' => $blk1, '{BLOCK2}' => $blk2));
$this->endListElement();
$this->addListElement('ATTACH_HELP_057700_TEXT');
$this->addListElement('ATTACH_HELP_057800_TEXT');
$this->addListElement('ATTACH_HELP_057900_TEXT');
$this->addListElement('ATTACH_HELP_057940_TEXT',
Array('{DESCRIPTION}' => JText::_('ATTACH_URL_TO_LOGIN_DESCRIPTION')));
$this->addListElement('ATTACH_HELP_057960_TEXT',
Array('{DESCRIPTION}' => JText::_('ATTACH_URL_TO_REGISTER_DESCRIPTION')));
$this->endList();
$this->endSubSection('advanced-options');
// Security Options
$this->startSubSection(Array( 'id' => 'security-options',
'code' => 'ATTACH_HELP_058000_SUBSECTION_TITLE'));
echo $this->image('options-security.png', 'ATTACH_HELP_058000_SUBSECTION_TITLE',
'class="float-right drop-shadow"') . "\n";
$this->startList();
$this->addListElement(Array('ATTACH_HELP_058100_TEXT',
'ATTACH_HELP_058200_TEXT',
'ATTACH_HELP_058300_TEXT'), null, false);
$this->addHint('ATTACH_HELP_058400_HINT');
$this->endListElement();
$this->addListElement('ATTACH_HELP_058500_TEXT', null, false);
$this->startList();
$this->addListElement('ATTACH_HELP_058600_TEXT');
$this->addListElement('ATTACH_HELP_058700_TEXT');
$this->endList();
$this->addParagraph('ATTACH_HELP_058800_TEXT');
$this->endListElement();
$this->endList();
$this->endSubSection('security-options');
// Permissions Options
$this->startSubSection(Array( 'id' => 'permissions-options',
'code' => 'ATTACH_HELP_059000_SUBSECTION_TITLE'));
$this->addParagraph('ATTACH_HELP_059100_TEXT', Array( '{SECT_PERMS}' => $this->sectionLink(SECT_PERMS) ));
$this->endSubSection('permissions-options');
$this->endSection(SECT_SETNGS);
// ------------------------------------------------------------
// Attachments Permissions
$this->startSection(SECT_PERMS);
$this->addParagraph('ATTACH_HELP_060100_TEXT');
$this->addParagraph('ATTACH_HELP_060200_TEXT');
$this->addImportant('ATTACH_HELP_060300_IMPORTANT');
$this->addParagraph('ATTACH_HELP_060400_TEXT');
$this->addFigure( 'options-permissions.png',
'ATTACH_HELP_060500_TEXT',
'ATTACH_HELP_060600_TEXT',
'figure width50', 'class="drop-shadow"');
$this->addParagraph('ATTACH_HELP_060700_TEXT');
$this->startPermissionsTable( 'ATTACH_HELP_060800_TEXT',
'ATTACH_HELP_060900_TEXT',
'ATTACH_HELP_061000_TEXT' );
$this->addPermissionsTableRow('ATTACH_PERMISSION_ADMIN_COMPONENT',
'ATTACH_PERMISSION_ADMIN_COMPONENT_DESC', 'core.admin');
$this->addPermissionsTableRow('ATTACH_PERMISSION_MANAGE_COMPONENT',
'ATTACH_PERMISSION_MANAGE_COMPONENT_DESC', 'core.manage');
$this->addPermissionsTableRow('ATTACH_PERMISSION_CREATE',
'ATTACH_PERMISSION_CREATE_DESC', 'core.create');
$this->addPermissionsTableRow('ATTACH_PERMISSION_DELETE',
'ATTACH_PERMISSION_DELETE_DESC', 'core.delete');
$this->addPermissionsTableRow('ATTACH_PERMISSION_EDIT',
'ATTACH_PERMISSION_EDIT_DESC', 'core.edit');
$this->addPermissionsTableRow('ATTACH_PERMISSION_EDITSTATE',
'ATTACH_PERMISSION_EDITSTATE_DESC', 'core.edit.state');
$this->addPermissionsTableRow('ATTACH_PERMISSION_EDITOWN',
'ATTACH_PERMISSION_EDITOWN_DESC', 'core.edit.own');
$this->addPermissionsTableRow('ATTACH_PERMISSION_EDITSTATE_OWN',
'ATTACH_PERMISSION_EDITSTATE_OWN_DESC', 'attachments.edit.state.own');
$this->addPermissionsTableRow('ATTACH_PERMISSION_DELETEOWN',
'ATTACH_PERMISSION_DELETEOWN_DESC', 'attachments.delete.own');
$this->addPermissionsTableRow('ATTACH_PERMISSION_EDIT_OWNPARENT',
'ATTACH_PERMISSION_EDIT_OWNPARENT_DESC', 'attachments.edit.ownparent');
$this->addPermissionsTableRow('ATTACH_PERMISSION_EDITSTATE_OWNPARENT',
'ATTACH_PERMISSION_EDITSTATE_OWNPARENT_DESC', 'attachments.edit.state.ownparent');
$this->addPermissionsTableRow('ATTACH_PERMISSION_DELETE_OWNPARENT',
'ATTACH_PERMISSION_DELETE_OWNPARENT_DESC', 'attachments.delete.ownparent');
$this->endPermissionsTable();
// Default permissions
$this->startSubSection(Array( 'id' => 'default-permissions',
'code' => 'ATTACH_HELP_062000_SUBSECTION_TITLE'));
$this->addParagraph('ATTACH_HELP_062100_TEXT');
$this->addAdmonition('important hide-title', 'ATTACH_HELP_IMPORTANT',
'ATTACH_HELP_062200_IMPORTANT', null, false);
$this->startList();
$this->addListElement('ATTACH_HELP_062300_TEXT');
$this->addListElement('ATTACH_HELP_062400_TEXT');
$this->addListElement('ATTACH_HELP_062500_TEXT');
$this->addListElement('ATTACH_HELP_062600_TEXT');
$this->endList();
$this->endAdmonition();
$this->addParagraph('ATTACH_HELP_062700_TEXT');
$this->endSubSection('default-permissions');
// Permissions for common scenarios
$this->startSubSection(Array( 'id' => 'common-permissions-scenarios',
'code' => 'ATTACH_HELP_063000_SUBSECTION_TITLE'));
$this->addParagraph('ATTACH_HELP_063100_TEXT');
$this->startList();
$this->addListElement('ATTACH_HELP_063200_TEXT', null, false);
$this->addLineBreak();
$this->addParagraph('ATTACH_HELP_063300_TEXT');
$this->addFigure( 'permissions-scenario1.png', 'ATTACH_HELP_063400_TEXT','','',
'class="drop-shadow"');
$this->endListElement();
$this->addListElement('ATTACH_HELP_063500_TEXT', null, false);
$this->addLineBreak();
$this->addParagraph('ATTACH_HELP_063600_TEXT');
$this->addFigure( 'permissions-scenario2.png', 'ATTACH_HELP_063700_TEXT','','',
'class="drop-shadow"');
$this->addParagraph('ATTACH_HELP_063800_TEXT');
$this->addParagraph('ATTACH_HELP_063900_TEXT');
$this->endListElement();
$this->endList();
$this->addParagraph('ATTACH_HELP_064000_TEXT');
$this->endSubSection('common-permissions-scenarios');
// Permissions for common scenarios
$this->startSubSection(Array( 'id' => 'other-notes-on-permissions',
'code' => 'ATTACH_HELP_065000_SUBSECTION_TITLE'));
$this->startList();
$this->addListElement('ATTACH_HELP_065100_TEXT');
$this->endList();
$this->endSubSection('other-notes-on-permissions');
$this->endSection(SECT_PERMS);
// ------------------------------------------------------------
// Access Levels Visibility Control
$this->startSection(SECT_ACCESS);
$this->addParagraph('ATTACH_HELP_070100_TEXT');
$this->startList();
$this->addListElement('ATTACH_HELP_070200_TEXT');
$this->addListElement('ATTACH_HELP_070300_TEXT');
$this->endList();
$this->addParagraph('ATTACH_HELP_070400_TEXT');
$this->addParagraph('ATTACH_HELP_070500_TEXT');
$this->addNote( 'ATTACH_HELP_070600_NOTE');
$this->endSection(SECT_ACCESS);
// ------------------------------------------------------------
// Display Filename or URL
$this->startSection(SECT_DISPLY);
$this->addParagraph('ATTACH_HELP_080100_TEXT');
$this->endSection(SECT_DISPLY);
// ------------------------------------------------------------
// Attaching URLs
$this->startSection(SECT_ATTACH);
$this->addParagraph('ATTACH_HELP_090100_TEXT');
$this->startList();
$this->addListElement('ATTACH_HELP_090200_TEXT');
$this->addListElement('ATTACH_HELP_090300_TEXT');
$this->endList();
$this->addParagraph('ATTACH_HELP_090400_TEXT');
$this->endSection(SECT_ATTACH);
// ------------------------------------------------------------
// What Can Files Be Attached To?
$this->startSection(SECT_FILES);
$this->addParagraph('ATTACH_HELP_100100_TEXT',
Array('{ONCONTENTPREPARE}' => $onContentPrepare) );
$this->addWarning( 'ATTACH_HELP_100200_WARNING');
$this->addParagraph('ATTACH_HELP_100300_TEXT');
$this->startList();
$manual_url = 'http://jmcameron.net/attachments/';
$manual_url_text = JText::sprintf('ATTACH_HELP_100400_TEXT', $manual_url);
$this->addListElementHtml("<a class=\"reference external\" href=\"$manual_url\">$manual_url_text</a>");
$this->endList();
$this->addWarning( 'ATTACH_HELP_100500_WARNING');
$this->endSection(SECT_FILES);
// ------------------------------------------------------------
// CSS Styling of Attachment Lists
$this->startSection(SECT_STYLE);
$this->addParagraph('ATTACH_HELP_110100_TEXT');
$this->addParagraph('ATTACH_HELP_110200_TEXT');
$this->addPreBlock("media/com_attachments/css/attachments_list.css\n\n to\n\ntemplates/TEMPLATE/css/com_attachments/");
$this->addParagraph('ATTACH_HELP_110300_TEXT');
$this->endSection(SECT_STYLE);
// ------------------------------------------------------------
// File Type Icons
$this->startSection(SECT_ICONS);
$this->addParagraph('ATTACH_HELP_120100_TEXT');
$this->startList('ol');
$this->addListElement('ATTACH_HELP_120200_TEXT');
$this->addListElement('ATTACH_HELP_120300_TEXT');
$this->addListElement('ATTACH_HELP_120400_TEXT', null, false);
$this->addParagraph('ATTACH_HELP_120500_TEXT', null, 'paragraph');
$this->endListElement();
$this->endList();
$this->endSection(SECT_ICONS);
// ------------------------------------------------------------
// Administrative Utility Commands
$this->startSection(SECT_UTILS);
$this->addParagraph('ATTACH_HELP_130100_TEXT');
$this->startList();
$this->addListElement('ATTACH_HELP_130200_TEXT');
$this->addListElement('ATTACH_HELP_130300_TEXT');
$this->addListElement('ATTACH_HELP_130400_TEXT', null, false);
$this->addParagraph('ATTACH_HELP_130500_TEXT');
$this->startList();
$this->addListElement('ATTACH_HELP_130600_TEXT');
$this->addListElement('ATTACH_HELP_130700_TEXT');
$this->endList();
$this->endListElement();
$this->addListElement('ATTACH_HELP_130800_TEXT');
$this->addListElement('ATTACH_HELP_130900_TEXT');
$this->addListElement('ATTACH_HELP_131000_TEXT');
$this->addListElement('ATTACH_HELP_131100_TEXT');
$this->endList();
$this->addNote( 'ATTACH_HELP_131200_NOTE');
$this->endSection(SECT_UTILS);
// ------------------------------------------------------------
// Warnings
$this->startSection(SECT_WARN);
$this->startList();
$this->addListElement('ATTACH_HELP_140100_TEXT');
$this->addListElement('ATTACH_HELP_140200_TEXT');
$this->addListElement('ATTACH_HELP_140300_TEXT');
$this->addListElement('ATTACH_HELP_140400_TEXT', null, false);
$this->startList();
$this->addListElement('ATTACH_HELP_140500_TEXT');
$this->addListElement('ATTACH_HELP_140600_TEXT');
$this->addListElement('ATTACH_HELP_140700_TEXT',
ARRAY('{DEFACCLEVEL}' => JText::_('ATTACH_DEFAULT_ACCESS_LEVEL')));
$this->addListElement('ATTACH_HELP_140800_TEXT');
$this->addListElement('ATTACH_HELP_140900_TEXT');
$this->addListElement('ATTACH_HELP_141000_TEXT');
$this->addListElement('ATTACH_HELP_141100_TEXT');
$this->endList();
$this->endListElement();
$this->addListElement('ATTACH_HELP_141200_TEXT', null, false);
$this->addPreBlock("php_value upload_max_filesize 32M\nphp_value post_max_size 32M");
$this->addParagraph('ATTACH_HELP_141300_TEXT');
$this->endListElement();
$this->addListElement('ATTACH_HELP_141400_TEXT',
Array('{LOCALHOST}' => '<tt class="docutils literal">localhost</tt>'), false);
$this->addPreBlock("C:\Windows\System32\drivers\etc\hosts");
$this->addParagraph('ATTACH_HELP_141500_TEXT',
Array('{IPV6HOST1}' => '<tt class="docutils literal">::1</tt>',
'{HOSTS}' => '<tt class="docutils literal">hosts</tt>'));
$this->endListElement();
$this->addListElement('ATTACH_HELP_141600_TEXT');
$this->addListElement('ATTACH_HELP_141700_TEXT');
$this->addListElement('ATTACH_HELP_141800_TEXT', null, false);
$this->startList();
$forums_url = 'http://joomlacode.org/gf/project/attachments3/forum/';
$forums_url_text = $this->replace(JText::sprintf('ATTACH_HELP_141900_TEXT', $forums_url),
Array('{FORUMS}' => $forums_url));
$this->addListElementHtml("<a class=\"reference external\" href=\"$forums_url\">$forums_url_text</a>");
$this->endList();
$this->endListElement();
$this->endList();
$this->endSection(SECT_WARN);
// ------------------------------------------------------------
// Upgrading
$this->startSection(SECT_UPGRAD);
$this->addParagraph('ATTACH_HELP_150100_TEXT');
$this->startList();
$this->addListElement('ATTACH_HELP_150200_TEXT');
$this->addListElement('ATTACH_HELP_150300_TEXT');
$this->endList();
$this->endSection(SECT_UPGRAD);
// ------------------------------------------------------------
// Uninstalling
$this->startSection(SECT_UNINST);
$this->startList();
$this->addListElement('ATTACH_HELP_160100_TEXT',
Array('{ATTACH_DIR}' => "attachments",
'{ATTACH_TBL}' => "#_attachments",
'{SECT_UTILS}' => $this->sectionLink(SECT_UTILS),
'{DISABLE_SQL}' => JText::_('ATTACH_DISABLE_MYSQL_UNINSTALLATION'),
));
$this->addListElement('ATTACH_HELP_160200_TEXT');
$this->addListElement('ATTACH_HELP_160300_TEXT', null, false);
$this->addPreBlock(JText::_('ATTACH_HELP_160400_TEXT'));
$this->addParagraph('ATTACH_HELP_160500_TEXT');
$this->endListElement();
$this->endList();
$this->endSection(SECT_UNINST);
// ------------------------------------------------------------
// Migration Attachments from Joomla 1.5 to Joomla 2.5+ or 3.x
$this->startSection(SECT_MIGRAT);
$this->addParagraph('ATTACH_HELP_170100_TEXT');
$this->startList();
$migrate_url = 'http://jmcameron.net/attachments/';
$migrate_url_text = JText::sprintf('ATTACH_HELP_170000_SECTION_TITLE', $migrate_url);
$this->addListElementHtml("<a class=\"reference external\" href=\"$migrate_url\">$migrate_url_text</a>");
$this->endList();
$this->endSection(SECT_MIGRAT);
// ------------------------------------------------------------
// Translations
$this->startSection(SECT_TRANS);
$this->addParagraph('ATTACH_HELP_180100_TEXT');
$this->addParagraph('ATTACH_HELP_180200_TEXT');
$this->startList();
$this->addListElement('ATTACH_HELP_181000_TEXT');
$this->addListElement('ATTACH_HELP_181100_TEXT');
$this->addListElement('ATTACH_HELP_181200_TEXT');
$this->addListElement('ATTACH_HELP_181300_TEXT');
$this->addListElement('ATTACH_HELP_181400_TEXT');
$this->addListElement('ATTACH_HELP_181500_TEXT');
$this->addListElement('ATTACH_HELP_181600_TEXT');
$this->addListElement('ATTACH_HELP_181700_TEXT');
$this->addListElement('ATTACH_HELP_181800_TEXT');
$this->addListElement('ATTACH_HELP_181900_TEXT');
$this->addListElement('ATTACH_HELP_182000_TEXT');
$this->addListElement('ATTACH_HELP_182100_TEXT');
$this->addListElement('ATTACH_HELP_182200_TEXT');
$this->addListElement('ATTACH_HELP_182300_TEXT');
$this->addListElement('ATTACH_HELP_182400_TEXT');
$this->addListElement('ATTACH_HELP_182500_TEXT');
$this->addListElement('ATTACH_HELP_182600_TEXT');
$this->addListElement('ATTACH_HELP_182700_TEXT');
$this->addListElement('ATTACH_HELP_182800_TEXT');
$this->addListElement('ATTACH_HELP_182900_TEXT');
$this->addListElement('ATTACH_HELP_183000_TEXT');
$this->addListElement('ATTACH_HELP_183100_TEXT');
$this->addListElement('ATTACH_HELP_183200_TEXT');
$this->addListElement('ATTACH_HELP_183300_TEXT');
$this->addListElement('ATTACH_HELP_183400_TEXT');
$this->addListElement('ATTACH_HELP_183500_TEXT');
$this->addListElement('ATTACH_HELP_183600_TEXT');
$this->addListElement('ATTACH_HELP_183700_TEXT');
$this->endList();
$this->addParagraph('ATTACH_HELP_185000_TEXT',
Array( '{SECT_CONTCT}' => $this->sectionLink(SECT_CONTCT) ));
$this->endSection(SECT_TRANS);
// ------------------------------------------------------------
// Acknowledgments
$this->startSection(SECT_ACKNOW);
$this->addParagraph('ATTACH_HELP_190100_TEXT');
$this->startList();
$this->addListElement('ATTACH_HELP_190200_TEXT');
$this->addListElement('ATTACH_HELP_191000_TEXT', null, false);
$this->startList();
$this->addListElementLink('http://www.famfamfam.com/lab/icons/silk/',
'ATTACH_HELP_191100_TEXT');
$this->addListElementLink('http://www.zap.org.au/documents/icons/file-icons/sample.html',
'ATTACH_HELP_191200_TEXT');
$this->addListElementLink('http://www.brandspankingnew.net/archive/2006/06/doctype_icons_2.html',
'ATTACH_HELP_191300_TEXT');
$this->addListElementLink('http://eis.bris.ac.uk/~cckhrb/webdev/',
'ATTACH_HELP_191400_TEXT');
$this->addListElementLink('http://sweetie.sublink.ca',
'ATTACH_HELP_191500_TEXT');
$this->endList();
$this->addParagraph('ATTACH_HELP_191600_TEXT');
$this->endListElement();
$this->addListElement('ATTACH_HELP_192000_TEXT');
$this->addListElement('ATTACH_HELP_192100_TEXT');
$this->addListElement('ATTACH_HELP_192200_TEXT');
$this->addListElement('ATTACH_HELP_192300_TEXT');
$this->endList();
$this->endSection(SECT_ACKNOW);
// ------------------------------------------------------------
// Contact
$this->startSection(SECT_CONTCT);
$email_url = 'mailto:jmcameron&#64;jmcameron.net';
$email_url_text = 'jmcameron&#64;jmcameron.net';
$email_link = "<a class=\"reference external\" href=\"$email_url\">$email_url_text</a>";
$this->addParagraph('ATTACH_HELP_200100_TEXT', Array('{LINK}' => $email_link));
$this->endSection(SECT_CONTCT);
?>
<a id="tc_toggle" href="<?php echo $this->toggledURL() ?>" title="<?php echo $tlc ?>"><img src="<?php echo $toggle_img ?>"></a>
</div><!-- end div.main -->
</div><!-- end div.document -->

View File

@ -0,0 +1 @@
<html><body bgcolor="#FFFFFF"></body></html>

View File

@ -0,0 +1,103 @@
<?php
/**
* Attachments component
*
* @package Attachments
* @subpackage Attachments_Component
*
* @author Jonathan M. Cameron <jmcameron@jmcameron.net>
* @copyright Copyright (C) 2007-2018 Jonathan M. Cameron, All Rights Reserved
* @license http://www.gnu.org/licenses/gpl-3.0.html GNU/GPL
* @link http://joomlacode.org/gf/project/attachments/frs/
*/
// Check to ensure this file is included in Joomla!
defined('_JEXEC') or die();
// Define the legacy classes, if necessary
require_once 'helpview.php';
// Load the Attachments defines
require_once JPATH_SITE . '/components/com_attachments/defines.php';
/**
* View for the help page
*
* @package Attachments
* @since 3.1
*/
class AttachmentsViewHelp extends HelpView
{
/**
* Display the view
*
* @param string $tpl A template file to load. [optional]
*
* @return nothing
*/
public function display($tpl = null)
{
$this->logo_img = JHtml::image('com_attachments/attachments_help_logo32.png', '', null, true);
$this->version = AttachmentsDefines::$ATTACHMENTS_VERSION;
$rdate = new JDate(AttachmentsDefines::$ATTACHMENTS_VERSION_DATE);
$this->date = JHtml::_('date', $rdate, JText::_('DATE_FORMAT_LC1'));
parent::display($tpl);
}
/**
* Add the start of the permissions table including the header
*
* @param string $col1_code Language token for column 1 (permission name)
* @param string $col2_code Language token for column 2 (permission note)
* @param string $col3_code Language token for column 3 (permission action)
*
* @return nothing
*/
protected function startPermissionsTable($col1_code, $col2_code, $col3_code)
{
echo "<table id=\"permissions\"class=\"permissions docutils\">\n";
echo "<colgroup>\n";
echo " <col class=\"col_perm_name\"/>\n";
echo " <col class=\"col_perm_note\"/>\n";
echo " <col class=\"col_perm_action\"/>\n";
echo "</colgroup>\n";
echo "<thead>\n";
echo " <tr>\n";
echo " <th class=\"head\">" . JText::_($col1_code) . "</th>\n";
echo " <th class=\"head\">" . JText::_($col2_code) . "</th>\n";
echo " <th class=\"head\">" . JText::_($col3_code) . "</th>\n";
echo " </tr>\n";
echo "</thead>\n";
echo "<tbody>\n";
}
/**
* Add the a row of the permissions table
*
* @param string $col1_code Language token for column 1 (permission name)
* @param string $col2_code Language token for column 2 (permission note)
* @param string $col3_code Language token for column 3 (permission action)
*
* @return nothing
*/
protected function addPermissionsTableRow($col1_code, $col2_code, $col3_code)
{
echo " <tr>\n";
echo " <td>" . JText::_($col1_code) . "</td>\n";
echo " <td>" . JText::_($col2_code) . "</td>\n";
echo " <td>" . JText::_($col3_code) . "</td>\n";
echo " </tr>\n";
}
/**
* Add the end of the permissions table
*
* @return nothing
*/
protected function endPermissionsTable()
{
echo "</table>\n";
}
}

View File

@ -0,0 +1 @@
<html><body bgcolor="#FFFFFF"></body></html>

View File

@ -0,0 +1 @@
<html><body bgcolor="#FFFFFF"></body></html>

View File

@ -0,0 +1,151 @@
<?php
/**
* Attachments component
*
* @package Attachments
* @subpackage Attachments_Component
*
* @copyright Copyright (C) 2007-2018 Jonathan M. Cameron, All Rights Reserved
* @license http://www.gnu.org/licenses/gpl-3.0.html GNU/GPL
* @link http://joomlacode.org/gf/project/attachments/frs/
* @author Jonathan M. Cameron
*/
// Check to ensure this file is included in Joomla!
defined('_JEXEC') or die();
$template = JFactory::getApplication()->getTemplate();
// Load the tooltip behavior.
JHtml::_('behavior.tooltip');
JHtml::_('behavior.formvalidation');
if (version_compare(JVERSION, '3.0', 'ge'))
{
JHtml::_('formbehavior.chosen', 'select');
}
$document = JFactory::getDocument();
$uri = JFactory::getURI();
?>
<script type="text/javascript">
Joomla.submitbutton = function(task)
{
if (document.formvalidator.isValid(document.id('component-form')))
{
Joomla.submitform(task, document.getElementById('component-form'));
}
}
</script>
<?php
if (version_compare(JVERSION, '3.0', 'ge'))
{
?>
<form action="<?php echo JRoute::_('index.php?option=com_config');?>" id="component-form" method="post" name="adminForm" autocomplete="off" class="form-validate form-horizontal">
<div class="row-fluid">
<div class="span10">
<ul class="nav nav-tabs" id="configTabs">
<?php
$fieldSets = $this->form->getFieldsets();
foreach ($fieldSets as $name => $fieldSet) :
$label = empty($fieldSet->label) ? 'COM_CONFIG_'.$name.'_FIELDSET_LABEL' : $fieldSet->label;
?>
<li><a href="#<?php echo $name;?>" data-toggle="tab"><?php echo JText::_($label);?></a></li>
<?php
endforeach;
?>
</ul>
<div class="tab-content">
<?php
$fieldSets = $this->form->getFieldsets();
foreach ($fieldSets as $name => $fieldSet) :
?>
<div class="tab-pane" id="<?php echo $name;?>">
<?php
if (isset($fieldSet->description) && !empty($fieldSet->description)) :
echo '<p class="tab-description">'.JText::_($fieldSet->description).'</p>';
endif;
foreach ($this->form->getFieldset($name) as $field):
?>
<div class="control-group">
<?php if (!$field->hidden && $name != "permissions") : ?>
<div class="control-label">
<?php echo $field->label; ?>
</div>
<?php endif; ?>
<div class="<?php if ($name != "permissions") : ?>controls<?php endif; ?>">
<?php echo $field->input; ?>
</div>
</div>
<?php
endforeach;
?>
</div>
<?php
endforeach;
?>
</div>
</div>
</div>
<div>
<input type="hidden" name="id" value="<?php echo $this->component->id;?>" />
<input type="hidden" name="option" value="com_attachments" />
<input type="hidden" name="component" value="com_attachments" />
<input type="hidden" name="old_secure" value="<?php echo $this->params->get('secure'); ?>" />
<input type="hidden" name="task" value="params.edit" />
<?php echo JHtml::_('form.token'); ?>
</div>
</form>
<script type="text/javascript">
jQuery('#configTabs a:first').tab('show'); // Select first tab
</script>
<?php
}
else
{
?>
<form action="<?php echo JRoute::_('index.php?option=com_config');?>" id="component-form" method="post" name="adminForm" autocomplete="off" class="form-validate">
<?php
echo JHtml::_('tabs.start','config-tabs-'.$this->component->option.'_configuration', array('useCookie'=>1));
$fieldSets = $this->form->getFieldsets();
foreach ($fieldSets as $name => $fieldSet) :
$label = empty($fieldSet->label) ? 'COM_CONFIG_'.$name.'_FIELDSET_LABEL' : $fieldSet->label;
echo JHtml::_('tabs.panel',JText::_($label), 'publishing-details');
if (isset($fieldSet->description) && !empty($fieldSet->description)) :
echo '<p class="tab-description">'.JText::_($fieldSet->description).'</p>';
endif;
?>
<ul class="config-option-list" id="attachments-options">
<?php
foreach ($this->form->getFieldset($name) as $field):
?>
<li>
<?php if (!$field->hidden) : ?>
<?php echo $field->label; ?>
<?php endif; ?>
<?php echo $field->input; ?>
</li>
<?php
endforeach;
?>
</ul>
<div class="clr"></div>
<?php
endforeach;
echo JHtml::_('tabs.end');
?>
<div>
<input type="hidden" name="id" value="<?php echo $this->component->id;?>" />
<input type="hidden" name="option" value="com_attachments" />
<input type="hidden" name="component" value="com_attachments" />
<input type="hidden" name="old_secure" value="<?php echo $this->params->get('secure'); ?>" />
<input type="hidden" name="task" value="params.edit" />
<?php echo JHtml::_('form.token'); ?>
</div>
</form>
<?php
}

View File

@ -0,0 +1 @@
<html><body bgcolor="#FFFFFF"></body></html>

View File

@ -0,0 +1,63 @@
<?php
/**
* Attachments component
*
* @package Attachments
* @subpackage Attachments_Component
*
* @copyright Copyright (C) 2007-2018 Jonathan M. Cameron, All Rights Reserved
* @license http://www.gnu.org/licenses/gpl-3.0.html GNU/GPL
* @link http://joomlacode.org/gf/project/attachments/frs/
* @author Jonathan M. Cameron
*/
// Check to ensure this file is included in Joomla!
defined('_JEXEC') or die();
// Access check.
if (!JFactory::getUser()->authorise('core.admin', 'com_attachments')) {
return JError::raiseError(404, JText::_('JERROR_ALERTNOAUTHOR') . ' (ERR 174)');
}
/** Define the legacy classes, if necessary */
require_once(JPATH_SITE.'/components/com_attachments/legacy/view.php');
/**
* View for editing the component parameters
* (adapted from administrator/components/com_config/views/component/view.php)
*
* @package Attachments
*/
class AttachmentsViewParams extends JViewLegacy
{
/**
* Display the params view
*/
public function display($tpl = null)
{
// Add the style sheets
JHtml::stylesheet('com_attachments/attachments_admin_form.css', Array(), true);
$lang = JFactory::getLanguage();
if ( $lang->isRTL() ) {
JHtml::stylesheet('com_attachments/attachments_admin_form_rtl.css', Array(), true);
}
$this->addToolBar();
parent::display($tpl);
}
/**
* Setting the toolbar
*/
protected function addToolBar()
{
JRequest::setVar('hidemainmenu', true);
JToolBarHelper::title(JText::_('ATTACH_CONFIGURATION'), 'attachments.png');
JToolBarHelper::apply('params.apply');
JToolBarHelper::save('params.save');
JToolBarHelper::cancel('params.cancel', 'JTOOLBAR_CLOSE');
}
}

View File

@ -0,0 +1 @@
<html><body bgcolor="#FFFFFF"></body></html>

View File

@ -0,0 +1,37 @@
<?php
/**
* Attachments component
*
* @package Attachments
* @subpackage Attachments_Component
*
* @copyright Copyright (C) 2007-2018 Jonathan M. Cameron, All Rights Reserved
* @license http://www.gnu.org/licenses/gpl-3.0.html GNU/GPL
* @link http://joomlacode.org/gf/project/attachments/frs/
* @author Jonathan M. Cameron
*/
// Check to ensure this file is included in Joomla!
defined('_JEXEC') or die();
// Load the tooltip behavior.
JHtml::_('behavior.tooltip');
// Hide the vertical scrollbar using javascript
$document = JFactory::getDocument();
$hide_scrollbar = "window.addEvent('domready', function() {
document.documentElement.style.overflow = \"hidden\";
document.body.scroll = \"no\";});";
$document->addScriptDeclaration($hide_scrollbar);
?>
<div class="attachmentsAdmin" id="utilsList">
<h1><?php echo JText::_('ATTACH_ATTACHMENTS_ADMINISTRATIVE_UTILITY_COMMANDS'); ?></h1>
<ul>
<?php foreach ($this->entries as $link_html)
{
echo " <li><h2>$link_html</h2></li>\n";
}
?>
</ul>
</div>

View File

@ -0,0 +1 @@
<html><body bgcolor="#FFFFFF"></body></html>

View File

@ -0,0 +1,44 @@
<?php
/**
* Attachments component
*
* @package Attachments
* @subpackage Attachments_Component
*
* @copyright Copyright (C) 2007-2018 Jonathan M. Cameron, All Rights Reserved
* @license http://www.gnu.org/licenses/gpl-3.0.html GNU/GPL
* @link http://joomlacode.org/gf/project/attachments/frs/
* @author Jonathan M. Cameron
*/
// Check to ensure this file is included in Joomla!
defined('_JEXEC') or die();
/** Define the legacy classes, if necessary */
require_once(JPATH_SITE.'/components/com_attachments/legacy/view.php');
/**
* View for the utils controller
*
* @package Attachments
*/
class AttachmentsViewUtils extends JViewLegacy
{
/**
* Display the view
*
* @param string $tpl A template file to load. [optional]
*
*/
public function display($tpl = null)
{
// Access check.
if (!JFactory::getUser()->authorise('core.admin', 'com_attachments'))
{
return JError::raiseError(404, JText::_('JERROR_ALERTNOAUTHOR') . ' (ERR 171)');
}
parent::display($tpl);
}
}

View File

@ -0,0 +1 @@
<html><body bgcolor="#FFFFFF"></body></html>

View File

@ -0,0 +1,49 @@
<?php
/**
* Attachments component
*
* @package Attachments
* @subpackage Attachments_Component
*
* @copyright Copyright (C) 2007-2018 Jonathan M. Cameron, All Rights Reserved
* @license http://www.gnu.org/licenses/gpl-3.0.html GNU/GPL
* @link http://joomlacode.org/gf/project/attachments/frs/
* @author Jonathan M. Cameron
*/
// Check to ensure this file is included in Joomla!
defined('_JEXEC') or die();
$template = JFactory::getApplication()->getTemplate();
// Load the tooltip behavior.
JHtml::_('behavior.tooltip');
$uri = JFactory::getURI();
$document = JFactory::getDocument();
// Hide the vertical scrollbar using javascript
$hide_scrollbar = "window.addEvent('domready', function() {
document.documentElement.style.overflow = \"hidden\";
document.body.scroll = \"no\";});";
$document->addScriptDeclaration($hide_scrollbar);
?>
<div class="attachmentsWarning">
<h1><?php echo $this->warning_title; ?></h1>
<h2 id="warning_msg"><?php echo $this->warning_question ?></h2>
<form action="<?php echo $this->action_url; ?>" name="warning_form" method="post">
<div class="form_buttons" align="center">
<span class="left">&nbsp;</span>
<input type="submit" name="submit" value="<?php echo $this->action_button_label ?>" />
<span class="right">
<input type="button" name="cancel" value="<?php echo JText::_('ATTACH_CANCEL'); ?>"
onClick="window.parent.SqueezeBox.close();" />
</span>
</div>
<input type="hidden" name="option" value="<?php echo $this->option;?>" />
<input type="hidden" name="from" value="<?php echo $this->from;?>" />
<?php echo JHtml::_( 'form.token' ); ?>
</form>
</div>

View File

@ -0,0 +1 @@
<html><body bgcolor="#FFFFFF"></body></html>

View File

@ -0,0 +1,43 @@
<?php
/**
* Attachments component
*
* @package Attachments
* @subpackage Attachments_Component
*
* @copyright Copyright (C) 2007-2018 Jonathan M. Cameron, All Rights Reserved
* @license http://www.gnu.org/licenses/gpl-3.0.html GNU/GPL
* @link http://joomlacode.org/gf/project/attachments/frs/
* @author Jonathan M. Cameron
*/
// Check to ensure this file is included in Joomla!
defined('_JEXEC') or die();
/** Define the legacy classes, if necessary */
require_once(JPATH_SITE.'/components/com_attachments/legacy/view.php');
/**
* View for the special controller
* (adapted from administrator/components/com_config/views/component/view.php)
*
* @package Attachments
*/
class AttachmentsViewWarning extends JViewLegacy
{
/**
* Display the view
*/
public function display($tpl = null)
{
// Add the style sheets
JHtml::stylesheet('com_attachments/attachments_admin_form.css', Array(), true);
$lang = JFactory::getLanguage();
if ( $lang->isRTL() ) {
JHtml::stylesheet('com_attachments/attachments_admin_form_rtl.css', Array(), true);
}
parent::display($tpl);
}
}