vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Community Lounge (https://vborg.vbsupport.ru/forumdisplay.php?f=13)
-   -   Biggest coding project ever (https://vborg.vbsupport.ru/showthread.php?t=71981)

filburt1 11-21-2004 03:18 AM

Biggest coding project ever
 
My fingers hurt:
Code:

    * includes/functions_vbms.php is 893 lines
    * includes/functions_vbms_installer.php is 546 lines
    * includes/init_vbms.php is 120 lines
    * includes/preinit_vbms.php is 4 lines
    * includes/vbms_checkmail_classdefs.php is 22 lines
    * includes/vbms_checkmail_filterengine.php is 100 lines
    * includes/vbms_checkmail_functions.php is 253 lines
    * includes/vbms_frontend_init.php is 26 lines
    * includes/cron/vbms_checkmail.php is 522 lines
    * vbms.php is 116 lines
    * vbms_ab.php is 118 lines
    * vbms_alias.php is 86 lines
    * vbms_filters.php is 112 lines
    * vbms_folders.php is 80 lines
    * vbms_misc.php is 49 lines
    * vbms_new.php is 182 lines
    * vbms_read.php is 80 lines
    * admincp/install_vbms.php is 139 lines
    * admincp/vbms_permissions.php is 131 lines
    * admincp/install_vbms_steps/step0.php is 111 lines
    * admincp/install_vbms_steps/step1.php is 109 lines
    * admincp/install_vbms_steps/step2.php is 27 lines
    * admincp/install_vbms_steps/step3.php is 68 lines
    * admincp/install_vbms_steps/step4.php is 35 lines
    * admincp/install_vbms_steps/step5.php is 12 lines

Total PHP: 3,941
Style XML is 204 lines
Grand total of PHP and style XML is 4,145 lines of code

...and that doesn't include the templates. It's a pretty good feeling to have it almost done, but man it's a lot of code. In the real world, this would be a two or three man coding team. :(

bob46802 11-21-2004 03:37 AM

once its done, think about how good it will feel to have done all the work :D

Reeve of shinra 11-21-2004 03:55 AM

vbms?

AN-net 11-21-2004 04:55 AM

is this vb's official CMS?

Oblivion Knight 11-21-2004 06:48 AM

If you looked in his signature, you'd have your answer.. :)

Quote:

vBMS (webmail for your users; send PM for details);

Dean C 11-21-2004 09:36 AM

Is that it ;)? I just finished a project with over 60k lines, and way way more in templating :)

MindTrix 11-21-2004 10:40 AM

Dean did you just create vB4? :)

Dean C 11-21-2004 10:59 AM

No a bespoke CMS :)

MindTrix 11-21-2004 11:14 AM

*nods like he has a clue what your on about*

Ahhhh ive errm.......been meaning to get one of them.......

*runs*

burnist 11-21-2004 11:33 AM

Quote:

bespoke
?? o_O

Quote:

..and that doesn't include the templates. It's a pretty good feeling to have it almost done, but man it's a lot of code. In the real world, this would be a two or three man coding team.
You should be proud them, theres no way I would sit and code that much on my own :)

Gio~Logist 11-21-2004 11:42 AM

quick question, is sais it's available for vbv2.3.x where can i get it?

also, wouldnt a hack like this take up a HELL of a lot of space in your DB?

Dean C 11-21-2004 12:01 PM

Bespoke = custom-made

... For those that asked :)

filburt1 11-21-2004 01:19 PM

Quote:

Originally Posted by gio~logist
quick question, is sais it's available for vbv2.3.x where can i get it?


also, wouldnt a hack like this take up a HELL of a lot of space in your DB?

1. Yes; http://www.webdesignforums.net/vbms/ .
2. It doesn't take up much space at all. All it needs initially is a few new tables for storing messages, address book entries, etc. and space for the templates and other standard information.

filburt1 11-23-2004 03:52 AM

The contents of my command prompt today when testing stuff that requires the database to be reset every time I encounter a bug:
Code:

C:\Documents and Settings\filburt1\Desktop>\mysql\bin\mysql -uroot vb3-vbmssandbox < vb3-vbmssandbox.sql

C:\Documents and Settings\filburt1\Desktop>\mysql\bin\mysql -uroot vb3-vbmssandbox < dropalltables.sql

C:\Documents and Settings\filburt1\Desktop>\mysql\bin\mysql -uroot vb3-vbmssandbox < vb3-vbmssandbox.sql

C:\Documents and Settings\filburt1\Desktop>\mysql\bin\mysql -uroot vb3-vbmssandbox < dropalltables.sql

C:\Documents and Settings\filburt1\Desktop>\mysql\bin\mysql -uroot vb3-vbmssandbox < vb3-vbmssandbox.sql

C:\Documents and Settings\filburt1\Desktop>\mysql\bin\mysql -uroot vb3-vbmssandbox < dropalltables.sql

C:\Documents and Settings\filburt1\Desktop>\mysql\bin\mysql -uroot vb3-vbmssandbox < vb3-vbmssandbox.sql

C:\Documents and Settings\filburt1\Desktop>\mysql\bin\mysql -uroot vb3-vbmssandbox < dropalltables.sql

C:\Documents and Settings\filburt1\Desktop>\mysql\bin\mysql -uroot vb3-vbmssandbox < vb3-vbmssandbox.sql

C:\Documents and Settings\filburt1\Desktop>\mysql\bin\mysql -uroot vb3-vbmssandbox < dropalltables.sql

C:\Documents and Settings\filburt1\Desktop>\mysql\bin\mysql -uroot vb3-vbmssandbox < vb3-vbmssandbox.sql

C:\Documents and Settings\filburt1\Desktop>\mysql\bin\mysql -uroot vb3-vbmssandbox < dropalltables.sql

C:\Documents and Settings\filburt1\Desktop>\mysql\bin\mysql -uroot vb3-vbmssandbox < vb3-vbmssandbox.sql

C:\Documents and Settings\filburt1\Desktop>\mysql\bin\mysql -uroot vb3-vbmssandbox < dropalltables.sql

C:\Documents and Settings\filburt1\Desktop>\mysql\bin\mysql -uroot vb3-vbmssandbox < vb3-vbmssandbox.sql

C:\Documents and Settings\filburt1\Desktop>\mysql\bin\mysql -uroot vb3-vbmssandbox < dropalltables.sql

C:\Documents and Settings\filburt1\Desktop>\mysql\bin\mysql -uroot vb3-vbmssandbox < vb3-vbmssandbox.sql

C:\Documents and Settings\filburt1\Desktop>\mysql\bin\mysql -uroot vb3-vbmssandbox < dropalltables.sql

C:\Documents and Settings\filburt1\Desktop>\mysql\bin\mysql -uroot vb3-vbmssandbox < vb3-vbmssandbox.sql

C:\Documents and Settings\filburt1\Desktop>\mysql\bin\mysql -uroot vb3-vbmssandbox < dropalltables.sql

C:\Documents and Settings\filburt1\Desktop>\mysql\bin\mysql -uroot vb3-vbmssandbox < vb3-vbmssandbox.sql

C:\Documents and Settings\filburt1\Desktop>\mysql\bin\mysql -uroot vb3-vbmssandbox < dropalltables.sql

C:\Documents and Settings\filburt1\Desktop>\mysql\bin\mysql -uroot vb3-vbmssandbox < vb3-vbmssandbox.sql


Wired1 11-30-2004 11:23 AM

filburt = code minkey :)

Tony G 11-30-2004 11:35 AM

I admire all the work you've put into this, many people wouldn't take something like this on solely. Keep up the good work. :)

Zero Tolerance 11-30-2004 02:24 PM

RPG Inferno Version 2.0

inferno.php - 13,578 Lines Of PHP
inferno_aibot_control.php - 569 Lines Of PHP
inferno_auction_control.php - 109 Lines Of PHP
inferno_battle_control.php - 220 Lines Of PHP
inferno_battlefield_control.php - 226 Lines Of PHP
inferno_battlemusic_control.php - 207 Lines Of PHP
inferno_clan_control.php - 276 Lines Of PHP
inferno_donate_control.php - 81 Lines Of PHP
inferno_element_control.php - 326 Lines Of PHP
inferno_functions.php - 65 Lines Of PHP
inferno_healing_control.php - 268 Lines Of PHP
inferno_help_control.php - 195 Lines Of PHP
inferno_itemshop_control.php - 1,097 Lines Of PHP
inferno_job_control.php - 341 Lines Of PHP
inferno_lottery_control.php - 302 Lines Of PHP
inferno_main_control.php - 378 Lines Of PHP
inferno_rpgavatar_control.php - 460 Lines Of PHP
inferno_rpgmember_control.php - 1,194 Lines Of PHP
inferno_rpgworld_control.php - 845 Lines Of PHP
inferno_section_control.php - 143 Lines Of PHP
inferno_spells_control.php - 376 Lines Of PHP
inferno_store_control.php - 266 Lines Of PHP
inferno_summon_control.php - 272 Lines Of PHP
inferno_synthesis_control.php - 345 Lines Of PHP
inferno_tripletriad_control.php - 573 Lines Of PHP
inferno_tripletriadbattle_control.php - 163 Lines Of PHP
install_inferno.php - 738 Lines Of PHP
upgrade_inferno.php - 854 Lines Of PHP
spell_absorb_hp.php - 134 Lines Of PHP
spell_cast_DAMAGE.php - 137 Lines of PHP
spell_Moon_Light.php - 124 Lines Of PHP
spell_MP_Burn.php - 127 Lines Of PHP
spell_Rage_Blaster.php - 128 Lines Of PHP
spell_Remedy.php - 115 Lines Of PHP
store_Increase_DEF.php - 92 Lines Of PHP
store_Increase_HP.php - 92 Lines Of PHP
store_Increase_MP.php - 92 Lines Of PHP
store_Increase_Rage.php - 92 Lines of PHP
store_Increase_STR.php - 92 Lines Of PHP
store_Increase_Summon_DEF.php - 98 Lines Of PHP
store_Increase_Summon_HP.php - 98 Lines Of PHP
store_Increase_Summon_MP.php - 98 Lines Of PHP
store_Increase_Summon_STR.php - 98 Lines Of PHP
store_Name_Color.php - 122 Lines Of PHP
store_Name_Glow.php - 122 Lines Of PHP
store_Steal.php - 196 Lines Of PHP
inferno.xml (Templates) - 3,920 Lines Of HTML/Javascript

Total Files: 47
Total Lines Of PHP: 26,533
Total Lines Including Templates: 30,453

Heh...

- Zero Tolerance

Dean C 11-30-2004 03:09 PM

Did you use anything to produce those stats Zero :)?

Erwin 11-30-2004 10:03 PM

Looks great. :) I may get a license to check it out.

Zero Tolerance 11-30-2004 11:13 PM

Quote:

Originally Posted by Dean C
Did you use anything to produce those stats Zero :)?

Yeah .. i opened each individual file, went to the bottom of everyone, press ctrl+g (in notepad btw). And up comes the line number :)

Btw Erwin .. i think you bought a year license for inferno .. so you can just update since your license isn't a year old yet.

- Zero Tolerance

Dean C 12-01-2004 07:00 AM

Shame there's not a tool to do that automatically :)

Zero Tolerance 12-01-2004 08:00 AM

Quote:

Originally Posted by Dean C
Shame there's not a tool to do that automatically :)

I suppose a simple php script could open all files in a certain directory and find it out. But it would be no use to anyone here :p

- Zero Tolerance

Dean C 12-01-2004 11:54 AM

Oh yeah, that could be done quite easily too :)

[high]* Dean C codes it[/high]

Tal-CPO 12-01-2004 12:56 PM

Quote:

Originally Posted by Zero Tolerance
I suppose a simple php script could open all files in a certain directory and find it out. But it would be no use to anyone here :p

- Zero Tolerance


if you use linux/unix/mac try "wc"

lko@raysrv1:/home/lko> wc bin/*
0 0 0 bin/CVS
23 41 509 bin/addop.sh
38 70 870 bin/cleanup.sh
175 677 6170 bin/create-instance.sh
23 41 509 bin/delop.sh
64 142 1360 bin/gen_email_conf.sh
26 54 559 bin/jas3-cleanup.sh
67 225 1424 bin/logrotate
76 185 1856 bin/make-httpd-conf.sh
81 259 2125 bin/remove-instance.sh
58 175 1366 bin/update-me.sh
631 1869 16748 total


;)

filburt1 12-01-2004 01:57 PM

Quote:

Originally Posted by Dean C
Shame there's not a tool to do that automatically :)

I just wrote a script in PHP...;)

Dean C 12-01-2004 02:40 PM

Upload a phps and PM me the url - I'm too lazy to code one now that I got started on coding WinterDir for the night again :)

filburt1 12-01-2004 05:07 PM

Here it is (with some parts removed). It's obviously very uniquely coded to my needs.
PHP Code:

<?php
$files 
= array
(
    
"includes/functions_vbms",
    
"includes/functions_vbms_installer",
    
"includes/init_vbms",
    
"includes/preinit_vbms",
    
"includes/vbms_checkmail_classdefs",
    
"includes/vbms_checkmail_filterengine",
    
"includes/vbms_checkmail_functions",
    
"includes/vbms_frontend_init",
    
"includes/cron/vbms_checkmail",
    
"vbms",
    
"vbms_ab",
    
"vbms_alias",
    
"vbms_filters",
    
"vbms_folders",
    
"vbms_misc",
    
"vbms_new",
    
"vbms_read",
    
"admincp/install_vbms",
    
"admincp/vbms_permissions",
    
"admincp/install_vbms_steps/step0",
    
"admincp/install_vbms_steps/step1",
    
"admincp/install_vbms_steps/step2",
    
"admincp/install_vbms_steps/step3",
    
"admincp/install_vbms_steps/step4",
    
"admincp/install_vbms_steps/step5",
    
"admincp/install_vbms_queries/settings",
    
"admincp/install_vbms_queries/stylechangeslist",
    
"admincp/install_vbms_queries/vbmstables"
);

echo 
"<ul>";
$total 0;
foreach (
$files as $file)
{
    
$filename = (strpos($file"queries") ? "$file.sql" "$file.php");
    
$linecount sizeof(file("foo/$filename"));
    echo 
"<li>$filename is $linecount lines</li>";
    
$total += $linecount;
}
echo 
"</ul>";
echo 
"Total PHP and SQL: " number_format($total) . "<br />";

$stylelines sizeof(file("foo/admincp/install_vbms_xml/phrases.xml"));
echo 
"Style XML is $stylelines lines<br />";

echo 
"<b>Grand total of PHP and style XML is " number_format($stylelines $total) . " lines of code</b>";
?>


Dean C 12-01-2004 05:12 PM

That's cheating - why not do it recursively and filter out any non PHP extensions ;)

Dean C 12-01-2004 05:29 PM

Badda bing badda boom:

PHP Code:

<?php

$path 
$_SERVER['DOCUMENT_ROOT'] . '/dev/';
$total map_dirs($path);
echo 
'<br /><br /><b>Total Lines = ' number_format($total) . '</b>';

function 
get_file_extension($filename)
{
    return 
substr(strrchr($filename'.'), 1);
}

function 
map_dirs($path)
{
    static 
$total_lines 0;
    if(
is_dir($path))
    {
        if(
$contents opendir($path))
        {
            while((
$node readdir($contents)) !== false)
            {
                if(!
in_array($node, array('.''..')))
                {

                    if(
is_dir($path '/' $node)) 
                    {
                        echo 
'<br /><b>' $node '</b>';
                    }
                    else if(
get_file_extension($node) == 'php')
                    {
                        
$linecount sizeof(file($path '/' $node));
                        
$total_lines $total_lines $linecount;
                        echo 
'<br />---- ' $node ' (Lines: ' number_format($linecount) . ')';
                    }
                    
                    
map_dirs($path '/' $node);
                }
            }
        }
    }
    return 
$total_lines;
}
 
?>


assassingod 12-01-2004 06:03 PM

Quote:

Originally Posted by Dean C
Badda bing badda boom:

Bravo!

Link14716 12-01-2004 08:20 PM

And by changing this:
PHP Code:

$path $_SERVER['DOCUMENT_ROOT'] . '/dev/'

To this:
PHP Code:

if (!isset($_POST['path'])) {
 
$path $_SERVER['DOCUMENT_ROOT'] . '/dev/';
} else {
 
$path $_POST['path'];
}

echo 
'<form action="omgcountlines.php" method="post">'."\n";
echo 
'<input type="text" name="path" value="'.$path.'" size="50">'."\n";
echo 
'<input type="submit" name="submit" value="OMG COUNT LINES!">'."\n";
echo 
'</form>'."\n"

You get a nice little box for the path.

Oh, here's uCS in its current form.

uttstore
---- action.boldusername.php (Lines: 107)
---- action.forumaccess.php (Lines: 145)
---- action.admindonate.php (Lines: 103)
---- action.stickythread.php (Lines: 88)
---- action.colorusername.php (Lines: 206)
---- action.changeusername.php (Lines: 110)
---- action.secondaryusergroup.php (Lines: 139)
---- action.bank.php (Lines: 301)
---- action.denyforumaccess.php (Lines: 157)
---- action.glowusername.php (Lines: 207)
---- action.forumpassword.php (Lines: 127)
---- action.thief.php (Lines: 152)
---- action.giveforumaccess.php (Lines: 161)
---- action.italicusername.php (Lines: 100)
---- action.changetitle.php (Lines: 101)
---- action.changeothertitle.php (Lines: 130)
---- action.donate.php (Lines: 121)
includes
---- functions_uttstore.php (Lines: 511)
images
uttstore
admincp
---- uttstoreadmin.php (Lines: 519)
---- ushop_install.php (Lines: 1,184)
---- ushop.php (Lines: 531)

Total Lines = 5,200

Erwin 12-01-2004 09:51 PM

Quote:

Originally Posted by Zero Tolerance
Yeah .. i opened each individual file, went to the bottom of everyone, press ctrl+g (in notepad btw). And up comes the line number :)

Btw Erwin .. i think you bought a year license for inferno .. so you can just update since your license isn't a year old yet.

- Zero Tolerance

I was talking about filburt's new webmail system. ;)

This thread has become a "My code is BIGGER than yours" competition. ;)

Guys, it's not how big your code is... is how you use it.

AN-net 12-01-2004 10:45 PM

Quote:

Originally Posted by Erwin
I was talking about filburt's new webmail system. ;)

This thread has become a "My code is BIGGER than yours" competition. ;)

Guys, it's not how big your code is... is how you use it.

oh wise erwin, your words are true:)

Dean C 12-02-2004 08:15 AM

Quote:

Originally Posted by Erwin
I was talking about filburt's new webmail system. ;)

This thread has become a "My code is BIGGER than yours" competition. ;)

Guys, it's not how big your code is... is how you use it.

Bigger is better :up:

Erwin 12-02-2004 09:33 PM

Quote:

Originally Posted by Dean C
Bigger is better :up:

I would be more impressed by smaller amounts of efficient code that does the same thing. ;)

filburt1 12-02-2004 10:45 PM

Quote:

Originally Posted by Erwin
I would be more impressed by smaller amounts of efficient code that does the same thing. ;)

To be fair, a huge amount of the lines are PHPDoc...does that count?

Dean C 12-03-2004 09:18 AM

Quote:

Originally Posted by Erwin
I would be more impressed by smaller amounts of efficient code that does the same thing. ;)

I was making a sexual innuendo :disappointed:

Erwin 12-03-2004 11:38 AM

Quote:

Originally Posted by Dean C
I was making a sexual innuendo :disappointed:

Uh... you don't make those with other guys. ;)

AN-net 12-03-2004 11:56 AM

Quote:

Originally Posted by Dean C
I was making a sexual innuendo :disappointed:

poor dean is misunderstood, *gives dean a lolly pop* i found it funny:)

Dean C 12-03-2004 01:54 PM

Quote:

Originally Posted by Erwin
Uh... you don't make those with other guys. ;)

You're no guy Erwina :p


All times are GMT. The time now is 12:25 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.02804 seconds
  • Memory Usage 1,882KB
  • 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
  • (2)bbcode_code_printable
  • (4)bbcode_php_printable
  • (18)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