 |
 |
 |
 |
 |
| Author |
Message |
al3loo
Joined: 04 Aug 2007 Posts: 65
|
|
|
|
I see that the error is not from the white text width, but it is from the top bar buttons .. and you can see that if you change the theme style from advanced to simple.
 |  | theme : "simple", |
Otherwise, I try to change the top bar buttons to be more line and flexible to be shown I made it with this code see:
 |  | <script language="javascript" type="text/javascript">
tinyMCE.init({
mode : "textareas",
theme : "advanced",
width : "390",
plugins : "table,save,advhr,advimage,advlink,iespell,insertdatetime,preview,zoom,flash,searchreplace,print,contextmenu,paste,directionality,fullscreen",
theme_advanced_buttons1_add_ : "fontselect,fontsizeselect",
theme_advanced_buttons2_add_before : "save,newdocument,separator",
theme_advanced_buttons3 : "forecolor,backcolor",
theme_advanced_buttons3_add_before : "search,replace,separator,cut,copy,paste,separator,insertdate,inserttime,preview",
theme_advanced_buttons4 : "flash,advhr,separator,print,separator,ltr,rtl,separator,fullscreen",
theme_advanced_toolbar_location : "top",
theme_advanced_toolbar_align : "left",
theme_advanced_path_location : "bottom",
plugin_insertdate_dateFormat : "%Y-%m-%d",
plugin_insertdate_timeFormat : "%H:%M:%S",
extended_valid_elements : "a[name|href|target|title|onclick],img[class|src|border=0|alt|title|hspace|vspace|width|height|align|onmouseover|onmouseout|name],hr[class|width|size|noshade],font[face|size|color|style],span[class|align|style]",
file_browser_callback : "fileBrowserCallBack",
height : "400"
});
</script> |
Its look like good .. but not aligning nice, If any one can make it look good give us the code..
Also, I see there are problem with press on browse button e.g (flash and image) buttons it show me an error say: callback Function : fileBrowserCallBack could not be found.
scottdallas, I saw your posts and your site, and especially your search I hope you help me in this topic ..
 |  | I want a code to make the form in my home page do search when I put my words and press on the button search. |
Regards,
AlEloo
|
|
| Mon Aug 06, 2007 1:43 pm |
|
 |
Guest
|
|
|
Please login to hide the ads.
|
|
|
|
 |
D72

Joined: 22 Feb 2007 Posts: 321 Location: NL |
|
|
|
I installed the TinyMCE editor with filemanager.
The Tiny editor works 100%. I'm able to set text bold, italic etc.
The ImageManager is working also.
But when i choose a picture from the imagemanager, i see the tumbnail, nothing wrong here.
I place the image at the spot where i want it to be in my article, and the image is still visable.
Now i save the article, clean my cache (just in case) and went to the frontend of my website.
But there is no image shown in the article. Just a broken image with a red cross in it.
This is the code in the tinymce.php wich is located in the plugin directory
 |  | <!-- tinyMCE -->
<script language="javascript" type="text/javascript" src="./plugins/tinymce/jscripts/tiny_mce/tiny_mce.js"></script>
<script language="javascript" type="text/javascript" src="./plugins/tinymce/imagemanager/jscripts/mcimagemanager.js"></script>
<script language="javascript" type="text/javascript">
tinyMCE.init({
mode : "textareas",
theme : "advanced",
width : "390",
height : "350",
language : "nl",
plugins : "table,save,advhr,advimage,advlink,iespell,insertdatetime,preview,zoom,flash,searchreplace,print,contextmenu,paste,directionality,fullscreen",
theme_advanced_buttons1_add_ : "fontselect,fontsizeselect",
theme_advanced_buttons2_add_before : "save,newdocument",
theme_advanced_buttons3 : "forecolor,backcolor,flash,advhr,cut,copy,paste,preview",
theme_advanced_toolbar_location : "top",
theme_advanced_toolbar_align : "left",
theme_advanced_path_location : "bottom",
plugin_insertdate_dateFormat : "%m-%d-%Y",
plugin_insertdate_timeFormat : "%H:%M",
extended_valid_elements : "a[name|href|target|title|onclick],img[class|src|border=0|alt|title|hspace|vspace|width|height|align|onmouseover|onmouseout|name],hr[class|width|size|noshade],font[face|size|color|style],span[class|align|style]",
file_browser_callback : "mcImageManager.filebrowserCallBack"
});
mcImageManager.init({
language : "nl",
relative_urls : false,
remember_last_path : false
});
</script>
<!-- /tinyMCE -->
<? } ?> |
The stucture of the root looks like this:
The setting in the config.php file of ImageManager is set to:
 |  | // General options
$mcImageManagerConfig['general.demo'] = false;
$mcImageManagerConfig['general.demo_msg'] = "This application is running in demostration mode, this action is restricted.";
$mcImageManagerConfig['general.theme'] = "default";
$mcImageManagerConfig['general.toolbar'] = "createdir,upload,refresh";
$mcImageManagerConfig['general.user_friendly_paths'] = true;
$mcImageManagerConfig['general.disabled_tools'] = "";
$mcImageManagerConfig['general.login_page'] = "login.php";
$mcImageManagerConfig['general.language'] = "nl"; // en, sv
$mcImageManagerConfig['general.allow_override'] = "*";
// Preview options
$mcImageManagerConfig['preview'] = true;
$mcImageManagerConfig['preview.wwwroot'] = "";
$mcImageManagerConfig['preview.urlprefix'] = "http://" . $_SERVER['HTTP_HOST'] . "/";
$mcImageManagerConfig['preview.urlsuffix'] = "";
$mcImageManagerConfig['preview.allow_override'] = "*";
// Create directory options
$mcImageManagerConfig['createdir.include_directory_pattern'] = '';
$mcImageManagerConfig['createdir.exclude_directory_pattern'] = '/[^a-z0-9_]/';
$mcImageManagerConfig['createdir.invalid_directory_name_msg'] = "Error: The name of the directory is invalid.";
$mcImageManagerConfig['createdir.allow_override'] = "*";
// General filesystem options
$mcImageManagerConfig['filesystem'] = "LocalFileImpl";
$mcImageManagerConfig['filesystem.path'] = "../../../../cms/data/upimages/";
$mcImageManagerConfig['filesystem.rootpath'] = "../../../../cms/data/upimages/"; |
Am i doing something wrong here? Just can't set the path, or whatever might be changed.
Maybe someone recoqnize this problem? I also serached on the TinyMCE forum, but it seems i'm the only one having this problem.
Or is there a better/other way to organize and add my images in articles with TinyMCE?
I saw ibrowser is there, but i can't get it work with cn.ru and tinymce.
Thanks.
|
|
| Mon Aug 20, 2007 9:50 am |
|
 |
marten
Joined: 10 Sep 2007 Posts: 23
|
|
|
|
I installed tinyfck editor as ksen wrote and it is working perfect but I need some help regarding iespell.
I downloaded spell check but I need to know where I have to upload it to activate spell check plugin?
on the other hand when I copy text from a word file contains picture and paste it inside the editor I can see the text but the picture not show up so please I need some help to let the image appear when I copy and paste from word.
Thanks in advance
|
|
| Sat Sep 22, 2007 2:00 pm |
|
 |
Mystic2010
Joined: 10 Jan 2007 Posts: 51
|
|
|
|
For those still wondering what the solution to the height problem is, two things:
1. a comma needs to be placed behind  |  | width : "xxx px", |
2. The best way to reduce the of the program, is not only dependant on setting the width, but also on the amount, type and order of the buttons.
Simply said it's best to replace
 |  |
theme_advanced_buttons1_add_ : "fontselect,fontsizeselect",
theme_advanced_buttons2_add_before : "save,newdocument",
theme_advanced_buttons3 : "forecolor,backcolor,flash,advhr,cut,copy,paste,preview", |
with manually added items. This gives you the advantage of only adding those buttons you really need.
The buttons can be gathered by looking at the code on http://wiki.moxiecode.com/examples/tinymce/installation_example_02.php
As for my config, I use
 |  |
theme_advanced_buttons1 : "save,newdocument,|,bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,bullist,numlist,|,outdent,indent,visualchars",
theme_advanced_buttons2 : "fontselect,fontsizeselect,formatselect,|,undo,redo,link,unlink,cleanup",
theme_advanced_buttons3 : "tablecontrols,|,code,advhr,visualaid,attribs",
theme_advanced_buttons4 : "forecolor,backcolor,|,charmap,image,media,|,blockquote,sub,sup,anchor,abbr,acronym,del,ins,emotions,|,nonbreaking",
|
As you can see, I created 4 rows of buttons.
Hope this helps others
Now on to the problem
Whenever I add news, and submit it, I will receive the error that short-story must contain a value, even if there is a story.
Clicking the save icon of TinyMCE never gives problem. Now I understand the quick solution would be to use the save icon of Tiny, but I was wondering if anything could be done about the problem?
|
|
| Tue Mar 11, 2008 11:38 am |
|
 |
D72

Joined: 22 Feb 2007 Posts: 321 Location: NL |
|
|
|
For those who are interested, these are the file manager and image manager for TinMCE. With these plugins you'll be able to upload and manage files and images.
Last edited by D72 on Thu Mar 20, 2008 11:03 am; edited 1 time in total |
|
| Wed Mar 12, 2008 3:08 pm |
|
 |
SickQuilver
Joined: 12 Mar 2008 Posts: 20 Location: Amsterdam, The Netherlands |
|
|
|
Is there a complete install of this editor because i get lost tru all the posts.
because de editor is nice, and i want to use it
|
|
| Wed Mar 12, 2008 3:59 pm |
|
 |
nolikewise
Joined: 17 Dec 2007 Posts: 149 Location: Turkiye |
|
|
|
I'm not able to EDIT previous posts, even the ones i posted using TINYMCE. Why is that?
|
|
| Tue Feb 10, 2009 8:56 pm |
|
 |
jino
Joined: 12 Nov 2008 Posts: 7
|
|
|
|
Hello everyone,
It's my first post here!
First of all MANY THANKS to all the community (especially FI-DD) for releasing cuteNews.RU...
I put here my attempt to integrate tiny MCE with the powerful ajaxfilemanager from http://www.phpletter.com (you can find a demo there) and cuteNews.RU
Why i upload this? Because tinyMCE doesn't not have a free integrated file and image browser, the tinyFCK plugin from D72 has an old
version of tinyMCE and the FCK file browser it's only a very basic tool and last but not least i believe that the tinyFCK plugin is somehow insecure because the browser can be reached by typing the url directly.
For geeks: i integrated the cuteNews.RU login check in ajaxfilemanager, please someone test it for the sake of security!
Installation instruction:
- put the content of the zip file (a folder tiny_mce/ and a file tinymce.php) into your plugins/ folder
- set the correct folder where users can put their files in plugins/tiny_mce/plugins/ajaxfilemanger/inc/config.base.php line 51-52
(it is set by default to data/upimages/ as it is in cuteNews.RU so if you haven't changed in your installation skip this step)
- create a new folder in data/ called 'ajaxfm_session' and set its permissions to 755 (or 777 if needed, also you can change its name and location in the config.base.php)
- change two files with your preferred text editor (line numbers referring to the orginal, unmodified files):
in inc/mod/addnews.mdu
Find (line 6):
 |  |
<form method="post" name="addnews" action="<?=$PHP_SELF; ?>" onsubmit="return process_form(this)">
|
Replace with:
 |  |
<form method="post" name="addnews" action="<?=$PHP_SELF; ?>">
|
Find (line 20, 21):
 |  |
<?=insertTag('short'); ?>
<?=insertSmilies('short', 23); ?>
|
and (line 32, 33):
 |  |
<?=insertTag('full'); ?>
<?=insertSmilies('full', 23); ?>
|
and remove (or comment out) them
in inc/mod/editnews.mdu
Find (line 514):
 |  |
<form method="post" name="addnews" action="<?=$PHP_SELF; ?>" onsubmit="return process_form(this)">
|
Replace with:
 |  |
<form method="post" name="addnews" action="<?=$PHP_SELF; ?>">
|
Find (line 528, 529):
 |  |
<?=insertTag('short'); ?>
<?=insertSmilies('short', 23); ?>
|
and (line 540, 541):
 |  |
<?=insertTag('full'); ?>
<?=insertSmilies('full', 23); ?>
|
and remove (or comment out) them
- activate the plugin via the admin panel
- activate and use the format switcher plugin to set the news format you edit with tinyMCE to HTML (or you will have all line breaks doubled!)
That should be all, i'm glad if you post here any problems or questions...i will try to help as much as i can.
PS: thanks to D72 for his tinyFCK plugin and FI_DD (again ) for this thread.
| Description: |
This is Tiny MCE v 3.2.1.1 (latest by now) from http://tinymce.moxiecode.com/
With the powerful ajaxfilemanager v 1.0 RC4 from http://www.phpletter.com |
|
 Download |
| Filename: |
tiny_mce-v3.2.1.1_+_ajaxfilemanager-v1.0RC4.zip |
| Filesize: |
926.64 KB |
| Downloaded: |
139 Time(s) |
|
|
| Wed Feb 11, 2009 7:49 pm |
|
 |
brdaidoline
Joined: 27 Mar 2007 Posts: 6
|
|
|
|
Someone before asked for Tiny MCE editor in Page editor.
I dont now is soneone made this, but I did for myself, so I decided to share it with you all
Explanation, my tiny mce code for page editor is like this:
 |  |
<!-- tinyMCE -->
<script language="javascript" type="text/javascript" src="../../../plugins/tiny_mce/tiny_mce.js"></script>
<!--
<script language="javascript" type="text/javascript" src="../../../plugins/tiny_mce/tiny_mce_gzip.js"></script>
<script language="javascript" type="text/javascript">
tinyMCE_GZ.init({
plugins : 'style,layer,table,save,advhr,advimage,advlink,emotions,iespell,insertdatetime,preview,media,'+
'searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras',
themes : 'simple,advanced',
languages : 'en',
disk_cache : true,
debug : false
});
</script>
-->
<script language="javascript" type="text/javascript">
tinyMCE.init({
mode : "exact",
elements : "full_story, short_story, body",
extended_valid_elements : "iframe[src|width|height|name|align]",
theme : "advanced",
language : "en",
plugins : "safari,pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,inlinepopups,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template",
theme_advanced_buttons1 : "save,newdocument,|,bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,styleselect,formatselect,fontselect,fontsizeselect",
theme_advanced_buttons2 : "cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code,|,insertdate,inserttime,preview,|,forecolor,backcolor",
theme_advanced_buttons3 : "tablecontrols,|,hr,removeformat,visualaid,|,sub,sup,|,charmap,emotions,iespell,media,advhr,|,print,|,ltr,rtl,|,fullscreen",
theme_advanced_buttons4 : "insertlayer,moveforward,movebackward,absolute,|,styleprops,|,cite,abbr,acronym,del,ins,attribs,|,visualchars,nonbreaking,template,pagebreak",
theme_advanced_toolbar_location : "top",
theme_advanced_toolbar_align : "left",
theme_advanced_statusbar_location : "bottom",
theme_advanced_resizing : true,
relative_urls : false,
remove_script_host : false,
// Example content CSS (should be your site CSS)
content_css : "css/content.css",
// Drop lists for link/image/media/template dialogs
template_external_list_url : "lists/template_list.js",
external_link_list_url : "lists/link_list.js",
external_image_list_url : "lists/image_list.js",
media_external_list_url : "lists/media_list.js",
file_browser_callback : "ajaxfilemanager",
// Replace values for the template plugin
template_replace_values : {
username : "Some User",
staffid : "991234"
}
});
function ajaxfilemanager(field_name, url, type, win) {
var ajaxfilemanagerurl = 'cms/plugins/tiny_mce/plugins/ajaxfilemanager/ajaxfilemanager.php';
switch (type) {
case "image":
ajaxfilemanagerurl += "?type=img";
break;
case "media":
ajaxfilemanagerurl += "?type=media";
break;
case "flash": //for older versions of tinymce
ajaxfilemanagerurl += "?type=media";
break;
case "file":
ajaxfilemanagerurl += "?type=files";
break;
default:
return false;
}
var fileBrowserWindow = new Array();
fileBrowserWindow["file"] = ajaxfilemanagerurl;
fileBrowserWindow["title"] = "Ajax File Manager";
fileBrowserWindow["width"] = "782";
fileBrowserWindow["height"] = "440";
fileBrowserWindow["resizable "] = "yes";
fileBrowserWindow["inline"] = "yes";
fileBrowserWindow["close_previous"] = "no";
tinyMCE.activeEditor.windowManager.open(fileBrowserWindow, {
window : win,
input : field_name
});
return false;
}
</script>
|
I have
src="../../../plugins/tiny_mce/tiny_mce.js"
and
src="../../../plugins/tiny_mce/tiny_mce_gzip.js"
->> you will have to change it to you tiny mce files path
also you will have to change this
cms/plugins/tiny_mce/plugins/ajaxfilemanager/ajaxfilemanager.php'
to your ajaxfilemanager path
because I am using cutenewsru for many pages, and I have unlimited addon domains, so how I could save some space on my hosting plan (because it is not unlimited) i modified tiny mce code, so i uploaded tiny mce files in my public_html folder on my FTP space, so I have:
plugins (there are quixplorer and tiny_mce files)
and then are my website foolders (my seperate webpages)
I also made some other modifications, that i made for myself, to save more space on my hosting plan. I saved 2 MB per one cutenews admin folder, and how I have 11 pages thats 22 MB! Well, like I wrote, I modified it for myself.
I dont now tid you get what I am blabling about (BDW my english is not excelent, I am from Croatia), but here is code for Page editor + Tiny MCE:
 |  |
<?php
/*
Plugin Name: Page editor
Plugin URI: http://cutenews.ru
Description: Create and edit pages.
Version: 0.2
Application: CuteNews
Author: FI-DD
Author URI: http://english.cutenews.ru/forum/profile.php?mode=viewprofile&u=2
*/
add_filter('cutenews-options', 'pages_AddToOptions');
add_action('plugin-options', 'pages_CheckAdminOptions');
function pages_AddToOptions($options){
global $PHP_SELF;
$options[] = array(
'name' => 'Page editor',
'url' => $PHP_SELF.'?mod=options&action=pages',
'access' => '1',
);
return $options;
}
function pages_CheckAdminOptions(){
if ($_GET['action'] == 'pages'){pages_AdminOptions();}
}
function pages_AdminOptions(){
global $PHP_SELF, $_POST, $_GET;
foreach($_GET as $k => $v){
$$k = $v;
}
foreach($_POST as $k => $v){
$$k = $v;
}
$echo = cute_lang("plugins/page-editor");
$pages = new PluginSettings('pages');
if(!is_array($pages -> settings)){
$pages -> settings = array(
'selected_folder' =>'./data/pages',
'page_folder1' =>'./data/pages'
);
$pages -> save();
}
//Create folder and file
$page_folder = $pages -> settings['selected_folder'];
if(!file_exists($page_folder)) mkdir($page_folder);
//Create data/pages/example.php
if(!file_exists($page_folder.'/example.php')) touch($page_folder.'/example.php');
$filesize = filesize($page_folder.'/example.php');
if($filesize == 0){
$handle = fopen($page_folder.'/example.php', "w");
fwrite($handle, "<?php\n\necho 'Hello world.';\n\n?>");
fclose($handle);
}
//Create .htaccess file
if(!file_exists($page_folder.'/.htaccess')){
$ht_file = fopen($page_folder.'/.htaccess', w);
$htaccess = "Order Deny,Allow\nDeny from all\nAllow from 127.0.0.1";
fwrite($ht_file, $htaccess);
fclose($ht_file);
}
// ********************************************************************************
// Edit Templates
// ********************************************************************************
$handle = opendir($page_folder.'/');
while ($file = readdir($handle)){
if($file != "." and $file != ".." and $file != ".htaccess"){
$templates_list[] = $file;
}
}
// ********************************************************************************
// If we want to create new template
// ********************************************************************************
if ($subaction == 'new'){
echoheader('options', $echo['new']);
?>
<form method="post" action="<?=$PHP_SELF; ?>?mod=options&action=pages&subaction=donew">
<table border="0" cellpading="0" cellspacing="0" width="100%" height="100%">
<tr>
<td><?=$echo['newBasedOn']; ?>:
<select name="base_template">
<?
foreach($templates_list as $single_template){
echo '<option value="'.$single_template.'">'.$single_template.'</option>';
}
?>
</select>
<?=$echo['name']; ?> <input type="text" name="template_name"> <input type="submit" value="<?=$echo['make']; ?>">
</table>
</form>
<?
echofooter();
exit;
}
// ********************************************************************************
// Do Create the new template
// ********************************************************************************
if ($subaction == 'donew'){
if (file_exists($page_folder.'/'.$template_name)){
msg('error', $echo['error'], $echo['nameError_2'], $PHP_SELF.'?mod=options&action=pages&subaction=new');
}
if ($base_template){
$base_file = $page_folder.'/'.$base_template;
}
copy($base_file, $page_folder.'/'.$template_name);
@chmod($page_folder.'/'.$template_name, chmod);
msg('info', $echo['headerMaked'], $echo['templateMaked'].' <b>'.$template_name.'</b><br>', $PHP_SELF.'?mod=options&action=pages');
}
// ********************************************************************************
// Deleting template, preparation
// ********************************************************************************
if ($subaction == 'delete'){
echoheader('info', $echo['headerDelete']);
?>
<form method="post" action="<?=$PHP_SELF; ?>?mod=options&action=pages&subaction=dodelete">
<?=$echo['areYouSureDelete']; ?> <b><?=$do_template; ?></b>?<br /><br />
<input type="submit" value="<?=$echo['yesDelete']; ?>">
<input onClick="document.location='<?=$PHP_SELF; ?>?mod=options&action=pages&do_template=<?=$do_template; ?>';" type="button" value="<?=$echo['cancel']; ?>">
<input type="hidden" name="do_template" value="<?=$do_template; ?>">
</form>
<?
echofooter();
exit;
}
// ********************************************************************************
// Do Deleting template
// ********************************************************************************
if ($subaction == 'dodelete'){
unlink($page_folder.'/'.$do_template);
msg('info', $echo['headerDeleted'], '<b>'.$do_template.'</b> '.$echo['templateDeleted'], $PHP_SELF.'?mod=options&action=pages');
}
// ********************************************************************************
// Rename page
// ********************************************************************************
if ($subaction == 'rename'){
echoheader('info', $echo['headerRename']);
?>
<form method="post" action="<?=$PHP_SELF; ?>?mod=options&action=pages&subaction=dorename">
Rename <b><?=$do_template; ?></b> to
<input type="text" name="new_name" value="" />
<input type="hidden" name="old_name" value="<?=$do_template; ?>">
<input type="submit" value="Rename" />
<a href="<?=$PHP_SELF; ?>?mod=options&action=pages&do_template=<?=$do_template; ?>"><?=$echo['cancelRename']; ?></a>
</form>
<?
echofooter();
exit;
}
if($subaction == "dorename"){
rename($page_folder.'/'.$_POST['old_name'], $page_folder.'/'.$_POST['new_name']);
msg('info', 'Rename', 'The file was renamed to '.$_POST['new_name'].' .', $PHP_SELF.'?mod=options&action=pages&do_template='.$_POST['new_name']);
exit;
}
// ********************************************************************************
// Configuration
// ********************************************************************************
if ($subaction == 'config'){
echoheader('info', $echo['config']);
foreach($pages -> settings as $k => $single_folder){
if($k == 'selected_folder') continue;
$folder_arr[$single_folder] = $single_folder;
}
?>
<form method="post" action="<?=$PHP_SELF; ?>?mod=options&action=pages&subaction=doconfig">
<table>
<tr><td>Active folder</td><td><?=makeDropDown($folder_arr, 'selected_folder', $page_folder); ?></td></tr>
<tr><td>New pages folder<br />(example: <b><?=$page_folder; ?></b>)</td>
<td><input type="text" name="new_folder" value="" /></td>
</tr>
<tr><td><input type="submit" value="Save" /></td>
<td><a href="<?=$PHP_SELF; ?>?mod=options&action=pages"><?=$echo['cancelRename']; ?></a></td>
</tr>
</table>
</form>
<?
echofooter();
}
if($subaction == 'doconfig'){
$pages -> settings['selected_folder'] = $_POST['selected_folder'];
$pages -> save();
foreach($pages -> settings as $k => $single_folder){
if($k == 'selected_folder') continue;
$folder_arr[$single_folder] = $single_folder;
}
if($_POST['new_folder'] != '' and !isset($folder_arr[$_POST['new_folder']])){
$last_number = preg_match('#page_folder(.*)#', $k, $match);
$pages -> settings['page_folder'.($match[1]+1)] = $_POST['new_folder'];
$pages -> save();
}
msg('info', $echo['config'], 'Changes saved.', $PHP_SELF.'?mod=options&action=pages&subaction=config');
exit;
}
// ********************************************************************************
// Show The Template Manager
// ********************************************************************************
if (!$subaction){
if (!$do_template){
$do_template = 'example.php';
$show_delete_link = '';
} elseif (strtolower($do_template) != 'example.php'){
$show_delete_link = '<a href="'.$PHP_SELF.'?mod=options&action=pages&subaction=delete&do_template='.$do_template.'">'.$echo['delete'].'</a>';
$show_rename_link = '<a href="'.$PHP_SELF.'?mod=options&action=pages&subaction=rename&do_template='.$do_template.'">'.$echo['Rename'].'</a>';
}
if($_POST['special_page'] != ''){
$page = $_POST['special_page'];
}
elseif($_GET['special_page'] != ''){
$page = $_GET['special_page'];
}
else{
$page = $page_folder.'/'.$do_template;
}
$handle = fopen($page, "r");
$body = @fread($handle, filesize ($page));
fclose($handle);
echoheader('options', $echo['header']);
?>
<!--Taken from http://www.net2ftp.com/ -->
<script type="text/javascript"><!--
function TabText() {
if (event != null) {
if (event.srcElement) {
if (event.srcElement.value) {
if (event.keyCode == 9) {
if (document.selection != null) {
document.selection.createRange().text = '\t';
event.returnValue = false;
}
else {
event.srcElement.value += '\t';
return false;
}
}
}
}
}
}
function quicktags(open, close){
msgfield = document.getElementById('body');
// IE support
if (document.selection && document.selection.createRange){
msgfield.focus();
sel = document.selection.createRange();
sel.text = open + sel.text + close;
msgfield.focus();
}
// Moz support
else if (msgfield.selectionStart || msgfield.selectionStart == "0"){
var startPos = msgfield.selectionStart;
var endPos = msgfield.selectionEnd;
msgfield.value = msgfield.value.substring(0, startPos) + open + msgfield.value.substring(startPos, endPos) + close + msgfield.value.substring(endPos, msgfield.value.length);
msgfield.selectionStart = msgfield.selectionEnd = endPos + open.length + close.length;
msgfield.focus();
}
// Fallback support for other browsers
else {
msgfield.value += open + close;
msgfield.focus();
}
return;
}
//--></script>
<!-- tinyMCE -->
<script language="javascript" type="text/javascript" src="../../../plugins/tiny_mce/tiny_mce.js"></script>
<!--
<script language="javascript" type="text/javascript" src="../../../plugins/tiny_mce/tiny_mce_gzip.js"></script>
<script language="javascript" type="text/javascript">
tinyMCE_GZ.init({
plugins : 'style,layer,table,save,advhr,advimage,advlink,emotions,iespell,insertdatetime,preview,media,'+
'searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras',
themes : 'simple,advanced',
languages : 'en',
disk_cache : true,
debug : false
});
</script>
-->
<script language="javascript" type="text/javascript">
tinyMCE.init({
mode : "exact",
elements : "full_story, short_story, body",
extended_valid_elements : "iframe[src|width|height|name|align]",
theme : "advanced",
language : "en",
plugins : "safari,pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,inlinepopups,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template",
theme_advanced_buttons1 : "save,newdocument,|,bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,styleselect,formatselect,fontselect,fontsizeselect",
theme_advanced_buttons2 : "cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code,|,insertdate,inserttime,preview,|,forecolor,backcolor",
theme_advanced_buttons3 : "tablecontrols,|,hr,removeformat,visualaid,|,sub,sup,|,charmap,emotions,iespell,media,advhr,|,print,|,ltr,rtl,|,fullscreen",
theme_advanced_buttons4 : "insertlayer,moveforward,movebackward,absolute,|,styleprops,|,cite,abbr,acronym,del,ins,attribs,|,visualchars,nonbreaking,template,pagebreak",
theme_advanced_toolbar_location : "top",
theme_advanced_toolbar_align : "left",
theme_advanced_statusbar_location : "bottom",
theme_advanced_resizing : true,
relative_urls : false,
remove_script_host : false,
// Example content CSS (should be your site CSS)
content_css : "css/content.css",
// Drop lists for link/image/media/template dialogs
template_external_list_url : "lists/template_list.js",
external_link_list_url : "lists/link_list.js",
external_image_list_url : "lists/image_list.js",
media_external_list_url : "lists/media_list.js",
file_browser_callback : "ajaxfilemanager",
// Replace values for the template plugin
template_replace_values : {
username : "Some User",
staffid : "991234"
}
});
function ajaxfilemanager(field_name, url, type, win) {
var ajaxfilemanagerurl = 'cms/plugins/tiny_mce/plugins/ajaxfilemanager/ajaxfilemanager.php';
switch (type) {
case "image":
ajaxfilemanagerurl += "?type=img";
break;
case "media":
ajaxfilemanagerurl += "?type=media";
break;
case "flash": //for older versions of tinymce
ajaxfilemanagerurl += "?type=media";
break;
case "file":
ajaxfilemanagerurl += "?type=files";
break;
default:
return false;
}
var fileBrowserWindow = new Array();
fileBrowserWindow["file"] = ajaxfilemanagerurl;
fileBrowserWindow["title"] = "Ajax File Manager";
fileBrowserWindow["width"] = "782";
fileBrowserWindow["height"] = "440";
fileBrowserWindow["resizable "] = "yes";
fileBrowserWindow["inline"] = "yes";
fileBrowserWindow["close_previous"] = "no";
tinyMCE.activeEditor.windowManager.open(fileBrowserWindow, {
window : win,
input : field_name
});
return false;
}
</script>
<form method="post" action="<?=$PHP_SELF; ?>?mod=options&action=pages" name="pageeditor" id="pageeditor">
<table border="0" cellpading="0" cellspacing="0" height="77">
<tr>
<td width="373" height="75">
<b><?=$echo['managment']; ?></b> <b><a href="<?=$PHP_SELF; ?>?mod=options&action=pages&subaction=config"><?=$echo['config']; ?></a></b>
<table border="0" cellpading="0" cellspacing="0" width="347" class="panel" height="50">
<tr>
<td width="126" height="23"> Active folder</td>
<td width="225" height="23">: <b><?=$page_folder; ?></b></td>
</tr>
<tr>
<td width="126" height="23"> <?=$echo['chosen']; ?>
<td width="225" height="23">: <b><?=$do_template; ?></b>
</tr>
<tr>
<td width="126" height="27"> Edit this page:</td>
<td width="225" height="23">: <input size="30" type="text" name="special_page" value="<?=$special_page; ?>" />
</td>
</tr>
<tr>
<td width="126" height="27"> <?=$echo['choseOther']; ?>
<td width="225" height="27">:
<select size="1" name="do_template">
<?
foreach ($templates_list as $single_template){
echo '<option '.(($single_template == $do_template) ? 'selected' : '').' value="'.$single_template.'">'.$single_template.'</option>';
}
?>
</select>
<input type="submit" value="Go">
<tr>
<td width="351" height="25" colspan="2">
<a href="<?=$PHP_SELF; ?>?mod=options&action=pages&subaction=new"><?=$echo['makeNew']; ?></a> <?=$show_delete_link; ?> <?=$show_rename_link; ?>
</table>
<td width="268" height="75" align="center">
</table>
</form>
<img height="20" border="0" src="skins/images/blank.gif" width="1">
<br />
<b><?=$echo['editParts'].' <b>'.$page; ?></b>:</b>
<form method="post" action="<?=$PHP_SELF; ?>?mod=options&action=pages&subaction=dosavetemplates">
<table width="100%">
<tr>
<td>
<textarea style="overflow-y: scroll;" name="body" id="body" rows="33" cols="100" wrap="off" onkeydown="TabText()"><?=$body; ?></textarea>
</td>
</tr>
<tr>
<td height="8" colspan="2">
<input type="hidden" name="do_template" value="<?=$do_template; ?>">
<br /><input type="submit" value="<?=$echo['save']; ?>" accesskey="s">
</table>
<input type="hidden" name="special_page" value="<?=($_POST['special_page'] ? $_POST['special_page'] : $_GET['special_page']); ?>" />
</form>
<?
echofooter();
}
// ********************************************************************************
// Do Save Changes to Templates
// ********************************************************************************
if ($subaction == 'dosavetemplates'){
if (!$do_template){
$do_template = 'Default';
}
if($_POST['special_page'] != ''){
$template_file = $_POST['special_page'];
$special_page = '&special_page='.$_POST['special_page'];
}
elseif($_GET['special_page'] != ''){
$template_file = $_GET['special_page'];
$special_page = '&special_page='.$_GET['special_page'];
}
else{
$template_file = $page_folder.'/'.$do_template;
}
$handle = fopen($template_file, 'w');
fwrite($handle, stripslashes($body));
fclose($handle);
msg('info', $echo['headerSaved'], $echo['templateSaved'], $PHP_SELF.'?mod=options&action=pages&do_template='.$do_template.$special_page);
}
}
?>
|
You will have to replace all in your page-editor.php file, so made backup.
I also attached new .php file
Greetings,
Dinko
I love cutenewsru!!!!! <3
| Description: |
|
 Download |
| Filename: |
page-editor.zip |
| Filesize: |
4.59 KB |
| Downloaded: |
96 Time(s) |
|
|
| Tue Apr 28, 2009 7:29 pm |
|
 |
A2597
Joined: 05 Aug 2009 Posts: 7
|
|
|
|
I have TineMCE with the Ajax Filemanager running, however it's adding a rediculuos amount of whitespace anytime I try to add a table.
the code winds up looking like this:
<table><br /><tbody><br /><tr><br /><td>Name</td><br /><td>Phone</td><br /></tr><br /></tbody><br /></table><br />
all those added BR tags add up to ALOT of space, and they don't show up when I view source.
Any thoughts on how to fix this?
Thanks!
|
|
| Tue Aug 18, 2009 5:30 pm |
|
 |
Hawk

Joined: 29 Aug 2006 Posts: 159
|
|
|
|
The solution to your problem is called Format Switcher.
Format Switcher is a plugin which comes by default with CNR installation, & is located in your Plugins section.
If you are using any editor other than standard one, for example TinyMCE, you should activate it.
In articles, you should change the default value (HTML with BR) to the HTML, & you won't have those big blank spaces in your articles anymore.
_________________ Oo |
|
| Fri Aug 21, 2009 1:25 pm |
|
 |
DarkSlim

Joined: 06 Aug 2009 Posts: 286 Location: IL |
|
|
| Fri Oct 16, 2009 8:02 am |
|
 |
Birch
Joined: 13 Jan 2009 Posts: 1
|
|
|
|
 |  | You can adjust the width of it.
Open the plugin and add for example width: "500" below height: "400". |
Doesn't work, I tried every solution mentioned here. Any help?
|
|
| Fri Jan 08, 2010 7:59 pm |
|
 |
DarkSlim

Joined: 06 Aug 2009 Posts: 286 Location: IL |
|
|
|
 |  |  |  | You can adjust the width of it.
Open the plugin and add for example width: "500" below height: "400". |
Doesn't work, I tried every solution mentioned here. Any help? |
You need to add it after the tinyMCE.init({
and you need to add the , after it like that:
width: "500",
but i havn't checked that, I changed it in the css file and it worked I think
_________________ Portfolio: www.Yaniv.tk
Some of my Plugins and Mods and more in the CuteNewsRU Index!
Donations Accepted, Thank you |
|
| Fri Jan 08, 2010 9:17 pm |
|
 |
Hawk

Joined: 29 Aug 2006 Posts: 159
|
|
|
|
If you want to change the width of the tinymce box (short story, full story, title...), then you should edit the default.css file in your cnr/skins/ directory.
You should look for following:
 |  | #title, #short, #full, #actions {
width: 650px;
border-right: solid 1px #f7f7f7;
float: left;
clear: both;
} |
and change the value of the width.
_________________ Oo |
|
| Sat Jan 09, 2010 1:38 pm |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum
|
|
 |
 |
 |
|