Jump to content

PHP Blogging


jackmcnally

Recommended Posts

Hi Guys,

 

I've been looking for a clone script for this, but can't seem to find one, so I'll more than likely need to code it (unless you know of a clone). Basically, what I want to do is to have a tumblr like clone, where a user signs up, chooses a username, password and blog address (a subdomain of the root, or in a different folder (eg. www.gdfgdfg.com/blognamehere or www.blognamehere.gfdgdgdgg.com)), and then they are able to blog from a user panel (the software will be auto-installed to the sub-domain upon account creation).

 

Thanks,

Jack

Link to comment
https://forums.phpfreaks.com/topic/250971-php-blogging/
Share on other sites

Well, you don't need to "automatically install" any software, one copy of the code should suffice

 

basically what you're gonna want is a "catch all" subdomain set up

 

once you have a catch all sub domain set up, then you will want to write up some htaccess to point non 'www' and any other sub domains you want to reserve E.G. 'developer', and point those to yoursite.com/<thesubdomain>

 

and then under that you'll want to point yoursite.com/<thesubdomain> to a url like:

 

blog.php?user=<thesubdomain>

 

 

then blog.php?user=<thesubdomain> will have to connect to the users table, change it to an id, then load all the posts and stuff from that specific user, and portray it in blog.php

 

you could also expect things like so:

 

RewriteCond %{HTTP_HOST} !^www.* [NC]
RewriteCond %{HTTP_HOST} ^([^\.]+)\.yoursite\.com
RewriteRule ^(.*) /%1/$1

RewriteRule ^(.*)/(.*)/?$ blog.php?user=$1&page=$2 [L]

 

I think the above would work fine for a catch all sub domain

 

the issue here is, the blog.php file :3

 

Link to comment
https://forums.phpfreaks.com/topic/250971-php-blogging/#findComment-1287527
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.