Author Topic: Making a Forum  (Read 2899 times)

Offline Oldbushie

  • Administrator
  • Phoenix Groupie
  • *****
  • Posts: 7488
  • Gender: Other
  • Mmmm... rich creamery butter...
    • Aerobush Entertainment
Making a Forum
« on: October 29, 2003, 06:37:24 PM »
Making a Forum
.......... <3 Oldbushie <3 ..........
Forum Emoticon God
Master of Time and Space
Aerobush of the Jarada Knights
TSL Programmer
and...
The TSL Candyman




Hero Of The Queene!

Offline Jeysie

  • Omnipotent Being
  • *********
  • Posts: 4635
Making a Forum
« Reply #1 on: October 29, 2003, 07:07:11 PM »
One of these days I really want to try my hand at learning about PHP and SQL sort of stuff... and I'd love to put it to use in trying to create my own forum software. There's got to be a way to create forums that are simpler to code, mod, and style. (And don't give the neatnik in me facial tics when looking at the source code in the average outputted page...)

Peace & Luv, Liz

Offline Yonkey

  • Phoenix Honour Guard
  • ************
  • Posts: 18427
  • Gender: Male
  • Nothing ventured, nothing gained
Making a Forum
« Reply #2 on: October 29, 2003, 07:30:50 PM »
On another topic...
When you say this, it means you should make a new thread...   ::)
* Yonkey thinks it's time for this thread to get some splittin'

One of these days I really want to try my hand at learning about PHP and SQL sort of stuff... and I'd love to put it to use in trying to create my own forum software. There's got to be a way to create forums that are simpler to code, mod, and style.
PHP works a lot like C so if you know C you can pretty much make whatever you want.  Although, it can get messy depending on how complicated you get.

The SQL database made by YaBB SE is surprisingly more compact and efficient than vBulletin's.  Of course, I never designed or modded that forum so maybe whoever did turned it into that mess.  It was 9 MB but when I transferred it to YaBB SE it became 2 MB.  I'm sure there was a lot of excess junk in there.  As for the language itself, it's not as nitty-gritty as C, but you still need to know what you're doing cuz you could mess up your whole forum with just a simple error in a query.

This is why I haven't converted all of T-Knight's previous posts yet to 9 dots.  I have to experiment a bit, but don't worry, I'll do that offline with a backups before I try anything here.   ;D
"A wish changes nothing. A decision changes everything."

Offline Jeysie

  • Omnipotent Being
  • *********
  • Posts: 4635
Re:Making a Forum
« Reply #3 on: October 29, 2003, 07:41:33 PM »
PHP works a lot like C so if you know C you can pretty much make whatever you want.  Although, it can get messy depending on how complicated you get.

Er, well... I don't know any programming languages, is the thing.  :-[ Although what I've seen of PHP scripts looks like it makes a certain amount of sense. And, I don't care how complicated things get... there's no excuse for messiness. ;) I've redesigned my redesign something like 4 times so far... I would simply go along, tinkering with what I wanted to do... then as soon as I figured out where I was headed, I'd go back and figure out the cleanest way to get from point A to point B and still have things work. Then I'd tinker again, pull back and simplify, and so on. You just keep doing that until you've managed to pull off what you're going for in the least amount of the most logically structured code. I figure, if it works for HTML, it's gotta work for programming languages, right?

(Jeysie looks hopeful...)

Edit: I'm sorry, Yonkey... you keep moving the threads while I'm in the middle of concocting my reply! :suffer:

Peace & Luv, Liz
« Last Edit: October 29, 2003, 07:42:40 PM by Jeysie »

Offline Yonkey

  • Phoenix Honour Guard
  • ************
  • Posts: 18427
  • Gender: Male
  • Nothing ventured, nothing gained
Re:Making a Forum
« Reply #4 on: October 29, 2003, 08:04:29 PM »
I would simply go along, tinkering with what I wanted to do... then as soon as I figured out where I was headed, I'd go back and figure out the cleanest way to get from point A to point B and still have things work. Then I'd tinker again, pull back and simplify, and so on. You just keep doing that until you've managed to pull off what you're going for in the least amount of the most logically structured code. I figure, if it works for HTML, it's gotta work for programming languages, right?

(Jeysie looks hopeful...)
Hmm.. Actually that doesn't work for programming languages.  I mean, yes you can make code small and compact, but that makes it very difficult to maintain.  Especially if you come back a few weeks later and forget what the code's supposed to do.  

In programming there is a form of being clean.  You should have comments either above or beside lines of code.  Most people don't do this because a lot of the time the code is obvious.  Which is why you should only comment things that are more complex, or write a comment that will give an overview of what that function does.  I'm not sure how many comments put in HTML, but I'm sure it's barely any.

So that's the first step, then there's a whole indentation structure.  Everything that is in a new set of curly braces gets indented.  This helps you identify what are subroutines/methods/procedures/functions (they're called different things in different languages, but they're all the same).  

The next step is naming variables and functions.  I won't get into the details on naming them, but usually you only use %x or %i for counters.  Even though they're small and compact, you shouldn't call every variable you use %v1 or %v6789 because again, it makes it harder to maintain and you're most likely to forget what it's holding.

Surprisingly, all proper code follows these "standards".  It makes the code easier to read, but can turn a simple thing like counting how many suffer icons were in Cesar's last post into a somewhat long and lengthy function.  But, you can usually optimize code.  Like turning something that would take 2 or 3  steps into 1, but having one line that can do 6 steps in one is definitely not good programming practice.   ::)
"A wish changes nothing. A decision changes everything."

Offline Jeysie

  • Omnipotent Being
  • *********
  • Posts: 4635
Re:Making a Forum
« Reply #5 on: October 29, 2003, 08:32:43 PM »
Re:Making a Forum

Offline Oldbushie

  • Administrator
  • Phoenix Groupie
  • *****
  • Posts: 7488
  • Gender: Other
  • Mmmm... rich creamery butter...
    • Aerobush Entertainment
Re:Making a Forum
« Reply #6 on: October 29, 2003, 08:34:28 PM »
Re:Making a Forum
.......... <3 Oldbushie <3 ..........
Forum Emoticon God
Master of Time and Space
Aerobush of the Jarada Knights
TSL Programmer
and...
The TSL Candyman




Hero Of The Queene!

Offline Jeysie

  • Omnipotent Being
  • *********
  • Posts: 4635
Re:Making a Forum
« Reply #7 on: October 29, 2003, 08:38:57 PM »
I'm just a neatnik with a bad memory. Anytime I see anything start piling up, I say, "Whoa, hold on here!", and I start seeing what stuff I don't need that I can dump, and what's the most logical way to sort out what's left behind. So it doesn't matter too much that I can't always remember where stuff is, because everything is always in the most "logical" spot, anyway. It's been a successful method of keeping track of my stuff, both material and virtual, so far. :)

Peace & Luv, Liz

Offline Oldbushie

  • Administrator
  • Phoenix Groupie
  • *****
  • Posts: 7488
  • Gender: Other
  • Mmmm... rich creamery butter...
    • Aerobush Entertainment
Re:Making a Forum
« Reply #8 on: October 29, 2003, 08:45:05 PM »
On another topic...
When you say this, it means you should make a new thread...   ::)
* Yonkey thinks it's time for this thread to get some splittin'

Lol! Yeah, true, though it did kinda spring off of the discussion in there... ;)

So, Yonkey, you glad to have the "split+merge" feature back? ;D
.......... <3 Oldbushie <3 ..........
Forum Emoticon God
Master of Time and Space
Aerobush of the Jarada Knights
TSL Programmer
and...
The TSL Candyman




Hero Of The Queene!

Offline Yonkey

  • Phoenix Honour Guard
  • ************
  • Posts: 18427
  • Gender: Male
  • Nothing ventured, nothing gained
Re:Making a Forum
« Reply #9 on: October 29, 2003, 10:57:45 PM »
IMHO, the only time you should combine steps is when each step should always be presented the same way (for instance, some of my nav menu "cells" have different individual purposes, but they all serve the same "general" purpose, so they're coded and styled the same). Either that, or when it's fairly easy to separate the steps back out again if you need to.

Ahhh ok, this is called generalization in object-oriented programming.  If different "cells" (also called classes in C++/Java) perform the same method, that method can be put into a superclass, and these classes would be subclasses of it.  They would use that same general "purpose", but may do different things afterwords.

Still with me?  Say you have three King's Quest games: KQ3, KQ6 and KQ9.  All three of them involve Alexander.  So, if you wanted to talk about Alex, you wouldn't say KQ3 Alex, KQ6 Alex and KQ9 Alex, in every sentence because it's so redundant.  We know it's the same guy!  So, the superclass would be Alexander and KQ3, KQ6 and KQ9 would be the subclasses, which would each inherit him.  Now you know why he's the royal heir.   ;D

So if you wanted to talk about Alex in general, you'd just refer to Alexander, but if you wanted to talk specifically about when he was a slave, you'd use KQ3.Alexander.

As for program coding, I too know exactly what everything I write does.  But the reasoning behind it is that when you're in industry, you're often working with other people's code.  If they didn't comment theirs properly, it would take you ages to figure out why their program does this and that.  What I said before is true too, just because you know the program now, doesn't mean you will remember in 6 months or a year from now.   :P

Oh yeah bushie, I LOVE split and merge.  It's done wonders already!   :suffer:
"A wish changes nothing. A decision changes everything."

Offline Jeysie

  • Omnipotent Being
  • *********
  • Posts: 4635
Re:Making a Forum
« Reply #10 on: October 30, 2003, 12:39:09 AM »
Well, that's certainly one of the more creative analogies I've seen. :suffer:

It makes perfect sense, though. In fact, it reminds me exactly of how CSS is structured.

As for comments... if someone else was going to be working on my stuff, I'd definitely comment it for them... I think the structure is mostly logical enough, but some of my abbreviations might be a little esoteric. ;) I usually don't have a problem remembering my own stuff, though... I usually at least remember the way I think. ;D

Peace & Luv, Liz
 

anything