Forum Moderators: coopster

Message Too Old, No Replies

PHP & WYSIWYG reformatting problem

I need a wysiwyg my clients can use to update their site

         

benlieb

7:39 pm on Nov 2, 2004 (gmt 0)

10+ Year Member



I've been fruitlessly searching for months for a wysiwyg with the following deceptively simple criteria:

-open source (read:free)
-ftp integration
-wysiwyg that WONT ruin my php header/footer system by surrounding each page with HTML BODY and other annoying tags.

The only editor I know that doesn't add annoying/unnecessary markup to php files is Dreamweaver, but that is $$ and I don't want to charge my clients for that.

Please, any and all help is appreciated.

DaButcher

10:06 pm on Nov 2, 2004 (gmt 0)

10+ Year Member



Must it be an offline client?
Or can it be a "webpage" with some word-looking GUI and client-dependent functions like javascript?

I found one, but it's image capabilites are not good! They are fairly crap!

I thought I might recode them though, or simply make an addittion to the script.

benlieb

12:25 am on Nov 3, 2004 (gmt 0)

10+ Year Member



web-based scrips don't seem full-featured. It has seemed in the past that I would have to do a lot of scripting myself in order for them to work properly as site editors. What do you recommend?

DaButcher

7:21 pm on Nov 3, 2004 (gmt 0)

10+ Year Member



try to google for:
"FCKeditor"

they give away theire older version for free..
I think it outputs xhtml, I didnt try to connect it to a db yet, though..

limited browser support, as everything else that is easy to use.

benlieb

8:47 pm on Nov 3, 2004 (gmt 0)

10+ Year Member



THanks for the heads up.

FCKeditor reformats my php files to xhtml. Another one bites the dust.

I think this has to do with a parser/renderer that is built into internet explorer on my machine that these programs rely on. It's driving me crazy.

So far, only dreamweaver is sophisticated enough not to "trample" the code that already exists by forcing it to conform to a filetype that it is not.

DaButcher

10:33 pm on Nov 3, 2004 (gmt 0)

10+ Year Member



Do you use WYSIWYG editor for your php code?

I write all my php code in notepad/textpad or simply in the php client I use, while uploading files. (edit function)..

coloring of the syntax might be nice, but I'm used to see it all in b/w by now, so I dont really need it.

benlieb

11:52 pm on Nov 3, 2004 (gmt 0)

10+ Year Member



No, I almost never use a WYSIWYG myself. I'm a freelance designer. However the issue of clients wanting to edit their sites personally has become increasingly problematic. I currently have 3 clients who want to be able to change "John Doe" to "Jeff Doe" or similar small edits. They understandably don't want to pay me my hourly wage to do this for them.

So I'm trying to find an open source solution. The problem is that my sights follow this form:

<?php include "top.php";?>

PAGE SPECIFIC HTML & PHP HERE

<?php include "bottom.php";?>

The includes include all the necessary html doctype and meta tags etc. But every wysiwyg (except dreamweaver) turns to above into ths:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<?php include "top.php";?><HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=unicode">
<META content="MSHTML 6.00.2800.1400" name=GENERATOR></HEAD>
<BODY>PAGE SPECIFIC HTML &amp; PHP HERE
<?php include "bottom.php";?></BODY></HTML>

Screwing the whole thing up obviously. I've been looking constantly (read:4 hrs a day) for 3 weeks now. No luck. Except possibly this: [digi.ws...]

Someone help!

DaButcher

8:27 am on Nov 4, 2004 (gmt 0)

10+ Year Member



Did you try wrapping the php code in a html comment?

eg:


<--!#<?php include("header.php");?>-->

I know this solves some issues for javascript, where the client does not support it.

benlieb

6:47 pm on Nov 4, 2004 (gmt 0)

10+ Year Member



wouldn't this comment out whatever that php code prints?

bcolflesh

6:50 pm on Nov 4, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Check out HTML-Kit:

[chami.com...]

benlieb

7:16 pm on Nov 4, 2004 (gmt 0)

10+ Year Member



html kit also adds doctype html head title and body tags automatically.

bcolflesh

7:21 pm on Nov 4, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Edit > Preferences > Startup

Mr_PHP

7:56 pm on Nov 4, 2004 (gmt 0)

10+ Year Member



Yep, HTMLkit is an excellent option for offline editing!

If you prefer online editing, you can make a simple online CMS with htmlArea, [htmlarea.com...]
If you do, use the 3.0 rc-1 version, which is XHTML compliant, the other versions mess up your html code.
Demo, with image editor (found on that site, free): [zhuo.org...]

I have built a simple but very nice CMS for a few of my clients, so they can manage their site easily (that is edit existing pages), which saves them time and money, and me time.
Besides I lease the system to them at a yearly rate.. ;)

Arno

DaButcher

8:27 pm on Nov 4, 2004 (gmt 0)

10+ Year Member



benlieb: yes, it will comment it away, unless you make the php parse "-->" before what it is to show to the user, and then <--!# after it has done what it is to parse.

eg:


<--!#
<?php
echo "-->";
require("page_top.php");
echo "<--!#";
?>
-->

check if the wysiwyg editor will move that around in your document..

benlieb

8:33 pm on Nov 4, 2004 (gmt 0)

10+ Year Member



bcolflesh: I hadn't noticed the option you recommend, but the startup option only works for new docs. What I need is a wysiwyg (actions > tools > prototype pad) that won't add the html junk to the php file.

Only then can my clients modify a file, and then upload it and have the php still work.

Mr_PHP: I finally settled on an in-browser solution: tiny mce. I wrote the authentication scripts, as well as the save script etc. Still only a temp solution as the client would have difficulty making new files, deleting, duplicating, etc.

Mr_PHP

8:29 pm on Nov 7, 2004 (gmt 0)

10+ Year Member



Yes, adding & deleting files and so on can be done with more server-side scripting, but that takes the CMS to a whole new level.
Making a more advanced CMS takes a lot of time. The site navigation will have to be modified as well, and constructed from the database data every time... and maybe a possibility to upload images, etc.. it makes things much more complex than simple editing.

Many websites don't need this, and they can ask you to add or delete a page (so you can earn some easy money now and then!), but if you have many clients who like to be able to fully manage their site you could indeed build your own complete CMS, and maybe even market it and sell it worldwide.

There's so many freeware CMS systems already tho, so you could also try out some of the many freeware systems (preferably one with SEO'd pages).

benlieb

4:02 am on Nov 8, 2004 (gmt 0)

10+ Year Member



what's SEO?

Mr_PHP

4:22 am on Nov 8, 2004 (gmt 0)

10+ Year Member



SEO = Search Engine Optimization

More info: [google.com...]