최대 글수 에러 납니다.....ㅡㅡ; 정보
최대 글수 에러 납니다.....ㅡㅡ;본문
게시판 설정에 최대 글수는 0 으로 되어 있는데, (무제한)
편집창에 텍스트를 복사해서 붙여 넣기해서 글을 쓰면 뒷부분이 짤립니다.
테스트를 해본 결과, 그냥 텍스트(메모장의 글)는 잘리지 않고 올라가는데,
MS워드의 글(그림제외 글자만)을 복사해서 붙이면 뒷부분이 짤리네요.....
왜 그런지, 어떻게 해결해야 하는지요....
MS 워드 복사에서의 문제인 것 같은데.....
참고로 게시판은 지금 Q&A 게시판 처럼 웹편집 기능이 있는 스킨입니다...
방금 이 게시판에 테스트를 해보니 여기서도 짤리네요....
*** "태엽푸는새"의 해결책,
<?php
include("_common.php");
mysql_query("alter table $g4[write_prefix]fboard change wr_content wr_content mediumtext");
?>
이것은 해 보았지만, 해결이 되지 않네요....
include("_common.php");
mysql_query("alter table $g4[write_prefix]fboard change wr_content wr_content mediumtext");
?>
이것은 해 보았지만, 해결이 되지 않네요....
댓글 전체

메모장에 복사해서 해보세용..
음.. 저도 그런경우가 몇번있었는뎅..!
음.. 저도 그런경우가 몇번있었는뎅..!
워드 파일을 다른이름으로 저장하세요. 확장자는 txt로.. 그럼 간단하게 해결을 ^^

조사해보니 아래의 번역된 내용이 있더군요..
StarOffice Writer, Microsoft Word 및 Abiword (와)과 같은 워드 프로세서는,PHP 파일의 편집에 적합하지 않습니다. 이러한 워드프로세서상에서 테스트 스크립트를 편집하는 경우는, 파일을 plaintext로서 보존하고 있는 것을 확인해 주세요
[출처] http://phpman-j2k.tistory.com/9
해결방법을 찾아보다가 아래와 같은것을 찾았습니다.
1 <?php
2 /*
3 Plugin Name: Plaintext
4 Plugin URI: http://www.thunderguy.com/semicolon/wordpress/plaintext-wordpress-plugin/
5 Description: Allow visitors to view any file (even PHP or HTML files) as plain text simply by placing the file inside a "plaintext" directory. After activating or deactivating, go to the <a href="options-permalink.php">Permalinks</a> page to complete the process.
6 Version: 1.4
7 Author: Bennett McElwee
8 Author URI: http://www.thunderguy.com/semicolon/
9
10 $Revision$
11
12 INSTRUCTIONS
13
14 1. Copy this file into your plugins directory.
15 2. Log in to WordPress administration. Go to the Plugins page and Activate this plugin.
16 3. In WordPress administration, go to Options and click Permalinks.
17 4. Create a directory called "plaintext" in your wp-contents directory.
18
19 Place files within the plaintext directory. These files will be accessible in a virtual plaintext directory in your blog. For example, if you have a PHP file in /blog/example.php, then anybody who views it will see the output from the PHP script. However, if you put the file in /blog/wp-content/plaintext/example.php, then anybody who views the file through the URL /blog/plaintext/example.php will see the source code for the PHP script.
20
21 Use this plugin for distributing your source soce to an admiring world.
22
23
24 Copyright (C) 2005 Bennett McElwee (bennett at thunderguy dotcom)
25
26 This program is free software; you can redistribute it and/or
27 modify it under the terms of the GNU General Public License
28 as published by the Free Software Foundation; either version 2
29 of the License, or (at your option) any later version.
30
31 This program is distributed in the hope that it will be useful,
32 but WITHOUT ANY WARRANTY; without even the implied warranty of
33 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
34 GNU General Public License for more details.
35
36 You should have received a copy of the GNU General Public License
37 along with this program; if not, write to the Free Software
38 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA *** 개인정보보호를 위한 전화번호 노출방지 *** USA
39 The license is also available at http://www.gnu.org/copyleft/gpl.html
40 */
41
42
43
44 // Configuration
45
46 $tguy_pt_base = 'plaintext';
47
48
49
50 // If this file is called directly, display the requested file
51
52 if (!defined('ABSPATH')) {
53 // WordPress is not loaded.
54 // This file is probably being called to display a file as plain text.
55 error_reporting(E_ALL ^ E_NOTICE);
56 if ($_GET['plaintextpath'] != '') {
57 // We're required to serve a file. If the file exists and is
58 // within the plaintext directory and exists, then serve it as
59 // plain text.
60 $plaintext_root = dirname(dirname(__FILE__)) . "/$tguy_pt_base/";
61 $file_path = $plaintext_root . $_GET['plaintextpath'];
62 $plaintext_root = realpath(strtr($plaintext_root, '\\', '/'));
63 $file_path = realpath(strtr($file_path, '\\', '/'));
64 if (file_exists($file_path)
65 && 0 == strncmp($file_path, $plaintext_root, strlen($plaintext_root))) {
66 header('Content-type: text/plain');
67 readfile($file_path);
68 } else {
69 // Either the file does not exist, or it's not in the plaintext
70 // directory. This should never happen unless somebody accesses
71 // this script directly, in which case they deserve nothing more
72 // than this minimal message.
73 header("HTTP/1.0 404 Not Found");
74 header('Content-type: text/plain');
75 echo 'The file does not exist.';
76 }
77 exit;
78 }
79 }
80
81
82 // Internal machinery
83
84 function &tguy_pt_rewrite_rules(&$rules_string) {
85 /* Add a new rule to the given string so as to enable plaintext URLs.
86 This rule must come before the default WordPress "catch-all" rule.
87 If a request is for a file in blog-home/plaintext, and if the
88 corresponding file exists in blog-root/wp-content/plaintext, then
89 the request is mapped internally to a request for plaintext.php
90 (this file), with the path of the original file as a query argument.
91 */
92 global $tguy_pt_base;
93
94 $site_root = parse_url(get_settings('siteurl'));
95 $site_root = trailingslashit($site_root['path']);
96
97 // Rewrite "/blog/plaintext/source/file.php"
98 // as "/blog/wp-content/plugins/plaintext.php?plaintextpath=source/file.php"
99 $rules_string =
100 "# Begin Plaintext WordPress plugin
101 <IfModule mod_rewrite.c>
102 RewriteEngine On
103 RewriteBase {$site_root}
104 RewriteCond %{DOCUMENT_ROOT}{$site_root}wp-content/{$tguy_pt_base}/$1 -f
105 RewriteRule ^$tguy_pt_base/(.+)$ {$site_root}wp-content/plugins/plaintext.php?plaintextpath=\$1 [L]
106 </IfModule>
107 # End Plaintext WordPress plugin
108 " . $rules_string;
109 return $rules_string;
110 }
111
112 // Enable plaintext URLs
113 if (function_exists('add_filter')) {
114 add_filter('mod_rewrite_rules', 'tguy_pt_rewrite_rules');
115 }
116
117 ?>
[출처] http://semi-wp-plugins.svn.sourceforge.net/viewvc/semi-wp-plugins/plaintext/branches/current/plaintext.php?view=markup
테스트해보지는 않았습니다.
StarOffice Writer, Microsoft Word 및 Abiword (와)과 같은 워드 프로세서는,PHP 파일의 편집에 적합하지 않습니다. 이러한 워드프로세서상에서 테스트 스크립트를 편집하는 경우는, 파일을 plaintext로서 보존하고 있는 것을 확인해 주세요
[출처] http://phpman-j2k.tistory.com/9
해결방법을 찾아보다가 아래와 같은것을 찾았습니다.
1 <?php
2 /*
3 Plugin Name: Plaintext
4 Plugin URI: http://www.thunderguy.com/semicolon/wordpress/plaintext-wordpress-plugin/
5 Description: Allow visitors to view any file (even PHP or HTML files) as plain text simply by placing the file inside a "plaintext" directory. After activating or deactivating, go to the <a href="options-permalink.php">Permalinks</a> page to complete the process.
6 Version: 1.4
7 Author: Bennett McElwee
8 Author URI: http://www.thunderguy.com/semicolon/
9
10 $Revision$
11
12 INSTRUCTIONS
13
14 1. Copy this file into your plugins directory.
15 2. Log in to WordPress administration. Go to the Plugins page and Activate this plugin.
16 3. In WordPress administration, go to Options and click Permalinks.
17 4. Create a directory called "plaintext" in your wp-contents directory.
18
19 Place files within the plaintext directory. These files will be accessible in a virtual plaintext directory in your blog. For example, if you have a PHP file in /blog/example.php, then anybody who views it will see the output from the PHP script. However, if you put the file in /blog/wp-content/plaintext/example.php, then anybody who views the file through the URL /blog/plaintext/example.php will see the source code for the PHP script.
20
21 Use this plugin for distributing your source soce to an admiring world.
22
23
24 Copyright (C) 2005 Bennett McElwee (bennett at thunderguy dotcom)
25
26 This program is free software; you can redistribute it and/or
27 modify it under the terms of the GNU General Public License
28 as published by the Free Software Foundation; either version 2
29 of the License, or (at your option) any later version.
30
31 This program is distributed in the hope that it will be useful,
32 but WITHOUT ANY WARRANTY; without even the implied warranty of
33 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
34 GNU General Public License for more details.
35
36 You should have received a copy of the GNU General Public License
37 along with this program; if not, write to the Free Software
38 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA *** 개인정보보호를 위한 전화번호 노출방지 *** USA
39 The license is also available at http://www.gnu.org/copyleft/gpl.html
40 */
41
42
43
44 // Configuration
45
46 $tguy_pt_base = 'plaintext';
47
48
49
50 // If this file is called directly, display the requested file
51
52 if (!defined('ABSPATH')) {
53 // WordPress is not loaded.
54 // This file is probably being called to display a file as plain text.
55 error_reporting(E_ALL ^ E_NOTICE);
56 if ($_GET['plaintextpath'] != '') {
57 // We're required to serve a file. If the file exists and is
58 // within the plaintext directory and exists, then serve it as
59 // plain text.
60 $plaintext_root = dirname(dirname(__FILE__)) . "/$tguy_pt_base/";
61 $file_path = $plaintext_root . $_GET['plaintextpath'];
62 $plaintext_root = realpath(strtr($plaintext_root, '\\', '/'));
63 $file_path = realpath(strtr($file_path, '\\', '/'));
64 if (file_exists($file_path)
65 && 0 == strncmp($file_path, $plaintext_root, strlen($plaintext_root))) {
66 header('Content-type: text/plain');
67 readfile($file_path);
68 } else {
69 // Either the file does not exist, or it's not in the plaintext
70 // directory. This should never happen unless somebody accesses
71 // this script directly, in which case they deserve nothing more
72 // than this minimal message.
73 header("HTTP/1.0 404 Not Found");
74 header('Content-type: text/plain');
75 echo 'The file does not exist.';
76 }
77 exit;
78 }
79 }
80
81
82 // Internal machinery
83
84 function &tguy_pt_rewrite_rules(&$rules_string) {
85 /* Add a new rule to the given string so as to enable plaintext URLs.
86 This rule must come before the default WordPress "catch-all" rule.
87 If a request is for a file in blog-home/plaintext, and if the
88 corresponding file exists in blog-root/wp-content/plaintext, then
89 the request is mapped internally to a request for plaintext.php
90 (this file), with the path of the original file as a query argument.
91 */
92 global $tguy_pt_base;
93
94 $site_root = parse_url(get_settings('siteurl'));
95 $site_root = trailingslashit($site_root['path']);
96
97 // Rewrite "/blog/plaintext/source/file.php"
98 // as "/blog/wp-content/plugins/plaintext.php?plaintextpath=source/file.php"
99 $rules_string =
100 "# Begin Plaintext WordPress plugin
101 <IfModule mod_rewrite.c>
102 RewriteEngine On
103 RewriteBase {$site_root}
104 RewriteCond %{DOCUMENT_ROOT}{$site_root}wp-content/{$tguy_pt_base}/$1 -f
105 RewriteRule ^$tguy_pt_base/(.+)$ {$site_root}wp-content/plugins/plaintext.php?plaintextpath=\$1 [L]
106 </IfModule>
107 # End Plaintext WordPress plugin
108 " . $rules_string;
109 return $rules_string;
110 }
111
112 // Enable plaintext URLs
113 if (function_exists('add_filter')) {
114 add_filter('mod_rewrite_rules', 'tguy_pt_rewrite_rules');
115 }
116
117 ?>
[출처] http://semi-wp-plugins.svn.sourceforge.net/viewvc/semi-wp-plugins/plaintext/branches/current/plaintext.php?view=markup
테스트해보지는 않았습니다.

[출처] http://rephrase.net/box/word/plaintext/plaintext.phps
<?php
/*
Plugin Name: Plaintext View
Version: 1.0
Plugin URI: http://rephrase.net/box/word/plaintext/
Description: Displays unfiltered post content (e.g., pre-Markdown)
Author: Sam Angove
Author URI: http://rephrase.net/
*/
/*
To get a link to the plaintext version of a post, use "echo Plaintext::link();".
This plugin is intended for use with input which is filtered through a system
such as Markdown or Textile for display. If you use the rich text editor in
WordPress 1.6+, there is no point in using it.
*/
/* Options */
/* Word wrap to how many characters? 0 for no wrap. */
$plaintext['wrap'] = 0;
class Plaintext {
function link() {
$link = get_permalink();
if (false === strpos($link, '?'))
$link = trailingslashit($link) . 'text';
else
$link .= '&plaintext=true';
return $link;
}
function generate_rewrite($wp_rewrite) {
$structure = $wp_rewrite->permalink_structure;
if ($structure{strlen($structure)-1} == '/') {
$wp_rewrite->add_rewrite_tag('%plaintext%', '(text)', "plaintext=");
} else {
add_filter('rewrite_rules_array', array('Plaintext', 'rewrite_filter'));
$wp_rewrite->add_rewrite_tag('%plaintext%', '([./]text)', "plaintext=");
}
$structure .= "%plaintext%";
$rules = $wp_rewrite->generate_rewrite_rule($structure);
foreach ($rules as $match => $redirect) {
$match = str_replace(array('(/[0-9]+)?/?$', '/trackback/?$'), '$', $match);
$redirect = preg_replace(array("#&tb=1#", "#&page=.[0-9]+#"), '', $redirect);
$newrules[$match] = $redirect;
}
$wp_rewrite->rules += $newrules;
}
function rewrite_filter($rules) {
foreach ($rules as $match => $redirect) {
$match = str_replace('([^/]+)', '([^/.]+)', $match);
$newrules[$match] = $redirect;
}
return $newrules;
}
function register_query_var($vars) {
$vars[] = 'plaintext';
return $vars;
}
function show() {
global $plaintext;
$var = get_query_var('plaintext');
if (!empty($var)) {
@header('Content-type: text/plain; charset=utf-8');
if (have_posts()) :
while (have_posts()) : the_post();
$title = get_the_title();
echo $title."\n";
echo str_repeat("=", strlen($title));
echo "\n\n";
echo " By ".get_the_author()."\n";
echo " <".get_permalink().">\n";
echo " ". the_date('', '', '', '', false) . "\n\n\n";
if ($plaintext['wrap'] > 0) {
echo wordwrap(get_the_content(), $plaintext['wrap'], "\n");
} else {
echo get_the_content();
}
echo "\n\n\n";
endwhile;
endif;
exit;
}
}
}
add_action('generate_rewrite_rules', array('Plaintext', 'generate_rewrite'));
add_action('template_redirect', array('Plaintext', 'show'));
add_filter('query_vars', array('Plaintext', 'register_query_var'));
?>
<?php
/*
Plugin Name: Plaintext View
Version: 1.0
Plugin URI: http://rephrase.net/box/word/plaintext/
Description: Displays unfiltered post content (e.g., pre-Markdown)
Author: Sam Angove
Author URI: http://rephrase.net/
*/
/*
To get a link to the plaintext version of a post, use "echo Plaintext::link();".
This plugin is intended for use with input which is filtered through a system
such as Markdown or Textile for display. If you use the rich text editor in
WordPress 1.6+, there is no point in using it.
*/
/* Options */
/* Word wrap to how many characters? 0 for no wrap. */
$plaintext['wrap'] = 0;
class Plaintext {
function link() {
$link = get_permalink();
if (false === strpos($link, '?'))
$link = trailingslashit($link) . 'text';
else
$link .= '&plaintext=true';
return $link;
}
function generate_rewrite($wp_rewrite) {
$structure = $wp_rewrite->permalink_structure;
if ($structure{strlen($structure)-1} == '/') {
$wp_rewrite->add_rewrite_tag('%plaintext%', '(text)', "plaintext=");
} else {
add_filter('rewrite_rules_array', array('Plaintext', 'rewrite_filter'));
$wp_rewrite->add_rewrite_tag('%plaintext%', '([./]text)', "plaintext=");
}
$structure .= "%plaintext%";
$rules = $wp_rewrite->generate_rewrite_rule($structure);
foreach ($rules as $match => $redirect) {
$match = str_replace(array('(/[0-9]+)?/?$', '/trackback/?$'), '$', $match);
$redirect = preg_replace(array("#&tb=1#", "#&page=.[0-9]+#"), '', $redirect);
$newrules[$match] = $redirect;
}
$wp_rewrite->rules += $newrules;
}
function rewrite_filter($rules) {
foreach ($rules as $match => $redirect) {
$match = str_replace('([^/]+)', '([^/.]+)', $match);
$newrules[$match] = $redirect;
}
return $newrules;
}
function register_query_var($vars) {
$vars[] = 'plaintext';
return $vars;
}
function show() {
global $plaintext;
$var = get_query_var('plaintext');
if (!empty($var)) {
@header('Content-type: text/plain; charset=utf-8');
if (have_posts()) :
while (have_posts()) : the_post();
$title = get_the_title();
echo $title."\n";
echo str_repeat("=", strlen($title));
echo "\n\n";
echo " By ".get_the_author()."\n";
echo " <".get_permalink().">\n";
echo " ". the_date('', '', '', '', false) . "\n\n\n";
if ($plaintext['wrap'] > 0) {
echo wordwrap(get_the_content(), $plaintext['wrap'], "\n");
} else {
echo get_the_content();
}
echo "\n\n\n";
endwhile;
endif;
exit;
}
}
}
add_action('generate_rewrite_rules', array('Plaintext', 'generate_rewrite'));
add_action('template_redirect', array('Plaintext', 'show'));
add_filter('query_vars', array('Plaintext', 'register_query_var'));
?>