Thanks to Tenniskid:

Sign-up/in system established, not public, email validation pending

News system for the front page

Links system in place, added 5 newest links to front page.


Thanks to me:

Created interface to input news, and links

Created stats page (help from Tenniskid with a little bit of code)


Thanks to rivereye:

For pointing out the obvious mistakes I have made


Check out the links system here: http://tifreakware.net/admin/link.php?catag=index

Will post up the sign-up/in stuff when it is officially ready.

Our next big hurdle is to create a archive system, to rival that of ticalc... Bwhahahaha... Maybe not, but would be nice to have an actual archiving system. Razz
Speaking of archive systems, I need to make Cemetech's archives understand upgrades/updates. Meh. Good job on this stuff, Dan.
and I need to get to writing my Archive system. Ah well, all in due time, right?
woot, nice work both of you, and I'm glad to see you're still using the counter I made for you.
Well, time to work on the archives. I have a question, do you think the following fields are all that is needed for an archive system?

File ID
Name
Description
filename (zipped file)
Author
Author 2
Author 3
Author 4
email
email 2
email 3
email 4
ss 1
ss 2
ss 3
ss 4
file destination
file stat (pending, available, etc)
click stats
date submitted
make the number of authors dynamic, and perhaps add ratings+reviews
Umm... dynamic authors? There is no way I could do that with sql, having it keep adding onto the columns like that, is there? o.o

I thought about ratings and reviews, the reviews could be a standard text box, if nothing else, and who submitted it (and when) Oh yea, need to add the date submitted...

How in the world would I get multiple reviews for a file in a sql database? And the rating system?

Please keep in mind I am just now learning how to get data from a sql database...
Here's the SQL dump of my archive structure:


Code:
-- phpMyAdmin SQL Dump
-- version 2.9.0.2
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Apr 08, 2007 at 12:19 PM
-- Server version: 4.1.21
-- PHP Version: 4.4.2
--
-- Database: `cemetech_main`
--

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

--
-- Table structure for table `archives_files`
--

CREATE TABLE `archives_files` (
  `fileID` int(11) NOT NULL auto_increment,
  `author` text NOT NULL,
  `type` smallint(6) NOT NULL default '0',
  `createDate` bigint(20) NOT NULL default '0',
  `updateDate` bigint(20) NOT NULL default '0',
  `filename` text NOT NULL,
  `secondname` text NOT NULL,
  `mainpath` text NOT NULL,
  `secondpath` text NOT NULL,
  `title` text NOT NULL,
  `description` text NOT NULL,
  `screenArray` text NOT NULL,
  `depth` tinyint(4) NOT NULL default '0',
  `comments` smallint(6) NOT NULL default '0',
  `votes` int(11) NOT NULL default '0',
  `voteSum` int(11) NOT NULL default '0',
  `coauth1` int(11) NOT NULL default '0',
  `coauth2` int(11) NOT NULL default '0',
  `coauth3` int(11) NOT NULL default '0',
  `dlCount` int(11) NOT NULL default '0',
  `pageViews` bigint(20) NOT NULL default '0',
  `reviewcount` int(11) NOT NULL default '0',
  `commentArray` text NOT NULL,
  `reviewArray` text NOT NULL,
  UNIQUE KEY `fileID` (`fileID`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 COMMENT='type: 0=file, 1=shortcut (for multipath)' AUTO_INCREMENT=169 ;
not bad, but what is the concept of multiple paths?
arrays? Huh? Confused

Looks like I have a long way to go yet... -.-
@Rivereye: You know how with ticalc.org you can link to a file in multiple directories? That's how my archives work. It doesn't matter where the PHYSICAL file is in the directory structure; stuff is linked by where it exists in the database directory structure.

@Dan: my screenshot array, for instance, goes "2123|5454|http://www.cemetech.net/screenshot.jpg". It knows that if it's all #'s, it's from the default screenshot dir; if it has letters, it's a direct url.
intersting, I was think for SS, have a seperate table for them, and then link them to the file that way (more dynamic that way).
So... if I seperate info with |, I can have multiple items, say screenshots, per file?

I don't know anything about arrays with sql, and I do not think the book I have covers it.
Quote:
Umm... dynamic authors? There is no way I could do that with sql, having it keep adding onto the columns like that, is there?

Having multiple authors for a file means it is a multi-valued attribute, and you would then want to create a separate authors table that you link to from the main table. You just create a primary key for the authors table and then link to it with a foreign key from the main table. I believe that should work in your situation.
It's not an SQL array, it's a string. In the php code



Code:
...read a row from SQL into $row...
$screens = split('\|',$row['screenArray']);


Then you can do a foreach:


Code:
foreach($screens as $screen)
{
    if (preg_match('/^(\d+)$/',$screen) {
          echo '<img src="http://www.tifreakware.net/ss/'.$screen.'.gif" alt="ss" />';
    } else {
          echo '<img src="'.$screen.'" alt="ss" />';
    }
}
So, I can just have:

file id
name
description
zipped name
author array
email array
screenshot array
status
calc & language
click counter
date submitted

That should do it then, huh?
you shouldn't need the email array (just use the email from the user's table).
my only concern would be if the other authors listed were not part of the site...
yeah, true.
Well, I guess for the moment, until TK gets on and we can discuss it, the list above is what we will go with. I think that is all that would be required for an archive...
  
Page 1 of 2
» All times are UTC - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement