logo-dw

Go Back   Dreamweaver Club Forums > Hand Coders Forum > PHP
Register FAQ Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Display Modes
Old 04-21-2009, 09:19 AM   #1
slec75
 
Join Date: Apr 2009
Posts: 2
Default Newsletter tutorial using Dreamweaver

Hi,

I try to make my own newsletter's application with the help of this tutorial :
http://dreamgratuit.canalblog.com/ar...1/9025822.html

I use the Google Translator to get the english version of these pages. But sometimes, the translation is really bizare. I have to instal and set up FCK Editor

Everything runs perfectly at localhost but doesn't work properly for the distant host...
slec75 is offline   Reply With Quote
Old 04-21-2009, 09:28 AM   #2
edbr
edbr's Avatar
 
Join Date: Aug 2005
Location: Bali
Posts: 11,202
Default

go to fck site and check their instructions
__________________
If you're happy and you know it shake your meds!
different style links examples

Flight / Hotel search
Free script download
Bali Villas
edbr is offline   Reply With Quote
Old 04-21-2009, 09:11 PM   #3
student101
 
Join Date: Dec 2007
Posts: 379
Thumbs up

Quote:
Originally Posted by slec75 View Post
Everything runs perfectly at localhost but doesn't work properly for the distant host...
I have setup some tuts on FCKeditor's forum... Here is a guide for you so long:
Quote:
In order to have FCKeditor work with certain not up to date or clued up hosts;
You may need to have this setup:
* register_long_arrays - not required
* register_globals - not required
* disabled safe_mode - odd but required
* magic quotes - not required
There may be a patch for safe_mode to stay enabled and FCKeditor run along side it - really not sure
How to get this thing to work??? [edit.. PHP Method below edit]
Quote:
<?php include_once("../FCKeditor/fckeditor.php") ; ?>

// Please note the spelling of FCKeditor
In BETWEEN the <head tags> (normally above </head>)add this;
<script type="text/javascript" src="../FCKeditor/fckeditor.js"></script>
<script type="text/javascript">
window.onload = function()
{
var oFCKeditor = new FCKeditor( 'data' ) ; //The textareas name
oFCKeditor.BasePath = "../FCKeditor/" ;
oFCKeditor.Height = "400" ;
oFCKeditor.Width = "100%" ;
oFCKeditor.ToolbarSet = 'Default' ; //The toolbar you want to use
oFCKeditor.ReplaceTextarea() ;
}
</script>

Now with these ADDitions you should now have a workin copy of FCKeditor in Dreamweaver (ASP, PHP, Whatever you use, etc...)
How to go about getting the correct paths?
(/FCKeditor/editor/filemanager/connectors/<yourversion>/config.php)
Quote:
$Config['UserFilesPath'] = 'uploads/' ; //uploads directory
Examples: 'C:\\MySite\\userfiles\\' or '/root/mysite/userfiles/'.

$Config['UserFilesAbsolutePath'] = '/var/www/vhosts/example.com/webfiles/uploads/' ;

When an image is inserted into the editor it is a virtual path "/path/image.gif".
How to get the full path "http://www.example.com/path/image.gif"?
Quote:
* open "editor/filemanager/browser/default/frmresourceslist.html"
* edit the line below "oListManager.GetFileRowHtml = function( fileName, fileUrl, fileSize )" which should be around line 65
* from: var sLink = '<a href="#" onclick="OpenFile(\'' + ProtectPath( fileUrl ) + '\');return false;">' ;
to: var sLink = '<a href="#" onclick="OpenFile(\'http://www.example.com' + fileUrl + '\');return false;">' ;

Now it will insert the full path to your image in the editor window.
(note: you have to close your browser and reopen to take effect)
You may be able to use this method below instead of above... // I have not tested this method, my above methods work fine.
Quote:
$Config['UserFilesPath'] = 'http://'.$_SERVER['HTTP_HOST'].'/FCKeditor/uploadfiles/' ;
$Config['UserFilesAbsolutePath'] = $_SERVER['DOCUMENT_ROOT'].'/FCKeditor/uploadfiles/' ;
I hope that covers most of the beginner Q & A's
Cheers
__________________
Amateurs ... Built the ark.
Professionals ... Built the Titanic.
specificity [sound like spe-sifis-ity]
student101 is offline   Reply With Quote
Old 04-22-2009, 08:34 AM   #4
slec75
 
Join Date: Apr 2009
Posts: 2
Default

Thanks for help.
I solve this problem : i used a wrong path because Apache servers are sensitive to capitals...
slec75 is offline   Reply With Quote
Old 04-22-2009, 08:50 AM   #5
student101
 
Join Date: Dec 2007
Posts: 379
Default

Quote:
Originally Posted by slec75 View Post
Thanks for help.
I solve this problem : i used a wrong path because Apache servers are sensitive to capitals...
After I saw that editor, I was baffled for some time with the paths and so on...
Quote:
Glad you got it sorted, just remember to safe gaurd that config.php file with a username/password system.
__________________
Amateurs ... Built the ark.
Professionals ... Built the Titanic.
specificity [sound like spe-sifis-ity]
student101 is offline   Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 07:46 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2018, vBulletin Solutions, Inc.
Copyright 2006 DreamweaverClub.com