diff --git a/admin.php b/admin.php
index 8185cfd..f7fe476 100644
--- a/admin.php
+++ b/admin.php
@@ -8,12 +8,18 @@ include "scripts/pageheader.php";
echo "
Admin
\n";
+$id=$_GET['id'];
+$mode=$_GET['mode'];
+
+if ($id=="clear"){
+ session_destroy();
+}
+
if (is_member_moderator($_SESSION['user'],$handle)==false){
die ("You do not have admin or moderator position on this forum.");
}
-$id=$_GET['id'];
-$mode=$_GET['mode'];
+
if($mode=="owner"){
diff --git a/api/3m/getmodbyname.php b/api/3m/getmodbyname.php
index ede5473..4dbd730 100644
--- a/api/3m/getmodbyname.php
+++ b/api/3m/getmodbyname.php
@@ -1,19 +1,13 @@
$tag
$desc
";
+echo "
$tag
$desc
";
}
-echo "
\n
Tag
Description
";
+echo "
\n
Tag
Description
";
add_tag("mod","A Mod (use \"type\" radio buttons)");
-add_tag("modpack","A Mod pack (use \"type\" radio buttons)");
+//add_tag("modpack","A Mod pack (use \"type\" radio buttons)");
add_tag("code","A C++ Code Modification (use \"type\" radio buttons)");
add_tag("texture","A texture pack (use \"type\" radio buttons)");
add_tag("sound","A sound pack (use \"type\" radio buttons)");
-seperator(2);
+seperator(3);
add_tag("deco","Adds decorative blocks");
add_tag("tech","Adds technical mods");
add_tag("fun","Experiemental Mods");
-add_tag("server","Mods ideal for servers (low lag, tools)");
add_tag("food","Mods that add food");
add_tag("growing","Mods that add Plants");
add_tag("mobs","Mods that add mobs");
add_tag("util","Mods that add new features and actions to the game (eg: bones,falling_items,throwing)");
add_tag("3d","Mods that use Node Boxes");
add_tag("* graphics","Mods that improve the graphics of Minetest (eg: animated_torches, different player textures)");
-add_tag("* adventure","Mods that add an adventurous theme to the game (eg: traps, magic)");
-seperator(2);
+add_tag("* adventure","(Role Playing) Mods that add an adventurous theme to the game (eg: traps, magic)");
+seperator(3);
+add_tag("admin","Admin tools");
+add_tag("grief","Griefing defence, and PvP mods");
+add_tag("* server","Mods ideal for servers (low lag, tools)");
+add_tag("* info","Informational - For those who love knowing all sorts of useful stuff about the server");
+add_tag("* econ","Economy - money and trading");
+add_tag("* chat","Chat Related - more commands, stuff like the IRC Mod");
+seperator(3);
add_tag("envir","Changes the map generator");
add_tag("biome","Adds a new biome to the game");
-seperator(2);
+seperator(3);
add_tag("comic-txt","Cartoon Style Texture Packs");
add_tag("real-txt","Realistic Style Texture Packs");
add_tag("hd-txt","HD Texture Packs");
diff --git a/icon/admin.png b/icon/admin.png
new file mode 100644
index 0000000..1502f16
Binary files /dev/null and b/icon/admin.png differ
diff --git a/icon/biome.png b/icon/biome.png
new file mode 100644
index 0000000..661c086
Binary files /dev/null and b/icon/biome.png differ
diff --git a/icon/envir.png b/icon/envir.png
new file mode 100644
index 0000000..dcc3822
Binary files /dev/null and b/icon/envir.png differ
diff --git a/icon/fun.png b/icon/fun.png
new file mode 100644
index 0000000..977c76f
Binary files /dev/null and b/icon/fun.png differ
diff --git a/icon/growing.png b/icon/growing.png
new file mode 100644
index 0000000..7dc89a7
Binary files /dev/null and b/icon/growing.png differ
diff --git a/icon/tech.png b/icon/tech.png
new file mode 100644
index 0000000..2a75ef3
Binary files /dev/null and b/icon/tech.png differ
diff --git a/images/feather.png b/images/feather.png
new file mode 100644
index 0000000..5c2d7c1
Binary files /dev/null and b/images/feather.png differ
diff --git a/listing.php b/listing.php
index 5498974..a3c36ef 100644
--- a/listing.php
+++ b/listing.php
@@ -1,8 +1,10 @@
";
@@ -39,43 +41,43 @@
//List Categories
if ($id=="")
- listSearch("","All","All Items in order of popularity",$handle,"");
+ listSearch("","All","All Items in order of popularity",$handle);
if ($id=="mod" || $id==""){
- listSearch("mod","All Mods","All Mods in order of popularity",$handle,"");
- listSearch("modpack","All Mod Packs","All Mod Packs in order of popularity",$handle,"");
- listSearch("code","All C++ Code Mods","All C++ Code Mods in order of popularity",$handle,"");
+ listSearch("mod","All Mods","All Mods in order of popularity",$handle);
+ //listSearch("modpack","All Mod Packs","All Mod Packs in order of popularity",$handle);
+ listSearch("code","All C++ Code Mods","All C++ Code Mods in order of popularity",$handle);
}
if ($id=="texture" || $id=="")
- listSearch("texture","All Texture Packs","All Texture Packs in order of popularity",$handle,"");
+ listSearch("texture","All Texture Packs","All Texture Packs in order of popularity",$handle);
if ($id=="")
- listSearch("sound","All Sound Packs","All Sound Packs and Sound Mods in order of popularity",$handle,"");
+ listSearch("sound","All Sound Packs","All Sound Packs and Sound Mods in order of popularity",$handle);
if ($id=="mod" || $id==""){
seperator(4);
- listSearch("deco","Block Adder Mods","Adds basic decorating blocks to the game (eg: moreblocks, homedecor)",$handle,"");
+ listSearch("deco","Block Adder Mods","Adds basic decorating blocks to the game (eg: moreblocks, homedecor)",$handle);
listSearch("tech","Technical Mods","Technical Mods (eg: Mesecons, Technic)",$handle,"icon/mesecon.png");
- listSearch("fun","Experimental Mods","Experimental mods for the game (eg: Chess, Mesecons, Carts)",$handle,"icon/carts.png");
- listSearch("server","Server Interaction Mods","Mods ideal for servers (low lag, tools)(eg: antigrief, money)",$handle,"icon/worldedit.png");
- listSearch("food","Food Mods","Mods that add food",$handle,"icon/food.png");
- listSearch("growing","Growing Mods","Mods that add Plants",$handle,"icon/farming.png");
- listSearch("mobs","Mob Mods","Mods that add Mobs",$handle,"");
- listSearch("graphics","Graphics","Mods that improve the graphics of Minetest (eg: animated_torches, different player textures)",$handle,"");
- listSearch("util","Utility Mods","Mods that add new feature and actons to the game (eg: bones,falling_items,throwing)",$handle,"");
- listSearch("3d","3D Object Mods","Mods that use NodeBoxes",$handle,"");
+ listSearch("fun","Experimental Mods","Experimental mods for the game (eg: Chess, Mesecons, Carts)",$handle);
+ listSearch("server","Server Interaction Mods","Mods ideal for servers (low lag, tools)(eg: antigrief, money)",$handle);
+ listSearch("food","Food Mods","Mods that add food",$handle);
+ listSearch("growing","Growing Mods","Mods that add Plants",$handle);
+ listSearch("mobs","Mob Mods","Mods that add Mobs",$handle);
+ listSearch("graphics","Graphics","Mods that improve the graphics of Minetest (eg: animated_torches, different player textures)",$handle);
+ listSearch("util","Utility Mods","Mods that add new feature and actons to the game (eg: bones,falling_items,throwing)",$handle);
+ listSearch("3d","3D Object Mods","Mods that use NodeBoxes",$handle);
seperator(4);
- listSearch("envir","Enviroment Mods","Changes the map generator",$handle,"icon/moreores.png");
- listSearch("biome","Biome Mods","Adds a new biome to the game",$handle,"icon/snow.png");
+ listSearch("envir","Enviroment Mods","Changes the map generator",$handle);
+ listSearch("biome","Biome Mods","Adds a new biome to the game",$handle);
}
if ($id=="texture" || $id==""){
seperator(4);
- listSearch("comic-txt","Comic Style Textures","Cartoon Style Texture Packs",$handle,"icon/haven.png");
- listSearch("real-txt","Realistic Textures","Realistic Styled Texture Packs",$handle,"icon/haven.png");
- listSearch("hd-txt","HD Textures","HD Texture packs",$handle,"icon/haven.png");
+ listSearch("comic-txt","Comic Style Textures","Cartoon Style Texture Packs",$handle);
+ listSearch("real-txt","Realistic Textures","Realistic Styled Texture Packs",$handle);
+ listSearch("hd-txt","HD Textures","HD Texture packs",$handle);
}
/*seperator(4);
diff --git a/login.php b/login.php
deleted file mode 100644
index 62b86c9..0000000
--- a/login.php
+++ /dev/null
@@ -1,42 +0,0 @@
-Sign Up";
-}
-
-$page_title="Log In - Minetest Mods";
-include "scripts/pageheader.php";
-echo "
<
$query= mysql_real_escape_string ($query);
if ($mode=="tags"){
- $qu_str="SELECT * FROM mods WHERE tags LIKE '%$query%'";
+ $qu_str="SELECT * FROM mods WHERE tags LIKE '%$query%' AND tags NOT LIKE '%dns%'";
}else if ($mode=="sb"){
if (is_numeric($query)==true){
echo "";
@@ -50,7 +50,7 @@ while ($hash = mysql_fetch_assoc($res)){
// End of Phitherek_' s change
$overview=str_replace("\\'","'",$hash['overview']);
echo "
$overview
";
- echo "
{$hash['tags']}
";
+ echo "
".tagLinks($hash['tags'])."
";
echo "
{$hash['likes']}
\n";
$alternate=1-$alternate;
diff --git a/scripts/messages.php b/scripts/messages.php
index e0317e3..026981f 100644
--- a/scripts/messages.php
+++ b/scripts/messages.php
@@ -14,6 +14,14 @@ if ($_SESSION['msg']==0){
}
if ($_SESSION['user']=="RAPHAEL"){
- printNotice("Message to RAPHAEL from the admin","You have not specified many tags for your mods. Tags group similar mods together, and help users search for and find them. For help, see the tags reference");
+ printNotice("Message to RAPHAEL from the admin","Some of your mods do not have their basename/names spaces defined, and so have been hidden from the listings. Hidden Mods\n
In addition to this, you have not specified many tags for your mods. Tags group similar mods together, and help users search for and find them. For help, see the tags reference\n
");
+}
+
+if ($_SESSION['user']=="Zeg9"){
+ printNotice("Message to Zeg9 from the admin","Some of your mods do not have their basename/names spaces defined, and so have been hidden from the listings. Hidden Mods\n
");
+}
+
+if ($_SESSION['user']=="hansuke123"){
+ printNotice("Message to hansuke123 from the admin","One of your mods has been deleted as it is not applicable on this website");
}
?>
\ No newline at end of file
diff --git a/scripts/pagefooter.php b/scripts/pagefooter.php
index b882a66..a7c23e5 100644
--- a/scripts/pagefooter.php
+++ b/scripts/pagefooter.php
@@ -20,7 +20,7 @@
";
+ }
}
}
diff --git a/scripts/settings.php b/scripts/settings.php
index 832e606..8ff1bf4 100644
--- a/scripts/settings.php
+++ b/scripts/settings.php
@@ -9,16 +9,18 @@
$game="Minetest"; // The game's name
$game_sh="MT"; // The game's name in short hand
$logo=""; // The game's logo
-$serverpath="http://localhost/minetest-forum"; // The base url to the mod forum
+$serverpath="http://multa.bugs3.com/minetest/forum"; // The base url to the mod forum
// SQL Database
// Settings needed to connect to the MySql Database
-$sql_url="localhost"; // The URL to the MySql Server
-$sql_user="root"; // The username for the MySql Server
-$sql_pass=""; // The password for the MySql Server
-$sql_db="minetest";
+$sql_url="mysql.serversfree.com"; // The URL to the MySql Server
+$sql_user="u372522788_admin"; // The username for the MySql Server
+$sql_pass="password"; // The password for the MySql Server
+$sql_db="u372522788_minetest";
+
+$punbb_directory="../punbb";
// Email Address Settings
@@ -29,5 +31,5 @@ $emailver_mod=true; // Require Email Vertification to post
$emailver_login=false; // Require Email Vertification to log in
$mt_lock_down=false; // if true, only admins can access forum
-$mt_lock_msg="";
+$mt_lock_msg="Message from Rubenwardy: Changing several things involving viewmod.php";
?>
\ No newline at end of file
diff --git a/scripts/setup.php b/scripts/setup.php
index 51d0fab..72501b4 100644
--- a/scripts/setup.php
+++ b/scripts/setup.php
@@ -21,6 +21,17 @@ function SQLerror($title,$msg){
die("$msg");
}
+function SQLerrorFancy($title,$msg){
+ global $serverpath;
+ global $forum_user;
+
+ $page_title=$title;
+ include_once "pageheader.php";
+
+ echo "
$title
\n $msg";
+
+ include_once "pagefooter.php";
+}
$handle = mysql_pconnect($sql_url,$sql_user,$sql_pass) or SQLerror("MySQL Database", "Error connecting to the MySQL database");
@@ -30,6 +41,26 @@ SQLerror("MySQL Database", "Error connecting to the MySQL database");
mysql_select_db($sql_db,$handle) or die("Error Switching DB");
+
+
+//define('FORUM_QUIET_VISIT', 1);
+//define('FORUM_TURN_OFF_MAINT', 1);
+define('FORUM_DISABLE_CSRF_CONFIRM', 1);
+define('FORUM_ROOT', $punbb_relative.$punbb_directory.'/');
+require FORUM_ROOT.'include/common.php';
+
+if ($forum_user['username']!="Guest"){
+ if (user_exists($forum_user['username'],$handle)==false){
+ addUser($forum_user['username'],"x","x",$forum_user['email'],$handle);
+ }
+ login($forum_user['username']);
+}else{
+ $_SESSION['user']=="";
+ $_SESSION['auth']=="";
+}
+
+
+
if ($mt_lock_down==true){
if (is_logged_in()==false || is_member_moderator($_SESSION['user'],$handle)==false){
echo "";
@@ -71,7 +102,8 @@ function login($user){
}
function is_logged_in(){
- if ($_SESSION['auth']=="somerandomkey"){
+ global $forum_user;
+ if ($forum_user['username']!="Guest"){
return true;
}
return false;
@@ -96,7 +128,7 @@ function require_login(){
function getNoTopics($tag,$handle){
$qu = mysql_real_escape_string ($tag);
- $res = mysql_query("SELECT * FROM mods WHERE tags LIKE '%$qu%' ORDER BY likes DESC",$handle);
+ $res = mysql_query("SELECT * FROM mods WHERE tags LIKE '%$qu%' AND tags NOT LIKE '%dns%'",$handle);
return mysql_num_rows($res);
}
@@ -170,24 +202,15 @@ if ($mod[19]=="git"){
return "";
}
-if ($pun_decl==false){
-$pun_decl=true;
-//define('FORUM_QUIET_VISIT', 1);
-//define('FORUM_TURN_OFF_MAINT', 1);
-define('FORUM_DISABLE_CSRF_CONFIRM', 1);
-define('FORUM_ROOT', '../forum/');
-require FORUM_ROOT.'include/common.php';
-}
-
-if ($forum_user['username']!="Guest"){
- if (user_exists($forum_user['username'],$handle)==false){
- addUser($forum_user['username'],"x","x",$forum_user['email'],$handle);
- }
- login($forum_user['username']);
-}else{
- $_SESSION['user']=="";
- $_SESSION['auth']=="";
-}
+function tagLinks($tags){
+ $array=explode(",",$tags);
+ $result="";
+ foreach ($array as &$a){
+ $result.=" $a";
+ }
+
+ return $result;
+ }
?>
diff --git a/scripts/show_reviews.php b/scripts/show_reviews.php
new file mode 100644
index 0000000..7463524
--- /dev/null
+++ b/scripts/show_reviews.php
@@ -0,0 +1,39 @@
+\n";
+
+$reviews=false;
+while ($hash = mysql_fetch_assoc($res)){
+
+
+ $reviews=true;
+
+ echo "
";
+
+ $owner="";
+ if (is_numeric($hash['owner_id'])==true){
+ $r = mysql_query("SELECT name FROM users WHERE id=".$hash['owner_id'],$handle) or SQLerror("MySQL Query Error","Error on getting owner name from users");
+ $ra = mysql_fetch_array($r);
+ $owner = $ra['name'];
+ }
+
+ echo "
\n";
+
+if ($reviews==false){
+ echo "No reviews available";
+}
+
+?>
\ No newline at end of file
diff --git a/signup.php b/signup.php
deleted file mode 100644
index eaabebf..0000000
--- a/signup.php
+++ /dev/null
@@ -1,53 +0,0 @@
-If you did not create an account, then it is likely an admin did to add your entry. Ask an admin for your password";
-?>
-
-$message";
-?>
-
-
-
Sign Up for a Minetest Mod Forum account
-
Vote
-Vote on which mod, mod pack, texture pack or sound pack is the best
-
Add a Mod
-Add a mod, mod pack, texture pack or sound pack to this database
-
Secure
-Your password is safe with SHA-1 encrypton, and we will never share your email address or other details
-
-
-
-
\ No newline at end of file
diff --git a/slider.js b/slider.js
new file mode 100644
index 0000000..29606f8
--- /dev/null
+++ b/slider.js
@@ -0,0 +1,12 @@
+// Slider Copyright (c) to Andrew Ward
+
+// get the slider div
+var slider = document.getElementById('slider');
+
+function slideLeft(){
+
+}
+
+function slideRight(){
+
+}
\ No newline at end of file
diff --git a/style.css b/style.css
new file mode 100644
index 0000000..1a14fe7
--- /dev/null
+++ b/style.css
@@ -0,0 +1,123 @@
+#mod_main{
+ max-width:800px;
+}
+
+#mod_bar{
+ float:right;
+ width:300px;
+ background-color:#E8E8E8;
+ text-align:center;
+ padding-bottom:10px;
+}
+
+.bar_title{
+ width:100%;
+ height:42px;
+ background-color: #333333;
+ padding-top:12px;
+ color: #cccccc;
+ font-size:x-large;
+}
+#bar_download{
+ width:100%;
+ height:42px;
+ padding-top:12px;
+ font-size:x-large;
+ background-color:#61AD6D;
+ color:white;
+ margin-bottom:0;
+ background-image: url('images/feather.png');
+ background-position: bottom;
+ background-repeat: repeat-x;
+}
+
+#bar_download a {
+ color: #ffffff;
+ font-size:x-large;
+ display: block;
+ text-decoration: none;
+}
+
+#bar_download a:hover {
+ color: #cccccc;
+}
+
+#bar_stat{
+ margin-left:20px;
+}
+
+#mod_bar td {
+ text-align:left;
+}
+
+.bar_p {
+ text-align:left;
+ padding-left:20px;
+}
+
+.bar_p ul {
+ text-align:left;
+}
+
+.bar_p ul li {
+ text-align:left;
+}
+
+#slider {
+ width:640px;
+ height:280px;
+ position:relative;
+}
+
+.slideItem {
+ position:absolute;
+ left:0px;
+ top:0px;
+ width:100%;
+ height:100%;
+ background-size: cover;
+ background-position: center;
+}
+
+.slideTitle {
+ position:absolute;
+ left:0px;
+ top:0px;
+ width:630px;
+ min-height:32px;
+ padding:5px;
+ color:white;
+ background: rgba(97, 173, 109, 0.4);
+}
+
+.slideTitle a {
+ color: #cccc00;
+ text-decoration: none;
+}
+
+.slideTitle a:hover {
+ color: #ffffff;
+}
+
+.slideTitle img {
+ width: 16px;
+ height: 16px;
+}
+
+#slideLeft {
+ position:absolute;
+ left:0px;
+ top:124px;
+ width:32px;
+ height:32px;
+ background: rgba(97, 173, 109, 0.4);
+}
+
+#slideRight {
+ position:absolute;
+ left:608px;
+ top:124px;
+ width:32px;
+ height:32px;
+ background: rgba(97, 173, 109, 0.4);
+}
\ No newline at end of file
diff --git a/viewmod.php b/viewmod.php
index 32c8211..bcb25d1 100644
--- a/viewmod.php
+++ b/viewmod.php
@@ -3,130 +3,148 @@ include "scripts/setup.php";
include "scripts/voters.php";
-
$id=$_GET['id'];
$act=$_GET['action'];
-
if ($act=="like"){
echo "Liking";
- likeMod($id,$_SESSION['user'],$handle);
+ likeMod($id,$_SESSION['user'],$handle);
}
$res=0;
-$gen_num=0;
+$gen_num=$id;
if ($id=="random"){
$gen_num= rand(0,getNoTopics("",$handle));
$res = mysql_query("SELECT * FROM mods LIMIT $gen_num, 1",$handle);
}else if (is_numeric($id)){
- $res = mysql_query("SELECT * FROM mods WHERE mod_id=$id",$handle) or SQLerror("MySQL Query Error","Error on searching database.mods.mod_id for '$id'");
+ $res = mysql_query("SELECT * FROM mods WHERE mod_id=$id",$handle) or SQLerrorFancy("MySQL Query Error","Error on searching database.mods.mod_id for '$id'");
}else{
SQLerror("Non Integer","Non integers are not allowed in the id field. Back to home");
}
-$row = mysql_fetch_array($res) or SQLerror("Row Error","No results where found for a mod with the id $gen_num");
-$page_title="View mod - {$row[1]}";
-$id=$row[0];
+$row = mysql_fetch_array($res) or SQLerrorFancy("Row Error","No results where found for a mod with the id $gen_num");
+$page_title="View mod - {$row['name']}";
+$id=$row['mod_id'];
// Substitute owner ID with owner name (by Phitherek_):
-if (is_numeric($row[3])==true){
-$r = mysql_query("SELECT name FROM users WHERE id=".$row[3],$handle) or SQLerror("MySQL Query Error","Error on getting owner name from users");
+if (is_numeric($row['owner'])==true){
+$r = mysql_query("SELECT name FROM users WHERE id=".$row['owner'],$handle) or SQLerror("MySQL Query Error","Error on getting owner name from users");
$ra = mysql_fetch_array($r);
$owner = $ra['name'];
}else{
- $owner = $row[3];
+ $owner = $row['owner'];
}
// End of Phitherek_' s code
-$page_description=$row[22];
+$page_description=$row['overview'];
+
+$dnw_content=true;
+
include "scripts/pageheader.php";
if (is_member_moderator($_SESSION['user'],$handle)){
-$links="Change Owner - EditIncrease 3m ReleaseDelete";
-}elseif (getUserId($_SESSION['user'],$handle)==$row[3]){
-$links="EditIncrease 3m ReleaseDelete";
+
+$links="