Giter Site home page Giter Site logo

shirisu / autopetitetcgscript Goto Github PK

View Code? Open in Web Editor NEW
19.0 8.0 1.0 3.05 MB

A simple and light script for a mini automated Trading Card Game (TCG).

License: MIT License

PHP 82.83% CSS 13.73% JavaScript 3.41% Hack 0.03%
tcg trading-card-game tradingcardgame ccg cards card-game

autopetitetcgscript's Introduction

autoPetiteTCGScript

A simple and light script for a mini automated Trading Card Game (TCG).

It's written in PHP and uses jQuery and plain CSS.

It's based on the concept and script of "Tasty TCG" from 2016 but it's almost completely reworked.

Current version: 3.2.1

Documentation - how to use autoPetiteTCGScript

GitHub commit activity Lines of code

Table of contents

how to setup

  • download the files
  • go to inc/connection.php and adjust the database settings (you need MySQLi)
  • go to inc/constants.php and adjust the constants to your needs
  • upload the files to your webspace
  • create database with the name you set for $database_name in inc/connection.php
  • run urltoyourpage.com/setup
    • click the link Import database structure
    • click the link Add Admin Account and fill the form with your data
    • click the link Back
  • delete the setup folder!

features

  • multilingual (english and german)
  • multiple templates to use
  • administration
    • category administration
      • add category
      • edit category
      • add subcategory
      • edit subcategory
      • delete subcategory
    • carddeck administration
      • add carddeck
      • edit carddeck
    • cardupate administration
      • add cardupdate with news
    • news administration
      • add news
      • edit news
    • level administration
      • add level
      • edit level
    • member administration
      • edit member data (status, rank, language, email, reset password)
      • distribute cards
      • distribute currency
      • distribute wish
      • delete member
    • game administration
      • add game
      • edit game
  • registration (activation via link in email)
  • login
  • logout
  • lost password
  • some sample pages with lorem ipsum text
    • team
    • link in
    • link out
    • faq
    • rules
  • online list
  • main page
    • news system
  • carddeck page
    • show card deck overview
      • all
      • by main category
      • functionality for add/remove wishlist
    • show cards and details
    • add to wishlist
    • show collector, trader, keeper, master
  • member overview
  • member profile
    • show profile
    • show cards
      • show only needed cards filter
      • show all cards filter
    • master, wishlist
  • memberarea
    • overview
    • change own profile
      • traderules
      • some personal stuff like language, email
    • show log
    • search
      • missing cards for members
    • shop
      • change currency in cards
      • change wish in cards
    • cardupdate
      • get new cards
    • trade in
  • managing of cards
    • sort in categories (trade, keep, collect)
    • master full carddecks
      • multiple mastering
  • message system
  • games
  • trade system
    • semi-automatic
  • level up system

possible features in the future

  • main page
    • news system
      • commenting system
  • bbcodes
  • trade system
    • fully automatic

requirements

  • MySQL 5.7 or higher
  • PHP 7.2 or higher

used frameworks, libraries and others

credits for the script

  • Shirisu (also known as Etna or Pleinar) - Github

sites that use the script

in preparation - coming soon

autopetitetcgscript's People

Contributors

chjerrey avatar liviakuenzli avatar nyoko2 avatar shirisu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

pattyyau

autopetitetcgscript's Issues

[FEATURE] Einstellungen für den Shop

Super wären Einstellungsmöglichkeiten, nach wieviel Stunden der Shop aufgefüllt werden soll (aktuell 24 fest) und ob der Shop sich füllen soll, wenn eine Karte gekauft wurde. Also Endloskauf möglich ja/nein :)

[FEATURE] Adjust card update page

Please adjust the card update page.
After selecting the carddecks the page is loaded again an the selected decks and textarea are on the bottom of the page - this should be on top to see it after the page reload.

[FEATURE] Shop

Ich wünsche mir einen Shop mit zufälligen Karten, die sich einmal pro Tag ändern und mit der eingestellten Währung kaufbar sind. Dabei sollte man die Menge der Karten (also z.B 8 im Shop oder 12 etc.), sowie die Preisspanne einstellbar sein. :) <3

[FEATURE] Keep Funktion

Ich fände eine Keep Funktion für Karten die man erst später sammeln möchte und noch nicht in die Collect packen will ganz cool. Ich bin zum Beispiel jemand der nicht gerne alles gleich in die Collect schiebt wenns nur eine Karte ist :D

[BUG] message_write

Bei einer neuen Nachricht steht in Zeile 138 - 143

            $sql_member = "SELECT member_id, member_nick
                       FROM member
                       WHERE member_active = 1
                         AND member_id != '" . $member_id . "'
                       LIMIT 1";
            $result_member = mysqli_query($link, $sql_member) OR die(mysqli_error($link));

das LIMIT 1 muss raus, damit die komplette Liste ausgegeben wird :*

[BUG] Online Status

Der Online Status aktualisiert sich nicht richtig wenn man bei Sessionablauf "rausgeschmissen" wird, auch nach Cache löschen und Aktualisierung der Seite nicht.

onlineissue

[BUG] Order of sections on trade offer page on mobile

System
autoPetiteTCGScript Version: 3.0.0
Browser and Version: all mobile devices or views

Describe the bug
The sections on the trade offer page in the mobile view are not comfortable. The collection list should be shown over the dropdown so while searching for a card the overlay of the dropdown don't hide the list. Maybe also the other sections should be in top (maybe also to hide it on click).

To Reproduce
Steps to reproduce the behavior:

  1. Open the page on mobile or in small view
  2. Go to a member page
  3. Click on a card in the trade section
  4. Scroll a bit down to the trade offer form
  5. See the sections order problem

Expected behavior
The sections are good to access in mobile view.

[BUG] Does not work in Subdirectory

System
PHP Version: any
MySQL Version (or MariaDB Version, please specify): any
autoPetiteTCGScript Version: 1.0.1
Browser and Version: any

Describe the bug
The routing doesn't work if the project runs in a sub directory.

To Reproduce
Put the project in a sub directory (e.g. localhost/tcg)

Expected behavior
It should work.

[FEATURE] Keeping

A keeping section would be nice if it's not too difficult to change. for all those decks people don't want to collect quite yet or want to hoard

[BUG] Deaktivierte Karten

Wenn man Cardsets deaktiviert, aber schon Karten davon gesammelt hat, wird der Link und das Dropdown noch angezeigt, aber logischerweise keine Karten mehr (siehe Screenshots)

Screenshot 2021-04-01 153807
Screenshot 2021-04-01 153822

[BUG] No collecting option on keep page.

System
PHP Version: 7.4
MySQL Version (or MariaDB Version, please specify): (e.g. MySQL 5.7.28) 5.1.1
autoPetiteTCGScript Version: 3.20
Browser and Version: Oprea GX
Other relevant information:

Describe the bug
On a fresh install of the script on the keep page the option to add a deck to collecting is gone.

Error-Messages
Got error messages? Put them here.

To Reproduce
Steps to reproduce the behavior:

  1. Install script
  2. get cards
  3. set some to keep
  4. go to keep page

Expected behavior
collecting to show up. I fixed it on my tcgs by changing this line: <?php if ($hide_collect == false) { ?> to <?php if ($hide_collect == true) { ?>

Screenshots
Screen Shot 06-16-23 at 01 40 PM

Additional context
Add any other context about the problem here.

[FEATURE] Puzzle Filler

Ein weiterer Wunsch wäre einen extra Filler für Puzzle hochladen zu können, somit könnte man das Design für beide Filler unterschiedlich anpassen :)

[FEATURE] Down-Leveln

Wird man automatisch ein Level zurückgesetzt, wenn man Karten verliert und unter die Grenze rutscht?
Für die Zukunft wäre es eventuell gut, wenn man x Karten gegen 1 random Karte eintauscht - dann wäre das erneute Leveln eher kontra produktiv :D

[FEATURE]WYSIWYG Editor

Es wäre echt super wenn man einen WYSIWYG Editor in die News bauen könnte bzw. die üblichen Befehle wie und mit einbinden könnte :)

[BUG] Falsche Zählung von Karten

Wenn zb bei einem Spiel Karten gewonnen werden, beim level up oder mastern etc. ist in der funktion "'insert_cards" der update "member_cards" in der for-schleife. Daher wird der so oft ausgeführt, wie man karten erhält und das sorgt für mehr Karten in der Profilanzeige, als man eigentlich hat. :)

[BUG] Everything is T?

I just downloaded the 2.0.0 version, edited the two inc files and uploaded them to my directory. Imported the tables and made the admin account just fine. However, when I go to the every single page logged out and logged in, and in the admin section, EVERYTHING show as "T". I haven't changed any coding in any way, so im not sure what's happening here. Screen shot added!

script

[BUG] Falsche Übersetzung

Im "Merge pull request #45 from Shirisu/feature-adjust-show-cards-in-games" hast du bei
inc/translations/en.php

    'text_level_up' => 'Level up',
    'text_level_up_reward' => 'Deine Belohung',

eingebaut. Müsste dann englisch sein, "Your reward"

[FEATURE] Unreleased Decks

Describe the solution you'd like
It would be nice if by default it would have a link that would display all uploaded decks that have not been released to the members.

[BUG] Ausblenden von Lucky Games

Es wäre cool wenn man die Lucky Kategorie Games entweder selbst aktivieren oder deaktivieren könnte oder was auf jedenfall super wäre, falls in der Kategorie keine Cardsets aktiv sind, dass das Lucky Game ansich ausgeblendet wird, sonst hat man nur eine leere Seite.

[FEATURE] Add to Wishlist on Card Update Page

Is your feature request related to a problem? Please describe.
Whenever new decks are released, there's always one or two that I want to add to my wishlist, so then I have to move away from the Card Update page to the decks pages to add them there.

Describe the solution you'd like
If the card update page had a button for each deck so you could add them to your wishlist, that would make it a smoother process.

Describe alternatives you've considered
N/A

Additional context
N/A

[FEATURE] Sortierung der Masters

Könntest du es bitte einbauen, dass man in den Profileinstellungen auswählen kann, wie man seine Masters anzeigen lassen möchte.
Wunsch einer Schülerin: Die Masters nach Datum, statt nach dem Alphabet sortiert anzeigen lassen

[BUG] Registration Problem

Nach dem Fix (:P) erhält man nach einer Registrierung keine E-Mail. Ich habe es mit meiner gmx.net Adresse ausprobiert und eine Freundin von mir mit einer gmail.com Adresse. Eingetragen werden die Member in der Datenbank und auch der Aktivierungscode wird erzeugt, nur die Email kommt nicht an.

[FEATURE] Bildquelle

Ich wollte mal fragen ob es möglich wäre eine Default bei der Bildquelle angabe zu machen.

Den jede angabe wird als 1, 2, 3 usw... angeben via Link.

Und da ich viele Bilder direkt selbst Screen und es dafür so gesehen auch keine Quelle gibt. Das eben wenn ich keine Eintrage eine Default ansicht erscheint.

z.B. Screencaps by DeckMaker oder sowas.

[FEATURE] Timezones

Wenn die Spieler aus unterschiedlichen Zeitzonen kommen, wäre es super, wenn die Zeitzonen bei der Ausgabe der Spiele beachtet wird. Evtl. sollte die Zeitzone auswählbar sein, damit es keine Probleme bei der allgemeinen Ausgabe gibt (letzter Login, news etc.)

Ich hab einfach als Auswahl eingebaut und dabei folgendes genommen:

<?php
	$timezone_identifiers = DateTimeZone::listIdentifiers();
	for ($i=0; $i < 425; $i++) {
		echo "<option value='$timezone_identifiers[$i]'>$timezone_identifiers[$i]</option>";
	} 
?>

[BUG] Shop

Im Shop wird nach dem Kauf ein echo $_POST['cardshop']; ausgegeben und die richtige Ausgabe. Das echo muss raus. Übrigens wäre es auch super, wenn die Ausgabe vom Shop in der function.php nicht im plaintext ist, sondern in einer alert_box oder so :)

pfad: /tcg/memberarea/memberarea_shop.php
zeile: 38

if (isset($_POST['cardshop'])) {
            echo $_POST['cardshop'];
            buy_card($_SESSION['member_id'], $_POST['cardshop']);
}

[BUG] Direktlink in trade_offer

In der Datei tcg/trade/trade_offer.php ist in Zeile 200 die URL für die Karte für das change event.

document.querySelector('.own-card').style.backgroundImage = 'url(<?php echo HOST_URL; ?>/assets/cards/'+ own_card_carddeck_name +'/'+ own_card_carddeck_name+own_card_number +'.<?php echo TCG_CARDS_FILE_TYPE; ?>)';

Diese wird jedoch mit dem direktlink /assets/cards/ ausgelesen - den Pfad legt man in der config fest und müsste hier angepasst werden (:

[FEATURE] Doppeltes Mastern

Ich würde gerne das unendliche Mastern von Decks möglich haben :D Eventuell als Auswahl ja/nein, um es entsprechend anzupassen.

[BUG] Date sorting is wrong

System
autoPetiteTCGScript Version: 3.0.0

Describe the bug
Seems that the sorting of dates don't work like it should. It's not sorting year > month > day - it's sorting the text in the column.

Expected behavior
The dates are sorted correctly.

[BUG] Member Update page not showing decks after accidental doubleclick

System
PHP Version: 7.4
MySQL Version (or MariaDB Version, please specify): (e.g. MySQL 5.7.28) 5.1.1
autoPetiteTCGScript Version: 3.1.0
Browser and Version: I use chrome gx but it has happened to two different members as well
Other relevant information:

Describe the bug
If you accidently doubleclick a deck on the card update claim page it will give you two cards from that deck and breaks the card page so you can no longer see the other decks

Error-Messages
Got error messages? Put them here.

To Reproduce
Steps to reproduce the behavior:

  1. Go to card update
  2. Quickly double click the button for a deck

Expected behavior
it to only give one card from the deck and not break the page. to fix it I have had to delete the part where they had claimed anything from the decks so they got more cards then they should have.

Screenshots
2
1

Additional context
Add any other context about the problem here.

[FEATURE] Tags

Not sure how or if this could work but would it be possible to add a tag feature for decks?

For example, a book/tv show/movie/etc has sometimes many genres that it fits it. It would be cool to be able to make tags and select all the ones that apply to that said book/tv show/movie/etc for members to be able to click and narrow a search.

[FEATURE] Unterkategorie löschen

Ich würde gerne Unterkategorien löschen kann. Falls man mal aufräumt und die Kategorie nutzlos wird, muss man sie direkt in der Datenbank löschen <3

[BUG] Kartenanzeige

Wenn ich eine Karte in Keep habe, dann wird diese Karte trotzdem als benötigt angezeigt:

  • Beim Filter im Profil (Button: Zeige die benötigten Karten an)
  • Im Drop-Down Menü durch ein Symbol

Die doppelte Karte wird dann unter new angezeigt und ich habe sie in Keep. Dann müsste sie ja eig. als "trade" selektiert werden?

[BUG] Memory lädt endlos

Ich wollte gerade das Memory Spiel nochmal ausprobieren und fand mich in einem Endlos Ladeprozess wieder. Leider kann ich nicht sagen woran es liegt.

Gestern hatte ich noch keine Cardsets hochgeladen und ich konnte das Spiel ohne Probleme aufrufen bis ich darauf aufmerksam gemacht habe und eine "Du hast noch nicht genug Karten hochgeladen, also geht das Spiel noch nicht" Sperre eingebaut wurde :D

Hochgeladen wurden heute 3 Cardsets mit je 16 Karten.

Wenn ich die Endlos Lade Schleife abbreche, also die Seite anhalte erhalte ich folgenden Screen:
memoryissue

[FEATURE] Startseite

Ich würde gerne die Startseite etwas anders haben, im generellen.
Bisher werden nur die News angezeigt.

  • Schöne wäre eine kleine Statistik (Decks online, Members, Unreleased Decks) auf einem Blick
  • Random Karten anzeigen von aktiven Decks (damit man einen ersten Eindruck erhält)
  • Ein Intro-Text (müsste dann selbst in der de/en datei angepasst werden)

Aber das würde die Startseite etwas auffrischen und die Leute würden sehen, worum es geht :)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.