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

Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
11 replies · 3K views
AlfieD
Messages
68
Reaction score
0
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
 
Physics news on Phys.org
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?
 
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.
 
Borek said:
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.
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?
 
Remove the file from the disk? Remove the information about file form the database? Zillions of possible approaches.
 
Just simply removing it from the website. And also, with multiple posts, I can't get them to line break after themselves.
 
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.
 
Haha, ok, that's fine. Thanks anyway.
 
Just press F12 on a language Lab computer.
 
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.