Page 1 of 2

FCKeditor problem

Posted: Wed 27. Jul 2005, 20:19
by mscwd
I have installed FCKeditor 2.0 and inevitably have come across a few problems.

1. As you can see on the screenshot below, the toolbars are too long for the editor window. How can I rearrange the toolbar buttons so they fit on the toolbar properly?

2. Also is there anyway to increase the height of the editor window, as the actual area you type in is really quite small?

Image

3. Lastly how could I make the editor wider as shown in the mock up image below?

Image

Posted: Wed 27. Jul 2005, 20:38
by frold
I would like the same, so last night I looked at it :D

You need to edit include/inc_temp/articlecontent.edit.tmpl.php

and make the width = 100% for:
<?php
//Anzeigen der passenden benötigten Formularfelder
//abhängig vom gewählten Content Typ
if(file_exists("include/inc_tmpl/content/cnt".$content["type"].".inc.php")) {
include_once("include/inc_tmpl/content/cnt".$content["type"].".inc.php");
} else {
include_once("include/inc_tmpl/content/cnt0.inc.php");
}

?>
and then you need to change phpwcms.php so its not fixed in size...

Posted: Wed 27. Jul 2005, 20:54
by mscwd
Thanks for your reply, however what do I exactly have to change to widen the editor, i'm not to certain?

Also can anyone help me with the first couple of questions?

Many thanks,

-mscwd

Posted: Wed 27. Jul 2005, 20:55
by frold
This is my articlecontent_edit....

Code: Select all

<?php
/*************************************************************************************
   Copyright notice
   
   (c) 2002-2005 Oliver Georgi (oliver@phpwcms.de) // All rights reserved.
 
   This script is part of PHPWCMS. The PHPWCMS web content management system is
   free software; you can redistribute it and/or modify it under the terms of
   the GNU General Public License as published by the Free Software Foundation;
   either version 2 of the License, or (at your option) any later version.
  
   The GNU General Public License can be found at http://www.gnu.org/copyleft/gpl.html
   A copy is found in the textfile GPL.txt and important notices to the license 
   from the author is found in LICENSE.txt distributed with these scripts.
  
   This script is distributed in the hope that it will be useful, but WITHOUT ANY 
   WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
   PARTICULAR PURPOSE.  See the GNU General Public License for more details.
 
   This copyright notice MUST APPEAR in all copies of the script!
*************************************************************************************/

?><form action="phpwcms.php?do=articles&p=2&s=1&aktion=2&id=<?php echo $content["aid"]."&acid=".$content["id"] ?>" method="post" name="articlecontent" <?php 
			
			switch($content["type"]) { //Übergeben bestimmter onSubmit JavaScript Aktionen
				case  2: echo 'onSubmit="selectAllOptions(this.cimage_list);"'; break;
				case 16: echo 'onSubmit="selectAllOptions(this.cimage_list);"'; break;
				case 50: echo 'onSubmit="selectAllOptions(this.cimage_list);"'; break;
				case  7: echo 'onSubmit="selectAllOptions(this.cfile_list);"'; break;
				case  8: echo 'onSubmit="selectAllOptions(this.calink);"'; break;
				case 53: echo 'onSubmit="selectAllOptions(this.cforum_selection);"'; break;
			}
			
			if(!$content["id"] && !isset($content['block'])) {
			
				$sendbutton = $BL['be_article_cnt_button2'];
				
				$content["block"] 		= 'CONTENT';
				$content["before"] 		= '';
				$content["after"] 		= '';
				$content["title"]		= '';
				$content["subtitle"]	= '';
				$content["top"]			= 0;
				$content["visible"]		= 0;
			
			} else {
			
				$sendbutton = $BL['be_article_cnt_button1'];
			
			}
			
			?>><table width="538" border="0" cellpadding="0" cellspacing="0">
      		
      		<tr><td colspan="2" class="title"><?php echo $BL['be_article_cnt_title'].' — <span style="text-transform: uppercase;">'.$wcs_content_type[$content["type"]].'</span>' ?></td></tr>
			<tr>
				<td width="88"><img src="img/leer.gif" width="88" height="4"></td>
				<td width="450"><img src="img/leer.gif" width="450" height="1"></td>
			</tr>
			<tr><td colspan="2"><img src="img/lines/l538_70.gif" width="538" height="1"></td></tr>
      		<tr bgcolor="#D9DEE3"><td colspan="2"><img src="img/leer.gif" width="1" height="4"></td></tr>
		  	<tr bgcolor="#D9DEE3">
				<td align="right" class="chatlist"><?php echo $BL['be_article_cat'] ?>:&nbsp;</td>
				<td><strong><?php echo html_specialchars($content["category"]) ?></strong></td>
		  	</tr>
			<tr bgcolor="#D9DEE3"><td colspan="2"><img src="img/leer.gif" width="1" height="2"></td></tr>
			<tr bgcolor="#D9DEE3">
				<td align="right" class="chatlist"><?php echo $BL['be_article_atitle'] ?>:&nbsp;</td>
				<td><strong><?php echo html_specialchars($content["article"]) ?></strong></td>
			</tr>
			<tr bgcolor="#D9DEE3"><td colspan="2"><img src="img/leer.gif" width="1" height="4"></td></tr>
			<tr><td colspan="2"><img src="img/lines/l538_70.gif" width="538" height="1"></td></tr>
			<tr bgcolor="#F3F5F8"><td colspan="2"><img src="img/leer.gif" width="1" height="6"></td></tr>
			<tr bgcolor="#F3F5F8">
              <td align="right" class="chatlist"><?php echo $BL['be_article_cnt_type'] ?>:&nbsp;</td>
              <td><table border="0" cellspacing="0" cellpadding="0">
                  <tr>
                    <td><select name="target_ctype" class="f11b" id="target_ctype" onChange="this.form.submit();">
                    <?php
					//Menü mit Content Typen erstellen
					foreach($wcs_content_type as $key => $value) {
						echo "<option value=\"".$key."\"";
						if($content["type"] == $key) echo " selected";
						echo ">".$value."</option>";
					}
					?>
                      </select>
                    </td>
                  </tr>
                </table>
              </td>
			  </tr>
			
			
			<tr bgcolor="#F3F5F8"><td colspan="2"><img src="img/leer.gif" width="1" height="6"></td></tr>  
			<tr><td colspan="2"><img src="img/lines/l538_70.gif" width="538" height="1"></td></tr>
			<tr><td colspan="2"><img src="img/leer.gif" width="1" height="6"></td></tr>
			
			
			
			<tr>
              <td align="right" class="chatlist"><?php echo $BL['be_show_content'] ?>:&nbsp;</td>
              <td><select name="cblock" class="f10" id="cblock">
					<option value="CONTENT"<?= is_selected('CONTENT', $content["block"]) ?>><?= $BL['be_main_content'] ?> (CONTENT)</option>
					<option value="LEFT"<?= is_selected('LEFT', $content["block"]) ?>><?= $BL['be_cnt_left'] ?> (LEFT)</option>
					<option value="RIGHT"<?= is_selected('RIGHT', $content["block"]) ?>><?= $BL['be_cnt_right'] ?> (RIGHT)</option>
					<option value="HEADER"<?= is_selected('HEADER', $content["block"]) ?>><?= $BL['be_admin_page_header'] ?> (HEADER)</option>
					<option value="FOOTER"<?= is_selected('FOOTER', $content["block"]) ?>><?= $BL['be_admin_page_footer'] ?> (FOOTER)</option>
<?php

$sql = "SELECT * FROM ".DB_PREPEND."phpwcms_template WHERE template_id=".$content['template_id']." LIMIT 1";
if($result = mysql_query($sql, $db)) {
	if($row = mysql_fetch_assoc($result)) {
		$row = unserialize($row['template_var']);
		$row = explode(',', $row['customblock']);
		if(is_array($row) && count($row)) {
			//list optional blocks
			foreach($row as $value) {
				if($value != '') {
					$valhtml = htmlentities($value);
					echo '<option value="'.$valhtml.'"'.is_selected($value, $content["block"], 0, 0).'>'.$valhtml."</option>\n";				
				}		
			}
		}
	}
	mysql_free_result($result);
}
?>
					</select></td>
			  </tr>
			 <tr><td colspan="2"><img src="img/leer.gif" width="1" height="4"></td></tr>
			
			<tr>
              <td align="right" class="chatlist"><?php echo $BL['be_article_cnt_space'] ?>:&nbsp;</td>
              <td><table border="0" cellspacing="0" cellpadding="0" bgcolor="#E7E8EB">
                  <tr>
                    <td class="v10">&nbsp;<label for="ccb"><?php echo $BL['be_article_cnt_before'] ?></label></td>
                    <td><input name="ccb" type="checkbox" id="ccb" value="1" <?php if(intval($content["before"])) echo "checked"; ?> onClick="if(!this.checked){this.form.cbefore.value='';}else{ if(this.form.cbefore.value=='') this.checked=false;}"></td>
                    <td><input name="cbefore" type="text" id="cbefore" class="v09" style="width: 25px" value="<?php echo $content["before"] ?>" size="2" maxlength="3" onKeyUp="if(parseInt(this.value)){this.form.ccb.checked=true;}else{this.form.ccb.checked=false;this.value=''}"></td>
                    <td class="v10">&nbsp;<label for="cca"><?php echo $BL['be_article_cnt_after'] ?></label></td>
                    <td><input name="cca" type="checkbox" id="cca" value="1" <?php if(intval($content["after"])) echo "checked"; ?> onClick="if(!this.checked){this.form.cafter.value='';}else{ if(this.form.cafter.value=='') this.checked=false;}"></td>
                    <td><input name="cafter" type="text" id="cafter" class="v09" style="width: 25px" value="<?php echo $content["after"] ?>" size="2" maxlength="3" onKeyUp="if(parseInt(this.value)){this.form.cca.checked=true;}else{this.form.cca.checked=false;this.value=''}"></td>
                    <td><img src="img/leer.gif" width="3" height="1"></td>
					<td class="chatlist" bgcolor="#FFFFFF">&nbsp;&nbsp;&nbsp;&nbsp;<label for="ctop"><?php echo $BL['be_article_cnt_toplink'] ?></label>:&nbsp;</td>
					<td><input name="ctop" type="checkbox" id="ctop" value="1"<?php is_checked(1, $content["top"]); ?>></td>
					<td><img src="img/leer.gif" width="2" height="22"></td>
                  </tr>
                </table>
              </td>
			  </tr>
			
			
			  
			<tr><td colspan="2"><img src="img/leer.gif" width="1" height="6"></td></tr>
			<tr><td colspan="2"><img src="img/lines/l538_70.gif" width="538" height="1"></td></tr>
			<tr><td colspan="2"><img src="img/leer.gif" width="1" height="6"></td></tr>
   		  <?php
		  if(isset($content["error"])) {
		  ?>
			<tr>
				<td align="right" valign="top" bgcolor="#FFE9D2"><strong style="color:#FF6600"><?php echo $BL['be_admin_usr_err'] ?>:&nbsp;</strong></td>
				<td valign="top" bgcolor="#FFE9D2"><strong style="color:#FF6600"><?php
					//Fehlerdarstellung
					$content["error_result"]="";
					foreach($content["error"] as $value) {
						$content["error_result"] .= "> ".$value."\n";
					}
					echo nl2br(html_specialchars(chop($content["error_result"])));
					unset($content["error_result"]);
				
				?></strong></td>
			</tr>
			<tr><td colspan="2"><img src="img/leer.gif" width="1" height="6"></td></tr>
		  <?php
		  }
		  ?>
			<tr>
              <td align="right" class="chatlist"><?php echo $BL['be_article_cnt_ctitle'] ?>:&nbsp;</td>
              <td><input name="ctitle" type="text" id="ctitle" class="f11b" style="width: 440px" value="<?php echo html_specialchars($content["title"]) ?>" size="40" maxlength="250"></td>
			</tr>
			<tr>
              <td align="right" class="chatlist"><?php echo $BL['be_article_asubtitle'] ?>:&nbsp;</td>
              <td><input name="csubtitle" type="text" id="csubtitle" class="f11b" style="width: 440px" value="<?php echo html_specialchars($content["subtitle"]) ?>" size="40" maxlength="250"></td>
			</tr>
</table>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
			<tr><td colspan="2"><img src="img/leer.gif" width="1" height="8"></td></tr>
	<?php
	//Anzeigen der passenden benötigten Formularfelder
	//abhängig vom gewählten Content Typ
	if(file_exists("include/inc_tmpl/content/cnt".$content["type"].".inc.php")) {
		include_once("include/inc_tmpl/content/cnt".$content["type"].".inc.php");
	} else {
		include_once("include/inc_tmpl/content/cnt0.inc.php");
	}

	?>
			<tr><td colspan="2"><img src="img/leer.gif" width="1" height="6"></td></tr>
</table>
<table width="538" border="0" cellpadding="0" cellspacing="0">
			<tr><td colspan="2"><img src="img/leer.gif" width="1" height="6"></td></tr>
			<tr>
				<td align="right" class="chatlist"><?php echo $BL['be_ftptakeover_status'] ?>:&nbsp;</td>
				<td><table border="0" cellpadding="2" cellspacing="0" bgcolor="#E7E8EB">
					<tr>
						<td><input name="cvisible" type="checkbox" id="cvisible" value="1"<?php is_checked(1, $content["visible"]); ?>></td>
						<td><label for="cvisible"><?php echo $BL['be_admin_struct_visible'] ?></label></td>
						<td>&nbsp;</td>
					</tr>
				</table></td>
			</tr>
			<tr><td colspan="2"><img src="img/leer.gif" width="1" height="10"></td></tr>
			<tr>
				<td><input name="caktion" type="hidden" id="caktion" value="1"><input name="caid" type="hidden" id="caid" value="<?php echo $article["article_id"] ?>"><input name="cid" type="hidden" id="cid" value="<?= $content["id"] ?>"><input name="ctype" type="hidden" id="ctype" value="<?= $content["type"] ?>"><input name="csorting" type="hidden" id="csorting" value="<?= $content["sorting"] ?>"></td>
				<td><input name="Submit" type="submit" class="button10" value="<?= $sendbutton ?>">&nbsp;<input name="SubmitClose" type="submit" class="button10" value="<?=$BL['be_article_cnt_button3'] ?>">&nbsp;&nbsp;&nbsp;&nbsp;<input name="donotsubmit" type="button" class="button10" value="<?= $BL['be_newsletter_button_cancel'] ?>" onClick="location.href='phpwcms.php?do=articles&p=2&s=1&id=<?= $content["aid"] ?>'"></td>
			</tr>
			<tr><td colspan="2"><img src="img/leer.gif" width="1" height="10"></td></tr>
</table></form>
remember to set:
'width' => '100%',

in cnt14.inc.php

Posted: Wed 27. Jul 2005, 22:41
by pico
HI

or better modify the Buttonbar in ..include/inc_ext/FCKeditor2/fckconfig.js

a '/' braks the Row and brings the next Buttons in the next Row

For testing always clear Cache of the Browser or you will see no changes.

I'm working on a new Version of FCK with a 'FullWindow' Function - it opens a new sizeble Window with the Editor.

Posted: Wed 27. Jul 2005, 23:08
by frold
pico wrote:HI

or better modify the Buttonbar in ..include/inc_ext/FCKeditor2/fckconfig.js
.
well but it doesnt fix that the work area a small!

Posted: Thu 28. Jul 2005, 00:26
by mscwd
frold wrote:This is my articlecontent_edit....

Code: Select all

<snip>
remember to set:
'width' => '100%',

in cnt14.inc.php
I tried this but it didn't change the position or width of the editor, I also emptied the cache as well so again, that isn't the problem. I have managed to rearrange the buttons though, so i'm getting somewhere at least. :wink:

Posted: Thu 28. Jul 2005, 00:31
by mscwd
frold wrote:I would like the same, so last night I looked at it :D

You need to edit include/inc_temp/articlecontent.edit.tmpl.php

and make the width = 100% for:
<?php
//Anzeigen der passenden benötigten Formularfelder
//abhängig vom gewählten Content Typ
if(file_exists("include/inc_tmpl/content/cnt".$content["type"].".inc.php")) {
include_once("include/inc_tmpl/content/cnt".$content["type"].".inc.php");
} else {
include_once("include/inc_tmpl/content/cnt0.inc.php");
}

?>
and then you need to change phpwcms.php so its not fixed in size...
I think this is where I get confused. What does that code mean and what do I change in phpwcms.php?

Posted: Thu 28. Jul 2005, 02:00
by frold
mscwd wrote:
frold wrote:I would like the same, so last night I looked at it :D

You need to edit include/inc_temp/articlecontent.edit.tmpl.php

and make the width = 100% for:
<?php
//Anzeigen der passenden benötigten Formularfelder
//abhängig vom gewählten Content Typ
if(file_exists("include/inc_tmpl/content/cnt".$content["type"].".inc.php")) {
include_once("include/inc_tmpl/content/cnt".$content["type"].".inc.php");
} else {
include_once("include/inc_tmpl/content/cnt0.inc.php");
}

?>
and then you need to change phpwcms.php so its not fixed in size...
I think this is where I get confused. What does that code mean and what do I change in phpwcms.php?
just use my pasted articlescontent....

Posted: Thu 28. Jul 2005, 14:28
by mscwd
I did and nothing changed...

Posted: Thu 28. Jul 2005, 16:20
by frold
mscwd wrote:I did and nothing changed...
okay - then I cant help - I have totally modified my phpwcms - so I can not say what files you else have to edit - I have edited in them all!

Posted: Thu 28. Jul 2005, 16:52
by mscwd
Oh okay, thanks for your help anyway. I'll give it a go myself but the pages in dreamweaver look nothing like they do in your browser. :wink:

Posted: Sat 30. Jul 2005, 12:09
by jsw_nz
pico said:
I'm working on a new Version of FCK with a 'FullWindow' Function - it opens a new sizeble Window with the Editor.
looking forward to this. :D

My workaround atm is to eliminate one of the drop downs so that in summary everything fits:
Note: Only 3 drop downs Style, Fontname, Fontsize
This is because in summary section the toolbar gets truncated if there are 4
Also removed the 'save' (first line) since it creates a bug when working inside wcms:
http://www.phpwcms.de/forum/viewtopic.php?t=7685

cheers :D

Posted: Sat 30. Jul 2005, 12:58
by pico
Hi

for all who can't wait :wink:

here the Beta of my modified FCKeditor -

http://hdk-online.de/phpwcms_filestorag ... r2beta.zip

# unzip it
# rename your old Path ../include/inc_ext/FCKeditor2 to ../include/inc_ext/FCKeditor2old
# upload the new one to your Server to ../include/inc_ext/FCKeditor2

it included the 'FullWindow' Plugin - first Button on top Row
also a ImageManager - third Row second Button - this shows the Images in your $phpwcms["file_path"] -directly - without any restrictions of Owner/Permissions (I'm still working on that) and don't use the build in Image-Editor, it works but the modified Image is not tranfered to the phpWCMS Filemanager (maybe I can implement this in a later Release) !!!
For uploading Images use the phpWCMS Filemanager. Pay attention to the two Buttons for inserting a absoluteURL or a relativeURL for the Images.

For including Images to phpWCMS use only this ImageManager !

The 'normal FCK-Imagemanger (first Button in third Row) goes it's own way and everything you do here will only avaible in the FCKeditor - not in any Contentpart like 'Text with Image'

hope this works for you :lol:

Posted: Sun 31. Jul 2005, 00:33
by jsw_nz

Code: Select all

without any restrictions of Owner/Permissions (I'm still working on that)
Hi Pico,
so you are saying this issue still exists...
I had no luck on nix server using $phpwcms["file_path"]
images listed but would not display....

Thanks again for your work on this.
john