Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Allowing Users to Change the Code of a Website (a Post-Like Format)

  1. Feb 1, 2014 #1
    Hi,

    So what I'm trying to do is enable visitors to the site pesterlog.tk, provided they have the correct login details, to change the code on the site. So say there was a page pesterlog.tk/user1, if user1 visited the page, (s)he could just enter the login details and change the code on his/her page, and it would save to the server side, not just user1's computer.

    I can provide additional information/clarification if needed.

    Thanks in advance,
    your help would be greatly appreciated,
    AlfieD
     
  2. jcsd
  3. Feb 1, 2014 #2

    Borek

    User Avatar

    Staff: Mentor

  4. Feb 2, 2014 #3
    Thanks for the link but this only describes the existence of what I need. Do you know any websites for the code I'm talking about, or maybe you know yourself?
     
  5. Feb 2, 2014 #4

    Borek

    User Avatar

    Staff: Mentor

    Once you know what to look for you should be able to find such systems and analyze them by yourself, don't ask us to do your work.

    For example, try googling for "open source CMS".

    In general doing what you suggest is rather trivial, it can be easily coded in almost any language - I would probably start in php. You will need to learn a little bit about where the files that are served are stored and how to save the file to the disk, but its a programming 101.
     
  6. Feb 2, 2014 #5

    Thanks, done that. I found some basic template of how it works and I modified it so that it know works. As per your suggestion, I used two PHP files and showed the users post as an iframe of the post they sent to be put on the website. I probably didn't explain that very well but just know that it know works.

    However, moving on, how would allow a user to delete his/her post?
     
  7. Feb 2, 2014 #6

    Borek

    User Avatar

    Staff: Mentor

    Remove the file from the disk? Remove the information about file form the database? Zillions of possible approaches.
     
  8. Feb 2, 2014 #7
    Just simply removing it from the website. And also, with multiple posts, I can't get them to line break after themselves.
     
  9. Feb 2, 2014 #8

    Borek

    User Avatar

    Staff: Mentor

    Sorry, you have to dig deeper. There are plenty of possibilities, and you are asking for a lecture on HTML, PHP and whatnot. Plenty of tutorials on the web. I told where you to start, now you are no your own.
     
  10. Feb 2, 2014 #9
    Haha, ok, that's fine. Thanks anyway.
     
  11. Feb 9, 2014 #10
    Just press F12 on a Language Lab computer.
     
  12. Feb 9, 2014 #11

    Borek

    User Avatar

    Staff: Mentor

    Huh?
     
  13. Feb 9, 2014 #12
    I think (s)he's referring to the 'inspect element' function where you can change code on your computer only. I believe f12 only works on Chrome.
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook




Similar Discussions: Allowing Users to Change the Code of a Website (a Post-Like Format)
Loading...