Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Geek Culture / Giving someone the ability to update their website

Author
Message
Wehtam_
User Deleted
Posted: 28th Jan 2011 08:04
My client is really pleased with the website I recently created for them, the breif was a static HTML site. Now I am being asked to provide means to allow her to edit the text of the website.

I know this can be achieved with PHP, but I wondered if there is a simpler method out there, maybe even having the content in a .txt file she can alter and reupload?

I was under the impression that, unlike a server side language, if I edit an HTML file and reupload with the same name, the content might not appear as the users browser has already cached the previous version ?

Any help would be greatly appreciated!

Gencheff
14
Years of Service
User Offline
Joined: 12th Jun 2010
Location: UK by way of USSR
Posted: 28th Jan 2011 14:13
In general there shouldn't be a problem with the caching.

I know a few ways to edit a file with javascript,however it's not a good idea.

I'd say if you don't want to go with a MySQL system or something more complicated of this sort,you could try the external file content idea and add a rule in .htaccess to disable direct viewing of the files.

When using PHP's require,include,require_once,include_once,file_get_contents,etc. functions , you can call the information of the external file,in each page respectively.

The simplest way to edit the file is on the person's computer with notepad or another equivalent program,however I suggest a simple PHP script which takes information from a form and writes into the file.

There's a very neat little package called TinyMCE WYSIWYG editor,which is literally "What you see is what you get" .

Link to it - http://tinymce.moxiecode.com/

You could attach the script to a textarea and make the editing a lot more user friendly as well as functional.

Well , enough crap , the basic idea is this:

1.In the index use a switch() (or a bunch of IFs,whatever works for you) function and via different $_GET[]'s open the different files



Keep in mind that this is a quick idea,so I might be off on a few ;'s.

2.Have a simple page where only your client can access via password and make a script which lists all pages as links and use a $_GET[] to gather the filename of the selected file .Then when that's done use a simple textarea and the tinyMCE javascript library and give it the content of the loaded file (so the client doesn't have to write everything again)
, and if the field is not empty and the submit button is clicked,then the PHP file writing function is initialized.

Or something like that...I think I went a bit too far,but I hope this is of any help to you


PC Specs:Windows 7 Ultimate 64-bit,Intel Core i7 960 @ 3.20GHz,NVIDIA GeForce GTX 480,12GB RAM,2x Western Digital 997GB HDD
mr_d
DBPro Tool Maker
18
Years of Service
User Offline
Joined: 26th Mar 2007
Location: Somewhere In Australia
Posted: 28th Jan 2011 14:59 Edited at: 28th Jan 2011 15:49
@Wehtam_
if you have the time, knowledge, experience, etc, etc, then tinymce would be a good option (as well as any of the other popular "web editors" out there).
however if you are looking for a quick premade solution, check out SimpleCMS by phpjabbers.
It's simple, quick and should have all the functionality that your client is requiring (for now anyway).
It may be a little on the expensive side, but you get to choose another of their products for free.
If you are creating many such web sites for clients I suggest you look at getting their "Developer" version as it has a much better license agreement - it is a bit even more expensive than their "User" version.

(\___/)
(='.'=) Copy bunny into your signature to
("_(" help him gain world domination.
Wehtam_
User Deleted
Posted: 29th Jan 2011 10:33 Edited at: 29th Jan 2011 10:33
Guys, thank you both so much!
I have to admit, TinyMCE looks right up my street and I'll definately be giving it a go.

Thanks again!

Login to post a reply

Server time is: 2025-05-22 11:51:30
Your offset time is: 2025-05-22 11:51:30