Subversion Repositories Applications.papyrus

Rev

Rev 431 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 431 Rev 875
Line 1... Line 1...
1
<?php 
1
<?php 
2
/*
2
/*
3
 * FCKeditor - The text editor for internet
3
 * FCKeditor - The text editor for internet
4
 * Copyright (C) 2003-2005 Frederico Caldeira Knabben
4
 * Copyright (C) 2003-2006 Frederico Caldeira Knabben
5
 * 
5
 * 
6
 * Licensed under the terms of the GNU Lesser General Public License:
6
 * Licensed under the terms of the GNU Lesser General Public License:
7
 * 		http://www.opensource.org/licenses/lgpl-license.php
7
 * 		http://www.opensource.org/licenses/lgpl-license.php
8
 * 
8
 * 
9
 * For further information visit:
9
 * For further information visit:
10
 * 		http://www.fckeditor.net/
10
 * 		http://www.fckeditor.net/
11
 * 
11
 * 
-
 
12
 * "Support Open Source software. What about a donation today?"
-
 
13
 * 
12
 * File Name: fckeditor.php
14
 * File Name: fckeditor.php
13
 * 	This is the integration file for PHP.
15
 * 	This is the integration file for PHP.
14
 * 	
16
 * 	
15
 * 	It defines the FCKeditor class that can be used to create editor
17
 * 	It defines the FCKeditor class that can be used to create editor
16
 * 	instances in PHP pages on server side.
18
 * 	instances in PHP pages on server side.
Line 31... Line 33...
31
 
33
 
32
	// PHP 5 Constructor (by Marcus Bointon <coolbru@users.sourceforge.net>)
34
	// PHP 5 Constructor (by Marcus Bointon <coolbru@users.sourceforge.net>)
33
	function __construct( $instanceName )
35
	function __construct( $instanceName )
34
 	{
36
 	{
35
		$this->InstanceName	= $instanceName ;
37
		$this->InstanceName	= $instanceName ;
36
		$this->BasePath		= '/FCKeditor/' ;
38
		$this->BasePath		= '/fckeditor/' ;
37
		$this->Width		= '100%' ;
39
		$this->Width		= '100%' ;
38
		$this->Height		= '200' ;
40
		$this->Height		= '200' ;
39
		$this->ToolbarSet	= 'Default' ;
41
		$this->ToolbarSet	= 'Default' ;
Line 59... Line 61...
59
 
61
 
Line 60... Line 62...
60
		$Html = '<div>' ;
62
		$Html = '<div>' ;
61
		
63
		
-
 
64
		if ( $this->IsCompatible() )
-
 
65
		{
-
 
66
			if ( isset( $_GET['fcksource'] ) && $_GET['fcksource'] == "true" )
-
 
67
				$File = 'fckeditor.original.html' ;
-
 
68
			else
62
		if ( $this->IsCompatible() )
69
				$File = 'fckeditor.html' ;
Line 63... Line 70...
63
		{
70
 
64
			$Link = "{$this->BasePath}editor/fckeditor.html?InstanceName={$this->InstanceName}" ;
71
			$Link = "{$this->BasePath}editor/{$File}?InstanceName={$this->InstanceName}" ;
Line 65... Line 72...
65
			
72
			
66
			if ( $this->ToolbarSet != '' )
73
			if ( $this->ToolbarSet != '' )
Line 67... Line 74...
67
				$Link .= "&amp;Toolbar={$this->ToolbarSet}" ;
74
				$Link .= "&amp;Toolbar={$this->ToolbarSet}" ;
68
 
75
 
Line 69... Line 76...
69
			// Render the linked hidden field.
76
			// Render the linked hidden field.
70
			$Html .= "<input type=\"hidden\" id=\"{$this->InstanceName}\" name=\"{$this->InstanceName}\" value=\"{$HtmlValue}\" />" ;
77
			$Html .= "<input type=\"hidden\" id=\"{$this->InstanceName}\" name=\"{$this->InstanceName}\" value=\"{$HtmlValue}\" style=\"display:none\" />" ;
71
 
78
 
72
			// Render the configurations hidden field.
79
			// Render the configurations hidden field.
73
			$Html .= "<input type=\"hidden\" id=\"{$this->InstanceName}___Config\" value=\"" . $this->GetConfigFieldString() . "\" />" ;
80
			$Html .= "<input type=\"hidden\" id=\"{$this->InstanceName}___Config\" value=\"" . $this->GetConfigFieldString() . "\" style=\"display:none\" />" ;
74
 
81
 
75
			// Render the editor IFRAME.
82
			// Render the editor IFRAME.
Line 85... Line 92...
85
			if ( strpos( $this->Height, '%' ) === false )
92
			if ( strpos( $this->Height, '%' ) === false )
86
				$HeightCSS = $this->Height . 'px' ;
93
				$HeightCSS = $this->Height . 'px' ;
87
			else
94
			else
88
				$HeightCSS = $this->Height ;
95
				$HeightCSS = $this->Height ;
Line 89... Line 96...
89
 
96
 
90
			$Html .= "<textarea name=\"{$this->InstanceName}\" rows=\"4\" cols=\"40\" style=\"width: {$WidthCSS}; height: {$HeightCSS}\" wrap=\"virtual\">{$HtmlValue}</textarea>" ;
97
			$Html .= "<textarea name=\"{$this->InstanceName}\" rows=\"4\" cols=\"40\" style=\"width: {$WidthCSS}; height: {$HeightCSS}\">{$HtmlValue}</textarea>" ;
Line 91... Line 98...
91
		}
98
		}
Line 92... Line 99...
92
 
99