| [ Index ] |
PHP Cross Reference of Joomla 1.5.26 DE |
[Summary view] [Print] [Text view]
1 <?php 2 /** 3 * @version $Id: article.php 14401 2010-01-26 14:10:00Z louis $ 4 * @package Joomla 5 * @copyright Copyright (C) 2005 - 2010 Open Source Matters. All rights reserved. 6 * @license GNU/GPL, see LICENSE.php 7 * Joomla! is free software. This version may have been modified pursuant 8 * to the GNU General Public License, and as distributed it includes or 9 * is derivative of works licensed under the GNU General Public License or 10 * other free or open source software licenses. 11 * See COPYRIGHT.php for copyright notices and details. 12 */ 13 14 // Check to ensure this file is included in Joomla! 15 defined('_JEXEC') or die( 'Restricted access' ); 16 17 class JElementArticle extends JElement 18 { 19 /** 20 * Element name 21 * 22 * @access protected 23 * @var string 24 */ 25 var $_name = 'Article'; 26 27 function fetchElement($name, $value, &$node, $control_name) 28 { 29 global $mainframe; 30 31 $db =& JFactory::getDBO(); 32 $doc =& JFactory::getDocument(); 33 $template = $mainframe->getTemplate(); 34 $fieldName = $control_name.'['.$name.']'; 35 $article =& JTable::getInstance('content'); 36 if ($value) { 37 $article->load($value); 38 } else { 39 $article->title = JText::_('Select an Article'); 40 } 41 42 $js = " 43 function jSelectArticle(id, title, object) { 44 document.getElementById(object + '_id').value = id; 45 document.getElementById(object + '_name').value = title; 46 document.getElementById('sbox-window').close(); 47 }"; 48 $doc->addScriptDeclaration($js); 49 50 $link = 'index.php?option=com_content&task=element&tmpl=component&object='.$name; 51 52 JHTML::_('behavior.modal', 'a.modal'); 53 $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>'; 54 // $html .= "\n <input class=\"inputbox modal-button\" type=\"button\" value=\"".JText::_('Select')."\" />"; 55 $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"; 56 $html .= "\n".'<input type="hidden" id="'.$name.'_id" name="'.$fieldName.'" value="'.(int)$value.'" />'; 57 58 return $html; 59 } 60 }
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
| Generated: Wed Mar 28 15:54:07 2012 | Cross-referenced by PHPXref 0.7.1 |