Sliders via bbcode and optiming validations
parent
3e9c18c82b
commit
10eb7de8a2
11
addentry.php
11
addentry.php
|
@ -106,10 +106,13 @@ License: <input type="text" size="60" placeholder="The entries license." name="m
|
|||
<tr>
|
||||
<table width="100%"><tr>
|
||||
<td>*
|
||||
<input type="radio" name="mod_tag_type" value="mod"> Mod
|
||||
<input type="radio" name="mod_tag_type" value="mpdpack"> Mod Pack
|
||||
<input type="radio" name="mod_tag_type" value="texture"> Texture Pack
|
||||
<input type="radio" name="mod_tag_type" value="code"> Code Mod
|
||||
<input type="radio" name="mod_tag_type" value="mod"> Mod
|
||||
<input type="radio" name="mod_tag_type" value="modpack"> Mod Pack
|
||||
<input type="radio" name="mod_tag_type" value="game"> Game
|
||||
<input type="radio" name="mod_tag_type" value="code"> Code Mod
|
||||
<input type="radio" name="mod_tag_type" value="texture"> Texture Pack
|
||||
|
||||
|
||||
</td>
|
||||
<td>
|
||||
<a href="help/tags.php" target="_blank">Other Tags</a>: <input type="text" placeholder="separated by commas" size=30 name="mod_tag_msc" value="<?php
|
||||
|
|
|
@ -12,11 +12,11 @@ if (is_numeric($id)==false){
|
|||
include "scripts/pageheader.php";
|
||||
|
||||
$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'");
|
||||
$row = mysql_fetch_row($res) or die("row error");
|
||||
// Owner name instead of id, 3m_specific (by Phitherek_)
|
||||
$owr = mysql_query("SELECT name FROM users WHERE id=".$row[3], $handle);
|
||||
$row = mysql_fetch_array($res) or die("row error");
|
||||
|
||||
$owr = mysql_query("SELECT name FROM users WHERE id=".$row['owner'], $handle);
|
||||
$owar = mysql_fetch_array($owr);
|
||||
// End of Phitherek_' s code
|
||||
|
||||
if (is_member_moderator($_SESSION['user'],$handle) || $_SESSION['user']==$owar['name'] || $_SESSION['user']==$row[3]){
|
||||
}else{
|
||||
SQLerror("Editing Denied","You do not own that entry, and you are not a moderator");
|
||||
|
@ -29,24 +29,27 @@ SQLerror("Editing Denied","You do not own that entry, and you are not a moderato
|
|||
|
||||
|
||||
if ((include('scripts/edit_validation.php'))==1){
|
||||
include "scripts/entry_adders_sql_safe.php";
|
||||
mysql_query("UPDATE mods SET version='$version' WHERE name='$name'",$handle);
|
||||
// 3m release (by Phitherek_)
|
||||
mysql_query("UPDATE mods SET 3m_rele='$mmmrel' WHERE name='$name'",$handle) or SQLerror("Error on 3m_specific:rel","");
|
||||
// End of Phitherek_' s code
|
||||
mysql_query("UPDATE mods SET overview='$overview' WHERE name='$name'",$handle)or SQLerror("Error on overview","");
|
||||
mysql_query("UPDATE mods SET description='$desc' WHERE name='$name'",$handle) or SQLerror("Error on desc","");
|
||||
mysql_query("UPDATE mods SET tags='$tags' WHERE name='$name'",$handle)or SQLerror("Error on tags","");
|
||||
mysql_query("UPDATE mods SET license='$license' WHERE name='$name'",$handle)or SQLerror("Error on license","");
|
||||
// 3m repotype (by Phitherek_)
|
||||
mysql_query("UPDATE mods SET repotype='$mmmrt' WHERE name='$name'",$handle) or SQLerror("Error on 3m_specific:repotype","");
|
||||
// End of Phitherek_' s code
|
||||
mysql_query("UPDATE mods SET file='$file' WHERE name='$name'",$handle)or SQLerror("Error on file","");
|
||||
mysql_query("UPDATE mods SET depend='$depend' WHERE name='$name'",$handle)or SQLerror("Error on depend","");
|
||||
mysql_query("UPDATE mods SET basename='$basename' WHERE name='$name'",$handle)or SQLerror("Error on basename","");
|
||||
if ((include('scripts/entry_validation.php'))==1){
|
||||
|
||||
header("location: viewmod.php?id=$id");
|
||||
die("");
|
||||
// Convert values to SQL compatible
|
||||
include "scripts/entry_adders_sql_safe.php";
|
||||
|
||||
// Set all the rows data
|
||||
mysql_query("UPDATE mods SET version='$version' WHERE name='$name'",$handle);
|
||||
mysql_query("UPDATE mods SET 3m_rele='$mmmrel' WHERE name='$name'",$handle) or SQLerror("Error on 3m_specific:rel","");
|
||||
mysql_query("UPDATE mods SET overview='$overview' WHERE name='$name'",$handle)or SQLerror("Error on overview","");
|
||||
mysql_query("UPDATE mods SET description='$desc' WHERE name='$name'",$handle) or SQLerror("Error on desc","");
|
||||
mysql_query("UPDATE mods SET tags='$tags' WHERE name='$name'",$handle)or SQLerror("Error on tags","");
|
||||
mysql_query("UPDATE mods SET license='$license' WHERE name='$name'",$handle)or SQLerror("Error on license","");
|
||||
mysql_query("UPDATE mods SET repotype='$mmmrt' WHERE name='$name'",$handle) or SQLerror("Error on 3m_specific:repotype","");
|
||||
mysql_query("UPDATE mods SET file='$file' WHERE name='$name'",$handle)or SQLerror("Error on file","");
|
||||
mysql_query("UPDATE mods SET depend='$depend' WHERE name='$name'",$handle)or SQLerror("Error on depend","");
|
||||
mysql_query("UPDATE mods SET basename='$basename' WHERE name='$name'",$handle)or SQLerror("Error on basename","");
|
||||
|
||||
// Display the extension
|
||||
header("location: viewmod.php?id=$id");
|
||||
die("");
|
||||
}
|
||||
}
|
||||
// --------------------------
|
||||
// End of loading variable
|
||||
|
@ -57,7 +60,9 @@ if ((include('scripts/edit_validation.php'))==1){
|
|||
|
||||
?>
|
||||
Help: <a href="help/markup.php" target="_blank">Description Markup</a> - <a href="help/tags.php" target="_blank">Tags</a>
|
||||
<hr />
|
||||
<hr /><?php
|
||||
echo "<p style=\"color:#ff0000;\">$message</p>\n";
|
||||
?>
|
||||
<form method="post" action="<?php echo curPageURL();?>">
|
||||
<table width="100%">
|
||||
|
||||
|
@ -66,11 +71,11 @@ Help: <a href="help/markup.php" target="_blank">Description Markup</a> - <a href
|
|||
<!--Mod Name and Version-->
|
||||
<tr>
|
||||
<td width="60%">Mod Name:* <input type="text" size="50" name="mod_name" value="<?php echo $name;?>"></td>
|
||||
<!-- 3m release (by Phitherek_) -->
|
||||
|
||||
<td width="40%">
|
||||
<table width="100%"><tr><td>Version:* <input type="text" size="10" name="mod_version" value="<?php echo $version;?>"></td><td>
|
||||
3m Release: <input type="text" size="10" name="mmmrel" value="<?php echo $mmmrel;?>"></td>
|
||||
<!-- End of Phitherek_ s change -->
|
||||
|
||||
</table>
|
||||
</td>
|
||||
<tr>
|
||||
|
|
96
index.php
96
index.php
|
@ -5,31 +5,73 @@
|
|||
echo "<tr style=\"background-color:#000000;\" height=2><td colspan=$cols></td></tr>";
|
||||
}
|
||||
|
||||
$page_title="Home";
|
||||
|
||||
$dnw_content=true;
|
||||
$page_title="Mods, Texture packs and Sound packs - the best mod listing and reviewing website";
|
||||
$dnd_intro_message = true;
|
||||
$dnw_content=true;
|
||||
|
||||
include "scripts/pageheader.php";
|
||||
?>
|
||||
|
||||
<div id="content">
|
||||
<div class="constrain" style="width:640px;">
|
||||
<div class="constrain" style="max-width:1000px;width:975px;">
|
||||
<div style="clear: both;"></div>
|
||||
<?php
|
||||
|
||||
if (is_logged_in())
|
||||
echo "<a href=\"addentry.php\">Add an entry</a> - ";
|
||||
|
||||
echo "<a href=\"listing.php\">Index of Entries</a> - <a href=\"viewmod.php?id=random\">Random Extension</a><br /><br />";
|
||||
|
||||
?>
|
||||
<div id="mod_bar">
|
||||
<div id="bar_download">
|
||||
<a href="viewmod.php?id=random">Random Extension</a>
|
||||
</div>
|
||||
|
||||
<p class="bar_p">
|
||||
Why dont you try something new?
|
||||
</p>
|
||||
|
||||
<p class="bar_p">
|
||||
Click the above link to go randomly to one of our extensions, whether that be a mod, texture pack or a sound pack.
|
||||
</p>
|
||||
|
||||
<p class="bar_p">
|
||||
or you can <a href="listing.php">view the categories</a>.
|
||||
</p>
|
||||
|
||||
|
||||
<?php
|
||||
function tabCol($title,$msg){
|
||||
echo "<tr><td><b>".$title.":</b></td><td>$msg</td></tr>\n";
|
||||
}
|
||||
|
||||
<script src="http://code.jquery.com/jquery-1.8.3.min.js"></script>
|
||||
<script src="slider.js"></script>
|
||||
echo "<div class='bar_title'>\n";
|
||||
echo "Statistics\n";
|
||||
echo "</div>\n";
|
||||
|
||||
<div id="slider">
|
||||
echo "<p><table id='bar_stat'><tbody>\n";
|
||||
tabCol("Mods",getNoTopics("mod",$handle));
|
||||
tabCol("Texture Packs",getNoTopics("texture",$handle));
|
||||
tabCol("Visitors","380 a week");
|
||||
tabCol("Views","unknown");
|
||||
tabCol("Downloads","unknown");
|
||||
echo "</tbody></table></p>\n";
|
||||
?>
|
||||
|
||||
<div class='bar_title'>
|
||||
This Project
|
||||
</div>
|
||||
|
||||
<p class="bar_p">
|
||||
Minetest Extensions was created completely in code by Andrew "rubenwardy" Ward.
|
||||
</p>
|
||||
|
||||
<p class="bar_p">
|
||||
<a href="help/about.php">Read More</a>
|
||||
</p>
|
||||
|
||||
<p class="bar_p">
|
||||
<b>Help us by telling us what you think about this interface! <a href="http://tinyurl.com/mtmdfrm">Tell us</a></b>
|
||||
</p>
|
||||
|
||||
</div>
|
||||
|
||||
<div id='mod_main'>
|
||||
|
||||
<div class="slider" id="3">
|
||||
<div id="slide_1" class="slideItem" style="background-image:url('http://mesecons.net/screenshots/1.png');">
|
||||
<div class="slideTitle">
|
||||
<div style="float:left;">
|
||||
|
@ -67,26 +109,24 @@
|
|||
<div id="slideRight" onClick="buttonClick(2);"></div>
|
||||
</div>
|
||||
|
||||
<script src="http://code.jquery.com/jquery-1.8.3.min.js"></script>
|
||||
<script src="slider.js"></script>
|
||||
|
||||
<div id="itemBar">
|
||||
<ul>
|
||||
<li><a href="listing.php?id=mod">Mods</a></li>
|
||||
<li><a href="listing.php?id=texture">Texture Packs</a></li>
|
||||
<li><a href="search.php?id=sound">Sound</a></li>
|
||||
</ul>
|
||||
<?php
|
||||
if (is_logged_in()==true){
|
||||
echo "<li>|</li>\n";
|
||||
echo "<li><a href=\"addentry.php\">Add an Extension</a>\n";
|
||||
}
|
||||
?> </ul>
|
||||
</div>
|
||||
|
||||
|
||||
<!--<h2>Welcome to Minetest Mods</h2>
|
||||
<p><b>Help us by telling us what you think about this interface! <a href="http://tinyurl.com/mtmdfrm">Tell us</a></b></p>
|
||||
Minetest Mods, Texture packs and Sound Packs! All the things that customise Minetest perfectly for you!
|
||||
|
||||
<p><font size=6>
|
||||
<ul>
|
||||
<li><a href="listing.php?id=mod"><font color="#0000FF">Mods</font></a></li>
|
||||
<li><a href="listing.php?id=texture"><font color="#0000FF">Textures</font></a></li>
|
||||
<li><a href="search.php?id=sound"><font color="#0000FF">Sounds</font></a></li>
|
||||
</ul>
|
||||
</font></p>-->
|
||||
<h2>Welcome to Minetest Extensions</h2>
|
||||
</div>
|
||||
|
||||
|
||||
<?php
|
||||
|
|
|
@ -20,6 +20,8 @@
|
|||
}
|
||||
$id=$_GET['id'];
|
||||
$page_title="Categories in $id";
|
||||
$page_description="Categories in the extensions group $id. Find mods, texture and sound packs.";
|
||||
|
||||
include "scripts/pageheader.php";
|
||||
|
||||
$id=$_GET['id'];
|
||||
|
@ -44,7 +46,8 @@
|
|||
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("game","All Game Packs","All Game packs 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);
|
||||
}
|
||||
|
||||
|
|
|
@ -1,27 +1,49 @@
|
|||
<?php
|
||||
// Load all of the posted values
|
||||
$mmmrel=$_POST['mmmrel'];
|
||||
$name=$_POST['mod_name'];
|
||||
$version=$_POST['mod_version'];
|
||||
$desc=$_POST['mod_desc'];
|
||||
$overview=$_POST['mod_ov'];
|
||||
$tags_type=$_POST['mod_tag_type'];
|
||||
$tags_msc=$_POST['mod_tag_msc'];
|
||||
$license=$_POST['mod_lic'];
|
||||
$mmmrt=$_POST['mmmrt'];
|
||||
$file=$_POST['mod_file'];
|
||||
$depend=$_POST['mod_dep'];
|
||||
$basename=$_POST['mod_base'];
|
||||
$owner=$_POST['user'];
|
||||
|
||||
// Validation
|
||||
$valid_mode = 1;
|
||||
|
||||
if ((include('entry_validation.php'))==0){
|
||||
return 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
//Extract ownerid from database (by Phitherek_)
|
||||
// Get owner id
|
||||
$q = mysql_query("SELECT id FROM users WHERE name='".$owner."'");
|
||||
$qr = mysql_fetch_array($q);
|
||||
$ownerid = $qr['id'];
|
||||
//End of Phitherek_' s code
|
||||
//Load on_submit values
|
||||
|
||||
// Get the date
|
||||
$date = date('Y-m-d H:i:s');
|
||||
$tags = "$tags_type,$tags_msc,";
|
||||
|
||||
// Does the extensions already exist?
|
||||
if (entry_exists($name,$handle))
|
||||
return 1;
|
||||
|
||||
return 1;
|
||||
|
||||
// Convert values to SQL compatible
|
||||
require_once "entry_adders_sql_safe.php";
|
||||
//Substitute owner with ownerid (by Phitherek_)
|
||||
|
||||
// Insert the data into table
|
||||
mysql_query("INSERT INTO mods (name,version,owner,description,tags,likes,dislikes,license,file,depend,basename,date_released,repotype,3m_rele,overview)
|
||||
VALUES ('$name','$version',$ownerid,'$desc','$tags',0,0,'$license','$file','$depend','$basename','$date','$mmmrt','$mmmrel','$overview')");
|
||||
//End of Phitherek_' s change
|
||||
|
||||
// Get the id
|
||||
$the_id=mysql_insert_id($handle);
|
||||
|
||||
// Display the extension
|
||||
header("location: viewmod.php?id=$the_id");
|
||||
?>
|
|
@ -1,62 +1,67 @@
|
|||
<?php
|
||||
$do=true;
|
||||
$name=$_POST['mod_name'];
|
||||
if ($name==""){
|
||||
$do=false;
|
||||
$name=$row[1];
|
||||
}
|
||||
|
||||
$version=$_POST['mod_version'];
|
||||
if ($version=="")
|
||||
$version=$row[2];
|
||||
|
||||
//3m release (by Phitherek_)
|
||||
// Load all of the posted values
|
||||
$mmmrel=$_POST['mmmrel'];
|
||||
if($mmmrel=="") {
|
||||
$mmmrel=$row[21];
|
||||
}
|
||||
//End of Phitherek_' s code
|
||||
$name=$_POST['mod_name'];
|
||||
$version=$_POST['mod_version'];
|
||||
$desc=$_POST['mod_desc'];
|
||||
$overview=$_POST['mod_ov'];
|
||||
$tags=$_POST['mod_tags'];
|
||||
$license=$_POST['mod_lic'];
|
||||
$mmmrt=$_POST['mmmrt'];
|
||||
$file=$_POST['mod_file'];
|
||||
$depend=$_POST['mod_dep'];
|
||||
$basename=$_POST['mod_base'];
|
||||
|
||||
if ($name==""){
|
||||
$name=$row['name'];
|
||||
}else{
|
||||
return 1;
|
||||
}
|
||||
|
||||
if ($version=="")
|
||||
$version=$row['version'];
|
||||
|
||||
|
||||
if($mmmrel=="")
|
||||
$mmmrel=$row['3m_rele'];
|
||||
|
||||
|
||||
// Owner name instead of id (by Phitherek_)
|
||||
$owner=$owar['name'];
|
||||
// End of Phitherek_' s change
|
||||
|
||||
$desc=$_POST['mod_desc'];
|
||||
if ($desc==""){
|
||||
echo "getting desc<br />";
|
||||
$desc=str_replace("\\'","'",$row[4]);
|
||||
$desc=str_replace("\\'","'",$row['description']);
|
||||
}
|
||||
|
||||
$overview=$_POST['mod_ov'];
|
||||
if ($overview=="")
|
||||
$overview = str_replace("\\'","'",$row[22]);
|
||||
$overview = str_replace("\\'","'",$row['overview']);
|
||||
|
||||
$tags=$_POST['mod_tags'];
|
||||
if ($tags=="")
|
||||
$tags = $row[7];
|
||||
$tags = $row['tags'];
|
||||
|
||||
$license=$_POST['mod_lic'];
|
||||
if ($license=="")
|
||||
$license=$row[8];
|
||||
$license=$row['license'];
|
||||
|
||||
// 3m repotype (by Phitherek_)
|
||||
$mmmrt=$_POST['mmmrt'];
|
||||
if($mmmrt =="") {
|
||||
$mmmrt = $row[19];
|
||||
$mmmrt = $row['repotype'];
|
||||
}
|
||||
// End of Phitherek_' s code
|
||||
|
||||
$file=$_POST['mod_file'];
|
||||
if ($file=="")
|
||||
$file=$row[9];
|
||||
$file=$row['file'];
|
||||
|
||||
$depend=$_POST['mod_dep'];
|
||||
if ($depend=="")
|
||||
$depend=$row[10];
|
||||
$depend=$row['depend'];
|
||||
|
||||
$basename=$_POST['mod_base'];
|
||||
if ($basename=="")
|
||||
$basename=$row[11];
|
||||
$basename=$row['basename'];
|
||||
|
||||
return $do;
|
||||
return 0;
|
||||
?>
|
|
@ -1,24 +1,11 @@
|
|||
<?php
|
||||
$mmmrel=$_POST['mmmrel'];
|
||||
$name=$_POST['mod_name'];
|
||||
$version=$_POST['mod_version'];
|
||||
$desc=$_POST['mod_desc'];
|
||||
$overview=$_POST['mod_ov'];
|
||||
$tags_type=$_POST['mod_tag_type'];
|
||||
$tags_msc=$_POST['mod_tag_msc'];
|
||||
$license=$_POST['mod_lic'];
|
||||
$mmmrt=$_POST['mmmrt'];
|
||||
$file=$_POST['mod_file'];
|
||||
$depend=$_POST['mod_dep'];
|
||||
$basename=$_POST['mod_base'];
|
||||
$owner=$_POST['user'];
|
||||
|
||||
if ($mmmrel==0){
|
||||
$mmmrel=1;
|
||||
}
|
||||
|
||||
if ($name=="")
|
||||
return 0;
|
||||
return 0;
|
||||
|
||||
|
||||
if (strstr($name,"'")==true){
|
||||
$message="The name field may not contain '";
|
||||
|
@ -40,15 +27,22 @@ if ($overview==""){
|
|||
return 0;
|
||||
}
|
||||
|
||||
if ($tags_type==""){
|
||||
$message="entry type field required";
|
||||
return 0;
|
||||
}
|
||||
if ($valid_mode==1){
|
||||
if ($tags_type==""){
|
||||
$message="entry type field required";
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
if ($tags_msc==""){
|
||||
$message="more than one tag is required";
|
||||
return 0;
|
||||
if ($tags_msc==""){
|
||||
$message="more than one tag is required";
|
||||
return 0;
|
||||
}
|
||||
}else{
|
||||
if ($tags==""){
|
||||
$message="more than one tag is required";
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
if($mmmrt==""){
|
||||
|
@ -63,6 +57,15 @@ if ($file==""){
|
|||
|
||||
if ($owner=="")
|
||||
$owner=$_SESSION['user'];
|
||||
|
||||
if ($valid_mode==1){
|
||||
if ($tags_type=="mod"){
|
||||
if ($basename==""){
|
||||
$message="You must give your mod a namespace. It tells mod managers where to install the mod (what folder)";
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return 1;
|
||||
|
||||
|
|
|
@ -1087,7 +1087,7 @@ public function p($string, $toBr = 0, $justParse = 1, $useSmilies = 1, $simpleSm
|
|||
|
||||
|
||||
|
||||
// it can't be [php].+ it must be [php]\n.+
|
||||
/*// it can't be [php].+ it must be [php]\n.+
|
||||
|
||||
$s = preg_replace("#\[php\]([^\r\n])#i", "[php]\r\n$1", $s);
|
||||
|
||||
|
@ -1109,7 +1109,7 @@ public function p($string, $toBr = 0, $justParse = 1, $useSmilies = 1, $simpleSm
|
|||
|
||||
$s = preg_replace("#\[php\]#i", "[php]\n<?php", $s);
|
||||
|
||||
$s = preg_replace("#\[\/php\]#i", "?>\n[/php]", $s);
|
||||
$s = preg_replace("#\[\/php\]#i", "?>\n[/php]", $s);*/
|
||||
|
||||
|
||||
|
||||
|
@ -1119,7 +1119,7 @@ public function p($string, $toBr = 0, $justParse = 1, $useSmilies = 1, $simpleSm
|
|||
|
||||
$s = preg_replace("#\[url\](.*)\[\/url\]#Ui", "<a href=\"$1\" target=\"_blank\">$1</a>", $s);
|
||||
|
||||
$s = preg_replace("#\[img\](.*)\[\/img\]#Ui", "<img src=\"$1\" border=\"0\" style=\"max-width:760px;\" />", $s);
|
||||
$s = preg_replace("#\[img\](.*)\[\/img\]#Ui", "<img src=\"$1\" border=\"0\" style=\"max-width:100%;\" />", $s);
|
||||
|
||||
$s = preg_replace("#\[email\=(.*)\](.*)\[\/email\]#Ui", "<a href=\"mailto: $1\">$2</a>", $s);
|
||||
|
||||
|
@ -1129,6 +1129,10 @@ public function p($string, $toBr = 0, $justParse = 1, $useSmilies = 1, $simpleSm
|
|||
|
||||
$s = preg_replace("#\[color\=(\#[0-9A-F]{0,6}|[A-z]+)\](.*)\[\/color\]#Ui", "<span style=\"color: $1;\">$2</span>", $s);
|
||||
|
||||
$s = preg_replace("#\[slider\=(.*)\](.*)\[\/slider\]#Ui", "<div class=\"slider\" id=\"$1\">$2<div id=\"slideLeft\" onClick=\"buttonClick(1);\"></div><div id=\"slideRight\" onClick=\"buttonClick(2);\"></div></div>", $s);
|
||||
|
||||
$s = preg_replace("#\[(.*)-sItem\=(.*)\](.*)\[\/sItem\]#Ui", "<div id=\"slide_$1\" class=\"slideItem\" style=\"background-image:url('$2');display:none;\"><div class=\"slideTitle\">$3</a></div></div>", $s);
|
||||
|
||||
$s = preg_replace("#\[h\](.*)\[\/h\]#Ui", "<h2>$1</h2>", $s);
|
||||
|
||||
$s = preg_replace("#\[hr\]#i", "<hr>", $s);
|
||||
|
@ -1136,7 +1140,7 @@ public function p($string, $toBr = 0, $justParse = 1, $useSmilies = 1, $simpleSm
|
|||
|
||||
// [php]...[/php] parse
|
||||
|
||||
$s = preg_replace("#\[php\][\n\r|\n](.*)[\n\r|\n]\[\/php\]#Uise", "'<div style=\"width: 80%; overflow: auto; text-align: left; border: 1px solid #CCCCCC; display: block; padding-left: 20px;\">'.highlight_string(html_entity_decode('\\1', ENT_QUOTES), 1).'</div>'", $s);
|
||||
//$s = preg_replace("#\[php\][\n\r|\n](.*)[\n\r|\n]\[\/php\]#Uise", "'<div style=\"width: 80%; overflow: auto; text-align: left; border: 1px solid #CCCCCC; display: block; padding-left: 20px;\">'.highlight_string(html_entity_decode('\\1', ENT_QUOTES), 1).'</div>'", $s);
|
||||
|
||||
// <span> for PHP5, <font> for PHP4
|
||||
|
||||
|
@ -1146,7 +1150,7 @@ public function p($string, $toBr = 0, $justParse = 1, $useSmilies = 1, $simpleSm
|
|||
$s = preg_replace("#\[youtube\](.*)\[\/youtube\]#Ui", "<object width=\"425\" height=\"350\"><embed src=\"http://www.youtube.com/v/$1\" type=\"application/x-shockwave-flash\" width=\"425\" height=\"350\"></embed></object>", $s);
|
||||
|
||||
|
||||
$s = preg_replace("#\[quote\]#i", "\"", $s);
|
||||
$s = preg_replace("#\[quote\]#i", "\"", $s);
|
||||
|
||||
|
||||
if (PHP_VERSION >= 5) {
|
||||
|
@ -1161,7 +1165,7 @@ public function p($string, $toBr = 0, $justParse = 1, $useSmilies = 1, $simpleSm
|
|||
|
||||
|
||||
|
||||
$s = preg_replace("#\[php\]\<#i", "</div><code><$highlight_string_type style=\"color: #000000;\">\n<", $s);
|
||||
//$s = preg_replace("#\[php\]\<#i", "</div><code><$highlight_string_type style=\"color: #000000;\">\n<", $s);
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -2,7 +2,11 @@
|
|||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="fi">
|
||||
<head>
|
||||
<meta name="keywords" content="minetest minetest-c55" />
|
||||
<meta name="keywords" content="minetest,minetest-c55,mods,extensions,textures,game<?php
|
||||
if ($page_keywords!=""){
|
||||
echo ",$page_keywords";
|
||||
}
|
||||
?>" />
|
||||
<meta name="description" content="<?php
|
||||
if ($page_description=="")
|
||||
$page_description="Minetest (minetest-c55) Extensions: Find mods, texture and sound packs to add content to your game.";
|
||||
|
@ -23,7 +27,7 @@
|
|||
<div class="constrain">
|
||||
<span class="inbar_main">
|
||||
<ul>
|
||||
<li class="navlink_normal"><a href="http://minetest.net/index.php">About</a></li>
|
||||
<li class="navlink_normal"><a href="http://minetest.net/index.php">Home</a></li>
|
||||
<li class="navlink_normal"><a href="http://minetest.net/news.php">News</a></li>
|
||||
<li class="navlink_normal"><a href="http://minetest.net/download.php">Download</a></li>
|
||||
<li class="navlink_normal"><a href="http://minetest.net/contribute.php">Contribute</a></li>
|
||||
|
@ -34,13 +38,10 @@
|
|||
</span>
|
||||
<span class="inbar_other">
|
||||
<ul>
|
||||
<!--<li class="navlink_special"><a href="http://c55.me/blog">Blog</a></li>
|
||||
<li class="navlink_special"><a href="http://wiki.minetest.com/wiki/">Wiki</a></li>
|
||||
<li class="navlink_special"><a href="http://minetest.net/forum/">Forum</a></li>
|
||||
<li class="navlink_special"><a href="https://github.com/celeron55/minetest">Github</a></li>
|
||||
<li class="navlink_special"><a href="http://api.minetest.net/">API</a></li>-->
|
||||
<li class="navlink_normal"><a href="<?php echo $serverpath;?>/index.php">Home</a></li>
|
||||
<li class="navlink_normal"><a href="<?php echo $serverpath;?>/user.php">User List</a></li>
|
||||
<li class="navlink_normal"><a href="<?php echo $serverpath;?>/help/about.php">About</a></li>
|
||||
<li class="navlink_normal"><a href="<?php echo $serverpath;?>/user.php">User List</a></li>
|
||||
<li class="navlink_normal"><a href="<?php echo $serverpath;?>/help/">Help</a></li>
|
||||
<?php
|
||||
if ($forum_user['username']!="Guest"){
|
||||
echo "<li class=\"navlink_normal\"><a href=\"$serverpath/addentry.php\">Add a Mod</a></li>";
|
||||
|
|
|
@ -6,6 +6,12 @@
|
|||
$mode="tags";
|
||||
|
||||
$page_title="Search for $query";
|
||||
$page_description="Search for the tag '$query'. Find mods, texture and sound packs.";
|
||||
|
||||
if ($mode=="sb"){
|
||||
$page_description="Search for '$query'. Find mods, texture and sound packs.";
|
||||
}
|
||||
|
||||
include "scripts/pageheader.php";
|
||||
|
||||
include "scripts/loadmods.php";
|
||||
|
|
|
@ -2,8 +2,12 @@
|
|||
var current_id = 1;
|
||||
var max = 3;
|
||||
|
||||
max=$('.slider').attr("id");
|
||||
|
||||
var looper = setInterval(slideRight, 5000);
|
||||
|
||||
$('#slide_1').fadeIn();
|
||||
|
||||
function slideLeft(){
|
||||
$('#slide_'+current_id).fadeOut();
|
||||
|
||||
|
|
15
style.css
15
style.css
|
@ -19,7 +19,7 @@
|
|||
}
|
||||
|
||||
#mod_main{
|
||||
max-width:800px;
|
||||
max-width:640px;
|
||||
}
|
||||
|
||||
#mod_bar{
|
||||
|
@ -71,19 +71,20 @@
|
|||
}
|
||||
|
||||
.bar_p {
|
||||
text-align:left;
|
||||
text-align:justify;
|
||||
padding-left:20px;
|
||||
padding-right:20px;
|
||||
}
|
||||
|
||||
.bar_p ul {
|
||||
text-align:left;
|
||||
text-align:justify;
|
||||
}
|
||||
|
||||
.bar_p ul li {
|
||||
text-align:left;
|
||||
text-align:justify;
|
||||
}
|
||||
|
||||
#slider {
|
||||
.slider {
|
||||
width:640px;
|
||||
height:280px;
|
||||
position:relative;
|
||||
|
@ -97,6 +98,8 @@
|
|||
top:0px;
|
||||
width:100%;
|
||||
height:100%;
|
||||
max-width:640px;
|
||||
min-height:480px;
|
||||
background-size: cover;
|
||||
background-position: center;
|
||||
}
|
||||
|
@ -108,6 +111,7 @@
|
|||
width:630px;
|
||||
min-height:32px;
|
||||
padding:5px;
|
||||
padding-left: 10px;
|
||||
color:white;
|
||||
background: rgba(97, 173, 109, 0.4);
|
||||
}
|
||||
|
@ -147,6 +151,7 @@
|
|||
#itemBar {
|
||||
width:620px;
|
||||
min-height:42px;
|
||||
color:#ffffff;
|
||||
padding-top:5px;
|
||||
padding-left:20px;
|
||||
background-color:#61AD6D;
|
||||
|
|
18
viewmod.php
18
viewmod.php
|
@ -26,7 +26,7 @@ if ($id=="random"){
|
|||
$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'];
|
||||
|
||||
$page_keywords=$row['tags'];
|
||||
|
||||
// Substitute owner ID with owner name (by Phitherek_):
|
||||
if (is_numeric($row['owner'])==true){
|
||||
|
@ -73,7 +73,7 @@ echo "<h1>Similar Code Part of 0.4.4</h1>Only use this for versions before this.
|
|||
}
|
||||
?>
|
||||
<div id="content">
|
||||
<div class="constrain" style="max-width:1200px;width:1150px;">
|
||||
<div class="constrain" style="max-width:1000px;width:975px;">
|
||||
<div style="clear: both;"></div>
|
||||
<?php
|
||||
|
||||
|
@ -128,7 +128,7 @@ echo "<h1>Similar Code Part of 0.4.4</h1>Only use this for versions before this.
|
|||
echo "</p>";
|
||||
|
||||
echo "<div class='bar_title'>\n";
|
||||
echo "Reviews\n";
|
||||
echo "<a name='reviews'>Reviews</a>\n";
|
||||
echo "</div>\n";
|
||||
|
||||
echo "<p>";
|
||||
|
@ -136,9 +136,10 @@ echo "<h1>Similar Code Part of 0.4.4</h1>Only use this for versions before this.
|
|||
echo "</p>";
|
||||
|
||||
echo "</div>\n\n";
|
||||
?>
|
||||
<div id="mod_main">
|
||||
|
||||
echo "<div id='mod_main'>";
|
||||
|
||||
<?php
|
||||
|
||||
require_once('scripts/formatcode.php');
|
||||
$parser = new parser;
|
||||
|
@ -146,5 +147,12 @@ echo "<div id='mod_main'>";
|
|||
|
||||
echo "<p>$parsed</p>";
|
||||
|
||||
?>
|
||||
|
||||
<script src="http://code.jquery.com/jquery-1.8.3.min.js"></script>
|
||||
<script src="slider.js"></script>
|
||||
|
||||
<?php
|
||||
|
||||
include "scripts/pagefooter.php";
|
||||
?>
|
||||
|
|
Loading…
Reference in New Issue