One Hat Cyber Team
Your IP :
216.73.216.80
Server IP :
194.44.31.54
Server :
Linux zen.imath.kiev.ua 4.18.0-553.77.1.el8_10.x86_64 #1 SMP Fri Oct 3 14:30:23 UTC 2025 x86_64
Server Software :
Apache/2.4.37 (Rocky Linux) OpenSSL/1.1.1k
PHP Version :
5.6.40
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
home
/
sam
/
public_html
/
web2_old
/
plugins
/
editors
/
View File Name :
none.php
<?php /** * @version $Id: none.php 5173 2006-09-25 18:12:39Z Jinx $ * @package Joomla * @copyright Copyright (C) 2005 - 2006 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.plugin.helper' ); /** * No WYSIWYG Editor Plugin * * @author Louis Landry <louis.landry@joomla.org> * @package Editors * @since 1.5 */ class JEditor_none extends JPlugin { /** * Constructor * * For php4 compatability we must not use the __constructor as a constructor for plugins * because func_get_args ( void ) returns a copy of all passed arguments NOT references. * This causes problems with cross-referencing necessary for the observer design pattern. * * @param object $subject The object to observe * @since 1.5 */ function JEditor_none(& $subject) { parent::__construct($subject); } /** * Method to handle the onInitEditor event. * - Initializes the Editor * * @access public * @return string JavaScript Initialization string * @since 1.5 */ function onInit() { $txt = "<script type=\"text/javascript\"> function insertAtCursor(myField, myValue) { if (document.selection) { // IE support myField.focus(); sel = document.selection.createRange(); sel.text = myValue; } else if (myField.selectionStart || myField.selectionStart == '0') { // MOZILLA/NETSCAPE support var startPos = myField.selectionStart; var endPos = myField.selectionEnd; myField.value = myField.value.substring(0, startPos) + myValue + myField.value.substring(endPos, myField.value.length); } else { myField.value += myValue; } } </script>"; return $txt; } /** * No WYSIWYG Editor - copy editor content to form field * * @param string The name of the editor */ function onSave( $editor ) { return; } /** * No WYSIWYG Editor - get the editor content * * @param string The name of the editor */ function onGetContent( $editor ) { return "document.getElementById( '$editor' ).value;\n"; } /** * No WYSIWYG Editor - set the editor content * * @param string The name of the editor */ function onSetContent( $editor, $html ) { return "document.getElementById( '$editor' ).value = $html;\n"; } /** * No WYSIWYG Editor - display the editor * * @param string The name of the editor area * @param string The content of the field * @param string The name of the form field * @param string The width of the editor area * @param string The height of the editor area * @param int The number of columns for the editor area * @param int The number of rows for the editor area */ function onDisplay( $name, $content, $width, $height, $col, $row ) { // Only add "px" to width and height if they are not given as a percentage if (is_numeric( $width )) { $width .= 'px'; } if (is_numeric( $height )) { $height .= 'px'; } return "<textarea name=\"$name\" id=\"$name\" cols=\"$col\" rows=\"$row\" style=\"width: $width; height: $height;\">$content</textarea>"; } function onGetInsertMethod($name) { $doc = & JFactory::getDocument(); $js= "\tfunction jInsertEditorText( text ) { insertAtCursor( document.adminForm.".$name.", text ); }"; $doc->addScriptDeclaration($js); return true; } } ?>