Client wants to update portion of the site themselves ... Easiest solution?

dalearyous

[H]ard|Gawd
Joined
Jun 21, 2008
Messages
1,922
I built a website for a client and now they want to be able to edit just a small port of the site (text in 1 page, all inside a <div> actually) and i was wondering what the most simple solution is?

The client is decent with computer stuff so I could implement something as simple as them typing up a text file and FTP'ing it into the directory and I guess I would write a javascript or php file to read that text and place it in the html file? I dunno ... help me out :)
 
If you're that comfortable, why not roll your own edit page for that one content location? It wouldn't take much to put a couple textboxes or input controls on an admin page, and have it save to wherever you decide. Then just poll that data source on page load. You could even add RTE features with something like FCK Editor.
 
Frontpage? Get them a copy of the page they want to edit and let them edit and add stuff with Frontpage and have them send it back to you? Then upload?
 
i don't want to be in the loop at all unless something goes wrong, i like PTNL solution i think if he could explain that a bit more
 
anyone have a guide or a link to get me started? my googling hasn't yielded much helpful info
 
Is the entire site static? Is anything being pulled from a database?

What language was used to build the site? Straight html? Asp.net? Php?
 
yes the entire site is static ... no dbase at all. its all written with HTML and css thats it
 
How is the website set up? FTP server upload after you have the page set up? If it is, wouldn't it be easier just to have them copy and paste their edited page up to the FTP?
 
they aren't savvy enough to do that ... its got to be simple. showing them how to FTP is one thing, giving them the entire file to edit and re-upload sounds like a disaster.

isn't there a decent PHP solution i could read up on and build out in half a day?
 
The client is decent with computer stuff so I could implement something as simple as them typing up a text file and FTP'ing it into the directory and I guess I would write a javascript or php file to read that text and place it in the html file?
Couldn't you accomplish the same thing with a server side include?
 
Simplest solution:

The file your client modifies and uploads (for example lets call it client.php).
Code:
<?php

$string = "Change this text here";


?>

Your actual html file, now renamed as html.php

Code:
blah blah your html
<div> <?php include("client.php"); echo $string; ?> </div>
blah blah more html

This is the most simple way I can think of doing it, and not the way I would do it (admin page sounds good).
 
Simplest solution:

The file your client modifies and uploads (for example lets call it client.php).
Code:
<?php

$string = "Change this text here";


?>

Your actual html file, now renamed as html.php

Code:
blah blah your html
<div> <?php include("client.php"); echo $string; ?> </div>
blah blah more html

This is the most simple way I can think of doing it, and not the way I would do it (admin page sounds good).
Thanks! I think this is a good idea. =)
 
Simplest solution:

The file your client modifies and uploads (for example lets call it client.php).
Code:
<?php

$string = "Change this text here";


?>

Your actual html file, now renamed as html.php

Code:
blah blah your html
<div> <?php include("client.php"); echo $string; ?> </div>
blah blah more html

This is the most simple way I can think of doing it, and not the way I would do it (admin page sounds good).

Why not just make the file a .txt or .html file and include it? Why restrict the client to editing a variable which will likely require teaching them escaping.

Either way, it is a poor solution. If the OP does not know a server-side language (and his answers would indicate he does not), then looking for some preexisting software (wordpress for example, but probably massive overkill here) or a drop-in script (probably hundreds freely available via a google search) is the way to go.
 
they aren't savvy enough to do that ... its got to be simple. showing them how to FTP is one thing, giving them the entire file to edit and re-upload sounds like a disaster.

isn't there a decent PHP solution i could read up on and build out in half a day?

No offense, but is it really that hard to open an HTML file in MS Word, add the text you want, then File>>Save. Then upload to FTP?
 
i know some PHP and was looking more for a learning source of where to begin

i hate posters who are like well if you don't know x do y when you could just be like well if you don't know x here is a good article/site to get you started on x

unlike the mass majority, i love learning
 
How much PHP do you know?

Have you done anything with forms and PHP? If not then this is a good place to start: http://www.w3schools.com/php/php_forms.asp

Have you done anything with writing to files with PHP? If not then you might want to look at the file_put_contents() function:
http://www.w3schools.com/php/func_filesystem_file_put_contents.asp

So simplistically:
1. client puts data on a form and clicks submit.
2. data gets written to a file, perhaps the client.php file in black0ut's example.
 
No offense, but is it really that hard to open an HTML file in MS Word, add the text you want, then File>>Save. Then upload to FTP?

It's easy enough to do this. The problem is getting MS Word to output sane HTML.
 
i know some PHP and was looking more for a learning source of where to begin

i hate posters who are like well if you don't know x do y when you could just be like well if you don't know x here is a good article/site to get you started on x

unlike the mass majority, i love learning

Is this about you? Or did your client ask for this? Even if it is for the client, your PHP form will only be able to add stuff, and not remove stuff. I understand that you're trying to restrict/simply what your client does to add things to the page because of their computer knowledge, but what happens when they typo and want to change it? I still think it'd be easier for the customer if they are able to edit the page they want to change itself.

i.e.
Open in Microsft Word
<edit stuff>
File>>Save
Copy and paste to FTP folder in Windows Explorer.

It's easy enough to do this. The problem is getting MS Word to output sane HTML.

Does it really matter what the HTML code is? As long as the client can add and remove things at will.
 
Last edited:
Is this about you? Or did your client ask for this? Even if it is for the client, your PHP form will only be able to add stuff, and not remove stuff. I understand that you're trying to restrict/simply what your client does to add things to the page because of their computer knowledge, but what happens when they typo and want to change it?

You use php to load the current client content as the default data in the form. Then they can make a minor change without much of a hassle.
 
ok, can u back up and explain that a little slower hah
My suggestion was to make an admin page to handle the saving of new information. This page would be one that wasn't linked on the website, and (in the simplest of perspectives) basically had a textbox on it and a "Save" button. When the user clicks "Save", whatever contents in the textbox would be saved to some location you decide: XML, text file, database record, etc.

Then on the location where your customer wanted to be able to have the editable content show, have your PHP code poll that data source, read the contents, and inject into the server side generated markup.

You could enhance that admin textbox with something like FCK Editor, but that's the basic jist.
 
My suggestion was to make an admin page to handle the saving of new information. This page would be one that wasn't linked on the website, and (in the simplest of perspectives) basically had a textbox on it and a "Save" button. When the user clicks "Save", whatever contents in the textbox would be saved to some location you decide: XML, text file, database record, etc.

Then on the location where your customer wanted to be able to have the editable content show, have your PHP code poll that data source, read the contents, and inject into the server side generated markup.

You could enhance that admin textbox with something like FCK Editor, but that's the basic jist.

As a quick fix and getting it to the point where it works I would do this too. In fact I have this type of setup being done on a few sites that I had to rush out. Didn't bother with a wysiwyg editor though.

Just make sure your text/whatever files cannot be accessed directly in a browser. You can use redirect rules here to prevent it.
 
Does it really matter what the HTML code is? As long as the client can add and remove things at will.

Actually, it does. If you give the client full-control over HTML they can blatantly ignore page styles, resulting in a page that looks like ass. They can insert broken HTML that ruins the rendering. If you think that it's not your problem after you give them the keys, you haven't dealt with many clients...

Trust me, if they can blame you for something, they will. They'll also expect you to work for free to fix it. It's much better to have a tool that gives them just as much control as they need and no more.
 
guys guys guys.....wordpress is the answer here. Install wordpress (most hosts have an automatic installer) upload a theme for it (tons of free ones) give your client the admin login, and you're done. Wordpress is free, themes are free, and it has a page editor similar to an email app. Very user-friendly.

static-coded sites are designed for clients who don't expect to update stuff very often. When they do want an update, do it yourself, and bill them for it.

What else can they honestly expect from a static-coded site?

You don't have to give people all kinds of extra work for free. Just be like "ok you want to be able to edit pages on the site right? OK that'll take me another X hours, so it'll cost $X"

You'd be surprised how understanding people are.
 
The way I look at it though, from a billing perspective, is:
(Wordpress) $$ < (Static Site $$$ + Simple Custom CMS $$$)

So the client may be stupid for wanting more than they need and spending more to get it, but that's to the benefit of the designer/developer.
 
The way I look at it though, from a billing perspective, is:
(Wordpress) $$ < (Static Site $$$ + Simple Custom CMS $$$)



I would agree with you if you bill on hours. I only ever bill by project, and at or below the market rate generally is worth my while. That makes sense for me because CMS sites like wordpress-based ones generally take less time but I can charge more for the extra features. Win-win.

So the client may be stupid for wanting more than they need and spending more to get it, but that's to the benefit of the designer/developer.

in my experience very few clients know the difference.
 
I totally agree with the WordPress comment... I host a handful of sites and got tired of the constant "can you change this text", "can you add this", etc... These are basically charity sites that I just charge a low flat monthly fee to host, so I don't want to mess with hourly billing.

So I bit the bullet and invested a little time in converting them to WordPress or Drupal. Now I have clients who are thrilled with the new features and they are much more self sufficient.
 
Back
Top