Advertisement:

Author Topic: How this blog was created  (Read 120646 times)

Offline Thantos

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 16,163
  • Gender: Male
How this blog was created
« on: November 14, 2006, 12:32:19 AM »
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
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.

Offline Daniel15

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 4,222
  • Gender: Male
  • http://dan.cx/
    • daaniel on Facebook
    • Daniel15 on GitHub
    • daniel15 on LinkedIn
    • @Daniel15 on Twitter
    • Daniel15
Re: How this blog was created
« Reply #1 on: November 15, 2006, 02:01:11 AM »
Quote
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?
You should reword that slightly, to something like:

Quote
Now the forth file is a htaccess file that isn't really needed but it provides a nice effect for us.  Using an Apache module called 'mod_rewrite', I am able to use URL's 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?

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 :)
Daniel15, former Customisation team member, resigned due to lack of time. I still love everyone here :D.
Go to smfshop.com for SMFshop support, do NOT email or PM me!

Offline Neol

  • Full Member
  • ***
  • Posts: 472
  • Gender: Male
  • ##########
Re: How this blog was created
« Reply #2 on: December 06, 2006, 07:29:03 AM »
May we have the files you used to create this?

Offline Gary

  • Sorceress's Knight
  • Customizer
  • SMF Super Hero
  • *
  • Posts: 18,128
  • Gender: Male
  • So this is the luck of the draw...
    • Gazmanafc on Facebook
    • garygadsdon on LinkedIn
    • @Gazmanafc on Twitter
    • The Bongo Comics Fan Forum
Re: How this blog was created
« Reply #3 on: December 06, 2006, 09:41:49 AM »
It's called SSI.php :P

-AwwLilMaggie
Gary M. Gadsdon
Do NOT PM me unless I say so

War of the Simpsons
Bongo Comics Fan Forum
Youtube Let's Plays

^ YT is changing monetisation policy, help reach 1000 sub threshold.

Offline Webby

  • Full Member
  • ***
  • Posts: 482
  • Gender: Male
  • Let's generate some buttons !
    • marcovanveelen.nl
Re: How this blog was created
« Reply #4 on: January 05, 2007, 10:02:11 AM »
I get an error when I want to see the comments on the blogs, example  :

http://blogs.simplemachines.org/dev/131110/comments.html

Offline Gary

  • Sorceress's Knight
  • Customizer
  • SMF Super Hero
  • *
  • Posts: 18,128
  • Gender: Male
  • So this is the luck of the draw...
    • Gazmanafc on Facebook
    • garygadsdon on LinkedIn
    • @Gazmanafc on Twitter
    • The Bongo Comics Fan Forum
Re: How this blog was created
« Reply #5 on: January 05, 2007, 10:23:13 AM »
Reported to the bugtracker.

-AwwLilMaggie
Gary M. Gadsdon
Do NOT PM me unless I say so

War of the Simpsons
Bongo Comics Fan Forum
Youtube Let's Plays

^ YT is changing monetisation policy, help reach 1000 sub threshold.

Offline MPT.

  • Jr. Member
  • **
  • Posts: 226
Re: How this blog was created
« Reply #6 on: January 07, 2007, 07:46:37 AM »
I want a blog module like this too. I've tried to make something, I have a little experience with PHP. Can you explain it a little detailed how you made a blog like this?

Offline perplexed

  • SMF Hero
  • ******
  • Posts: 2,603
  • It's quite perplexing isn't it
Re: How this blog was created
« Reply #7 on: January 19, 2007, 09:00:24 PM »
yeah this looks really nifty but a little more 'how to' instruction would be great  ;)

Offline Thantos

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 16,163
  • Gender: Male
Re: How this blog was created
« Reply #8 on: January 20, 2007, 12:19:19 AM »
Thats part of the mystery :P

Offline MPT.

  • Jr. Member
  • **
  • Posts: 226
Re: How this blog was created
« Reply #9 on: January 20, 2007, 10:16:03 AM »
Thats part of the mystery :P
I think this blog is using the boardNews function of the SSI.php. But that's all what I know :D

Come on help us a little.. :D

Offline Daniel15

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 4,222
  • Gender: Male
  • http://dan.cx/
    • daaniel on Facebook
    • Daniel15 on GitHub
    • daniel15 on LinkedIn
    • @Daniel15 on Twitter
    • Daniel15
Re: How this blog was created
« Reply #10 on: January 20, 2007, 10:22:56 AM »
Quote
I think this blog is using the boardNews function of the SSI.php.
It could be... It looks a lot like it :)
(no, I don't know what's used :P)
Daniel15, former Customisation team member, resigned due to lack of time. I still love everyone here :D.
Go to smfshop.com for SMFshop support, do NOT email or PM me!

Offline MPT.

  • Jr. Member
  • **
  • Posts: 226
Re: How this blog was created
« Reply #11 on: January 20, 2007, 02:47:14 PM »
Quote
I think this blog is using the boardNews function of the SSI.php.
It could be... It looks a lot like it :)
(no, I don't know what's used :P)
Woww, what a helpful answer :D

I think you know what's used.. :D


Offline MPT.

  • Jr. Member
  • **
  • Posts: 226
Re: How this blog was created
« Reply #13 on: January 20, 2007, 04:33:41 PM »
It's ok, I think I worked it out :)
How?

Offline Neol

  • Full Member
  • ***
  • Posts: 472
  • Gender: Male
  • ##########

Offline TempusFugit

  • Semi-Newbie
  • *
  • Posts: 29
  • Gender: Male
    • Cinemascope.gr
Re: How this blog was created
« Reply #15 on: February 18, 2007, 06:40:33 AM »
Couldn't this be released as a mod? I understand it's a personal work, but it would be a great SMF add-on...

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.

Offline MPT.

  • Jr. Member
  • **
  • Posts: 226
Re: How this blog was created
« Reply #16 on: February 19, 2007, 06:54:10 PM »

Offline WhatsUp

  • Semi-Newbie
  • *
  • Posts: 47
    • History Hunters
Re: How this blog was created
« Reply #17 on: February 27, 2007, 09:50:22 AM »
MPT.
I would appreciate learning from you how to implement your blogging system

Thanks!
History Hunters: http://historyhuntersinternational.org/
Enter: test/test
SMF and TinyPortal

Offline Lemming

  • Jr. Member
  • **
  • Posts: 372
  • Gender: Male
Re: How this blog was created
« Reply #18 on: March 07, 2007, 07:58:38 PM »
It's no problem to use the boardnews function of the SSI.php but how can you show the 'comments' on the same site as the 'news' is? (or on a new site but not in the forum - like here it is)  :(

Offline Neol

  • Full Member
  • ***
  • Posts: 472
  • Gender: Male
  • ##########
Re: How this blog was created
« Reply #19 on: March 07, 2007, 08:45:30 PM »
It's no problem to use the boardnews function of the SSI.php but how can you show the 'comments' on the same site as the 'news' is? (or on a new site but not in the forum - like here it is)  :(

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. :P
 

Offline Lemming

  • Jr. Member
  • **
  • Posts: 372
  • Gender: Male
Re: How this blog was created
« Reply #20 on: March 07, 2007, 09:48:48 PM »
And maybe I'll release my mod for you to use, if anyone is interested. :P

  ;D

Offline Neol

  • Full Member
  • ***
  • Posts: 472
  • Gender: Male
  • ##########
Re: How this blog was created
« Reply #21 on: March 08, 2007, 05:00:59 PM »
I have to clean up my blog code first. Maybe I'll also integrate Custom Action Mod, on which my mod relies -- I have already done that with another mod I'm working on -- and submit my mod as a package.

Either way, I'll post my mod here ;)  

Offline Lemming

  • Jr. Member
  • **
  • Posts: 372
  • Gender: Male
Re: How this blog was created
« Reply #22 on: March 08, 2007, 05:34:48 PM »
Is it much work to do that? Here you can see a test news page


I want to public this thing...but it would be great with the comment function.
« Last Edit: March 08, 2007, 05:42:33 PM by Lemming »

Offline Neol

  • Full Member
  • ***
  • Posts: 472
  • Gender: Male
  • ##########
Re: How this blog was created
« Reply #23 on: March 10, 2007, 01:59:20 PM »
Is it much work to do that? Here you can see a test news page


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.

Offline Lemming

  • Jr. Member
  • **
  • Posts: 372
  • Gender: Male
Re: How this blog was created
« Reply #24 on: March 10, 2007, 02:29:13 PM »
Another option is to simply edit the theme so you have the news article and under it some small comments (like Blocs wiki style theme). Then just activate this theme for the news board. 

TinyPortal: I think it makes no difference... :) TP has a nice comment funktion but only for articles. And you can't make an article for every news. The better way is SSI. I will ask there :)
« Last Edit: March 10, 2007, 10:30:34 PM by Lemming »

Offline Lemming

  • Jr. Member
  • **
  • Posts: 372
  • Gender: Male
Re: How this blog was created
« Reply #25 on: March 18, 2007, 11:14:39 AM »
Mh can you show me the template for these comment pages ?

Offline Sarge

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 6,209
  • Gender: Male
    • Zëri YT!
Re: How this blog was created
« Reply #26 on: March 21, 2007, 11:22:09 PM »
Mh can you show me the template for these comment pages ?

There's no special template for the blog. It's just the board default, which is RocketTheme Versatility II Sienna.
    Please do not PM me with support requests unless I invite you to.

http://www.zeriyt.com/   ~   http://www.galeriashqiptare.net/


Quote
<H> I had zero posts when I started posting

Offline Lemming

  • Jr. Member
  • **
  • Posts: 372
  • Gender: Male
Re: How this blog was created
« Reply #27 on: April 07, 2007, 08:53:44 PM »
*Meep* Okay - no special theme. Is there any chance that you make a modification for this - or maybe just the edited files?!  :) I'm thinking about to use a special news script but an integrated solution would be better.  

Offline Daniel15

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 4,222
  • Gender: Male
  • http://dan.cx/
    • daaniel on Facebook
    • Daniel15 on GitHub
    • daniel15 on LinkedIn
    • @Daniel15 on Twitter
    • Daniel15
Re: How this blog was created
« Reply #28 on: April 07, 2007, 09:42:37 PM »
I recently released a mod named SSI Topics and Replies... This mod should make it a lot easier to make a mod.
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...
Daniel15, former Customisation team member, resigned due to lack of time. I still love everyone here :D.
Go to smfshop.com for SMFshop support, do NOT email or PM me!

Offline ladynada

  • Full Member
  • ***
  • Posts: 423
  • Gender: Female
  • What happens next loves me
    • The Two Witnesses - Overcome The Carnal Mind Through Christ Jesus
Re: How this blog was created
« Reply #29 on: April 16, 2007, 04:57:16 PM »
I also uploaded a simple blog using ssiboardnews, inside the ultiportal theme; unfortunately I am still waiting for it to be approved.

:(

nada
WORK for Truth, Print it, Take Time to READ ALL LINKS NOTED  click here --> The TWO Witnesses are Mom and Dad and SMF Skins

Offline flame baiter

  • Semi-Newbie
  • *
  • Posts: 75
Re: How this blog was created
« Reply #30 on: August 09, 2007, 05:44:02 PM »
Just wondering...now that you have created this blog thingy, wouldn't it make sense to add it to SMF 2.0 as a default option? I mean, why not add this as a new feature? It seems to work fine and the code is already there...no?  [yes yes, I'm not a programmer, just a (stupid?) thought from a user...]

Offline Dragooon

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 6,738
  • Gender: Male
  • I'm bIn
    • ShitizGarg on Facebook
    • Dragooon on GitHub
    • dragooon on LinkedIn
    • SMF-Media
Re: How this blog was created
« Reply #31 on: August 10, 2007, 01:32:13 PM »
SMF is a forum not a blog.

Offline MPT.

  • Jr. Member
  • **
  • Posts: 226
Re: How this blog was created
« Reply #32 on: August 10, 2007, 03:19:32 PM »
SMF is a forum not a blog.

So what?

The more options there are, the more SMF will be used.

It can be released as a mod.

IPB etc. have it.

Offline Aaron

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 6,711
  • Gender: Male
    • Aaronweb.net
Re: How this blog was created
« Reply #33 on: August 10, 2007, 03:50:29 PM »
It's actually a seperate module for IP.boards, not a default feature. I don't think it should be a default feature in SMF either.

Offline Gary

  • Sorceress's Knight
  • Customizer
  • SMF Super Hero
  • *
  • Posts: 18,128
  • Gender: Male
  • So this is the luck of the draw...
    • Gazmanafc on Facebook
    • garygadsdon on LinkedIn
    • @Gazmanafc on Twitter
    • The Bongo Comics Fan Forum
Re: How this blog was created
« Reply #34 on: August 10, 2007, 04:02:10 PM »
^ Agreed. So like IPB has it as a seperate optional package, I think we could do the same. SMBlog anyone. :P

-ALM
Gary M. Gadsdon
Do NOT PM me unless I say so

War of the Simpsons
Bongo Comics Fan Forum
Youtube Let's Plays

^ YT is changing monetisation policy, help reach 1000 sub threshold.

Offline flame baiter

  • Semi-Newbie
  • *
  • Posts: 75
Re: How this blog was created
« Reply #35 on: August 10, 2007, 04:16:01 PM »
SMF is a forum not a blog.

Then why do you use and praise it as a blog?  ::)

In that case, better not open such threads at all...
« Last Edit: August 10, 2007, 04:19:38 PM by stokedfish »

Offline Dragooon

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 6,738
  • Gender: Male
  • I'm bIn
    • ShitizGarg on Facebook
    • Dragooon on GitHub
    • dragooon on LinkedIn
    • SMF-Media
Re: How this blog was created
« Reply #36 on: August 10, 2007, 11:55:32 PM »
And when did we praised it as a Blog? SMF already god some mods that will work as good as a blog(Actually they are Blog mods :P). I never praised SMF as a blog. it is a full fleshed forum software in which a Blog can be added.

Its just like that. "Why you added chat? SMF is not for chatting"

Offline flame baiter

  • Semi-Newbie
  • *
  • Posts: 75
Re: How this blog was created
« Reply #37 on: August 11, 2007, 04:24:04 AM »
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?
Quote
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.

=  praising SMF as a blog...    ;)

Offline Dragooon

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 6,738
  • Gender: Male
  • I'm bIn
    • ShitizGarg on Facebook
    • Dragooon on GitHub
    • dragooon on LinkedIn
    • SMF-Media
Re: How this blog was created
« Reply #38 on: August 11, 2007, 04:39:16 AM »
We are not praising it as a Blog we are using its powers as a  Blog
(Or is that the same? :P :P :P)

Offline flame baiter

  • Semi-Newbie
  • *
  • Posts: 75
Re: How this blog was created
« Reply #39 on: August 11, 2007, 05:55:57 AM »
Oh well...read again, think, think harder.

You can do it, good luck.

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?
Quote
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.

=  praising SMF as a blog...    ;)

Offline Gary

  • Sorceress's Knight
  • Customizer
  • SMF Super Hero
  • *
  • Posts: 18,128
  • Gender: Male
  • So this is the luck of the draw...
    • Gazmanafc on Facebook
    • garygadsdon on LinkedIn
    • @Gazmanafc on Twitter
    • The Bongo Comics Fan Forum
Re: How this blog was created
« Reply #40 on: August 11, 2007, 02:29:48 PM »
SMF isnt being praised as a blog. It's using it's customisation ability to have blog-like capabilities.

-ALM
Gary M. Gadsdon
Do NOT PM me unless I say so

War of the Simpsons
Bongo Comics Fan Forum
Youtube Let's Plays

^ YT is changing monetisation policy, help reach 1000 sub threshold.

Offline metallica48423

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 19,842
  • Gender: Male
  • Professional Multislacker!
    • Zentendo
Re: How this blog was created
« Reply #41 on: August 11, 2007, 05:55:46 PM »
i'd say its more prasing smf as a framework than as a blog.

Which i can agree with.  SMF is fairly extensible with a bit of coding know-how.
Justin O'Leary
Ex-Project Manager
Ex-Lead Support Specialist

Quote
Microsoft wants us to "Imagine life without walls"...
I say, "If there are no walls, who needs Windows?"

Useful Links:
Online Manual!
How to Help us Help you   
Search
Settings Repair Tool
     

Offline falguni1

  • Full Member
  • ***
  • Posts: 652
  • Gender: Female
  • http://beautymakeupdivas.com/
Re: How this blog was created
« Reply #42 on: October 09, 2007, 02:32:43 AM »
I also want a blog like this one I has zero knowledge of PHP please can u put the ssi file in SMF 2.0

Offline Gary

  • Sorceress's Knight
  • Customizer
  • SMF Super Hero
  • *
  • Posts: 18,128
  • Gender: Male
  • So this is the luck of the draw...
    • Gazmanafc on Facebook
    • garygadsdon on LinkedIn
    • @Gazmanafc on Twitter
    • The Bongo Comics Fan Forum
Re: How this blog was created
« Reply #43 on: October 09, 2007, 10:10:22 AM »
The SSI.php file is in 1.1

-ALM
Gary M. Gadsdon
Do NOT PM me unless I say so

War of the Simpsons
Bongo Comics Fan Forum
Youtube Let's Plays

^ YT is changing monetisation policy, help reach 1000 sub threshold.

Offline MPT.

  • Jr. Member
  • **
  • Posts: 226
Re: How this blog was created
« Reply #44 on: October 09, 2007, 01:33:33 PM »
The SSI.php file is in 1.1

-ALM
We need the SSI file that outputs this blog, is that the one?

Offline Dragooon

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 6,738
  • Gender: Male
  • I'm bIn
    • ShitizGarg on Facebook
    • Dragooon on GitHub
    • dragooon on LinkedIn
    • SMF-Media
Re: How this blog was created
« Reply #45 on: October 09, 2007, 01:35:14 PM »
No SSI Does NOT outputs the blog,
Devs made it so that It can. It can be done if you know PHP and has an idea on how SMF functions.

Offline digit

  • Sophist Member
  • *****
  • Posts: 1,364
  • Gender: Male
Re: How this blog was created
« Reply #46 on: July 09, 2008, 04:10:26 AM »
Does your blog display attachments? (because I basically came up with the same solution - but using custom actions...  but I can't figure out how to display the attachments!)

Thanks!
Happily using a heavily modified 1.1.16 version of SMF!

2748011 Posts in 320998 Topics by 50986 Members


SOLD my website - thanks it was a good run - they converted to vbadvanced. (and screwed it up good!)

Offline SleePy

  • Site Team Lead
  • SMF Master
  • *
  • Posts: 30,341
  • Gender: Male
  • Thats his happy face.
    • jdarwood007 on GitHub
    • @jdarwood on Twitter
    • SleePy Code - My personal site
Re: How this blog was created
« Reply #47 on: July 09, 2008, 01:04:16 PM »
I don't believe it was.
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.
Jeremy D — Site Team / SMF Developer
Support the SMF Support team!
Profiles:
GitHub