php - Schedule a blog post (NOT blogger, NOT wordpress) -


i have been literally mad searching on-line whole day tutorial guess can search engines "polluted" wordpress , blogger.

here problem:

  • i followed this tutorial , went quite well, works wanted. have function admin (that writing new blog entry) has option decide when blog entry going on-line (hh/dd/yy).

does know of tutorial, demo, tips, whatever can me out?

i know use blogger or wordpress, don't want. have purpose of me learning more php...

thanks in advance, appreciated help!

ok, looked @ "build blog" articles. seems me not need change much. here kind of recipe / hint / suggestion :

part 1 - "create database"

change "whole script"

$sql = "create table php_blog (   id int(20) not null auto_increment,   timestamp int(20) not null,   title varchar(255) not null,   entry longtext not null,   published date, <--- change   primary key  (id) )"; 

use tool phpmyadmin if want alter existing table.


part 2 - "post db"

add inside <form> :

<input type="text" name="published" id="published" value="" /> 


part 2b - "post db"

inside if (isset($_post['submit'])) { add

$published = $_post['published']; 

additional, right after - if user has not entered publish-date, that btw must on form m/d/y :

if ($published=='') $published = date("m/d/y");  

change sql :

$sql = "insert php_blog (timestamp,title,entry,published) values ('$timestamp','$title','$entry','$published')"; 


part 3 - "display entries"

change sql

$sql = "select * php_blog id='$id' , published<current_timestamp limit 1"; 

note : untested!!

this point start / give kind of recipe. please dont downvote :)

the "build blog" system very, very simple, think pretty that. if work, need more coding regarding next chapters, hope starting point. idea of people trying make own tool themselves, , in process learn how it. better. if started blog system wordpress, meet kind of problems - more frustrating. better have control, rather waste time correct other peoples coding mistakes.


Comments

Popular posts from this blog

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

html - How to style widget with post count different than without post count -

url rewriting - How to redirect a http POST with urlrewritefilter -