[DEV] tBlogger - PHP Blogging script by Anon.

Status
Not open for further replies.

Tr0ll.

Member
Nov 20, 2010
99
5
I'm not sure if you're a 'beginner', but your script lacks any structure. I don't see any classes, OOP, etc. I'm not sure how far you want this project to go.. but if it's 'far' I suggest you learn PHP from a reliable source(php.net, w3school, etc) because who ever taught you PHP is doing it wrong.
 

Adil

DevBest CEO
May 28, 2011
1,278
716
I'm not sure if you're a 'beginner', but your script lacks any structure. I don't see any classes, OOP, etc. I'm not sure how far you want this project to go.. but if it's 'far' I suggest you learn PHP from a reliable source(php.net, w3school, etc) because who ever taught you PHP is doing it wrong.
You're judging him on one script? :confused:
 

Benden

maging ang maganda mamatay
Jun 4, 2010
2,286
1,482
Hes really good at php, If you read you'll see that its just a structure and hes going to build onto it
 

TesoMayn

Boredom, it vexes me.
Oct 30, 2011
1,482
1,482
Everything doesn't have to be OOP, this is good for your first script, don't let that fucker talk shit, I bet he can't even write a PHP echo line properly. :)

NO ONE does advanced PHP for their first script, from scratch.

Trolls will troll, and have no lifes.

Nice script, can't wait for release, I will be using.
 

Markshall

Русский Стандарт
Contributor
Dec 18, 2010
2,638
2,393
I'm not sure if you're a 'beginner', but your script lacks any structure. I don't see any classes, OOP, etc. I'm not sure how far you want this project to go.. but if it's 'far' I suggest you learn PHP from a reliable source(php.net, w3school, etc) because who ever taught you PHP is doing it wrong.
I see why you're called "Tr0ll" now. Leave the kid alone and let him code -- you don't have to use it.
 

RyanMK

Still alive
May 27, 2010
802
117
I'm not sure if you're a 'beginner', but your script lacks any structure. I don't see any classes, OOP, etc. I'm not sure how far you want this project to go.. but if it's 'far' I suggest you learn PHP from a reliable source(php.net, w3school, etc) because who ever taught you PHP is doing it wrong.

I didn't know there was a 'right' way of doing PHP, OOP may be a far more efficient way of doing things but I am a beginner and the whole point of this is project is to improve my knowledge. But your flaming is not constructive at all.

In other news, I've finished the admin side. It post's fine to the DB with rich text editing provided by TinyMCE. I'm now focusing on creating an efficient way of switching between skins, to which I will be posting code snippets of.

Admin panel:
 

Markshall

Русский Стандарт
Contributor
Dec 18, 2010
2,638
2,393
I didn't know there was a 'right' way of doing PHP, OOP may be a far more efficient way of doing things but I am a beginner and the whole point of this is project is to improve my knowledge. But your flaming is not constructive at all.

In other news, I've finished the admin side. It post's fine to the DB with rich text editing provided by TinyMCE. I'm now focusing on creating an efficient way of switching between skins, to which I will be posting code snippets of.

Admin panel:
It looks really, really good; I love those simple, plain designs like what you have there.

The TinyMCE WYSIWYG editor is a great addition too. Best of luck to you.
 

Sledmore

Chaturbate Livestreamer
Staff member
FindRetros Moderator
Jul 24, 2010
5,199
3,934
Looking good Ryan, I love your styles, and wish you good luck :D, you should do some theme changer, etc xD.
 

RyanMK

Still alive
May 27, 2010
802
117
Cheers, guys for the feedback!

I hope to make some sort of style switcher, probably through the use of cookies similar to ATS PHP, it will involve some reading up ad playing around which will take some time.
 

Markshall

Русский Стандарт
Contributor
Dec 18, 2010
2,638
2,393
Doing a style switcher shouldn't be so hard.

update_style.php
PHP:
<?php
$new_style = strip_tags( $_GET['style'] ); //the style the user has selected
$styles = array( "blue", "red", "green" ); //the styles they can have
if ( !in_array( $new_style, $styles ) ) //selected an invalid style
{
    echo "You can not have this style";
}
else //selected a valid style
{
    setcookie( "style", $new_style, time() + 60 * 60 * 24 * 5 ); //update "style" cookie
    echo "Your style has been updated to {$new_style}!";
}

index.php
PHP:
<?php
$style = ( $_COOKIE['style'] ) ? $_COOKIE['style'] : "blue"; //if the "style" cookie has been set, read it, if not use "blue" as default style
echo "<link type=\"text/css\" rel=\"stylesheet\" href=\"css/{$style}.css\" media=\"screen\" />"; //print out the html line that will get the CSS file.
?>

Then to allow users to change the theme:
PHP:
Change theme:
<a href="update_style.php?style=blue">Blue</a> |
<a href="update_style.php?style=red">Red</a> |
<a href="update_style.php?style=green">Green</a>
Or something like that, I'm not even sure, I coded that in the text editor on DevBest. But best of luck to you if you decide to make a style changer!
 

RyanMK

Still alive
May 27, 2010
802
117
Cheers, Mark for the help; I'll probably use this method. :D

I thought I'd lay down what's currently done, and what's still in progress:

Administration panel (Posting an update, changing the blog name and creating author accounts.) - 100% Done.
Database structure (users and blog_posts tables) - 100% Done.
Style switching system (Credits to Mark/m0nsta.) - 57% Needs implementing.
Post display & Facebook integration - 57% Needs finishing off, only after the template & color schemes are completed.
Initial three color schemes - 0% Need to make a start on these really.
Documentation & Credits - 0% Not written yet.

Oh, I almost forgot. I'll be looking for people to test tBlogger shortly, you can send me a PM if you'd like to be a part of this.
 

Markshall

Русский Стандарт
Contributor
Dec 18, 2010
2,638
2,393
No worries! There's probably even better ways of doing it across the Internet, this was just one that I had coded off by heart on the post box here.
 

RyanMK

Still alive
May 27, 2010
802
117
Just a preview on how the main blog will look like, still need to add headers, sidebar etc. After getting a great response from the admin style, I tried to incorporate it into the main design :)

 

RyanMK

Still alive
May 27, 2010
802
117
Thanks guis!

Here's a few updates on the project:

- Skin color changer succesfully implemented
- Post dislplay is working, comments being worked on.
- Started making category system.
 

brsy

nah mang
May 12, 2011
1,530
272
Good luck on this project! I will surely be using this once it's released. If you need any help, just contact me.
 

Andeh

the best cis-boy
Jun 1, 2010
892
124
Good luck, sounds epic. ;)
Make it open-source, sounds like something that would be fun to edit when being bored.
 
Status
Not open for further replies.

Users who are viewing this thread

Top