Jump to content


Photo

Finished downloads and gallery system


  • Please log in to reply
7 replies to this topic

#1 DeathRay2K

DeathRay2K
  • Members
  • 96 posts
  • Location:Canada
  • Projects:D2K Studios, Xaeon Mod, Unseen Presence, Rhythm Mixer, Website Designs, CSS OS

Posted 06 May 2006 - 09:11 PM

Remember those posts a bit below, where I was asking for help? Well, I finished that, and then upgraded my server to PHP5. I realised I was missing out majorly, and so redid the system from scratch. The code is much, much better than it ever was in my previous system, and it's 1/3 smaller too.

Here is an example of the original - in gallery mode:
http://www.d2kstudios.com/gallery.php

Here is an example of the original - in downloads mode:
http://www.d2kstudio...m/downloads.php

And here is an example of the new one - in gallery mode:
http://www.d2kstudio.../downloads2.php

Basically, I want to know what the PHP pros here think of it, and I also want to know what can be improved.
Here's the source. :p

Attached File  D2K_Downloads_System_2.0.3.zip   7.26KB   87 downloads

Edited by DeathRay2K, 06 May 2006 - 09:26 PM.


#2 Blodo

Blodo

    The one who disagrees

  • Project Team
  • 3,002 posts
  • Location:Eastern Europe
  • Projects:siteMeister, Mental Omega
  •  The wise guy

Posted 06 May 2006 - 09:54 PM

The subcategory logic is a bit bad. I made it in my system using a simple "ownedBy" field in mysql. It works by assigning the ID number of the category that owns the subcategory to the field. If the category is top level the fields default is 'root'. This way you can have unlimited levels of subcategories.

ARGUMENT FROM CREATION, a.k.a. ARGUMENT FROM PERSONAL INCREDULITY (I)
(1) If evolution is false, then creationism is true, and therefore God exists.
(2) Evolution can't be true, since I lack the mental capacity to understand it; moreover, to accept its truth would cause me to be uncomfortable.
(3) Therefore, God exists.


#3 DeathRay2K

DeathRay2K
  • Members
  • 96 posts
  • Location:Canada
  • Projects:D2K Studios, Xaeon Mod, Unseen Presence, Rhythm Mixer, Website Designs, CSS OS

Posted 14 May 2006 - 12:01 AM

Heh, I thought about it, but it would cause more problems for me than it has benefits... The original system used the folders, and its still in place, so I would have to add another part making it compatible...

Besides which, this is a completely databaseless system. Its only one small file, or two in the case of the gallery; I've designed it to be very compact, and I think using a database would just be a waste of time and space. ;)

#4 Guest_Comrade CodeCat_*

Guest_Comrade CodeCat_*
  • Guests

Posted 14 May 2006 - 12:47 AM

More like the opposite. Database systems can be pretty small and fast, and they were made specifically for data storage and retrieval so they're much faster and more efficient than a home-made file-based storage system would be.

#5 DeathRay2K

DeathRay2K
  • Members
  • 96 posts
  • Location:Canada
  • Projects:D2K Studios, Xaeon Mod, Unseen Presence, Rhythm Mixer, Website Designs, CSS OS

Posted 14 May 2006 - 12:53 AM

For my purposes that would still be a waste of a database which are more often than not in limited quantity, or not available.

#6 Blodo

Blodo

    The one who disagrees

  • Project Team
  • 3,002 posts
  • Location:Eastern Europe
  • Projects:siteMeister, Mental Omega
  •  The wise guy

Posted 14 May 2006 - 07:50 PM

Who said you need a separate database? Just give the tables used a prefix or somesuch.

I cannot foresee a host without a mysql database today btw. Every bigger site needs one in one way or another so every host offers one. I don't see where the problem lies.

ARGUMENT FROM CREATION, a.k.a. ARGUMENT FROM PERSONAL INCREDULITY (I)
(1) If evolution is false, then creationism is true, and therefore God exists.
(2) Evolution can't be true, since I lack the mental capacity to understand it; moreover, to accept its truth would cause me to be uncomfortable.
(3) Therefore, God exists.


#7 Legion

Legion

    AHL2mod Admin

  • Banned
  • 1,225 posts
  • Location:USA
  • Projects:HL2 Community Hub
  •  There should be PINK text. :D

Posted 13 June 2006 - 12:27 AM

I love this! It's perfect for my site! You did a wonderful job! It should integrate seamlessly, great job. :)
I want to hug you, but I can't.

Edited by Legion, 13 June 2006 - 12:28 AM.

Posted Image
Made all my userbars myself :D

#8 DeathRay2K

DeathRay2K
  • Members
  • 96 posts
  • Location:Canada
  • Projects:D2K Studios, Xaeon Mod, Unseen Presence, Rhythm Mixer, Website Designs, CSS OS

Posted 13 June 2006 - 12:20 PM

Heh, never saw your reply Blodo.
Lots of free hosts don't offer MySQL databases, and lots of people just don't want to use them because they can be a bit confusing for people new to them, as I was when I made the first version of this. Backwards compatability was my one of my main concerns, and the original didn't use a database so neither did this version.
When I make a third version it will most likely use MySQL databases, alright? :lol:

Legion:
Glad you like it.
Here's another slightly updated version, with a few more things explained in the readme, and slightly better handling of images

Attached Files






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users