Fog Creek Software
Discussion Board




Knowledge Base
Documentation
Terry's Tips
Darren's Tips

citydesk and PHP/MySQL

Hi

I have a existing site that I would like to start using CityDesk top manage. The site uses some PHP and MySQL. For eksample there are some include files. Can citydesk show the included file like dreamweaver can? How wll does citydesk support php?

Martin Schultz
Friday, November 28, 2003

Hey Martin,

You're asking two different questions here:

1) CD and PHP --  CityDesk should be able to work alongside any coding architecture. I've used it with sites that needed ASP-based functionality without any difficulty. CD will only affect the cms field code that you place  on the templates, and since it performs its replace actions *before* your file is uploaded to the server, all server-side code remains  intact.

The one accommodation that you need to make is in previewing. You can't use the default Preview in CD for a site that uses server-side code, since it won't process in the temp folder on your box. For ASP sites, I create a Publish location to my Inetpub root folder, which acts like a server. I'm not sure what the equivalent location would be for a PHP site, but the approach is the same: Publish to a directory that will act like a server and process your page.

Also, you can't use the Preview browser address, which goes directly to the file on your computer. I have to lauunch a browser and access "localhost" to properly view my files in a server environment.

2) CD and DreamWeaver -- CD is not a WYSIWYG text-editing program like DreamWeaver, so you can't really compare the two.  But CD does allow you to edit your templates in the program of choice (I use Homesite), so again, there shouldn't be any conflict.

As for includes, you can use them in a traditional fashion, or develop the CityDesk equivalent. I prefer the CD approach to includes, especially for small sites, because it frees me from having to worry about file extensions (like .shtml) that will process the include. And there's probably at least a small gain in processing time by not asking the server to perform than function.

Carmen Carter
Friday, November 28, 2003

If you include PHP code in an article, you may get trouble, because CD still isn't XHTML compliant. The problem is that it erroneously tries to parse the text inside the CDATA Marked Section construct that XHTML uses to delineate non-XHTML text, and sometimes mangles it.

Fogcreek are aware of this bug, but haven't fixed it yet.

Marked Section handling is broken in most browsers too, but they never see the PHP so it usually doesn't matter.

Michael Wild
Monday, December 01, 2003

*  Recent Topics

*  Fog Creek Home