1
0
mirror of https://github.com/e107inc/e107.git synced 2025-07-30 19:30:25 +02:00

Bugtracker #4161 - correctly identify presence of content on news submit with wysiwyg

This commit is contained in:
e107steved
2008-06-02 18:29:09 +00:00
parent d68ecc485a
commit 2e43f7f247
2 changed files with 25 additions and 19 deletions

View File

@@ -4,8 +4,8 @@
| e107 website system - Tiny MCE controller file.
|
| $Source: /cvs_backup/e107_0.8/e107_plugins/tinymce/wysiwyg.php,v $
| $Revision: 1.6 $
| $Date: 2008-05-31 17:55:31 $
| $Revision: 1.7 $
| $Date: 2008-06-02 18:28:57 $
| $Author: e107steved $
+----------------------------------------------------------------------------+
*/
@@ -102,7 +102,7 @@ function tinymce_html_bbcode_control(type, source) {
source = source.replace(/^\s*|\s*$/g,'');
if(source != '')
{
source = '[html]\\n' + source + '\\n[/html]';";
source = '[html]\\n' + source + '\\n[/html]';
/*
source = source.replace(/<\/strong>/gi,'[/b]');
source = source.replace(/<strong>/gi,'[b]');
@@ -115,7 +115,7 @@ function tinymce_html_bbcode_control(type, source) {
source = source.replace(/<\/strong>/gi,'[/b]');
source = source.replace(/<a href=\"(.*?)\"(.*?)>(.*?)<\/a>/gi,'[link=$1 $2]$3[/link]');
*/
$text .= "
}
// Convert e107 paths.
@@ -140,12 +140,11 @@ $text .= "
if (html_bbcode_check == '[/html]') {
source = source.slice(0, -7);
}";
}
/*
source = source.replace(/\[b\]/gi,'<strong>');
source = source.replace(/\[\/b\]/gi,'<\/strong>');
*/
$text .= "
source = source.replace(/\{e_IMAGE\}/gi,'".$IMAGES_DIRECTORY."');
source = source.replace(/\{e_PLUGIN\}/gi,'".$PLUGINS_DIRECTORY."');
@@ -156,6 +155,11 @@ $text .= "
}
function triggerSave()
{
tinyMCE.triggerSave();
}
</script>\n
";

View File

@@ -11,8 +11,8 @@
| GNU General Public License (http://gnu.org).
|
| $Source: /cvs_backup/e107_0.8/submitnews.php,v $
| $Revision: 1.6 $
| $Date: 2008-05-31 17:55:22 $
| $Revision: 1.7 $
| $Date: 2008-06-02 18:28:58 $
| $Author: e107steved $
+----------------------------------------------------------------------------+
*/
@@ -212,20 +212,22 @@ require_once(FOOTERF);
function headerjs()
{
$adder = '';
if (e_WYSIWYG) $adder = 'triggerSave();';
$script = "<script type=\"text/javascript\">
function frmVerify()
{
if(document.getElementById('itemtitle').value == \"\")
{
alert('" . SUBNEWSLAN_1 . "');
return false;
}
if(document.getElementById('e107_submitnews_item').value == \"\")
{
alert('" . SUBNEWSLAN_2 . "');
return false;
}
{$adder}
if(document.getElementById('itemtitle').value == \"\")
{
alert('" . SUBNEWSLAN_1 . "');
return false;
}
if(document.getElementById('e107_submitnews_item').value == \"\")
{
alert('" . SUBNEWSLAN_2 . "');
return false;
}
}
</script>";
return $script;