Welcome, Guest. Please login or register.
Did you miss your activation email? October 07, 2008, 07:09:14 PM
Did you miss your activation email? October 07, 2008, 07:09:14 PM
Developers' Blog
How this blog was created
I figured I'd kick off the Developer's blog by explaining how I actually created it.
Now I'm well aware that there is a ton of blogging software out there. But if we look at the essence of a blog you'll find that it is basically a post with a bunch of comments following it. Put them together and you get a blog. This strangely enough is similar to a topic with the first post being the article and all following posts being comments, and they are all stored in a board.
Following that logic I created a category to store all the blogs in and made each blog a board in that category. That provided all the grouping I needed, I was now ready to begin creating the actual software. It turns out that I really only needed four files to make this work. The first one is a PHP file that does all the heavy lifting, the second is a CSS file that makes things pretty, and the third one is simply a graphics file for use with the RSS feeds. Now the forth file is a htaccess file that isn't really needed but it provides a nice effect for us. It allows me to use a url like http://blogs.simplemachines.org/dev/all. What’s the big deal you ask? Well first off there is no directory called dev under the blogs directory. Without the htaccess file I would have to do something like http://blogs.simplemachines.org/index.php/dev/all which isn't nearly as pretty is it?
Now after I set up how I wanted things to look I was ready to code.
The first thing I needed to do was to declare what blogs I had. This was done as a simple array
The next step I took was to parse the request URI and see what they user was asking for (if anything at all). This was done by using a regular expression that broke up the various parts into it's component pieces.
From there it was just a matter of loading the correct content. If they didn't ask for anything it will show them the main page, after loading the required information. If they asked for a particular blog then it'll show them the most recent entry for that blog. If they asked for a particular entry then it shows them that one. Its all a matter of querying the right tables out of the SMF database.
Now to create an actual entry all I have to do is create a topic in the blog's board and it shows up automatically. I mean how cool is that?
Now I would like to end this by saying that this entire blog is powered by the SMF software and uses nothing other then what you get using SSI.
So remember, SMF is more then just a forum software, its a pretty kick butt framework.
Now I'm well aware that there is a ton of blogging software out there. But if we look at the essence of a blog you'll find that it is basically a post with a bunch of comments following it. Put them together and you get a blog. This strangely enough is similar to a topic with the first post being the article and all following posts being comments, and they are all stored in a board.
Following that logic I created a category to store all the blogs in and made each blog a board in that category. That provided all the grouping I needed, I was now ready to begin creating the actual software. It turns out that I really only needed four files to make this work. The first one is a PHP file that does all the heavy lifting, the second is a CSS file that makes things pretty, and the third one is simply a graphics file for use with the RSS feeds. Now the forth file is a htaccess file that isn't really needed but it provides a nice effect for us. It allows me to use a url like http://blogs.simplemachines.org/dev/all. What’s the big deal you ask? Well first off there is no directory called dev under the blogs directory. Without the htaccess file I would have to do something like http://blogs.simplemachines.org/index.php/dev/all which isn't nearly as pretty is it?
Now after I set up how I wanted things to look I was ready to code.
The first thing I needed to do was to declare what blogs I had. This was done as a simple array
Code: [Select]
$blogs = array(
'team' => 128,
'dev' => 129,
);The next step I took was to parse the request URI and see what they user was asking for (if anything at all). This was done by using a regular expression that broke up the various parts into it's component pieces.
From there it was just a matter of loading the correct content. If they didn't ask for anything it will show them the main page, after loading the required information. If they asked for a particular blog then it'll show them the most recent entry for that blog. If they asked for a particular entry then it shows them that one. Its all a matter of querying the right tables out of the SMF database.
Now to create an actual entry all I have to do is create a topic in the blog's board and it shows up automatically. I mean how cool is that?
Now I would like to end this by saying that this entire blog is powered by the SMF software and uses nothing other then what you get using SSI.
So remember, SMF is more then just a forum software, its a pretty kick butt framework.
Loading...
Anyways, it's nice to see what you can come up with using SMF as a framework. Indeed, it's more versatile than any other forum system I've used
-AwwLilMaggie
http://blogs.simplemachines.org/dev/131110/comments.html
-AwwLilMaggie
Come on help us a little..
(no, I don't know what's used
I think you know what's used..
Another idea would be to make a blog-style theme for these boards. If someone access the blog boards from the forum, a specific theme would be used that would simulate the feel and look of a blog.
I would appreciate learning from you how to implement your blogging system
Thanks!
I implemented comments too.
http://www.zeriyt.com/component/option,com_smf/forumi,informatik/Itemid,45/action,revista_informatike
If you click on the 'xx Comments' link after each post, they will be displayed like this:
http://www.zeriyt.com/component/option,com_smf/forumi,informatik/Itemid,45/action,revista_informatike/topic,35218.0
Scroll down and you'll see that comments (after the "article") are indented to the right.
I used Custom Action Mod to "host" my blog code. No image support, though. Maybe I'll add it later. And maybe I'll release my mod for you to use, if anyone is interested.
Either way, I'll post my mod here
I want to public this thing...but it would be great with the comment function.
I think it shouldn't be much work to convert what I've done into a mod. I'm busy with another mod at the moment, though.
Besides, you use TinyPortal, which I don't (not yet, at least). I guess you can get better support at TinyPortal's site regarding adding comments to front page.
TinyPortal: I think it makes no difference...
There's no special template for the blog. It's just the board default, which is RocketTheme Versatility II Sienna.
Basically, use ssi_boardNews (with "array" return method, and format the data yourself) for the main blog page, ssi_topic (that mod) for the "Read More" page (and comments on that page), and you have a simple blog
I'm going to try work on a very simple blogging system, but it may not be for a while...
nada
So what?
The more options there are, the more SMF will be used.
It can be released as a mod.
IPB etc. have it.
-ALM
Then why do you use and praise it as a blog?
In that case, better not open such threads at all...
Its just like that. "Why you added chat? SMF is not for chatting"
= praising SMF as a blog...
(Or is that the same?
You can do it, good luck.
-ALM
Which i can agree with. SMF is fairly extensible with a bit of coding know-how.
-ALM
Devs made it so that It can. It can be done if you know PHP and has an idea on how SMF functions.
Thanks!
But if you get the attachment ids from the message you just call the function in the Display.php to laod them up and display them.