Author Topic: One Forum One Page  (Read 15518 times)

0 Members and 1 Guest are viewing this topic.

Offline bja888

  • Flagrunner
  • ****
  • Posts: 745
  • Working
    • Bja888.com
One Forum One Page
« on: June 10, 2006, 04:01:54 pm »
Has anyone else noticed that this entire forums is on one single page? Click to any page, its a ll a querystring on the same index.php. This must be a nightmare to do advanced configurations on. I understand how the active topics script might be a pain to fix. It would probably take weeks to pinpoint a problem if it arises.

Offline frogboy

  • Soldier
  • **
  • Posts: 107
Re: One Forum One Page
« Reply #1 on: June 10, 2006, 08:39:25 pm »
index.php has "require_once()"'s to other scripts on the server for the different pages it needs to display. It also checks if a user is banned, checks a user's permissions, etc. It's not just some massive script that does everything in the forum.

e.g.:
Code: [Select]
index.php:
if (empty($board) && empty($topic))
{
require_once($sourcedir . '/BoardIndex.php');
return 'BoardIndex';
}

Offline ElephantHunter

  • Retired Administrator
  • Camper
  • *****
  • Posts: 431
  • Third President
    • - home of the admins -
Re: One Forum One Page
« Reply #2 on: June 10, 2006, 09:22:31 pm »
Wow. Just, wow....  :P

Frogboy is right. The index page just links to external libraries. These external libraries do most of the data-crunching. Ever notice that the executables for the majority of games are really small, but they have tons of external files? Same concept.
Everything you have done in life is measured by the DASH on your gravestone.
Stop wasting time.
Make your dash count.

Offline bja888

  • Flagrunner
  • ****
  • Posts: 745
  • Working
    • Bja888.com
Re: One Forum One Page
« Reply #3 on: June 11, 2006, 01:22:44 am »
Aware of using smaller components I am. Though not strictly bound to it. I my self prefer amassing smaller components to piece together a larger one.

It seems like your putting all your eggs in one basket though.


Edit: Just wait. I'll come up with good reason not to...
« Last Edit: June 11, 2006, 01:27:53 am by bja888 »

Offline FliesLikeABrick

  • Administrator
  • Flamebow Warrior
  • *****
  • Posts: 6144
    • Ultimate 13 Soldat
Re: One Forum One Page
« Reply #4 on: June 11, 2006, 09:15:48 pm »
bja888, your argument here is entirely unreasonable.  Are you going to accuse me of having U13 run all on one page too (everything there shows up like it is on index.php too)?

Offline EnEsCe

  • Retired Soldat Developer
  • Flamebow Warrior
  • ******
  • Posts: 3101
  • http://enesce.com/
    • [eC] Official Website
Re: One Forum One Page
« Reply #5 on: June 11, 2006, 09:31:48 pm »
Even my site has everything run off index.php.....

Offline bja888

  • Flagrunner
  • ****
  • Posts: 745
  • Working
    • Bja888.com
Re: One Forum One Page
« Reply #6 on: June 11, 2006, 10:35:45 pm »
I'll come up with a good reason.... just let me think about it.

Offline n00bface

  • Global Moderator
  • Soldier
  • *****
  • Posts: 160
Re: One Forum One Page
« Reply #7 on: June 11, 2006, 10:53:07 pm »
Yeah even my shitty website runs scripts externally from index.php

Offline jettlarue

  • Flagrunner
  • ****
  • Posts: 724
Re: One Forum One Page
« Reply #8 on: June 11, 2006, 11:14:36 pm »
some websites dont require use of php so they have multiple .html or whatever files. but for forums it works great because to edit something you just edit a library, not the actual file that displays stuff. so if you were to mess up a forums library, correct me if i am wrong, only the functions used by that library would be shit. well anyways i am confusing myself now, but basically just having one file for a main thing runs fine. its like having soldat have 10 different executebals and they all send data to each other, why would u do that when you could just have one and do the same thing...but soldat has dll's it reads from, much like a forums index.php....hope this helps :S