Ok first off, sorry if this is the wrong forum...

I want to learn how to create a community based site - preferably completely from scratch.

I want to do this, because I find it quite hard to look at existing code and understand the ins and outs of it.

I am aware of packages like mambo, phpnuke and xoops, in fact I think very highly of xoops, but I want to know how to create something along them sort of lines from scratch.

can anyone point me in a good direction?

Ultimately I want a site that has a forum, PM facility, maybe a gallery, news feature, and the ability to create HTML articles.

To be honest the content at this point does not matter to me, I will make my content choices later - I believe very strongly that a good design can be modified to fit any content.

Can anyone point me in the direction of some good 'how-to' (s) etc.

thanks

SE

Dani AI

Generated

A compact, practical roadmap that builds on what and started: break the project into small, testable modules (accounts/auth, content storage/editing, media handling, interaction/messaging, and admin tools). Implement a minimal core first — a reliable user model and content engine — then add interaction features. This keeps scope manageable while teaching the key patterns behind larger community systems.

Focus on secure, maintainable server-side fundamentals early. Use prepared statements and modern password hashing, keep DB logic separate from presentation, and avoid embedding raw HTML without sanitizing. A tiny, idiomatic PHP example for registration and safe password storage:

$pdo = new PDO('mysql:host=127.0.0.1;dbname=site;charset=utf8mb4', $dbUser, $dbPass, [
  PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION
]);

$hash = password_hash($plainPassword, PASSWORD_DEFAULT);

$stmt = $pdo->prepare('INSERT INTO users (username,email,password_hash) VALUES (?,?,?)');
$stmt->execute([$username, $email, $hash]);

A minimal users table to start with:

CREATE TABLE users (
  id INT AUTO_INCREMENT PRIMARY KEY,
  username VARCHAR(50) UNIQUE NOT NULL,
  email VARCHAR(255) UNIQUE NOT NULL,
  password_hash VARCHAR(255) NOT NULL,
  role ENUM('member','mod','admin') DEFAULT 'member',
  created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB;

Important cautions and practical notes: enforce HTTPS, use CSRF tokens for forms, escape output to prevent XSS, validate and restrict file uploads (check mime type, store outside webroot, generate thumbnails), log important actions, and back up the database. Start development locally with version control and automated testing for core flows (registration, login, posting). Iteratively refactor into modules or a simple MVC structure; only consider a full framework once patterns are clear. This approach yields steady learning while producing a solid, extensible community site.

Recommended Answers

All 2 Replies

what programming languages do you know? Are you good with database stuff?

Ok, just to add something, looking around, I think I am going to be happy to use a free forum, as most of them are pretty outstanding, so I guess I want to just build a CMS from scratch if possible...

I have a feeling this will be a lot of work, but, to be honest I think I am ok with that...

Programming languages.

Had to use a few, but nothing too serious, databases don't bother me at all.
I would prefer to use php.

I'm not too bothered about undertaking the project or parts of it using CGI, definately DONT want to go any where near ASP - personal preference

SE

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.