29
0
mirror of https://github.com/joomla/joomla-cms.git synced 2024-06-25 23:02:55 +00:00

Merge back from dextercowley branch with com_contact, com_menus, and front-end layout changes.

git-svn-id: http://joomlacode.org/svn/joomla/development/trunk@12812 6f6e1ebd-4c2b-0410-823f-f34bde69bce9
This commit is contained in:
Mark Dexter 2009-09-22 03:58:25 +00:00
parent 71e54249dd
commit 1816197538
104 changed files with 5091 additions and 2370 deletions

View File

@ -1,471 +0,0 @@
<?php
/**
* @version $Id$
* @package Joomla.Administrator
* @subpackage Contact
* @copyright Copyright (C) 2005 - 2009 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
// no direct access
defined('_JEXEC') or die;
/**
* @package Joomla.Administrator
* @subpackage Contact
*/
class HTML_contact
{
function showContacts(&$rows, &$pageNav, $option, &$lists)
{
$user = &JFactory::getUser();
//Ordering allowed ?
$ordering = ($lists['order'] == 'cd.ordering');
JHtml::_('behavior.tooltip');
?>
<form action="index.php?option=com_contact" method="post" name="adminForm">
<table>
<tr>
<td align="left" width="100%">
<?php echo JText::_('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::_('Go'); ?></button>
<button onclick="document.getElementById('search').value='';this.form.getElementById('filter_catid').value='0';this.form.getElementById('filter_state').value='';this.form.submit();"><?php echo JText::_('Reset'); ?></button>
</td>
<td nowrap="nowrap">
<?php
echo $lists['catid'];
echo $lists['state'];
?>
</td>
</tr>
</table>
<table class="adminlist">
<thead>
<tr>
<th width="10">
<?php echo JText::_('Num'); ?>
</th>
<th width="10" class="title">
<input type="checkbox" name="toggle" value="" onclick="checkAll(<?php echo count($rows); ?>);" />
</th>
<th class="title">
<?php echo JHtml::_('grid.sort', 'Name', 'cd.name', @$lists['order_Dir'], @$lists['order']); ?>
</th>
<th width="5%" class="title" nowrap="nowrap">
<?php echo JHtml::_('grid.sort', 'Published', 'cd.published', @$lists['order_Dir'], @$lists['order']); ?>
</th>
<th nowrap="nowrap" width="8%">
<?php echo JHtml::_('grid.sort', 'Order by', 'cd.ordering', @$lists['order_Dir'], @$lists['order']); ?>
<?php if ($ordering) echo JHtml::_('grid.order', $rows); ?>
</th>
<th width="8%" nowrap="nowrap">
<?php echo JHtml::_('grid.sort', 'Access', 'cd.access', @$lists['order_Dir'], @$lists['order']); ?>
</th>
<th width="10%" class="title">
<?php echo JHtml::_('grid.sort', 'Category', 'category', @$lists['order_Dir'], @$lists['order']); ?>
</th>
<th class="title" nowrap="nowrap" width="10%">
<?php echo JHtml::_('grid.sort', 'Linked to User', 'user', @$lists['order_Dir'], @$lists['order']); ?>
</th>
<th width="1%" nowrap="nowrap">
<?php echo JHtml::_('grid.sort', 'ID', 'cd.id', @$lists['order_Dir'], @$lists['order']); ?>
</th>
</tr>
</thead>
<tfoot>
<tr>
<td colspan="11">
<?php echo $pageNav->getListFooter(); ?>
</td>
</tr>
</tfoot>
<tbody>
<?php
$k = 0;
for ($i=0, $n=count($rows); $i < $n; $i++) {
$row = $rows[$i];
$link = JRoute::_('index.php?option=com_contact&task=edit&cid[]='. $row->id);
$checked = JHtml::_('grid.checkedout', $row, $i);
$published = JHtml::_('grid.published', $row, $i);
$row->cat_link = JRoute::_('index.php?option=com_categories&extension=com_contact&task=edit&type=other&cid[]='. $row->catid);
$row->user_link = JRoute::_('index.php?option=com_users&task=editA&cid[]='. $row->user_id);
?>
<tr class="<?php echo "row$k"; ?>">
<td>
<?php echo $pageNav->getRowOffset($i); ?>
</td>
<td>
<?php echo $checked; ?>
</td>
<td>
<?php
if (JTable::isCheckedOut($user->get ('id'), $row->checked_out)) :
echo $row->name;
else :
?>
<span class="editlinktip hasTip" title="<?php echo JText::_('Edit Contact');?>::<?php echo $row->name; ?>">
<a href="<?php echo $link; ?>">
<?php echo $row->name; ?></a> </span>
<?php
endif;
?>
</td>
<td align="center">
<?php echo $published;?>
</td>
<td class="order">
<span><?php echo $pageNav->orderUpIcon($i, ($row->catid == @$rows[$i-1]->catid), 'orderup', 'Move Up', $ordering); ?></span>
<span><?php echo $pageNav->orderDownIcon($i, $n, ($row->catid == @$rows[$i+1]->catid), 'orderdown', 'Move Down', $ordering); ?></span>
<?php $disabled = $ordering ? '' : 'disabled="disabled"'; ?>
<input type="text" name="order[]" size="5" value="<?php echo $row->ordering;?>" <?php echo $disabled ?> class="text_area" style="text-align: center" />
</td>
<td align="center">
<?php echo $row->groupname;?>
</td>
<td>
<a href="<?php echo $row->cat_link; ?>" title="<?php echo JText::_('Edit Category'); ?>">
<?php echo $row->category; ?></a>
</td>
<td>
<a href="<?php echo $row->user_link; ?>" title="<?php echo JText::_('Edit User'); ?>">
<?php echo $row->user; ?></a>
</td>
<td align="center">
<?php echo $row->id; ?>
</td>
</tr>
<?php
$k = 1 - $k;
}
?>
</tbody>
</table>
<input type="hidden" name="option" value="<?php echo $option; ?>" />
<input type="hidden" name="task" value="" />
<input type="hidden" name="boxchecked" value="0" />
<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>
<?php
}
function editContact(&$row, &$lists, $option, &$params) {
JRequest::setVar('hidemainmenu', 1);
if ($row->image == '') {
$row->image = 'blank.png';
}
JHtml::_('behavior.tooltip');
jimport('joomla.html.pane');
// TODO: allowAllClose should default true in J!1.6, so remove the array when it does.
$pane = &JPane::getInstance('sliders', array('allowAllClose' => true));
JFilterOutput::objectHTMLSafe($row, ENT_QUOTES, 'misc');
$cparams = JComponentHelper::getParams ('com_media');
?>
<script language="javascript" type="text/javascript">
<!--
function submitbutton(pressbutton) {
var form = document.adminForm;
if (pressbutton == 'cancel') {
submitform(pressbutton);
return;
}
// do field validation
if (form.name.value == "") {
alert("<?php echo JText::_('You must provide a name.', true); ?>");
} else if (form.catid.value == 0) {
alert("<?php echo JText::_('Please select a Category.', true); ?>");
} else {
submitform(pressbutton);
}
}
//-->
</script>
<form action="index.php" method="post" name="adminForm">
<div class="col width-60">
<fieldset class="adminform">
<legend><?php echo JText::_('Details'); ?></legend>
<table class="admintable">
<tr>
<td class="key">
<label for="name">
<?php echo JText::_('Name'); ?>:
</label>
</td>
<td >
<input class="inputbox" type="text" name="name" id="name" size="60" maxlength="255" value="<?php echo $row->name; ?>" />
</td>
</tr>
<tr>
<td class="key">
<label for="name">
<?php echo JText::_('Alias'); ?>:
</label>
</td>
<td >
<input class="inputbox" type="text" name="alias" id="alias" size="60" maxlength="255" value="<?php echo $row->alias; ?>" />
</td>
</tr>
<tr>
<td class="key">
<?php echo JText::_('Published'); ?>:
</td>
<td>
<?php echo $lists['published']; ?>
</td>
</tr>
<tr>
<td class="key">
<label for="catid">
<?php echo JText::_('Category'); ?>:
</label>
</td>
<td>
<?php echo $lists['catid'];?>
</td>
</tr>
<tr>
<td class="key">
<label for="user_id">
<?php echo JText::_('Linked to User'); ?>:
</label>
</td>
<td >
<?php echo $lists['user_id'];?>
</td>
</tr>
<tr>
<td valign="top" class="key">
<label for="ordering">
<?php echo JText::_('Ordering'); ?>:
</label>
</td>
<td>
<?php echo $lists['ordering']; ?>
</td>
</tr>
<tr>
<td valign="top" class="key">
<label for="access">
<?php echo JText::_('Access'); ?>:
</label>
</td>
<td>
<?php echo $lists['access']; ?>
</td>
</tr>
<?php
if ($row->id) {
?>
<tr>
<td class="key">
<label>
<?php echo JText::_('ID'); ?>:
</label>
</td>
<td>
<strong><?php echo $row->id;?></strong>
</td>
</tr>
<?php
}
?>
</table>
</fieldset>
<fieldset class="adminform">
<legend><?php echo JText::_('Information'); ?></legend>
<table class="admintable">
<tr>
<td class="key">
<label for="con_position">
<?php echo JText::_('Contact\'s Position'); ?>:
</label>
</td>
<td>
<input class="inputbox" type="text" name="con_position" id="con_position" size="60" maxlength="255" value="<?php echo $row->con_position; ?>" />
</td>
</tr>
<tr>
<td class="key">
<label for="email_to">
<?php echo JText::_('E-mail'); ?>:
</label>
</td>
<td>
<input class="inputbox" type="text" name="email_to" id="email_to" size="60" maxlength="255" value="<?php echo $row->email_to; ?>" />
</td>
</tr>
<tr>
<td class="key" valign="top">
<label for="address">
<?php echo JText::_('Street Address'); ?>:
</label>
</td>
<td>
<textarea name="address" id="address" rows="3" cols="45" class="inputbox"><?php echo $row->address; ?></textarea>
</td>
</tr>
<tr>
<td class="key">
<label for="suburb">
<?php echo JText::_('Town/Suburb'); ?>:
</label>
</td>
<td>
<input class="inputbox" type="text" name="suburb" id="suburb" size="60" maxlength="100" value="<?php echo $row->suburb;?>" />
</td>
</tr>
<tr>
<td class="key">
<label for="state">
<?php echo JText::_('State/County'); ?>:
</label>
</td>
<td>
<input class="inputbox" type="text" name="state" id="state" size="60" maxlength="100" value="<?php echo $row->state;?>" />
</td>
</tr>
<tr>
<td class="key">
<label for="postcode">
<?php echo JText::_('Postal Code/ZIP'); ?>:
</label>
</td>
<td>
<input class="inputbox" type="text" name="postcode" id="postcode" size="60" maxlength="100" value="<?php echo $row->postcode; ?>" />
</td>
</tr>
<tr>
<td class="key">
<label for="country">
<?php echo JText::_('Country'); ?>:
</label>
</td>
<td>
<input class="inputbox" type="text" name="country" id="country" size="60" maxlength="100" value="<?php echo $row->country;?>" />
</td>
</tr>
<tr>
<td class="key" valign="top">
<label for="telephone">
<?php echo JText::_('Telephone'); ?>:
</label>
</td>
<td>
<input class="inputbox" type="text" name="telephone" id="telephone" size="60" maxlength="255" value="<?php echo $row->telephone; ?>" />
</td>
</tr>
<tr>
<td class="key" valign="top">
<label for="mobile">
<?php echo JText::_('Mobile'); ?>:
</label>
</td>
<td>
<input class="inputbox" type="text" name="mobile" id="mobile" size="60" maxlength="255" value="<?php echo $row->mobile; ?>" />
</td>
</tr>
<tr>
<td class="key" valign="top">
<label for="fax">
<?php echo JText::_('Fax'); ?>:
</label>
</td>
<td>
<input class="inputbox" type="text" name="fax" id="fax" size="60" maxlength="255" value="<?php echo $row->fax; ?>" />
</td>
</tr>
<tr>
<td class="key">
<label for="webpage">
<?php echo JText::_('Webpage'); ?>:
</label>
</td>
<td>
<input class="inputbox" type="text" name="webpage" id="webpage" size="60" maxlength="255" value="<?php echo $row->webpage; ?>" />
</td>
</tr>
<tr>
<td class="key" valign="top">
<label for="misc">
<?php echo JText::_('Miscellaneous Info'); ?>:
</label>
</td>
<td>
<textarea name="misc" id="misc" rows="5" cols="45" class="inputbox"><?php echo $row->misc; ?></textarea>
</td>
</tr>
<tr>
<td class="key">
<label for="image">
<?php echo JText::_('Image'); ?>:
</label>
</td>
<td >
<?php echo $lists['image']; ?>
</td>
</tr>
<tr>
<td colspan="2">
<script language="javascript" type="text/javascript">
if (document.forms.adminForm.image.options.value!=''){
jsimg='../<?php echo $cparams->get('image_path'); ?>/' + getSelectedValue('adminForm', 'image');
} else {
jsimg='../images/system/blank.png';
}
document.write('<img src=' + jsimg + ' name="imagelib" width="100" height="100" border="2" alt="<?php echo JText::_('Preview'); ?>" />');
</script>
</td>
</tr>
</table>
</fieldset>
</div>
<div class="col width-40">
<fieldset class="adminform">
<legend><?php echo JText::_('Parameters'); ?></legend>
<?php
echo $pane->startPane("menu-pane");
echo $pane->startPanel(JText :: _('Contact Parameters'), "param-page");
echo $params->render();
echo $pane->endPanel();
echo $pane->startPanel(JText :: _('Advanced Parameters'), "param-page");
echo $params->render('params', 'advanced');
echo $pane->endPanel();
echo $pane->startPanel(JText :: _('E-mail Parameters'), "param-page");
echo $params->render('params', 'email');
echo $pane->endPanel();
echo $pane->endPane();
?></fieldset>
</div>
<div class="clr"></div>
<input type="hidden" name="option" value="<?php echo $option; ?>" />
<input type="hidden" name="id" value="<?php echo $row->id; ?>" />
<input type="hidden" name="cid[]" value="<?php echo $row->id; ?>" />
<input type="hidden" name="task" value="" />
<?php echo JHtml::_('form.token'); ?>
</form>
<?php
}
}

View File

@ -1,493 +0,0 @@
<?php
/**
* @version $Id$
* @package Joomla.Administrator
* @subpackage Contact
* @copyright Copyright (C) 2005 - 2009 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
// no direct access
defined('_JEXEC') or die;
/*
* Make sure the user is authorized to view this page
*/
$user = & JFactory::getUser();
$app = &JFactory::getApplication();
if (!$user->authorize('com_contact.manage')) {
$app->redirect('index.php', JText::_('ALERTNOTAUTH'));
}
require_once(JApplicationHelper::getPath('admin_html'));
// Set the table directory
JTable::addIncludePath(JPATH_ADMINISTRATOR.DS.'components'.DS.'com_contact'.DS.'tables');
$task = JRequest::getCmd('task');
$id = JRequest::getVar('id', 0, 'get', 'int');
$cid = JRequest::getVar('cid', array(0), 'post', 'array');
JArrayHelper::toInteger($cid, array(0));
switch ($task)
{
case 'add' :
editContact(false);
break;
case 'edit':
editContact(true);
break;
case 'apply':
case 'save':
case 'save2new':
case 'save2copy':
saveContact($task);
break;
case 'remove':
removeContacts($cid);
break;
case 'publish':
changeContact($cid, 1);
break;
case 'unpublish':
changeContact($cid, 0);
break;
case 'orderup':
orderContacts($cid[0], -1);
break;
case 'orderdown':
orderContacts($cid[0], 1);
break;
case 'accesspublic':
changeAccess($cid[0], 0);
break;
case 'accessregistered':
changeAccess($cid[0], 1);
break;
case 'accessspecial':
changeAccess($cid[0], 2);
break;
case 'saveorder':
saveOrder($cid);
break;
case 'cancel':
cancelContact();
break;
default:
showContacts($option);
break;
}
/**
* List the records
* @param string The current GET/POST option
*/
function showContacts($option)
{
$app = &JFactory::getApplication();
$db = &JFactory::getDbo();
$filter_order = $app->getUserStateFromRequest($option.'filter_order', 'filter_order', 'cd.ordering', 'cmd');
$filter_order_Dir = $app->getUserStateFromRequest($option.'filter_order_Dir', 'filter_order_Dir', '', 'word');
$filter_state = $app->getUserStateFromRequest($option.'filter_state', 'filter_state', '', 'word');
$filter_catid = $app->getUserStateFromRequest($option.'filter_catid', 'filter_catid', 0, 'int');
$search = $app->getUserStateFromRequest($option.'search', 'search', '', 'string');
$search = JString::strtolower($search);
$limit = $app->getUserStateFromRequest('global.list.limit', 'limit', $app->getCfg('list_limit'), 'int');
$limitstart = $app->getUserStateFromRequest($option.'.limitstart', 'limitstart', 0, 'int');
$where = array();
if ($search) {
$where[] = 'cd.name LIKE '.$db->Quote('%'.$db->getEscaped($search, true).'%', false);
}
if ($filter_catid) {
$where[] = 'cd.catid = '.(int) $filter_catid;
}
if ($filter_state) {
if ($filter_state == 'P') {
$where[] = 'cd.published = 1';
} else if ($filter_state == 'U') {
$where[] = 'cd.published = 0';
}
}
$where = (count($where) ? ' WHERE ' . implode(' AND ', $where) : '');
if ($filter_order == 'cd.ordering'){
$orderby = ' ORDER BY category, cd.ordering';
} else {
$orderby = ' ORDER BY '. $filter_order .' '. $filter_order_Dir .', category, cd.ordering';
}
// get the total number of records
$query = 'SELECT COUNT(*)'
. ' FROM #__contact_details AS cd'
. $where
;
$db->setQuery($query);
$total = $db->loadResult();
jimport('joomla.html.pagination');
$pageNav = new JPagination($total, $limitstart, $limit);
// get the subset (based on limits) of required records
$query = 'SELECT cd.*, ag.title AS groupname, cc.title AS category, u.name AS user, v.name as editor'
. ' FROM #__contact_details AS cd'
. ' LEFT JOIN #__categories AS cc ON cc.id = cd.catid'
. ' LEFT JOIN #__users AS u ON u.id = cd.user_id'
. ' LEFT JOIN #__users AS v ON v.id = cd.checked_out'
. ' LEFT JOIN #__access_assetgroups AS ag ON ag.id = cd.access'
. $where
. $orderby
;
$db->setQuery($query, $pageNav->limitstart, $pageNav->limit);
$rows = $db->loadObjectList();
// build list of categories
$javascript = 'onchange="document.adminForm.submit();"';
$lists['catid'] = JHtml::_('list.category', 'filter_catid', 'com_contact', 'com_contact.view', NULL, intval($filter_catid), 'inputbox', $javascript);
// state filter
$lists['state'] = JHtml::_('grid.state', $filter_state);
// table ordering
$lists['order_Dir'] = $filter_order_Dir;
$lists['order'] = $filter_order;
// search filter
$lists['search']= $search;
HTML_contact::showcontacts($rows, $pageNav, $option, $lists);
}
/**
* Creates a new or edits and existing user record
* @param int The id of the record, 0 if a new entry
* @param string The current GET/POST option
*/
function editContact($edit)
{
$db = &JFactory::getDbo();
$user = &JFactory::getUser();
$cid = JRequest::getVar('cid', array(0), '', 'array');
$option = JRequest::getCmd('option');
JArrayHelper::toInteger($cid, array(0));
$row = &JTable::getInstance('contact', 'Table');
// load the row from the db table
if ($edit)
$row->load($cid[0]);
if ($edit) {
// do stuff for existing records
$row->checkout($user->get('id'));
} else {
// do stuff for new records
$row->imagepos = 'top';
$row->ordering = 0;
$row->published = 1;
}
$lists = array();
// build the html select list for ordering
$query = 'SELECT ordering AS value, name AS text'
. ' FROM #__contact_details'
. ' WHERE published >= 0'
. ' AND catid = '.(int) $row->catid
. ' ORDER BY ordering'
;
if ($edit)
$lists['ordering'] = JHtml::_('list.specificordering', $row, $cid[0], $query);
else
$lists['ordering'] = JHtml::_('list.specificordering', $row, '', $query);
// build list of users
$lists['user_id'] = JHtml::_('list.users', 'user_id', $row->user_id, 1, NULL, 'name', 0);
// build list of categories
$lists['catid'] = JHtml::_('list.category', 'catid', 'com_contact', 'com_contact.view', NULL, intval($row->catid));
// build the html select list for images
$lists['image'] = JHtml::_('list.images', 'image', $row->image);
// build the html select list for the group access
$lists['access'] = JHtml::_('access.assetgroups', 'access', $row->access);
// build the html radio buttons for published
$lists['published'] = JHtml::_('select.booleanlist', 'published', '', $row->published);
// build the html radio buttons for default
$lists['default_con'] = JHtml::_('select.booleanlist', 'default_con', '', $row->default_con);
// get params definitions
$file = JPATH_ADMINISTRATOR .'/components/com_contact/contact_items.xml';
$params = new JParameter($row->params, $file, 'component');
HTML_contact::editcontact($row, $lists, $option, $params);
}
/**
* Saves the record from an edit form submit
* @param string The current GET/POST option
*/
function saveContact($task)
{
// Check for request forgeries
JRequest::checkToken() or jexit(JText::_('JInvalid_Token'));
// Initialize variables
$app = &JFactory::getApplication();
$db = &JFactory::getDbo();
$row = &JTable::getInstance('contact', 'Table');
$post = JRequest::get('post');
$post['misc'] = JRequest::getVar('misc', '', 'POST', 'string', JREQUEST_ALLOWHTML);
if (!$row->bind($post)) {
JError::raiseError(500, $row->getError());
}
// save params
$params = JRequest::getVar('params', array(), 'post', 'array');
if (is_array($params)) {
$txt = array();
foreach ($params as $k=>$v) {
$txt[] = "$k=$v";
}
$row->params = implode("\n", $txt);
}
// save to a copy, reset the primary key
if ($task == 'save2copy') {
$row->id = 0;
}
// pre-save checks
if (!$row->check()) {
JError::raiseError(500, $row->getError());
}
// if new item, order last in appropriate group
if (!$row->id) {
$where = "catid = " . (int) $row->catid;
$row->ordering = $row->getNextOrder($where);
}
// save the changes
if (!$row->store()) {
JError::raiseError(500, $row->getError());
}
$row->checkin();
if ($row->default_con) {
$query = 'UPDATE #__contact_details'
. ' SET default_con = 0'
. ' WHERE id <> '. (int) $row->id
. ' AND default_con = 1'
;
$db->setQuery($query);
$db->query();
}
switch ($task)
{
case 'apply':
case 'save2copy':
$msg = JText::sprintf('Changes to X saved', JText::_('Contact'));
$link = 'index.php?option=com_contact&task=edit&cid[]='. $row->id .'';
break;
case 'save2new':
$msg = JText::sprintf('Changes to X saved', JText::_('Contact'));
$link = 'index.php?option=com_contact&task=edit';
break;
case 'save':
default:
$msg = JText::_('Contact saved');
$link = 'index.php?option=com_contact';
break;
}
$app->redirect($link, $msg);
}
/**
* Removes records
* @param array An array of id keys to remove
* @param string The current GET/POST option
*/
function removeContacts(&$cid)
{
// Check for request forgeries
JRequest::checkToken() or jexit(JText::_('JInvalid_Token'));
// Initialize variables
$app = &JFactory::getApplication();
$db = &JFactory::getDbo();
JArrayHelper::toInteger($cid);
if (count($cid)) {
$cids = implode(',', $cid);
$query = 'DELETE FROM #__contact_details'
. ' WHERE id IN ('. $cids .')'
;
$db->setQuery($query);
if (!$db->query()) {
echo "<script> alert('".$db->getErrorMsg(true)."'); window.history.go(-1); </script>\n";
}
}
$app->redirect("index.php?option=com_contact");
}
/**
* Changes the state of one or more content pages
* @param array An array of unique category id numbers
* @param integer 0 if unpublishing, 1 if publishing
* @param string The current option
*/
function changeContact($cid=null, $state=0)
{
// Check for request forgeries
JRequest::checkToken() or jexit(JText::_('JInvalid_Token'));
// Initialize variables
$app = &JFactory::getApplication();
$db = &JFactory::getDbo();
$user = &JFactory::getUser();
JArrayHelper::toInteger($cid);
if (count($cid) < 1) {
$action = $state ? 'publish' : 'unpublish';
JError::raiseError(500, JText::_('Select an item to' .$action, true));
}
$cids = implode(',', $cid);
$query = 'UPDATE #__contact_details'
. ' SET published = ' . (int) $state
. ' WHERE id IN ('. $cids .')'
. ' AND (checked_out = 0 OR (checked_out = '. (int) $user->get('id') .'))'
;
$db->setQuery($query);
if (!$db->query()) {
JError::raiseError(500, $db->getErrorMsg());
}
if (count($cid) == 1) {
$row = &JTable::getInstance('contact', 'Table');
$row->checkin(intval($cid[0]));
}
$app->redirect('index.php?option=com_contact');
}
/** JJC
* Moves the order of a record
* @param integer The increment to reorder by
*/
function orderContacts($uid, $inc)
{
// Check for request forgeries
JRequest::checkToken() or jexit(JText::_('JInvalid_Token'));
// Initialize variables
$app = &JFactory::getApplication();
$db = &JFactory::getDbo();
$row = &JTable::getInstance('contact', 'Table');
$row->load($uid);
$row->move($inc, 'catid = '. (int) $row->catid .' AND published != 0');
$app->redirect('index.php?option=com_contact');
}
/** PT
* Cancels editing and checks in the record
*/
function cancelContact()
{
// Check for request forgeries
JRequest::checkToken() or jexit(JText::_('JInvalid_Token'));
// Initialize variables
$app = &JFactory::getApplication();
$db = &JFactory::getDbo();
$row = &JTable::getInstance('contact', 'Table');
$row->bind(JRequest::get('post'));
$row->checkin();
$app->redirect('index.php?option=com_contact');
}
/**
* changes the access level of a record
* @param integer The increment to reorder by
*/
function changeAccess($id, $access)
{
// Check for request forgeries
JRequest::checkToken() or jexit(JText::_('JInvalid_Token'));
// Initialize variables
$app = &JFactory::getApplication();
$db = &JFactory::getDbo();
$row = &JTable::getInstance('contact', 'Table');
$row->load($id);
$row->access = $access;
if (!$row->check()) {
return $row->getError();
}
if (!$row->store()) {
return $row->getError();
}
$app->redirect('index.php?option=com_contact');
}
function saveOrder(&$cid)
{
// Check for request forgeries
JRequest::checkToken() or jexit(JText::_('JInvalid_Token'));
// Initialize variables
$app = &JFactory::getApplication();
$db = &JFactory::getDbo();
$total = count($cid);
$order = JRequest::getVar('order', array(0), 'post', 'array');
JArrayHelper::toInteger($order, array(0));
$row = &JTable::getInstance('contact', 'Table');
$groupings = array();
// update ordering values
for ($i=0; $i < $total; $i++) {
$row->load((int) $cid[$i]);
// track categories
$groupings[] = $row->catid;
if ($row->ordering != $order[$i]) {
$row->ordering = $order[$i];
if (!$row->store()) {
JError::raiseError(500, $db->getErrorMsg());
}
}
}
// execute updateOrder for each parent group
$groupings = array_unique($groupings);
foreach ($groupings as $group){
$row->reorder('catid = '.(int) $group);
}
$msg = 'New ordering saved';
$app->redirect('index.php?option=com_contact', $msg);
}

View File

@ -1,107 +1,232 @@
<?xml version="1.0" encoding="utf-8"?>
<config>
<fields>
<fields group="contact" array="true"
label="Contact_Config_Individual_Contact_Display" >
<field name="show_name" type="radio" default="1" label="Contact_Params_Name_Label" description="Contact_Params_Name_Desc">
<option value="0">Jcommon_Hide</option>
<option value="1">Jcommon_Show</option>
</field>
<field name="show_position" type="radio" default="1" label="Contact_Params_Contact_Position_Label" description="Contact_Params_Name_Desc">
<option value="0">Jcommon_Hide</option>
<option value="1">Jcommon_Show</option>
</field>
<field name="show_email" type="radio" default="0" label="Contact_Params_Contact_Position_E-mail_Label" description="Contact_Params_Name_Desc">
<option value="0">Jcommon_Hide</option>
<option value="1">Jcommon_Show</option>
</field>
<field name="show_street_address" type="radio" default="1" label="Contact_Params_Street_Address_Label" description="Contact_Params_Name_Desc">
<option value="0">Jcommon_Hide</option>
<option value="1">Jcommon_Show</option>
</field>
<field name="show_suburb" type="radio" default="1" label="Contact_Params_Town/Suburb_Label" description="Contact_Params_Name_Desc">
<option value="0">Jcommon_Hide</option>
<option value="1">Jcommon_Show</option>
</field>
<field name="show_state" type="radio" default="1" label="Contact_Params_State/County_Label" description="Contact_Params_Name_Desc">
<option value="0">Jcommon_Hide</option>
<option value="1">Jcommon_Show</option>
</field>
<field name="show_postcode" type="radio" default="1" label="Contact_Params_Post/Zip_Code_Label" description="Contact_Params_Name_Desc">
<option value="0">Jcommon_Hide</option>
<option value="1">Jcommon_Show</option>
</field>
<field name="show_country" type="radio" default="1" label="Contact_Params_Country_Label" description="Contact_Params_Name_Desc">
<option value="0">Jcommon_Hide</option>
<option value="1">Jcommon_Show</option>
</field>
<field name="show_telephone" type="radio" default="1" label="Contact_Params_Telephone_Label" description="Contact_Params_Name_Desc">
<option value="0">Jcommon_Hide</option>
<option value="1">Jcommon_Show</option>
</field>
<field name="show_mobile" type="radio" default="1" label="Contact_Params_Mobile_Label" description="Contact_Params_Name_Desc">
<option value="0">Jcommon_Hide</option>
<option value="1">Jcommon_Show</option>
</field>
<field name="show_fax" type="radio" default="1" label="Contact_Params_Fax_Label" description="Contact_Params_Name_Desc">
<option value="0">Jcommon_Hide</option>
<option value="1">Jcommon_Show</option>
</field>
<field name="show_webpage" type="radio" default="1" label="Contact_Params_Webpage_Label" description="Contact_Params_Name_Desc">
<option value="0">Jcommon_Hide</option>
<option value="1">Jcommon_Show</option>
</field>
<field name="show_misc" type="radio" default="1" label="Contact_Params_Misc Info_Label" description="Contact_Params_Name_Desc">
<option value="0">Jcommon_Hide</option>
<option value="1">Jcommon_Show</option>
</field>
<field name="show_image" type="radio" default="1" label="Contact_Params_Image_Label" description="Contact_Params_Name_Desc">
<option value="0">Jcommon_Hide</option>
<option value="1">Jcommon_Show</option>
</field>
<field name="show_links" type="radio" default="1" label="Contact_Params_Image_Label" description="Contact_Params_Name_Desc">
<option value="0">Jcommon_Hide</option>
<option value="1">Jcommon_Show</option>
</field>
<field name="allow_vcard" type="radio" default="0" label="Contact_Config_Allow_vCard_Label" description="Contact_Config_Allow_vCard_Desc">
<option value="0">Jcommon_Hide</option>
<option value="1">Jcommon_Show</option>
</field>
<field
id="show_links"
name="show_links"
label="Contact_Show_Links_Label"
description="Contact_Show_Links_Desc"
type="radio"
default="1">
<option value="0">Jcommon_Hide</option>
<option value="1">Jcommon_Show</option>
<option value="1">Jcommon_Use_Global</option>
</field>
<field
id="linka_name"
name="linka_name"
type="text"
label="Contact_LInka_Name_Label"
description="Contact_Linka_Name_Desc"
class="inputbox"
size="30"
default="Contact_Default_Link_Name"/>
<field
id="linkb_name"
name="linkb_name"
type="text"
label="Contact_LInkb_Name_Label"
description="Contact_Linkb_Name_Desc"
class="inputbox"
size="30"
default="Contact_Default_Link_Name"/>
<field
id="linkc_name"
name="linkc_name"
type="text"
label="Contact_LInkc_Name_Label"
description="Contact_Linkc_Name_Desc"
class="inputbox"
size="30"
default="Contact_Default_Link_Name"/>
<field
id="linkd_name"
name="linkd_name"
type="text"
label="Contact_LInkd_Name_Label"
description="Contact_Linkd_Name_Desc"
class="inputbox"
size="30"
default="Contact_Default_Link_Name"/>
<field
id="linke_name"
name="linke_name"
type="text"
label="Contact_LInke_Name_Label"
description="Contact_Linke_Name_Desc"
class="inputbox"
size="30"
default="Contact_Default_Link_Name"/>
</fields>
<fields group="Icons" label="Contact_Icon_Settings" >
<field
name="contact_icons"
type="list"
default="0"
label="Icons/text"
description="fieldCONTACTICONS">
label="CONTACT_ICONS_Settings_Label"
description="CONTACT_ICONS_Settings_Desc">
<option
value="0">Icons</option>
value="0">Contact_Icons_Options_Icons</option>
<option
value="1">Text</option>
value="1">Contact_Icons_Options_Text</option>
<option
value="2">None</option>
value="2">Contact_Icons_Options_None</option>
</field>
<field
name="icon_address"
type="imagelist"
directory="/images/system"
type="media"
link="images/system"
hide_none="1"
default=""
label="Address Icon"
description="Icon for the Address info" />
label="Contact_Icons_Address_Label"
description="Contact_Icons_Address_Desc" />
<field
name="icon_email"
type="imagelist"
type="media"
directory="/images/system"
hide_none="1"
default=""
label="Email Icon"
description="Icon for the Email info" />
label="Contact_Icons_Email_Label"
description="Contact_Icons_Email_Desc" />
<field
name="icon_telephone"
type="imagelist"
type="media"
directory="/images/system"
hide_none="1"
default=""
label="Telephone Icon"
description="Icon for the Telephone info" />
label="Contact_Icons_Telephone_Label"
description="Contact_Icons_Telephone_Desc" />
<field
name="icon_mobile"
type="imagelist"
type="media"
directory="/images/system"
hide_none="1"
default=""
label="Mobile Icon"
description="Icon for the Mobile info" />
label="Contact_Icons_Mobile_Label"
description="Contact_Icons_Mobile_Desc" />
<field
name="icon_fax"
type="imagelist"
type="media"
directory="/images/system"
hide_none="1"
default=""
label="Fax Icon"
description="Icon for the Fax info" />
label="Contact_Icons_Fax_Label"
description="Contact_Icons_Fax_Desc" />
<field
name="icon_misc"
type="imagelist"
directory="/images/system"
type="media"
directory="/images/system"
hide_none="1"
default=""
label="Misc Icon"
description="Icon for the Misc info" />
<field
type="spacer" />
label="Contact_Icons_Misc_Label"
description="Contact_Icons_Misc_info_Desc" />
</fields>
<fields group="contacts" array="true"
label="Contact_Config_Table_of_Contacts">
<field
name="show_headings"
type="radio"
default="1"
label="Show Table Headings"
description="Show/Hide the Table Headings">
label="Contact_Config_Table_Headings_Label"
description="Contact_Config_Table_Headings_Desc">
<option
value="0">Hide</option>
value="0">Jcommon_Hide</option>
<option
value="1">Show</option>
value="1">Jcommon_Show</option>
</field>
<field
name="show_position"
type="radio"
default="1"
label="Show Contact's Position"
description="Show/Hide the Contact Position">
label="Contact_Config_Position_Label"
description="Contact_Config_Position_Desc">
<option
value="0">Hide</option>
value="0">Jcommon_Hide</option>
<option
value="1">Show</option>
value="1">Jcommon_Show</option>
</field>
<field
name="show_email"
type="radio"
default="0"
label="Show Email Address"
description="Show/Hide the Email Address">
label="Contact_Show_Email_Address_Label"
description="Contact_Show_Email_Address_Desc">
<option
value="0">Hide</option>
<option
@ -112,89 +237,97 @@
name="show_telephone"
type="radio"
default="1"
label="Show Phone Number"
description="Show/Hide the Telephone Number">
label="Contact_Config_Phone_Label"
description="Contact_Config_Telephone_Desc">
<option
value="0">Hide</option>
value="0">Jcommon_Hide</option>
<option
value="1">Show</option>
value="1">Jcommon_Show</option>
</field>
<field
name="show_mobile"
type="radio"
default="1"
label="Show Mobile Number"
description="Show/Hide the Mobile Number">
label="Contact_Config_Mobile_Label"
description="Contact_Config_Mobile_Desc">
<option
value="0">Hide</option>
value="0">Jcommon_Hide</option>
<option
value="1">Show</option>
value="1">Jcommon_Show</option>
</field>
<field
name="show_fax"
type="radio"
default="1"
label="Show Fax Number"
description="Show/Hide the Fax Number">
label="Contact_Config_Mobile_Label"
description="Contact_Config_Mobile_Desc">
<option
value="0">Hide</option>
value="0">Jcommon_Hide</option>
<option
value="1">Show</option>
value="1">Jcommon_Show</option>
</field>
<field
type="spacer" />
<field
name="allow_vcard"
type="radio"
default="0"
label="Enable vcard"
description="Enable vcard support for contacts">
label="Contact_Config_vCard_Label"
description="Contact_Config_vCard_Desc">
<option
value="0">JNo</option>
value="0">Jcommon_Hide</option>
<option
value="1">JYes</option>
value="1">Jcommon_Show</option>
</field>
</fields>
<fields group="Contact_Form" array="true"
label="Contact_Config_Contact_Form">
<field
type="spacer" />
<field name="show_email_form"
type="radio"
default="1"
label="Contact_Email_Show_Form_Label"
description="Contact_Email_Show_Form_Desc">
<option value="0">Jcommon_Hide</option>
<option value="1">Jcommon_Show</option>
</field>
<field
name="banned_email"
type="textarea"
default=""
label="BANNED EMAIL LABEL"
label="Contact_Config_BANNED_EMAIL_LABEL"
rows="3"
cols="30"
description="BANNED EMAIL DESC" />
description="Contact_Config_BANNED_EMAIL_DESC" />
<field
name="banned_subject"
type="textarea"
default=""
label="BANNED SUBJECT LABEL"
label="Contact_Config_BANNED_SUBJECT_LABEL"
rows="3"
cols="30"
description="BANNED SUBJECT DESC" />
description="Contact_Config_BANNED_SUBJECT_DESC" />
<field
name="banned_text"
type="textarea"
default=""
label="BANNED TEXT LABEL"
label="Contact_Config_BANNED_TEXT_LABEL"
rows="3"
cols="30"
description="BANNED TEXT DESC" />
description="Contact_Config_BANNED_TEXT_DESC" />
<field
name="validate_session"
type="radio"
default="1"
label="SESSION CHECK LABEL"
description="SESSION CHECK DESC">
label="Contact_Config_SESSION_CHECK_LABEL"
description="Contact_Config_SESSION_CHECK_DESC">
<option
value="0">JNo</option>
<option
@ -205,12 +338,80 @@
name="custom_reply"
type="radio"
default="0"
label="Custom Reply"
description="Custom Reply Desc">
label="Contact_Config_Custom_Reply"
description="Contact_Config_Custom_Reply_Desc">
<option
value="0">JNo</option>
<option
value="1">JYes</option>
</field>
<field
name="redirect"
type="text"
default=""
size="30"
label="Contact_Config_Redirect_LABEL"
description="Contact_Config_Redirect_DESC" />
</fields>
</config>
<fields group="Contact_Config_Meta_Data" array="true"
label="Contact_Fieldset_Meta_Data">
<field
id="metakey"
name="metakey"
type="textarea"
label="JField_Meta_Keywords_Label"
description="JField_Meta_Keywords_Desc"
class="inputbox"
rows="3"
cols="30"
default=""/>
<field
id="metadesc"
name="metadesc"
type="textarea"
label="JField_Meta_Description_Label"
description="JField_Meta_Description_Desc"
class="inputbox"
rows="3"
cols="30"
default=""/>
<field
name="robots"
type="text"
label="JField_Metadata_Robots_Label"
description="JField_Metadata_Robots_Desc"
size="20"/>
<field
name="author"
type="text"
label="JField_Metadata_Author_Label"
description="JField_Metadata_Author_Desc"
size="20"/>
<field
name="rights"
type="text"
label="JField_Metadata_Rights_Label"
description="JField_Metadata_Rights_Desc"
size="20"/>
<field
id="language"
name="language"
type="text"
label="JField_Language_Label"
description="JField_Language_Desc"
class="inputbox"
size="10"
default=""/>
<field
id="xreference"
name="xreference"
type="hidden"
label="JField_Metadata_XReference_Label"
description="JField_Metadata_XReference_Desc"
class="inputbox"
size="30"
default=""/>
</fields>
</config>

View File

@ -0,0 +1,22 @@
<?php
/**
* @version $Id: weblinks.php 11952 2009-06-01 03:21:19Z robs $
* @package Joomla.Administrator
* @subpackage com_weblinks
* @copyright Copyright (C) 2005 - 2009 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
// no direct access
defined('_JEXEC') or die;
$user = & JFactory::getUser();
if (!$user->authorize('com_contact.manage')) {
JFactory::getApplication()->redirect('index.php', JText::_('ALERTNOTAUTH'));
}
jimport('joomla.application.component.controller');
$controller = JController::getInstance('contact');
$controller->execute(JRequest::getCmd('task'));
$controller->redirect();

View File

@ -1,101 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<install type="component" version="1.0.0">
<name>Contact Items</name>
<author>Joomla! Project</author>
<creationDate>2006</creationDate>
<copyright>Copyright (C) 2005 - 2009 Open Source Matters. All rights reserved.</copyright>
<license>GNU General Public License version 2 or later; see LICENSE.txt</license>
<authorEmail>admin@joomla.org</authorEmail>
<authorUrl>www.joomla.org</authorUrl>
<version>1.0.0</version>
<description>Parameters for individual Contact Items</description>
<params>
<param name="show_name" type="radio" default="1" label="Name" description="Show/Hide the name info">
<option value="0">Hide</option>
<option value="1">Show</option>
</param>
<param name="show_position" type="radio" default="1" label="Contact's Position" description="Show/Hide the position info">
<option value="0">Hide</option>
<option value="1">Show</option>
</param>
<param name="show_email" type="radio" default="0" label="E-mail" description="PARAMEMAIL">
<option value="0">Hide</option>
<option value="1">Show</option>
</param>
<param name="show_street_address" type="radio" default="1" label="Street Address" description="Show/Hide the street address info">
<option value="0">Hide</option>
<option value="1">Show</option>
</param>
<param name="show_suburb" type="radio" default="1" label="Town/Suburb" description="Show/Hide the suburb info">
<option value="0">Hide</option>
<option value="1">Show</option>
</param>
<param name="show_state" type="radio" default="1" label="State/County" description="Show/Hide the state info">
<option value="0">Hide</option>
<option value="1">Show</option>
</param>
<param name="show_postcode" type="radio" default="1" label="Post/Zip Code" description="Show/Hide the post code info">
<option value="0">Hide</option>
<option value="1">Show</option>
</param>
<param name="show_country" type="radio" default="1" label="Country" description="Show/Hide the country info">
<option value="0">Hide</option>
<option value="1">Show</option>
</param>
<param name="show_telephone" type="radio" default="1" label="Telephone" description="Show/Hide the telephone info">
<option value="0">Hide</option>
<option value="1">Show</option>
</param>
<param name="show_mobile" type="radio" default="1" label="Mobile" description="Show/Hide the mobile info">
<option value="0">Hide</option>
<option value="1">Show</option>
</param>
<param name="show_fax" type="radio" default="1" label="Fax" description="Show/Hide the fax info">
<option value="0">Hide</option>
<option value="1">Show</option>
</param>
<param name="show_webpage" type="radio" default="1" label="Webpage" description="Show/Hide the webpage">
<option value="0">Hide</option>
<option value="1">Show</option>
</param>
<param name="show_misc" type="radio" default="1" label="Misc Info" description="Show/Hide the miscellaneous info">
<option value="0">Hide</option>
<option value="1">Show</option>
</param>
<param name="show_image" type="radio" default="1" label="Image" description="Show/Hide the image">
<option value="0">Hide</option>
<option value="1">Show</option>
</param>
<param name="allow_vcard" type="radio" default="0" label="vCard" description="Show/Hide VCard">
<option value="0">Hide</option>
<option value="1">Show</option>
</param>
</params>
<params group="advanced">
<param name="contact_icons" type="list" default="0" label="Icons/text" description="PARAMCONTACTICONS">
<option value="0">Icons</option>
<option value="1">Text</option>
<option value="2">None</option>
</param>
<param name="icon_address" type="imagelist" directory="/images/system" hide_none="1" default="" label="Address Icon" description="Icon for the Address info" />
<param name="icon_email" type="imagelist" directory="/images/system" hide_none="1" default="" label="Email Icon" description="Icon for the Email info" />
<param name="icon_telephone" type="imagelist" directory="/images/system" hide_none="1" default="" label="Telephone Icon" description="Icon for the Telephone info" />
<param name="icon_mobile" type="imagelist" directory="/images/system" hide_none="1" default="" label="Mobile Icon" description="Icon for the Mobile info" />
<param name="icon_fax" type="imagelist" directory="/images/system" hide_none="1" default="" label="Fax Icon" description="Icon for the Fax info" />
<param name="icon_misc" type="imagelist" directory="/images/system" hide_none="1" default="" label="Misc Icon" description="Icon for the Misc info" />
</params>
<params group="email">
<param name="show_email_form" type="radio" default="1" label="Email Form" description="Show/Hide the email to form">
<option value="0">Hide</option>
<option value="1">Show</option>
</param>
<param name="email_description" type="text" size="30" default="" label="Description text" description="PARAMEMAILDESCTEXT" />
<param name="show_email_copy" type="radio" default="1" label="Email Copy" description="PARAMEMAILCOPY">
<option value="0">Hide</option>
<option value="1">Show</option>
</param>
<param name="banned_email" type="textarea" default="" label="BANNED EMAIL LABEL" rows="3" cols="30" description="BANNED EMAIL DESC" />
<param name="banned_subject" type="textarea" default="" label="BANNED SUBJECT LABEL" rows="3" cols="30" description="BANNED SUBJECT DESC" />
<param name="banned_text" type="textarea" default="" label="BANNED TEXT LABEL" rows="3" cols="30" description="BANNED TEXT DESC" />
</params>
</install>

View File

@ -0,0 +1,54 @@
<?php
/**
* @version $Id: controller.php 12268 2009-06-22 00:05:11Z eddieajau $
* @copyright Copyright (C) 2005 - 2009 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
// no direct access
defined('_JEXEC') or die;
jimport('joomla.application.component.controller');
/**
* Component Controller
*
* @package Joomla.Administrator
* @subpackage com_content
*/
class ContactController extends JController
{
/**
* Display the view
*/
function display()
{
// Get the document object.
$document = &JFactory::getDocument();
// Set the default view name and format from the Request.
$vName = JRequest::getWord('view', 'contacts');
$vFormat = $document->getType();
$lName = JRequest::getWord('layout', 'default');
// Get and render the view.
if ($view = &$this->getView($vName, $vFormat))
{
// Get the model for the view.
$model = &$this->getModel($vName);
// Push the model into the view (as default).
$view->setModel($model, true);
$view->setLayout($lName);
// Push document object into the view.
$view->assignRef('document', $document);
$view->display();
// Load the submenu.
require_once JPATH_COMPONENT.DS.'helpers'.DS.'contact.php';
ContactHelper::addSubmenu($vName);
}
}
}

View File

@ -0,0 +1,368 @@
<?php
/**
* @version
* @copyright Copyright (C) 2005 - 2009 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
* @link http://www.theartofjoomla.com
*/
// no direct access
defined('_JEXEC') or die;
jimport('joomla.application.component.controller');
/**
* @package Joomla.Administrator
* @subpackage com_contact
*/
class ContactControllerContact extends JController
{
/**
* Constructor
*/
function __construct()
{
parent::__construct();
$this->registerTask('save2copy', 'save');
$this->registerTask('save2new', 'save');
$this->registerTask('apply', 'save');
$this->registerTask('editList', 'edit');
$this->registerTask('unpublish', 'publish');
$this->registerTask('archive', 'publish');
$this->registerTask('trash', 'publish');
$this->registerTask('report', 'publish');
}
/**
* Display the view
*/
function display()
{
$this->setRedirect(JRoute::_('index.php?option=com_contact', false));
}
/**
* Proxy for getModel
*/
function &getModel()
{
return parent::getModel('Contact', '', array('ignore_request' => true));
}
/**
* Method to add a new contact.
*
* @return void
*/
public function add()
{
// Initialize variables.
$app = &JFactory::getApplication();
// Clear the menu item edit information from the session.
$app->setUserState('com_contact.edit.contact.id', null);
$app->setUserState('com_contact.edit.contact.data', null);
// Redirect to the edit screen.
$this->setRedirect(JRoute::_('index.php?option=com_contact&view=contact&layout=edit', false));
}
/**
* Method to edit an existing contact
*
* Sets object ID in the session from the request, checks the item out, and then redirects to the edit page.
*
* @access public
* @return void
*/
function edit()
{
// Initialize variables.
$app = &JFactory::getApplication();
$ids = JRequest::getVar('cid', array(), '', 'array');
// Get the id of the group to edit.
$id = (empty($ids) ? JRequest::getInt('contact_id') : (int) array_pop($ids));
// Get the previous row id (if any) and the current row id.
$previousId = (int) $app->getUserState('com_contact.edit.contact.id');
$app->setUserState('com_contact.edit.contact.id', $id);
// Get the menu item model.
$model = &$this->getModel();
// Check that this is not a new item.
if ($id > 0)
{
$item = $model->getItem($id);
// If not already checked out, do so.
if ($item->checked_out == 0)
{
if (!$model->checkout($id))
{
// Check-out failed, go back to the list and display a notice.
$message = JText::sprintf('JError_Checkout_failed', $model->getError());
$this->setRedirect('index.php?option=com_contact&view=contact&contact_id='.$id, $message, 'error');
return false;
}
}
}
// Check-out succeeded, push the new row id into the session.
$app->setUserState('com_contact.edit.contact.id', $id);
$app->setUserState('com_contact.edit.contact.data', null);
$this->setRedirect('index.php?option=com_contact&view=contact&layout=edit');
return true;
}
/**
* Method to cancel an edit
*
* Checks the item in, sets item ID in the session to null, and then redirects to the list page.
*
* @access public
* @return void
*/
function cancel()
{
JRequest::checkToken() or jExit(JText::_('JInvalid_Token'));
// Initialize variables.
$app = &JFactory::getApplication();
// Get the previous id (if any) and the current id.
$previousId = (int) $app->getUserState('com_contact.edit.contact.id');
// Get the item model.
$model = &$this->getModel();
// If rows ids do not match, checkin previous row.
if (!$model->checkin($previousId))
{
// Attempt to check-in the current contact
// Check-in failed, go back to the item and display a notice.
$message = JText::sprintf('JError_Checkin_failed', $model->getError());
return false;
}
// Clear the item edit information from the session.
$app->setUserState('com_contact.edit.contact.id', null);
$app->setUserState('com_contact.edit.contact.data', null);
// Redirect to the list screen.
$this->setRedirect(JRoute::_('index.php?option=com_contact&view=contacts', false));
}
/**
* Method to save a contact
*
* @access public
* @return void
* @since 1.0
*/
function save()
{
// Check for request forgeries.
JRequest::checkToken() or jexit(JText::_('JInvalid_Token'));
// Initialize variables.
$app = &JFactory::getApplication();
$model = &$this->getModel('Item');
$task = $this->getTask();
// Get posted form variables.
$data = JRequest::getVar('jform', array(), 'post', 'array');
// Populate the row id from the session.
$data['id'] = (int) $app->getUserState('com_contact.edit.contact.id');
// The save2copy task needs to be handled slightly differently.
if ($task == 'save2copy')
{
// Check-in the original row.
if (!$model->checkin())
{
// Check-in failed, go back to the item and display a notice.
$message = JText::sprintf('JError_Checkin_saved', $model->getError());
return false;
}
// Reset the ID and then treat the request as for Apply.
$data['id'] = 0;
$task = 'apply';
}
// Validate the posted data.
$form = &$model->getForm();
if (!$form) {
JError::raiseError(500, $model->getError());
return false;
}
$data = $model->validate($form, $data);
// Check for validation errors.
if ($data === false)
{
// Get the validation messages.
$errors = $model->getErrors();
// Push up to three validation messages out to the user.
for ($i = 0, $n = count($errors); $i < $n && $i < 3; $i++)
{
if (JError::isError($errors[$i])) {
$app->enqueueMessage($errors[$i]->getMessage(), 'notice');
}
else {
$app->enqueueMessage($errors[$i], 'notice');
}
}
// Save the data in the session.
$app->setUserState('com_contact.edit.contact.data', $data);
// Redirect back to the edit screen.
$this->setRedirect(JRoute::_('index.php?option=com_contact&view=contact&layout=edit', false));
return false;
}
// Attempt to save the data.
if (!$model->save($data))
{
// Save the data in the session.
$app->setUserState('com_contact.edit.contact.data', $data);
// Redirect back to the edit screen.
$this->setMessage(JText::sprintf('JError_Save_failed', $model->getError()), 'notice');
return false;
}
// Save succeeded, check-in the row.
if (!$model->checkin())
{
// Check-in failed, go back to the row and display a notice.
$message = JText::sprintf('JError_Checkin_saved', $model->getError());
return false;
}
$this->setMessage(JText::_('JController_Save_success'));
// Redirect the user and adjust session state based on the chosen task.
switch ($task)
{
case 'apply':
// Set the row data in the session.
// Redirect back to the edit screen.
$this->setRedirect(JRoute::_('index.php?option=com_contact&view=contact&layout=edit', false));
break;
case 'save2new':
// Clear the row id and data in the session.
$app->setUserState('com_contact.edit.contact.id', null);
$app->setUserState('com_contact.edit.contact.data', null);
// Redirect back to the edit screen.
$this->setRedirect(JRoute::_('index.php?option=com_contact&view=contact&layout=edit', false));
break;
default:
// Clear the row id and data in the session.
$app->setUserState('com_contact.edit.contact.id', null);
$app->setUserState('com_contact.edit.contact.data', null);
// Redirect to the list screen.
$this->setRedirect(JRoute::_('index.php?option=com_contact&view=contacts', false));
break;
}
}
/**
* Removes an item
*/
function delete()
{
// Check for request forgeries
JRequest::checkToken() or die('Invalid Token');
// Get items to remove from the request.
$cid = JRequest::getVar('cid', array(), '', 'array');
if (!is_array($cid) || count($cid) < 1) {
JError::raiseWarning(500, JText::_('JERROR_NO_ITEMS_SELECTED'));
}
else {
// Get the model.
$model = $this->getModel();
// Make sure the item ids are integers
jimport('joomla.utilities.arrayhelper');
JArrayHelper::toInteger($cid);
// Remove the items.
if (!$model->delete($cid)) {
JError::raiseWarning(500, $model->getError());
}
}
$this->setRedirect('index.php?option=com_contact&view=contacts');
}
/**
* Method to publish a list of taxa
*
* @access public
* @return void
* @since 1.0
*/
function publish()
{
// Check for request forgeries
JRequest::checkToken() or die('Invalid Token');
// Get items to publish from the request.
$cid = JRequest::getVar('cid', array(), '', 'array');
$data = array('publish' => 1, 'unpublish' => 0, 'archive'=>-1, 'trash' => -2, 'report'=>-3);
$task = $this->getTask();
$value = JArrayHelper::getValue($data, $task, 0, 'int');
if (!is_array($cid) || count($cid) < 1) {
JError::raiseWarning(500, JText::_('JERROR_NO_ITEMS_SELECTED'));
}
else {
// Get the model.
$model = $this->getModel();
// Make sure the item ids are integers
JArrayHelper::toInteger($cid);
// Publish the items.
if (!$model->publish($cid, $value)) {
JError::raiseWarning(500, $model->getError());
}
}
$this->setRedirect('index.php?option=com_contact&view=contacts');
}
/**
* Changes the order of an item
*/
function ordering()
{
// Check for request forgeries
JRequest::checkToken() or die('Invalid Token');
$cid = JRequest::getVar('cid', null, 'post', 'array');
$inc = $this->getTask() == 'orderup' ? -1 : +1;
$model = & $this->getModel();
$model->ordering($cid, $inc);
$this->setRedirect('index.php?option=com_contact&view=contacts');
}
}

View File

@ -0,0 +1,135 @@
<?php
/**
* @version
* @copyright Copyright (C) 2005 - 2009 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
* @link http://www.theartofjoomla.com
*/
// no direct access
defined('_JEXEC') or die;
jimport('joomla.application.component.controller');
/**
* @package Joomla.Administrator
* @subpackage com_content
*/
class ContactControllerContacts extends JController
{
/**
* Constructor
*/
function __construct()
{
parent::__construct();
$this->registerTask('archive', 'publish');
$this->registerTask('unpublish', 'publish');
$this->registerTask('trash', 'publish');
//$this->registerTask('report', 'publish');
$this->registerTask('orderup', 'ordering');
$this->registerTask('orderdown', 'ordering');
$this->registerTask('unfeatured', 'featured');
}
/**
* Display the view
*/
function display()
{
}
/**
* Proxy for getModel
*/
function &getModel($name = 'Contacts', $prefix = 'ContactModel')
{
return parent::getModel($name, $prefix, array('ignore_request' => true));
}
/**
* Removes an item
*/
function delete()
{
// Check for request forgeries
JRequest::checkToken() or die('Invalid Token');
// Get items to remove from the request.
$ids = JRequest::getVar('cid', array(), '', 'array');
if (empty($ids)) {
JError::raiseWarning(500, JText::_('JWARNING_DELETE_MUST_SELECT'));
}
else {
// Get the model.
$model = $this->getModel('Contact');
// Remove the items.
if (!$model->delete($ids)) {
JError::raiseWarning(500, $model->getError());
}
}
$this->setRedirect('index.php?option=com_contact&view=contacts');
}
/**
* Method to publish a list of contacts
*
* @return void
* @since 1.0
*/
function publish()
{
// Check for request forgeries
JRequest::checkToken() or die(JText('JInvalid_Token'));
// Get items to publish from the request.
$ids = JRequest::getVar('cid', array(), '', 'array');
$values = array('publish' => 1, 'unpublish' => 0, 'archive' => -1, 'trash' => -2, 'report' => -3);
$task = $this->getTask();
$value = JArrayHelper::getValue($values, $task, 0, 'int');
if (empty($ids)) {
JError::raiseWarning(500, JText::_('JWarning_Select_Item_Publish'));
}
else
{
// Get the model.
$model = $this->getModel(Contact);
// Publish the items.
if (!$model->publish($ids, $value)) {
JError::raiseWarning(500, $model->getError());
}
}
$this->setRedirect('index.php?option=com_contact&view=contacts');
}
function featured()
{
// Check for request forgeries
JRequest::checkToken() or die('Invalid Token');
// Get items to publish from the request.
$ids = JRequest::getVar('cid', array(), '', 'array');
$values = array('featured' => 1, 'unfeatured' => 0);
$task = $this->getTask();
$value = JArrayHelper::getValue($values, $task, 0, 'int');
if (empty($ids)) {
JError::raiseWarning(500, JText::_('Select an item to publish'));
}
else
{
// Get the model.
$model = $this->getModel();
// Publish the items.
if (!$model->featured($ids, $value)) {
JError::raiseWarning(500, $model->getError());
}
}
$this->setRedirect('index.php?option=com_contact&view=contacts');
}
}

View File

@ -0,0 +1 @@
<html><body></body></html>

View File

@ -21,18 +21,32 @@ class JElementContact extends JElement
function fetchElement($name, $value, &$node, $control_name)
{
$db = &JFactory::getDbo();
$app = &JFactory::getApplication();
$db = &JFactory::getDbo();
$doc = &JFactory::getDocument();
$template = $app->getTemplate();
$fieldName = $control_name.'['.$name.']';
$contact = &JTable::getInstance('contact');
if ($value) {
$contact->load($value);
} else {
$contact->title = JText::_('Contact_Element_Contact_Select');
}
$js = "
function jSelectContact(id, name, object) {
document.getElementById(object + '_id').value = id;
document.getElementById(object + '_name').value = name;
document.getElementById('sbox-window').close();
}";
$doc->addScriptDeclaration($js);
$link = 'index.php?option=com_contact&amp;task=element&amp;tmpl=component&amp;object='.$name;
$query = 'SELECT a.id, CONCAT(a.name, " - ",a.con_position) AS text, a.catid '
. ' FROM #__contact_details AS a'
. ' INNER JOIN #__categories AS c ON a.catid = c.id'
. ' WHERE a.published = 1'
. ' AND c.published = 1'
. ' ORDER BY a.catid, a.name'
;
$db->setQuery($query);
$options = $db->loadObjectList();
JHtml::_('behavior.modal', 'a.modal');
$html = "\n".'<div style="float: left;"><input style="background: #ffffff;" type="text" id="'.$name.'_name" value="'.htmlspecialchars($contact->name, ENT_QUOTES, 'UTF-8').'" disabled="disabled" /></div>';
// $html .= "\n &nbsp; <input class=\"inputbox modal-button\" type=\"button\" value=\"".JText::_('Select')."\" />";
$html .= '<div class="button2-left"><div class="blank"><a class="modal" title="'.JText::_('Contact_Select_Contact').'" href="'.$link.'" rel="{handler: \'iframe\', size: {x: 650, y: 375}}">'.JText::_('Contact_Select').'</a></div></div>'."\n";
$html .= "\n".'<input type="hidden" id="'.$name.'_id" name="'.$fieldName.'" value="'.(int)$value.'" />';
return JHtml::_('select.genericlist', $options, ''.$control_name.'['.$name.']', 'class="inputbox"', 'id', 'text', $value, $control_name.$name);
return $html;
}
}

View File

@ -1 +1 @@
<html><body></body></html>
<html><body></body></html>

View File

@ -0,0 +1,38 @@
<?php
/**
* @version
* @copyright Copyright (C) 2005 - 2009 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
// No direct access
defined('_JEXEC') or die;
/**
* Contact component helper.
*
* @package Joomla.Administrator
* @subpackage com_menus
* @since 1.6
*/
class ContactHelper
{
/**
* Configure the Linkbar.
*
* @param string The name of the active view.
*/
public static function addSubmenu($vName)
{
JSubMenuHelper::addEntry(
JText::_('Contact_Submenu_Contacts'),
'index.php?option=com_contact&view=contacts',
$vName == 'contacts'
);
JSubMenuHelper::addEntry(
JText::_('Contact_Submenu_Categories'),
'index.php?option=com_categories&extension=com_contact',
$vName == 'categories'
);
}
}

View File

@ -0,0 +1,85 @@
<?php
/**
* @version
* @copyright Copyright (C) 2005 - 2009 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
// no direct access
defined('_JEXEC') or die;
/**
* @package Joomla.Administrator
* @subpackage com_content
*/
abstract class JHtmlContact
{
/**
* @param int $value The featured value
* @param int $i
*/
function featured($value = 0, $i)
{
// Array of image, task, title, action
$states = array(
0 => array('disabled.png', 'articles.featured', 'Content_Toggle_Featured', 'Content_Toggle_Featured'),
1 => array('tick.png', 'articles.unfeatured', 'Content_Toggle_Featured', 'Content_Toggle_Featured'),
);
$state = JArrayHelper::getValue($states, (int) $value, $states[1]);
$html = '<a href="javascript:void(0);" onclick="return listItemTask(\'cb'.$i.'\',\''.$state[1].'\')" title="'.JText::_($state[3]).'">'
. JHtml::_('image.administrator', $state[0], '/images/', null, '/images/', JText::_($state[2])).'</a>';
return $html;
}
/**
* Displays the publishing state legend for contacts
*/
function Legend()
{
?>
<table cellspacing="0" cellpadding="4" border="0" align="center">
<tr align="center"> <td>
<td>
<img src="images/publish_y.png" width="16" height="16" border="0" alt="<?php echo JText::_('Pending'); ?>" />
</td>
<td>
<?php echo JText::_('Published, but is'); ?> <u><?php echo JText::_('Pending'); ?></u> |
</td>
<td>
<img src="images/publish_g.png" width="16" height="16" border="0" alt="<?php echo JText::_('Visible'); ?>" />
</td>
<td>
<?php echo JText::_('Published and is'); ?> <u><?php echo JText::_('Current'); ?></u> |
</td>
<td>
<img src="images/publish_r.png" width="16" height="16" border="0" alt="<?php echo JText::_('Finished'); ?>" />
</td>
<td>
<?php echo JText::_('Published, but has'); ?> <u><?php echo JText::_('Expired'); ?></u> |
</td>
<td>
<img src="images/publish_x.png" width="16" height="16" border="0" alt="<?php echo JText::_('Finished'); ?>" />
</td>
<td>
<?php echo JText::_('Not Published'); ?> |
</td>
<td>
<img src="images/disabled.png" width="16" height="16" border="0" alt="<?php echo JText::_('Archived'); ?>" />
</td>
<td>
<?php echo JText::_('Archived'); ?>
</td>
</tr>
<tr>
<td colspan="10" align="center">
<?php echo JText::_('Click on icon to toggle state.'); ?>
</td>
</tr>
</table>
<?php
}
}

View File

@ -0,0 +1 @@
<html><body></body></html>

View File

@ -1 +1 @@
<html><body></body></html>
<html><body></body></html>

View File

@ -0,0 +1,443 @@
<?php
/**
* @version
* @copyright Copyright (C) 2005 - 2009 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
// No direct access
defined('_JEXEC') or die;
jimport('joomla.application.component.modelform');
jimport('joomla.database.query');
/**
* Item Model for Contacts.
*
* @package Joomla.Administrator
* @subpackage com_contact
* @version 1.6
*/
class ContactModelContact extends JModelForm
{
/**
* Model context string.
*
* @var string
*/
protected $_context = 'com_contact.item';
/**
* Returns a reference to the a Table object, always creating it
*
* @param type $type The table type to instantiate
* @param string $prefix A prefix for the table class name. Optional.
* @param array $options Configuration array for model. Optional.
* @return JTable A database object
*/
public function &getTable($type = 'Contact', $prefix = 'ContactTable', $config = array())
{
return JTable::getInstance($type, $prefix, $config);
}
/**
* Method to auto-populate the model state.
*
* @return void
*/
protected function _populateState()
{
$app = &JFactory::getApplication('administrator');
// Load the User state.
if (!($pk = (int) $app->getUserState('com_contact.edit.contact.id'))) {
$pk = (int) JRequest::getInt('item_id');
}
$this->setState('contact.id', $pk);
// Load the parameters.
$params = &JComponentHelper::getParams('com_contact');
// Load the parameters.
$this->setState('params', $params);
}
/**
* Method to get an item.
*
* @param integer The id of the item to get.
*
* @return mixed Item data object on success, false on failure.
*/
public function &getItem($itemId = null)
{
// Initialize variables.
$itemId = (!empty($itemId)) ? $itemId : (int)$this->getState('contact.id');
$false = false;
// Get a row instance.
$table = &$this->getTable();
// Attempt to load the row.
$return = $table->load($itemId);
// Check for a table object error.
if ($return === false && $table->getError()) {
$this->setError($table->getError());
return $false;
}
// Prime required properties.
if (empty($table->id))
{
//$table->parent_id = $this->getState('item.parent_id');
//$table->menutype = $this->getState('item.menutype');
//$table->type = $this->getState('item.type');
}
// Convert the params field to an array.
$registry = new JRegistry;
$registry->loadJSON($table->params);
$table->params = $registry->toArray();
// Convert the params field to an array.
$registry = new JRegistry;
$registry->loadJSON($table->metadata);
$table->metadata = $registry->toArray();
$value = JArrayHelper::toObject($table->getProperties(1), 'JObject');
return $value;
}
/**
* Method to get the row form.
*
* @return mixed JForm object on success, false on failure.
* @since 1.6
*/
public function getForm()
{
// Initialize variables.
$app = &JFactory::getApplication();
JImport('joomla.form.form');
JForm::addFieldPath('JPATH_ADMINISTRATOR/components/com_users/models/fields');
// Get the form.
$form = parent::getForm('contact', 'com_contact.contact', array('array' => 'jform', 'event' => 'onPrepareForm'));
// Check for an error.
if (JError::isError($form)) {
$this->setError($form->getMessage());
return false;
}
// Check the session for previously entered form data.
$data = $app->getUserState('com_contact.edit.contact.data', array());
// Bind the form data if present.
if (!empty($data)) {
$form->bind($data);
}
return $form;
}
/**
* Method to save the form data.
*
* @param array The form data.
* @return boolean True on success.
* @since 1.6
*/
public function save($data)
{
// Initialise variables;
$dispatcher = & JDispatcher::getInstance();
$table = &$this->getTable();
$pk = (!empty($data['id'])) ? $data['id'] : (int)$this->getState('contact.id');
$isNew = true;
// Include the contact plugins for the onSave events.
JPluginHelper::importPlugin('contact');
// Load the row if saving an existing item.
if ($pk > 0) {
$table->load($pk);
$isNew = false;
}
// Bind the data.
if (!$table->bind($data)) {
$this->setError(JText::sprintf('JTable_Error_Bind_failed', $table->getError()));
return false;
}
// Check the data.
if (!$table->check()) {
$this->setError($table->getError());
return false;
}
$result = $dispatcher->trigger('onBeforeContactSave', array(&$table, $isNew));
if (in_array(false, $result, true)) {
JError::raiseError(500, $row->getError());
return false;
}
// Store the data.
if (!$table->store()) {
$this->setError($table->getError());
return false;
}
// Clean the cache.
$cache = &JFactory::getCache('com_contact');
$cache->clean();
$dispatcher->trigger('onAfterContactSave', array(&$table, $isNew));
return true;
}
/**
* Method to delete rows.
*
* @param array An array of item ids.
*
* @return boolean Returns true on success, false on failure.
*/
public function delete($pks)
{
$dispatcher = & JDispatcher::getInstance();
// Include the content plugins for the onSave events.
JPluginHelper::importPlugin('content');
// Sanitize the ids.
$pks = (array) $pks;
JArrayHelper::toInteger($pks);
// Get a row instance.
$table = &$this->getTable();
// Iterate the items to delete each one.
foreach ($pks as $itemId)
{
$table->load($itemId); // get contact for onBeforeContacttDelete event
$result = $dispatcher->trigger('onBeforeContacttDelete', array($table));
if (in_array(false, $result, true))
{
JError::raiseError(500, $row->getError());
return false;
}
// delete row
if (!$table->delete($itemId))
{
$this->setError($table->getError());
return false;
}
$dispatcher->trigger('onAfterContactDelete', array($itemId));
}
return true;
}
/**
* Method to publish
*
* @param array The ids of the items to publish.
* @param int The value of the published state
*
* @return boolean True on success.
*/
public function publish($pks, $value = 1)
{
// Sanitize the ids.
$pks = (array) $pks;
JArrayHelper::toInteger($pks);
// Get the current user object.
$user = &JFactory::getUser();
// Get a category row instance.
$table = &$this->getTable();
// Attempt to publish the items.
if (!$table->publish($pks, $value, $user->get('id'))) {
$this->setError($table->getError());
return false;
}
return true;
}
/**
* Method to adjust the ordering of a row.
*
* @param int The numeric id of the row to move.
* @param integer Increment, usually +1 or -1
* @return boolean False on failure or error, true otherwise.
*/
public function ordering($pk, $direction = 0)
{
// Sanitize the id and adjustment.
$pk = (!empty($pk)) ? $pk : (int) $this->getState('contact.id');
// Get a row instance.
$table = &$this->getTable();
// Attempt to adjust the row ordering.
if (!$table->ordering((int) $direction, $pk)) {
$this->setError($table->getError());
return false;
}
return true;
}
/**
* Method to checkin a row.
*
* @param integer $id The numeric id of a row
* @return boolean True on success/false on failure
* @since 1.6
*/
public function checkin($pk = null)
{
// Initialize variables.
$pk = (!empty($pk)) ? $pk : (int) $this->getState('contact.id');
// Only attempt to check the row in if it exists.
if ($pk)
{
$user = &JFactory::getUser();
// Get an instance of the row to checkin.
$table = &$this->getTable();
if (!$table->load($pk)) {
$this->setError($table->getError());
return false;
}
// Check if this is the user having previously checked out the row.
if ($table->checked_out > 0 && $table->checked_out != $user->get('id')) {
$this->setError(JText::_('JError_Checkin_user_mismatch'));
return false;
}
// Attempt to check the row in.
if (!$table->checkin($contactId)) {
$this->setError($table->getError());
return false;
}
}
return true;
}
/**
* Method to check-out a row for editing.
*
* @param int $pk The numeric id of the row to check-out.
* @return boolean False on failure or error, true otherwise.
*/
public function checkout($pk = null)
{
// Initialize variables.
$pk = (!empty($pk)) ? $pk : (int) $this->getState('contact.id');
// Only attempt to check the row in if it exists.
if ($pk)
{
// Get a row instance.
$table = &$this->getTable();
// Get the current user object.
$user = &JFactory::getUser();
// Attempt to check the row out.
if (!$table->checkout($user->get('id'), $pk)) {
$this->setError($table->getError());
return false;
}
}
return true;
}
/**
* Method to perform batch operations on a category or a set of contacts.
*
* @param array An array of commands to perform.
* @param array An array of category ids.
*
* @return boolean Returns true on success, false on failure.
*/
function batch($commands, $pks)
{
// Sanitize user ids.
$pks = array_unique($pks);
JArrayHelper::toInteger($pks);
// Remove any values of zero.
if (array_search(0, $pks, true)) {
unset($pks[array_search(0, $pks, true)]);
}
if (empty($pks)) {
$this->setError(JText::_('JError_No_items_selected'));
return false;
}
$done = false;
if (!empty($commands['assetgroup_id']))
{
if (!$this->_batchAccess($commands['assetgroup_id'], $pks)) {
return false;
}
$done = true;
}
if (!empty($commands['menu_id']))
{
$cmd = JArrayHelper::getValue($commands, 'move_copy', 'c');
if ($cmd == 'c' && !$this->_batchCopy($commands['menu_id'], $pks)) {
return false;
}
else if ($cmd == 'm' && !$this->_batchMove($commands['menu_id'], $pks)) {
return false;
}
$done = true;
}
if (!$done)
{
$this->setError('Menus_Error_Insufficient_batch_information');
return false;
}
return true;
}
/**
* Batch access level changes for a group of rows.
*
* @param int The new value matching an Asset Group ID.
* @param array An array of row IDs.
*
* @return booelan True if successful, false otherwise and internal error is set.
*/
protected function _batchAccess($value, $pks)
{
$table = &$this->getTable();
foreach ($pks as $pk)
{
$table->reset();
$table->load($pk);
$table->access = (int) $value;
if (!$table->store())
{
$this->setError($table->getError());
return false;
}
}
return true;
}
}

View File

@ -0,0 +1,163 @@
<?php
/**
* @version
* @copyright Copyright (C) 2005 - 2009 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
// no direct access
defined('_JEXEC') or die;
jimport('joomla.application.component.modellist');
jimport('joomla.database.query');
/**
* About Page Model
*
* @package Joomla.Administrator
* @subpackage com_contact
*/
class ContactModelContacts extends JModelList
{
/**
* Model context string.
*
* @var string
*/
public $_context = 'com_contact.contacts';
/**
* Method to auto-populate the model state.
*
* @since 1.6
*/
protected function _populateState()
{
$app = &JFactory::getApplication();
$search = $app->getUserStateFromRequest($this->_context.'.search', 'filter_search');
$this->setState('filter.search', $search);
$access = $app->getUserStateFromRequest($this->_context.'.filter.access', 'filter_access', 0, 'int');
$this->setState('filter.access', $access);
$published = $app->getUserStateFromRequest($this->_context.'.published', 'filter_published', '');
$this->setState('filter.published', $published);
$categoryId = $app->getUserStateFromRequest($this->_context.'.category_id', 'filter_category_id');
$this->setState('filter.category_id', $categoryId);
// List state information
$limit = $app->getUserStateFromRequest('global.list.limit', 'limit', $app->getCfg('list_limit'));
$this->setState('list.limit', $limit);
$limitstart = $app->getUserStateFromRequest($this->_context.'.limitstart', 'limitstart', 0);
$this->setState('list.limitstart', $limitstart);
$orderCol = $app->getUserStateFromRequest($this->_context.'.ordercol', 'filter_order', 'a.name');
$this->setState('list.ordering', $orderCol);
$orderDirn = $app->getUserStateFromRequest($this->_context.'.orderdirn', 'filter_order_Dir', 'asc');
$this->setState('list.direction', $orderDirn);
}
/**
* Method to get a store id based on model configuration state.
*
* This is necessary because the model is used by the component and
* different modules that might need different sets of data or different
* ordering requirements.
*
* @param string $id A prefix for the store id.
*
* @return string A store id.
*/
protected function _getStoreId($id = '')
{
// Compile the store id.
$id .= ':'.$this->getState('list.start');
$id .= ':'.$this->getState('list.limit');
$id .= ':'.$this->getState('list.ordering');
$id .= ':'.$this->getState('list.direction');
$id .= ':'.$this->getState('filter.search');
$id .= ':'.$this->getState('filter.published');
return md5($id);
}
/**
* @param boolean True to join selected foreign information
*
* @return string
*/
function _getListQuery($resolveFKs = true)
{
// Create a new query object.
$query = new JQuery;
// Select the required fields from the table.
$query->select(
$this->getState(
'list.select',
'a.id, a.name, a.alias, a.checked_out, a.checked_out_time, a.published, a.access, a.ordering, a.catid')
);
$query->from('#__contact_details AS a');
// Join over the users for the checked out user.
$query->select('uc.name AS editor');
$query->join('LEFT', '#__users AS uc ON uc.id=a.checked_out');
// Join over the asset groups.
$query->select('ag.title AS access_level');
$query->join('LEFT', '#__access_assetgroups AS ag ON ag.id = a.access');
// Join over the categories.
$query->select('c.title AS category_title');
$query->join('LEFT', '#__categories AS c ON c.id = a.catid');
// Filter by access level.
if ($access = $this->getState('filter.access')) {
$query->where('a.access = ' . (int) $access);
}
// Filter by published state
$published = $this->getState('filter.published');
if (is_numeric($published)) {
$query->where('a.published = ' . (int) $published);
}
else if ($published === '') {
$query->where('(a.published = 0 OR a.published = 1)');
}
// Filter by category.
$categoryId = $this->getState('filter.category_id');
if (is_numeric($categoryId)) {
$query->where('a.catid = ' . (int) $categoryId);
}
// Filter by search in name
$search = $this->getState('filter.search');
if (!empty($search)) {
if (stripos($search, 'id:') === 0) {
$query->where('a.id = '.(int) substr($search, 3));
}
else if (stripos($search, 'author:') === 0)
{
$search = $this->_db->Quote('%'.$this->_db->getEscaped(substr($search, 7), true).'%');
$query->where('ua.name LIKE '.$search.' OR ua.username LIKE '.$search);
}
else
{
$search = $this->_db->Quote('%'.$this->_db->getEscaped($search, true).'%');
$query->where('a.name LIKE '.$search.' OR a.alias LIKE '.$search);
}
}
// Add the list ordering clause.
$query->order($this->_db->getEscaped($this->getState('list.ordering', 'a.name')).' '.$this->_db->getEscaped($this->getState('list.direction', 'ASC')));
//echo nl2br(str_replace('#__','jos_',$query));
return $query;
}
}

View File

@ -0,0 +1 @@
<html><body></body></html>

View File

@ -0,0 +1,71 @@
<?php
/**
* @version
* @copyright Copyright (C) 2005 - 2009 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('JPATH_BASE') or die;
jimport('joomla.form.field');
/**
* Supports a modal article picker.
*
* @package Joomla.Administrator
* @subpackage com_contact
* @since 1.6
*/
class JFormFieldModal_Contact extends JFormField
{
/**
* The field type.
*
* @var string
*/
public $type = 'Modal_Contacts';
/**
* Method to get a list of options for a list input.
*
* @return array An array of JHtml options.
*/
protected function _getInput()
{
$db =& JFactory::getDBO();
$doc =& JFactory::getDocument();
// Get the title of the linked chart
$db->setQuery(
'SELECT name' .
' FROM #__contact_details' .
' WHERE id = '.(int) $this->value
);
$title = $db->loadResult();
if ($error = $db->getErrorMsg()) {
JError::raiseWarning(500, $error);
}
if (empty($title)) {
$title = JText::_('Contact_Select_a_Contact');
}
$doc->addScriptDeclaration(
"function jSelectChart_".$this->inputId."(id, name, object) {
$('".$this->inputId."_id').value = id;
$('".$this->inputId."_name').value = name;
SqueezeBox.close();
}"
);
$link = 'index.php?option=com_contact&amp;view=contacts&amp;layout=modal&amp;tmpl=component&amp;function=jSelectChart_'.$this->inputId;
JHTML::_('behavior.modal', 'a.modal');
$html = "\n".'<div style="float: left;"><input style="background: #ffffff;" type="text" id="'.$this->inputId.'_name" value="'.htmlspecialchars($title, ENT_QUOTES, 'UTF-8').'" disabled="disabled" /></div>';
$html .= '<div class="button2-left"><div class="blank"><a class="modal" title="'.JText::_('Contactt_Change_Contact').'" href="'.$link.'" rel="{handler: \'iframe\', size: {x: 800, y: 450}}">'.JText::_('Contact_Change_Contact_button').'</a></div></div>'."\n";
$html .= "\n".'<input type="hidden" id="'.$this->inputId.'_id" name="'.$this->inputName.'" value="'.(int) $this->value.'" />';
return $html;
}
}

View File

@ -0,0 +1 @@
<html><body></body></html>

View File

@ -0,0 +1,591 @@
<?xml version="1.0" encoding="utf-8"?>
<form>
<fields>
<field
id="id"
name="id"
type="hidden"
class="inputbox"
label="Contact_Id_Label"
size="10"
default="0"
required="true"
readonly="true"/>
<field
id="name"
name="name"
type="text"
label="Contact_Name_Label"
description="Contact_Name_Desc"
class="inputbox"
size="30"
required="true"
/>
<field
id="alias"
name="alias"
type="text"
label="JField_Alias_Label"
description="JField_Alias_Desc"
class="inputbox"
size="30"
default=""/>
<field
id="user_id"
name="user_id"
type="member"
label="Contact_Linked_User_Label"
description="Contact_Linked_User_Desc"
size="1"
default="None">
</field>
<field
id="published"
name="published"
type="list"
label="JField_Published_Label"
description="JField_Published_Desc"
class="inputbox"
size="1"
default="1">
<option
value="1">
JOption_Published</option>
<option
value="0">
JOption_UnPublished</option>
<option
value="-1">
JOption_Archived</option>
<option
value="-2">
JOption_Trashed</option>
<option
value="-3">
JOption_Reported</option>
</field>
<field
id="catid"
name="catid"
type="categories"
extension="com_contact"
label="JField_Category_Label"
description="JField_Category_Desc"
class="inputbox"
required="true">
</field>
<field
id="access"
name="access"
type="accesslevels"
label="JField_Access_Label"
description="JField_Access_Desc"
class="inputbox"
size="1"
default=""/>
<field
id="con_position"
name="con_position"
type="text"
label="Contact_Information_Position_Label"
description="Contact_Information_Position_Desc"
class="inputbox"
size="30"
default=""/>
<field
id="email_to"
name="email_to"
type="text"
label="Contact_Information_Email_Label"
description="Contact_Information_Email_Desc"
class="inputbox"
size="30"
default=""/>
<field
id="address"
name="address"
type="textarea"
label="Contact_Information_Address_Label"
description="Contact_Information_Address_Desc"
class="inputbox"
rows="3"
cols="30"
default=""/>
<field
id="suburb"
name="suburb"
type="text"
label="Contact_Information_Suburb_Label"
description="Contact_Information_Suburb_Desc"
class="inputbox"
size="30"
default=""/>
<field
id="state"
name="state"
type="text"
label="Contact_Information_State_Label"
description="Contact_Information_State_Desc"
class="inputbox"
size="30"
default=""/>
<field
id="postcode"
name="postcode"
type="text"
label="Contact_Information_Postcode_Label"
description="Contact_Information_Postcode_Desc"
class="inputbox"
size="30"
default=""/>
<field
id="country"
name="country"
type="text"
label="Contact_Information_Country_Label"
description="Contact_Information_Country_Desc"
class="inputbox"
size="30"
default=""/>
<field
id="telephone"
name="telephone"
type="text"
label="Contact_Information_Telephone_Label"
description="Contact_Information_Telephone_Desc"
class="inputbox"
size="30"
default=""/>
<field
id="mobile"
name="mobile"
type="text"
label="Contact_Information_Mobile_Label"
description="Contact_Information_Mobile_Desc"
class="inputbox"
size="30"
default=""/>
<field
id="webpage"
name="webpage"
type="text"
label="Contact_Information_Webpage_Label"
description="Contact_Information_Webpage_Desc"
class="inputbox"
size="30"
default=""/>
<field
id="misc"
name="misc"
type="editor"
label="Contact_Information_Misc_Label"
description="Contact_Information_Misc_Desc"
class="inputbox"
filter="safehtml"
buttons="pagebreak,readmore"
size="30"
default=""/>
<field
name="checked_out"
type="hidden"
filter="unset"/>
<field
name="checked_out_time"
type="hidden"
filter="unset"/>
<field
id="ordering"
name="ordering"
type="ordering"
class="inputbox"
default=""
label="Jfield_Ordering_Label"
description="JField_Ordering_Desc"/>
<field
id="metakey"
name="metakey"
type="textarea"
label="JField_Meta_Keywords_Label"
description="JField_Meta_Keywords_Desc"
class="inputbox"
rows="3"
cols="30"
default=""/>
<field
id="metadesc"
name="metadesc"
type="textarea"
label="JField_Meta_Description_Label"
description="JField_Meta_Description_Desc"
class="inputbox"
rows="3"
cols="30"
default=""/>
<field
id="language"
name="language"
type="text"
label="JField_Language_Label"
description="JField_Language_Desc"
class="inputbox"
size="10"
default=""/>
<field
id="xreference"
name="xreference"
type="text"
label="JField_Metadata_XReference_Label"
description="JField_Metadata_XReference_Desc"
class="inputbox"
size="30"
default=""/>
<field name="show_email_form"
type="radio"
default="1"
label="Contact_Email_Show_Form_Label"
description="Contact_Email_Show_Form_Desc">
<option value="0">Jcommon_Hide</option>
<option value="1">Jcommon_Show</option>
</field>
<field
name="email_description"
type="text"
size="30"
default=""
label="Contact_Email_Description_Text_Label"
description="Contact_Email_Description_Text_Desc" />
<field
name="show_email_copy"
type="radio"
default="1"
label="Contact_Email_Email_Copy_Label"
description="Contact_Email_Email_Copy_Desc">
<option value="0">Jcommon_Hide</option>
<option value="1">Jcommon_Show</option>
</field>
<field
name="banned_email"
type="textarea"
default=""
label="Contact_Email_BANNED_EMAIL_LABEL"
rows="3"
cols="30"
description="Contact_Email_BANNED_EMAIL_DESC" />
<field
name="banned_subject"
type="textarea"
default=""
label="Contact_Email_BANNED_SUBJECT_LABEL"
rows="3"
cols="30"
description="Contact_Email_BANNED_SUBJECT_DESC" />
<field
name="banned_text"
type="textarea"
default=""
label="Contact_Email_BANNED_TEXT_LABEL"
rows="3"
cols="30"
description="Contact_Email_BANNED_TEXT_DESC" />
<field
name="redirect"
type="text"
default=""
size="30"
label="Contact_Email_Redirect_LABEL"
description="Contact_Email_Redirect_DESC" />
<field
name="contact_icons"
type="list"
default="0"
label="Icons/text"
description="PARAMCONTACTICONS">
<option value="0">CONTACT_ICONS_OPTIONS_NONE</option>
<option value="1">CONTACT_ICONS_OPTIONS_TEXT</option>
<option value="2">CONTACT_ICONS_OPTIONS_TEXT</option>
</field>
<field
name="icon_address"
type="media"
directory="/images/joomla"
hide_none="1"
default=""
label="Contact_Icons_Address_Label"
description="Contact_Icons_Address_Desc" />
<field
name="icon_email"
type="media"
directory="/images/joomla"
hide_none="1"
default=""
label="Contact_Icons_Email_Label"
description="Contact_Icons_Email_Desc" />
<field
name="icon_telephone"
type="media" directory="/images/joomla"
hide_none="1"
default=""
abel="Contact_Icons_Telephone_Label"
description="Contact_Icons_Telephone_Desc" />
<field
name="icon_mobile"
type="media"
directory="/images/joomla"
hide_none="1"
default=""
label="Contact_Icons_Mobile_Label"
description="Contact_Icons_Mobile_Desc" />
<field
name="icon_fax"
type="media"
directory="/images/joomla"
hide_none="1"
default=""
label="Contact_Icons_Fax_Label"
description="Contact_Icons_Fax_Desc" />
<field
name="icon_misc"
type="media"
directory="/images/joomla"
hide_none="1"
default=""
label="Contact_Icons_Misc_Label"
description="Contact_Icons_Misc_Desc" />
<field
id="metadata"
name="metadata"
type="textarea"
label="Contact_Metadata_Label"
description="Contact_Metadata_Desc"
class="inputbox"
rows="3"
cols="30"
default=""/>
</fields>
<fields
group="metadata"
array="true">
<field
name="robots"
type="text"
label="JField_Metadata_Robots_Label"
description="JField_Metadata_Robots_Desc"
size="20"/>
<field
name="author"
type="text"
label="JField_Metadata_Author_Label"
description="JField_Metadata_Author_Desc"
size="20"/>
<field
name="rights"
type="text"
label="JField_Metadata_Rights_Label"
description="JField_Metadata_Rights_Desc"
size="20"/>
</fields>
<fields
group="params"
array="true"
label="Contact_Parameters">
<field name="show_name" type="radio" default="1" label="Contact_Params_Name_Label" description="Contact_Params_Name_Desc">
<option value="0">Jcommon_Hide</option>
<option value="1">Jcommon_Show</option>
<option value="1">Jcommon_Use_Global</option>
</field>
<field name="show_position" type="radio" default="1" label="Contact_Params_Contact_Position_Label" description="Contact_Params_Name_Desc">
<option value="0">Jcommon_Hide</option>
<option value="1">Jcommon_Show</option>
<option value="1">Jcommon_Use_Global</option>
</field>
<field name="show_email" type="radio" default="0" label="Contact_Params_Contact_Position_E-mail_Label" description="Contact_Params_Name_Desc">
<option value="0">Jcommon_Hide</option>
<option value="1">Jcommon_Show</option>
<option value="1">Jcommon_Use_Global</option>
</field>
<field name="show_street_address" type="radio" default="1" label="Contact_Params_Street_Address_Label" description="Contact_Params_Name_Desc">
<option value="0">Jcommon_Hide</option>
<option value="1">Jcommon_Show</option>
<option value="1">Jcommon_Use_Global</option>
</field>
<field name="show_suburb" type="radio" default="1" label="Contact_Params_Town/Suburb_Label" description="Contact_Params_Name_Desc">
<option value="0">Jcommon_Hide</option>
<option value="1">Jcommon_Show</option>
<option value="1">Jcommon_Use_Global</option>
</field>
<field name="show_state" type="radio" default="1" label="Contact_Params_State/County_Label" description="Contact_Params_Name_Desc">
<option value="0">Jcommon_Hide</option>
<option value="1">Jcommon_Show</option>
<option value="1">Jcommon_Use_Global</option>
</field>
<field name="show_postcode" type="radio" default="1" label="Contact_Params_Post/Zip_Code_Label" description="Contact_Params_Name_Desc">
<option value="0">Jcommon_Hide</option>
<option value="1">Jcommon_Show</option>
<option value="1">Jcommon_Use_Global</option>
</field>
<field name="show_country" type="radio" default="1" label="Contact_Params_Country_Label" description="Contact_Params_Name_Desc">
<option value="0">Jcommon_Hide</option>
<option value="1">Jcommon_Show</option>
<option value="1">Jcommon_Use_Global</option>
</field>
<field name="show_telephone" type="radio" default="1" label="Contact_Params_Telephone_Label" description="Contact_Params_Name_Desc">
<option value="0">Jcommon_Hide</option>
<option value="1">Jcommon_Show</option>
<option value="1">Jcommon_Use_Global</option>
</field>
<field name="show_mobile" type="radio" default="1" label="Contact_Params_Mobile_Label" description="Contact_Params_Name_Desc">
<option value="0">Jcommon_Hide</option>
<option value="1">Jcommon_Show</option>
<option value="1">Jcommon_Use_Global</option>
</field>
<field name="show_fax" type="radio" default="1" label="Contact_Params_Fax_Label" description="Contact_Params_Name_Desc">
<option value="0">Jcommon_Hide</option>
<option value="1">Jcommon_Show</option>
<option value="1">Jcommon_Use_Global</option>
</field>
<field name="show_webpage" type="radio" default="1" label="Contact_Params_Webpage_Label" description="Contact_Params_Name_Desc">
<option value="0">Jcommon_Hide</option>
<option value="1">Jcommon_Show</option>
<option value="1">Jcommon_Use_Global</option>
</field>
<field name="show_misc" type="radio" default="1" label="Contact_Params_Misc Info_Label" description="Contact_Params_Name_Desc">
<option value="0">Jcommon_Hide</option>
<option value="1">Jcommon_Show</option>
<option value="1">Jcommon_Use_Global</option>
</field>
<field name="show_image" type="radio" default="1" label="Contact_Params_Image_Label" description="Contact_Params_Name_Desc">
<option value="0">Jcommon_Hide</option>
<option value="1">Jcommon_Show</option>
<option value="1">Jcommon_Use_Global</option>
</field>
<field name="allow_vcard" type="radio" default="0" label="Contact_Params_vCard_Label" description="Contact_Params_vCard_Label">
<option value="0">Jcommon_Hide</option>
<option value="1">Jcommon_Show</option>
<option value="1">Jcommon_Use_Global</option>
</field>
<field
id="show_articles"
name="show_articles"
label="Contact_Show_Articles_Label"
description="Contact_Show_Articles_Desc"
type="radio"
default="1">
<option value="0">Jcommon_Hide</option>
<option value="1">Jcommon_Show</option>
<option value="1">Jcommon_Use_Global</option>
</field>
<field
id="show_links"
name="show_links"
label="Contact_Show_Links_Label"
description="Contact_Show_Links_Desc"
type="radio"
default="1">
<option value="0">Jcommon_Hide</option>
<option value="1">Jcommon_Show</option>
<option value="1">Jcommon_Use_Global</option>
</field>
<field
id="linka_name"
name="linka_name"
type="text"
label="Contact_LInka_Name_Label"
description="Contact_Linka_Name_Desc"
class="inputbox"
size="30"
/>
<field
id="linka"
name="linka"
type="text"
label="Contact_LInka_Label"
description="Contact_Linka_Desc"
class="inputbox"
size="30"
default=""/>
<field
id="linkb_name"
name="linkb_name"
type="text"
label="Contact_LInkb_Name_Label"
description="Contact_Linkb_Name_Desc"
class="inputbox"
size="30"
/>
<field
id="linkb"
name="linkb"
type="text"
label="Contact_LInkb_Label"
description="Contact_Linkb_Desc"
class="inputbox"
size="30"
default=""/>
<field
id="linkc_name"
name="linkc_name"
type="text"
label="Contact_LInkc_Name_Label"
description="Contact_Linkc_Name_Desc"
class="inputbox"
size="30"
/>
<field
id="linkc"
name="linkc"
type="text"
label="Contact_LInkc_Label"
description="Contact_Linkc_Desc"
class="inputbox"
size="30"
default=""/>
<field
id="linkd_name"
name="linkd_name"
type="text"
label="Contact_LInkd_Name_Label"
description="Contact_Linkd_Name_Desc"
class="inputbox"
size="30"
/>
<field
id="linkd"
name="linkd"
type="text"
label="Contact_LInkd_Label"
description="Contact_Linkd_Desc"
class="inputbox"
size="30"
default=""/>
<field
id="linke_name"
name="linke_name"
type="text"
label="Contact_LInke_Name_Label"
description="Contact_Linke_Name_Desc"
class="inputbox"
size="30"
/>
<field
id="linke"
name="linke"
type="text"
label="Contact_LInke_Label"
description="Contact_Linke_Desc"
class="inputbox"
size="30"
default=""/>
</fields>
</form>

View File

@ -0,0 +1 @@
<html><body></body></html>

View File

@ -0,0 +1 @@
<html><body></body></html>

View File

@ -15,69 +15,111 @@ defined('_JEXEC') or die;
* @package Joomla.Administrator
* @subpackage Contact
*/
class TableContact extends JTable
class ContactTableContact extends JTable
{
/** @var int Primary key */
var $id = null;
public $id = null;
/** @var string */
var $name = null;
public $name = null;
/** @var string */
var $alias = null;
public $alias = null;
/** @var string */
var $con_position = null;
public $con_position = null;
/** @var string */
var $address = null;
public $address = null;
/** @var string */
var $suburb = null;
public $suburb = null;
/** @var string */
var $state = null;
public $state = null;
/** @var string */
var $country = null;
public $country = null;
/** @var string */
var $postcode = null;
public $postcode = null;
/** @var string */
var $telephone = null;
public $telephone = null;
/** @var string */
var $fax = null;
public $fax = null;
/** @var string */
var $misc = null;
public $misc = null;
/** @var string */
var $image = null;
public $image = null;
/** @var string */
var $imagepos = null;
public $imagepos = null;
/** @var string */
var $email_to = null;
public $email_to = null;
/** @var int */
var $default_con = null;
public $default_con = null;
/** @var int */
var $published = 0;
public $published = 0;
/** @var int */
var $checked_out = 0;
public $checked_out = 0;
/** @var datetime */
var $checked_out_time = 0;
public $checked_out_time = 0;
/** @var int */
var $ordering = null;
public $ordering = null;
/** @var string */
var $params = null;
public $params = null;
/** @var int A link to a registered user */
var $user_id = null;
public $user_id = null;
/** @var int A link to a category */
var $catid = null;
public $catid = null;
/** @var int */
var $access = null;
public $access = null;
/** @var string Mobile phone number(s) */
var $mobile = null;
public $mobile = null;
/** @var string */
var $webpage = null;
public $webpage = null;
/** @var string */
protected $_trackAssets = true;
/**
* @param database A database connector object
*/
function __construct(&$db)
* Constructor
*
* @param object Database connector object
* @since 1.0
*/
public function __construct(& $db)
{
parent::__construct('#__contact_details', 'id', $db);
}
$this->access = (int)JFactory::getConfig()->getValue('access');
public function getAssetSection()
{
return 'com_contact';
}
public function getAssetNamePrefix()
{
return 'contact';
}
public function getAssetTitle()
{
return $this->name;
}
/**
* Stores a contact
*
* @param boolean $updateNulls Toggle whether null values should be updated.
* @return boolean True on success, false on failure.
* @since 1.6
*/
public function store($updateNulls = false)
{
// Transform the params field
if (is_array($this->params)) {
$registry = new JRegistry();
$registry->loadArray($this->params);
$this->params = $registry->toString();
}
// Transform the metadata field
if (is_array($this->metadata)) {
$registry = new JRegistry();
$registry->loadArray($this->metadata);
$this->metadata = $registry->toString();
}
// Attempt to store the data.
return parent::store($updateNulls);
}
/**
@ -93,24 +135,52 @@ class TableContact extends JTable
$this->default_con = intval($this->default_con);
if (JFilterInput::checkAttribute(array ('href', $this->webpage))) {
$this->setError(JText::_('Please provide a valid URL'));
$this->setError(JText::_('CONTACT_WARNING_PROVIDE_VALID_URL'));
return false;
}
// check for http on webpage
if (strlen($this->webpage) > 0 && (!(eregi('http://', $this->webpage) || (eregi('https://', $this->webpage)) || (eregi('ftp://', $this->webpage))))) {
$this->webpage = 'http://'.$this->webpage;
$this->webpage = 'http://'.$this->contact->params->get('linka');
}
// check for http on additional links
if (empty($this->alias)) {
$this->alias = $this->name;
}
$this->alias = JFilterOutput::stringURLSafe($this->alias);
if (trim(str_replace('-','',$this->alias)) == '') {
$datenow = &JFactory::getDate();
$this->alias = $datenow->toFormat("%Y-%m-%d-%H-%M-%S");
}
/** check for valid name */
if (trim($this->name) == '') {
$this->setError(JText::_('CONTACT_WARNING_NAME'));
return false;
}
/** check for existing name */
$query = 'SELECT id FROM #__contact_details WHERE name = '.$this->_db->Quote($this->name).' AND catid = '.(int) $this->catid;
$this->_db->setQuery($query);
$xid = intval($this->_db->loadResult());
if ($xid && $xid != intval($this->id)) {
$this->setError(JText::sprintf('Contact_Warning_Same_Name', JText::_('Contact')));
return false;
}
if (empty($this->alias)) {
$this->alias = $this->title;
}
$this->alias = JFilterOutput::stringURLSafe($this->alias);
if (trim(str_replace('-','',$this->alias)) == '') {
$datenow = &JFactory::getDate();
$this->alias = $datenow->toFormat("%Y-%m-%d-%H-%M-%S");
}
/** check for valid category */
if (trim($this->catid) == '') {
$this->setError(JText::_('CONTACT_WARNING_CATEGORY'));
return false;
}
return true;
}
}

View File

@ -1 +1 @@
<html><body></body></html>
<html><body></body></html>

View File

@ -1,28 +0,0 @@
<?php
/**
* @version $Id$
* @package Joomla.Administrator
* @subpackage Contact
* @copyright Copyright (C) 2005 - 2009 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
// no direct access
defined('_JEXEC') or die;
require_once(JApplicationHelper::getPath('toolbar_html'));
switch ($task)
{
case 'add' :
TOOLBAR_contact::_EDIT(false);
break;
case 'edit' :
case 'editA':
TOOLBAR_contact::_EDIT(true);
break;
default:
TOOLBAR_contact::_DEFAULT();
break;
}

View File

@ -0,0 +1 @@
<html><body></body></html>

View File

@ -0,0 +1,181 @@
<?php
/**
* @version $Id: edit.php 12295 2009-06-22 11:10:18Z eddieajau $
* @package Joomla.Administrator
* @subpackage com_contact
* @copyright Copyright (C) 2005 - 2009 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
// no direct access
defined('_JEXEC') or die;
jimport('joomla.html.pane');
$pane = &JPane::getInstance('sliders', array('allowAllClose' => true));
// Include the component HTML helpers.
JHtml::addIncludePath(JPATH_COMPONENT.DS.'helpers'.DS.'html');
JHtml::_('behavior.tooltip');
JHtml::_('behavior.formvalidation');
?>
<script type="text/javascript">
<!--
function submitbutton(task)
{
if (task == 'contact.cancel' || document.formvalidator.isValid($('contact-form'))) {
}
// @todo Deal with the editor methods
submitform(task);
}
// -->
</script>
<form action="<?php JRoute::_('index.php?option=com_contact'); ?>" method="post" name="adminForm" id="contact-form" class="form-validate">
<div class="col width-50">
<fieldset>
<legend><?php echo empty($this->item->id) ? JText::_('Contact_New_Contact') : JText::sprintf('Contact_Edit_Contact', $this->item->id); ?></legend>
<div>
<?php echo $this->form->getLabel('name'); ?><br />
<?php echo $this->form->getInput('name'); ?>
</div>
<div>
<?php echo $this->form->getLabel('alias'); ?><br />
<?php echo $this->form->getInput('alias'); ?>
</div>
<div>
<?php echo $this->form->getLabel('user_id'); ?><br />
<?php echo $this->form->getInput('user_id'); ?>
</div>
<div>
<?php echo $this->form->getLabel('access'); ?><br />
<?php echo $this->form->getInput('access'); ?>
</div>
<div>
<?php echo $this->form->getLabel('published'); ?><br />
<?php echo $this->form->getInput('published'); ?>
</div>
<div>
<?php echo $this->form->getLabel('catid'); ?><br />
<?php echo $this->form->getInput('catid'); ?>
</div>
<div>
<?php echo $this->form->getLabel('ordering'); ?><br />
<?php echo $this->form->getInput('ordering'); ?>
</div>
</fieldset>
</div>
<div class="col width-50">
<div style="float:left">
<?php echo $pane->startPane('contact-pane'); ?>
<?php echo $pane->startPanel(JText::_('Contact_Details'), 'basic-options'); ?>
<legend><?php echo empty($this->item->id) ? JText::_('Contact_Contact_Details') : JText::sprintf('Contact_Edit_Details', $this->item->id); ?></legend>
<ol>
<li>
<?php echo $this->form->getLabel('con_position'); ?><br />
<?php echo $this->form->getInput('con_position'); ?>
</li>
<li>
<?php echo $this->form->getLabel('email_to'); ?><br />
<?php echo $this->form->getInput('email_to'); ?>
</li>
<li>
<?php echo $this->form->getLabel('address'); ?><br />
<?php echo $this->form->getInput('address'); ?>
</li>
<li>
<?php echo $this->form->getLabel('suburb'); ?><br />
<?php echo $this->form->getInput('suburb'); ?>
</li>
<li>
<?php echo $this->form->getLabel('state'); ?><br />
<?php echo $this->form->getInput('state'); ?>
</li>
<li>
<?php echo $this->form->getLabel('postcode'); ?><br />
<?php echo $this->form->getInput('postcode'); ?>
</li>
<li>
<?php echo $this->form->getLabel('country'); ?><br />
<?php echo $this->form->getInput('country'); ?>
</li>
<li>
<?php echo $this->form->getLabel('telephone'); ?><br />
<?php echo $this->form->getInput('telephone'); ?>
</li>
<li>
<?php echo $this->form->getLabel('mobile'); ?><br />
<?php echo $this->form->getInput('mobile'); ?>
</li>
<li>
<?php echo $this->form->getLabel('webpage'); ?><br />
<?php echo $this->form->getInput('webpage'); ?>
</li>
<li>
<?php echo $this->form->getLabel('misc'); ?><br />
<?php echo $this->form->getInput('misc'); ?>
</li>
</ol>
<?php echo $pane->endPanel(); ?>
<?php echo $pane->startPanel(JText::_('Contact_Fieldset_Options'), 'display-options'); ?>
<legend><?php echo empty($this->item->id) ? JText::_('Contact_Display_Details') : JText::sprintf('Contact_Display_Details', $this->item->id); ?></legend>
<table>
<?php foreach($this->form->getFields('params') as $field): ?>
<?php if ($field->hidden): ?>
<?php echo $field->input; ?>
<?php else: ?>
<tr><td class="paramlist_key" width="40%">
<?php echo $field->label; ?>
</td>
<td class="paramlist_value">
<?php echo $field->input; ?>
</td>
</tr>
<?php endif; ?>
<?php endforeach; ?>
</table>
<?php echo $pane->endPanel(); ?>
<?php echo $pane->startPanel(JText::_('Contact_Fieldset_Contact_Form'), 'email-options'); ?>
<ol>
<li>
<?php echo $this->form->getLabel('show_email_form'); ?><br />
<?php echo $this->form->getInput('show_email_form'); ?>
</li>
<li>
<?php echo $this->form->getLabel('email_description'); ?><br />
<?php echo $this->form->getInput('email_description'); ?>
</li>
<li>
<?php echo $this->form->getLabel('show_email_copy'); ?><br />
<?php echo $this->form->getInput('show_email_copy'); ?>
</li>
<li>
<?php echo $this->form->getLabel('banned_email'); ?><br />
<?php echo $this->form->getInput('banned_email'); ?>
</li>
<li>
<?php echo $this->form->getLabel('banned_subject'); ?><br />
<?php echo $this->form->getInput('banned_subject'); ?>
</li>
<li>
<?php echo $this->form->getLabel('banned_text'); ?><br />
<?php echo $this->form->getInput('banned_text'); ?>
</li>
<ol>
<?php echo $pane->endPanel(); ?>
<?php echo $pane->endPane(); ?>
</div>
<input type="hidden" name="task" value="" />
<?php echo JHtml::_('form.token'); ?>
</form>

View File

@ -0,0 +1 @@
<html><body></body></html>

View File

@ -0,0 +1,81 @@
<?php
/**
* @version $Id: view.html.php 11952 2009-06-01 03:21:19Z robs $
* @copyright Copyright (C) 2005 - 2009 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
// No direct access
defined('_JEXEC') or die;
jimport('joomla.application.component.view');
/**
* HTML View class for the Contact component
*
* @package Joomla.Administrator
* @subpackage com_contact
* @since 1.5
*/
class ContactViewContact extends JView
{
/**
* Display the view
*/
function display($tpl = null)
{
$app = &JFactory::getApplication();
$state = $this->get('state');
$item = $this->get('item');
$form = $this->get('form');
// Check for errors.
if (count($errors = $this->get('Errors'))) {
JError::raiseError(500, implode("\n", $errors));
return false;
}
// Bind the label to the form.
$form->bind($item);
$this->assignRef('state', $state);
$this->assignRef('item', $item);
$this->assignRef('form', $form);
$this->_setToolbar();
parent::display($tpl);
JRequest::setVar('hidemainmenu', true);
}
/**
* Setup the Toolbar
*
* @since 1.6
*/
protected function _setToolbar()
{
$user = &JFactory::getUser();
$isNew = ($this->item->id == 0);
$checkedOut = !($this->item->checked_out == 0 || $this->item->checked_out == $user->get('id'));
JRequest::setVar('hidemainmenu', 1);
JToolBarHelper::title(JText::_('Contact_Manager_Contact'));
JToolBarHelper::save('contact.save');
JToolBarHelper::apply('contact.apply');
JToolBarHelper::addNew('contact.save2new', 'JToolbar_Save_and_new');
// If an existing item, can save to a copy.
if (!$isNew) {
JToolBarHelper::custom('contact.save2copy','copy.png', 'new_f2.png', 'JToolbar_Save_as_copy',false );
}
if (empty($this->item->id)) {
JToolBarHelper::cancel('contact.cancel'.'JToolbar_Cancel');
}
else {
JToolBarHelper::cancel('contact.cancel', 'JToolbar_Close');
}
JToolBarHelper::divider();
JToolBarHelper::help('screen.contact.edit'.'JToolbar_Help');
}
}

View File

@ -0,0 +1 @@
<html><body></body></html>

View File

@ -0,0 +1,143 @@
<?php
/**
* @version
* @package Joomla.Administrator
* @subpackage com_contact
* @copyright Copyright (C) 2005 - 2009 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
// no direct access
defined('_JEXEC') or die;
JHtml::addIncludePath(JPATH_COMPONENT.DS.'helpers'.DS.'html');
JHtml::_('behavior.tooltip');
JHtml::_('script', 'multiselect.js');
$user = &JFactory::getUser();
$userId = $user->get('id');
?>
<form action="<?php echo JRoute::_('index.php?option=com_contact'); ?>" method="post" name="adminForm" id="adminForm">
<fieldset class="filter">
<div class="left">
<label for="search">
<?php echo JText::_('JSearch_Filter'); ?>
</label>
<input type="text" name="filter_search" id="search" value="<?php echo $this->state->get('filter.search'); ?>" size="60" title="<?php echo JText::_('Contact_Search_in_name'); ?>" />
<button type="submit">
<?php echo JText::_('JSearch_Filter_Submit'); ?></button>
<button type="button" onclick="$('search').value='';this.form.submit();">
<?php echo JText::_('JSearch_Filter_Clear'); ?></button>
</div>
<div class="right">
<select name="filter_access" class="inputbox" onchange="this.form.submit()">
<option value=""><?php echo JText::_('JOption_Select_Access');?></option>
<?php echo JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text', $this->state->get('filter.access'));?>
</select>
<select name="filter_published" class="inputbox" onchange="this.form.submit()">
<option value=""><?php echo JText::_('JOption_Select_Published');?></option>
<?php echo JHtml::_('select.options', JHtml::_('jgrid.publishedOptions'), 'value', 'text', $this->state->get('filter.published'), true);?>
</select>
<select name="filter_category_id" class="inputbox" onchange="this.form.submit()">
<option value=""><?php echo JText::_('JOption_Select_Category');?></option>
<?php echo JHtml::_('select.options', JHtml::_('category.options', 'com_contact'), 'value', 'text', $this->state->get('filter.category_id'));?>
</select>
</div>
</fieldset>
<table class="adminlist">
<thead>
<tr>
<th width="5">
<?php echo JText::_('JGrid_Heading_Row_Number'); ?>
</th>
<th width="20">
<input type="checkbox" name="toggle" value="" onclick="checkAll(<?php echo count($this->items); ?>);" />
</th>
<th class="title">
<?php echo JHtml::_('grid.sort', 'Contact_Title_Heading', 'a.title', $this->state->get('list.direction'), $this->state->get('list.ordering')); ?>
</th>
<th width="5%" nowrap="nowrap">
<?php echo JHtml::_('grid.sort', 'Contact_State_Heading', 'a.state', $this->state->get('list.direction'), $this->state->get('list.ordering')); ?>
</th>
<th width="10%" nowrap="nowrap">
<?php echo JHtml::_('grid.sort', 'Contact_Order_Heading', 'a.ordering', $this->state->get('list.direction'), $this->state->get('list.ordering')); ?>
<?php echo JHtml::_('grid.order', $this->items); ?>
</th>
<th width="10%" class="title">
<?php echo JHtml::_('grid.sort', 'Contact_Category_Heading', 'category', $this->state->get('list.direction'), $this->state->get('list.ordering')); ?>
</th>
<th width="10%" class="title">
<?php echo JHtml::_('grid.sort', 'Contact_Access_Heading', 'access_level', $this->state->get('list.direction'), $this->state->get('list.ordering')); ?>
</th>
<th width="1%" nowrap="nowrap">
<?php echo JHtml::_('grid.sort', 'JGrid_Heading_ID', 'a.id', $this->state->get('list.direction'), $this->state->get('list.ordering')); ?>
</th>
</tr>
</thead>
<tfoot>
<tr>
<td colspan="9">
<?php echo $this->pagination->getListFooter(); ?>
</td>
</tr>
</tfoot>
<tbody>
<?php
$n = count($this->items);
foreach ($this->items as $i => $item) :
$ordering = ($this->state->get('list.ordering') == 'a.ordering');
$checkedOut = JTable::isCheckedOut($userId, $item->checked_out);
$item->cat_link = JRoute::_('index.php?option=com_categories&extension=com_contact&task=edit&type=other&cid[]='. $item->catid);
?>
<tr class="row<?php echo $i % 2; ?>">
<td>
<?php echo $this->pagination->getRowOffset($i); ?>
</td>
<td>
<?php echo JHtml::_('grid.checkedout', $item, $i); ?>
</td>
<td>
<?php if (JTable::isCheckedOut($userId, $item->checked_out)) : ?>
<?php echo $item->title; ?>
<?php else : ?>
<span >
<a href="<?php echo JRoute::_('index.php?option=com_contact&task=contact.edit&cid[]='.(int) $item->id); ?>">
<?php echo $this->escape($item->name) ?></a></span>
<?php endif; ?>
<br /><small><?php echo $this->escape($item->alias);?></small>
</td>
<td align="center">
<?php echo JHtml::_('jgrid.published', $item->published, $i, 'contacts.');?>
</td>
<td class="order">
<span><?php echo $this->pagination->orderUpIcon($i, ($item->catid == @$this->items[$i-1]->catid),'contact.orderup', 'JGrid_Move_Up', $ordering); ?></span>
<span><?php echo $this->pagination->orderDownIcon($i, $n, ($item->catid == @$this->items[$i+1]->catid), 'contact.orderdown', 'JGrid_Move_Down', $ordering); ?></span>
<?php $disabled = $ordering ? '' : 'disabled="disabled"'; ?>
<input type="text" name="order[]" size="5" value="<?php echo $item->ordering;?>" <?php echo $disabled ?> class="text_area" style="text-align: center" />
</td>
<td>
<span >
<?php echo $item->category_title; ?></span>
</td>
<td align="center">
<?php echo $item->access_level; ?>
</td>
<td align="center">
<?php echo $item->id; ?>
</td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
<input type="hidden" name="task" value="" />
<input type="hidden" name="boxchecked" value="0" />
<input type="hidden" name="filter_order" value="<?php echo $this->state->get('list.ordering'); ?>" />
<input type="hidden" name="filter_order_Dir" value="<?php echo $this->state->get('list.direction'); ?>" />
<?php echo JHtml::_('form.token'); ?>
</form>

View File

@ -0,0 +1,2 @@
<html><body></body></html>
<html><body></body></html>

View File

@ -0,0 +1,112 @@
<?php
/**
* @version $Id: modal.php 12504 2009-07-07 06:39:05Z eddieajau $
* @package Joomla.Administrator
* @subpackage com_content
* @copyright Copyright (C) 2005 - 2009 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
// no direct access
defined('_JEXEC') or die;
JHtml::addIncludePath(JPATH_COMPONENT.DS.'helpers'.DS.'html');
JHtml::_('behavior.tooltip');
$function = JRequest::getVar('function', 'jSelectArticle');
?>
<form action="<?php echo JRoute::_('index.php?option=com_content&view=articles');?>" method="post" name="adminForm">
<fieldset class="filter clearfix">
<div class="left">
<label for="search">
<?php echo JText::_('JSearch_Filter_Label'); ?>
</label>
<input type="text" name="filter_search" id="filter_search" value="<?php echo $this->state->get('filter.search'); ?>" size="30" title="<?php echo JText::_('Content_Filter_Search_Desc'); ?>" />
<button type="submit">
<?php echo JText::_('JSearch_Filter_Submit'); ?></button>
<button type="button" onclick="$('filter_search').value='';this.form.submit();">
<?php echo JText::_('JSearch_Filter_Clear'); ?></button>
</div>
<div class="right">
<select name="filter_access" class="inputbox" onchange="this.form.submit()">
<option value=""><?php echo JText::_('JOption_Select_Access');?></option>
<?php echo JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text', $this->state->get('filter.access'));?>
</select>
<select name="filter_published" class="inputbox" onchange="this.form.submit()">
<option value=""><?php echo JText::_('JOption_Select_Published');?></option>
<?php echo JHtml::_('select.options', JHtml::_('jgrid.publishedOptions'), 'value', 'text', $this->state->get('filter.published'), true);?>
</select>
<select name="filter_category_id" class="inputbox" onchange="this.form.submit()">
<option value=""><?php echo JText::_('JOption_Select_Category');?></option>
<?php echo JHtml::_('select.options', JHtml::_('category.options', 'com_content'), 'value', 'text', $this->state->get('filter.category_id'));?>
</select>
</div>
</fieldset>
<table class="adminlist">
<thead>
<tr>
<th width="20">
<input type="checkbox" name="toggle" value="" onclick="checkAll(this)" />
</th>
<th class="title">
<?php echo JHtml::_('grid.sort', 'JGrid_Heading_Title', 'a.title', $this->state->get('list.direction'), $this->state->get('list.ordering')); ?>
</th>
<th width="5%">
<?php echo JHtml::_('grid.sort', 'JGrid_Heading_Category', 'a.catid', $this->state->get('list.direction'), $this->state->get('list.ordering')); ?>
</th>
<th width="10%">
<?php echo JHtml::_('grid.sort', 'JGrid_Heading_Access', 'category', $this->state->get('list.direction'), $this->state->get('list.ordering')); ?>
</th>
<th width="5%">
<?php echo JHtml::_('grid.sort', 'Content_Heading_Date', 'a.created', $this->state->get('list.direction'), $this->state->get('list.ordering')); ?>
</th>
<th width="1%" nowrap="nowrap">
<?php echo JHtml::_('grid.sort', 'JGrid_Heading_ID', 'a.id', $this->state->get('list.direction'), $this->state->get('list.ordering')); ?>
</th>
</tr>
</thead>
<tfoot>
<tr>
<td colspan="15">
<?php echo $this->pagination->getListFooter(); ?>
</td>
</tr>
</tfoot>
<tbody>
<?php foreach ($this->items as $i => $item) : ?>
<tr class="row<?php echo $i % 2; ?>">
<td style="text-align:center">
<?php echo JHtml::_('grid.id', $i, $item->id); ?>
</td>
<td>
<a style="cursor: pointer;" onclick="if (window.parent) window.parent.<?php echo $function;?>('<?php echo $item->id; ?>', '<?php echo $this->escape($item->title); ?>');">
<?php echo $this->escape($item->title); ?></a>
</td>
<td align="center">
<?php echo $this->escape($item->category_title); ?>
</td>
<td align="center">
<?php echo $this->escape($item->access_level); ?>
</td>
<td align="center">
<?php echo JHtml::date($item->created, '%Y.%m.%d'); ?>
</td>
<td align="center">
<?php echo (int) $item->id; ?>
</td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
<input type="hidden" name="task" value="" />
<input type="hidden" name="boxchecked" value="0" />
<input type="hidden" name="filter_order" value="<?php echo $this->state->get('list.ordering'); ?>" />
<input type="hidden" name="filter_order_Dir" value="<?php echo $this->state->get('list.direction'); ?>" />
<?php echo JHtml::_('form.token'); ?>
</form>

View File

@ -0,0 +1,82 @@
<?php
/**
* @version $Id: view.html.php 11952 2009-06-01 03:21:19Z robs $
* @copyright Copyright (C) 2005 - 2009 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
// No direct access
defined('_JEXEC') or die;
jimport('joomla.application.component.view');
/**
* HTML View class for the Contacts component
*
* @package Joomla.Administrator
* @subpackage com_weblinks
* @since 1.5
*/
class ContactViewContacts extends JView
{
public $state;
public $items;
public $pagination;
/**
* Display the view
*
* @return void
*/
public function display($tpl = null)
{
$state = $this->get('state');
$items = $this->get('items');
$pagination = $this->get('pagination');
// Check for errors.
if (count($errors = $this->get('Errors'))) {
JError::raiseError(500, implode("\n", $errors));
return false;
}
// Preprocess the list of items to find ordering divisions.
// TODO: Complete the ordering stuff with nested sets
foreach ($items as $i => &$item)
{
$item->order_up = true;
$item->order_dn = true;
}
$this->assignRef('state', $state);
$this->assignRef('items', $items);
$this->assignRef('pagination', $pagination);
$this->_setToolbar();
parent::display($tpl);
}
/**
* Setup the Toolbar
*/
protected function _setToolbar()
{
$state = $this->get('state');
JToolBarHelper::title(JText::_('Contact_Manager_Contacts'), 'generic.png');
JToolBarHelper::addNew('contact.edit', 'JToolbar_New');
JToolBarHelper::editList('contact.edit','JToolbar_Edit');
JToolBarHelper::divider();
JToolBarHelper::publish('contacts.publish');
JToolBarHelper::unpublish('contacts.unpublish');
JToolBarHelper::archiveList('contacts.archive','JToolbar_Archive');
if ($state->get('filter.published') == -2) {
JToolBarHelper::deleteList('', 'contacts.delete');
}
else {
JToolBarHelper::trash('contacts.trash');
}
JToolBarHelper::divider();
JToolBarHelper::preferences('com_contact', '480', '570', 'JToolbar_Options');
JToolBarHelper::help('screen.contact');
}
}

View File

@ -0,0 +1 @@
<html><body></body></html>

View File

@ -96,7 +96,7 @@ class MenusControllerItem extends JController
{
// Check-out failed, go back to the list and display a notice.
$message = JText::sprintf('JError_Checkout_failed', $model->getError());
$this->setRedirect('index.php?option=com_menus&view=item&item_id='.$id, $message, 'error');
//$this->setRedirect('index.php?option=com_menus&view=item&item_id='.$id, $message, 'error');
return false;
}
}
@ -125,32 +125,34 @@ class MenusControllerItem extends JController
JRequest::checkToken() or jexit(JText::_('JInvalid_Token'));
// Initialize variables.
$app = &JFactory::getApplication();
// Get the previous menu item id (if any) and the current menu item id.
$previousId = (int) $app->getUserState('com_content.edit.item.id');
$model = &$this->getModel('Item');
// Get the previous row id.
$previousId = (int) $app->getUserState('com_menus.edit.item.id');
// If rows ids do not match, checkin previous row.
if ($model->checkin($previousId))
{
// Redirect to the list screen.
$this->setRedirect(JRoute::_('index.php?option=com_menus&view=items', false));
}
else
{
// Check-in failed
if (!$model->checkin($previousId)) {
// Check-in failed, go back to the menu item and display a notice.
$message = JText::sprintf('JError_Checkin_failed', $model->getError());
$this->setRedirect('index.php?option=com_menus&view=items', $message, 'error');
$this->setRedirect('index.php?option=com_content&view=item&layout=edit', $message, 'error');
return false;
}
// Clear the row edit information from the session.
// Clear the row edit information from the session.
$app->setUserState('com_menus.edit.item.id', null);
$app->setUserState('com_menus.edit.item.data', null);
$app->setUserState('com_menus.edit.item.type', null);
$app->setUserState('com_menus.edit.item.link', null);
}
// Redirect to the list screen.
$this->setRedirect(JRoute::_('index.php?option=com_menus&view=items', false));
}
/**
* Method to save a menu item.
*
@ -182,7 +184,7 @@ class MenusControllerItem extends JController
{
// Check-in failed, go back to the item and display a notice.
$message = JText::sprintf('JError_Checkin_saved', $model->getError());
$this->setRedirect('index.php?option=com_menus&view=item&layout=edit', $message, 'error');
// $this->setRedirect('index.php?option=com_menus&view=item&layout=edit', $message, 'error');
return false;
}
@ -259,7 +261,7 @@ class MenusControllerItem extends JController
// Redirect back to the edit screen.
$this->setMessage(JText::sprintf('JError_Save_failed', $model->getError()), 'notice');
$this->setRedirect(JRoute::_('index.php?option=com_menus&view=item&layout=edit', false));
// $this->setRedirect(JRoute::_('index.php?option=com_menus&view=item&layout=edit', false));
return false;
}
@ -268,7 +270,7 @@ class MenusControllerItem extends JController
{
// Check-in failed, go back to the row and display a notice.
$message = JText::sprintf('JError_Checkin_saved', $model->getError());
$this->setRedirect('index.php?option=com_menus&view=item&layout=edit', $message, 'error');
// $this->setRedirect('index.php?option=com_menus&view=item&layout=edit', $message, 'error');
return false;
}
@ -316,21 +318,45 @@ class MenusControllerItem extends JController
{
// Initialize variables.
$app = &JFactory::getApplication();
// Get the type.
$type = JRequest::getVar('type');
$type = json_decode(base64_decode($type));
$title = isset($type->title) ? $type->title : null;
if ($title != 'alias' && $title != 'separator' && $title != 'url') {
$title = 'component';
}
$app->setUserState('com_menus.edit.item.type', $title);
if ($title=='component'){
if (isset($type->request)) {
if (isset($type->request)) {
$app->setUserState('com_menus.edit.item.link', 'index.php?'.http_build_query($type->request));
$app->setUserState('com_menus.edit.item.link', 'index.php?option='. $type->request->option.'&view='. $type->request->view);
// $app->setUserState('com_menus.edit.item.id', $model->getState('item.id'));
// $app->setUserState('com_menus.edit.item.data', null);
//$app->setUserState('com_menus.edit.item.type', $type->type);
// $app->setUserState('com_menus.edit.item.link', null);
}
}
//If the type is alias you just need the item id from the menu item referenced.
else if ($title=='alias'){
$app->setUserState('com_menus.edit.item.link', 'index.php?Itemid=');
// $app->setUserState('com_menus.edit.item.id', $model->getState('item.id'));
// $app->setUserState('com_menus.edit.item.data', null);
//$app->setUserState('com_menus.edit.item.type', $type->type);
// $app->setUserState('com_menus.edit.item.link', null);
}
//else if ($title=='url'){
// $app->setUserState('com_menus.edit.item.link', null );
// $app->setUserState('com_menus.edit.item.id', $model->getState('item.id'));
// $app->setUserState('com_menus.edit.item.data', null);
//$app->setUserState('com_menus.edit.item.type', $type->type);
// $app->setUserState('com_menus.edit.item.link', null);
//}
$this->type=$type;
$this->setRedirect('index.php?option=com_menus&view=item&layout=edit');
}

View File

@ -0,0 +1,71 @@
<?php
/**
* @version $Id: menuparent.php 12220 2009-06-20 12:57:06Z eddieajau $
* @copyright Copyright (C) 2005 - 2009 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('JPATH_BASE') or die;
jimport('joomla.html.html');
require_once JPATH_LIBRARIES.DS.'joomla'.DS.'form'.DS.'fields'.DS.'list.php';
/**
* Form Field class for the Joomla Framework.
*
* @package Joomla.Administrator
* @subpackage com_menus
* @since 1.6
*/
//TODO add the menu name as the first level in the list display.
class JFormFieldAliasoptions extends JFormFieldList
{
/**
* The field type.
*
* @var string
*/
public $type = 'AliasOptions';
/**
* Method to get a list of options for a list input.
*
* @return array An array of JHtml options.
*/
protected function _getOptions()
{
$db = &JFactory::getDbo();
$query = new JQuery;
$query->select('a.id AS value,a.menutype AS menu,a.title AS text, a.level');
$query->from('#__menu AS a');
$query->join('LEFT', '`#__menu` AS b ON a.lft > b.lft AND a.rgt < b.rgt');
$query->where('a.title != "Menu_Item_Root"');
// Prevent parenting to of this item.
if ($parentId = $this->_form->getValue('parent_id')) {
$query->join('LEFT', '`#__menu` AS p ON p.id = '.(int) $parentId);
$query->where('(a.lft <= p.lft OR a.rgt >= p.rgt)');
}
$query->group('a.id');
$query->order('menu ASC,a.lft ASC');
// Get the options.
$db->setQuery($query);
$options = $db->loadObjectList();
// Check for a database error.
if ($db->getErrorNum()) {
JError::raiseWarning(500, $db->getErrorMsg());
}
// Pad the option text with spaces using depth level as a multiplier.
for ($i = 0, $n = count($options); $i < $n; $i++) {
$options[$i]->text = str_repeat('- ',$options[$i]->level).$options[$i]->text;
}
return $options;
}
}

View File

@ -83,7 +83,7 @@ class JFormFieldMenuType extends JFormFieldList
});
});");
$html[] = '<input type="text" readonly="readonly" value="'.$value.'"'.$size.$class.'>';
$html[] = '<input type="text" readonly="readonly" disabled="disabled" value="'.$value.'"'.$size.$class.'>';
$html[] = '<input type="button" class="modal" value="'.JText::_('Menus_Change_Linktype').'" rel="{handler:\'clone\', target:\'menu-types\'}">';
$html[] = '<input type="hidden" name="'.$this->inputName.'" value="'.htmlspecialchars($this->value).'">';
@ -102,21 +102,7 @@ class JFormFieldMenuType extends JFormFieldList
$html[] = '<dl class="menu_types">';
$html[] = ' <dt>'.JText::_('Menus_Type_System').'</dt>';
$html[] = ' <dd>';
$html[] = ' '.JText::_('Menus_Type_System_Desc');
$html[] = ' <ul>';
$html[] = ' <li>';
$html[] = ' <a class="choose_type" href="index.php?option=com_menus&amp;task=item.setType&amp;type='.base64_encode(json_encode(array('title'=>'url'))).'" title="'.JText::_('Menus_Type_External_URL_Desc').'">'.JText::_('Menus_Type_External_URL').'</a>';
$html[] = ' </li>';
$html[] = ' <li>';
$html[] = ' <a class="choose_type" href="index.php?option=com_menus&amp;task=item.setType&amp;type='.base64_encode(json_encode(array('title'=>'alias'))).'" title="'.JText::_('Menus_Type_Alias_Desc').'">'.JText::_('Menus_Type_Alias').'</a>';
$html[] = ' </li>';
$html[] = ' <li>';
$html[] = ' <a class="choose_type" href="index.php?option=com_menus&amp;task=item.setType&amp;type='.base64_encode(json_encode(array('title'=>'separator'))).'" title="'.JText::_('Menus_Type_Separator_Desc').'">'.JText::_('Menus_Type_Separator').'</a>';
$html[] = ' </li>';
$html[] = ' </ul>';
$html[] = ' </dd>';
foreach ($types as $name => $list)
{
@ -132,11 +118,26 @@ class JFormFieldMenuType extends JFormFieldList
$html[] = ' </ul>';
$html[] = ' </dd>';
}
$html[] = ' <dt>'.JText::_('Menus_Type_System').'</dt>';
$html[] = ' <dd>';
$html[] = ' '.JText::_('Menus_Type_System_Desc');
$html[] = ' <ul>';
$html[] = ' <li>';
$html[] = ' <a class="choose_type" href="index.php?option=com_menus&amp;task=item.setType&amp;type='.base64_encode(json_encode(array('title'=>'url'))).'" title="'.JText::_('Menus_Type_External_URL_Desc').'">'.JText::_('Menus_Type_External_URL').'</a>';
$html[] = ' </li>';
$html[] = ' <li>';
$html[] = ' <a class="choose_type" href="index.php?option=com_menus&amp;task=item.setType&amp;type='.base64_encode(json_encode(array('title'=>'alias'))).'" title="'.JText::_('Menus_Type_Alias_Desc').'">'.JText::_('Menus_Type_Alias').'</a>';
$html[] = ' </li>';
$html[] = ' <li>';
$html[] = ' <a class="choose_type" href="index.php?option=com_menus&amp;task=item.setType&amp;type='.base64_encode(json_encode(array('title'=>'separator'))).'" title="'.JText::_('Menus_Type_Separator_Desc').'">'.JText::_('Menus_Type_Separator').'</a>';
$html[] = ' </li>';
$html[] = ' </ul>';
$html[] = ' </dd>';
$html[] = '</dl>';
return implode("\n", $html);
}
}
/**
* Method to get the available menu item type options.
*

View File

@ -10,17 +10,18 @@
filter="int"
required="true"
readonly="true"/>
<field
id="title"
name="title"
type="text"
label="JField_Title_Label"
label="MENUS_ITEM_TITLE_LABEL"
description="Menus_Item_Title_Desc"
class="inputbox"
size="40"
required="true"/>
<field
id="alias"
name="alias"
@ -30,7 +31,17 @@
default=""
class="inputbox"
size="40"/>
<field
name="access"
type="accesslevels"
id="access"
class="inputbox"
label="JField_Access_Label"
description="JField_Access_Desc"
default="1"
filter="integer"/>
<field
id="link"
name="link"
@ -40,17 +51,16 @@
default=""
class="inputbox"
size="50"/>
<field
id="menutype"
name="menutype"
type="menus"
label="Menus_Item_MenuType_Label"
description="Menus_Item_MenuType_Desc"
default=""
label="Menus_Menu_Assigned_Label"
description="Menus_Menu_Assigned_Desc"
class="inputbox"
size="1"/>
default=""
required="true"
size="1" />
<field
id="type"
name="type"
@ -59,8 +69,8 @@
description="Menus_Item_Type_Desc"
default=""
class="inputbox"
required="true"
size="40" />
<field
name="published"
type="radio"
@ -97,7 +107,7 @@
<field
id="ordering"
name="ordering"
type="text"
type="ordering"
label="JField_Ordering_Label"
description="JField_Ordering_Desc"
default=""
@ -107,22 +117,16 @@
<field
id="browserNav"
name="browserNav"
type="text"
type="list"
label="Menus_Item_BrowserNav_Label"
description="Menus_Item_BrowserNav_Desc"
default=""
default="Parent"
filter="int"
class="inputbox"/>
<field
name="access"
type="accesslevels"
id="access"
class="inputbox"
label="JField_Access_Label"
description="JField_Access_Desc"
default="1"
filter="integer"/>
class="inputbox">
<option value="0">Menus_BrowserNav_Option_Parent</option>
<option value="1">Menus_BrowserNav_Option_New_With_Nav</option>
<option value="2">Menus_BrowserNav_Option_New_Without_Nav</option>
</field>
<field
@ -189,6 +193,6 @@
<field
name="rgt"
type="hidden"
filter="unset"/>
filter="unset"/>
</fields>
</form>
</form>

View File

@ -22,5 +22,19 @@
default=""/>
</fields>
<fields
label="Menus_Required_Fields_Label"
description="Menus_Required_Fields_Desc"
group="request">
</form>
<field
id="aliasoptions"
name="aliasoptions"
type="aliasoptions"
label="JMenu_Alias_Menu_Label"
description="JMenu_Alias_Menu_Desc"
required="true"
/>
</fields>
</form>

View File

@ -43,6 +43,14 @@
value="1">JYes</option>
</field>
<field
id="page_heading"
name="page_heading"
type="text"
label="Menus_Item_Page_Heading_Label"
description="Menus_Item_Page_Heading_Desc"
default=""/>
<field
id="page_heading"
name="page_heading"
@ -133,4 +141,4 @@
</fields>
</form>
</form>

View File

@ -0,0 +1,27 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Id: item_alias.xml 12477 2009-07-06 04:31:45Z eddieajau $ -->
<form>
<fields
label="Menus_Linktype_Options_Label"
description="">
<field
id="menu-anchor_title"
name="menu-anchor_title"
type="text"
label="Menus_Item_Anchor_Title_Label"
description="Menus_item_Anchor_Title_Desc"
default=""/>
<field
id="menu-anchor_css"
name="menu-anchor_css"
type="text"
label="Menus_Item_Anchor_CSS_Label"
description="Menus_item_Anchor_CSS_Desc"
default=""/>
</fields>
</form>

View File

@ -23,4 +23,4 @@
</fields>
</form>
</form>

View File

@ -67,8 +67,8 @@ class MenusModelItem extends JModelForm
}
$this->setState('item.menutype', $menuType);
if (!($type = $app->getUserState('com_menus.edit.item.type'))) {
$type = JRequest::getCmd('type', 'url');
if ($type = $app->getUserState('com_menus.edit.item.type')){
// $type = JRequest::getCmd('type', 'url');
}
$this->setState('item.type', $type);
@ -98,7 +98,7 @@ class MenusModelItem extends JModelForm
// Attempt to load the row.
$table->load($pk);
// Check for a table object error.
if ($error = $table->getError())
{
@ -130,6 +130,9 @@ class MenusModelItem extends JModelForm
{
case 'alias':
$table->component_id = 0;
$args = array();
parse_str(parse_url($table->link, PHP_URL_QUERY), $args);
break;
case 'separator':
@ -139,6 +142,8 @@ class MenusModelItem extends JModelForm
case 'url':
$table->component_id = 0;
parse_str(parse_url($table->link, PHP_URL_QUERY));
break;
case 'component':
@ -174,13 +179,30 @@ class MenusModelItem extends JModelForm
// Merge the request arguments in to the params for a component.
if ($table->type == 'component')
{
// Note that all request arguments become reserved parameter names.
$args = array();
parse_str(parse_url($table->link, PHP_URL_QUERY), $args);
$table->params = array_merge($table->params, $args);
}
if ($table->type == 'alias')
{
// Note that all request arguments become reserved parameter names.
$args = array();
parse_str(parse_url($table->link, PHP_URL_QUERY), $args);
$table->params = array_merge($table->params, $args);
}
if ($table->type == 'url')
{
// Note that all request arguments become reserved parameter names.
$args = array();
parse_str(parse_url($table->link, PHP_URL_QUERY), $args);
$table->params = array_merge($table->params, $args);
}
$result = JArrayHelper::toObject($table->getProperties(1), 'JObject');
return $result;
@ -257,6 +279,7 @@ class MenusModelItem extends JModelForm
}
// Initialise form with component view params if available.
if ($type == 'component')
{
// Parse the link arguments.
@ -269,7 +292,7 @@ class MenusModelItem extends JModelForm
// The option determines the base path to work with.
$option = $args['option'];
$base = JPATH_SITE.DS.'components'.DS.$option;
}
// Confirm a view is defined.
if (isset($args['view']))
{
@ -295,16 +318,16 @@ class MenusModelItem extends JModelForm
if(!$formFile)
{
// Check for the layout XML file.
// Check for the layout XML file.
$path = JPath::clean($base.DS.'views'.DS.$view.DS.'tmpl'.DS.$layout.'.xml');
if (JFile::exists($path)) {
$formFile = $path;
}
}
// }
// TODO: Now check for a view manifest file
// TODO: Now check for a component manifest file
}
}
}
if ($formFile)
{
@ -320,7 +343,9 @@ class MenusModelItem extends JModelForm
}
// Now load the component params.
$path = JPath::clean(JPATH_ADMINISTRATOR.DS.'components'.DS.$option.DS.'config.xml');
if ($isNew=false){
$path = JPath::clean(JPATH_ADMINISTRATOR.DS.'components'.DS. $option.DS.'config.xml');}
else $path='null';
if (JFile::exists($path))
{
if (empty($form))
@ -341,6 +366,7 @@ class MenusModelItem extends JModelForm
}
}
}
// If no component file found, or not a component, create the form.
if (empty($form))
@ -359,6 +385,7 @@ class MenusModelItem extends JModelForm
return $form;
}
/**
* Get the list of modules not in trash.
@ -619,7 +646,7 @@ class MenusModelItem extends JModelForm
}
/**
* Method to publish categories.
* Method to publish
*
* @param array The ids of the items to publish.
* @param int The value of the published state
@ -741,7 +768,7 @@ class MenusModelItem extends JModelForm
}
/**
* Method to perform batch operations on a category or a set of categories.
* Method to perform batch operations on an item or a set of items.
*
* @param array An array of commands to perform.
* @param array An array of category ids.

View File

@ -8,9 +8,11 @@
*/
defined('_JEXEC') or die;
jimport('joomla.html.pane');
$pane = &JPane::getInstance('sliders', array('allowAllClose' => true));
// Include the component HTML helpers.
JHtml::addIncludePath(JPATH_COMPONENT.'/helpers/html');
JHtml::addIncludePath(JPATH_COMPONENT.DS.'helpers'.DS.'html');
// Load the tooltip behavior.
JHtml::_('behavior.tooltip');
@ -30,59 +32,98 @@ JHtml::_('behavior.formvalidation');
<form action="<?php JRoute::_('index.php?option=com_menus'); ?>" method="post" name="adminForm" id="item-form" class="form-validate">
<div class="width-50 fltlft">
<div class="col width-50">
<fieldset>
<legend><?php echo JText::_('Menus_Item_Details');?></legend>
<?php echo $this->form->getLabel('title'); ?>
<?php echo $this->form->getInput('title'); ?>
<div>
<?php echo $this->form->getLabel('type'); ?>
<?php echo $this->form->getInput('type'); ?>
</div>
<div>
<?php echo $this->form->getLabel('title'); ?>
<?php echo $this->form->getInput('title'); ?>
</div>
<?php if ($this->item->type =='url'){ ?>
<div>
<?php echo $this->form->getLabel('link'); ?>
<?php echo $this->form->getInput('link'); ?>
</div>
<?php } ?>
<?php echo $this->form->getLabel('alias'); ?>
<?php echo $this->form->getInput('alias'); ?>
<?php echo $this->loadTemplate('required'); ?>
</fieldset>
</div>
<div class="col width-50" style="clear:right;">
<div style="float:left">
<?php echo $pane->startPane('menu-pane'); ?>
<?php echo $pane->startPanel(JText::_('Menu_Advanced_Menu_Options'), 'advanced-options'); ?>
<div>
<?php echo $this->form->getLabel('access'); ?>
<?php echo $this->form->getInput('access'); ?>
</div>
<div>
<?php echo $this->form->getLabel('published'); ?>
<?php echo $this->form->getInput('published'); ?>
</div>
<div>
<?php echo $this->form->getLabel('alias'); ?>
<?php echo $this->form->getInput('alias'); ?>
</div>
<div>
<?php echo $this->form->getLabel('parent_id'); ?>
<?php echo $this->form->getInput('parent_id'); ?>
</div>
<?php if ($this->item->type !=='url'){ ?>
<div>
<?php echo $this->form->getLabel('link'); ?>
<?php echo $this->form->getInput('link'); ?>
</div>
<?php } ?>
<div>
<?php echo $this->form->getLabel('home'); ?>
<?php echo $this->form->getInput('home'); ?>
</div>
<div>
<?php echo $this->form->getLabel('menutype'); ?>
<?php echo $this->form->getInput('menutype'); ?>
</div>
<div>
<?php echo $this->form->getLabel('browserNav'); ?>
<?php echo $this->form->getInput('browserNav'); ?>
</div>
<div>
<?php echo $this->form->getLabel('template_id'); ?>
<?php echo $this->form->getInput('template_id'); ?>
</div>
<?php echo $pane->endPanel(); ?>
<div class="clr"></div>
<?php echo $this->form->getLabel('menutype'); ?>
<?php echo $this->form->getInput('menutype'); ?>
<?php echo $this->form->getLabel('parent_id'); ?>
<?php echo $this->form->getInput('parent_id'); ?>
<?php echo $this->form->getLabel('link'); ?>
<?php echo $this->form->getInput('link'); ?>
<?php echo $this->form->getLabel('type'); ?>
<?php echo $this->form->getInput('type'); ?>
<?php echo $this->form->getLabel('published'); ?>
<?php echo $this->form->getInput('published'); ?>
<?php echo $this->form->getLabel('browserNav'); ?>
<?php echo $this->form->getInput('browserNav'); ?>
<?php echo $this->form->getLabel('access'); ?>
<?php echo $this->form->getInput('access'); ?>
<?php echo $this->form->getLabel('home'); ?>
<?php echo $this->form->getInput('home'); ?>
<?php echo $this->form->getLabel('template_id'); ?>
<?php echo $this->form->getInput('template_id'); ?>
</fieldset>
</div>
<?php //get the menu parameters that are automatically set but may be modified.
echo $this->loadTemplate('options'); ?>
<div class="clr"></div>
<?php //sliders for module selection
echo $pane->startPanel(JText::_('Menu_Item_Module_Assignment'), 'module-options'); ?>
<fieldset>
<div class="width-50 fltrt">
<?php echo $this->loadTemplate('options'); ?>
</div>
<?php echo $this->loadTemplate('modules'); ?>
</fieldset>
<?php echo $pane->endPanel(); ?>
</div>
<div class="width-50 clrlft" >
<fieldset>
<legend><?php echo JText::_('Menus_Item_Module_Assignment'); ?></legend>
<?php echo $this->loadTemplate('modules'); ?>
</fieldset>
</div>
<?php echo $pane->endPane(); ?>
</div>
<input type="hidden" name="task" value="" />
<?php echo $this->form->getInput('component_id'); ?>
<?php echo JHtml::_('form.token'); ?>

View File

@ -16,38 +16,42 @@ defined('_JEXEC') or die;
<th>
<?php echo JText::_('Menus_Heading_Assign_Module');?>
</th>
<th width="10%">
<?php echo JText::_('Menus_Heading_Assign_All');?>
<th width="120%">
<?php echo JText::_('Menus_Heading_Display');?>
</th>
<th width="10%">
<?php echo JText::_('Menus_Heading_Assign_Show');?>
</th>
<th width="10%">
<?php echo JText::_('Menus_Heading_Assign_Hide');?>
</th>
<th width="10%">
<?php echo JText::_('Menus_Heading_Assign_Ignore');?>
<th width="20%">
<?php echo JText::_('Menus_Heading_Edit_Link'); ?>
</th>
</thead>
<tbody>
<?php foreach ($this->modules as $i => &$module) : ?>
<tr class="row<?php echo $i % 2;?>">
<td>
<?php echo JText::sprintf('Menus_Item_Module_Access_Position', $this->escape($module->title), $this->escape($module->access_title), $this->escape($module->position));?>
</td>
<td align="center">
<input type="radio" name="menuid[<?php echo $module->id;?>]" value="0" <?php echo is_numeric($module->menuid) && $module->menuid == 0 ? 'checked="checked" ' : '';?>/>
</td>
<td align="center">
<input type="radio" name="menuid[<?php echo $module->id;?>]" value="1" <?php echo $module->menuid == $this->item->id ? 'checked="checked" ' : '';?>/>
</td>
<td align="center">
<input type="radio" name="menuid[<?php echo $module->id;?>]" value="-1" <?php echo $module->menuid == -$this->item->id ? 'checked="checked" ' : '';?>/>
</td>
<td align="center">
<input type="radio" name="menuid[<?php echo $module->id;?>]" value="" <?php echo !is_numeric($module->menuid) || (is_numeric($module->menuid) && $module->menuid != 0 && abs($module->menuid) != $this->item->id)? 'checked="checked" ' : '';?>/>
</td>
</tr>
<tr class="row<?php echo $i % 2;?>">
<td>
<?php echo JText::sprintf('Menus_Item_Module_Access_Position', $this->escape($module->title), $this->escape($module->access_title), $this->escape($module->position)); ?>
</td>
<td align="center">
<?php if (is_null($module->menuid)) {
echo JText::_('Menus_Module_Show_None');
} else if ($module->menuid != 0) {
echo JText::_('Menus_Module_Show_Varies');
} else {
echo JText::_('Menus_Module_Show_All');
} ?>
</td>
<td align="center">
<?php $document = &JFactory::getDocument();
$document->addScriptDeclaration($js); ?>
<?php
$link = 'index.php?option=com_modules&client=0&task=edit&cid[]='. $module->id.'&tmpl=component' ;
JHTML::_('behavior.modal', 'a.modal');
$html = ' <a class="modal" title="'.JText::_('Edit').'" href="'.$link.'" rel="{handler: \'iframe\', size: {x: 650, y: 375}}">'.JText::_('Edit_module_settings').'</a>';
echo $html;
?>
</td>
</tr>
<?php endforeach; ?>
</tbody>
</table>

View File

@ -11,36 +11,30 @@ defined('_JEXEC') or die;
jimport('joomla.html.pane');
$pane = &JPane::getInstance('sliders', array('allowAllClose' => true));
echo $pane->startPane('content-pane');
$fieldSets = $this->paramsform->getFieldsets();
foreach ($fieldSets as $name => $fieldSet) :
if (isset($fieldSet['hidden']) && $fieldSet['hidden'] == true) :
if (isset($fieldSet['hidden']) && $fieldSet['hidden'] == true || $name == 'request') :
continue;
endif;
$label = isset($fieldSet['label']) ? $fieldSet['label'] : 'Config_'.$name;
echo $pane->startPanel(JText::_($label), 'publishing-details');
if (isset($fieldSet['description'])) :
echo '<p class="tip" style="float:right;">'.JText::_($fieldSet['description']).'</p>';
endif;
?>
<?php
foreach ($this->paramsform->getFields($name) as $field) :
?>
<div class="paramrow" />
<?php echo $field->label; ?>
if (isset($fieldSet['description'])) :
echo '<p class="tip" style="float:right;">'.JText::_($fieldSet['description']).'</p>';
endif;
?>
<?php
foreach ($this->paramsform->getFields($name) as $field) :
?>
<div>
<?php echo $field->label; ?><br />
<?php echo $field->input; ?>
</div>
<?php
endforeach;
?>
<?php echo $field->input; ?>
</div>
<?php
endforeach;
?>
<div class="clr" /></div>
<?php
echo $pane->endPanel();
<br class="clr" />
<?php echo $pane->endPanel();
endforeach;
echo $pane->endPane();
?>

View File

@ -0,0 +1,28 @@
<?php
/**
* @version
* @package Joomla.Administrator
* @subpackage com_menus
* @copyright Copyright (C) 2005 - 2009 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
/*
* Get the request group fields and print them out..
*/
foreach ($this->paramsform->getFields('request') as $field) :
?>
<div>
<?php echo $field->label; ?></ br>
<?php echo $field->input; ?>
</div>
<?php
endforeach;
?>

View File

@ -113,8 +113,19 @@ $userId = $user->get('id');
<span><img src="templates/bluestork/images/menu/icon-16-default.png" alt="<?php echo JText::_('Default'); ?>" title="<?php echo JText::_('Default'); ?>" /></span>
<?php endif; ?>
<br /><small title="<?php echo $this->escape($item->path);?>">
(<?php echo JText::_('JFIELD_ALIAS_LABEL'); ?>: <?php echo $this->escape($item->alias);?>)</small>
<br /><small
title="<?php echo $this->escape($item->path);?>">
(<?php echo JText::_('JFIELD_ALIAS_LABEL') . ':' . $this->escape($item->alias)
.' - '.JText::_('MENUS_ITEM_TYPE_LABEL'); ?>:
<?php if ($item->component_id=='0'){
echo $this->escape($item->type);
}
else {
echo $this->escape($item->componentname);
}
;?>)
</small>
</td>
<td align="center">
<?php echo JHtml::_('jgrid.published', $item->published, $i, 'items.');?>

View File

@ -64,9 +64,11 @@ $return = base64_encode($uri->toString());
<?php echo JHtml::_('grid.id', $i, $item->id); ?>
</td>
<td>
<a href="<?php echo JRoute::_('index.php?option=com_menus&task=menu.edit&cid[]='.$item->id);?>" title="<?php echo $this->escape($item->description);?>">
<a href="<?php echo JRoute::_('index.php?option=com_menus&view=items&menutype='.$item->menutype) ?> ">
<?php echo $this->escape($item->title); ?></a>
<small>(<?php echo JText::_('MENUS_MENU_MENUTYPE_LABEL'); ?>: <?php echo $this->escape($item->menutype);?>)</small>
<small>( <?php echo JText::_('MENUS_MENU_MENUTYPE_LABEL') ?>
<?php echo '<a href="'. JRoute::_('index.php?option=com_menus&task=menu.edit&cid[]='.$item->id).' title='. $this->escape($item->description).'">'.
$this->escape($item->menutype).' </a>'; ?>)</small>
</td>
<td align="center">
<a href="<?php echo JRoute::_('index.php?option=com_menus&view=items&menutype='.$item->menutype.'&filter_published=1');?>">

View File

@ -48,6 +48,9 @@ class NewsfeedsController extends JController
$view->assignRef('document', $document);
$view->display();
// Load the submenu.
require_once JPATH_COMPONENT.DS.'helpers'.DS.'newsfeeds.php';
NewsfeedsHelper::addSubmenu($vName);
}
}
}

View File

@ -0,0 +1,38 @@
<?php
/**
* @version $Id: newsfeeds.php
* @copyright Copyright (C) 2005 - 2009 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
// No direct access
defined('_JEXEC') or die;
/**
* Weblinks helper.
*
* @package Joomla.Administrator
* @subpackage com_newsfeedss
* @since 1.6
*/
class NewsfeedsHelper
{
/**
* Configure the Linkbar.
*
* @param string The name of the active view.
*/
public static function addSubmenu($vName)
{
JSubMenuHelper::addEntry(
JText::_('Newsfeeds_Submenu_Newsfeeds'),
'index.php?option=com_newsfeeds&view=newsfeeds',
$vName == 'newsfeeds'
);
JSubMenuHelper::addEntry(
JText::_('Newsfeeds_Submenu_Categories'),
'index.php?option=com_categories&extension=com_newsfeeds',
$vName == 'categories'
);
}
}

View File

@ -122,7 +122,7 @@ $userId = $user->get('id');
<input type="text" name="order[]" size="5" value="<?php echo $item->ordering;?>" <?php echo $disabled ?> class="text_area" style="text-align: center" />
</td>
<td>
<span class="editlinktip hasTip" title="<?php echo JText::_('Edit Category');?>::<?php echo $item->category; ?>">
<span class="editlinktip hasTip" title="<?php echo JText::_('Newsfeeds_Edit_Category');?>::<?php echo $item->category; ?>">
<a href="<?php echo JRoute::_('index.php?option=com_newsfeeds&view=newsfeed&task=edit&cid[]='.$item->id); ?>" >
<?php echo $item->category; ?></a></span>
</td>

View File

@ -0,0 +1,15 @@
# $Id$
# Joomla! Project
# Copyright (C) 2005 - 2009 Open Source Matters. All rights reserved.
# License GNU General Public License version 2 or later; see LICENSE.txt, see LICENSE.php
# Note : All ini files need to be saved as UTF-8 - No BOM
CHECKED-IN=Checked in
CHECKED OUT ITEMS HAVE NOW BEEN ALL CHECKED IN=All checked out Items have now been checked in.
CHECKING TABLE=Checking table
DATABASE TABLE=Database table
DESCITEMCHECKEDIN=All checked out Items have now been checked in.
GLOBAL CHECK-IN=Global Check-in
ITEMS=Items
NUM OF ITEMS=# of Items
TICK=Tick

View File

@ -21,3 +21,4 @@ CATEGORIES_PARENT_DESC=Parent Desc
CATEGORIES_PARENT_LABEL=Parent
CATEGORIES_REBUILD_SUCCESS=Categories tree data successfully rebuilt.
CATEGORIES_ITEMS_SEARCH_FILTER=Search

View File

@ -125,10 +125,8 @@ CONFIG_SESSION_TIME_DESC=Session Time Desc
CONFIG_SESSION_TIME_LABEL=Session Time
CONFIG_SITE_NAME_DESC=Site Name Desc
CONFIG_SITE_NAME_LABEL=Site Name
CONFIG_SITENAME_PAGETITLES_DESC=Append the site name to all page titles.
CONFIG_SITENAME_PAGETITLES_LABEL=Site name in titles?
CONFIG_SITE_OFFLINE_DESC=Site Offline Desc
CONFIG_SITE_OFFLINE_LABEL=Site Offline
CONFIG_TEMP_PATH_DESC=Temp Path Desc

View File

@ -8,139 +8,271 @@ COM_CONTACTS=Contacts
EDIT_CONTACT=Edit Contact
ADD_NEW_CONTACT=Add New Contact
A CONTACTS CATEGORY=A Contact's Category
ACCESS=Access Level
ADDRESS ICON=Address Icon
ALIGNMENT OF THE IMAGE=Alignment of the image
BANNED EMAIL LABEL=Banned E-mail
BANNED EMAIL DESC=E-mail addresses containing any of the listed text will be banned. Separate different words with semi-colons (e.g. ban;text;etc.).
BANNED SUBJECT LABEL=Banned Subject
BANNED SUBJECT DESC=Subjects containing any of the listed text will be banned. Separate different words with semi-colons (e.g. ban;text;etc.).
BANNED TEXT LABEL=Banned Text
BANNED TEXT DESC=Text containing any of the listed text will be banned. Separate different words with semi-colons (e.g. ban;text;etc.).
CATEGORY DESCRIPTION=Category Description
CATEGORY LIST - CATEGORY=Category List - Category
CATEGORY LIST - SECTION=Category List - Section
CHANGED TO CONTACT SAVED=Changes to Contact saved
CHOOSE A CONTACT LAYOUT.=Choose a Contact Layout.
CHOOSE A CONTACT CATEGORY LAYOUT.=Choose a Contact Category Layout.
CONTACT CATEGORY LAYOUT=Contact Category Layout
CONTACTS CATEGORY LAYOUT=Contact Category Layout
CONTACT CATEGORY LAYOUT DESC=The Contact Category Layout displays all the published Contacts in a given Category.
CONTACT DETAILS=Contact Details
CONTACT ITEMS=Contact Items
CONTACT MANAGER=Contact Manager
CONTACT PARAMETERS=Contact Parameters
CONTACT'S POSITION=Contact's Position
CONTACT SAVED=Contact saved
COUNTRY=Country
CUSTOM REPLY=Custom Reply
CUSTOM REPLY DESC=Turns off the automated reply allowing for Plug-ins to handle integration with other systems.
DESCNEWITEMSLAST=New Contacts default to the last position. Ordering can be changed after this Contact is saved.
DESCPARAMWHENCLICKCONTAC=* These Parameters only control what you see when you click to view a Contact Item. *
DESCRIPTION TEXT=Description Text
DROP DOWN=Dropdown
E-MAIL=E-mail
E-MAIL PARAMETERS=E-mail Parameters
EDIT CONTACT=Edit Contact
EMAIL=E-mail
EMAIL COLUMN=E-mail Column
EMAIL COPY=E-mail Copy
EMAIL DESCRIPTION=E-mail Description
EMAIL FORM=E-mail Form
EMAIL ICON=E-mail Icon
ENABLE VCARD=Enable vCard
ENABLE VCARD SUPPORT FOR CONTACTS=Enable vCard support for Contacts
FAX COLUMN=Fax Column
FAX ICON=Fax Icon
SHOW CATEGORY IN BREADCRUMBS=Show the Category in Breadcrumbs
ICON FOR THE ADDRESS INFO=Icon for the Address information
ICON FOR THE EMAIL INFO=Icon for the E-mail information
ICON FOR THE FAX INFO=Icon for the Fax information
ICON FOR THE MISC INFO=Icon for the Miscellaneous information
ICON FOR THE MOBILE INFO=Icon for the Mobile information
ICON FOR THE TELEPHONE INFO=Icon for the Telephone information
ICONS/TEXT=Icons/Text
IMAGE=Contact Image
IMAGE ALIGN=Image Align
IMAGE INFO=Image Information
INFORMATION=Information
LIMIT BOX=Limit Box
LINKED TO USER=Linked to User
MISC ICON=Miscellaneous Icon
MISC INFO=Miscellaneous Information
MISCELLANEOUS INFO=Miscellaneous Information
MOBILE=Mobile Phone Number
MOBILE ICON=Mobile Icon
NEW CONTACT=New Contact
NO=No
NUM CATEGORY ITEMS=# Category Items
PARAMCONTACTICONS=Use icons, text or nothing next to the Contact information displayed
PARAMDROPDOWN=Show/Hide the dropdown select list in Contact view
PARAMEMAILCOPY=Show/Hide the checkbox to e-mail a copy to the sender's address
PARAMCATLIST=Show/Hide the list of Categories in the list view page
PARAMCATLISTCAT=Show/Hide the list of Categories in the table view page
PARAMCATDESC=Show/Hide the Category Description
PARAMNUMCATITEM=Show/Hide the number of Items in each Category
PARAMEMAILDESCTEXT=The description text for the e-mail form. If left blank, the _EMAIL_DESCRIPTION language definition will be used instead.
PARAMDESCTEXT=Description for this page. If left blank, it will load _WEBLINKS_DESC from your language file.
PARAMIMAGE=Image for this page must be located in the /images/stories folder. Default will load web_links.jpg. No Image will mean an image is not loaded
PARAMSHOWLIMIT=Show/Hide the Limit Box
PARAMSPECCAT=Shows Contacts from the selected Category only
POSITION COLUMN=Position Column
POST/ZIP CODE=Postal/Zip Code
POSTAL CODE/ZIP=Postal Code/ZIP
SAVE & NEW=Save & New
SAVE TO COPY=Save To Copy
SELECT AN ITEM TO=Select a Contact to
SELECT CATEGORY=Select Category
SELECT CONTACT=Select Contact
SESSION CHECK LABEL=Session Check
SESSION CHECK DESC=Check for existance of session cookie. This means that Users without cookies enabled will not be able to send emails.
SHOW CONTACT'S POSITION=Show Contact's Position
SHOW EMAIL ADDRESS=Show E-mail Address
SHOW FAX NUMBER=Show Fax Number
SHOW MOBILE NUMBER=Show Mobile Number
SHOW PAGE TITLE=Show Page Title
SHOW PHONE NUMBER=Show Telephone Number
SHOW TABLE HEADINGS=Show Table Headings
SHOW/HIDE THE CATEGORY IN THE BREADCRUMBS=Show/Hide the category in the breadcrumbs (pathway)
SHOW/HIDE THE COUNTRY INFO=Show/Hide the Country information
SHOW/HIDE THE CONTACT POSITION=Show/Hide the Contact Position
SHOW/HIDE THE DESCRIPTION TEXT BELOW=Show/Hide the Description Text below
SHOW/HIDE THE EMAIL ADDRESS=Show/Hide the e-mail address
SHOW/HIDE THE EMAIL TO FORM=Show/Hide the e-mail to form
SHOW/HIDE THE FAX INFO=Show/Hide the Fax information
SHOW/HIDE THE FAX NUMBER=Show/Hide the Fax Number
SHOW/HIDE THE IMAGE=Show/Hide the image
SHOW/HIDE THE MISCELLANEOUS INFO=Show/Hide the misc. information
SHOW/HIDE THE MOBILE INFO=Show/Hide the Mobile Phone information
SHOW/HIDE THE MOBILE NUMBER=Show/Hide the Mobile Phone Number
SHOW/HIDE THE NAME INFO=Show/Hide the Name information
SHOW/HIDE THE POSITION COLUMN=Show/Hide the Position column
SHOW/HIDE THE POSITION INFO=Show/Hide information about the Contact's position
SHOW/HIDE THE POST CODE INFO=Show/Hide the Postcode information
SHOW/HIDE THE STATE INFO=Show/Hide the State/County information
SHOW/HIDE THE STREET ADDRESS INFO=Show/Hide the Street address information
SHOW/HIDE THE SUBURB INFO=Show/Hide the City/Town/Suburb information
SHOW/HIDE THE TABLE HEADINGS=Show/Hide the Table Headings
SHOW/HIDE THE TELEPHONE INFO=Show/Hide the Telephone information
SHOW/HIDE THE TELEPHONE NUMBER=Show/Hide the Telephone Number
SHOW/HIDE THE WEBPAGE=Show/Hide the Contact's Web URL
SHOW/HIDE VCARD=Show/Hide vCard
SITE DEFAULT=Site Default
SPECIAL DEFINED CATEGORY=Special defined Category
STANDARD CONTACT LAYOUT=Standard Contact Layout
STANDARD CONTACT LAYOUT DESC=The standard Contact layout displays a single Contact's details.
STATE/COUNTY=State/County
STREET ADDRESS=Street Address
TABLE HEADINGS=Table Headings
THE CONTACT TO LINK TO=The Contact to link to
TELEPHONE COLUMN=Telephone Column
TELEPHONE ICON=Telephone Icon
THIS COMPONENT SHOWS A LISTING OF CONTACT INFORMATION=This Component shows a listing of Contact Information
TOWN/SUBURB=Town/Suburb
VCARD=vCard
WEBPAGE=Web URL
YES=Yes
YOU MUST PROVIDE A NAME.=You must provide a name for this Contact.
CONTACT_ACCESS_HEADING=Access
CONTACT_CATEGORY_HEADING=Category
CONTACT_ORDER_HEADING=Order
CONTACT_STATE_HEADING= State
CONTACT_TITLE_HEADING= Title
CONTACT_SEARCH_IN_NAME=Search contacts by name
CONTACT_SUBMENU_CATEGORIES=Contact Categories
CONTACT_SUBMENU_CONTACTS=Contacts
CONTACT_MANAGER_CONTACTS=Contact Manager
CONTACT_MANAGER_CONTACT=Contact
CONTACT_NAME_LABEL=Name (Required)
CONTACT_NEW_CONTACT=New Contact
CONTACT_OPTIONS=Options
CONTACT_FIELDSET_METADATA= Metadata
CONTACT_FIELDSET_OPTIONS=Display Options
CONTACT_FIELDSET_CONTACT_FORM=Contact Form Options
Contact_Details=Contact Details
CONTACT_DETAILS=Contact Information
CONTACT_EDIT_DETAILS=Edit contact information for display on the individual page.
CONTACT_DISPLAY_DETAILS=Display options for the individual contact page.
CONTACT_INFORMATION_ADDRESS_DESC=Contact's Address
CONTACT_INFORMATION_ADDRESS_LABEL=Address
CONTACT_INFORMATION_COUNTRY_DESC=Contact's Country
CONTACT_INFORMATION_COUNTRY_LABEL=Country
CONTACT_INFORMATION_EMAIL_DESC=Contact's Email
CONTACT_INFORMATION_EMAIL_LABEL=Email
CONTACT_INFORMATION_MISC_DESC=Contact's Miscellaneous Information
CONTACT_INFORMATION_MISC_LABEL=Other Information
CONTACT_INFORMATION_MOBILE_DESC=Contact's Mobile
CONTACT_INFORMATION_MOBILE_LABEL=Mobile
CONTACT_INFORMATION_POSITION_DESC=Contact's Position
CONTACT_INFORMATION_POSITION_LABEL=Position
CONTACT_INFORMATION_POSTCODE_DESC=Contact's Postal Code
CONTACT_INFORMATION_POSTCODE_LABEL=Postcode
CONTACT_INFORMATION_STATE_DESC=Contact's State or Province
CONTACT_INFORMATION_STATE_LABEL=State or Province
CONTACT_INFORMATION_SUBURB_DESC=Contact's Suburb or City
CONTACT_INFORMATION_SUBURB_LABEL=Suburb or City
CONTACT_INFORMATION_TELEPHONE_DESC=Contact's Telephone
CONTACT_INFORMATION_TELEPHONE_LABEL=Telephone
CONTACT_INFORMATION_WEBPAGE_DESC=Contact's Webpage
CONTACT_INFORMATION_WEBPAGE_LABEL=Webpage
CONTACT_LINKED_USER_DESC=Linked Joomla! User
CONTACT_LINKED_USER_LABEL=Linked User
CONTACT_PARAMS_CONTACT_POSITION_E-MAIL_LABEL=Contact E-mail
CONTACT_PARAMS_CONTACT_POSITION_LABEL=Contact Position
CONTACT_PARAMS_COUNTRY_LABEL=Country
CONTACT_PARAMS_FAX_LABEL=Fax
CONTACT_PARAMS_IMAGE_LABEL=Image
CONTACT_PARAMS_MISC INFO_LABEL=Misc Info
CONTACT_PARAMS_MOBILE_LABEL=Mobile
CONTACT_PARAMS_NAME_DESC=Show name of the contact
CONTACT_PARAMS_NAME_LABEL=Name
CONTACT_PARAMS_POST/ZIP_CODE_LABEL=Post/Zip Code
CONTACT_PARAMS_STATE/COUNTY_LABEL=State/County
CONTACT_PARAMS_TELEPHONE_LABEL=Telephone
CONTACT_PARAMS_TOWN/SUBURB_LABEL=Town/Suburb
CONTACT_PARAMS_WEBPAGE_LABEL=Webpage
CONTACT_PARAMS_STREET_ADDRESS_LABEL=Street Address
CONTACT_ICONS_SETTINGS=Icon Options
CONTACT_ICONS_OPTIONS_NONE=None
CONTACT_ICONS_OPTIONS_TEXT=Text
CONTACT_ICONS_ADDRESS_DESC=Address Desc
CONTACT_ICONS_ADDRESS_LABEL=Address Label
CONTACT_ICONS_EMAIL_DESC=Email Desc
CONTACT_ICONS_EMAIL_LABEL=Email Label
CONTACT_ICONS_FAX_DESC=Fax Desc
CONTACT_ICONS_FAX_LABEL=Fax Label
CONTACT_ICONS_MISC_INFO_DESC=Misc info Desc
CONTACT_ICONS_MISC_LABEL=Misc Label
CONTACT_ICONS_MOBILE_DESC=Mobile Desc
CONTACT_ICONS_MOBILE_LABEL=Mobile Label
CONTACT_ICONS_TELEPHONE_DESC=Telephone Desc
CONTACT_ICONS_TELEPHONE_LABEL=Telephone Label
CONTACT_ICONS_OPTIONS_ICONS=Icons
CONTACT_ICONS_SETTINGS_DESC=Choose whether to display icons, text or nothing next to the information.
CONTACT_CONFIG_TABLE_OF_CONTACTS=Table of Contacts Settings
CONTACT_ICON_SETTINGS=Icon Settings
COM_CONTACT_CONFIGURATION=Global Configuration
CONTACT_CONFIG_EMAIL_DESC=Email Desc
CONTACT_CONFIG_EMAIL_LABEL=Email
CONTACT_CONFIG_FAX_DESC=Fax
CONTACT_CONFIG_FAX_LABEL=Fax
CONTACT_CONFIG_MOBILE_DESC=Mobile
CONTACT_CONFIG_MOBILE_LABEL=Mobile
CONTACT_CONFIG_PHONE_LABEL=Phone
CONTACT_CONFIG_POSITION_DESC=Position
CONTACT_CONFIG_POSITION_LABEL=Position
CONTACT_CONFIG_TABLE_HEADINGS_DESC=Table Headings
CONTACT_CONFIG_TABLE_HEADINGS_LABEL=Table Headings
CONTACT_CONFIG_TELEPHONE_DESC=Telephone
CONTACT_CONFIG_BANNED_EMAIL_DESC=Banned Email Desc
CONTACT_CONFIG_BANNED_EMAIL_LABEL=Banned Email
CONTACT_CONFIG_BANNED_SUBJECT_DESC=Banned Subject DESC
CONTACT_CONFIG_BANNED_SUBJECT_LABEL=Banned Subject
CONTACT_CONFIG_BANNED_TEXT_DESC=Banned Text DESC
CONTACT_CONFIG_BANNED_TEXT_LABEL=Banned Text
CONTACT_CONFIG_CUSTOM_REPLY=Custom Reply
CONTACT_CONFIG_CUSTOM_REPLY_DESC=Custom Reply Desc
CONTACT_CONFIG_SESSION_CHECK_DESC=Session Check DESC
CONTACT_CONFIG_SESSION_CHECK_LABEL=Session Check
CONTACT_CONFIG_CONTACT_FORM=Contact Form
CONTACT_CONFIG_INDIVIDUAL_CONTACT_DISPLAY=Individual Contact Display
CONTACT_CONTIG_TABLE_OF_CONTACTS=Table of Contacts Display
CONTACT_CONFIG_ALLOW_VCARD_DESC=Allow vCard to be displayed
CONTACT_CONFIG_ALLOW_VCARD_LABEL=Allow vCard
CONTACT_CONFIG_VCARD_DESC=Show vCard
CONTACT_CONFIG_VCARD_LABEL=vCard
CONTACT_ICONS_SETTINGS_LABEL=Settings
CONTACT_SHOW_EMAIL_ADDRESS_DESC=Show Email Address
CONTACT_SHOW_EMAIL_ADDRESS_LABEL=Email Address
CONTACT_CONTACT_DETAILS=Information for this contact
CONTACT_ACCESS_HEADING=Access
CONTACT_CATEGORY_HEADING=Category
CONTACT_ORDER_HEADING=Order
CONTACT_STATE_HEADING= State
CONTACT_TITLE_HEADING= Title
CONTACT_SEARCH_IN_NAME=Search contacts by name
CONTACT_SUBMENU_CATEGORIES=Contact Categories
CONTACT_SUBMENU_CONTACTS=Contacts
CONTACT_MANAGER_CONTACTS=Contact Manager
CONTACT_MANAGER_CONTACT=Contact
CONTACT_NAME_LABEL=Name (Required)
CONTACT_EDIT_CONTACT=Edit Contact
CONTACT_NEW_CONTACT=New Contact
CONTACT_OPTIONS=Options
CONTACT_FIELDSET_METADATA= Metadata
CONTACT_FIELDSET_OPTIONS=Display Options
CONTACT_FIELDSET_CONTACT_FORM=Contact Form Options
CONTACT_INFORMATION_ADDRESS_DESC=Contact's Address
CONTACT_INFORMATION_ADDRESS_LABEL=Address
CONTACT_INFORMATION_COUNTRY_DESC=Contact's Country
CONTACT_INFORMATION_COUNTRY_LABEL=Country
CONTACT_INFORMATION_EMAIL_DESC=Contact's Email
CONTACT_INFORMATION_EMAIL_LABEL=Email
CONTACT_INFORMATION_MISC_DESC=Contact's Miscellaneous Information
CONTACT_INFORMATION_MISC_LABEL=Other Information
CONTACT_INFORMATION_MOBILE_DESC=Contact's Mobile
CONTACT_INFORMATION_MOBILE_LABEL=Mobile
CONTACT_INFORMATION_POSITION_DESC=Contact's Position
CONTACT_INFORMATION_POSITION_LABEL=Position
CONTACT_INFORMATION_POSTCODE_DESC=Contact's Postal Code
CONTACT_INFORMATION_POSTCODE_LABEL=Postcode
CONTACT_INFORMATION_STATE_DESC=Contact's State or Province
CONTACT_INFORMATION_STATE_LABEL=State or Province
CONTACT_INFORMATION_SUBURB_DESC=Contact's Suburb or City
CONTACT_INFORMATION_SUBURB_LABEL=Suburb or City
CONTACT_INFORMATION_TELEPHONE_DESC=Contact's Telephone
CONTACT_INFORMATION_TELEPHONE_LABEL=Telephone
CONTACT_INFORMATION_WEBPAGE_DESC=Contact's Webpage
CONTACT_INFORMATION_WEBPAGE_LABEL=Webpage
CONTACT_LINKED_USER_DESC=Linked Joomla! User
CONTACT_LINKED_USER_LABEL=Linked User
CONTACT_PARAMS_CONTACT_POSITION_E-MAIL_LABEL=Contact E-mail
CONTACT_PARAMS_CONTACT_POSITION_LABEL=Contact Position
CONTACT_PARAMS_COUNTRY_LABEL=Country
CONTACT_PARAMS_FAX_LABEL=Fax
CONTACT_PARAMS_IMAGE_LABEL=Image
CONTACT_PARAMS_MISC INFO_LABEL=Misc Info
CONTACT_PARAMS_MOBILE_LABEL=Mobile
CONTACT_PARAMS_NAME_DESC=Name Desc
CONTACT_PARAMS_NAME_LABEL=Name
CONTACT_PARAMS_POST/ZIP_CODE_LABEL=Post/Zip Code
CONTACT_PARAMS_STATE/COUNTY_LABEL=State/County
CONTACT_PARAMS_TELEPHONE_LABEL=Telephone
CONTACT_PARAMS_TOWN/SUBURB_LABEL=Town/Suburb
CONTACT_PARAMS_WEBPAGE_LABEL=Webpage
CONTACT_PARAMS_STREET_ADDRESS_LABEL=Street Address
CONTACT_ICONS=Icon Options
CONTACT_ICONS_OPTIONS_NONE=None
CONTACT_ICONS_OPTIONS_TEXT=Text
CONTACT_ICONS_ADDRESS_DESC=Select Address Icon
CONTACT_ICONS_ADDRESS_LABEL=Address
CONTACT_ICONS_EMAIL_DESC=Select Email Icon
CONTACT_ICONS_EMAIL_LABEL=Email
CONTACT_ICONS_FAX_DESC=Select Fax Icon
CONTACT_ICONS_FAX_LABEL=Fax
CONTACT_ICONS_MISC_INFO_DESC=Select Other Information Icon
CONTACT_ICONS_MISC_LABEL=Other Information
CONTACT_ICONS_MOBILE_DESC=Select Mobile Icon
CONTACT_ICONS_MOBILE_LABEL=Mobile
CONTACT_ICONS_TELEPHONE_DESC=Select Telephone Icon
CONTACT_ICONS_TELEPHONE_LABEL=Telephone
CONTACT_ICONS_OPTIONS_ICONS=Icons
CONTACT_ICONS_DESC=Choose whether to display icons, text or nothing next to the information.
COM_CONTACT_CONFIGURATION=Global Configuration
CONTACT_CONFIG_EMAIL_DESC=Email Desc
CONTACT_CONFIG_EMAIL_LABEL=Email
CONTACT_CONFIG_FAX_DESC=Fax
CONTACT_CONFIG_FAX_LABEL=Fax
CONTACT_CONFIG_MOBILE_DESC=Mobile
CONTACT_CONFIG_MOBILE_LABEL=Mobile
CONTACT_CONFIG_PHONE_LABEL=Phone
CONTACT_CONFIG_POSITION_DESC=Position
CONTACT_CONFIG_POSITION_LABEL=Position
CONTACT_CONFIG_TABLE_HEADINGS_DESC=Table Headings
CONTACT_CONFIG_TABLE_HEADINGS_LABEL=Table Headings
CONTACT_CONFIG_TELEPHONE_DESC=Telephone
CONTACT_CONFIG_BANNED_EMAIL_DESC=Banned Email Desc
CONTACT_CONFIG_BANNED_EMAIL_LABEL=Banned Email
CONTACT_CONFIG_BANNED_SUBJECT_DESC=Banned Subject DESC
CONTACT_CONFIG_BANNED_SUBJECT_LABEL=Banned Subject
CONTACT_CONFIG_BANNED_TEXT_DESC=Banned Text DESC
CONTACT_CONFIG_BANNED_TEXT_LABEL=Banned Tex
CONTACT_CONFIG_CUSTOM_REPLY=Custom Reply
CONTACT_CONFIG_CUSTOM_REPLY_DESC=Custom Reply Desc
CONTACT_CONFIG_SESSION_CHECK_DESC=Session Check DESC
CONTACT_CONFIG_SESSION_CHECK_LABEL=Session Check
CONTACT_CONFIG_CONTACT_FORM=Contact Form
CONTACT_CONFIG_INDIVIDUAL_CONTACT_DISPLAY=Individual Contact Display
CONTACT_CONTIG_TABLE_OF_CONTACTS=Table of Contacts Display
CONTACT_CONTACT_DETAILS=Information for this contact
CONTACT_EMAIL_BANNED_EMAIL_DESC=Email addresses not allowed to submit contact form.
CONTACT_EMAIL_BANNED_EMAIL_LABEL=Banned Email
CONTACT_EMAIL_BANNED_SUBJECT_DESC=Subjects not allowed in contact form
CONTACT_EMAIL_BANNED_SUBJECT_LABEL=Banned subject
CONTACT_EMAIL_BANNED_TEXT_DESC=Text not allowed in contact form body
CONTACT_EMAIL_BANNED_TEXT_LABEL=Banned Text
CONTACT_NAME_DESC=Contact Name
CONTACT_EMAIL_DESCRIPTION_TEXT_DESC=Contact Email Description Text Desc
CONTACT_EMAIL_DESCRIPTION_TEXT_LABEL=Contact Email Description Text Label
CONTACT_EMAIL_EMAIL_COPY_DESC=Allow Email Copy
CONTACT_EMAIL_EMAIL_COPY_LABEL=Give the option of sendint a copy to the submitter
CONTACT_EMAIL_SHOW_FORM_LABEL=Show Contact Form
CONTACT_PARAMS_VCARD_LABEL=Contact Params vCard Label
CONTACT_EMAIL_SHOW_FORM_DESC=Text to display with the contact form
CONTACT_SHOW_ARTICLES_LABEL=Show articles by contact
CONTACT_SHOW_ARTICLES_DESC=Displays a list of articles written by the contact
CONTACT_SHOW_LINKS_LABEL=Labels for links
CONTACT_SHOW_LINKS_DESC=Show or hide the labels for links. If hidden, the url will display.
CONTACT_LINKA_NAME_LABEL=Link Label
CONTACT_LINKA_NAME_DESC=An additional link for this contact
CONTACT_LINKA_LABEL=Link URL
CONTACT_LINKB_NAME_LABEL=Link Label
CONTACT_LINKB_NAME_DESC=An additional link for this contact
CONTACT_LINKB_LABEL=Link URL
CONTACT_LINKC_NAME_LABEL=Link Label
CONTACT_LINKC_NAME_DESC=An additional link for this contact
CONTACT_LINKC_LABEL=Link URL
CONTACT_LINKD_NAME_LABEL=Link Label
CONTACT_LINKD_NAME_DESC=An additional link for this contact
CONTACT_LINKD_LABEL=Link URL
CONTACT_LINKE_NAME_LABEL=Link Label
CONTACT_LINKE_NAME_DESC=An additional link for this contact
CONTACT_LINKE_LABEL=Link URL

View File

@ -12,7 +12,7 @@ COM_CONTACT.CATEGORIES=Categories
# View and layout titles and descriptions
#
COM_CONTACT_CATEGORY_VIEW_DEFAULT_DESC=com contact category view default desc
COM_CONTACT_CATEGORY_VIEW_DEFAULT_DESC=This view lists the contacts in a category
COM_CONTACT_CATEGORY_VIEW_DEFAULT_TITLE=List Contacts in a Category
COM_CONTACT_CONTACT_VIEW_DEFAULT_DESC=com contact contact view default desc
COM_CONTACT_CONTACT_VIEW_DEFAULT_DESC=This links to the contact information for one contact
COM_CONTACT_CONTACT_VIEW_DEFAULT_TITLE=Single Contact

View File

@ -48,6 +48,12 @@ MENUS_ITEM_ANCHOR_TITLE_DESC=Anchor Title Desc
MENUS_ITEM_ANCHOR_TITLE_LABEL=Anchor Title
MENUS_ITEM_BROWSERNAV_DESC=BrowserNav Desc
MENUS_ITEM_BROWSERNAV_LABEL=On click, open in:
MENUS_BROWSERNAV_OPTION_NEW_WITHOUT_NAV=New Without Navigation
MENUS_BROWSERNAV_OPTION_NEW_WITH_NAV=New Window With Navigation
MENUS_BROWSERNAV_OPTION_PARENT=Parent
MENUS_ITEM_HOME_DESC=Sets this menu item as the default or home page of the site.
MENUS_ITEM_HOME_LABEL=Set as Default Page
MENUS_ITEM_LINK_DESC=Link Desc
MENUS_ITEM_LINK_LABEL=Link
MENUS_ITEM_MENUTYPE_DESC=MenuType Desc
@ -79,8 +85,14 @@ MENUS_ITEM_TEMPLATE_LABEL=Template
MENUS_ITEM_TITLE_DESC=The title of the menu item that will display in the menu.
MENUS_ITEM_TYPE_DESC=The type of link: Component, URL, Alias or Separator
MENUS_ITEM_TYPE_LABEL=Link Type
MENUS_ITEM_HOME_DESC=Sets this menu item as the default or home page of the site.
MENUS_ITEM_HOME_LABEL=Set as Default Page
MENUS_ITEM_TITLE_LABEL=Link Text
MENUS_ITEM_LINK_TITLE_DESC= Page Title Text
MENUS_ITEM_LINK_TITLE_LABEL=Page Title
MENUS_ITEM_PAGE_HEADING_DESC=A heading for the page
MENUS_ITEM_PAGE_HEADING_LABEL=Page Heading
MENUS_MENU_ASSIGNED_DESC=Shows which menu a link will appear in.
MENUS_MENU_ASSIGNED_LABEL= In Menu:
MENUS_ITEM_DETAILS=Details
MENU_ITEM_OPTIONS=Menu Item Options
@ -126,4 +138,11 @@ MENUS_TYPE_SYSTEM=System Links
MENUS_TYPE_SYSTEM_DESC=System Desc
MENUS_MODULE_SHOW_ALL=All
MENUS_MODULE_SHOW_NONE=None
MENUS_MODULE_SHOW_VARIES=Varies
EDIT_MODULE_SETTINGS=Edit
MENUS_HEADING_DISPLAY=Display Setting
MENUS_HEADING_EDIT_LINK=Edit Settings
MENU_ADVANCED_MENU_OPTIONS=Advanced Menu Options
MENU_ITEM_MODULE_ASSIGNMENT=Module Assignment

View File

@ -5,6 +5,9 @@
# Note : All ini files need to be saved as UTF-8 - No BOM
NEWSFEEDS_MANAGER_NEWSFEED=News Feed Manager: Newsfeed
NEWSFEEDS_SUBMENU_NEWSFEEDS=News Feeds
NEWSFEEDS_SUBMENU_CATEGORIES=News Feeds Categories
NEWSFEEDS_EDIT_NEWSFEED=Edit
NEWSFEEDS_NEW_NEWSFEED=New
NEWSFEEDS_MANAGER_NEWSFEEDS=News Feed Manager
@ -16,32 +19,61 @@ NEWSFEEDS_NUM_ARTICLES_HEADING=# Articles
NEWSFEEDS_CACHE_TIME_HEADING=Cache time
NEWSFEEDS_FILTER_CATEGORY=Category
NEWSFEEDS_FILTER_STATE=State
NEWSFEEDS_SEARCH_IN_TITLE=Search
NEWSFEEDS_NAME_LABEL=Name
NEWSFEEDS_NAME_DESC=
NEWSFEEDS_NAME_DESC=Name of the newsfeed
NEWSFEEDS_ALIAS_LABEL=Alias
NEWSFEEDS_ALIAS_DESC=
NEWSFEEDS_ALIAS_DESC=Alias for the feed (used to create urls)
NEWSFEEDS_STATE_LABEL=State
NEWSFEEDS_STATE_DESC
NEWSFEEDS_STATE_DESC=Publication state
NEWSFEEDS_CATEGORY_LABEL=Category
NEWSFEED_CATEGORY_DESC=
NEWSFEED_CATEGORY_DESC=Category for the newsfeed.
NEWSFEEDS_LINK_LABEL=Link
NEWSFEED_LINK_DESC=
NEWSFEED_LINK_DESC=Link to the newsfeed.
NEWSFEEDS_NUMARTICLES_LABEL=Number of Articles
NEWSFEEDS_NUMARTICLES_DESC=
NEWSFEEDS_NUMARTICLES_DESC=How many articles should be discplayed.
NEWSFEEDS_CACHETIME_LABEL=Cache Time
NEWSFEEDS_CACHETIME_DESC=The number of minutes before the News Feed cache is refreshed.
NEWSFEEDS_ORDERING_LABEL=Ordering
NEWSFEEDS_RTL_LABEL=RTL Feed
Newsfeeds_Name_Label
NEWSFEEDS_NAME_LABEL=News Feed Name
NEWSFEEDS_RTL_SELECT=Site Language Direction
NEWSFEEDS_RTL_LEFT_TO_RIGHT=Left to Right Direction
NEWSFEEDS_RTL_RIGHT_TO_LEFT=Right to Left Direction
NEWSFEEDS_RTL_RIGHT_TO_LEFT=Right to Left Direction
NEWSFEEDS_OPTIONS=Options
NEWSFEEDS_CATEGORY_DESC=Category for the news feed
NEWSFEEDS_LINK_DESC=Link for the news feed
NEWSFEEDS_NAME_COLUMN_DESC=Name of feed
NEWSFEEDS_NAME_COLUMN_LABEL=Name
NEWSFEEDS_NUM_ARTICLES_COLUMN_DESC=Number of Articles
NEWSFEEDS_NUM_ARTICLES_COLUMN_LABEL=Number
NEWSFEEDS_ORDERING_DESC=Orderinf for feeds
NEWSFEEDS_RTL_DESC=Indicate if this is a right to left feed
NEWSFEEDS_SHOW_CAT_DESC=Show Categories
NEWSFEEDS_SHOW_CAT_ITEMS_DESC=Show items in category
NEWSFEEDS_SHOW_CAT_ITEMS_LABEL=Show Items
NEWSFEEDS_SHOW_CAT_LABEL=Show Category
NEWSFEEDS_SHOW_FEED_DESCRIPTION_DESC=Optionally display feed description
NEWSFEEDS_SHOW_FEED_DESCRIPTION_LABEL=Feed Description
NEWSFEEDS_SHOW_FEED_IMAGE_DESC=Optionally show feed images
NEWSFEEDS_SHOW_FEED_IMAGE_LABEL=Feed Image
NEWSFEEDS_SHOW_ITEM_DESCRIPTION_DESC=Optionally Show Item Description
NEWSFEEDS_SHOW_ITEM_DESCRIPTION_LABEL=Item Description
NEWSFEEDS_SHOW_LINKS_DESC=Newsfeeds Show Links Desc
NEWSFEEDS_SHOW_LINKS_LABEL=Newsfeeds Show Links Label
NEWSFEEDS_TABLE_HEADINGS_DESC=Table Headings for the display
NEWSFEEDS_TABLE_HEADINGS_LABEL=Table Headings
NEWSFEEDS_WORD_COUNT_DESC=How many words to include in an item
NEWSFEEDS_WORD_COUNT_LABEL=Word Count

View File

@ -16,3 +16,4 @@ COM_NEWSFEEDS_CATEGORY_VIEW_DEFAULT_DESC=com newsfeeds category view default des
COM_NEWSFEEDS_CATEGORY_VIEW_DEFAULT_TITLE=List Newsfeeds in a Category
COM_NEWSFEEDS_NEWSFEED_VIEW_DEFAULT_DESC=com newsfeeds newsfeed view default desc
COM_NEWSFEEDS_NEWSFEED_VIEW_DEFAULT_TITLE=Single Newsfeed

View File

@ -17,16 +17,29 @@ JNO=No
JYES=Yes
JTRUE=True
JFALSE=False
JCOMMON_HIDE
JCOMMON_SHOW
JCOMMON_USE_GLOBAL
JINVALID_TOKEN=The most recent request was denied because it contained an invalid security token. Please refresh the page and try again.
JERROR_NO_ITEMS_SELECTED=No items selected.
JERROR_CHECKIN_FAILED=Check-in failed with the following error: %s
JERROR_CHECKIN_USER_MISMATCH=The user checking in does not match the user who checked out the item.
JERROR_SAVE_FAILED=Save failed with the following error: %s
JWARNING_PUBLISH_MUST_SELECT=You must select at least one item to publish.
JWARNING_ARCHIVE_MUST_SELECT=You must select at least one item to archive.
JWARNING_UNPUBLISH_MUST_SELECT=You must select at least one item to unpublish.
JWARNING_TRASH_MUST_SELECT=You must select at least one item to remove.
JWARNING_DELETE_MUST_SELECT=You must select at least one item to permanently delete.
JSUCCESS_N_ITEMS_PUBLISHED=Items Status Changed
JSUCCESS_N_ITEMS_UNPUBLISHED=Items Unpublished
JCONTROLLER_SAVE_SUCCESS=Item successfully saved.
JCOMMON_EDIT_ITEM=Edit item
JCOMMON_HIDE=Hide
JCOMMON_SHOW=Show
JCOMMON_USE_GLOBAL=Use Global
JGRID_HEADING_ID=ID
JGRID_HEADING_ROW_NUMBER=#
JGRID_HEADING_TITLE=Title
@ -60,12 +73,17 @@ JFIELD_PUBLISHED_DESC=The published state of this item.
JFIELD_PUBLISHED_LABEL=Published State
JFIELD_TITLE_DESC=Title
JFIELD_TITLE_LABEL=Title
JFIELD_METADATA_AUTHOR_DESC=Metadata Author Desc
JFIELD_METADATA_AUTHOR_DESC=The author of this content
JFIELD_METADATA_AUTHOR_LABEL=Author
JFIELD_METADATA_ROBOTS_DESC=Metadata Robots Desc
JFIELD_METADATA_RIGHTS_DESC=Publication rights for the content
JFIELD_METADATA_RIGHTS_LABEL=Rights
JFIELD_METADATA_ROBOTS_DESC=Robots Instructions
JFIELD_METADATA_ROBOTS_LABEL=Robots
JFIELD_LANGUAGE_DESC=JField Language Desc
JFIELD_METADATA_XREFERENCE_DESC=An optional reference used to link to external data sources.
JFIELD_METADATA_XREFERENCE_LABEL=Cross Reference
JFIELD_LANGUAGE_DESC=The language that the article is written in.
JFIELD_LANGUAGE_LABEL=Language
JFIELD_OPTION_NONE=None
JOPTION_ALL=All
JOPTION_ANY=Any
@ -74,6 +92,7 @@ JOPTION_PUBLISHED=Published
JOPTION_TRASH=Trash
JOPTION_TRASHED=Trashed
JOPTION_UNPUBLISHED=Unpublished
JOPTION_REPORTED=Reported
JOPTION_SELECT_ACCESS=- Select Access -
JOPTION_SELECT_CATEGORY=- Select Category -
JOPTION_SELECT_PUBLISHED=- Select State -
@ -86,6 +105,8 @@ JOPTION_USE_DEFAULT=Use Default
JOPTION_USE_MENU_REQUEST_SETTING=- Use Menu or Request Setting -
JOPTION_FROM_DEFAULT_TEMPLATE=From Default Template
JOPTION_NO_CATEGORY=- No Category -
JOPTION_HIDE=Hide
JOPTION_SHOW=Show
JGRID_MOVE_DOWN=Move Down
JGRID_MOVE_UP=Move Up
@ -95,18 +116,32 @@ JSTATE_PUBLISH_ITEM=Publish Item
JSTATE_UNPUBLISHED=Unpublished
JSTATE_UNPUBLISH_ITEM=Unpublish Item
JSTATE_TRASHED=Trashed
JSTATE_ARCHIVED=Archived
JSEARCH_FILTER_LABEL=Filter:
JSEARCH_FILTER_CLEAR=Clear
JSEARCH_FILTER_SUBMIT=Search
JSEARCH_FILTER=Search
JTOOLBAR_APPLY=Apply
JTOOLBAR_EMPTY_TRASH=Empty trash
JTOOLBAR_OPTIONS=Options
JTOOLBAR_CLOSE=Close
JTOOLBAR_SAVE=Save
JTOOLBAR_SAVE_AND_NEW=Save &amp; New
JTOOLBAR_SAVE_AS_COPY=Save As Copy
JTOOLBAR_SAVE=Save
JTOOLBAR_REMOVE=Remove
JTOOLBAR_REBUILD=Rebuild
JTOOLBAR_PUBLISH=Publish
JTOOLBAR_ARCHIVE=Archive
JTOOLBAR_UNPUBLISH=Unpublish
JTOOLBAR_CANCEL=Cancel
JTOOLBAR_CLOSE=Close
JTOOLBAR_EDIT=Edit
JTOOLBAR_TRASH=Delete
JTOOLBAR_NEW=New
JBROWSERTARGET_MODAL=Modal
JBROWSERTARGET_NEW=New
@ -117,6 +152,7 @@ LIBRARIES_FORM_VALIDATOR_FIELD_REQUIRED=Field %s is required.
LIBRARIES_FORM_VALIDATOR_FIELD_INVALID=Field %s contains invalid data.
LIBRARIES_FORM_VALIDATOR_RULE_NOT_FOUND=No form rule could be found for field %s.
#
# Old string format
#
@ -731,3 +767,7 @@ YOU MUST SELECT A SECTION=You must select a Section
BACKTRACE=Backtrace
ERRORS=Errors
INFO=Info

View File

@ -4,23 +4,28 @@
# License GNU General Public License version 2 or later; see LICENSE.txt, see LICENSE.php
# Note : All ini files need to be saved as UTF-8 - No BOM
COM_CONTENT=Content
COM_CONTENT_NEW_CATEGORY=Add New Category
COM_CONTENT_ARTICLES=Articles
COM_CONTENT_CATEGORIES=Categories
COM_CONTENT_CATEGORY_MANAGER=Category Manager
COM_CONTENT_FEATURED=Featured Articles
COM_CONTENT_ARTICLE_MANAGER=Article Manager
COM_CONTENT_NEW_ARTICLE=Add New Article
COM_CONTENT_ARTICLE_MANAGER=Article Manager
MOD_MENU_COM_CONTENT=Content
MOD_MENU_COM_CONTENT_NEW_CATEGORY=Add New Category
MOD_MENU_COM_CONTENT_ARTICLES=Articles
MOD_MENU_COM_CONTENT_CATEGORIES=Categories
MOD_MENU_COM_CONTENT_CATEGORY_MANAGER=Category Manager
MOD_MENU_COM_CONTENT_FEATURED=Featured Articles
MOD_MENU_COM_CONTENT_ARTICLE_MANAGER=Article Manager
MOD_MENU_COM_CONTENT_NEW_ARTICLE=Add New Article
MOD_MENU_COM_CONTENT_ARTICLE_MANAGER=Article Manager
COM_USERS_GROUPS=Groups
COM_USERS_LEVELS=Access Levels
COM_USERS_USERS=Users
COM_USERS_USER_MANAGER=User Manager
COM_USERS_ADD_GROUP=Add New Group
COM_USERS_ADD_USER=Add New User
COM_USERS_ADD_LEVEL=Add New Access Level
MOD_MENU_COM_USERS=Users
MOD_MENU_COM_USERS_GROUPS=Groups
MOD_MENU_COM_USERS_LEVELS=Access Levels
MOD_MENU_COM_USERS_USERS=Users
MOD_MENU_COM_USERS_USER_MANAGER=User Manager
MOD_MENU_COM_USERS_ADD_GROUP=Add New Group
MOD_MENU_COM_USERS_ADD_USER=Add New User
MOD_MENU_COM_USERS_ADD_LEVEL=Add New Access Level
MOD_MENU_MASS_MAIL_USERS=Mod menu Mass Mail Users
MOD_MENU_MEDIA_MANAGER=Mod Menu Media Manager
MOD_MENU_NEW_PRIVATE_MESSAGE=Mod menu New Private Message
MOD_MENU_READ_PRIVATE_MESSAGES=Mod menu Read Private Messages
MOD_MENU_HELP=Help
@ -35,93 +40,29 @@ MOD_MENU_HELP_DEVELOPER=Developer Resources
MOD_MENU_HELP_SHOP=Joomla Shop
MOD_MENU_HELP_SECURITY=Security Center
MOD_EXTENSIONS_EXTENSIONS=Extensions
MOD_EXTENSIONS_EXTENSION_MANAGER=Extension Manager
MOD_EXTENSIONS_LANGUAGE_MANAGER=Language Manager
MOD_EXTENSIONS_MODULE_MANAGER=Module Manager
MOD_EXTENSIONS_PLUGIN_MANAGER=Plugin Manager
MOD_EXTENSIONS_TEMPLATE_MANAGER=Template Manager
MOD_MENU_EXTENSIONS_EXTENSIONS=Extensions
MOD_MENU_EXTENSIONS_EXTENSION_MANAGER=Extension Manager
MOD_MENU_EXTENSIONS_LANGUAGE_MANAGER=Language Manager
MOD_MENU_EXTENSIONS_MODULE_MANAGER=Module Manager
MOD_MENU_EXTENSIONS_PLUGIN_MANAGER=Plugin Manager
MOD_MENU_EXTENSIONS_TEMPLATE_MANAGER=Template Manager
MOD_TOOLS=Tools
NEW_PRIVATE_MESSAGE=New Private Message
CLEAR_CACHE=Clear Cache
PURGE_EXPIRED_CACHE=Purge Expired Cache
GLOBAL_CHECKIN=Global Check-in
MOD_MENU_TOOLS=Tools
MOD_MENU_NEW_PRIVATE_MESSAGE=New Private Message
MOD_MENU_CLEAR_CACHE=Clear Cache
MOD_MENU_PURGE_EXPIRED_CACHE=Purge Expired Cache
MOD_MENU_GLOBAL_CHECKIN=Global Check-in
# Old langauges strings (upgrade please)
MOD_MENU=Administrator Menu
ADD/EDIT=Add/Edit
ARCHIVE=Archive
MOD_MENU_COMPONENTS=Components
ARTICLE TRASH=Article Trash
ARTICLE STATISTICS=Article Statistics
BACK=Back
BROWSER, OS, DOMAIN=Browser, OS, Domain
CATEGORIES=Categories
CATEGORY MANAGER=Category Manager
CHECK-IN ALL CHECKED-OUT ITEMS=Check-in all checked out Articles
CLEAR_ALL_CACHES=Clear all Caches
CLEAR_CONTENT_CACHE=Clear the Content Cache
CLEAN THE ARTICLES CACHE=Clean the Articles Cache
COMPONENT MANAGEMENT=Component Management
COMPONENTS=Components
CONFIGURATION=Global Configuration
CONTENT BY SECTION=Content by Section
CONTENT MANAGEMENT=Content Management
CONTENT MANAGERS=Content Managers
CONTROL PANEL=Control Panel
ELEMENT LIST=Element List
EXTENSIONS=Extensions
MOD_MENU_MENUS=Menus
MOD_MENU_MENU_MANAGER=Menu Manager
FRONTPAGE MANAGER=Front Page Manager
GLOBAL_CHECKIN=Global Check-in
INSTALL EXTENSIONS=Install Extensions
INSTALL/UNINSTALL=Install/Uninstall
INSTALLER=Installer
ITEMS=Items
MOD_MENU_SITE=Site
MOD_MENU_CONTROL_PANEL=Control Panel
MOD_MENU_LOGOUT= Logout
MOD_MENU_SITE_MAINTENANCE= Site Maintenance
MOD_MENU_SYSTEM_INFORMATION=System Information
LANGUAGES=Languages
LOGOUT=Logout
MANAGE LANGUAGES=Manage Languages
MANAGE MEDIA FILES=Manage Media Files
MANAGE MENU=Manage Menus
MANAGE TRASH=Manage Trash
MASS_MAIL_USERS=Mass Mail Users
MEDIA MANAGER=Media Manager
MENUS=Menus
MENU INACTIVE FOR THIS PAGE=This menu is inactive for this page.
MENU MANAGEMENT=Menu Management
READ MESSAGES=Read Messages
MOD_CSSMENU=mod_cssmenu
MODULES=Modules
MOD_MENU=mod_menu
MORE COMPONENTS...=More Components...
PAGE HITS=Page Hits
PREVIEW...=Preview...
PLUGIN MANAGEMENT=Plug-in Management
PLUGIN MANAGER=Plug-in Manager
PLUGINS=Plug-ins
READ_PRIVATE_MESSAGES=Read Private Messages
REDIRECT=Redirect
SEARCH TEXT=Search Text
SECTION MANAGER=Section Manager
SITE MAINTENANCE=Site Maintenance
SITE MANAGEMENT=Site Management
SITE STATISTICS=Site Statistics
STATISTICS=Statistics
SYNDICATE=Syndicate
SYSTEM=System
SYSTEM INFO=System Info
SYSTEM INFORMATION=System Information
SYSTEM MANAGEMENT=System Management
TEMPLATES - ADMIN=Templates - Admin
TEMPLATES - SITE=Templates - Site
THEMEOFFICE=ThemeOffice
THIS MODULE SHOWS THE MAIN ADMIN NAVIGATION MODULE=This module shows the main admin navigation module.
MENU TRASH=Menu Trash
UNINSTALL COMPONENTS=Uninstall Components
USER MANAGER=User Manager
UNINSTALL PLUGINS=Uninstall Plug-ins
UNINSTALL MODULES=Uninstall Modules

View File

@ -4,8 +4,11 @@
# License GNU General Public License version 2 or later; see LICENSE.txt, see LICENSE.php
# Note : All ini files need to be saved as UTF-8 - No BOM
LEGACY=Legacy
MOD_STATUS=mod_status
THIS_MODULE_SHOWS_THE_STATUS_OF_THE_LOGGED_IN_USER.=This module shows the status of the logged in users.
LOG_OUT=Log out
MESSAGES=Messages
MOD_STATUS_USERS=Logged in
MOD_STATUS_DESC.=This module shows the status of the logged in users.
MOD_STATUS_LOG_OUT=Log out
MOD_STATUS_MESSAGES=Messages
MOD_STATUS_CACHE_LABEL=Caching
MOD_STATUS_CACHE_DESC=Select whether to cache the content of this module
MOD_STATUS_VIEW_SITE=Preview

View File

@ -47,7 +47,7 @@ class ModMenuHelper
*
* @return array A nest array of component objects and submenus
*/
static function getComponents($exclude = array(), $authCheck = true)
function getComponents($exclude = array(), $authCheck = true)
{
// Initialise variables.
$lang = &JFactory::getLanguage();
@ -59,7 +59,7 @@ class ModMenuHelper
// SQL quote the excluded 'option' values.
$exclude = array_map(array($db, 'quote'), $exclude);
// Prepare the query.
$query->select('c.id, c.parent, c.name, c.option, c.admin_menu_link, c.admin_menu_img');
$query->from('#__components AS c');
@ -79,7 +79,6 @@ class ModMenuHelper
$db->setQuery($query);
$components = $db->loadObjectList(); // component list
// Parse the list of extensions.
foreach ($components as &$component)
{
@ -89,7 +88,7 @@ class ModMenuHelper
if ($component->parent == 0)
{
// Only add this top level if it is authorised and enabled.
if ($authCheck == false || $user->authorize($component->option.'.manage'))
if (!$authCheck == false || $user->authorize($component->option.'.manage'))
{
// Root level.
$result[$component->id] = $component;
@ -99,8 +98,9 @@ class ModMenuHelper
// If the root menu link is empty, add it in.
if (empty($component->admin_menu_link)) {
$component->admin_menu_link = 'index.php?option='.$component->option;
}
$component->admin_menu_link = 'index.php?option='.$component->option;
}
if (!empty($component->option)) {
$langs[$component->option.'.menu'] = true;

View File

@ -16,10 +16,10 @@ defined('_JEXEC') or die;
if ($enabled)
{
$menu->addChild(
new JMenuNode(JText::_('Site'), '#'), true
new JMenuNode(JText::_('Mod_Menu_Site'), '#'), true
);
$menu->addChild(
new JMenuNode(JText::_('Control Panel'), 'index.php', 'class:cpanel')
new JMenuNode(JText::_('Mod_Menu_Control_Panel'), 'index.php', 'class:cpanel')
);
$menu->addSeparator();
@ -39,29 +39,29 @@ if ($com || $chm || $cam )
{
$menu->addChild(
new JMenuNode(JText::_('Site Maintenance'), '#', 'class:maintenance'), true
new JMenuNode(JText::_('Mod_Menu_Site_Maintenance'), '#', 'class:maintenance'), true
);
$menu->addChild(new JMenuNode(JText::_('Global_Checkin'), 'index.php?option=com_checkin', 'class:checkin'));
$menu->addChild(new JMenuNode(JText::_('Mod_Menu_Global_Checkin'), 'index.php?option=com_checkin', 'class:checkin'));
$menu->addSeparator();
$menu->addChild(new JMenuNode(JText::_('Clear_Cache'), 'index.php?option=com_cache', 'class:clear'));
$menu->addChild(new JMenuNode(JText::_('Purge_Expired_Cache'), 'index.php?option=com_cache&view=purge', 'class:purge'));
$menu->addChild(new JMenuNode(JText::_('Mod_Menu_Clear_Cache'), 'index.php?option=com_cache', 'class:clear'));
$menu->addChild(new JMenuNode(JText::_('Mod_Menu_Purge_Expired_Cache'), 'index.php?option=com_cache&view=purge', 'class:purge'));
$menu->getParent();
}
$menu->addSeparator();
$menu->addChild(
new JMenuNode(JText::_('System Information'), 'index.php?option=com_admin&view=sysinfo', 'class:info')
new JMenuNode(JText::_('Mod_Menu_System_Information'), 'index.php?option=com_admin&view=sysinfo', 'class:info')
);
$menu->addSeparator();
$menu->addChild(new JMenuNode(JText::_('Logout'), 'index.php?option=com_login&task=logout', 'class:logout'));
$menu->addChild(new JMenuNode(JText::_('Mod_Menu_Logout'), 'index.php?option=com_login&task=logout', 'class:logout'));
$menu->getParent();
}
else {
$menu->addChild(new JMenuNode(JText::_('Site'), null, 'disabled'));
$menu->addChild(new JMenuNode(JText::_('Mod_Menu_Site'), null, 'disabled'));
}
@ -74,40 +74,40 @@ if ($user->authorize('core.users.manage'))
if ($enabled)
{
$menu->addChild(
new JMenuNode(JText::_('Com_users_Users'), '#'), true
new JMenuNode(JText::_('Mod_menu_Com_users_Users'), '#'), true
);
$menu->addChild(
new JMenuNode(JText::_('Com_users_User_Manager'), 'index.php?option=com_users&view=users', 'class:user')
new JMenuNode(JText::_('Mod_menu_Com_users_User_Manager'), 'index.php?option=com_users&view=users', 'class:user')
);
$menu->addChild(
new JMenuNode(JText::_('Com_users_Groups'), 'index.php?option=com_users&view=groups', 'class:groups')
new JMenuNode(JText::_('Mod_menu_Com_users_Groups'), 'index.php?option=com_users&view=groups', 'class:groups')
);
$menu->addChild(
new JMenuNode(JText::_('Com_users_Levels'), 'index.php?option=com_users&view=levels', 'class:levels')
new JMenuNode(JText::_('Mod_menu_Com_users_Levels'), 'index.php?option=com_users&view=levels', 'class:levels')
);
$menu->addSeparator();
$menu->addChild(
new JMenuNode(JText::_('Com_users_Add_User'), 'index.php?option=com_users&task=user.add', 'class:newuser')
new JMenuNode(JText::_('Mod_menu_Com_users_Add_User'), 'index.php?option=com_users&task=user.add', 'class:newuser')
);
$menu->addChild(
new JMenuNode(JText::_('Com_users_Add_Group'), 'index.php?option=com_users&task=group.add', 'class:newgroup')
new JMenuNode(JText::_('Mod_menu_Com_users_Add_Group'), 'index.php?option=com_users&task=group.add', 'class:newgroup')
);
$menu->addChild(
new JMenuNode(JText::_('Com_users_Add_Level'), 'index.php?option=com_users&task=level.add', 'class:newlevel')
new JMenuNode(JText::_('Mod_menu_Com_users_Add_Level'), 'index.php?option=com_users&task=level.add', 'class:newlevel')
);
$menu->addSeparator();
if ($user->authorize('core.massmail.manage'))
{
$menu->addChild(new JMenuNode(JText::_('Mass_Mail_Users'), 'index.php?option=com_massmail', 'class:massmail'));
$menu->addChild(new JMenuNode(JText::_('Read_Private_Messages'), 'index.php?option=com_messages', 'class:readmess'));
$menu->addChild(new JMenuNode(JText::_('New_Private_Message'), 'index.php?option=com_messages&task=add', 'class:writemess'));
$menu->addChild(new JMenuNode(JText::_('Mod_menu_Mass_Mail_Users'), 'index.php?option=com_massmail', 'class:massmail'));
$menu->addChild(new JMenuNode(JText::_('Mod_menu_Read_Private_Messages'), 'index.php?option=com_messages', 'class:readmess'));
$menu->addChild(new JMenuNode(JText::_('Mod_menu_New_Private_Message'), 'index.php?option=com_messages&task=add', 'class:writemess'));
}
$menu->getParent();
}
else {
$menu->addChild(new JMenuNode(JText::_('Users'), null, 'disabled'));
$menu->addChild(new JMenuNode(JText::_('MOD_MENU_COM_USERS'), null, 'disabled'));
}
}
@ -119,10 +119,10 @@ if ($user->authorize('core.menus.manage'))
if ($enabled)
{
$menu->addChild(
new JMenuNode(JText::_('Menus'), '#'), true
new JMenuNode(JText::_('Mod_Menu_Menus'), '#'), true
);
$menu->addChild(
new JMenuNode(JText::_('Menu Manager'), 'index.php?option=com_menus&view=menus', 'class:menumgr')
new JMenuNode(JText::_('Mod_Menu_Menu_Manager'), 'index.php?option=com_menus&view=menus', 'class:menumgr')
);
$menu->addSeparator();
@ -152,35 +152,35 @@ if ($user->authorize('com_content.manage'))
if ($enabled)
{
$menu->addChild(
new JMenuNode(JText::_('Com_Content'), '#'), true
new JMenuNode(JText::_('Mod_Menu_Com_Content'), '#'), true
);
$menu->addChild(
new JMenuNode(JText::_('Com_Content_Article_Manager'), 'index.php?option=com_content', 'class:article')
new JMenuNode(JText::_('Mod_Menu_Com_Content_Article_Manager'), 'index.php?option=com_content', 'class:article')
);
$menu->addChild(
new JMenuNode(JText::_('Com_content_Category_Manager'), 'index.php?option=com_categories&extension=com_content', 'class:category')
new JMenuNode(JText::_('Mod_Menu_Com_content_Category_Manager'), 'index.php?option=com_categories&extension=com_content', 'class:category')
);
$menu->addChild(
new JMenuNode(JText::_('Com_content_Featured'), 'index.php?option=com_content&view=featured', 'class:featured')
new JMenuNode(JText::_('Mod_Menu_Com_content_Featured'), 'index.php?option=com_content&view=featured', 'class:featured')
);
$menu->addSeparator();
$menu->addChild(
new JMenuNode(JText::_('Com_content_New_article'), 'index.php?option=com_content&task=article.add', 'class:newarticle')
new JMenuNode(JText::_('Mod_Menu_Com_content_New_article'), 'index.php?option=com_content&task=article.add', 'class:newarticle')
);
$menu->addChild(
new JMenuNode(JText::_('Com_content_New_category'), 'index.php?option=com_categories&task=category.add&extension=com_content', 'class:newcategory')
new JMenuNode(JText::_('Mod_Menu_Com_content_New_category'), 'index.php?option=com_categories&task=category.add&extension=com_content', 'class:newcategory')
);
$menu->addSeparator();
if ($user->authorize('core.media.manage')) {
$menu->addChild(new JMenuNode(JText::_('Media Manager'), 'index.php?option=com_media', 'class:media'));
$menu->addChild(new JMenuNode(JText::_('Mod_Menu_Media_Manager'), 'index.php?option=com_media', 'class:media'));
}
$menu->getParent();
}
else {
$menu->addChild(new JMenuNode(JText::_('Content'), null, 'disabled'));
$menu->addChild(new JMenuNode(JText::_('Mod_Menu_Com_Content'), null, 'disabled'));
}
}
@ -191,10 +191,12 @@ if ($user->authorize('com_content.manage'))
if ($enabled)
{
$db = &JFactory::getDbo();
$menu->addChild(new JMenuNode(JText::_('Components'), '#'), true);
$menu->addChild(new JMenuNode(JText::_('Mod_Menu_Components'), '#'), true);
// Get the authorised components and sub-menus.
$components = ModMenuHelper::getComponents(array('com_content'));
$components = ModMenuHelper::getComponents(array('com_content','com_config','com_modules','com_user','com_users','com_cache','com_cpanel','com_installer',
'com_massmail','com_messages','com_plugins','com_templates','com_languages','com_mailto','com_media','com_wrapper','com_menus'
));
foreach ($components as &$component)
{
@ -219,7 +221,7 @@ if ($enabled)
$menu->getParent();
}
else {
$menu->addChild(new JMenuNode(JText::_('Components'), null, 'disabled'));
$menu->addChild(new JMenuNode(JText::_('Mod_Menu_Components'), null, 'disabled'));
}
//
@ -235,29 +237,29 @@ if ($im || $mm || $pm || $tm || $lm)
{
if ($enabled)
{
$menu->addChild(new JMenuNode(JText::_('Mod_Extensions_Extensions'), '#'), true);
$menu->addChild(new JMenuNode(JText::_('Mod_Menu_Extensions_Extensions'), '#'), true);
if ($im)
{
$menu->addChild(new JMenuNode(JText::_('Mod_Extensions_Extension_Manager'), 'index.php?option=com_installer', 'class:install'));
$menu->addChild(new JMenuNode(JText::_('Mod_Menu_Extensions_Extension_Manager'), 'index.php?option=com_installer', 'class:install'));
$menu->addSeparator();
}
if ($mm) {
$menu->addChild(new JMenuNode(JText::_('Mod_Extensions_Module_Manager'), 'index.php?option=com_modules', 'class:module'));
$menu->addChild(new JMenuNode(JText::_('Mod_Menu_Extensions_Module_Manager'), 'index.php?option=com_modules', 'class:module'));
}
if ($pm) {
$menu->addChild(new JMenuNode(JText::_('Mod_Extensions_Plugin_Manager'), 'index.php?option=com_plugins', 'class:plugin'));
$menu->addChild(new JMenuNode(JText::_('Mod_Menu_Extensions_Plugin_Manager'), 'index.php?option=com_plugins', 'class:plugin'));
}
if ($tm) {
$menu->addChild(new JMenuNode(JText::_('Mod_Extensions_Template_Manager'), 'index.php?option=com_templates', 'class:themes'));
$menu->addChild(new JMenuNode(JText::_('Mod_Menu_Extensions_Template_Manager'), 'index.php?option=com_templates', 'class:themes'));
}
if ($lm) {
$menu->addChild(new JMenuNode(JText::_('Mod_Extensions_Language_Manager'), 'index.php?option=com_languages', 'class:language'));
$menu->addChild(new JMenuNode(JText::_('Mod_Menu_Extensions_Language_Manager'), 'index.php?option=com_languages', 'class:language'));
}
$menu->getParent();
}
else {
$menu->addChild(new JMenuNode(JText::_('Mod_Extensions_Extensions'), null, 'disabled'));
$menu->addChild(new JMenuNode(JText::_('Mod_Menu_Extensions_Extensions'), null, 'disabled'));
}
}

View File

@ -1,198 +0,0 @@
<?php
/**
* @version $Id:mod_menu.php 2463 2006-02-18 06:05:38Z webImagery $
* @package Joomla.Administrator
* @subpackage mod_menu
* @copyright Copyright (C) 2005 - 2009 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
// No direct access.
defined('_JEXEC') or die;
//
// Site SubMenu
//
if ($enabled)
{
$menu->addChild(new JMenuNode(JText::_('Site'), '#'), true);
$menu->addChild(new JMenuNode(JText::_('Control Panel'), 'index.php', 'class:cpanel'));
$menu->addSeparator();
if ($user->authorize('core.users.manage')) {
$menu->addChild(new JMenuNode(JText::_('User Manager'), 'index.php?option=com_users', 'class:user'));
}
if ($user->authorize('core.media.manage')) {
$menu->addChild(new JMenuNode(JText::_('Media Manager'), 'index.php?option=com_media', 'class:media'));
}
$menu->addSeparator();
if ($user->authorize('core.config.manage')) {
$menu->addChild(new JMenuNode(JText::_('Configuration'), 'index.php?option=com_config', 'class:config'));
$menu->addSeparator();
}
$menu->addChild(new JMenuNode(JText::_('Logout'), 'index.php?option=com_login&task=logout', 'class:logout'));
$menu->getParent();
}
else {
$menu->addChild(new JMenuNode(JText::_('Site'), null, 'disabled'));
}
//
// Menus SubMenu
//
if ($user->authorize('core.menus.manage'))
{
if ($enabled)
{
$menu->addChild(new JMenuNode(JText::_('Menus'), '#'), true);
$menu->addChild(new JMenuNode(JText::_('Menu Manager'), 'index.php?option=com_menus&view=menus', 'class:menu'));
$menu->addSeparator();
// Menu Types
foreach (ModMenuHelper::getMenus() as $menuType)
{
$menu->addChild(
new JMenuNode(
$menuType->title.($menuType->home ? ' *' : ''),
'index.php?option=com_menus&view=items&menutype='.$menuType->menutype, 'class:menu'
)
);
}
$menu->getParent();
}
else {
$menu->addChild(new JMenuNode(JText::_('Menus'), null, 'disabled'));
}
}
//
// Components SubMenu
//
if ($enabled)
{
$db = &JFactory::getDbo();
$menu->addChild(new JMenuNode(JText::_('Components'), '#'), true);
// Get the authorised components and sub-menus.
$components = ModMenuHelper::getComponents();
foreach ($components as &$component)
{
$text = $lang->hasKey($component->option) ? JText::_($component->option) : $component->name;
if (!empty($component->submenu))
{
// This component has a db driven submenu.
$menu->addChild(new JMenuNode($text, 'index.php?'.$component->admin_menu_link, $component->admin_menu_img), true);
foreach ($component->submenu as $sub)
{
$key = $component->option.'_'.str_replace(' ', '_', $sub->name);
$text = $lang->hasKey($key) ? JText::_($key) : $sub->name;
$menu->addChild(new JMenuNode($text, 'index.php?'.$component->admin_menu_link, $sub->admin_menu_img));
}
$menu->getParent();
}
else {
$menu->addChild(new JMenuNode($text, $link, $component->admin_menu_img));
}
}
$menu->getParent();
}
else {
$menu->addChild(new JMenuNode(JText::_('Components'), null, 'disabled'));
}
//
// Extensions SubMenu
//
$im = $user->authorize('core.installer.manage');
$mm = $user->authorize('core.modules.manage');
$pm = $user->authorize('core.plugins.manage');
$tm = $user->authorize('core.templates.manage');
$lm = $user->authorize('core.languages.manage');
if ($im || $mm || $pm || $tm || $lm)
{
if ($enabled)
{
$menu->addChild(new JMenuNode(JText::_('Extensions'), '#'), true);
if ($im)
{
$menu->addChild(new JMenuNode(JText::_('Extension Manager'), 'index.php?option=com_installer', 'class:install'));
$menu->addSeparator();
}
if ($mm) {
$menu->addChild(new JMenuNode(JText::_('Module Manager'), 'index.php?option=com_modules', 'class:module'));
}
if ($pm) {
$menu->addChild(new JMenuNode(JText::_('Plugin Manager'), 'index.php?option=com_plugins', 'class:plugin'));
}
if ($tm) {
$menu->addChild(new JMenuNode(JText::_('Template Manager'), 'index.php?option=com_templates', 'class:themes'));
}
if ($lm) {
$menu->addChild(new JMenuNode(JText::_('Language Manager'), 'index.php?option=com_languages', 'class:language'));
}
$menu->getParent();
}
else {
$menu->addChild(new JMenuNode(JText::_('Extensions'), null, 'disabled'));
}
}
//
// Tools SubMenu
//
if ($enabled)
{
$lang->load('com_redirect.menu');
$menu->addChild(new JMenuNode(JText::_('Tools'), '#'), true);
$menu->addChild(new JMenuNode(JText::_('com_redirect'), 'index.php?option=com_redirect', 'class:component'));
$menu->addSeparator();
if ($user->authorize('core.messages.manage'))
{
$menu->addChild(new JMenuNode(JText::_('Read Messages'), 'index.php?option=com_messages', 'class:messages'));
$menu->addChild(new JMenuNode(JText::_('Write Message'), 'index.php?option=com_messages&task=add', 'class:messages'));
$menu->addSeparator();
}
if ($user->authorize('core.massmail.manage'))
{
$menu->addChild(new JMenuNode(JText::_('Mass Mail'), 'index.php?option=com_massmail', 'class:massmail'));
$menu->addSeparator();
}
if ($user->authorize('core.checkin.manage'))
{
$menu->addChild(new JMenuNode(JText::_('Global Checkin'), 'index.php?option=com_checkin', 'class:checkin'));
$menu->addSeparator();
}
if ($user->authorize('core.cache.manage'))
{
$menu->addChild(new JMenuNode(JText::_('Clean Cache'), 'index.php?option=com_cache', 'class:config'));
$menu->addChild(new JMenuNode(JText::_('Purge Expired Cache'), 'index.php?option=com_cache&view=purge', 'class:config'));
}
$menu->getParent();
}
else {
$menu->addChild(new JMenuNode(JText::_('Tools'), null, 'disabled'));
}
//
// Help SubMenu
//
if ($enabled)
{
$menu->addChild(new JMenuNode(JText::_('Help'), '#'), true);
$menu->addChild(new JMenuNode(JText::_('Joomla! Help'), 'index.php?option=com_admin&view=help', 'class:help'));
$menu->addChild(new JMenuNode(JText::_('System Info'), 'index.php?option=com_admin&view=sysinfo', 'class:info'));
$menu->getParent();
}
else {
$menu->addChild(new JMenuNode(JText::_('Help'), null, 'disabled'));
}
$menu->renderMenu('menu', $enabled ? '' : 'disabled');

View File

@ -8,12 +8,12 @@
<authorEmail>admin@joomla.org</authorEmail>
<authorUrl>www.joomla.org</authorUrl>
<version>1.6.0</version>
<description>This_module_shows_the_status_of_the_logged_in_user.</description>
<description>MOD_STATUS_DESC</description>
<files>
<filename module="mod_status">mod_status.php</filename>
</files>
<params>
<param name="cache" type="list" default="0" label="Caching" description="Select whether to cache the content of this module">
<param name="cache" type="list" default="0" label="Mod_Status_Cache_Label" description="Mod_Status_Cache_Desc">
<option value="0">Never</option>
</param>
</params>

View File

@ -13,16 +13,16 @@ defined('_JEXEC') or die;
$output = array();
// Print the logged in users.
$output[] = "<span class=\"loggedin-users\">".$online_num. " " . JText::_('Users') . "</span>";
$output[] = "<span class=\"loggedin-users\">".$online_num. " " . JText::_('mod_status_users') . "</span>";
// Print the inbox message.
$output[] = "<span class=\"$inboxClass\"><a href=\"$inboxLink\">". $unread . " " . JText::_('Messages'). "</a></span>";
$output[] = "<span class=\"$inboxClass\"><a href=\"$inboxLink\">". $unread . " " . JText::_('mod_status_Messages'). "</a></span>";
// Print the Preview link to Main site.
$output[] = "<span class=\"viewsite\"><a href=\"".JURI::root()."\" target=\"_blank\">".JText::_('View site')."</a></span>";
$output[] = "<span class=\"viewsite\"><a href=\"".JURI::root()."\" target=\"_blank\">".JText::_('mod_status_View_site')."</a></span>";
// Print the logout link.
$output[] = "<span class=\"logout\"><a href=\"$logoutLink\">".JText::_('Log_out')."</a></span>";
$output[] = "<span class=\"logout\"><a href=\"$logoutLink\">".JText::_('mod_status_Log_out')."</a></span>";
// Reverse rendering order for rtl display.
if ($lang->isRTL()) {

View File

@ -10,15 +10,9 @@
// no direct access
defined('_JEXEC') or die;
jimport('joomla.application.component.helper');
jimport('joomla.application.component.controller');
require_once JPATH_COMPONENT.DS.'router.php';
require_once(JPATH_COMPONENT.DS.'controller.php');
// Create the controller
$controller = new ContactController();
// Perform the Request task
$controller->execute(JRequest::getVar('task', null, 'default', 'cmd'));
// Redirect if set by the controller
$controller->redirect();
$controller = JController::getInstance('Contact');
$controller->execute(JRequest::getVar('task'));
$controller->redirect();

View File

@ -86,7 +86,7 @@ class ContactController extends JController
$default = JText::sprintf('MAILENQUIRY', $SiteName);
$contactId = JRequest::getInt('id', 0, 'post');
$name = JRequest::getVar('name', '', 'post');
$email = JRequest::getVar('email', '', 'post');
$email = JRequest::getVar('email', '', 'post');
$subject = JRequest::getVar('subject', $default, 'post');
$body = JRequest::getVar('text', '', 'post');
$emailCopy = JRequest::getInt('email_copy', 0, 'post');
@ -184,8 +184,18 @@ class ContactController extends JController
}
}
$msg = JText::_('Thank you for your e-mail');
$link = JRoute::_('index.php?option=com_contact&view=contact&id='.$contact->slug.'&catid='.$contact->catslug, false);
$msg = JText::_('Com_Contact_Contact_Email_Thanks');
//redirect if it is set
if ($this->contact->params->$link)
{
$link=$contact->redirect;
}
else
{
// stay on the same contact page
$link = JRoute::_('index.php?option=com_contact&view=contact&id='.(int) $contact->id, false);
}
$this->setRedirect($link, $msg);
}

View File

@ -36,7 +36,7 @@ class ContactModelCategory extends JModel
$wheres[] = 'cc.published = 1';
$wheres[] = 'a.access IN ('.$groups.')';
$wheres[] = 'cc.access <= ('.$groups.')';
$wheres[] = 'cc.access IN ('.$groups.')';
$groupBy = 'cc.id';
$orderBy = 'cc.lft' ;
@ -147,4 +147,4 @@ class ContactModelCategory extends JModel
$query = $this->_getContactsQuery($options);
return $this->_getListCount($query);
}
}
}

View File

@ -30,6 +30,7 @@ class ContactModelContact extends JModel
$db = &JFactory::getDbo();
$user = &JFactory::getUser();
$id = @$options['id'];
$groups = implode(',', $user->authorisedLevels());
$groupBy = @$options['group by'];
$orderBy = @$options['order by'];
@ -53,12 +54,11 @@ class ContactModelContact extends JModel
' FROM ' . $from .
' '. implode (' ', $joins) .
' WHERE ' . implode(' AND ', $wheres);
return $query;
}
/**
* Gets a list of categories
* Gets a list of contacts
* @param array
* @return mixed Object or null
*/
@ -66,6 +66,21 @@ class ContactModelContact extends JModel
{
$query = $this->_getContactQuery($options);
$result = $this->_getList($query);
return @$result[0];
if ($contact = @$result[0])
{
$user = &JFactory::getUser();
$groups = implode(',', $user->authorisedLevels());
//get the content by the linked user
$query = 'SELECT id, title, state, access, created' .
' FROM #__content' .
' WHERE created_by = '.(int)$contact->user_id .
' AND access IN ('. $groups . ')' .
' ORDER BY state DESC, created DESC' ;
$this->_db->setQuery($query, 0, 10);
$articles = $this->_db->loadObjectList();
$contact->articles=$articles;
}
return $contact;
}
}
}

View File

@ -0,0 +1,30 @@
<?php
/**
* @version $Id: default_siblings.php 12416 2009-07-03 08:49:14Z eddieajau $
* @package Joomla.Site
* @subpackage com_content
* @copyright Copyright (C) 2005 - 2009 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
// no direct access
defined('_JEXEC') or die;
?>
<?php if (empty($this->siblings)) : ?>
no siblings
<?php else : ?>
<h5>Siblings</h5>
<ol>
<?php foreach ($this->siblings as &$item) : ?>
<li>
<?php if ($item->id != $this->item->id) : ?>
<a href="<?php echo JRoute::_(ContactRoute::category($item->slug)); ?>">
<?php echo $this->escape($item->title); ?></a>
<?php else : ?>
<?php echo $this->escape($item->title); ?>
<?php endif; ?>
</li>
<?php endforeach; ?>
</ol>
<?php endif; ?>

View File

@ -16,7 +16,7 @@
<field
name="catid"
type="category"
type="categories"
extension="com_contact"
default="0"
label="Select Category"

View File

@ -0,0 +1,26 @@
<?php
/**
* @version $Id: default_children.php 12416 2009-07-03 08:49:14Z eddieajau $
* @package Joomla.Site
* @subpackage com_content
* @copyright Copyright (C) 2005 - 2009 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
// no direct access
defined('_JEXEC') or die;
?>
<?php if (empty($this->children)) : ?>
no children
<?php else : ?>
<h5>Children</h5>
<ol>
<?php foreach ($this->children as &$item) : ?>
<li>
<a href="<?php echo JRoute::_(ContactRoute::category($item->slug)); ?>">
<?php echo $this->escape($item->title); ?></a>
</li>
<?php endforeach; ?>
</ol>
<?php endif; ?>

View File

@ -0,0 +1,26 @@
<?php
/**
* @version $Id: default_parents.php 12416 2009-07-03 08:49:14Z eddieajau $
* @package Joomla.Site
* @subpackage com_content
* @copyright Copyright (C) 2005 - 2009 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
// no direct access
defined('_JEXEC') or die;
?>
<?php if (empty($this->parents)) : ?>
no parents
<?php else : ?>
<h5>Parents</h5>
<ol>
<?php foreach ($this->parents as &$item) : ?>
<li>
<a href="<?php echo JRoute::_(ContactRoute::category($item->slug)); ?>">
<?php echo $this->escape($item->title); ?></a>
</li>
<?php endforeach; ?>
</ol>
<?php endif; ?>

View File

@ -0,0 +1,30 @@
<?php
/**
* @version $Id: default_siblings.php 12416 2009-07-03 08:49:14Z eddieajau $
* @package Joomla.Site
* @subpackage com_content
* @copyright Copyright (C) 2005 - 2009 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
// no direct access
defined('_JEXEC') or die;
?>
<?php if (empty($this->siblings)) : ?>
no siblings
<?php else : ?>
<h5>Siblings</h5>
<ol>
<?php foreach ($this->siblings as &$item) : ?>
<li>
<?php if ($item->id != $this->item->id) : ?>
<a href="<?php echo JRoute::_(ContactRoute::category($item->slug)); ?>">
<?php echo $this->escape($item->title); ?></a>
<?php else : ?>
<?php echo $this->escape($item->title); ?>
<?php endif; ?>
</li>
<?php endforeach; ?>
</ol>
<?php endif; ?>

View File

@ -49,6 +49,11 @@ class ContactViewCategory extends JView
$contacts = $model->getContacts($options);
$total = $model->getContactCount($options);
// Validate the category.
//add alternate feed link
if ($pparams->get('show_feed_link', 1) == 1)
{
@ -59,6 +64,8 @@ class ContactViewCategory extends JView
$document->addHeadLink(JRoute::_($link.'&type=atom'), 'alternate', 'rel', $attribs);
}
//prepare contacts
if ($pparams->get('show_email', 0) == 1) {
jimport('joomla.mail.helper');

View File

@ -1,7 +1,12 @@
<?php
/**
/**
* $Id$
* @package Joomla.Site
* @subpackage Contact
* @copyright Copyright (C) 2005 - 2009 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
$cparams = JComponentHelper::getParams ('com_media');
@ -41,39 +46,57 @@ $cparams = JComponentHelper::getParams ('com_media');
</td>
</tr>
<?php endif; ?>
<tr>
<td>
<table border="0" width="100%">
<tr>
<td></td>
<td rowspan="2" align="right" valign="top">
<?php if ($this->contact->image && $this->contact->params->get('show_image')) : ?>
<div style="float: right;">
<?php echo JHtml::_('image', 'images/stories' . '/'.$this->contact->image, JText::_('Contact'), array('align' => 'middle')); ?>
</div>
<?php endif; ?>
</td>
</tr>
<tr>
<td>
<?php echo $this->loadTemplate('address'); ?>
</td>
</tr>
</table>
</td>
<td>&nbsp;</td>
</tr>
<?php if ($this->contact->params->get('allow_vcard')) : ?>
<tr>
<td colspan="2">
<?php echo JText::_('Download information as a');?>
<a href="<?php echo JURI::base(); ?>index.php?option=com_contact&amp;task=vcard&amp;contact_id=<?php echo $this->contact->id; ?>&amp;format=raw&amp;tmpl=component">
<?php echo JText::_('VCard');?></a>
</td>
</tr>
<?php endif;
if ($this->contact->params->get('show_email_form') && ($this->contact->email_to || $this->contact->user_id))
echo $this->loadTemplate('form');
?>
<tr>
<td>
<table border="0" width="100%">
<tr>
<td></td>
<td rowspan="2" align="right" valign="top">
<?php if ($this->contact->image && $this->contact->params->get('show_image')) : ?>
<div style="float: right;">
<?php echo JHtml::_('image', 'images/stories' . '/'.$this->contact->image, JText::_('Contact'), array('align' => 'middle')); ?>
</div>
<?php endif; ?>
</td>
</tr>
<tr>
<td>
<?php echo $this->loadTemplate('address'); ?>
</td>
</tr>
<tr>
<td>
<?php echo $this->loadTemplate('links'); ?>
</td>
</tr>
</table>
</td>
<td>&nbsp;</td>
</tr>
<?php if ($this->contact->params->get('allow_vcard')) : //TODO either reimplement vcard or delete this.?>
<tr>
<td colspan="2">
<?php echo JText::_('Download information as a');?>
<a href="<?php echo JURI::base(); ?>index.php?option=com_contact&amp;task=vcard&amp;contact_id=<?php echo $this->contact->id; ?>&amp;format=raw&amp;tmpl=component">
<?php echo JText::_('VCard');?></a>
</td>
</tr>
<tr>
<td>
<?php endif;
if ($this->contact->params->get('show_email_form') && ($this->contact->email_to ))
echo $this->loadTemplate('form');
?>
</td>
</tr>
<tr>
<td>
<?php
if ($this->contact->params->get('show_articles') && $this->contact->user_id)
echo $this->loadTemplate('articles');
?>
</td>
</tr>
</table>
</div>

View File

@ -1,48 +1,48 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Id$ -->
<metadata>
<layout
title="com_contact_contact_view_default_title">
<message>
<![CDATA[com_contact_contact_view_default_desc]]>
</message>
</layout>
<fields
group="request"
array="true"
label="Menus_Layout_Request_Variables_Label"
description="Menus_Layout_Request_Variables_Desc"
<!-- $Id$ -->
<metadata>
<layout
title="com_contact_contact_view_default_title">
<message>
<![CDATA[com_contact_contact_view_default_desc]]>
</message>
</layout>
<fields
group="request"
array="true"
label="Menus_Layout_Request_Variables_Label"
description="Menus_Layout_Request_Variables_Desc"
addfieldpath="/administrator/components/com_contact/models/fields">
<field
name="id"
type="contact"
type="contacts"
default=""
label="Select Contact"
description="The contact to link to" />
</fields>
<fields>
<field
name="show_contact_list"
type="radio"
default="0"
label="Drop Down"
description="fieldDROPDOWN">
<option
value="0">Hide</option>
<option
value="1">Show</option>
</field>
<field
name="show_category_crumb"
type="radio"
default="0"
label="Show Category in Breadcrumbs"
description="Show/Hide the category in the breadcrumbs">
<option
value="0">Hide</option>
<option
value="1">Show</option>
</field>
</fields>
</metadata>
description="The contact to link to"
/>
</fields>
<fields>
<field
name="show_contact_list"
type="radio"
default="0"
label="Com_Contact_Contact_Contact_Show_List_Label"
description="Com_Contact_Contact_Contact_Show_List_Desc">
<option
value="0">JHide</option>
<option
value="1">JShow</option>
</field>
<field
name="show_category_crumb"
type="radio"
default="0"
label="Com_Contact_Contact_Breadcrumbs_Label"
description="Com_Contact_Contact_Breadcrumbs_Desc">
<option
value="0">JHide</option>
<option
value="1">JShow</option>
</field>
</fields>
</metadata>

View File

@ -1,5 +1,11 @@
<?php
/** $Id$ */
/**
* @version $Id$
* @package Joomla.Site
* @subpackage Contact
* @copyright Copyright (C) 2005 - 2009 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
?>
<?php if (($this->contact->params->get('address_check') > 0) && ($this->contact->address || $this->contact->suburb || $this->contact->state || $this->contact->country || $this->contact->postcode)) : ?>

View File

@ -0,0 +1,33 @@
<?php
/**
* @version
* @package Joomla.Site
* @subpackage Contact
* @copyright Copyright (C) 2005 - 2009 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
?>
<?php
if ($this->contact->params->get('show_articles')) :
echo '<h3>';
echo JText::_('Com_Contact_Contact_Articles_Heading') ;
echo '</h3>';
echo '<ol>';
foreach ($this->contact->articles as $article):
{
$articlelink=
'<li><a href="'
. $article->link = JRoute::_('index.php?option=com_content&view=article&id='.$article->id)
. '">'
. $article->text = htmlspecialchars($article->title)
. '</a></li>';
echo $articlelink;
};
endforeach;
echo '</ol>';
endif;
?>

View File

@ -1,5 +1,12 @@
<?php
/** $Id$ */
/**
* @version /** $Id: default_form.php 11845 2009-05-27 23:28:59Z robs
* @package Joomla.Site
* @subpackage Contact
* @copyright Copyright (C) 2005 - 2009 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
$script = '<!--
@ -8,9 +15,9 @@ defined('_JEXEC') or die;
if (valid == false) {
// do field validation
if (frm.email.invalid) {
alert("' . JText::_('Please enter a valid e-mail address.', true) . '");
alert("' . JText::_('Com_contact_contact_enter_valid_e-mail.', true) . '");
} else if (frm.text.invalid) {
alert("' . JText::_('CONTACT_FORM_NC', true) . '");
alert("' . JText::_('Com_contact_contact_CONTACT_FORM_NC', true) . '");
}
return false;
} else {
@ -32,25 +39,25 @@ defined('_JEXEC') or die;
<form action="<?php echo JRoute::_('index.php');?>" method="post" name="emailForm" id="emailForm" class="form-validate">
<div class="contact_email<?php echo $this->params->get('pageclass_sfx'); ?>">
<label for="contact_name">
&nbsp;<?php echo JText::_('Enter your name');?>:
&nbsp;<?php echo JText::_('Com_contact_contact_Email_name');?>:
</label>
<br />
<input type="text" name="name" id="contact_name" size="30" class="inputbox" value="" />
<br />
<label id="contact_emailmsg" for="contact_email">
&nbsp;<?php echo JText::_('Email address');?>:
&nbsp;<?php echo JText::_('Com_contact_contact_Email_address');?>:
</label>
<br />
<input type="text" id="contact_email" name="email" size="30" value="" class="inputbox required validate-email" maxlength="100" />
<br />
<label for="contact_subject">
&nbsp;<?php echo JText::_('Message subject');?>:
&nbsp;<?php echo JText::_('Com_contact_contact_Message_subject');?>:
</label>
<br />
<input type="text" name="subject" id="contact_subject" size="30" class="inputbox" value="" />
<br /><br />
<label id="contact_textmsg" for="contact_text">
&nbsp;<?php echo JText::_('Enter your message');?>:
&nbsp;<?php echo JText::_('Com_contact_contact_Enter_message');?>:
</label>
<br />
<textarea cols="50" rows="10" name="text" id="contact_text" class="inputbox required"></textarea>
@ -58,18 +65,19 @@ defined('_JEXEC') or die;
<br />
<input type="checkbox" name="email_copy" id="contact_email_copy" value="1" />
<label for="contact_email_copy">
<?php echo JText::_('EMAIL_A_COPY'); ?>
<?php echo JText::_('Com_contact_contact_EMAIL_A_COPY'); ?>
</label>
<?php endif; ?>
<br />
<br />
<button class="button validate" type="submit"><?php echo JText::_('Send'); ?></button>
<button class="button validate" type="submit"><?php echo JText::_('Com_contact_contact_Send'); ?></button>
</div>
<input type="hidden" name="option" value="com_contact" />
<input type="hidden" name="view" value="contact" />
<input type="hidden" name="id" value="<?php echo $this->contact->id; ?>" />
<input type="hidden" name="task" value="submit" />
<input type="hidden" name="return" value="<?php echo $return; ?>" />
<?php echo JHtml::_('form.token'); ?>
</form>
<br />

View File

@ -0,0 +1,36 @@
<?php
/**
* @version
* @package Joomla.Site
* @subpackage Contact
* @copyright Copyright (C) 2005 - 2009 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
?>
<?php
if ($this->contact->params->get('show_links')) : ?>
<h3>
<? echo JText::_('Com_Contact_Contact_Links_Heading') ; ?>
</h3>
<ul>
<?php if ($this->contact->params->get('linka')) : ?>
<li><a href="<?php echo $this->contact->params->get('linka') ?>"><?php echo $this->contact->params->get('linka_name') ?></a></li>
<?php endif; ?>
<?php if ($this->contact->params->get('linkb')) : ?>
<li><a href="<?php echo $this->contact->params->get('linkb') ?>"><?php echo $this->contact->params->get('linkb_name') ?></a></li>
<?php endif; ?>
<?php if ($this->contact->params->get('linkc')) : ?>
<li><a href="<?php echo $this->contact->params->get('linkc') ?>"><?php echo $this->contact->params->get('linkc_name') ?></a></li>
<?php endif; ?>
<?php if ($this->contact->params->get('linkd')) : ?>
<li><a href="<?php echo $this->contact->params->get('linkd') ?>"><?php echo $this->contact->params->get('linkd_name') ?></a></li>
<?php endif; ?>
<?php if ($this->contact->params->get('linke')) : ?>
<li><a href="<?php echo $this->contact->params->get('linke') ?>"><?php echo $this->contact->params->get('linke_name') ?></a></li>
<?php endif; ?>
</ul>
<? endif; ?>

View File

@ -46,7 +46,8 @@ class ContactViewContact extends JView
$options['id'] = $contactId;
$contact = $model->getContact($options);
// check if we have a contact
if (!is_object($contact)) {
JError::raiseError(404, 'Contact not found');
@ -94,21 +95,7 @@ class ContactViewContact extends JView
$pparams->merge($contact->params);
// Handle component/menu overides for some contact parameters if set
/*
$contact->params->def('contact_icons', $pparams->get('contact_icons'));
$contact->params->def('icon_address', $pparams->get('icon_address'));
$contact->params->def('icon_email', $pparams->get('icon_email'));
$contact->params->def('icon_telephone', $pparams->get('icon_telephone'));
$contact->params->def('icon_fax', $pparams->get('icon_fax'));
$contact->params->def('icon_misc', $pparams->get('icon_misc'));
$contact->params->def('show_position', $pparams->get('show_position'));
$contact->params->def('show_email', $pparams->get('show_email'));
$contact->params->def('show_telephone', $pparams->get('show_telephone'));
$contact->params->def('show_mobile', $pparams->get('show_mobile'));
$contact->params->def('show_fax', $pparams->get('show_fax'));
$contact->params->def('allow_vcard', $pparams->get('allow_vcard'));
*/
// Handle email cloaking
if ($contact->email_to && $contact->params->get('show_email')) {
@ -163,7 +150,7 @@ class ContactViewContact extends JView
$contact->params->set('marker_telephone', $image3);
$contact->params->set('marker_fax', $image4);
$contact->params->set('marker_misc', $image5);
$contact->params->set('marker_mobile', $image6);
$contact->params->set('marker_mobile', $image6);
$contact->params->set('column_width', '40');
break;
}

View File

@ -15,58 +15,69 @@ JHtml::addIncludePath(JPATH_COMPONENT.DS.'helpers');
// Create shortcut to parameters.
$params = $this->state->get('params');
?>
<div class="jarticle<?php echo $params->get('pageclass_sfx')?>">
<?php if ($params->get('show_page_title', 1) && $params->get('page_title') != $this->item->title) : ?>
<h1>
<h2>
<?php echo $this->escape($params->get('page_title')); ?>
</h1>
</h2>
<?php endif; ?>
<?php if ($params->get('show_title') || $params->get('access-edit') || $params->get('show_title') || $params->get('show_print_icon') || $params->get('show_email_icon')) : ?>
<?php if ($params->get('show_title')) : ?>
<h2>
<h3>
<?php if ($params->get('link_titles') && !empty($this->item->rlink)) : ?>
<a href="<?php echo $this->item->rlink; ?>">
<?php echo $this->escape($this->item->title); ?></a>
<?php else : ?>
<?php echo $this->escape($this->item->title); ?>
<?php endif; ?>
</h2>
</h3>
<?php endif; ?>
<?php if ($params->get('access-edit') || $params->get('show_title') || $params->get('show_print_icon') || $params->get('show_email_icon')) : ?>
<ul>
<ul class="jactions">
<?php if (!$this->print) : ?>
<?php if ($params->get('show_print_icon')) : ?>
<li>
<li class="jprint">
<?php echo JHtml::_('icon.print_popup', $this->item, $params); ?>
</li>
</li>
<?php endif; ?>
<?php if ($params->get('show_email_icon')) : ?>
<li>
<li class="jemail">
<?php echo JHtml::_('icon.email', $this->item, $params); ?>
</li>
</li>
<?php endif; ?>
<?php if ($params->get('access-edit')) : ?>
<li>
<li class="jedit">
<?php echo JHtml::_('icon.edit', $this->item, $params); ?>
</li>
</li>
<?php endif; ?>
<?php else : ?>
<li>
<li class="jprintscreen">
<?php echo JHtml::_('icon.print_screen', $this->item, $params); ?>
</li>
<?php endif; ?>
</ul>
<?php endif; ?>
<?php endif; ?>
<?php if (!$params->get('show_intro')) :
echo $this->item->event->afterDisplayTitle;
endif; ?>
<?php echo $this->item->event->beforeDisplayContent; ?>
<div class="jiteminfo">
<?php if ($params->get('show_category') && $this->item->catid) : ?>
<span>
<span class="jcategory">
<?php if ($params->get('link_category')) : ?>
<a href="<?php echo JRoute::_(ContentRoute::category($this->item->catslug));?>">
<?php echo $this->escape($this->item->category_title); ?></a>
@ -76,17 +87,25 @@ endif; ?>
</span>
<?php endif; ?>
<?php if ($params->get('show_create_date')) : ?>
<span class="jcreated-date">
<?php echo JHtml::_('date', $this->item->created, JText::_('DATE_FORMAT_LC2')) ?>
</span>
<?php endif; ?>
<?php if (intval($this->item->modified) !=0 && $params->get('show_modify_date')) : ?>
<span class="jmodified-date">
<?php echo JText::sprintf('LAST_UPDATED2', JHtml::_('date', $this->item->modified, JText::_('DATE_FORMAT_LC2'))); ?>
</span>
<?php endif; ?>
<?php if (($params->get('show_author')) && ($this->item->author != "")) : ?>
<span>
<span class="jcreated-by">
<?php JText::printf('Written by', ($this->item->created_by_alias ? $this->item->created_by_alias : $this->item->author)); ?>
</span>
<?php endif; ?>
<?php if ($params->get('show_create_date')) : ?>
<span>
<?php echo JHtml::_('date', $this->item->created, JText::_('DATE_FORMAT_LC2')) ?>
</span>
<?php endif; ?>
</div><!-- end iteminfo -->
<?php if (isset ($this->item->toc)) : ?>
<?php echo $this->item->toc; ?>
@ -94,11 +113,5 @@ endif; ?>
<?php echo $this->item->text; ?>
<?php if (intval($this->item->modified) !=0 && $params->get('show_modify_date')) : ?>
<span>
<?php echo JText::sprintf('LAST_UPDATED2', JHtml::_('date', $this->item->modified, JText::_('DATE_FORMAT_LC2'))); ?>
</span>
<?php endif; ?>
<span class="article_separator">&nbsp;</span>
<?php echo $this->item->event->afterDisplayContent; ?>
</div><!-- end article -->

View File

@ -14,28 +14,49 @@ JHtml::addIncludePath(JPATH_COMPONENT.DS.'helpers');
// If the page class is defined, wrap the whole output in a div.
$pageClass = $this->params->get('pageclass_sfx');
$curLevel = 0;
$difLevel = 0;
?>
<?php if ($pageClass) : ?>
<div class="<?php echo $pageClass;?>">
<?php endif;?>
<div class="jcategories-list<?php echo $pageClass;?>">
<?php if ($this->params->get('show_page_title', 1)) : ?>
<h1>
<h2>
<?php echo $this->escape($this->params->get('page_title')); ?>
</h1>
</h2>
<?php endif; ?>
<?php if (!empty($this->items)) : ?>
<ol>
<?php foreach ($this->items as &$item) : ?>
<?php foreach ($this->items as &$item) :
$difLevel = $item->level - $curLevel;
if ($difLevel < 0) :
for ($i = 0, $n = -($difLevel); $i < $n; $i++) :
echo "</ol>";
endfor;
$curLevel = $item->level;
elseif ($difLevel > 0) :
for ($i = 0, $n = $difLevel; $i < $n; $i++) : ?>
<ol>
<?php endfor;
$curLevel = $item->level;
endif;
?>
<li>
<a href="<?php echo ContentRoute::category('index.php?option=com_content&view=category&id='.$this->escape($item->slug));?>">
<span class="jitem-title"><a href="<?php echo ContentRoute::category('index.php?option=com_content&view=category&id='.$this->escape($item->slug));?>">
<?php echo $this->escape($item->title); ?></a>
</span>
<?php if ($item->description) : ?>
<div class="jdescription">
<?php echo $item->description; ?>
</div>
<?php endif; ?>
</li>
<?php endforeach; ?>
</ol>
<?php endif; ?>
<?php if ($pageClass) : ?>
</div>
<?php endif;?>

View File

@ -10,108 +10,88 @@
// no direct access
defined('_JEXEC') or die;
JHtml::addIncludePath(JPATH_COMPONENT.DS.'helpers');
$cparams =& JComponentHelper::getParams('com_media');
// If the page class is defined, add to class as suffix.
// It will be a separate class if the user starts it with a space
$pageClass = $this->params->get('pageclass_sfx');
?>
<div class="jarticles<?php echo $pageClass;?>">
<?php if ($this->params->get('show_page_title', 1)) : ?>
<div class="componentheading<?php echo $this->params->get('pageclass_sfx');?>">
<h2>
<?php echo $this->escape($this->params->get('page_title')); ?>
</div>
</h2>
<?php endif; ?>
<table class="blog<?php echo $this->params->get('pageclass_sfx');?>" cellpadding="0" cellspacing="0">
<!-- Show Category Information -->
<div>
<?php if ($this->params->def('show_description', 1) || $this->params->def('show_description_image', 1)) :?>
<tr>
<td valign="top">
<?php if ($this->params->get('show_description_image') && $this->category->image) : ?>
<img src="<?php echo $this->baseurl . '/' . $cparams->get('image_path') . '/'. $this->category->image;?>" align="<?php echo $this->category->image_position;?>" hspace="6" alt="" />
<?php endif; ?>
<?php if ($this->params->get('show_description') && $this->category->description) : ?>
<?php echo $this->category->description; ?>
<?php endif; ?>
<br/>
<br/>
</td>
</tr>
<?php endif; ?>
<tr>
<td>
<ul>
<?php
foreach($this->children as $child)
{
echo '<li><a href="'.JRoute::_(ContentHelperRoute::getCategoryRoute($child->id)).'">'.$child->title.'</a> ('.$child->numitems.')</li>';
}
?>
</ul>
</td>
</tr>
<?php if ($this->params->get('num_leading_articles')) : ?>
<tr>
<td valign="top">
<?php for ($i = $this->pagination->limitstart; $i < ($this->pagination->limitstart + $this->params->get('num_leading_articles')); $i++) : ?>
<?php if ($i >= $this->total) : break; endif; ?>
<div>
</div>
<!-- Show subcategory links -->
<ol class="jsubcategories">
<?php foreach($this->children as $child) : ?>
<li><a href="<?php /* @TODO class not found echo JRoute::_(ContentHelperRoute::getCategoryRoute($child->id)); */ ?>">
<?php echo $child->title; ?></a> (<?php /* echo @TODO numitems not loaded $child->numitems; */?>)</li>
<?php endforeach; ?>
</ol>
<!-- Leading Articles -->
<?php if (!empty($this->lead_items)) : ?>
<ol class="jarticles-lead">
<?php foreach ($this->lead_items as &$item) : ?>
<li<?php echo $item->state == 0 ? ' class="system-unpublished"' : null; ?>>
<?php
$this->item = &$this->getItem($i, $this->params);
$this->item = &$item;
echo $this->loadTemplate('item');
?>
</div>
<?php endfor; ?>
</td>
</tr>
<?php else : $i = $this->pagination->limitstart; endif; ?>
</li>
<?php endforeach; ?>
</ol>
<?php endif; ?>
<?php
$startIntroArticles = $this->pagination->limitstart + $this->params->get('num_leading_articles');
$numIntroArticles = $startIntroArticles + $this->params->get('num_intro_articles');
if (($numIntroArticles != $startIntroArticles) && ($i < $this->total)) : ?>
<tr>
<td valign="top">
<table width="100%" cellpadding="0" cellspacing="0">
<tr>
<!-- Intro'd Articles -->
<?php if (!empty($this->intro_items)) : ?>
<ol class="jarticles-intro jcols-<?php echo (int) $this->columns;?>">
<?php foreach ($this->intro_items as $key => &$item) : ?>
<li class="jcolumn-<?php echo (((int)$key - 1) % (int) $this->columns)+1;?><?php echo $item->state == 0 ? ' system-unpublished"' : null; ?>">
<?php
$divider = '';
for ($z = 0; $z < $this->params->get('num_columns'); $z ++) :
if ($z > 0) : $divider = " column_separator"; endif; ?>
<td valign="top" width="<?php echo intval(100 / $this->params->get('num_columns')) ?>%" class="article_column<?php echo $divider ?>">
<?php for ($y = 0; $y < ($this->params->get('num_intro_articles') / $this->params->get('num_columns')); $y ++) :
if ($i < $this->total && $i < ($numIntroArticles)) :
$this->item = &$this->getItem($i, $this->params);
echo $this->loadTemplate('item');
$i ++;
endif;
endfor; ?>
</td>
<?php endfor; ?>
</tr>
</table>
</td>
</tr>
$this->item = &$item;
echo $this->loadTemplate('item');
?>
</li>
<?php endforeach; ?>
</ol>
<?php endif; ?>
<?php if ($this->params->get('num_links') && ($i < $this->total)) : ?>
<tr>
<td valign="top">
<div class="blog_more<?php echo $this->params->get('pageclass_sfx') ?>">
<?php
$this->links = array_splice($this->items, $i - $this->pagination->limitstart);
echo $this->loadTemplate('links');
?>
</div>
</td>
</tr>
<?php if (!empty($this->link_items)) : ?>
<div class="jarticles-more">
<?php echo $this->loadTemplate('links'); ?>
</div>
<?php endif; ?>
<?php if ($this->params->get('show_pagination')) : ?>
<tr>
<td valign="top" align="center">
<?php echo $this->pagination->getPagesLinks(); ?>
<br /><br />
</td>
</tr>
<?php endif; ?>
<?php if ($this->params->get('show_pagination_results')) : ?>
<tr>
<td valign="top" align="center">
<?php echo $this->pagination->getPagesCounter(); ?>
</td>
</tr>
<?php endif; ?>
</table>
<?php // if ($this->params->def('show_pagination', 2) == 1 || ($this->params->get('show_pagination') == 2 && $this->pagination->get('pages.total') > 1)) : ?>
<div class="jpagination">
<?php // echo $this->pagination->getPagesLinks(); ?>
<?php // if ($this->params->def('show_pagination_results', 1)) : ?>
<div class="jpag-results">
<?php // echo $this->pagination->getPagesCounter(); ?>
</div>
<?php // endif; ?>
</div>
<?php // endif; ?>
</div>

View File

@ -9,130 +9,106 @@
// no direct access
defined('_JEXEC') or die;
// Create a shortcut for params.
$params = &$this->item->params;
?>
<?php if ($this->item->state == 0) : ?>
<div class="system-unpublished">
<?php endif; ?>
<?php if ($this->item->params->get('show_title') || $this->item->params->get('show_pdf_icon') || $this->item->params->get('show_print_icon') || $this->item->params->get('show_email_icon')) : ?>
<table class="contentpaneopen<?php echo $this->item->params->get('pageclass_sfx'); ?>">
<tr>
<?php if ($this->item->params->get('show_title')) : ?>
<td class="contentheading<?php echo $this->item->params->get('pageclass_sfx'); ?>" width="100%">
<?php if ($this->item->params->get('link_titles') && $this->item->readmore_link != '') : ?>
<a href="<?php echo $this->item->readmore_link; ?>" class="contentpagetitle<?php echo $this->item->params->get('pageclass_sfx'); ?>">
<?php if ($params->get('show_title')) : ?>
<h3>
<?php if ($params->get('link_titles') && $params->get('access-view')) : ?>
<a href="<?php echo JRoute::_(ContentRoute::article($this->item->slug, $this->item->catslug)); ?>">
<?php echo $this->escape($this->item->title); ?></a>
<?php else : ?>
<?php echo $this->escape($this->item->title); ?>
<?php endif; ?>
</td>
<?php endif; ?>
<?php if ($this->item->params->get('show_print_icon')) : ?>
<td align="right" width="100%" class="buttonheading">
<?php echo JHtml::_('icon.print_popup', $this->item, $this->item->params, $this->access); ?>
</td>
<?php endif; ?>
<?php if ($this->item->params->get('show_email_icon')) : ?>
<td align="right" width="100%" class="buttonheading">
<?php echo JHtml::_('icon.email', $this->item, $this->item->params, $this->access); ?>
</td>
<?php endif; ?>
<?php if ($this->item->edit) : ?>
<td align="right" width="100%" class="buttonheading">
<?php echo JHtml::_('icon.edit', $this->item, $this->item->params, $this->access); ?>
</td>
<?php endif; ?>
</tr>
</table>
</h3>
<?php endif; ?>
<?php if (!$this->item->params->get('show_intro')) :
echo $this->item->event->afterDisplayTitle;
endif; ?>
<?php echo $this->item->event->beforeDisplayContent; ?>
<table class="contentpaneopen<?php echo $this->item->params->get('pageclass_sfx'); ?>">
<?php if ($this->item->params->get('show_category') && $this->item->catid) : ?>
<tr>
<td>
<?php if ($this->item->params->get('show_category') && $this->item->catid) : ?>
<span>
<?php if ($this->item->params->get('link_category')) : ?>
<?php echo '<a href="'.JRoute::_(ContentHelperRoute::getCategoryRoute($this->item->catslug)).'">'; ?>
<?php endif; ?>
<?php echo $this->item->category; ?>
<?php if ($this->item->params->get('link_category')) : ?>
<?php echo '</a>'; ?>
<?php endif; ?>
</span>
<?php if ($params->get('show_print_icon') || $params->get('show_email_icon') || $params->get('access-edit')) : ?>
<ul class="jactions">
<?php if ($params->get('show_print_icon')) : ?>
<li class="jprint">
<?php echo JHtml::_('icon.print_popup', $this->item, $params); ?>
</li>
<?php endif; ?>
</td>
</tr>
<?php if ($params->get('show_email_icon')) : ?>
<li class="jemail">
<?php echo JHtml::_('icon.email', $this->item, $params); ?>
</li>
<?php endif; ?>
<?php if ($params->get('access-edit')) : ?>
<li class="jedit">
<?php echo JHtml::_('icon.edit', $this->item, $params); ?>
</li>
<?php endif; ?>
</ul>
<?php endif; ?>
<?php if (($this->item->params->get('show_author')) && ($this->item->author != "")) : ?>
<tr>
<td width="70%" valign="top" colspan="2">
<span class="small">
<?php JText::printf('Written by', ($this->item->created_by_alias ? $this->item->created_by_alias : $this->item->author)); ?>
<?php if (!$params->get('show_intro')) : ?>
<?php echo $this->item->event->afterDisplayTitle; ?>
<?php endif; ?>
<?php echo $this->item->event->beforeDisplayContent; ?>
<div class="jiteminfo">
<?php if ($params->get('show_category')) : ?>
<span class="jcategory">
<?php if ($params->get('link_category')) : ?>
<a href="<?php echo JRoute::_(ContentRoute::category($this->item->catslug)); ?>">
<?php echo $this->escape($this->item->category_title); ?> </a>
<?php else : ?>
<?php echo $this->escape($this->item->category_title); ?>
<?php endif; ?>
</span>
&nbsp;&nbsp;
</td>
</tr>
<?php endif; ?>
<?php endif; ?>
<?php if ($params->get('show_create_date')) : ?>
<span class="jcreated-date">
<?php echo JHtml::_('date', $this->item->created, JText::_('DATE_FORMAT_LC2')); ?>
</span>
<?php endif; ?>
<?php if (intval($this->item->modified) && $params->get('show_modify_date')) : ?>
<span class="jmodified-date">
<?php echo JText::sprintf('LAST_UPDATED2', JHtml::_('date', $this->item->modified, JText::_('DATE_FORMAT_LC2'))); ?>
</span>
<?php endif; ?>
<?php if ($params->get('show_author') && !empty($this->item->author)) : ?>
<span class="jcreated-by">
<?php echo JText::sprintf('Written by', ($this->item->created_by_alias ? $this->item->created_by_alias : $this->item->author)); ?>
</span>
<?php endif; ?>
</div><!-- end iteminfo -->
<?php if ($this->item->params->get('show_create_date')) : ?>
<tr>
<td valign="top" colspan="2" class="createdate">
<?php echo JHtml::_('date', $this->item->created, JText::_('DATE_FORMAT_LC2')); ?>
</td>
</tr>
<?php endif; ?>
<?php echo $this->item->introtext; ?>
<?php if ($this->item->params->get('show_url') && $this->item->urls) : ?>
<tr>
<td valign="top" colspan="2">
<a href="http://<?php echo $this->item->urls ; ?>">
<?php echo $this->item->urls; ?></a>
</td>
</tr>
<?php endif; ?>
<tr>
<td valign="top" colspan="2">
<?php if (isset ($this->item->toc)) : ?>
<?php echo $this->item->toc; ?>
<?php endif; ?>
<?php echo $this->item->text; ?>
</td>
</tr>
<?php if (intval($this->item->modified) != 0 && $this->item->params->get('show_modify_date')) : ?>
<tr>
<td colspan="2" class="modifydate">
<?php echo JText::_('Last Updated'); ?> (<?php echo JHtml::_('date', $this->item->modified, JText::_('DATE_FORMAT_LC2')); ?>)
</td>
</tr>
<?php endif; ?>
<?php if ($this->item->params->get('show_readmore') && $this->item->readmore) : ?>
<tr>
<td colspan="2">
<a href="<?php echo $this->item->readmore_link; ?>" class="readon<?php echo $this->item->params->get('pageclass_sfx'); ?>">
<?php if ($this->item->readmore_register) :
<?php if ($params->get('show_readmore') && $this->item->readmore) :
if ($params->get('access-view')) :
$link = JRoute::_(ContentRoute::article($this->item->slug, $this->item->catslug));
else :
$link = JRoute::_("index.php?option=com_users&view=login");
endif;
?>
<div class="jreadmore">
<a href="<?php echo $link; ?>" >
<?php if (!$params->get('access-view')) :
echo JText::_('Register to read more...');
elseif ($readmore = $this->item->params->get('readmore')) :
elseif ($readmore = $params->get('readmore')) :
echo $readmore;
else :
echo JText::sprintf('Read more...');
endif; ?></a>
</td>
</tr>
</div>
<?php endif; ?>
</table>
<?php if ($this->item->state == 0) : ?>
</div>
<?php endif; ?>
<span class="article_separator">&nbsp;</span>
<div class="jseparator"></div>
<?php echo $this->item->event->afterDisplayContent; ?>

View File

@ -10,14 +10,13 @@
// no direct access
defined('_JEXEC') or die;
?>
<div>
<strong><?php echo JText::_('More Articles...'); ?></strong>
</div>
<ul>
<?php foreach ($this->links as $link) : ?>
<h3><?php echo JText::_('More Articles...'); ?></h3>
<ol class="jlinks">
<?php foreach ($this->link_items as &$item) : ?>
<li>
<a class="blogsection" href="<?php echo JRoute::_(ContentHelperRoute::getArticleRoute($link->slug, $link->catslug)); ?>">
<?php echo $link->title; ?></a>
<a href="<?php echo JRoute::_(ContentRoute::article($item->slug, $item->catslug)); ?>">
<?php echo $item->title; ?></a>
</li>
<?php endforeach; ?>
</ul>
</ol>

View File

@ -12,33 +12,40 @@ defined('_JEXEC') or die;
JHtml::addIncludePath(JPATH_COMPONENT.DS.'helpers');
// If the page class is defined, wrap the whole output in a div.
$pageClass = $this->params->get('pageclass_sfx');
?>
<?php if ($pageClass) : ?>
<div class="<?php echo $pageClass;?>">
<?php endif;?>
<div class="jcategory<?php echo $pageClass;?>">
<?php if ($this->params->get('show_page_title', 1)) : ?>
<h1>
<h2>
<?php echo $this->escape($this->params->get('page_title')); ?>
</h1>
</h2>
<?php endif; ?>
<h2>
<h3>
<?php echo $this->escape($this->item->title); ?>
</h2>
</h3>
<?php echo $this->item->description; ?>
<?php if ($this->params->get('show_description') && $this->category->description) : ?>
<?php echo $this->item->description; ?>
<?php endif; ?>
<div class="jcat-articles">
<?php echo $this->loadTemplate('articles'); ?>
<?php echo $this->loadTemplate('siblings'); ?>
<?php echo $this->loadTemplate('children'); ?>
<?php echo $this->loadTemplate('parents'); ?>
<?php if ($pageClass) : ?>
</div>
<?php endif;?>
<div class="jcat-siblings">
<?php /* echo $this->loadTemplate('siblings'); */?>
</div>
<div class="jcat-children">
<?php echo $this->loadTemplate('children'); ?>
</div>
<div class="jcat-parents">
<?php /* echo $this->loadTemplate('parents'); */ ?>
</div>
</div>

View File

@ -11,18 +11,16 @@
defined('_JEXEC') or die;
?>
<?php if (empty($this->articles)) : ?>
no articles
<!-- no articles -->
<?php else : ?>
<table>
<?php foreach ($this->articles as &$item) : ?>
<tr>
<td>
<a href="<?php echo JRoute::_(ContentRoute::article($item->slug, $item->catslug)); ?>">
<?php echo $item->title; ?></a>
</td>
</tr>
<h5>Article Links</h5>
<ol>
<?php foreach ($this->articles as &$article) : ?>
<li>
<a href="<?php echo JRoute::_(ContentRoute::article($article->slug, $article->catslug)); ?>">
<?php echo $article->title; ?></a>
</li>
<?php endforeach; ?>
</table>
</ol>
<?php endif; ?>

View File

@ -11,16 +11,39 @@
defined('_JEXEC') or die;
?>
<?php if (empty($this->children)) : ?>
no children
<!-- no children -->
<?php else : ?>
<h5>Children</h5>
<ol>
<?php foreach ($this->children as &$item) : ?>
<h5>Sub Categories</h5>
<?php
// Initialize the starting level
// starting level is the parent level coming in
$curLevel = $this->item->level;
$difLevel = 0;
// Loop through each of the children
foreach ($this->children as &$item) :
// Create an <ol> for every level going deeper
// and an </ol> for every level jumping back up
// set current level to the new level
$difLevel = $item->level - $curLevel;
if ($difLevel < 0) :
for ($i = 0, $n = -($difLevel); $i < $n; $i++) :
echo "</ol>";
endfor;
$curLevel = $item->level;
elseif ($difLevel > 0) :
for ($i = 0, $n = $difLevel; $i < $n; $i++) : ?>
<ol>
<?php endfor;
$curLevel = $item->level;
endif;
?>
<li>
<a href="<?php echo JRoute::_(ContentRoute::category($item->slug)); ?>">
<?php echo $this->escape($item->title); ?></a>
</li>
<?php endforeach; ?>
</ol>
</ol>
<?php endif; ?>

View File

@ -0,0 +1,77 @@
<?php
/**
* @version $Id: featured.php 12450 2009-07-05 03:45:24Z eddieajau $
* @package Joomla.Site
* @subpackage com_content
* @copyright Copyright (C) 2005 - 2009 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
// no direct access
defined('_JEXEC') or die;
JHtml::addIncludePath(JPATH_COMPONENT.DS.'helpers');
// If the page class is defined, add to class as suffix.
// It will be a separate class if the user starts it with a space
$pageClass = $this->params->get('pageclass_sfx');
?>
<div class="jarticles-featured<?php echo $pageClass;?>">
<?php if ($this->params->get('show_page_title', 1)) : ?>
<h2>
<?php echo $this->escape($this->params->get('page_title')); ?>
</h2>
<?php endif; ?>
<!-- Leading Articles -->
<?php if (!empty($this->lead_items)) : ?>
<ol class="jarticles-lead">
<?php foreach ($this->lead_items as &$item) : ?>
<li<?php echo $item->state == 0 ? ' class="system-unpublished"' : null; ?>>
<?php
$this->item = &$item;
echo $this->loadTemplate('item');
?>
</li>
<?php endforeach; ?>
</ol>
<?php endif; ?>
<!-- Intro'd Articles -->
<?php if (!empty($this->intro_items)) : ?>
<ol class="jarticles-intro jcols-<?php echo (int) $this->columns;?>">
<?php foreach ($this->intro_items as $key => &$item) : ?>
<li class="jcolumn-<?php echo (((int)$key - 1) % (int) $this->columns)+1;?><?php echo $item->state == 0 ? ' system-unpublished"' : null; ?>">
<?php
$this->item = &$item;
echo $this->loadTemplate('item');
?>
</li>
<?php endforeach; ?>
</ol>
<?php endif; ?>
<?php if (!empty($this->link_items)) : ?>
<div class="jarticles-more">
<?php echo $this->loadTemplate('links'); ?>
</div>
<?php endif; ?>
<?php if ($this->params->def('show_pagination', 2) == 1 || ($this->params->get('show_pagination') == 2 && $this->pagination->get('pages.total') > 1)) : ?>
<div class="jpagination">
<?php echo $this->pagination->getPagesLinks(); ?>
<?php if ($this->params->def('show_pagination_results', 1)) : ?>
<div class="jpag-results">
<?php echo $this->pagination->getPagesCounter(); ?>
</div>
<?php endif; ?>
</div>
<?php endif; ?>
</div>

View File

@ -0,0 +1,142 @@
<?xml version="1.0" encoding="utf-8"?>
<metadata>
<layout
title="com_content_category_view_featured_title">
<message>
<![CDATA[com_content_category_view_featured_desc]]>
</message>
</layout>
<fields>
<field
name="num_leading_articles"
type="text"
size="3"
default="1"
label="Num Leading"
description="fieldLEADING" />
<field
name="num_intro_articles"
type="text"
size="3"
default="4"
label="Num Intro"
description="fieldINTRO" />
<field
name="num_columns"
type="text"
size="3"
default="2"
label="Columns"
description="fieldCOLUMNS" />
<field
name="num_links"
type="text"
size="3"
default="4"
label="Num Links"
description="Number of Items to display as Links." />
</fields>
<fields>
<field
name="orderby_pri"
type="list"
default=""
label="Category Order"
description="Order items by category">
<option
value="">No, order by Primary Order only</option>
<option
value="alpha">Title Alphabetical</option>
<option
value="ralpha">Title Reverse-Alphabetical</option>
<option
value="order">Ordering</option>
</field>
<field
name="orderby_sec"
type="list"
default="front"
label="Primary Order"
description="fieldORDERBYSEC">
<option
value="front">Default</option>
<option
value="date">Oldest first</option>
<option
value="rdate">Most recent first</option>
<option
value="alpha">Title Alphabetical</option>
<option
value="ralpha">Title Reverse-Alphabetical</option>
<option
value="author">Author Alphabetical</option>
<option
value="rauthor">Author Reverse-Alphabetical</option>
<option
value="hits">Most Hits</option>
<option
value="rhits">Least Hits</option>
<option
value="order">Ordering</option>
</field>
<field
name="multi_column_order"
type="radio"
default="1"
label="Multi Column Order"
description="fieldDOWNORACROSS">
<option
value="0">Down</option>
<option
value="1">Across</option>
</field>
<field
type="spacer" />
<field
name="show_pagination"
type="list"
default="2"
label="Pagination"
description="Show/Hide Pagination support">
<option
value="0">Hide</option>
<option
value="1">Show</option>
<option
value="2">Auto</option>
</field>
<field
name="show_pagination_results"
type="radio"
default="1"
label="Pagination Results"
description="fieldPAGINATIONRESULTS">
<option
value="0">Hide</option>
<option
value="1">Show</option>
</field>
<field
name="show_feed_link"
type="radio"
default="1"
label="Show a feed link"
description="fieldSHOWFEEDLINK">
<option
value="0">JNo</option>
<option
value="1">JYes</option>
</field>
</fields>
</metadata>

View File

@ -0,0 +1,108 @@
<?php
/**
* @version $Id: featured_item.php 12416 2009-07-03 08:49:14Z eddieajau $
* @package Joomla.Site
* @subpackage com_content
* @copyright Copyright (C) 2005 - 2009 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
// no direct access
defined('_JEXEC') or die;
// Create a shortcut for params.
$params = &$this->item->params;
?>
<?php if ($params->get('show_title')) : ?>
<h3>
<?php if ($params->get('link_titles')) : ?>
<a href="<?php echo $this->item->readmore_link; ?>">
<?php echo $this->escape($this->item->title); ?></a>
<?php else : ?>
<?php echo $this->escape($this->item->title); ?>
<?php endif; ?>
</h3>
<?php endif; ?>
<?php if ($params->get('show_print_icon') || $params->get('show_email_icon') || $params->get('access-edit')) : ?>
<ul class="jactions">
<?php if ($params->get('show_print_icon')) : ?>
<li class="jprint">
<?php echo JHtml::_('icon.print_popup', $this->item, $params); ?>
</li>
<?php endif; ?>
<?php if ($params->get('show_email_icon')) : ?>
<li class="jemail">
<?php echo JHtml::_('icon.email', $this->item, $params); ?>
</li>
<?php endif; ?>
<?php if ($params->get('access-edit')) : ?>
<li class="jedit">
<?php echo JHtml::_('icon.edit', $this->item, $params); ?>
</li>
<?php endif; ?>
</ul>
<?php endif; ?>
<?php if (!$params->get('show_intro')) : ?>
<?php echo $this->item->event->afterDisplayTitle; ?>
<?php endif; ?>
<?php echo $this->item->event->beforeDisplayContent; ?>
<div class="jiteminfo">
<?php if ($params->get('show_category')) : ?>
<span class="jcategory">
<?php if ($params->get('link_category')) : ?>
<a href="<?php echo JRoute::_(ContentRoute::category($this->item->catslug)); ?>">
<?php echo $this->escape($this->item->category); ?> </a>
<?php else : ?>
<?php echo $this->escape($this->item->category); ?>
<?php endif; ?>
</span>
<?php endif; ?>
<?php if ($params->get('show_create_date')) : ?>
<span class="jcreated-date">
<?php echo JHtml::_('date', $this->item->created, JText::_('DATE_FORMAT_LC2')); ?>
</span>
<?php endif; ?>
<?php if (intval($this->item->modified) && $params->get('show_modify_date')) : ?>
<span class="jmodified-date">
<?php echo JText::sprintf('LAST_UPDATED2', JHtml::_('date', $this->item->modified, JText::_('DATE_FORMAT_LC2'))); ?>
</span>
<?php endif; ?>
<?php if ($params->get('show_author') && !empty($this->item->author)) : ?>
<span class="jcreated-by">
<?php echo JText::sprintf('Written by', ($this->item->created_by_alias ? $this->item->created_by_alias : $this->item->author)); ?>
</span>
<?php endif; ?>
</div><!-- end iteminfo -->
<?php echo $this->item->introtext; ?>
<?php if ($params->get('show_readmore') && $this->item->readmore) :
if ($params->get('access-view')) :
$link = JRoute::_(ContentRoute::article($this->item->slug, $this->item->catslug));
else :
$link = JRoute::_("index.php?option=com_users&view=login");
endif;
?>
<div class="jreadmore">
<a href="<?php echo $link; ?>" >
<?php if (!$params->get('access-view')) :
echo JText::_('Register to read more...');
elseif ($readmore = $params->get('readmore')) :
echo $readmore;
else :
echo JText::sprintf('Read more...');
endif; ?></a>
</div>
<?php endif; ?>
<div class="jseparator"></div>
<?php echo $this->item->event->afterDisplayContent; ?>

View File

@ -0,0 +1,22 @@
<?php
/**
* @version $Id: featured_links.php 12416 2009-07-03 08:49:14Z eddieajau $
* @package Joomla.Site
* @subpackage com_content
* @copyright Copyright (C) 2005 - 2009 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
// no direct access
defined('_JEXEC') or die;
?>
<h3><?php echo JText::_('More Articles...'); ?></h3>
<ol class="jlinks">
<?php foreach ($this->link_items as &$item) : ?>
<li>
<a href="<?php echo JRoute::_(ContentRoute::article($item->slug, $item->catslug)); ?>">
<?php echo $item->title; ?></a>
</li>
<?php endforeach; ?>
</ol>

View File

@ -22,8 +22,19 @@ class ContentViewCategory extends JView
protected $state = null;
protected $item = null;
protected $articles = null;
// Note: pagination works in frontpage view, but not set up in this view yet
protected $pagination = null;
protected $lead_items = array();
protected $intro_items = array();
protected $link_items = array();
protected $columns = 1;
/**
* Display the view
*
* @return mixed False on error, null otherwise.
*/
function display($tpl = null)
{
// Initialize variables
@ -36,7 +47,7 @@ class ContentViewCategory extends JView
$siblings = $this->get('Siblings');
$children = $this->get('Children');
$parents = $this->get('Parents');
//$pagination = $this->get('Pagination');
$pagination = $this->get('Pagination');
// Check for errors.
if (count($errors = $this->get('Errors'))) {
@ -48,9 +59,14 @@ class ContentViewCategory extends JView
// PREPARE THE DATA
// Get the metrics for the structural page layout.
$numLeading = $params->def('num_leading_articles', 1);
$numIntro = $params->def('num_intro_articles', 4);
$numLinks = $params->def('num_links', 4);
// Compute the category slug and prepare description (runs content plugins).
$item->slug = $item->path ? ($item->id.':'.$item->path) : $item->id;
$item->description = JHtml::_('content.prepare', $item->description);
$item->slug = $item->path ? ($item->id.':'.$item->path) : $item->id;
$item->description = JHtml::_('content.prepare', $item->description);
// Compute the article slugs and prepare introtext (runs content plugins).
foreach ($articles as $i => &$article)
@ -62,8 +78,8 @@ class ContentViewCategory extends JView
$dispatcher = &JDispatcher::getInstance();
// Ignore content plugins on links.
//if ($i < $numLeading + $numIntro)
//{
if ($i < $numLeading + $numIntro)
{
$article->introtext = JHtml::_('content.prepare', $article->introtext);
$results = $dispatcher->trigger('onAfterDisplayTitle', array (&$article, &$article->params, 0));
@ -74,7 +90,49 @@ class ContentViewCategory extends JView
$results = $dispatcher->trigger('onAfterDisplayContent', array (&$article, &$article->params, 0));
$article->event->afterDisplayContent = trim(implode("\n", $results));
//}
}
}
// Preprocess the breakdown of leading, intro and linked articles.
// This makes it much easier for the designer to just interogate the arrays.
$max = count($articles);
// The first group is the leading articles.
$limit = $numLeading;
for ($i = 0; $i < $limit &&$i < $max; $i++)
{
$this->lead_items[$i] = &$articles[$i];
}
// The second group is the intro articles.
$limit = $numLeading + $numIntro;
$this->columns = max(1, $params->def('num_columns', 1));
$order = $params->def('multi_column_order', 1);
if ($order !== 1 || $this->columns == 1)
{
// Order articles across, then down (or single column mode)
for ($i = $numLeading; $i < $limit &&$i < $max; $i++) {
$this->intro_items[$i] = &$articles[$i];
}
}
else
{
// Order articles down, then across
$k = $numLeading;
// Pass over the second group by the number of columns
for ($j = 0; $j < $this->columns; $j++)
{
for ($i = $numLeading + $j; $i < $limit &&$i < $max; $i += $this->columns, $k++) {
$this->intro_items[$k] = &$articles[$i];
}
}
}
// The remainder are the links.
for ($i = $numLeading + $numIntro; $i < $max; $i++) {
$this->link_items[$i] = &$articles[$i];
}
// Compute the sibling category slugs and prepare description (runs content plugins).
@ -84,7 +142,7 @@ class ContentViewCategory extends JView
$sibling->description = JHtml::_('content.prepare', $sibling->description);
}
// Compute the sibling category slugs and prepare description (runs content plugins).
// Compute the children category slugs and prepare description (runs content plugins).
foreach ($children as $i => &$child)
{
$child->slug = $child->route ? ($child->id.':'.$child->route) : $child->id;
@ -92,10 +150,10 @@ class ContentViewCategory extends JView
}
// Compute the parent category slugs.
foreach ($parents as $i => &$parent)
{
foreach ($parents as $i => &$parent)
{
$parent->slug = $parent->route ? ($parent->id.':'.$parent->route) : $parent->id;
}
}
$this->assignRef('params', $params);
$this->assignRef('item', $item);
@ -103,7 +161,7 @@ class ContentViewCategory extends JView
$this->assignRef('siblings', $siblings);
$this->assignRef('children', $children);
$this->assignRef('parents', $parents);
//$this->assignRef('pagination', $pagination);
$this->assignRef('pagination', $pagination);
$this->assignRef('user', $user);
$this->_prepareDocument();
@ -122,7 +180,7 @@ class ContentViewCategory extends JView
$title = $this->item->title;
// Because the application sets a default page title,
// we need to get it from the menu item itself.
// we need to get it from the menu item itself
if ($menu = $menus->getActive())
{
$menuParams = new JObject(json_decode($menu->params, true));
@ -135,7 +193,7 @@ class ContentViewCategory extends JView
}
$this->document->setTitle($title);
// Add feed links.
// Add feed links
if ($this->params->get('show_feed_link', 1))
{
$link = '&format=feed&limitstart=';

Some files were not shown because too many files have changed in this diff Show More