![]() |
![]() |
#1 (permalink) |
Insane
Location: A fuzzy cloud.
|
How do news posts in a web page work?
I'm wanting to make myself a web page/site where I can post new things on. Much like a blog. Bloggers can post their new bits of information or thoughts or whatever and it shows up, with newest post at the top of the page.
How does this work? I've done some reading and seen things about PHP and MySQL and I kind of can understand it but not really. Do people use a web based application to make their new post, and then upon hitting submit, the application develops an Entirely new page that includes new entries on this page? I don't think the above would be how they do it, because then how would they be able to set up preferences like "show only 10 posts." A server couldn't possibly be able to provide that many new pages for each user viewing. Is there some sort of module based thing going on? I'm not doing very well at posting this question. This is what I want: I want to design my page, have it exactly like I want it, images here, a links section there, but readily available for new posts. What is it that enters in these new posts on the web pages? This is my guess as to what happens, maybe you guys can help me fill in the blanks. A PHP based web form that will 1) write the entry to a MySQL (or other) database, 2) edits the current web page by adding a previously created template of code which adds the appropriate entries for a news post. Now, I think I have that part basically right. What I don't understand though is how someone specifies what part of the single page gets updated. Most blogs that I view are one individual page no frames, they are composed of one Large table containing multiple tables for each column within, one table for nav, one table for links, and a table for content. In that content table is all their posts. What specifies that I want to add "this code" to "this part"? I'm really wanting to learn how to set this up, but I don't have anyone really to teach me (or push me in the right direction) that I can talk to face to face. I'm willing to put work into understanding this, I just don't know where to look. That might be an oxymoron, but I figured maybe you all could help point me in the right direction. Thanks a lot.. |
![]() |
![]() |
#2 (permalink) |
Insane
Location: In beautiful (YOUR AREA)
|
Check out E107
Also goto Freshmeat or Sourceforge Do a search for containment management systems. You can also visit Hotscripts |
![]() |
![]() |
#3 (permalink) |
Huggles, sir?
Location: Seattle
|
http://hotwired.lycos.com/webmonkey/programming/php/
Above, is a link to the "webmonkey" php section. It's a pretty nice collection of some tutorials and info about php & mysql. I suggest checking out the PHP from the Ground Up and PHP and MySQL Tutorial links. They are what I used many years ago to learn some PHP basics. If you are looking for books, I suggest checking out "Professional PHP" and "Core PHP", but avoiding the cheap code-sample books. ToiletDuck: iirc it's "content management systems" ![]()
__________________
seretogis - sieg heil perfect little dream the kind that hurts the most, forgot how it feels well almost no one to blame always the same, open my eyes wake up in flames |
![]() |
![]() |
#4 (permalink) |
Psycho
Location: Oregon
|
Basically, a user types his post and submits it, most of the time they have some system setup like those mentioned above, that add the entry into a database. Then, the database/code program finds the most recent entry, and dynamically generates a page to accomplish that.
Being a PHP/Mysql developer myself... feel free to ask any questions.
__________________
"It's not that I don't understand, it's that I don't care" - Homer Simpson |
![]() |
![]() |
#5 (permalink) |
Upright
|
I don't know if this will help but the links these people are directing you to PHP code already made to interact with a MySQL database. You just basically copy and paste the code and your money.
I've also just started to learn PHP and MySQL, a lot of cool stuff you can do. Just hard to get it going is all. |
![]() |
![]() |
#6 (permalink) |
Insane
Location: A fuzzy cloud.
|
Ok... so to expand on questions..
Thanks for the links btw guys.. will be reading these a lot to come.. and the books probably soon too. My main page that I make, that will have all the posts... is that going to be an HTML file or a PHP? I realize that this is basically just a text file, but when I finally upload this thing to server, am I going to want to have my file be ending in .php or .html? Or will it matter? [Edit/Add] After looking at some CMS stuff... Do I really need a CMS? How many people would rather write their own? Is it smart to write my own? Last edited by Realizm; 06-03-2003 at 05:40 PM.. |
![]() |
![]() |
#7 (permalink) |
Crazy
Location: Fayetteville, AR
|
You will want a php page(end the page with .php). The code will need to go to the articles table in MySQL and sort them by date. Then grab and print the first 8-10(however many you want). Then you can do the same thing for an archives page - only skip the first 8-10 and then print the rest.
Also, I believe it is better to setup your MySQL with 2 tables for articles - one with everything but the main text, and one with just the text and some ref to the other info in the first table. I believe it speeds up processing when searching etc. Not sure about the CMS stuff, just know I didn't use it for my personal page. Last edited by thecow; 06-03-2003 at 08:14 PM.. |
![]() |
Tags |
news, page, posts, web, work |
|
|