添加到 trunk
+YUCHENG HU+ git-svn-id: https://svn.code.sf.net/p/hawebs/svn@336 a2543c7e-f6e9-4f8a-8bff-1ffc34733512
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,137 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @version $Id: admin.content.php 10381 2008-06-01 03:35:53Z pasamio $
|
||||
* @package Joomla
|
||||
* @subpackage Content
|
||||
* @copyright Copyright (C) 2005 - 2008 Open Source Matters. All rights reserved.
|
||||
* @license GNU/GPL, see LICENSE.php
|
||||
* Joomla! is free software. This version may have been modified pursuant
|
||||
* to the GNU General Public License, and as distributed it includes or
|
||||
* is derivative of works licensed under the GNU General Public License or
|
||||
* other free or open source software licenses.
|
||||
* See COPYRIGHT.php for copyright notices and details.
|
||||
*/
|
||||
|
||||
// no direct access
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
require_once( JPATH_COMPONENT.DS.'controller.php' );
|
||||
require_once( JPATH_COMPONENT.DS.'helper.php' );
|
||||
require_once (JApplicationHelper::getPath('admin_html'));
|
||||
|
||||
// Set the helper directory
|
||||
JHTML::addIncludePath( JPATH_COMPONENT.DS.'helper' );
|
||||
|
||||
$controller = new ContentController();
|
||||
$task = JRequest::getCmd('task');
|
||||
switch (strtolower($task))
|
||||
{
|
||||
case 'element':
|
||||
case 'wizard':
|
||||
$controller->execute( $task );
|
||||
$controller->redirect();
|
||||
break;
|
||||
|
||||
case 'add' :
|
||||
case 'new' :
|
||||
ContentController::editContent(false);
|
||||
break;
|
||||
|
||||
case 'edit' :
|
||||
ContentController::editContent(true);
|
||||
break;
|
||||
|
||||
case 'go2menu' :
|
||||
case 'go2menuitem' :
|
||||
case 'resethits' :
|
||||
case 'menulink' :
|
||||
case 'apply' :
|
||||
case 'save' :
|
||||
ContentController::saveContent();
|
||||
break;
|
||||
|
||||
case 'remove' :
|
||||
ContentController::removeContent();
|
||||
break;
|
||||
|
||||
case 'publish' :
|
||||
ContentController::changeContent(1);
|
||||
break;
|
||||
|
||||
case 'unpublish' :
|
||||
ContentController::changeContent(0);
|
||||
break;
|
||||
|
||||
case 'toggle_frontpage' :
|
||||
ContentController::toggleFrontPage();
|
||||
break;
|
||||
|
||||
case 'archive' :
|
||||
ContentController::changeContent(-1);
|
||||
break;
|
||||
|
||||
case 'unarchive' :
|
||||
ContentController::changeContent(0);
|
||||
break;
|
||||
|
||||
case 'cancel' :
|
||||
ContentController::cancelContent();
|
||||
break;
|
||||
|
||||
case 'orderup' :
|
||||
ContentController::orderContent(-1);
|
||||
break;
|
||||
|
||||
case 'orderdown' :
|
||||
ContentController::orderContent(1);
|
||||
break;
|
||||
|
||||
//case 'showarchive' :
|
||||
// JContentController::viewArchive();
|
||||
// break;
|
||||
|
||||
case 'movesect' :
|
||||
ContentController::moveSection();
|
||||
break;
|
||||
|
||||
case 'movesectsave' :
|
||||
ContentController::moveSectionSave();
|
||||
break;
|
||||
|
||||
case 'copy' :
|
||||
ContentController::copyItem();
|
||||
break;
|
||||
|
||||
case 'copysave' :
|
||||
ContentController::copyItemSave();
|
||||
break;
|
||||
|
||||
case 'accesspublic' :
|
||||
ContentController::accessMenu(0);
|
||||
break;
|
||||
|
||||
case 'accessregistered' :
|
||||
ContentController::accessMenu(1);
|
||||
break;
|
||||
|
||||
case 'accessspecial' :
|
||||
ContentController::accessMenu(2);
|
||||
break;
|
||||
|
||||
case 'saveorder' :
|
||||
ContentController::saveOrder();
|
||||
break;
|
||||
|
||||
case 'preview' :
|
||||
ContentController::previewContent();
|
||||
break;
|
||||
|
||||
case 'ins_pagebreak' :
|
||||
ContentController::insertPagebreak();
|
||||
break;
|
||||
|
||||
default :
|
||||
ContentController::viewContent();
|
||||
break;
|
||||
}
|
||||
@@ -0,0 +1,106 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<config>
|
||||
<params>
|
||||
<param name="show_noauth" type="radio" default="0" label="Show UnAuthorized Links" description="TIPLINKS">
|
||||
<option value="0">No</option>
|
||||
<option value="1">Yes</option>
|
||||
</param>
|
||||
<param name="show_title" type="radio" default="1" label="Show Article Title" description="Show/Hide the articles title">
|
||||
<option value="0">No</option>
|
||||
<option value="1">Yes</option>
|
||||
</param>
|
||||
<param name="link_titles" type="radio" default="1" label="Linked Titles" description="TIPIFYESTITLECONTENTITEMS">
|
||||
<option value="0">No</option>
|
||||
<option value="1">Yes</option>
|
||||
</param>
|
||||
<param name="show_intro" type="radio" default="1" label="Show Intro Text" description="Show/Hide the intro text">
|
||||
<option value="0">Hide</option>
|
||||
<option value="1">Show</option>
|
||||
</param>
|
||||
<param name="@spacer" type="spacer" default="" label="" description="" />
|
||||
<param name="show_section" type="radio" default="0" label="Section Name" description="PARAMSECTION">
|
||||
<option value="0">Hide</option>
|
||||
<option value="1">Show</option>
|
||||
</param>
|
||||
<param name="link_section" type="radio" default="0" label="Section Name Linkable" description="PARAMSECTIONLINK">
|
||||
<option value="0">No</option>
|
||||
<option value="1">Yes</option>
|
||||
</param>
|
||||
<param name="show_category" type="radio" default="1" label="Category Name" description="PARAMCATEG">
|
||||
<option value="0">Hide</option>
|
||||
<option value="1">Show</option>
|
||||
</param>
|
||||
<param name="link_category" type="radio" default="1" label="Category Name Linkable" description="PARAMCATEGLINK">
|
||||
<option value="0">No</option>
|
||||
<option value="1">Yes</option>
|
||||
</param>
|
||||
|
||||
<param name="@spacer" type="spacer" default="" label="" description="" />
|
||||
<param name="show_author" type="radio" default="1" label="Author Names" description="TIPIFSETTOSHOWAUTHOR">
|
||||
<option value="0">Hide</option>
|
||||
<option value="1">Show</option>
|
||||
</param>
|
||||
<param name="show_create_date" type="radio" default="1" label="Created Date and Time" description="TIPIFSETTOSHOWDATETIMECREATED">
|
||||
<option value="0">Hide</option>
|
||||
<option value="1">Show</option>
|
||||
</param>
|
||||
<param name="show_modify_date" type="radio" default="1" label="Modified Date and Time" description="TIPIFSETTOSHOWDATETIMEMODIFIED">
|
||||
<option value="0">Hide</option>
|
||||
<option value="1">Show</option>
|
||||
</param>
|
||||
<param name="show_item_navigation" type="radio" default="1" label="Show Navigation" description="PARAMNAVIGATIONARTICLE">
|
||||
<option value="0">Hide</option>
|
||||
<option value="1">Show</option>
|
||||
</param>
|
||||
<param name="show_readmore" type="radio" default="1" label="Read More Link" description="TIPIFSETTOSHOWREADMORELINK">
|
||||
<option value="0">Hide</option>
|
||||
<option value="1">Show</option>
|
||||
</param>
|
||||
<param name="show_vote" type="radio" default="0" label="Item Rating/Voting" description="TIPIFSETTOSHOWVOTING">
|
||||
<option value="0">Hide</option>
|
||||
<option value="1">Show</option>
|
||||
</param>
|
||||
|
||||
<param name="@spacer" type="spacer" default="" label="" description="" />
|
||||
<param name="show_icons" type="radio" default="1" label="Icons" description="TIPPRINTPDFEMAIL">
|
||||
<option value="0">Hide</option>
|
||||
<option value="1">Show</option>
|
||||
</param>
|
||||
<param name="show_pdf_icon" type="radio" default="1" label="PDF Icon" description="PARAMPDF">
|
||||
<option value="0">Hide</option>
|
||||
<option value="1">Show</option>
|
||||
</param>
|
||||
<param name="show_print_icon" type="radio" default="1" label="Print Icon" description="PARAMPRINT">
|
||||
<option value="0">Hide</option>
|
||||
<option value="1">Show</option>
|
||||
</param>
|
||||
<param name="show_email_icon" type="radio" default="1" label="Email Icon" description="PARAMEMAIL">
|
||||
<option value="0">Hide</option>
|
||||
<option value="1">Show</option>
|
||||
</param>
|
||||
<param name="show_hits" type="radio" default="1" label="Hits" description="TIPIFSETTOSHOWHITS">
|
||||
<option value="0">Hide</option>
|
||||
<option value="1">Show</option>
|
||||
</param>
|
||||
<param name="@spacer" type="spacer" default="" label="" description="" />
|
||||
<param name="feed_summary" type="radio" default="0" label="For each feed item show" description="TIPSHOWFEEDITEM">
|
||||
<option value="0">Intro Text</option>
|
||||
<option value="1">Full Text</option>
|
||||
</param>
|
||||
<param name="@spacer" type="spacer" default="" label="" description="" menu="hide" />
|
||||
<param name="@spacer" type="" default="" label="Filtering options" description="TIPFILTERINGOPTIONS" menu="hide" />
|
||||
<param name="filter_groups" type="usergroup" multiple="true" size="10" menu="hide"
|
||||
default="" label="Filter Groups" description="TIPFILTERGROUPS" />
|
||||
<param name="filter_type" type="radio" default="" menu="hide"
|
||||
label="Filter Type" description="TIPSFILTERTYPE">
|
||||
<option value="BL">Black List (Default)</option>
|
||||
<option value="WL">White List</option>
|
||||
<option value="NH">No HTML</option>
|
||||
</param>
|
||||
<param name="filter_tags" type="text" menu="hide"
|
||||
default="" label="Filter Tags" description="TIPSFILTERTAGS" />
|
||||
<param name="filter_attritbutes" type="text" menu="hide"
|
||||
default="" label="Filter Attributes" description="TIPSFILTERATTRIBUTES" />
|
||||
|
||||
</params>
|
||||
</config>
|
||||
@@ -0,0 +1,14 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<install type="component" version="1.5.0">
|
||||
<name>Content Page</name>
|
||||
<author>Joomla! Project</author>
|
||||
<creationDate>April 2006</creationDate>
|
||||
<copyright>
|
||||
Copyright (C) 2005 - 2008 Open Source Matters. All rights reserved.
|
||||
</copyright>
|
||||
<license>http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL</license>
|
||||
<authorEmail>[email protected]</authorEmail>
|
||||
<authorUrl>www.joomla.org</authorUrl>
|
||||
<version>1.5.0</version>
|
||||
<description>DESCCONTENT</description>
|
||||
</install>
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,60 @@
|
||||
<?php
|
||||
/**
|
||||
* @version $Id: article.php 10381 2008-06-01 03:35:53Z pasamio $
|
||||
* @package Joomla
|
||||
* @copyright Copyright (C) 2005 - 2008 Open Source Matters. All rights reserved.
|
||||
* @license GNU/GPL, see LICENSE.php
|
||||
* Joomla! is free software. This version may have been modified pursuant
|
||||
* to the GNU General Public License, and as distributed it includes or
|
||||
* is derivative of works licensed under the GNU General Public License or
|
||||
* other free or open source software licenses.
|
||||
* See COPYRIGHT.php for copyright notices and details.
|
||||
*/
|
||||
|
||||
// Check to ensure this file is included in Joomla!
|
||||
defined('_JEXEC') or die( 'Restricted access' );
|
||||
|
||||
class JElementArticle extends JElement
|
||||
{
|
||||
/**
|
||||
* Element name
|
||||
*
|
||||
* @access protected
|
||||
* @var string
|
||||
*/
|
||||
var $_name = 'Article';
|
||||
|
||||
function fetchElement($name, $value, &$node, $control_name)
|
||||
{
|
||||
global $mainframe;
|
||||
|
||||
$db =& JFactory::getDBO();
|
||||
$doc =& JFactory::getDocument();
|
||||
$template = $mainframe->getTemplate();
|
||||
$fieldName = $control_name.'['.$name.']';
|
||||
$article =& JTable::getInstance('content');
|
||||
if ($value) {
|
||||
$article->load($value);
|
||||
} else {
|
||||
$article->title = JText::_('Select an Article');
|
||||
}
|
||||
|
||||
$js = "
|
||||
function jSelectArticle(id, title, object) {
|
||||
document.getElementById(object + '_id').value = id;
|
||||
document.getElementById(object + '_name').value = title;
|
||||
document.getElementById('sbox-window').close();
|
||||
}";
|
||||
$doc->addScriptDeclaration($js);
|
||||
|
||||
$link = 'index.php?option=com_content&task=element&tmpl=component&object='.$name;
|
||||
|
||||
JHTML::_('behavior.modal', 'a.modal');
|
||||
$html = "\n".'<div style="float: left;"><input style="background: #ffffff;" type="text" id="'.$name.'_name" value="'.htmlspecialchars($article->title, ENT_QUOTES, 'UTF-8').'" disabled="disabled" /></div>';
|
||||
// $html .= "\n <input class=\"inputbox modal-button\" type=\"button\" value=\"".JText::_('Select')."\" />";
|
||||
$html .= '<div class="button2-left"><div class="blank"><a class="modal" title="'.JText::_('Select an Article').'" href="'.$link.'" rel="{handler: \'iframe\', size: {x: 650, y: 375}}">'.JText::_('Select').'</a></div></div>'."\n";
|
||||
$html .= "\n".'<input type="hidden" id="'.$name.'_id" name="'.$fieldName.'" value="'.(int)$value.'" />';
|
||||
|
||||
return $html;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
/**
|
||||
* @version $Id: author.php 10381 2008-06-01 03:35:53Z pasamio $
|
||||
* @package Joomla
|
||||
* @subpackage Articles
|
||||
* @copyright Copyright (C) 2005 - 2008 Open Source Matters. All rights reserved.
|
||||
* @license GNU/GPL, see LICENSE.php
|
||||
* Joomla! is free software. This version may have been modified pursuant
|
||||
* to the GNU General Public License, and as distributed it includes or
|
||||
* is derivative of works licensed under the GNU General Public License or
|
||||
* other free or open source software licenses.
|
||||
* See COPYRIGHT.php for copyright notices and details.
|
||||
*/
|
||||
|
||||
// Check to ensure this file is included in Joomla!
|
||||
defined('_JEXEC') or die( 'Restricted access' );
|
||||
|
||||
/**
|
||||
* Renders a author element
|
||||
*
|
||||
* @package Joomla
|
||||
* @subpackage Articles
|
||||
* @since 1.5
|
||||
*/
|
||||
class JElementAuthor extends JElement
|
||||
{
|
||||
/**
|
||||
* Element name
|
||||
* @access protected
|
||||
* @var string
|
||||
*/
|
||||
var $_name = 'Author';
|
||||
|
||||
function fetchElement($name, $value, &$node, $control_name)
|
||||
{
|
||||
return JHTML::_('list.users', $control_name.'['.$name.']', $value);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
<html><body bgcolor="#FFFFFF"></body></html>
|
||||
@@ -0,0 +1,122 @@
|
||||
<?php
|
||||
/**
|
||||
* @version $Id: helper.php 11646 2009-03-01 19:34:56Z ian $
|
||||
* @package Joomla
|
||||
* @subpackage Content
|
||||
* @copyright Copyright (C) 2005 - 2008 Open Source Matters. All rights reserved.
|
||||
* @license GNU/GPL, see LICENSE.php
|
||||
* Joomla! is free software. This version may have been modified pursuant to the
|
||||
* GNU General Public License, and as distributed it includes or is derivative
|
||||
* of works licensed under the GNU General Public License or other free or open
|
||||
* source software licenses. See COPYRIGHT.php for copyright notices and
|
||||
* details.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Content Component Helper
|
||||
*
|
||||
* @static
|
||||
* @package Joomla
|
||||
* @subpackage Content
|
||||
* @since 1.5
|
||||
*/
|
||||
class ContentHelper
|
||||
{
|
||||
function saveContentPrep( &$row )
|
||||
{
|
||||
// Get submitted text from the request variables
|
||||
$text = JRequest::getVar( 'text', '', 'post', 'string', JREQUEST_ALLOWRAW );
|
||||
|
||||
// Clean text for xhtml transitional compliance
|
||||
$text = str_replace( '<br>', '<br />', $text );
|
||||
|
||||
// Search for the {readmore} tag and split the text up accordingly.
|
||||
$pattern = '#<hr\s+id=("|\')system-readmore("|\')\s*\/*>#i';
|
||||
$tagPos = preg_match($pattern, $text);
|
||||
|
||||
if ( $tagPos == 0 )
|
||||
{
|
||||
$row->introtext = $text;
|
||||
} else
|
||||
{
|
||||
list($row->introtext, $row->fulltext) = preg_split($pattern, $text, 2);
|
||||
}
|
||||
|
||||
// Filter settings
|
||||
jimport( 'joomla.application.component.helper' );
|
||||
$config = JComponentHelper::getParams( 'com_content' );
|
||||
$user = &JFactory::getUser();
|
||||
$gid = $user->get( 'gid' );
|
||||
|
||||
$filterGroups = $config->get( 'filter_groups' );
|
||||
|
||||
// convert to array if one group selected
|
||||
if ( (!is_array($filterGroups) && (int) $filterGroups > 0) ) {
|
||||
$filterGroups = array($filterGroups);
|
||||
}
|
||||
|
||||
if (is_array($filterGroups) && in_array( $gid, $filterGroups ))
|
||||
{
|
||||
$filterType = $config->get( 'filter_type' );
|
||||
$filterTags = preg_split( '#[,\s]+#', trim( $config->get( 'filter_tags' ) ) );
|
||||
$filterAttrs = preg_split( '#[,\s]+#', trim( $config->get( 'filter_attritbutes' ) ) );
|
||||
switch ($filterType)
|
||||
{
|
||||
case 'NH':
|
||||
$filter = new JFilterInput();
|
||||
break;
|
||||
case 'WL':
|
||||
$filter = new JFilterInput( $filterTags, $filterAttrs, 0, 0, 0); // turn off xss auto clean
|
||||
break;
|
||||
case 'BL':
|
||||
default:
|
||||
$filter = new JFilterInput( $filterTags, $filterAttrs, 1, 1 );
|
||||
break;
|
||||
}
|
||||
$row->introtext = $filter->clean( $row->introtext );
|
||||
$row->fulltext = $filter->clean( $row->fulltext );
|
||||
} elseif(empty($filterGroups) && $gid != '25') { // no default filtering for super admin (gid=25)
|
||||
$filter = new JFilterInput( array(), array(), 1, 1 );
|
||||
$row->introtext = $filter->clean( $row->introtext );
|
||||
$row->fulltext = $filter->clean( $row->fulltext );
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Function to reset Hit count of an article
|
||||
*
|
||||
*/
|
||||
function resetHits($redirect, $id)
|
||||
{
|
||||
global $mainframe;
|
||||
|
||||
// Initialize variables
|
||||
$db = & JFactory::getDBO();
|
||||
|
||||
// Instantiate and load an article table
|
||||
$row = & JTable::getInstance('content');
|
||||
$row->Load($id);
|
||||
$row->hits = 0;
|
||||
$row->store();
|
||||
$row->checkin();
|
||||
|
||||
$msg = JText::_('Successfully Reset Hit count');
|
||||
$mainframe->redirect('index.php?option=com_content§ionid='.$redirect.'&task=edit&id='.$id, $msg);
|
||||
}
|
||||
|
||||
function filterCategory($query, $active = NULL)
|
||||
{
|
||||
// Initialize variables
|
||||
$db = & JFactory::getDBO();
|
||||
|
||||
$categories[] = JHTML::_('select.option', '0', '- '.JText::_('Select Category').' -');
|
||||
$db->setQuery($query);
|
||||
$categories = array_merge($categories, $db->loadObjectList());
|
||||
|
||||
$category = JHTML::_('select.genericlist', $categories, 'catid', 'class="inputbox" size="1" onchange="document.adminForm.submit( );"', 'value', 'text', $active);
|
||||
|
||||
return $category;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,72 @@
|
||||
<?php
|
||||
/**
|
||||
* @version $Id: content.php 10381 2008-06-01 03:35:53Z pasamio $
|
||||
* @package Joomla
|
||||
* @subpackage Content
|
||||
* @copyright Copyright (C) 2005 - 2008 Open Source Matters. All rights reserved.
|
||||
* @license GNU/GPL, see LICENSE.php
|
||||
* Joomla! is free software. This version may have been modified pursuant
|
||||
* to the GNU General Public License, and as distributed it includes or
|
||||
* is derivative of works licensed under the GNU General Public License or
|
||||
* other free or open source software licenses.
|
||||
* See COPYRIGHT.php for copyright notices and details.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Utility class for creating HTML Grids
|
||||
*
|
||||
* @static
|
||||
* @package Joomla
|
||||
* @subpackage Content
|
||||
* @since 1.5
|
||||
*/
|
||||
class JHTMLContent
|
||||
{
|
||||
/**
|
||||
* Displays the publishing state legend for articles
|
||||
*/
|
||||
function Legend( )
|
||||
{
|
||||
?>
|
||||
<table cellspacing="0" cellpadding="4" border="0" align="center">
|
||||
<tr align="center">
|
||||
<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
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
<html><body bgcolor="#FFFFFF"></body></html>
|
||||
@@ -0,0 +1 @@
|
||||
<html><body bgcolor="#FFFFFF"></body></html>
|
||||
@@ -0,0 +1,97 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<form>
|
||||
<name>Article Edit Form</name>
|
||||
<params addpath="/administrator/components/com_content/elements">
|
||||
<param name="created_by" type="author" default="" label="Author" description="DETAILAUTHOR" />
|
||||
<param name="created_by_alias" type="text" size="20" default="" label="Author Alias" description="DETAILAUTHORALIAS" />
|
||||
<param name="access" type="list" size="20" default="0" label="Access Level" description="DETAILACCESS">
|
||||
<option value="0">Public</option>
|
||||
<option value="1">Registered</option>
|
||||
<option value="2">Special</option>
|
||||
</param>
|
||||
<param name="created" type="calendar" default="" label="Created Date" description="DETAILCREATED" />
|
||||
<param name="publish_up" type="calendar" default="" label="Start Publishing" description="DETAILSTART" />
|
||||
<param name="publish_down" type="calendar" default="" label="Finish Publishing" description="DETAILFINISH" />
|
||||
</params>
|
||||
<params group="advanced">
|
||||
<param name="show_title" type="list" default="" label="Show Title" description="Show/Hide the items title">
|
||||
<option value="">Use Global</option>
|
||||
<option value="0">No</option>
|
||||
<option value="1">Yes</option>
|
||||
</param>
|
||||
<param name="link_titles" type="list" default="" label="Linked Titles" description="Make your Item titles linkable">
|
||||
<option value="">Use Global</option>
|
||||
<option value="0">No</option>
|
||||
<option value="1">Yes</option>
|
||||
</param>
|
||||
<param name="show_intro" type="list" default="" label="Intro Text" description="Show/Hide the intro text">
|
||||
<option value="">Use Global</option>
|
||||
<option value="0">Hide</option>
|
||||
<option value="1">Show</option>
|
||||
</param>
|
||||
<param name="show_section" type="list" default="" label="Section Name" description="PARAMSECTION">
|
||||
<option value="">Use Global</option>
|
||||
<option value="0">Hide</option>
|
||||
<option value="1">Show</option>
|
||||
</param>
|
||||
<param name="link_section" type="list" default="" label="Section Name Linkable" description="PARAMSECTIONLINK">
|
||||
<option value="">Use Global</option>
|
||||
<option value="0">No</option>
|
||||
<option value="1">Yes</option>
|
||||
</param>
|
||||
<param name="show_category" type="list" default="" label="Category Name" description="PARAMCATEG">
|
||||
<option value="">Use Global</option>
|
||||
<option value="0">Hide</option>
|
||||
<option value="1">Show</option>
|
||||
</param>
|
||||
<param name="link_category" type="list" default="" label="Category Name Linkable" description="PARAMCATEGLINK">
|
||||
<option value="">Use Global</option>
|
||||
<option value="0">No</option>
|
||||
<option value="1">Yes</option>
|
||||
</param>
|
||||
<param name="show_vote" type="list" default="" label="Item Rating" description="PARAMRATING">
|
||||
<option value="">Use Global</option>
|
||||
<option value="0">Hide</option>
|
||||
<option value="1">Show</option>
|
||||
</param>
|
||||
<param name="show_author" type="list" default="" label="Author Names" description="PARAMAUTHOR">
|
||||
<option value="">Use Global</option>
|
||||
<option value="0">Hide</option>
|
||||
<option value="1">Show</option>
|
||||
</param>
|
||||
<param name="show_create_date" type="list" default="" label="Created Date and Time" description="PARAMCREATEDATE">
|
||||
<option value="">Use Global</option>
|
||||
<option value="0">Hide</option>
|
||||
<option value="1">Show</option>
|
||||
</param>
|
||||
<param name="show_modify_date" type="list" default="" label="Modified Date and Time" description="PARAMMODIFYDATE">
|
||||
<option value="">Use Global</option>
|
||||
<option value="0">Hide</option>
|
||||
<option value="1">Show</option>
|
||||
</param>
|
||||
<param name="show_pdf_icon" type="list" default="" label="PDF Icon" description="PARAMPDF">
|
||||
<option value="">Use Global</option>
|
||||
<option value="0">Hide</option>
|
||||
<option value="1">Show</option>
|
||||
</param>
|
||||
<param name="show_print_icon" type="list" default="" label="Print Icon" description="PARAMPRINT">
|
||||
<option value="">Use Global</option>
|
||||
<option value="0">Hide</option>
|
||||
<option value="1">Show</option>
|
||||
</param>
|
||||
<param name="show_email_icon" type="list" default="" label="Email Icon" description="PARAMEMAIL">
|
||||
<option value="">Use Global</option>
|
||||
<option value="0">Hide</option>
|
||||
<option value="1">Show</option>
|
||||
</param>
|
||||
<param name="language" type="languages" client="site" label="Content language" description="PARAMCONTENTLANGUAGE" />
|
||||
<param name="keyref" type="text" size="25" default="" label="Key Reference" description="PARAMKEYREF" />
|
||||
<param name="readmore" type="text" size="25" default="" label="Alternative Read more text" description="PARAMALTREADMORE" />
|
||||
</params>
|
||||
<params group="metadata">
|
||||
<param name="description" type="textarea" rows="5" cols="30" default="" label="Description" description="METADESC" />
|
||||
<param name="keywords" type="textarea" rows="5" cols="30" default="" label="Keywords" description="METAKEYS" />
|
||||
<param name="robots" type="text" size="20" default="" label="Robots" description="METAROBOTS" />
|
||||
<param name="author" type="text" size="20" default="" label="Author" description="METAAUTHOR" />
|
||||
</params>
|
||||
</form>
|
||||
@@ -0,0 +1,156 @@
|
||||
<?php
|
||||
/**
|
||||
* @version $Id: element.php 10381 2008-06-01 03:35:53Z pasamio $
|
||||
* @package Joomla
|
||||
* @subpackage Content
|
||||
* @copyright Copyright (C) 2005 - 2008 Open Source Matters. All rights reserved.
|
||||
* @license GNU/GPL, see LICENSE.php
|
||||
* Joomla! is free software. This version may have been modified pursuant to the
|
||||
* GNU General Public License, and as distributed it includes or is derivative
|
||||
* of works licensed under the GNU General Public License or other free or open
|
||||
* source software licenses. See COPYRIGHT.php for copyright notices and
|
||||
* details.
|
||||
*/
|
||||
|
||||
// no direct access
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
jimport( 'joomla.application.component.helper');
|
||||
jimport( 'joomla.application.component.model');
|
||||
|
||||
/**
|
||||
* Content Component Article Model
|
||||
*
|
||||
* @package Joomla
|
||||
* @subpackage Content
|
||||
* @since 1.5
|
||||
*/
|
||||
class ContentModelElement extends JModel
|
||||
{
|
||||
/**
|
||||
* Content data in category array
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
var $_list = null;
|
||||
|
||||
var $_page = null;
|
||||
|
||||
/**
|
||||
* Method to get content article data for the frontpage
|
||||
*
|
||||
* @since 1.5
|
||||
*/
|
||||
function getList()
|
||||
{
|
||||
global $mainframe;
|
||||
|
||||
if (!empty($this->_list)) {
|
||||
return $this->_list;
|
||||
}
|
||||
|
||||
// Initialize variables
|
||||
$db =& $this->getDBO();
|
||||
$filter = null;
|
||||
|
||||
// Get some variables from the request
|
||||
$sectionid = JRequest::getVar( 'sectionid', -1, '', 'int' );
|
||||
$redirect = $sectionid;
|
||||
$option = JRequest::getCmd( 'option' );
|
||||
$filter_order = $mainframe->getUserStateFromRequest('articleelement.filter_order', 'filter_order', '', 'cmd');
|
||||
$filter_order_Dir = $mainframe->getUserStateFromRequest('articleelement.filter_order_Dir', 'filter_order_Dir', '', 'word');
|
||||
$catid = $mainframe->getUserStateFromRequest('articleelement.catid', 'catid', 0, 'int');
|
||||
$filter_authorid = $mainframe->getUserStateFromRequest('articleelement.filter_authorid', 'filter_authorid', 0, 'int');
|
||||
$filter_sectionid = $mainframe->getUserStateFromRequest('articleelement.filter_sectionid', 'filter_sectionid', -1, 'int');
|
||||
$limit = $mainframe->getUserStateFromRequest('global.list.limit', 'limit', $mainframe->getCfg('list_limit'), 'int');
|
||||
$limitstart = $mainframe->getUserStateFromRequest('articleelement.limitstart', 'limitstart', 0, 'int');
|
||||
$search = $mainframe->getUserStateFromRequest('articleelement.search', 'search', '', 'string');
|
||||
$search = JString::strtolower($search);
|
||||
|
||||
//$where[] = "c.state >= 0";
|
||||
$where[] = "c.state != -2";
|
||||
|
||||
if (!$filter_order) {
|
||||
$filter_order = 'section_name';
|
||||
}
|
||||
$order = ' ORDER BY '. $filter_order .' '. $filter_order_Dir .', section_name, cc.name, c.ordering';
|
||||
$all = 1;
|
||||
|
||||
if ($filter_sectionid >= 0) {
|
||||
$filter = ' WHERE cc.section = '.$db->Quote($filter_sectionid);
|
||||
}
|
||||
$section->title = 'All Articles';
|
||||
$section->id = 0;
|
||||
|
||||
/*
|
||||
* Add the filter specific information to the where clause
|
||||
*/
|
||||
// Section filter
|
||||
if ($filter_sectionid >= 0) {
|
||||
$where[] = 'c.sectionid = '.(int) $filter_sectionid;
|
||||
}
|
||||
// Category filter
|
||||
if ($catid > 0) {
|
||||
$where[] = 'c.catid = '.(int) $catid;
|
||||
}
|
||||
// Author filter
|
||||
if ($filter_authorid > 0) {
|
||||
$where[] = 'c.created_by = '.(int) $filter_authorid;
|
||||
}
|
||||
|
||||
// Only published articles
|
||||
$where[] = 'c.state = 1';
|
||||
|
||||
// Keyword filter
|
||||
if ($search) {
|
||||
$where[] = 'LOWER( c.title ) LIKE '.$db->Quote( '%'.$db->getEscaped( $search, true ).'%', false );
|
||||
}
|
||||
|
||||
// Build the where clause of the content record query
|
||||
$where = (count($where) ? ' WHERE '.implode(' AND ', $where) : '');
|
||||
|
||||
// Get the total number of records
|
||||
$query = 'SELECT COUNT(*)' .
|
||||
' FROM #__content AS c' .
|
||||
' LEFT JOIN #__categories AS cc ON cc.id = c.catid' .
|
||||
' LEFT JOIN #__sections AS s ON s.id = c.sectionid' .
|
||||
$where;
|
||||
$db->setQuery($query);
|
||||
$total = $db->loadResult();
|
||||
|
||||
// Create the pagination object
|
||||
jimport('joomla.html.pagination');
|
||||
$this->_page = new JPagination($total, $limitstart, $limit);
|
||||
|
||||
// Get the articles
|
||||
$query = 'SELECT c.*, g.name AS groupname, cc.title as cctitle, u.name AS editor, f.content_id AS frontpage, s.title AS section_name, v.name AS author' .
|
||||
' FROM #__content AS c' .
|
||||
' LEFT JOIN #__categories AS cc ON cc.id = c.catid' .
|
||||
' LEFT JOIN #__sections AS s ON s.id = c.sectionid' .
|
||||
' LEFT JOIN #__groups AS g ON g.id = c.access' .
|
||||
' LEFT JOIN #__users AS u ON u.id = c.checked_out' .
|
||||
' LEFT JOIN #__users AS v ON v.id = c.created_by' .
|
||||
' LEFT JOIN #__content_frontpage AS f ON f.content_id = c.id' .
|
||||
$where .
|
||||
$order;
|
||||
$db->setQuery($query, $this->_page->limitstart, $this->_page->limit);
|
||||
$this->_list = $db->loadObjectList();
|
||||
|
||||
// If there is a db query error, throw a HTTP 500 and exit
|
||||
if ($db->getErrorNum()) {
|
||||
JError::raiseError( 500, $db->stderr() );
|
||||
return false;
|
||||
}
|
||||
|
||||
return $this->_list;
|
||||
}
|
||||
|
||||
function getPagination()
|
||||
{
|
||||
if (is_null($this->_list) || is_null($this->_page)) {
|
||||
$this->getList();
|
||||
}
|
||||
return $this->_page;
|
||||
}
|
||||
}
|
||||
?>
|
||||
@@ -0,0 +1 @@
|
||||
<html><body bgcolor="#FFFFFF"></body></html>
|
||||
@@ -0,0 +1,84 @@
|
||||
<?php
|
||||
/**
|
||||
* @version $Id: toolbar.content.html.php 11798 2009-05-06 02:11:47Z ian $
|
||||
* @package Joomla
|
||||
* @subpackage Content
|
||||
* @copyright Copyright (C) 2005 - 2008 Open Source Matters. All rights reserved.
|
||||
* @license GNU/GPL, see LICENSE.php
|
||||
* Joomla! is free software. This version may have been modified pursuant
|
||||
* to the GNU General Public License, and as distributed it includes or
|
||||
* is derivative of works licensed under the GNU General Public License or
|
||||
* other free or open source software licenses.
|
||||
* See COPYRIGHT.php for copyright notices and details.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @package Joomla
|
||||
* @subpackage Content
|
||||
*/
|
||||
class TOOLBAR_content
|
||||
{
|
||||
function _EDIT($edit)
|
||||
{
|
||||
$cid = JRequest::getVar( 'cid', array(0), '', 'array' );
|
||||
$cid = intval($cid[0]);
|
||||
|
||||
$text = ( $edit ? JText::_( 'Edit' ) : JText::_( 'New' ) );
|
||||
|
||||
JToolBarHelper::title( JText::_( 'Article' ).': <small><small>[ '. $text.' ]</small></small>', 'addedit.png' );
|
||||
JToolBarHelper::preview( 'index.php?option=com_content&id='.$cid.'&tmpl=component', true );
|
||||
JToolBarHelper::save();
|
||||
JToolBarHelper::apply();
|
||||
if ( $edit ) {
|
||||
// for existing articles the button is renamed `close`
|
||||
JToolBarHelper::cancel( 'cancel', 'Close' );
|
||||
} else {
|
||||
JToolBarHelper::cancel();
|
||||
}
|
||||
JToolBarHelper::help( 'screen.content.edit' );
|
||||
}
|
||||
/*
|
||||
function _ARCHIVE()
|
||||
{
|
||||
JToolBarHelper::title( JText::_( 'Archive Manager' ), 'addedit.png' );
|
||||
JToolBarHelper::unarchiveList();
|
||||
JToolBarHelper::custom( 'remove', 'delete.png', 'delete_f2.png', 'Trash', false );
|
||||
JToolBarHelper::help( 'screen.content.archive' );
|
||||
}
|
||||
*/
|
||||
function _MOVE()
|
||||
{
|
||||
JToolBarHelper::title( JText::_( 'Move Articles' ), 'move_f2.png' );
|
||||
JToolBarHelper::custom( 'movesectsave', 'save.png', 'save_f2.png', 'Save', false );
|
||||
JToolBarHelper::cancel();
|
||||
}
|
||||
|
||||
function _COPY()
|
||||
{
|
||||
JToolBarHelper::title( JText::_( 'Copy Articles' ), 'copy_f2.png' );
|
||||
JToolBarHelper::custom( 'copysave', 'save.png', 'save_f2.png', 'Save', false );
|
||||
JToolBarHelper::cancel();
|
||||
}
|
||||
|
||||
function _DEFAULT()
|
||||
{
|
||||
global $filter_state;
|
||||
|
||||
JToolBarHelper::title( JText::_( 'Article Manager' ), 'article.png' );
|
||||
if ($filter_state == 'A' || $filter_state == NULL) {
|
||||
JToolBarHelper::unarchiveList();
|
||||
}
|
||||
if ($filter_state != 'A') {
|
||||
JToolBarHelper::archiveList();
|
||||
}
|
||||
JToolBarHelper::publishList();
|
||||
JToolBarHelper::unpublishList();
|
||||
JToolBarHelper::customX( 'movesect', 'move.png', 'move_f2.png', 'Move' );
|
||||
JToolBarHelper::customX( 'copy', 'copy.png', 'copy_f2.png', 'Copy' );
|
||||
JToolBarHelper::trash();
|
||||
JToolBarHelper::editListX();
|
||||
JToolBarHelper::addNewX();
|
||||
JToolBarHelper::preferences('com_content', '550');
|
||||
JToolBarHelper::help( 'screen.content' );
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
<?php
|
||||
/**
|
||||
* @version $Id: toolbar.content.php 10381 2008-06-01 03:35:53Z pasamio $
|
||||
* @package Joomla
|
||||
* @subpackage Content
|
||||
* @copyright Copyright (C) 2005 - 2008 Open Source Matters. All rights reserved.
|
||||
* @license GNU/GPL, see LICENSE.php
|
||||
* Joomla! is free software. This version may have been modified pursuant
|
||||
* to the GNU General Public License, and as distributed it includes or
|
||||
* is derivative of works licensed under the GNU General Public License or
|
||||
* other free or open source software licenses.
|
||||
* See COPYRIGHT.php for copyright notices and details.
|
||||
*/
|
||||
|
||||
// no direct access
|
||||
defined( '_JEXEC' ) or die( 'Restricted access' );
|
||||
|
||||
require_once( JApplicationHelper::getPath( 'toolbar_html' ) );
|
||||
|
||||
switch ($task)
|
||||
{
|
||||
case 'add':
|
||||
case 'new_content_typed':
|
||||
case 'new_content_section':
|
||||
TOOLBAR_content::_EDIT(false);
|
||||
break;
|
||||
case 'edit':
|
||||
case 'editA':
|
||||
case 'edit_content_typed':
|
||||
TOOLBAR_content::_EDIT(true);
|
||||
break;
|
||||
/*
|
||||
case 'showarchive':
|
||||
TOOLBAR_content::_ARCHIVE();
|
||||
break;
|
||||
*/
|
||||
case 'movesect':
|
||||
TOOLBAR_content::_MOVE();
|
||||
break;
|
||||
|
||||
case 'copy':
|
||||
TOOLBAR_content::_COPY();
|
||||
break;
|
||||
|
||||
default:
|
||||
TOOLBAR_content::_DEFAULT();
|
||||
break;
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
<html><body bgcolor="#FFFFFF"></body></html>
|
||||
@@ -0,0 +1,204 @@
|
||||
<?php
|
||||
/**
|
||||
* @version $Id: view.php 11625 2009-02-15 15:32:42Z kdevine $
|
||||
* @package Joomla
|
||||
* @subpackage Content
|
||||
* @copyright Copyright (C) 2005 - 2008 Open Source Matters. All rights reserved.
|
||||
* @license GNU/GPL, see LICENSE.php
|
||||
* Joomla! is free software. This version may have been modified pursuant to the
|
||||
* GNU General Public License, and as distributed it includes or is derivative
|
||||
* of works licensed under the GNU General Public License or other free or open
|
||||
* source software licenses. See COPYRIGHT.php for copyright notices and
|
||||
* details.
|
||||
*/
|
||||
|
||||
// no direct access
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
jimport('joomla.application.component.view');
|
||||
|
||||
/**
|
||||
* HTML Article Element View class for the Content component
|
||||
*
|
||||
* @package Joomla
|
||||
* @subpackage Content
|
||||
* @since 1.5
|
||||
*/
|
||||
class ContentViewElement extends JView
|
||||
{
|
||||
function display()
|
||||
{
|
||||
global $mainframe;
|
||||
|
||||
// Initialize variables
|
||||
$db = &JFactory::getDBO();
|
||||
$nullDate = $db->getNullDate();
|
||||
|
||||
$document = & JFactory::getDocument();
|
||||
$document->setTitle(JText::_('Article Selection'));
|
||||
|
||||
JHTML::_('behavior.modal');
|
||||
|
||||
$template = $mainframe->getTemplate();
|
||||
$document->addStyleSheet("templates/$template/css/general.css");
|
||||
|
||||
$limitstart = JRequest::getVar('limitstart', '0', '', 'int');
|
||||
|
||||
$lists = $this->_getLists();
|
||||
|
||||
//Ordering allowed ?
|
||||
$ordering = ($lists['order'] == 'section_name' && $lists['order_Dir'] == 'ASC');
|
||||
|
||||
$rows = &$this->get('List');
|
||||
$page = &$this->get('Pagination');
|
||||
JHTML::_('behavior.tooltip');
|
||||
?>
|
||||
<form action="index.php?option=com_content&task=element&tmpl=component&object=id" method="post" name="adminForm">
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<td 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.submit();"><?php echo JText::_( 'Reset' ); ?></button>
|
||||
</td>
|
||||
<td nowrap="nowrap">
|
||||
<?php
|
||||
echo $lists['sectionid'];
|
||||
echo $lists['catid'];
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<table class="adminlist" cellspacing="1">
|
||||
<thead>
|
||||
<tr>
|
||||
<th width="5">
|
||||
<?php echo JText::_( 'Num' ); ?>
|
||||
</th>
|
||||
<th class="title">
|
||||
<?php echo JHTML::_('grid.sort', 'Title', 'c.title', @$lists['order_Dir'], @$lists['order'] ); ?>
|
||||
</th>
|
||||
<th width="7%">
|
||||
<?php echo JHTML::_('grid.sort', 'Access', 'groupname', @$lists['order_Dir'], @$lists['order'] ); ?>
|
||||
</th>
|
||||
<th width="2%" class="title">
|
||||
<?php echo JHTML::_('grid.sort', 'ID', 'c.id', @$lists['order_Dir'], @$lists['order'] ); ?>
|
||||
</th>
|
||||
<th class="title" width="15%" nowrap="nowrap">
|
||||
<?php echo JHTML::_('grid.sort', 'Section', 'section_name', @$lists['order_Dir'], @$lists['order'] ); ?>
|
||||
</th>
|
||||
<th class="title" width="15%" nowrap="nowrap">
|
||||
<?php echo JHTML::_('grid.sort', 'Category', 'cc.title', @$lists['order_Dir'], @$lists['order'] ); ?>
|
||||
</th>
|
||||
<th align="center" width="10">
|
||||
<?php echo JHTML::_('grid.sort', 'Date', 'c.created', @$lists['order_Dir'], @$lists['order'] ); ?>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan="15">
|
||||
<?php echo $page->getListFooter(); ?>
|
||||
</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
<tbody>
|
||||
<?php
|
||||
$k = 0;
|
||||
for ($i=0, $n=count( $rows ); $i < $n; $i++)
|
||||
{
|
||||
$row = &$rows[$i];
|
||||
|
||||
$link = '';
|
||||
$date = JHTML::_('date', $row->created, JText::_('DATE_FORMAT_LC4') );
|
||||
$access = JHTML::_('grid.access', $row, $i, $row->state );
|
||||
?>
|
||||
<tr class="<?php echo "row$k"; ?>">
|
||||
<td>
|
||||
<?php echo $page->getRowOffset( $i ); ?>
|
||||
</td>
|
||||
<td>
|
||||
<a style="cursor: pointer;" onclick="window.parent.jSelectArticle('<?php echo $row->id; ?>', '<?php echo str_replace(array("'", "\""), array("\\'", ""),$row->title); ?>', '<?php echo JRequest::getVar('object'); ?>');">
|
||||
<?php echo htmlspecialchars($row->title, ENT_QUOTES, 'UTF-8'); ?></a>
|
||||
</td>
|
||||
<td align="center">
|
||||
<?php echo $row->groupname;?>
|
||||
</td>
|
||||
<td>
|
||||
<?php echo $row->id; ?>
|
||||
</td>
|
||||
<td>
|
||||
<?php echo $row->section_name; ?>
|
||||
</td>
|
||||
<td>
|
||||
<?php echo $row->cctitle; ?>
|
||||
</td>
|
||||
<td nowrap="nowrap">
|
||||
<?php echo $date; ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
$k = 1 - $k;
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<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']; ?>" />
|
||||
</form>
|
||||
<?php
|
||||
}
|
||||
|
||||
function _getLists()
|
||||
{
|
||||
global $mainframe;
|
||||
|
||||
// Initialize variables
|
||||
$db = &JFactory::getDBO();
|
||||
|
||||
// Get some variables from the request
|
||||
$sectionid = JRequest::getVar( 'sectionid', -1, '', 'int' );
|
||||
$redirect = $sectionid;
|
||||
$option = JRequest::getCmd( 'option' );
|
||||
$filter_order = $mainframe->getUserStateFromRequest('articleelement.filter_order', 'filter_order', '', 'cmd');
|
||||
$filter_order_Dir = $mainframe->getUserStateFromRequest('articleelement.filter_order_Dir', 'filter_order_Dir', '', 'word');
|
||||
$filter_state = $mainframe->getUserStateFromRequest('articleelement.filter_state', 'filter_state', '', 'word');
|
||||
$catid = $mainframe->getUserStateFromRequest('articleelement.catid', 'catid', 0, 'int');
|
||||
$filter_authorid = $mainframe->getUserStateFromRequest('articleelement.filter_authorid', 'filter_authorid', 0, 'int');
|
||||
$filter_sectionid = $mainframe->getUserStateFromRequest('articleelement.filter_sectionid', 'filter_sectionid', -1, 'int');
|
||||
$limit = $mainframe->getUserStateFromRequest('global.list.limit', 'limit', $mainframe->getCfg('list_limit'), 'int');
|
||||
$limitstart = $mainframe->getUserStateFromRequest('articleelement.limitstart', 'limitstart', 0, 'int');
|
||||
$search = $mainframe->getUserStateFromRequest('articleelement.search', 'search', '', 'string');
|
||||
$search = JString::strtolower($search);
|
||||
|
||||
// get list of categories for dropdown filter
|
||||
$filter = ($filter_sectionid >= 0) ? ' WHERE cc.section = '.$db->Quote($filter_sectionid) : '';
|
||||
|
||||
// get list of categories for dropdown filter
|
||||
$query = 'SELECT cc.id AS value, cc.title AS text, section' .
|
||||
' FROM #__categories AS cc' .
|
||||
' INNER JOIN #__sections AS s ON s.id = cc.section' .
|
||||
$filter .
|
||||
' ORDER BY s.ordering, cc.ordering';
|
||||
|
||||
$lists['catid'] = ContentHelper::filterCategory($query, $catid);
|
||||
|
||||
// get list of sections for dropdown filter
|
||||
$javascript = 'onchange="document.adminForm.submit();"';
|
||||
$lists['sectionid'] = JHTML::_('list.section', 'filter_sectionid', $filter_sectionid, $javascript);
|
||||
|
||||
// table ordering
|
||||
$lists['order_Dir'] = $filter_order_Dir;
|
||||
$lists['order'] = $filter_order;
|
||||
|
||||
// search filter
|
||||
$lists['search'] = $search;
|
||||
|
||||
return $lists;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
<html><body bgcolor="#FFFFFF"></body></html>
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 715 B |
@@ -0,0 +1 @@
|
||||
<html><body bgcolor="#FFFFFF"></body></html>
|
||||
@@ -0,0 +1,39 @@
|
||||
/**
|
||||
* CSS Document for media manager list view
|
||||
* @version $Id: medialist-details.css 10387 2008-06-03 10:59:16Z pasamio $
|
||||
* @package Joomla
|
||||
* @copyright Copyright (C) 2005 - 2006 Open Source Matters. All rights reserved.
|
||||
* @license GNU/GPL, see LICENSE.php
|
||||
* Joomla! is free software and parts of it may contain or be derived from the
|
||||
* GNU General Public License or other free or open source software licenses.
|
||||
* See COPYRIGHT.php for copyright notices and details.
|
||||
*/
|
||||
|
||||
.outline {
|
||||
border: 1px solid #cccccc;
|
||||
background: #ffffff;
|
||||
padding: 2px;
|
||||
}
|
||||
|
||||
.manager table td,
|
||||
.manager table th {
|
||||
font-family: Arial, helvetica, sans-serif;
|
||||
font-size: 11px;
|
||||
border-right: 1px dashed #E7E7E7;
|
||||
border-bottom: 1px solid #E7E7E7;
|
||||
border-left: 1px solid #fff;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.manager table td.description {
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.manager table th {
|
||||
border-top: 1px solid #E7E7E7;
|
||||
border-right: 1px solid #E7E7E7;
|
||||
border-bottom: 1px solid #999;
|
||||
background: #F0F0F0;
|
||||
padding: 4px;
|
||||
color: #666;
|
||||
}
|
||||
@@ -0,0 +1,105 @@
|
||||
/**
|
||||
* CSS Document for media manager thumbnail view
|
||||
* @version $Id: medialist-thumbs.css 10387 2008-06-03 10:59:16Z pasamio $
|
||||
* @package Joomla
|
||||
* @copyright Copyright (C) 2005 - 2006 Open Source Matters. All rights reserved.
|
||||
* @license GNU/GPL, see LICENSE.php
|
||||
* Joomla! is free software and parts of it may contain or be derived from the
|
||||
* GNU General Public License or other free or open source software licenses.
|
||||
* See COPYRIGHT.php for copyright notices and details.
|
||||
*/
|
||||
|
||||
div.imgOutline {
|
||||
float: left;
|
||||
border: 1px;
|
||||
|
||||
border-right: 1px solid #f0f0f0;
|
||||
border-bottom: 1px solid #ccc;
|
||||
width:90px; }
|
||||
|
||||
div.imgTotal { }
|
||||
|
||||
div.imgBorder {
|
||||
height: 72px;
|
||||
vertical-align: middle;
|
||||
width: 88px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
div.imgBorder a {
|
||||
height: 72px;
|
||||
width: 88px;
|
||||
display: block;
|
||||
}
|
||||
|
||||
div.imgBorder a:hover {
|
||||
height: 72px;
|
||||
width: 88px;
|
||||
background-color: #f0f0f0;
|
||||
color : #FF6600;
|
||||
}
|
||||
|
||||
.imgBorderHover {
|
||||
background: #FFFFCC;
|
||||
cursor: hand;
|
||||
}
|
||||
|
||||
div.controls {
|
||||
text-align: center;
|
||||
height: 20px;
|
||||
line-height: 20px;
|
||||
background: #f9fcf9;
|
||||
border-top: 1px solid #ddd;
|
||||
}
|
||||
|
||||
div.controls input {
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
div.controls img {
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
div.controls:hover {
|
||||
display: block;
|
||||
}
|
||||
|
||||
div.imginfoBorder {
|
||||
background: #f9f9f9;
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
font-size: 10px;
|
||||
width: 88px;
|
||||
height: 15px;
|
||||
vertical-align: middle;
|
||||
text-align: center;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
div.imgBorder a {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.buttonHover {
|
||||
border: 1px solid;
|
||||
border-color: ButtonHighlight ButtonShadow ButtonShadow ButtonHighlight;
|
||||
cursor: hand;
|
||||
background: #FFFFCC;
|
||||
}
|
||||
|
||||
.buttonOut {
|
||||
border: 0px;
|
||||
}
|
||||
|
||||
.imgCaption {
|
||||
font-size: 9pt;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.dirField {
|
||||
font-size: 9pt;
|
||||
width:110px;
|
||||
}
|
||||
|
||||
div.image {
|
||||
padding-top: 10px;
|
||||
}
|
||||
@@ -0,0 +1,106 @@
|
||||
/**
|
||||
* @version $Id: mediamanager.css 10387 2008-06-03 10:59:16Z pasamio $
|
||||
* @copyright Copyright (C) 2005 - 2008 Open Source Matters. All rights reserved.
|
||||
* @license GNU/GPL, see LICENSE.php
|
||||
* Joomla! is free software. This version may have been modified pursuant
|
||||
* to the GNU General Public License, and as distributed it includes or
|
||||
* is derivative of works licensed under the GNU General Public License or
|
||||
* other free or open source software licenses.
|
||||
* See COPYRIGHT.php for copyright notices and details.
|
||||
*/ /**
|
||||
* MediaManager javascript behvaior styling
|
||||
*
|
||||
* @author Johan Janssens <[email protected]>
|
||||
* @package Joomla
|
||||
* @since 1.5
|
||||
* @version 1.0
|
||||
*/
|
||||
#treeview {
|
||||
padding: 10px;
|
||||
width: 190px;
|
||||
overflow: auto;
|
||||
/*height: 390px;*/
|
||||
border: 0;
|
||||
}
|
||||
|
||||
#folderview {
|
||||
|
||||
}
|
||||
|
||||
#folderview .path {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
#folderview .view {
|
||||
display: block;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
height: 360px;
|
||||
}
|
||||
|
||||
#folderview input#folderpath {
|
||||
width: 65%;
|
||||
background-color: #EEE;
|
||||
}
|
||||
|
||||
#folderview input#foldername {
|
||||
width: 20%;
|
||||
}
|
||||
|
||||
#folderview iframe#folderframe {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
#uploads .upload {
|
||||
padding: 4px;
|
||||
}
|
||||
|
||||
/**
|
||||
* Upload Widget CSS
|
||||
*/
|
||||
.upload-queue {
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
.upload-queue li {
|
||||
background: url(upload.png) no-repeat 0 5px;
|
||||
padding: 5px 0 5px 22px;
|
||||
}
|
||||
|
||||
.upload-queue .queue-file {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.upload-queue .queue-size {
|
||||
color: #aaa;
|
||||
margin-left: 1em;
|
||||
font-size: 0.9em;
|
||||
}
|
||||
|
||||
.upload-queue .queue-loader {
|
||||
position: relative;
|
||||
margin: 3px 15px;
|
||||
font-size: 0.9em;
|
||||
background-color: #ddd;
|
||||
color: #fff;
|
||||
border: 1px inset #ddd;
|
||||
}
|
||||
|
||||
.upload-queue .queue-subloader {
|
||||
text-align: center;
|
||||
position: absolute;
|
||||
background-color: #81B466;
|
||||
height: 100%;
|
||||
width: 0%;
|
||||
left: 0;
|
||||
top: 0;
|
||||
}
|
||||
|
||||
.upload-queue .input-delete {
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
background: url(delete.png) no-repeat 0 0;
|
||||
text-decoration: none;
|
||||
border: none;
|
||||
float: right;
|
||||
}
|
||||
@@ -0,0 +1,180 @@
|
||||
/**
|
||||
* @version $Id: mediamanager.js 10710 2008-08-21 10:08:12Z eddieajau $
|
||||
* @package Joomla
|
||||
* @copyright Copyright (C) 2005 - 2008 Open Source Matters. All rights reserved.
|
||||
* @license GNU/GPL, see LICENSE.php
|
||||
* Joomla! is free software. This version may have been modified pursuant
|
||||
* to the GNU General Public License, and as distributed it includes or
|
||||
* is derivative of works licensed under the GNU General Public License or
|
||||
* other free or open source software licenses.
|
||||
* See COPYRIGHT.php for copyright notices and details.
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* JMediaManager behavior for media component
|
||||
*
|
||||
* @package Joomla.Extensions
|
||||
* @subpackage Media
|
||||
* @since 1.5
|
||||
*/
|
||||
var MediaManager = {
|
||||
|
||||
initialize: function()
|
||||
{
|
||||
this.folderframe = $('folderframe');
|
||||
this.folderpath = $('folderpath');
|
||||
|
||||
this.updatepaths = $$('input.update-folder');
|
||||
|
||||
this.frame = window.frames['folderframe'];
|
||||
this.frameurl = this.frame.location.href;
|
||||
//this.frameurl = window.frames['folderframe'].location.href;
|
||||
|
||||
this.tree = new MooTreeControl({ div: 'media-tree_tree', mode: 'folders', grid: true, theme: 'components/com_media/assets/mootree.gif', onClick:
|
||||
function(node){
|
||||
target = $chk(node.data.target) ? node.data.target : '_self';
|
||||
window.frames[target].location.href = node.data.url;
|
||||
}
|
||||
},{ text: 'Media', open: true, data: { url: 'index.php?option=com_media&view=mediaList&tmpl=component', target: 'folderframe'}});
|
||||
this.tree.adopt('media-tree');
|
||||
},
|
||||
|
||||
submit: function(task)
|
||||
{
|
||||
form = window.frames['folderframe'].document.getElementById('mediamanager-form');
|
||||
form.task.value = task;
|
||||
if ($('username')) {
|
||||
form.username.value = $('username').value;
|
||||
form.password.value = $('password').value;
|
||||
}
|
||||
form.submit();
|
||||
},
|
||||
|
||||
onloadframe: function()
|
||||
{
|
||||
// Update the frame url
|
||||
this.frameurl = this.frame.location.href;
|
||||
|
||||
var folder = this.getFolder();
|
||||
if (folder) {
|
||||
this.updatepaths.each(function(path){ path.value =folder; });
|
||||
this.folderpath.value = basepath+'/'+folder;
|
||||
node = this.tree.get('node_'+folder);
|
||||
node.toggle(false, true);
|
||||
} else {
|
||||
this.updatepaths.each(function(path){ path.value = ''; });
|
||||
this.folderpath.value = basepath;
|
||||
node = this.tree.root;
|
||||
}
|
||||
|
||||
if (node) {
|
||||
this.tree.select(node, true);
|
||||
}
|
||||
|
||||
$(viewstyle).addClass('active');
|
||||
|
||||
a = this._getUriObject($('uploadForm').getProperty('action'));
|
||||
q = $H(this._getQueryObject(a.query));
|
||||
q.set('folder', folder);
|
||||
var query = [];
|
||||
q.each(function(v, k){
|
||||
if ($chk(v)) {
|
||||
this.push(k+'='+v);
|
||||
}
|
||||
}, query);
|
||||
a.query = query.join('&');
|
||||
if (a.port) {
|
||||
$('uploadForm').setProperty('action', a.scheme+'://'+a.domain+':'+a.port+a.path+'?'+a.query);
|
||||
} else {
|
||||
$('uploadForm').setProperty('action', a.scheme+'://'+a.domain+a.path+'?'+a.query);
|
||||
}
|
||||
},
|
||||
|
||||
oncreatefolder: function()
|
||||
{
|
||||
if ($('foldername').value.length) {
|
||||
$('dirpath').value = this.getFolder();
|
||||
submitbutton('createfolder');
|
||||
}
|
||||
},
|
||||
|
||||
setViewType: function(type)
|
||||
{
|
||||
$(type).addClass('active');
|
||||
$(viewstyle).removeClass('active');
|
||||
viewstyle = type;
|
||||
var folder = this.getFolder();
|
||||
this._setFrameUrl('index.php?option=com_media&view=mediaList&tmpl=component&folder='+folder+'&layout='+type);
|
||||
},
|
||||
|
||||
refreshFrame: function()
|
||||
{
|
||||
this._setFrameUrl();
|
||||
},
|
||||
|
||||
getFolder: function()
|
||||
{
|
||||
var url = this.frame.location.search.substring(1);
|
||||
var args = this.parseQuery(url);
|
||||
|
||||
if (args['folder'] == "undefined") {
|
||||
args['folder'] = "";
|
||||
}
|
||||
|
||||
return args['folder'];
|
||||
},
|
||||
|
||||
parseQuery: function(query)
|
||||
{
|
||||
var params = new Object();
|
||||
if (!query) {
|
||||
return params;
|
||||
}
|
||||
var pairs = query.split(/[;&]/);
|
||||
for ( var i = 0; i < pairs.length; i++ )
|
||||
{
|
||||
var KeyVal = pairs[i].split('=');
|
||||
if ( ! KeyVal || KeyVal.length != 2 ) {
|
||||
continue;
|
||||
}
|
||||
var key = unescape( KeyVal[0] );
|
||||
var val = unescape( KeyVal[1] ).replace(/\+ /g, ' ');
|
||||
params[key] = val;
|
||||
}
|
||||
return params;
|
||||
},
|
||||
|
||||
_setFrameUrl: function(url)
|
||||
{
|
||||
if ($chk(url)) {
|
||||
this.frameurl = url;
|
||||
}
|
||||
this.frame.location.href = this.frameurl;
|
||||
},
|
||||
|
||||
_getQueryObject: function(q) {
|
||||
var vars = q.split(/[&;]/);
|
||||
var rs = {};
|
||||
if (vars.length) vars.each(function(val) {
|
||||
var keys = val.split('=');
|
||||
if (keys.length && keys.length == 2) rs[encodeURIComponent(keys[0])] = encodeURIComponent(keys[1]);
|
||||
});
|
||||
return rs;
|
||||
},
|
||||
|
||||
_getUriObject: function(u){
|
||||
var bits = u.match(/^(?:([^:\/?#.]+):)?(?:\/\/)?(([^:\/?#]*)(?::(\d*))?)((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[\?#]|$)))*\/?)?([^?#\/]*))?(?:\?([^#]*))?(?:#(.*))?/);
|
||||
return (bits)
|
||||
? bits.associate(['uri', 'scheme', 'authority', 'domain', 'port', 'path', 'directory', 'file', 'query', 'fragment'])
|
||||
: null;
|
||||
}
|
||||
};
|
||||
|
||||
window.addEvent('domready', function(){
|
||||
// Added to populate data on iframe load
|
||||
MediaManager.initialize();
|
||||
MediaManager.trace = 'start';
|
||||
document.updateUploader = function() { MediaManager.onloadframe(); };
|
||||
MediaManager.onloadframe();
|
||||
});
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 14 KiB |
@@ -0,0 +1,54 @@
|
||||
/**
|
||||
* @version $Id: popup-imagelist.css 10387 2008-06-03 10:59:16Z pasamio $
|
||||
* @copyright Copyright (C) 2005 - 2008 Open Source Matters. All rights reserved.
|
||||
* @license GNU/GPL, see LICENSE.php
|
||||
* Joomla! is free software. This version may have been modified pursuant
|
||||
* to the GNU General Public License, and as distributed it includes or
|
||||
* is derivative of works licensed under the GNU General Public License or
|
||||
* other free or open source software licenses.
|
||||
* See COPYRIGHT.php for copyright notices and details.
|
||||
*/
|
||||
|
||||
/**
|
||||
* ImageManager imagelist styling
|
||||
*
|
||||
* @author Johan Janssens <[email protected]>
|
||||
* @package Joomla
|
||||
* @since 1.5
|
||||
* @version 1.0
|
||||
*/
|
||||
|
||||
html, body { margin: 0 !important; padding: 0 !important; font: 10px Tahoma, Verdana, sans-serif; }
|
||||
|
||||
.item { float: left; border: 1px solid #ccc; margin: 3px; position: relative; }
|
||||
|
||||
.item a {
|
||||
display: table-cell !important;
|
||||
display: block;
|
||||
width: 80px; height: 90px;
|
||||
overflow: hidden;
|
||||
vertical-align: middle;
|
||||
text-align: center;
|
||||
text-decoration: none;
|
||||
color: black;
|
||||
|
||||
line-height: 90px;
|
||||
}
|
||||
|
||||
.item img { display: inline; margin-top: expression(( 80 - this.height ) / 2);}
|
||||
|
||||
html>body .item img {margin: auto;}
|
||||
|
||||
.item span {
|
||||
line-height: 100%;
|
||||
clear:both;
|
||||
display: block;
|
||||
width: 100%;
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
padding: 2px 0;
|
||||
background-color: #eee;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,114 @@
|
||||
/**
|
||||
* @version $Id: popup-imagemanager.css 10387 2008-06-03 10:59:16Z pasamio $
|
||||
* @copyright Copyright (C) 2005 - 2008 Open Source Matters. All rights reserved.
|
||||
* @license GNU/GPL, see LICENSE.php
|
||||
* Joomla! is free software. This version may have been modified pursuant
|
||||
* to the GNU General Public License, and as distributed it includes or
|
||||
* is derivative of works licensed under the GNU General Public License or
|
||||
* other free or open source software licenses.
|
||||
* See COPYRIGHT.php for copyright notices and details.
|
||||
*/
|
||||
|
||||
/**
|
||||
* ImageManager javascript behavior styling
|
||||
*
|
||||
* @author Johan Janssens <[email protected]>
|
||||
* @package Joomla
|
||||
* @since 1.5
|
||||
* @version 1.0
|
||||
*/
|
||||
|
||||
html, body {
|
||||
background-color: #F0F0F0;
|
||||
color: ButtonText;
|
||||
font: 11px Tahoma, Verdana, sans-serif;
|
||||
margin: 0px !important; padding: 0px !important;
|
||||
}
|
||||
|
||||
img { border: 0 none; }
|
||||
|
||||
form { padding: 0px; margin: 0 auto; width: 100%; }
|
||||
fieldset { border-top: 1px solid #CCCCCC; border-bottom: 1px solid #CCCCCC; }
|
||||
button { padding: 3px; border: 1px solid #CCCCCC; font-weight: bold; color: #0B55C4; background-color: white; }
|
||||
button:hover { border: 1px solid #0B55C4; }
|
||||
|
||||
select,input,button { font: 11px Tahoma, Verdana, sans-serif; }
|
||||
|
||||
iframe { width: 100%; overflow-x: false; border: 0 none; margin: 0 0 0.5em 0; padding: 0;}
|
||||
iframe#imageframe { height: 195px; }
|
||||
|
||||
a { padding: 5px; border: 1px solid ButtonFace; }
|
||||
a:hover { border-color: ButtonHighlight ButtonShadow ButtonShadow ButtonHighlight; }
|
||||
|
||||
.buttons { width: 70px; text-align: center; }
|
||||
|
||||
#f_alt, #f_url, #f_title { width: 22em; }
|
||||
|
||||
#messages {
|
||||
position: relative;
|
||||
left: 175px;
|
||||
top: 115px;
|
||||
background-color: white;
|
||||
width: 200px;
|
||||
float: left;
|
||||
margin-top: -52px;
|
||||
border: 1px solid #ccc;
|
||||
text-align: center;
|
||||
padding: 15px;
|
||||
}
|
||||
|
||||
#message {
|
||||
font-size: 15px;
|
||||
font-weight: bold;
|
||||
color: #69c;
|
||||
}
|
||||
|
||||
/**
|
||||
* Upload Widget CSS
|
||||
*/
|
||||
.upload-queue {
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
.upload-queue li {
|
||||
background: url(upload.png) no-repeat 0 5px;
|
||||
padding: 5px 0 5px 5px;
|
||||
}
|
||||
|
||||
.upload-queue .queue-file {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.upload-queue .queue-size {
|
||||
color: #aaa;
|
||||
margin-left: 1em;
|
||||
font-size: 0.9em;
|
||||
}
|
||||
|
||||
.upload-queue .queue-loader {
|
||||
position: relative;
|
||||
margin: 3px 15px;
|
||||
font-size: 0.9em;
|
||||
background-color: #ddd;
|
||||
color: #fff;
|
||||
border: 1px inset #ddd;
|
||||
}
|
||||
|
||||
.upload-queue .queue-subloader {
|
||||
text-align: center;
|
||||
position: absolute;
|
||||
background-color: #81B466;
|
||||
height: 100%;
|
||||
width: 0%;
|
||||
left: 0;
|
||||
top: 0;
|
||||
}
|
||||
|
||||
.upload-queue .input-delete {
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
background: url(delete.png) no-repeat 0 0;
|
||||
text-decoration: none;
|
||||
border: none;
|
||||
float: right;
|
||||
}
|
||||
@@ -0,0 +1,246 @@
|
||||
/**
|
||||
* @version $Id: popup-imagemanager.js 10702 2008-08-21 09:31:31Z eddieajau $
|
||||
* @package Joomla
|
||||
* @copyright Copyright (C) 2005 - 2008 Open Source Matters. All rights reserved.
|
||||
* @license GNU/GPL, see LICENSE.php
|
||||
* Joomla! is free software. This version may have been modified pursuant
|
||||
* to the GNU General Public License, and as distributed it includes or
|
||||
* is derivative of works licensed under the GNU General Public License or
|
||||
* other free or open source software licenses.
|
||||
* See COPYRIGHT.php for copyright notices and details.
|
||||
*/
|
||||
|
||||
/**
|
||||
* JImageManager behavior for media component
|
||||
*
|
||||
* @package Joomla.Extensions
|
||||
* @subpackage Media
|
||||
* @since 1.5
|
||||
*/
|
||||
var ImageManager = {
|
||||
initialize: function()
|
||||
{
|
||||
o = this._getUriObject(window.self.location.href);
|
||||
//console.log(o);
|
||||
q = $H(this._getQueryObject(o.query));
|
||||
this.editor = decodeURIComponent(q.get('e_name'));
|
||||
|
||||
// Setup image manager fields object
|
||||
this.fields = new Object();
|
||||
this.fields.url = $("f_url");
|
||||
this.fields.alt = $("f_alt");
|
||||
this.fields.align = $("f_align");
|
||||
this.fields.title = $("f_title");
|
||||
this.fields.caption = $("f_caption");
|
||||
|
||||
// Setup image listing objects
|
||||
this.folderlist = $('folderlist');
|
||||
|
||||
this.frame = window.frames['imageframe'];
|
||||
this.frameurl = this.frame.location.href;
|
||||
|
||||
// Setup imave listing frame
|
||||
this.imageframe = $('imageframe');
|
||||
this.imageframe.manager = this;
|
||||
this.imageframe.addEvent('load', function(){ ImageManager.onloadimageview(); });
|
||||
|
||||
// Setup folder up button
|
||||
this.upbutton = $('upbutton');
|
||||
this.upbutton.removeEvents('click');
|
||||
this.upbutton.addEvent('click', function(){ ImageManager.upFolder(); });
|
||||
},
|
||||
|
||||
onloadimageview: function()
|
||||
{
|
||||
// Update the frame url
|
||||
this.frameurl = this.frame.location.href;
|
||||
|
||||
var folder = this.getImageFolder();
|
||||
for(var i = 0; i < this.folderlist.length; i++)
|
||||
{
|
||||
if(folder == this.folderlist.options[i].value) {
|
||||
this.folderlist.selectedIndex = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
a = this._getUriObject($('uploadForm').getProperty('action'));
|
||||
//console.log(a);
|
||||
q = $H(this._getQueryObject(a.query));
|
||||
q.set('folder', folder);
|
||||
var query = [];
|
||||
q.each(function(v, k){
|
||||
if ($chk(v)) {
|
||||
this.push(k+'='+v);
|
||||
}
|
||||
}, query);
|
||||
a.query = query.join('&');
|
||||
$('uploadForm').setProperty('action', a.scheme+'://'+a.domain+a.path+'?'+a.query);
|
||||
},
|
||||
|
||||
getImageFolder: function()
|
||||
{
|
||||
var url = this.frame.location.search.substring(1);
|
||||
var args = this.parseQuery(url);
|
||||
|
||||
return args['folder'];
|
||||
},
|
||||
|
||||
onok: function()
|
||||
{
|
||||
extra = '';
|
||||
// Get the image tag field information
|
||||
var url = this.fields.url.getValue();
|
||||
var alt = this.fields.alt.getValue();
|
||||
var align = this.fields.align.getValue();
|
||||
var title = this.fields.title.getValue();
|
||||
var caption = this.fields.caption.getValue();
|
||||
|
||||
if (url != '') {
|
||||
// Set alt attribute
|
||||
if (alt != '') {
|
||||
extra = extra + 'alt="'+alt+'" ';
|
||||
} else {
|
||||
extra = extra + 'alt="" ';
|
||||
}
|
||||
// Set align attribute
|
||||
if (align != '') {
|
||||
extra = extra + 'align="'+align+'" ';
|
||||
}
|
||||
// Set align attribute
|
||||
if (title != '') {
|
||||
extra = extra + 'title="'+title+'" ';
|
||||
}
|
||||
// Set align attribute
|
||||
if (caption != '') {
|
||||
extra = extra + 'class="caption" ';
|
||||
}
|
||||
|
||||
var tag = "<img src=\""+url+"\" "+extra+"/>";
|
||||
}
|
||||
|
||||
window.parent.jInsertEditorText(tag, this.editor);
|
||||
return false;
|
||||
},
|
||||
|
||||
setFolder: function(folder)
|
||||
{
|
||||
//this.showMessage('Loading');
|
||||
|
||||
for(var i = 0; i < this.folderlist.length; i++)
|
||||
{
|
||||
if(folder == this.folderlist.options[i].value) {
|
||||
this.folderlist.selectedIndex = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
this.frame.location.href='index.php?option=com_media&view=imagesList&tmpl=component&folder=' + folder;
|
||||
},
|
||||
|
||||
getFolder: function() {
|
||||
return this.folderlist.getValue();
|
||||
},
|
||||
|
||||
upFolder: function()
|
||||
{
|
||||
var currentFolder = this.getFolder();
|
||||
if(currentFolder.length < 2) {
|
||||
return false;
|
||||
}
|
||||
|
||||
var folders = currentFolder.split('/');
|
||||
var search = '';
|
||||
|
||||
for(var i = 0; i < folders.length - 1; i++) {
|
||||
search += folders[i];
|
||||
search += '/';
|
||||
}
|
||||
|
||||
// remove the trailing slash
|
||||
search = search.substring(0, search.length - 1);
|
||||
|
||||
for(var i = 0; i < this.folderlist.length; i++)
|
||||
{
|
||||
var thisFolder = this.folderlist.options[i].value;
|
||||
|
||||
if(thisFolder == search)
|
||||
{
|
||||
this.folderlist.selectedIndex = i;
|
||||
var newFolder = this.folderlist.options[i].value;
|
||||
this.setFolder(newFolder);
|
||||
break;
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
populateFields: function(file)
|
||||
{
|
||||
$("f_url").value = image_base_path+file;
|
||||
},
|
||||
|
||||
showMessage: function(text)
|
||||
{
|
||||
var message = $('message');
|
||||
var messages = $('messages');
|
||||
|
||||
if(message.firstChild)
|
||||
message.removeChild(message.firstChild);
|
||||
|
||||
message.appendChild(document.createTextNode(text));
|
||||
messages.style.display = "block";
|
||||
},
|
||||
|
||||
parseQuery: function(query)
|
||||
{
|
||||
var params = new Object();
|
||||
if (!query) {
|
||||
return params;
|
||||
}
|
||||
var pairs = query.split(/[;&]/);
|
||||
for ( var i = 0; i < pairs.length; i++ )
|
||||
{
|
||||
var KeyVal = pairs[i].split('=');
|
||||
if ( ! KeyVal || KeyVal.length != 2 ) {
|
||||
continue;
|
||||
}
|
||||
var key = unescape( KeyVal[0] );
|
||||
var val = unescape( KeyVal[1] ).replace(/\+ /g, ' ');
|
||||
params[key] = val;
|
||||
}
|
||||
return params;
|
||||
},
|
||||
|
||||
refreshFrame: function()
|
||||
{
|
||||
this._setFrameUrl();
|
||||
},
|
||||
|
||||
_setFrameUrl: function(url)
|
||||
{
|
||||
if ($chk(url)) {
|
||||
this.frameurl = url;
|
||||
}
|
||||
this.frame.location.href = this.frameurl;
|
||||
},
|
||||
|
||||
_getQueryObject: function(q) {
|
||||
var vars = q.split(/[&;]/);
|
||||
var rs = {};
|
||||
if (vars.length) vars.each(function(val) {
|
||||
var keys = val.split('=');
|
||||
if (keys.length && keys.length == 2) rs[encodeURIComponent(keys[0])] = encodeURIComponent(keys[1]);
|
||||
});
|
||||
return rs;
|
||||
},
|
||||
|
||||
_getUriObject: function(u){
|
||||
var bits = u.match(/^(?:([^:\/?#.]+):)?(?:\/\/)?(([^:\/?#]*)(?::(\d*))?)((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[\?#]|$)))*\/?)?([^?#\/]*))?(?:\?([^#]*))?(?:#(.*))?/);
|
||||
return (bits)
|
||||
? bits.associate(['uri', 'scheme', 'authority', 'domain', 'port', 'path', 'directory', 'file', 'query', 'fragment'])
|
||||
: null;
|
||||
}
|
||||
};
|
||||
|
||||
window.addEvent('domready', function(){
|
||||
ImageManager.initialize();
|
||||
});
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user