Project

General

Profile

« Previous | Next » 

Revision 1265

Added by Dietmar almost 15 years ago

Ticket #909 WYSIWYG Editor width destroyes backend layout
Set EDITOR_WIDTH to 0, This way backend theme developper
can style the WYSIWYG Editor according to their themes.

View differences:

branches/2.8.x/CHANGELOG
12 12
 
13 13
------------------------------------- 2.8.1 -------------------------------------
14 14
22-Jan-2010 Dietmar Woellbrink (Luisehahne)
15
!	Ticket #909 WYSIWYG Editor width destroyes backend layout
16
!	Set EDITOR_WIDTH to 0, This way backend theme developper 
17
!	can style the WYSIWYG Editor according to their themes.  
18
22-Jan-2010 Dietmar Woellbrink (Luisehahne)
15 19
!	Ticket #916 Update backend theme footer
16 20
21-Jan-2010 Dietmar Woellbrink (Luisehahne)
17 21
!	updated YUI 2.4.1 to 2.8.0r4
branches/2.8.x/wb/admin/interface/version.php
55 55

  
56 56
// check if defined to avoid errors during installation (redirect to admin panel fails if PHP error/warnings are enabled)
57 57
if(!defined('VERSION')) define('VERSION', '2.8.1');
58
if(!defined('REVISION')) define('REVISION', '1264');
58
if(!defined('REVISION')) define('REVISION', '1265');
59 59

  
60 60
?>
branches/2.8.x/wb/framework/initialize.php
1 1
<?php
2
/****************************************************************************
3
* SVN Version information:
2
/*
4 3
*
5
* $Id$
4
*                       About WebsiteBaker
6 5
*
7
*****************************************************************************
8
*                          WebsiteBaker
9
*
10
* WebsiteBaker Project <http://www.websitebaker2.org/>
11
* Copyright (C) 2009, Website Baker Org. e.V.
12
*         http://start.websitebaker2.org/impressum-datenschutz.php
13
* Copyright (C) 2004-2009, Ryan Djurovich
14
*
15
*                        About WebsiteBaker
16
*
17 6
* Website Baker is a PHP-based Content Management System (CMS)
18 7
* designed with one goal in mind: to enable its users to produce websites
19 8
* with ease.
20 9
*
21
*****************************************************************************
10
*                       LICENSE INFORMATION
22 11
*
23
*****************************************************************************
24
*                        LICENSE INFORMATION
25
*
26 12
* WebsiteBaker is free software; you can redistribute it and/or
27 13
* modify it under the terms of the GNU General Public License
28 14
* as published by the Free Software Foundation; either version 2
......
36 22
* You should have received a copy of the GNU General Public License
37 23
* along with this program; if not, write to the Free Software
38 24
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
39
****************************************************************************
40 25
*
41 26
*                   WebsiteBaker Extra Information
42 27
*
43 28
*
44
*
45
*
46
*****************************************************************************/
29
*/
47 30
/**
48 31
 *
49
 * @category     framework
50
 * @package      config
51
 * @author       Ryan Djurovich
52
 * @copyright    2004-2009, Ryan Djurovich
53
 * @copyright    2009-2010, Website Baker Org. e.V.
54
 * @version      $Id$
55
 * @platform     WebsiteBaker 2.8.x
56
 * @requirements >= PHP 4.3.4
57
 * @license      http://www.gnu.org/licenses/gpl.html
32
 * @category        framework
33
 * @package         initialize
34
 * @author          Ryan Djurovich
35
 * @copyright       2004-2009, Ryan Djurovich
36
 * @copyright       2009-2010, Website Baker Org. e.V.
37
 * @filesource		$HeadURL$
38
 * @author          Ryan Djurovich
39
 * @copyright       2004-2009, Ryan Djurovich
58 40
 *
41
 * @author          WebsiteBaker Project
42
 * @link			http://www.websitebaker2.org/
43
 * @copyright       2009-2010, Website Baker Org. e.V.
44
 * @link			http://start.websitebaker2.org/impressum-datenschutz.php
45
 * @license         http://www.gnu.org/licenses/gpl.html
46
 * @version         $Id$
47
 * @platform        WebsiteBaker 2.8.x
48
 * @requirements    PHP 4.3.4 and higher
49
 * @lastmodified    $Date$
50
 *
59 51
 */
60 52

  
61 53
//set_include_path(get_include_path() . PATH_SEPARATOR . WB_PATH);
62 54

  
63

  
64 55
if (file_exists(WB_PATH.'/framework/class.database.php')) {
65 56

  
66 57
	require_once(WB_PATH.'/framework/class.database.php');
......
168 159
    // extended wb_settings
169 160
	define('EDIT_ONE_SECTION', true);
170 161

  
171
	define('EDITOR_WIDTH', 925); // no prozent
162
	define('EDITOR_WIDTH', 0);
172 163

  
173 164
}
174 165

  
175 166

  
branches/2.8.x/wb/modules/wysiwyg/modify.php
1
<?php
2

  
3
// $Id$
4

  
5
/*
6

  
7
 Website Baker Project <http://www.websitebaker.org/>
8
 Copyright (C) 2004-2009, Ryan Djurovich
9

  
10
 Website Baker is free software; you can redistribute it and/or modify
11
 it under the terms of the GNU General Public License as published by
12
 the Free Software Foundation; either version 2 of the License, or
13
 (at your option) any later version.
14

  
15
 Website Baker is distributed in the hope that it will be useful,
16
 but WITHOUT ANY WARRANTY; without even the implied warranty of
17
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18
 GNU General Public License for more details.
19

  
20
 You should have received a copy of the GNU General Public License
21
 along with Website Baker; if not, write to the Free Software
22
 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
23

  
24
*/
25

  
26
if(!defined('WB_PATH')) exit('Direct access to this file is not allowed');
27

  
28
// Get page content
29
$query = "SELECT content FROM ".TABLE_PREFIX."mod_wysiwyg WHERE section_id = '$section_id'";
30
$get_content = $database->query($query);
31
$content = $get_content->fetchRow();
32
$content = (htmlspecialchars($content['content']));
33

  
34
if(!isset($wysiwyg_editor_loaded)) {
35
	$wysiwyg_editor_loaded=true;
36

  
37
	if (!defined('WYSIWYG_EDITOR') OR WYSIWYG_EDITOR=="none" OR !file_exists(WB_PATH.'/modules/'.WYSIWYG_EDITOR.'/include.php')) {
38
		function show_wysiwyg_editor($name,$id,$content,$width,$height) {
39
			echo '<textarea name="'.$name.'" id="'.$id.'" style="width: '.$width.'; height: '.$height.';">'.$content.'</textarea>';
40
		}
41
	} else {
42
		$id_list=array();
43
		$query_wysiwyg = $database->query("SELECT section_id FROM ".TABLE_PREFIX."sections WHERE page_id = '$page_id' AND module = 'wysiwyg'");
44
		if($query_wysiwyg->numRows() > 0) {
45
			while($wysiwyg_section = $query_wysiwyg->fetchRow()) {
46
				$entry='content'.$wysiwyg_section['section_id'];
47
				array_push($id_list,$entry);
48
			}
49
			require(WB_PATH.'/modules/'.WYSIWYG_EDITOR.'/include.php');
50
		}
51
	}
52
}
53

  
54
?>
55

  
56
<form name="wysiwyg<?php echo $section_id; ?>" action="<?php echo WB_URL; ?>/modules/wysiwyg/save.php" method="post">
57

  
58
<input type="hidden" name="page_id" value="<?php echo $page_id; ?>" />
59
<input type="hidden" name="section_id" value="<?php echo $section_id; ?>" />
60

  
61
<?php
62
show_wysiwyg_editor('content'.$section_id,'content'.$section_id,$content,'725px','350px');
63
?>
64

  
65
<table cellpadding="0" cellspacing="0" border="0" width="100%" style="padding-bottom: 10px;">
66
<tr>
67
	<td align="left">
68
		<input type="submit" value="<?php echo $TEXT['SAVE']; ?>" style="width: 100px; margin-top: 5px;" />
69
	</td>
70
	<td align="right">
71
		<input type="button" value="<?php echo $TEXT['CANCEL']; ?>" onclick="javascript: window.location = 'index.php';" style="width: 100px; margin-top: 5px;" />
72
	</td>
73
</tr>
74
</table>
75

  
76
</form>
77

  
1
<?php
2
/*
3
*
4
*                       About WebsiteBaker
5
*
6
* Website Baker is a PHP-based Content Management System (CMS)
7
* designed with one goal in mind: to enable its users to produce websites
8
* with ease.
9
*
10
*                       LICENSE INFORMATION
11
*
12
* WebsiteBaker is free software; you can redistribute it and/or
13
* modify it under the terms of the GNU General Public License
14
* as published by the Free Software Foundation; either version 2
15
* of the License, or (at your option) any later version.
16
*
17
* WebsiteBaker is distributed in the hope that it will be useful,
18
* but WITHOUT ANY WARRANTY; without even the implied warranty of
19
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
20
* See the GNU General Public License for more details.
21
*
22
* You should have received a copy of the GNU General Public License
23
* along with this program; if not, write to the Free Software
24
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
25
*
26
*                   WebsiteBaker Extra Information
27
*
28
*
29
*/
30
/**
31
 *
32
 * @category        module
33
 * @package         wysiwyg
34
 * @author          Ryan Djurovich
35
 * @copyright       2004-2009, Ryan Djurovich
36
 * @copyright       2009-2010, Website Baker Org. e.V.
37
 * @filesource		$HeadURL$
38
 * @author          Ryan Djurovich
39
 * @copyright       2004-2009, Ryan Djurovich
40
 *
41
 * @author          WebsiteBaker Project
42
 * @link			http://www.websitebaker2.org/
43
 * @copyright       2009-2010, Website Baker Org. e.V.
44
 * @link			http://start.websitebaker2.org/impressum-datenschutz.php
45
 * @license         http://www.gnu.org/licenses/gpl.html
46
 * @version         $Id$
47
 * @platform        WebsiteBaker 2.8.x
48
 * @requirements    PHP 4.3.4 and higher
49
 * @lastmodified    $Date$
50
 *
51
 */
52

  
53
if(!defined('WB_PATH')) exit('Direct access to this file is not allowed');
54

  
55
// Get page content
56
$query = "SELECT content FROM ".TABLE_PREFIX."mod_wysiwyg WHERE section_id = '$section_id'";
57
$get_content = $database->query($query);
58
$content = $get_content->fetchRow();
59
$content = (htmlspecialchars($content['content']));
60

  
61
if(!isset($wysiwyg_editor_loaded)) {
62
	$wysiwyg_editor_loaded=true;
63

  
64
	if (!defined('WYSIWYG_EDITOR') OR WYSIWYG_EDITOR=="none" OR !file_exists(WB_PATH.'/modules/'.WYSIWYG_EDITOR.'/include.php')) {
65
		function show_wysiwyg_editor($name,$id,$content,$width,$height) {
66
			echo '<textarea name="'.$name.'" id="'.$id.'" style="width: '.$width.'; height: '.$height.';">'.$content.'</textarea>';
67
		}
68
	} else {
69
		$id_list=array();
70
		$query_wysiwyg = $database->query("SELECT section_id FROM ".TABLE_PREFIX."sections WHERE page_id = '$page_id' AND module = 'wysiwyg'");
71
		if($query_wysiwyg->numRows() > 0) {
72
			while($wysiwyg_section = $query_wysiwyg->fetchRow()) {
73
				$entry='content'.$wysiwyg_section['section_id'];
74
				array_push($id_list,$entry);
75
			}
76
			require(WB_PATH.'/modules/'.WYSIWYG_EDITOR.'/include.php');
77
		}
78
	}
79
}
80

  
81
?>
82

  
83
<form name="wysiwyg<?php echo $section_id; ?>" action="<?php echo WB_URL; ?>/modules/wysiwyg/save.php" method="post">
84

  
85
<input type="hidden" name="page_id" value="<?php echo $page_id; ?>" />
86
<input type="hidden" name="section_id" value="<?php echo $section_id; ?>" />
87

  
88
<?php
89
show_wysiwyg_editor('content'.$section_id,'content'.$section_id,$content,'100%','350px');
90
?>
91

  
92
<table cellpadding="0" cellspacing="0" border="0" width="100%" style="padding-bottom: 10px;">
93
<tr>
94
	<td align="left">
95
		<input type="submit" value="<?php echo $TEXT['SAVE']; ?>" style="width: 100px; margin-top: 5px;" />
96
	</td>
97
	<td align="right">
98
		<input type="button" value="<?php echo $TEXT['CANCEL']; ?>" onclick="javascript: window.location = 'index.php';" style="width: 100px; margin-top: 5px;" />
99
	</td>
100
</tr>
101
</table>
102

  
103
</form>
104

  
78 105
<br />
79 106

  

Also available in: Unified diff