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

In summary: There's a whole bunch of possibilities. For example, you could try using a code editor like Sublime Text and see if you can save the file to the server side. Just search for "codesite save" on the internet.There are plenty of possibilities. For example, you could try using a code editor like Sublime Text and see if you can save the file to the server side. Just search for "codesite save" on the internet.
  • #1
AlfieD
68
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
  • #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?
 
  • #4
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.
 
  • #5
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?
 
  • #6
Remove the file from the disk? Remove the information about file form the database? Zillions of possible approaches.
 
  • #7
Just simply removing it from the website. And also, with multiple posts, I can't get them to line break after themselves.
 
  • #8
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.
 
  • #9
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.
 

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

What is allowing users to change the code of a website?

Allowing users to change the code of a website refers to a website feature that allows users to modify the underlying code of a webpage, usually in a post-like format. This means that users can add, edit, or delete elements of a webpage, such as text, images, and design, to customize their experience on the website.

Why would a website allow users to change the code?

A website may allow users to change the code for various reasons, such as to provide a more personalized experience, encourage user engagement and creativity, and allow for user-generated content. This feature can also be useful for developers and designers to test and improve their coding skills.

Is it safe to allow users to change the code of a website?

While allowing users to change the code of a website can be a fun and interactive feature, it can also pose security risks. Users with malicious intent can exploit this feature to inject harmful code or access sensitive information. Therefore, it is crucial for website owners to implement proper security measures, such as user verification and code review, to ensure the safety of their website and its users.

What are the potential drawbacks of allowing users to change the code of a website?

One potential drawback of allowing users to change the code of a website is the risk of breaking the website's functionality. If a user makes a mistake or intentionally changes the code, it can result in errors and malfunctions on the website. This can lead to a negative user experience and affect the overall functionality of the website.

How can website owners manage and monitor user-generated code changes?

To manage and monitor user-generated code changes, website owners can implement various measures, such as providing guidelines for code modifications, setting limits on the types of changes that can be made, and regularly reviewing and approving user-generated code before it goes live on the website. Additionally, having a dedicated team to monitor and address any issues that may arise can also help maintain the safety and functionality of the website.

Similar threads

  • Programming and Computer Science
Replies
15
Views
1K
  • Programming and Computer Science
Replies
4
Views
410
  • Programming and Computer Science
Replies
5
Views
3K
  • Computing and Technology
Replies
5
Views
4K
  • Programming and Computer Science
Replies
6
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
3
Views
304
  • Engineering and Comp Sci Homework Help
Replies
5
Views
2K
  • General Math
Replies
3
Views
5K
Replies
1
Views
851
  • Feedback and Announcements
Replies
21
Views
2K
Back
Top