vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Community Lounge (https://vborg.vbsupport.ru/forumdisplay.php?f=13)
-   -   I'm going to attempt the impossible (https://vborg.vbsupport.ru/showthread.php?t=85843)

filburt1 12-29-2002 11:09 PM

I'm going to attempt the impossible
 
...write a forum engine. I'll try just starting with something extraordinarily simple and see what happens mainly because honestly I think parts of vB2 are so crappily designed than it needs complete overhauling and I can't wait to see if I'm going to be a limited public beta tester :p

Tony G 12-29-2002 11:10 PM

All I can say is, good luck! :)

filburt1 12-29-2002 11:13 PM

Seriously, I'll need it :(

Nairb 12-29-2002 11:38 PM

I've always wanted to ask this:

What's a forum engine? O_o

filburt1 12-29-2002 11:41 PM

vBulletin, phpBB, UBB, etc.

Tony G 12-29-2002 11:49 PM

Quote:

Originally posted by filburt1
Seriously, I'll need it :(
I'm sure you can pull it through. :)

filburt1 01-02-2003 06:04 PM

Dun dun dun!

Quote:

Test variable contains: " it worked "
Elapsed: 0.0106 sec; queries: 1
It begins [ex]

assassingod 01-02-2003 06:56 PM

Cool:)

filburt1 01-02-2003 06:59 PM

That happens to be the output of around 200 lines of code including the 100% original database wrapper class and new template engine :)

assassingod 01-02-2003 07:03 PM

Lol:S 200 lines and thats all you get?

You really are the man at this stuff:p;)

filburt1 01-02-2003 07:05 PM

Well it's connecting to the database, starting a stopwatch, fetching raw template contents, eval'ing it, and then echoing the output.

And no I didn't do this:
Code:

echo "Test variable contains: \" it worked \""; // suckers!

Tony G 01-02-2003 09:59 PM

Weee, Good luck now that you've started! :D

filburt1 01-02-2003 10:01 PM

Hey I'm going simple, no multiple levels of forums, no PMs, no announcements, etc. Just posts, threads, and forums for starters. :)

Tony G 01-02-2003 10:04 PM

Screenshot anything you get done! :p

Should be super fast with only that on the forum. ;)

filburt1 01-02-2003 10:05 PM

0.002 seconds for the main page that references everything :D

There aren't that many templates because nothing that will be echoed will be hardcoded (a lession learned from vB2 template modding) but I'll have a screenshot in a few minutes once I fix a quick bug.

Tony G 01-02-2003 10:05 PM

Already something done, quick one. ;)

*Will feel like being on Cable* ;)

filburt1 01-02-2003 10:06 PM

1 Attachment(s)
Coincidently an error message screenshot:

Tony G 01-02-2003 10:08 PM

Didn't expect that one at all! :p

filburt1 01-02-2003 10:10 PM

1 Attachment(s)
Undergoing the startup procedure...

filburt1 01-02-2003 10:13 PM

And code! Yay!
PHP Code:

<?
require_once("helpers/mysqldbwrapper.php");
require_once("helpers/templates/engine.php");
require_once("helpers/miniclasses.php");
require_once("helpers/settings.php");

$watch = new stopwatch();

echo "Connecting to database...<br>";
$db = new mysqldbwrapper("localhost", "newforum", "mypasswordisnt", "yourpassword");

echo "Loading settings...<br>";
loadallsettings();

echo "Caching templates...<br>";
cachealltemplates();

echo "Startup complete!<br><br>";


$testvar = "it worked";
eval(makeevaltemplatecode("testtemplate", "echovar"));
echo "$echovar<br>";

echo "Shutting down db connection...<br>";
$db->close();

echo "Elapsed: " . $watch->elapsed() / 1000 . " sec; queries: " . $db->querycount;
?>


Tony G 01-02-2003 11:05 PM

Mmmm low querie numbers. :)

filburt1 01-03-2003 02:33 AM

I leave you tonight with:
Quote:

Ending output buffering...
Defining presettings...
Connecting to database...
Loading settings...
Caching templates...
Startup complete (0.0103 sec, 2 queries)
--------------------------------------------------------------------------------
testsetting (): Edit
Value: settings work...still


--------------------------------------------------------------------------------
Closing db connection...
Shutdown completed (0.0007)
Total Elapsed: 0.0161 sec; queries: 3
Tomorrow the template engine gets a backend interface :)

Creative210 01-03-2003 03:34 AM

Much luck with your project in hand Filbert1. :)

filburt1 01-03-2003 04:11 PM

It's really fast to boot up, now!
Code:

Ending output buffering...Done
Defining presettings...Done
Connecting to database...Done
Loading settings...1 loaded
Startup complete (0.0094 sec, 1 queries)

:D

filburt1 01-03-2003 05:25 PM

Yay! This is the result of the fully-template-driven output:
Quote:

Ending output buffering...Done
Defining presettings...Done
Connecting to database...Done
Loading settings...1 loaded
Caching templates...4 cached
Startup complete (0.0116 sec, 2 queries)
--------------------------------------------------------------------------------
Begin forumbits:

The First Forum (Subject says all.) with 0 threads and 0 posts
The second forum (Again!) with 0 threads and 0 posts

End forumbits
--------------------------------------------------------------------------------
Closing db connection...
Shutdown completed (0.0013)
Total Elapsed: 0.0162 sec; queries: 3
*drool*

filburt1 01-03-2003 06:06 PM

That's a big query:
Quote:

SELECT f.id AS id, f.title AS title, f.description AS description,
COUNT(DISTINCT p.threadid) AS threadcount, COUNT(p.id) AS postcount FROM forums f, posts p WHERE p.forumid = f.id GROUP BY p.forumid
This is actually a really fun project, you should try it sometime. Just don't think big.

Rufus69 01-03-2003 11:55 PM

SWEET!

me and my staff are making Paradox Vision (a forum system o_o) if ya need any help just call me ;)

ps. I can help with forum graphics and you can have my skinning script if ya want it o_o

filburt1 01-04-2003 12:00 AM

Templates and graphics will be one of the last things I'll do, I need to fully write the backend first :)

Rufus69 01-04-2003 12:55 AM

cool I can help if ya need me though :)

filburt1 01-04-2003 01:02 AM

Sounds good :)

Tony G 01-04-2003 02:14 AM

Oooo, coding templates sounds like fuuuun. :D

Rufus69 01-04-2003 02:48 PM

lol I know :D

*wants to be like one of the staff members at vb.com* >_>

but I'm already working on a php skinning system for my site....so maybe we can use that for it if you ever get to that point :D

filburt1 01-04-2003 04:10 PM

My template system is different from vB's in the sense that there are "bit" templates and "master" templates. Yes that's like vB's but mine have a strict difference and are displayed differently to eliminate any ambiguity.

(I also have to work on a replacement system but that's a while to go ;))

Rufus69 01-04-2003 07:16 PM

just tellin ya that you don't have to do it all by yourself.... ;)


and if you did that would take a looooong time lol

filburt1 01-04-2003 07:18 PM

I should be done within the month with the basics. My system is using a top-down design so once the core is done the rest will be extremely easy.

filburt1 01-05-2003 12:31 AM

Heh, if you thought vB's template code was easy, check this out:
Code:

$output = evaltemplate("sometemplate");
That's it! Even easier than PAPI :D Took a hell of a lot of thinking to get it like that, though.

N9ne 01-05-2003 12:46 PM

And how much is filburt going to charge for this system? :D

filburt1 01-05-2003 02:12 PM

Nothing because I can't fight piracy.

N9ne 01-05-2003 02:34 PM

That's good, so we can all use it and abuse it for free :D

filburt1 01-05-2003 02:50 PM

It couldn't compete with paid boards anyway...


All times are GMT. The time now is 12:34 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01492 seconds
  • Memory Usage 1,791KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (3)bbcode_code_printable
  • (1)bbcode_php_printable
  • (5)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete