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

AI Thread Summary
The discussion revolves around enabling users of the website pesterlog.tk to modify their own pages through a login system. The original poster, AlfieD, seeks guidance on implementing this feature, specifically how to save changes server-side rather than locally. Responses suggest that creating such functionality is relatively straightforward, recommending PHP as a suitable programming language. Users are encouraged to explore open-source content management systems (CMS) for inspiration and to learn about file storage and management. AlfieD reports progress by modifying a basic template to display user posts via an iframe. Further questions arise regarding allowing users to delete their posts, with suggestions to manage file removal and database updates. The conversation touches on the need for deeper understanding of HTML and PHP, with a reminder that numerous online tutorials are available for self-learning. The mention of using the F12 key refers to the browser's 'inspect element' feature, which allows for temporary code changes on the client side, clarifying a misunderstanding about its functionality.
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
 
Technology 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.
 
  • #10
Just press F12 on a Langauge Lab computer.
 
  • #11
Apollo19 said:
Just press F12 on a Langauge Lab computer.

Huh?
 
  • #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.
 
Back
Top