trade post manager

Created by Marfisa and explained by Rahenna. Please credit In the Cards if you use this script.

Hey, finally something for the TCG players out there! *waves* This is a simple(ish) script that can be used to manage your trade post without the constant use of FTP. This is not meant to compete with any other scripts, but to provide an alternative for players like me who don't like having to upload or move files around unless absolutely necessary. ^_^

important!
This script requires PHP and a MySQL database. Please contact your host if you need assistance.

introduction

Again, Mandi's Card Manager is a great script and it fits the needs of many TCG players. I've tried it but it didn't work for me, and there's really only one reason for that: I am lazy. I didn't want to sort my cards into folders and upload/delete as I made trades or moved future collections to active collections.

Since I'm a lazy person, I sat down with Marfisa and sketched out my personal ideal of a trade post manager. No moving cards around, no manual alphabetizing, no keeping track of card counts, no FTP unless it's needed to upload newly released decks. I wanted just one page to update, one form with space for everything, including currency and trades. This script is the result.

Of course, Marfisa created it all. Because I'm lazy. XD

important!
After you set up the card manager, put password protection on the admin folder! Be sure to use a strong password with uppercase and lowercase letters, numbers, and symbols all jumbled up. You MUST be sure that you are the only person who has access to this folder. If you are hosted by me, I will do the installation for you and TELL YOU what your password is.

setup dbinfo.php

Unzip the download (see the bottom of this page), taking care to keep the files in the proper folders. All files except for menu.php and tcg.php should be in a folder named admin. Upload that folder to your trade post. Do not upload menu.php and tcg.php yet.

<?
$hostname="###url_where_database_is_hosted###";
$user="###your_user_name###";
$password="###your_password###";
$database="cardmanager";
$tablename="mycards";
?>

This file is fairly self-explanatory; just change everything between the ### signs to your own settings. The hostname may be tricky because the format can vary from host to host. In our case, it doesn't begin with http:// and looks like mysql.clavis-sama.com. Ask your host if you're in doubt.

You can change the name of the database and table if you like. The download comes with cardmanager and mycards as default names.

setup tcg.php & menu.php

You will need to add the full path to the dbinfo.php file to both menu.php and tcg.php. Be sure to insert it where marked by the ### signs. Once you are finished, upload these two files to the root folder of your trade post (where your index page lives).

HINT:
If you need help finding your full PHP path, see the PHP finds your full path! section on the PHP Basics page.

create table

Once everything is uploaded, go to the admin folder under your trade post. Find and click on the file called create_table.php. This will create the table in the database so you can start adding information to your TCG manager!

important! Do not delete create_table.php from your admin folder! It's needed for the backup system.

tweaking - layout, menu, etc

In order to display your own layout on the card pages, just insert your header and footer into tcg.php. These can be PHP includes, or just copy and paste the code from your layout. Be sure that you put the information above and below the existing text in the file.

To display the auto-updating menu that lists the TCGs you're playing, include menu.php in place of your old menu. The code is:

<? include('menu.php') ?>

You may also choose to manage your own menu so you can separate it into active, hiatus, and other sections as needed. In that case, you will create links to URLs that look like this:
tcg.php?NAME OF TCG

The name is exactly what you called the TCG when you added it to the card manager - YES, you can use capital letters and spaces!

All other instructions are bundled in with the card manager files. Please read all the information carefully as you set up your first TCG. Before long, you'll be a pro!

the optional_root folder

The stuff in the optional_root folder is a generic layout for your TCG post that matches the card manager layout. This is just to show you how the pieces are put together. You can use this layout if you're starting a trade post from scratch - just upload them to the root folder of your trade post (where things like index.html belong).

Do NOT upload these files if your trade post already has its own layout! You might overwrite your own header, footer, or css file. Just look at index.php as an example.

download

Okay, the moment we've all been waiting for. :D
download Marfisa's TCG Manager (v1.6c)

NOTE: This currently works only for TCGs with standard card numbering. Cards with special systems (like 5"x7.5") are not fully supported. Yet. :)

change log:
1.6c (???) - fix for limited trade/card log sizes
1.4 (February 20, 2010) - fix for hosts running with PHP magic quotes enabled - added php.ini
1.3 (December 13, 2009) - fixed error with filler for "other" card type - changed added.php
1.2 (December 8, 2009) - allows multi-digit card numbers (not limited to two digits) - changed tcg.php
1.1 (December 7, 2009) - added temporary trade post layout
1.0 (December 6, 2009) - initial release

future features:
We hope to implement these features in future releases, starting with items at the top:
- delete TCGs
- easier backup of database
- compatability with hosts running PHP magic quotes on thanks to Micki for giving us a place to test this!
- compatability with 5"x7.5" card structure
- upload cards through admin panel