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

Click For Summary

Discussion Overview

The discussion revolves around enabling users to change the code of a website, specifically allowing visitors to modify their own pages on the site pesterlog.tk. The conversation touches on aspects of content management systems, coding in PHP, and user interactions with web content.

Discussion Character

  • Exploratory
  • Technical explanation
  • Homework-related

Main Points Raised

  • AlfieD seeks to allow users to change the code on their specific pages and save those changes server-side.
  • One participant suggests looking into open source content management systems (CMS) as a potential solution.
  • Another participant indicates that implementing such functionality is relatively straightforward and can be done in various programming languages, particularly PHP.
  • AlfieD reports success in modifying a basic template to display user posts using iframes but seeks guidance on allowing users to delete their posts.
  • Participants discuss various methods for removing posts, including deleting files from the disk or database.
  • There is a mention of difficulties with formatting multiple posts to line break correctly.
  • Some participants express that AlfieD should seek out tutorials and resources independently for deeper understanding.
  • There is a reference to using the 'inspect element' function in web browsers as a way to change code locally.

Areas of Agreement / Disagreement

Participants do not reach a consensus on the best approach for implementing user modifications or deletions, and multiple suggestions and methods are presented without resolution.

Contextual Notes

The discussion includes assumptions about the user's programming knowledge and the specific requirements for the website's functionality, which remain unspecified. There are also unresolved technical details regarding the implementation of post deletions and formatting.

Who May Find This Useful

Individuals interested in web development, particularly those exploring user-generated content and content management systems.

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 language Lab computer.
 
  • #11
Apollo19 said:
Just press F12 on a language 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.
 

Similar threads

  • · Replies 15 ·
Replies
15
Views
3K
Replies
4
Views
3K
  • · Replies 5 ·
Replies
5
Views
4K
  • · Replies 5 ·
Replies
5
Views
4K
  • · Replies 6 ·
Replies
6
Views
2K
Replies
4
Views
1K
Replies
4
Views
11K
  • · Replies 3 ·
Replies
3
Views
6K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 5 ·
Replies
5
Views
4K