On Tue, May 23, 2000 at 09:42:53AM -0600, Pat Dupuis wrote:
> 
> Greetings all:
> 
> In my implentation of FreeTrade, I am attempting to add an extra feature which would 
>allow the customer to customize a few of the basic templates and screens through 
>online forms.  For all intents and purposes, we could call it an Online File Editor.  
>My approach is to add an extra form to the Admin Menu with a selection box which 
>allows them to choose the file they wish to edit (page_top, page_bottom, help, 
>welcome).  Once the file selection is submitted, I planned to use fopen and fgets to 
>retrieve lines from the existing file and use a while loop to display all contents in 
>a textarea box.  The customer would then be able to make changes to said file and 
>resubmit.  I would then use fputs to rewrite the file.  
> 
> My questions are as follows:
> 
> 1.  Is my approach sound?
> 2.  I was thinking this could be acomplished with a couple of extra screens 
>containing the file editing routines, without the use of an action file (seeing as 
>most of the action files seem to be used for MySQL queries, updates, and such).  If 
>my assessment is correct, can I create the file selection form using the "StartForm" 
>function using only "screen", "post" and "name" values?  Or, is an action file 
>necessary?
> 
> Any help or insight anyone could offer in this matter would be greatly appreciated.  
>Thanks in advance!
> 
> Regards,
> 
> Pat Dupuis
My boss has a standalone cgi (perl) script which basically does this, i believe he's
playing w/ it and freetrade right now.  One of the nicer features of it is to
allow you to define which portions of the screen the user can edit.. thus, you
define the php stuff as being off limits, and let the user edit the html 
portion of it.  If you're going to add this customization feature to freetrade,
i suggest making some type of comment that's parsed by the script that tells
it that the following section is off limits.. otherwise you end up w/ confused
end-users and non-functioning stores ;)  

Of course, the ideal template/screen editor would allow a person to make changes
without ever having to edit html directly..

-- 
Andres Salomon <[EMAIL PROTECTED]>


------------------------------------------------------------
To subscribe:    [EMAIL PROTECTED]
To unsubscribe:  [EMAIL PROTECTED]
Site:            http://www.working-dogs.com/freetrade/
Problems?:       [EMAIL PROTECTED]

Reply via email to