Help Rebuild OsCommerce

Looking for volunteers to join your project? Need help with a script but can't afford to pay? Want to offer your services as a volunteer to build up your portfolio? This is the place for you...

Moderator: General Moderators

User avatar
Benjamin
Site Administrator
Posts: 6935
Joined: Sun May 19, 2002 10:24 pm

Post by Benjamin »

The server was running fine but for some reason astions wasn't available. I'll look into why this happened. If an issue such as this should arise again, please email me at agtlewis at gmail dot com.
User avatar
ok
Forum Contributor
Posts: 393
Joined: Wed May 31, 2006 9:20 am
Location: The Holy Land

Post by ok »

According to onion2k's dns Gantt chart, we should start design the DB!
http://www.ooer.com/onion/dnsGantt2.png
feyd | we don't need a massive image breaking the page layout.

Where we are standing in the DB design?

PHP5/OOP:
I think that we should write it with a super-class:
dns_superclass.php

Code: Select all

<?php
Class DNS_super_class
{
  var $sql_core;
  var $theme_core;
  //...
}
?>
dns_db_class.php

Code: Select all

<?php
Class DNS_db_class
{
  var $dns_superclass;
  //...
?>
index.php

Code: Select all

<?php
require_once "dns_superclass.php";
require_once "dns_db_class.php";
$dns_superclass = new DNS_super_class;
$dns_superclass->sql_core = new DNS_db_class;
$dns_superclass->sql_core->dns_superclass &= $dns_superclass;
?>
I think that it's the best way for OOP.
User avatar
Jenk
DevNet Master
Posts: 3587
Joined: Mon Sep 19, 2005 6:24 am
Location: London

Post by Jenk »

We haven't finished the specification(s) yet :)

and btw - your code is php4, not 5 :p
User avatar
onion2k
Jedi Mod
Posts: 5263
Joined: Tue Dec 21, 2004 5:03 pm
Location: usrlab.com

Post by onion2k »

Good to see that a lot has been done. There's only a handful of sections that need additions and we'll be on track to start writing the code and DB spec. And then actually start coding!
User avatar
ok
Forum Contributor
Posts: 393
Joined: Wed May 31, 2006 9:20 am
Location: The Holy Land

Post by ok »

and btw - your code is php4, not 5 :p
:D - Right now I use PHP4 because my hosting company only supports it...

what is the implementation of that code in PHP5?
feyd | we don't need a massive image breaking the page layout.
You are right... I just posted it and run to other things... thanks
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

ok wrote:You are right... I just posted it and run to other things... thanks
No problem; that's why I just edited it and left a tiny note. :)
User avatar
Jenk
DevNet Master
Posts: 3587
Joined: Mon Sep 19, 2005 6:24 am
Location: London

Post by Jenk »

ok wrote:
and btw - your code is php4, not 5 :p
:D - Right now I use PHP4 because my hosting company only supports it...

what is the implementation of that code in PHP5?

Code: Select all

<?php 
class DNS_super_class 
{ 
  public $sql_core; 
  public $theme_core; 
  //... 
} 
?>
and when assigning, you don't use the reference operator (no need to, all objects are now passed by ref.)

:)
User avatar
ok
Forum Contributor
Posts: 393
Joined: Wed May 31, 2006 9:20 am
Location: The Holy Land

Post by ok »

Cool 8)

So it we be much easier to implement this method!!!
User avatar
ok
Forum Contributor
Posts: 393
Joined: Wed May 31, 2006 9:20 am
Location: The Holy Land

Post by ok »

Hello,

After a though week I eventually have time to work on DNS...

I can see that according to the gantt chart the DB design should be ready, so...

I have an initial design:

Code: Select all

CREATE DATABASE `dns`;

-- ----------------------------------------------------------------------------------

CREATE TABLE `dns_config` (
  `type` varchar(255) NOT NULL,
  `value` varchar(255) NOT NULL default '-1',
  PRIMARY KEY  (`type`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------------------------------------------------------------

CREATE TABLE `dns_error` (
  `error_id` int(10) NOT NULL default '0',
  `error_level` varchar(2) NOT NULL default '',
  `message` varchar(255) NOT NULL default '',
  `log` tinyint(1) NOT NULL default '1',
  `print` tinyint(1) NOT NULL default '0',
  `stop_execution` tinyint(1) NOT NULL default '0',
  KEY `error_id` (`error_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------------------------------------------------------------

CREATE TABLE `dns_groups` (
  `id` int(5) NOT NULL auto_increment,
  `name` varchar(255) NOT NULL,
  `admin_system` tinyint(1) NOT NULL,
  PRIMARY KEY  (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;

-- ----------------------------------------------------------------------------------

CREATE TABLE `dns_members` (
  `id` mediumint(8) NOT NULL auto_increment,
  `name` varchar(255) NOT NULL,
  `real_name` varchar(255) NOT NULL,
  `group` smallint(3) NOT NULL default '0',
  `password` varchar(255) NOT NULL,
  `secret_question` varchar(100) NOT NULL,
  `secret_answer` varchar(100) NOT NULL,
  `email` varchar(150) NOT NULL default '-1',
  `joined` int(10) NOT NULL default '0',
  `ip_address` varchar(16) NOT NULL,
  `time_offset` tinyint(2) NOT NULL default '0',
  `theme` varchar(255) NOT NULL default '-1',
  `local` varchar(32) NOT NULL default '-1',
  PRIMARY KEY  (`id`),
  KEY `name` (`name`),
  KEY `mgroup` (`group`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;

-- ----------------------------------------------------------------------------------

CREATE TABLE `dns_sessions` (
  `session_id` char(32) NOT NULL default '',
  `session_user_id` mediumint(8) NOT NULL default '0',
  `session_start` int(11) NOT NULL default '0',
  `session_end` int(11) NOT NULL default '0',
  `session_user_ip` char(15) NOT NULL default '0',
  `session_is_logged` tinyint(1) NOT NULL default '0',
  PRIMARY KEY  (`session_id`),
  KEY `session_user_id` (`session_user_id`),
  KEY `session_user_ip` (`session_user_ip`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
Explanation:
dns_error:
This table contains E,W and N level errors.
`error_id` - Error id, i.e 100 - module not found.
`error_level` - Error level, i.e Notice, Warning, Error... (like in PHP).
`message` - The reference to the message in the local file. This reference will be used to the local file of the log and the print.
`log` - Log the error. 0-No, 1-Yes.
`print` - Print the error to the screen. 0-No, 1-Yes.
`stop_execution` - Stop the execution of DNS. If print set to 1, this also should set to 1. 0-No, 1-Yes.

dns_config:
This table contains default configuration.
`type` - The config type, i.e default_theme, default_local, default_time_zone, site_url...
`value` - The value set to the type, i.e default_theme=dns_default, site_url=dns.com...

dns_groups:
This table contains all dns groups.
`id` - Group ID
`name` - Group name
`admin_system` - Group members can administrate dns or not. 0-No, 1-Yes.
Note: Additional permissions can be added to this table after the `admin_system` column!

dns_members:
This table contains all dns members.
If you don't understand what this table does, reply.

dns_sessions:
This table contains all active sessions.
`session_id` - The session set by PHP.
`session_user_id` - The user id that 'own' this session. (If not logged, set to -1).
`session_start` - time() when the session started.
`session_end` - time() when the session will expired.
`session_user_ip` - The user ip.
`session_is_logged` - 0-Not logged, 1-Logged.
User avatar
ok
Forum Contributor
Posts: 393
Joined: Wed May 31, 2006 9:20 am
Location: The Holy Land

Post by ok »

The project is dead???
User avatar
Luke
The Ninja Space Mod
Posts: 6424
Joined: Fri Aug 05, 2005 1:53 pm
Location: Paradise, CA

Post by Luke »

I'm still very interested, but from the beginning I've been in on it to learn from others... I don't have enough experience to lead the project in even the slightest... :(

I hope it's not dead...
User avatar
ok
Forum Contributor
Posts: 393
Joined: Wed May 31, 2006 9:20 am
Location: The Holy Land

Post by ok »

I also joined the project in order to learn new things... lol

Like you said:
I hope it's not dead...
Let's hope.
User avatar
Luke
The Ninja Space Mod
Posts: 6424
Joined: Fri Aug 05, 2005 1:53 pm
Location: Paradise, CA

Post by Luke »

I don't think astions is posting here anymore, but I figured he still would come to work on this project... I guess we'll find out.
User avatar
ok
Forum Contributor
Posts: 393
Joined: Wed May 31, 2006 9:20 am
Location: The Holy Land

Post by ok »

onion2k is one of the 'top' leaders of the this project (he made the Gantt-Chart) and in the past five/four days
he didn't post a single post. Maybe they are busy etc...
User avatar
Jenk
DevNet Master
Posts: 3587
Joined: Mon Sep 19, 2005 6:24 am
Location: London

Post by Jenk »

Image

Had a spare 5mins.

Will re-host and post on wiki later.
Post Reply