From 6c0e88f4e7131c8385d119ed8ead6d1a25069a08 Mon Sep 17 00:00:00 2001 From: tcourage Date: Thu, 7 Apr 2016 12:10:47 -0400 Subject: [PATCH] Categories in a drop-down! --- README.md | 36 ++++----- browse/browse.php | 2 +- browse/index.php | 182 +++++++++++++++++----------------------------- browse/query.php | 2 +- index.php | 178 +++++++++++++++++---------------------------- 5 files changed, 153 insertions(+), 247 deletions(-) diff --git a/README.md b/README.md index c538028..2f966c8 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Meme Machine -## Current Version: v0.3.0-beta +## Current Version: v0.3.5-beta ## Overview @@ -16,30 +16,30 @@ Users are then able to browse the memes using the categories, and in future vers ## Changelog +### v0.3.5-beta - April 7, 2016 + +- Categories are now a drop-down box rather than an incoherent table +- More categories added (Laugh/Laughing, Fite Me, Spongebob, Racist) + ### v0.3.0-beta - April 4, 2016 - - Added "Search" function - - More categories added +- Added "Search" function +- More categories added ### v0.2 BETA - April 2, 2016 - - Second release - - Project now open source! +- Second release + - Project now open source! - - Added "Browse" - - Ability to browse all memes - - Ability to browse memes by category +- Added "Browse" + - Ability to browse all memes + - Ability to browse memes by category ### v0.1 Pre-BETA - April 1, 2016 - - Initial Release +- Initial Release - - Added "Upload" - - Ability to upload images up to 75MiB - - Ability to specify a name/description of meme - - Ablilty to select a category - -## Cloning and Running - -Clone the repository to a directory on your website. Change the appropriate files so that your database is being accessed with your credentials. Make a folder called "uploads" or change the code to suit your needs - +- Added "Upload" + - Ability to upload images up to 75MiB + - Ability to specify a name/description of meme + - Ablilty to select a category diff --git a/browse/browse.php b/browse/browse.php index 3238bc2..588c1e0 100644 --- a/browse/browse.php +++ b/browse/browse.php @@ -32,7 +32,7 @@ if (!$conn) { } -if(isset($_POST["browse"]) && $var) { // If "Browse" is pressed +if(isset($_POST["browse"]) && $_POST["memeCategory"]) { // If "Browse" is pressed echo '

Category: ' . $_POST["memeCategory"] . '

'; $memeCategory = mysqli_real_escape_string($conn, $_POST["memeCategory"]); $browse = "SELECT * FROM memes WHERE category = \"$memeCategory\""; diff --git a/browse/index.php b/browse/index.php index 4ad304d..7d659f7 100644 --- a/browse/index.php +++ b/browse/index.php @@ -25,123 +25,71 @@
-

Browse by category:

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
LOLWUTWTFFuck YeahFUCK!Alcohol
NopeFuck ThisDisgustSTFU/Shut UpRIP in piece
UpvoteDownvoteMind BlownFilthy FrankInsults
Haters Gonna HateDidn't ReadCool Story BroUMAD BRO?Impressed
Deal With ItAnimalsParty HardHitler/Nazis/HolocaustShocked
MetaGames/GamingFailKill YourselfScary
ThinkingMuslims/TerroristsRicky ComicBe a shame if...History
MilitaryGunsInforgraphErections/FappingCats
Joan CornellaThis sucksFuck YouNSFWMISC
PepePoliticalSanicCringeMorbid
Poland BallCanada'MuricaVisserFite me
Member-SpecificThe Fuck You Say?Laugh/LaughingRacistSpiderman
Spongebob
+

Browse by category: + +


diff --git a/browse/query.php b/browse/query.php index a5ce18f..edb91f5 100644 --- a/browse/query.php +++ b/browse/query.php @@ -35,7 +35,7 @@ echo '

Meme Machine

'; $sql .= implode("%' or name LIKE '%", $tokens) . "'"; if(isset($_POST['search']) && $term){ - echo "Search term is: " . $term . "
"; + echo "You searched for: " . $term . "
"; $result = mysqli_query($conn, $sql); diff --git a/index.php b/index.php index 025b3af..bc657ef 100644 --- a/index.php +++ b/index.php @@ -3,7 +3,7 @@ Meme Machine