1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Can PHP do this..? Edit text on a live page

Discussion in 'PHP' started by Epica, Sep 25, 2005.

  1. #1
    Programmers - I need an idea of how difficult this is:
    (related to this thread)

    I sell small websites - little 3 to 10 page HTML sites (mostly for churches, and small groups) anyways, most don't know the first thing about HTML, but would like to edit portions of their site - mainly text like the home page welcome message.

    What are the necessary elements to accomplish this..?
    • Click a link on home page to open a password protected edit page
    • Textarea for editing existing home page text, or entering new text
    • Submit button makes the new text live on the home page
    Obviously there are elements that would make the 'magic' happen, but I haven't a clue. I've been looking for someone to point me in the right direction or even program it for me from scratch (name your reasonable price), but I guess I'm just not asking the right questions. Maybe understanding what it requires will help me understand what I need to be asking for.
     
    Epica, Sep 25, 2005 IP
  2. xio

    xio Peon

    Messages:
    39
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Do you need a script JUST to EDIT THEIR simple html pages or ContentManageSystem?
    If 1st option, control panel should do things like:
    * login
    * get all HTML files in directory
    * 'put' html source to textearea
    * edit & submit changes
    im sure that every CMS has an option to edit content on the site ;) so what dont you understand? how to code it?

    Xio
     
    xio, Sep 25, 2005 IP
  3. T0PS3O

    T0PS3O Feel Good PLC

    Messages:
    13,219
    Likes Received:
    777
    Best Answers:
    0
    Trophy Points:
    0
    #3
    If you're not familiar with coding it and they aren't familiar with editing it and you don't want to go full-blown CMS I'd do this:

    Use HTML comments to denote the area's they can change and make a manual outlining how.

    
    <!-- Begin of the welcome message (leave this) -->
    Welcome, etc. 
    <!-- End of the welcome message (leave this) -->
    
    Code (markup):
     
    T0PS3O, Sep 25, 2005 IP
  4. tresman

    tresman Well-Known Member

    Messages:
    235
    Likes Received:
    20
    Best Answers:
    0
    Trophy Points:
    138
    #4
    I know what you are looking for as I am using this solution on my daily job.

    I didn't write it (a design company did it), but I think it's not difficult for a good php programmer (my skills on this are really bad). Unfortunately I do not know any script that can do this, but the script can be done with just a server supporting php.

    If you are the one hosting the sites then it could be quite easy, and you won't need any database. Just using some php includes and learning how to pass variables from a form to a php file which will write them to a text file (or database). Then, this file will be loaded with an include from the page and fill the gaps with the text.

    The thing is to keep to the content of the pages in text files which will be editable from a form on the protected folder. However, the main site should be in php then.
     
    tresman, Sep 25, 2005 IP
  5. Stoofovski

    Stoofovski Peon

    Messages:
    41
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Hello,

    Yes php can easily do this. Store data either in database or text files. It's not difficult to make when you know what you're doing. I could make a script like this cheap. Would only take a few hours to complete.
     
    Stoofovski, Sep 26, 2005 IP