Results 1 to 8 of 8

Thread: Capability for other people to be able to edit your website

  1. #1
    Join Date
    Mar 2008
    Location
    West Salem, WI
    Posts
    22
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Default Capability for other people to be able to edit your website

    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?

  2. #2
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    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.
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  3. #3
    Join Date
    Mar 2008
    Location
    West Salem, WI
    Posts
    22
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Default

    Thanks do you know where I would be able to find one. I dont need a large scale one just for a small bussiness

  4. #4
    Join Date
    Sep 2006
    Location
    St. George, UT
    Posts
    2,769
    Thanks
    3
    Thanked 157 Times in 155 Posts

    Default

    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.
    "Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music." - Kristian Wilson, Nintendo, Inc, 1989
    TheUnlimitedHost | The Testing Site | Southern Utah Web Hosting and Design

  5. #5
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    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.
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  6. #6
    Join Date
    Mar 2008
    Location
    West Salem, WI
    Posts
    22
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Default

    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.

  7. #7
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    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 Code:
    <?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.
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  8. #8
    Join Date
    Mar 2008
    Location
    West Salem, WI
    Posts
    22
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Default

    But i need to be password protected. Is that possible?

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •