hard to find a stripped down piece of software...
August 16, 2006 11:47 AM Subscribe
I'm looking for a simple PHP blog. There's a catch...
Here's the thing. I don't want a CMS, I have a well-developed website written in PHP & mySQL. What I want is a blog "module" that just plugs into my existing PHP pages so that I keep the look/feel of my website. For example (this is made-up code):
would get inserted in my existing PHP template. I could write my own mySQL wrapper in PHP and use phpMyAdmin to make blog entries, but there *must* be the possibility to add a blog (or wiki or whatever) as a plug-in module into an existing non-CMS website and doesn't require smarty or any other stuff that isn't raw php/mysql... thoughts?
Here's the thing. I don't want a CMS, I have a well-developed website written in PHP & mySQL. What I want is a blog "module" that just plugs into my existing PHP pages so that I keep the look/feel of my website. For example (this is made-up code):
< ?php include 'miniblog_setup.php'; show_blog_entries(script_name); ?>
>
would get inserted in my existing PHP template. I could write my own mySQL wrapper in PHP and use phpMyAdmin to make blog entries, but there *must* be the possibility to add a blog (or wiki or whatever) as a plug-in module into an existing non-CMS website and doesn't require smarty or any other stuff that isn't raw php/mysql... thoughts?
Best answer: Could you use wordpress? The front-end templates are completely customizable and consist largely of calls like the one you just listed. You would still need a separate MySQL or similar database for it to use, but otherwise it might be adaptable to your needs.
Having said that, it wouldn't really be a lot of trouble to write your own, if you already develop in PHP, would it? The only really PITA parts of a blog are RSS feeds and the like, otherwise it's pretty easy to store and retreive what amounts to fairly simple entries. If you can live without the fancy stuff, it would be easy.
But check out wordpress, and especially grab some sample templates and look at the code.
posted by maxwelton at 11:57 AM on August 16, 2006
Having said that, it wouldn't really be a lot of trouble to write your own, if you already develop in PHP, would it? The only really PITA parts of a blog are RSS feeds and the like, otherwise it's pretty easy to store and retreive what amounts to fairly simple entries. If you can live without the fancy stuff, it would be easy.
But check out wordpress, and especially grab some sample templates and look at the code.
posted by maxwelton at 11:57 AM on August 16, 2006
I was experimenting once with trying to put two blogs on my page, and I discovered that you can take the very basic core of a Wordpress blog and just add that in as a php include.
Hi easternblot. Do you have a code sample or a URL for this? I want to do exactly this.
posted by madman at 12:38 PM on August 16, 2006
Hi easternblot. Do you have a code sample or a URL for this? I want to do exactly this.
posted by madman at 12:38 PM on August 16, 2006
Yes, you could do this with wordpress. For example, use the default install, edit the file [wordpress root]/wp-content/themes/classic/index.php and comment out the "get header" and "get footer" functions.
Then include that page in your wrapper page.
There's a little more to it than that, since you will want to alter the CSS almost certainly, and might need to make adjustments for comment pages, individual entry pages, etc, but that'll get you the "front page" effect.
posted by adamrice at 1:07 PM on August 16, 2006
Then include that page in your wrapper page.
There's a little more to it than that, since you will want to alter the CSS almost certainly, and might need to make adjustments for comment pages, individual entry pages, etc, but that'll get you the "front page" effect.
posted by adamrice at 1:07 PM on August 16, 2006
I used to do this with blogger. I would just make my templates very basic, with just paragraph tags for each post, and set the output file as blog.php. Then I would just include that into whatever layout I had on my server already.
posted by Hackworth at 5:48 PM on August 16, 2006
posted by Hackworth at 5:48 PM on August 16, 2006
Do you have a code sample or a URL for this?
I deleted the test page, and this was a year ago, so I don't remember all the details, but I think you can just take the "wordpress loop" and include that in your page.
Make sure you add the proper things in the header (see that link)
posted by easternblot at 6:44 PM on August 16, 2006
I deleted the test page, and this was a year ago, so I don't remember all the details, but I think you can just take the "wordpress loop" and include that in your page.
Make sure you add the proper things in the header (see that link)
posted by easternblot at 6:44 PM on August 16, 2006
This thread is closed to new comments.
So, short answer, you can do this with Wordpress.
posted by easternblot at 11:56 AM on August 16, 2006