[OBJ] Website - Code major parts

Archived discussions related to Transport Empire. Read-only access only.

Moderator: Transport Empire Moderators

User avatar
Steve
Tycoon
Tycoon
Posts: 2085
Joined: 10 Jan 2004 20:19
Location: London
Contact:

[OBJ] Website - Code major parts

Post by Steve »

Coding can start on major parts of the website. These have been identified as:
1) A news system to allow the project leaders to post meeting dates and other useful news posts.
2) A system for storing/showing the minutes and logs of the meetings.
3) A prototype layout of how the Design Document will be displayed on the website.
For these three sections, a full admin system is not necessary. They should incorperate the public section of the website and proper admin controls can be added in a later objective.

Members:Steve, The Master
User avatar
The Master
Engineer
Engineer
Posts: 80
Joined: 02 Apr 2005 20:50
Location: Italy
Contact:

Re: [OBJ] Website - Code major parts (until 06-09-2005)

Post by The Master »

Steve wrote: 2) A system for storing/showing the minutes and logs of the meetings.
Its including a complete meeting manager, similar to chat, with voting sistem?

Another question coding language? PHP?
The website have database? MySQL?
User avatar
Steve
Tycoon
Tycoon
Posts: 2085
Joined: 10 Jan 2004 20:19
Location: London
Contact:

Post by Steve »

No, it's just a system for showing the uploading minutes and logs from the meetings.

And yes i forgot to mention, using PHP and MySQL.
User avatar
The Master
Engineer
Engineer
Posts: 80
Joined: 02 Apr 2005 20:50
Location: Italy
Contact:

Post by The Master »

I'm interested to participate (i can try) at this objective (point 2), someone haved starting coding?
User avatar
Steve
Tycoon
Tycoon
Posts: 2085
Joined: 10 Jan 2004 20:19
Location: London
Contact:

Post by Steve »

Not me. I'd just adding some more pages to the website. And then i thought about doing the News.
User avatar
The Master
Engineer
Engineer
Posts: 80
Joined: 02 Apr 2005 20:50
Location: Italy
Contact:

Post by The Master »

I have write some base function, but need guidelines.

Where put:
- Login form
- News write form
- Meeting minutes/log upload form
- Meeting write form
- Admin page (Current only for manage user right)

Current my code package need to work:
- directory for meeting file
- db table for autentication
- db table for news
Work in progress:
- db table for meeting
- directory for error log file

Another question, TE.com have MySQL space problem (Limit)?


Steve please post or send me current site template.
User avatar
Steve
Tycoon
Tycoon
Posts: 2085
Joined: 10 Jan 2004 20:19
Location: London
Contact:

Post by Steve »

Well, i've been making a News system and things such as the simple user table i made are easy to change so everything fits together.

It will be easiest for you to put each part of your system wherever, and make sure it is clear what does what. I can then re-arrange it to fit everything together if needed. Put all the admin section on seperate pages, don't bother with any style, just the HTML.

What kind of MySQL space problem are you expecting? I don't think we'll be having that much data, especially not right now. And to answer your question: The current host is just temporary, as far as i am aware and I don't think we have any limits to worry about.

I've attached the version of the site currently running on transportempire.com, without any of my news modifications. When making new pages for the main site, use template.php
Attachments
Template.zip
(815.61 KiB) Downloaded 298 times
User avatar
The Master
Engineer
Engineer
Posts: 80
Joined: 02 Apr 2005 20:50
Location: Italy
Contact:

Post by The Master »

I have restart code writing, and current i have maked users authentication functions.

This functions work only with MySQL and needs:
- table name 'permission'
- table columns:
- 'userid' this contain unique id
- 'username' this contain username
- 'password' this contain password crypted with MD5
- various access right (ie. admin, news, meeting, download, etc.)
Attachments
test.php.txt
File address:
(TERootDirectory)/test.php
(2.02 KiB) Downloaded 376 times
authentication.inc.php.txt
File address:
(TERootDirectory)/include/authentication.inc.php
(3.33 KiB) Downloaded 348 times
User avatar
The Master
Engineer
Engineer
Posts: 80
Joined: 02 Apr 2005 20:50
Location: Italy
Contact:

Post by The Master »

I have maked meeting functions, please valuate it.

My scripts needs other work, but meeting is this day.

Put files in this directory:
authentication.inc.php -> {TEWEBSITE}/include/authentication.inc.php
meeting.inc.php -> {TEWEBSITE}/include/meeting.inc.php
test2.php -> {TEWEBSITE}/test2.php

Need directory to put meeting file.

Define meeting directory, set DB server/username/password/name on test2.php file.
And put tempire.sql on your test db.
Finally open test2.php

I using EasyPHP to test my scripts offline, not put this file online, need other work.
Attachments
tempire.sql.txt
Rename without .txt
(1.6 KiB) Downloaded 311 times
test2.php.txt
Rename without .txt
(3.86 KiB) Downloaded 395 times
meeting.inc.php.txt
Rename without .txt
(5.95 KiB) Downloaded 354 times
User avatar
The Master
Engineer
Engineer
Posts: 80
Joined: 02 Apr 2005 20:50
Location: Italy
Contact:

Post by The Master »

Ok. Base function ready.

Functions need MySQL database.

Authentication functions need table named 'permission', with 3 mandatory columns: 'userid', 'username', 'password', and more optional(ie. meeting functions need 'meeting' column).
Attention:
- The system need anonymous user defined by 'userid' 0(zero).
- Needed password crypted by MD5.

Meeting functions need table named 'meeting', with 6 mandatory columns: 'id', 'datetime', 'commentary', 'agenda', 'minutes', 'log'.
Attention:
- The system need column named 'meeting' in 'permission' table, and users relative permission: null, read, write.
- To grant at anonymous user to show meeting (ie. in resources page) its need 'read' value in 'meeting' column.
Attachments
Screenshot of my meeting table.
Screenshot of my meeting table.
meetingdb.PNG (20.97 KiB) Viewed 10345 times
Screenshot of my permission table.
Screenshot of my permission table.
permissiondb.PNG (17.74 KiB) Viewed 10345 times
-----------------------------------
I play OpenTTD in italian under Debian GNU/Linux
User avatar
The Master
Engineer
Engineer
Posts: 80
Joined: 02 Apr 2005 20:50
Location: Italy
Contact:

Post by The Master »

Functions files.
Attachments
meeting.inc.php.txt
Meeting function.
(7.22 KiB) Downloaded 345 times
generalfunction.inc.php.txt
General functions.
(3.07 KiB) Downloaded 335 times
authentication.inc.php.txt
Authentication functions.
(3.75 KiB) Downloaded 359 times
-----------------------------------
I play OpenTTD in italian under Debian GNU/Linux
User avatar
The Master
Engineer
Engineer
Posts: 80
Joined: 02 Apr 2005 20:50
Location: Italy
Contact:

Post by The Master »

Simple functions manual, and test script.
Attachments
test2.php.txt
Test script
(4.05 KiB) Downloaded 366 times
function_manual.txt
Functions manual
(2.42 KiB) Downloaded 349 times
-----------------------------------
I play OpenTTD in italian under Debian GNU/Linux
User avatar
The Master
Engineer
Engineer
Posts: 80
Joined: 02 Apr 2005 20:50
Location: Italy
Contact:

Post by The Master »

Steve i have modified resources script, need to put MySQL connection function, and constant definition, in other file.
I can put its in the layout script? Or i make another file?
Attachments
resources.php.txt
resources.php
(1.97 KiB) Downloaded 350 times
-----------------------------------
I play OpenTTD in italian under Debian GNU/Linux
User avatar
Steve
Tycoon
Tycoon
Posts: 2085
Joined: 10 Jan 2004 20:19
Location: London
Contact:

Post by Steve »

I use a seperate file for the connection.

Code: Select all

<?php
    $user="";
    $host="localhost";
    $password="";
    $database="";
    
    $connection = mysql_connect($host,$user,$password) or die("Couldn't connect to server!");
    $db = mysql_select_db($database,$connection) or die("Couldn't select database!");
?>
User avatar
The Master
Engineer
Engineer
Posts: 80
Joined: 02 Apr 2005 20:50
Location: Italy
Contact:

Post by The Master »

Ok. I have maked separate script to set costant & connecting to server.
And have insert this lines in layout.php:

Code: Select all

  define('TRANSPORTEMPIRE', TRUE);
  require_once('./include/engine.inc.php');
Another question:
how many meetings need to show in resources.php?
I have searched meeting in the forum and have put its in my database, but meetings are 33, too much to show.
Attachments
engine.inc.php.txt
New file maked
(1.78 KiB) Downloaded 366 times
-----------------------------------
I play OpenTTD in italian under Debian GNU/Linux
User avatar
Steve
Tycoon
Tycoon
Posts: 2085
Joined: 10 Jan 2004 20:19
Location: London
Contact:

Post by Steve »

Hmm. I guess we'll put them on a seperate page with a table of links. Hyronymus did some collecting of meeting stuff, to help fill any gaps.

Perhaps show the latest 10 with a button to make it show them all?
User avatar
The Master
Engineer
Engineer
Posts: 80
Joined: 02 Apr 2005 20:50
Location: Italy
Contact:

Post by The Master »

Resoureces.php modified to show 10(default) or all meetings(by link on page).
Attachments
resources.php.txt
(2.45 KiB) Downloaded 365 times
Screenshot show all
Screenshot show all
meeting_show_all.PNG (53.75 KiB) Viewed 754 times
Screenshot default
Screenshot default
meeting_default.PNG (50.25 KiB) Viewed 759 times
-----------------------------------
I play OpenTTD in italian under Debian GNU/Linux
User avatar
The Master
Engineer
Engineer
Posts: 80
Joined: 02 Apr 2005 20:50
Location: Italy
Contact:

Post by The Master »

I have fixed meeting functions.
Attachments
meeting.inc.php.txt
(7.32 KiB) Downloaded 333 times
-----------------------------------
I play OpenTTD in italian under Debian GNU/Linux
User avatar
The Master
Engineer
Engineer
Posts: 80
Joined: 02 Apr 2005 20:50
Location: Italy
Contact:

Post by The Master »

Steve have you look my work?
Need modified? You need aid to use its?
-----------------------------------
I play OpenTTD in italian under Debian GNU/Linux
User avatar
Steve
Tycoon
Tycoon
Posts: 2085
Joined: 10 Jan 2004 20:19
Location: London
Contact:

Post by Steve »

Sorry, haven't done anything to it yet. You kept writing new stuff, so I thought I'd leave you to it :D

I'll do some work on it either tomorrow or friday.
Locked

Return to “Transport Empire Development Archive”

Who is online

Users browsing this forum: No registered users and 1 guest