View Full Version : Capability for other people to be able to edit your website
Drewsterritz
04-11-2008, 09:33 PM
I am looking for how to get it so that part of your website can be edited by other people. If anybody knows what I am talking about could you push me in the right direction?
djr33
04-11-2008, 09:56 PM
You will need to create an admin center, complete with login (unless you want just anyone, including spambots, to be able to change stuff), then have forms (textboxes, etc) for the information. Usually this sort of site is built around a database or you can store specific parts of your site in text files that can be edited here.
In short, you want a CMS (content management system). Depending on your needs you may be able to use a prebuilt one if you don't know much about PHP or another language with which you could write one.
Drewsterritz
04-11-2008, 10:07 PM
Thanks do you know where I would be able to find one. I dont need a large scale one just for a small bussiness
thetestingsite
04-11-2008, 10:18 PM
You could try to make your own by looking at some tutorials here:
http://www.php-mysql-tutorial.com/
or you can get a premade one (search google for "CMS"). Can't really recommend one to you off the top of my head, but perhaps someone else might.
Hope this helps.
djr33
04-11-2008, 10:26 PM
Before anyone can suggest a system, we'll need to know a few things:
1. How much of the site do you want automated? A substantial CMS system can be a lot of work to setup, but useful in the end. This is where a lot of prebuilt scripts fall. There are a few however that will just let one page of your site be edited, etc. I'm going to paste something at the bottom of this post that I wrote for someone else, using a VERY basic method, just allowing a textbox (put this on a protected admin page) will submit and be stored in a text file; that text file will then have its contents displayed on the main page of his site. (He's a designer and wanted his client to be able to change some of the text without knowing html.)
2. What will you use? MySQL and PHP? ASP and Access? Some other setup?
And there are also some scripts you can pay for if you think they might be more helpful and you have the funds.
I suggest googling and looking at the various features. It should make sense after you see some of the options.
Drewsterritz
04-12-2008, 02:17 PM
What I am looking for is something small just one or two pages to be able to edit and only a small text box on the page to be edited.
djr33
04-12-2008, 10:01 PM
Ok, in that case it will be more trouble to setup a real CMS system than it's worth. I realize I forgot to paste that code above. Here it is, and in fact it will fit what you want just fine.
<?php
//ok, put this at the top of both pages-- it'll get you the contents of the file
function getMsg() {
return file_get_contents('YOURFILENAME.msg'); //grab it, spit it out
}
//this must be included in your SAVING page, before you save the text
function saveMsg($msg) { //write $msg to the file
if (strlen($msg)>60) {
$msg = substr($msg,0,60); //cut to 60 long
}
$f = fopen('YOURFILENAME.msg','w+'); //open the file up for use
fwrite($f,$msg); //save it to the file
fclose($f); //done, close that file, free resources
}
//this checks if there is something to add, and then adds it if so
if (isset($_POST['MYFIELDNAME'])) { //the form was sent
$saveMsg($_POST['MYFIELDNAME']); //ok, save msg
}
//show the message
echo getMsg(); //that's it, to get the message and print it to the html
?>
Note that each section must be placed on the correct page and in the right place.
Drewsterritz
04-23-2008, 11:17 PM
But i need to be password protected. Is that possible?
Powered by vBulletin® Version 4.2.2 Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.