[DEV] tBlogger - PHP Blogging script by Anon.

Status
Not open for further replies.

RyanMK

Still alive
May 27, 2010
802
117
1320690434274442500488.png

What is tBlogger?

tBlogger is a new blogging script coded in PHP by Anon. It was originally named Tiny Blogger System (TBS) when it was previously developed back in August '11. But that's all gone and I'm starting on a clean slate, tBlogger will consist of many user friendly features with an intuitive administration panel.

Who is on the Project?

As of now, it's just me working on tBlogger, but that doesn't mean you can't help out! Drop me a if you're interested in taking part. I'd also like to give some credits to for helping me with a problem I came across in TBS which the solution to will be used in tBlogger.

So, what are these "user friendly" features?

Well, they are as follows:

- Facebook integration, maybe google plus also.
- Intuitive administration panel, easy to use.
- Theme switcher (Planning to release with 3 themes)
- Author information pages
- Multiple authors (Must be added from the database)
- Comments

What will it look like?

I hope to give the default theme a really nice look and feel, as it'll be the theme everyone sees first. I will be making use of CSS3 and possibly some Java to give it a smooth feel, such as sliding menu's etc.

When will I be able to download this?

I haven't set a release date as of yet, as there is a lot of work to do, especially with it being just me on the project. But I hope to give you guys some sort of preview within the coming weeks, if not I will still post frequent updates here.

Anything I haven't covered? Drop me a .
 

Benden

maging ang maganda mamatay
Jun 4, 2010
2,286
1,482
Will you make it easy for other users to make themes for this?
 

RyanMK

Still alive
May 27, 2010
802
117
Will you make it easy for other users to make themes for this?
I forgot to mention, I will be using a tag system similar to Aardvark Topsites to include the server side coding in. For example {$title} {$post} {$author}
 

Markshall

Русский Стандарт
Contributor
Dec 18, 2010
2,638
2,393
I'm liking the sound of this.

I would however like to see code snippets and screenshots when available.

Good luck with your development.
 

RyanMK

Still alive
May 27, 2010
802
117
I'm liking the sound of this.

I would however like to see code snippets and screenshots when available.

Good luck with your development.

Ask and you shall receive ;D The first thing I started to code after creating a DB and configuration method, was the admin area. Here is how it will check the username and password. Of course, this is likely to be improved.

PHP:
<?php
//===========================================================\\
// tBlogger                                                    \\
// Copyright (c) 2011 Ryan Davidson.  All rights reserved.  \\
//===========================================================\\

include ('../inc/config.php');

$username=$_POST['username'];
$password=$_POST['password'];

$username = stripslashes($username);
$password = stripslashes($password);
$username = mysql_real_escape_string($username);
$password = mysql_real_escape_string($password);

$sql="SELECT * FROM users WHERE username='$username' and password='$password'";
$result=mysql_query($sql);

$count=mysql_num_rows($result);

if($count==1){
session_register("username");
session_register("password");
header("location:admin_main.php");
}
else {
echo "The details you have entered are incorrect, only authors may login.";
}
?>
 

Adil

DevBest CEO
May 28, 2011
1,278
716
You should make it so no-one can access secret files like that ^^
And, you could make a globalfunction.php page which contains functions like
PHP:
userquery(){
//data
}
blogquery(){
//data
}
//etc
 

RyanMK

Still alive
May 27, 2010
802
117
You should make it so no-one can access secret files like that ^^
And, you could make a globalfunction.php page which contains functions like
PHP:
userquery(){
//data
}
blogquery(){
//data
}
//etc

Good idea, I'll probably do that last and copy it all into the glob functions.
 

Kaz

BooYah
Staff member
Nov 16, 2010
3,064
1,025
fantastic, nice to see you have started development.
Ill drop you a few ideas

Good luck :p
 

RyanMK

Still alive
May 27, 2010
802
117
Thank you all for the feedback, will be posting some more snippets soon.
 

Markshall

Русский Стандарт
Contributor
Dec 18, 2010
2,638
2,393
Will this be procedural or OOP? I recommend you use OOP since you're going to be using some functions numerous times -- it helps to speed up your code and reduces line-usage, it also looks very tidy and somewhat 'professional' if you ask me.

I'm liking your code at the moment, but you should make sure you use strip_tags() on your $_POST and $_GET values.
 

Kryptos

prjRev.com
Jul 21, 2010
2,205
1,252
PHP:
<?php
//===========================================================\\
// tBlogger                                                    \\
// Copyright (c) 2011 Ryan Davidson.  All rights reserved.  \\
//===========================================================\\

include ('../inc/config.php');

$username= mysql_real_escape_string(stripslashes($_POST['username']));
$password= mysql_real_escape_string(stripslashes($_POST['password']));

$result = mysql_query("SELECT * FROM users WHERE username = '" . $username . "' and password = '" . $password . "' LIMIT 1");

$count = mysql_num_rows($result);

if($count==1){
$_SESSION['username'] = $username;
$_SESSION['password'] = $password;

header("Location: /admin_main.php");
exit;
}
else {
echo "The details you have entered are incorrect, only authors may login.";
}
?>

I fixed your code a bit, since it was pretty bad.

Try to check out the differences in this one with the one you posted so you can do it how I did it in the rest of the files. :)
Also, you should not use session_register(), it's deprecated.

On a side note, I really encourage you into trying OOP, thus having more chance of this making into the Forum Projects.

Good luck! ;)
 

Ept

Many men wish death upon me.
Jun 16, 2011
591
276
Ryaaan, Good luck, I hope you succeed, it sounds awesome! :D.
 

RyanMK

Still alive
May 27, 2010
802
117
PHP:
<?php
//===========================================================\\
// tBlogger                                                    \\
// Copyright (c) 2011 Ryan Davidson.  All rights reserved.  \\
//===========================================================\\

include ('../inc/config.php');

$username= mysql_real_escape_string(stripslashes($_POST['username']));
$password= mysql_real_escape_string(stripslashes($_POST['password']));

$result = mysql_query("SELECT * FROM users WHERE username = '" . $username . "' and password = '" . $password . "' LIMIT 1");

$count = mysql_num_rows($result);

if($count==1){
$_SESSION['username'] = $username;
$_SESSION['password'] = $password;

header("Location: /admin_main.php");
exit;
}
else {
echo "The details you have entered are incorrect, only authors may login.";
}
?>

I fixed your code a bit, since it was pretty bad.

Try to check out the differences in this one with the one you posted so you can do it how I did it in the rest of the files. :)
Also, you should not use session_register(), it's deprecated.

On a side note, I really encourage you into trying OOP, thus having more chance of this making into the Forum Projects.

Good luck! ;)
Thanks ever so much for the help, I will certainly be trying OOP. On a side note, done some slight CSS, nothing special.
 

Quackster

a devbest user says what
Aug 22, 2010
1,765
1,245
Awesome. Good luck. PHP and Styling is my weakness. So I hope this goes all well :D
 
Status
Not open for further replies.

Users who are viewing this thread

Top