i'm thinking of making my own blogger script in my spare time

stndn

Golden Member
Mar 10, 2001
1,886
0
0
Well, since i have nothing better to do until i get a job, i figure i might as well learn something new and do something productive with it..

Anyways, i've been thinking of writing my own blog software/script/whatever..
The way i visualize it:
1. login to the entry page
2. type my current entry for the day
3. save it

Then the blogger will:
1. Update the main page with the latest entry
2. Cut the main page entry and keep it for x amount of days (example: keep the main page to have at most 10 days of entry)
3. Update the backup page that has all the entries (archives) that i've done until today.


I've never really used bloggers before, so i wouldn't know how it actually works. But i think that should be the general idea?

Anyways, here are my questions:
1. Should i make the changes/updates directly to the HTML pages?
2. If yes, that means i should make my HTML pages writeable.. Isn't that dangerous?
3. If no, should i keep individual entries as entry in database, or text files?
4. Which should be easier, writing it as cgi script, or php script?


I'm sorry i'm not a great writer, so if the above are confusing, please let me know. But the basic idea should probably be: How do i go about writing my own blogger for my site?

yes it's reinventing the wheel.. but practice makes perfect ,)

Thanks a lot. -)
 

igowerf

Diamond Member
Jun 27, 2000
7,697
1
76
I would store the entries to a database or a text file. The main page will then query the database or include the text file to display the blog entries.
 

CaseTragedy

Platinum Member
Oct 24, 2000
2,690
0
0
php script would be easiest.

the blogger i wrote for my site is a php that writes to 2 text files. 1 text file for the main page and the 2nd text file to store a stripped down version of the posts (replaces images with just links..etc.) for my archived page. i chose flat-file as a personal preference, but sql would've been easier.


-Case
 

Cheetah8799

Diamond Member
Apr 12, 2001
4,508
0
76
php with a mysql backend is probably going to be the easiest for you.

using a text file as your database will flat out be a pain in the butt, guaranteed. It can be done, but not well. Plus, as your blog grows, the web server will spend more and more time and cpu processing power just opening and parsing your text file.
 

stndn

Golden Member
Mar 10, 2001
1,886
0
0
hmmm...
so the best thing is to store the data in mysql database?
but wouldn't that put the load on the server if everytime someone wants to read my entry, they have to make a request to the database and retrieve data, etc?

but if that means less stress compared to modifying text files, maybe that's an option...

well, i'll give it a start somehow.
thanks -)
 

CaseTragedy

Platinum Member
Oct 24, 2000
2,690
0
0
Originally posted by: stndn
hmmm...
so the best thing is to store the data in mysql database?
but wouldn't that put the load on the server if everytime someone wants to read my entry, they have to make a request to the database and retrieve data, etc?

but if that means less stress compared to modifying text files, maybe that's an option...

well, i'll give it a start somehow.
thanks -)
a flat-file will be weak if you're going to have many posts. sql will be better.


-Case