OSDN Git Service

Small update to iuntar.php
authorKazuki Przyborowski <kazuki.przyborowski@gmail.com>
Mon, 2 May 2011 05:43:06 +0000 (05:43 +0000)
committerKazuki Przyborowski <kazuki.przyborowski@gmail.com>
Mon, 2 May 2011 05:43:06 +0000 (05:43 +0000)
git-svn-id: svn://svn.code.sf.net/p/intdb/svn/trunk@641 2b68903e-0b30-0410-9a39-a2e4f3c5be39

inc/admin/main.php
inc/misc/ibbcode.php
inc/misc/iuntar.php
inc/versioninfo.php

index 25074c9..611b867 100644 (file)
@@ -11,7 +11,7 @@
     Copyright 2004-2011 iDB Support - http://idb.berlios.de/
     Copyright 2004-2011 Game Maker 2k - http://gamemaker2k.org/
 
-    $FileInfo: main.php - Last Update: 04/05/2011 SVN 627 - Author: cooldude2k $
+    $FileInfo: main.php - Last Update: 05/02/2011 SVN 641 - Author: cooldude2k $
 */
 $File3Name = basename($_SERVER['SCRIPT_NAME']);
 if ($File3Name=="main.php"||$File3Name=="/main.php") {
@@ -112,6 +112,12 @@ if(!isset($Settings['SQLThemes'])) {
 if($Settings['SQLThemes']!="on"&&
        $Settings['SQLThemes']!="off") {
        $Settings['SQLThemes'] = 'off'; }
+if(!isset($Settings['board_name'])&&isset($SettInfo['board_name'])) {
+       $Settings['board_name'] = $SettInfo['board_name']; }
+if(!isset($SettInfo['board_name'])&&isset($Settings['board_name'])) {
+       $SettInfo['board_name'] = $Settings['board_name']; }
+if($Settings['board_name']!=$SettInfo['board_name']) {
+       $SettInfo['board_name'] = $Settings['board_name']; }
 ?>
 <table class="Table3">
 <tr style="width: 100%; vertical-align: top;">
index 084b30e..2f75349 100644 (file)
@@ -10,8 +10,9 @@
 
     Copyright 2004-2011 iDB Support - http://idb.berlios.de/
     Copyright 2004-2011 Game Maker 2k - http://gamemaker2k.org/
+       iBBCode / iBBTags by Kazuki Przyborowski - http://idb.berlios.net/
 
-    $FileInfo: ibbcode.php - Last Update: 05/01/2011 SVN 640 - Author: cooldude2k $
+    $FileInfo: ibbcode.php - Last Update: 05/02/2011 SVN 641 - Author: cooldude2k $
 */
 $File3Name = basename($_SERVER['SCRIPT_NAME']);
 if ($File3Name=="ibbcode.php"||$File3Name=="/ibbcode.php") {
@@ -44,6 +45,11 @@ $text = preg_replace("/\[Vimeo\]([A-Za-z0-9\.\-_]+)\[\/Vimeo\]/is", "\n<object t
 $text = preg_replace("/\[TinyPic\]([A-Za-z0-9\.\-_]+)\,([A-Za-z0-9\.\-_]+)\[\/TinyPic\]/is", "<img src=\"http://\\1.tinypic.com/\\2\" alt=\"\\2\" title=\"\\2\" />", $text);
 $text = preg_replace("/\[BR\]/is", "<br />", $text);
 $text = preg_replace("/\[HR\]/is", "<hr />", $text);
+$text = preg_replace("/\[SUP\](.*?)\[\/SUP\]/is", "<sup>\\1</sup>", $text);
+$text = preg_replace("/\[SUB\](.*?)\[\/SUB\]/is", "<sub>\\1</sub>", $text);
+$text = preg_replace("/\[BoardName\]/is", $Settings['board_name'], $text);
+$text = preg_replace("/\[BoardURL\]/is", $Settings['idburl'], $text);
+$text = preg_replace("/\[WebSiteURL\]/is", $Settings['weburl'], $text);
 $text = preg_replace("/\[B\](.*?)\[\/B\]/is", "<span style=\"font-weight: bold;\">\\1</span>", $text);
 $text = preg_replace("/\[I\](.*?)\[\/I\]/is", "<span style=\"font-style: italic;\">\\1</span>", $text);
 $text = preg_replace("/\[S\](.*?)\[\/S\]/is", "<span style=\"font-style: strike;\">\\1</span>", $text);
@@ -51,7 +57,8 @@ $text = preg_replace("/\[U\](.*?)\[\/U\]/is", "<span style=\"text-decoration: un
 $text = preg_replace("/\[O\](.*?)\[\/O\]/is", "<span style=\"text-decoration: overline;\">\\1</span>", $text);
 $text = preg_replace("/\[CENTER\](.*?)\[\/CENTER\]/is", "<span style=\"text-align: center;\">\\1</span>", $text);
 $text = preg_replace("/\[SIZE\=([0-9]+)\](.*?)\[\/SIZE\]/is", "<span style=\"font-size: \\1;\">\\2</span>", $text);
-$text = preg_replace("/\[COLOR\=([A-Za-z]+)\](.*?)\[\/COLOR\]/is", "<span style=\"color: \\1;\">\\2</span>", $text);
+$text = preg_replace("/\[COLOR\=([A-Za-z0-9\#]+)\](.*?)\[\/COLOR\]/is", "<span style=\"color: \\1;\">\\2</span>", $text);
+$text = preg_replace("/\[ALIGN=(.*?)\](.*?)\[\/ALIGN\]/is", "<span style=\"text-align: \\1;\">\\2</span>", $text);
 // Pre URL and IMG tags
 if(!function_exists("urlcheck2")) {
 function urlcheck2($matches) {
@@ -60,12 +67,14 @@ $retnum = preg_match_all("/([a-zA-Z]+)\:\/\/([a-z0-9\-\.]+)(\:[0-9]+)?\/([A-Za-z
 if(isset($urlcheck[0][0])) { 
 $matches[0] = preg_replace("/\[URL\](.*?)\[\/URL\]/is", " \\1", $matches[0]);
 $matches[0] = preg_replace("/\[URL\=(.*?)\](.*?)\[\/URL\]/is", "<a href=\"\\1\">\\2</a>", $matches[0]);
-$matches[0] = preg_replace("/\[IMG](.*?)\[\/IMG\]/is", "<img src=\"\\1\" alt=\"user posted image\" title=\"user posted image\" />", $matches[0]); }
+$matches[0] = preg_replace("/\[IMG](.*?)\[\/IMG\]/is", "<img src=\"\\1\" alt=\"user posted image\" title=\"user posted image\" />", $matches[0]); 
+$matches[0] = preg_replace("/\[IMG=(.*?)]([A-Za-z0-9\s]+)\[\/IMG\]/is", "<img src=\"\\2\" alt=\"\\1\" title=\"\\1\" />", $matches[0]); }
 return $matches[0]; } }
 // Sub URL and IMG tags
 $text = preg_replace_callback("/\[URL](.*?)\[\/URL\]/is", "urlcheck2", $text);
 $text = preg_replace_callback("/\[URL\=(.*?)\](.*?)\[\/URL\]/is", "urlcheck2", $text);
 $text = preg_replace_callback("/\[IMG](.*?)\[\/IMG\]/is", "urlcheck2", $text);
+$text = preg_replace_callback("/\[IMG=(.*?)](.*?)\[\/IMG\]/is", "urlcheck2", $text);
 return $text;
 }
 ?>
\ No newline at end of file
index 4915b93..41e4d43 100644 (file)
 \r
     Copyright 2004-2011 iDB Support - http://idb.berlios.de/\r
     Copyright 2004-2011 Game Maker 2k - http://gamemaker2k.org/\r
+       iUnTar ver. 4.6.2 by Kazuki Przyborowski - http://idb.berlios.net/\r
 \r
-    $FileInfo: iuntar.php - Last Update: 01/17/2011 SVN 616 - Author: cooldude2k $\r
+    $FileInfo: iuntar.php - Last Update: 05/02/2011 SVN 641 - Author: cooldude2k $\r
 */\r
 $File3Name = basename($_SERVER['SCRIPT_NAME']);\r
 if ($File3Name=="iuntar.php"||$File3Name=="/iuntar.php") {\r
        require('index.php');\r
        exit(); }\r
-// PHP iUnTAR Version 4.6\r
+// PHP iUnTAR Version 4.6.2\r
 // license: Revised BSD license\r
 function untar($tarfile,$outdir="./",$chmod=null,$extract=true,$lsonly=false,$findfile=null) {\r
 $TarSize = filesize($tarfile);\r
@@ -28,8 +29,9 @@ if($lsonly!==true&&$lsonly!==false) {
        $lsonly = false; }\r
 if($extract===true) { \r
        $lsonly = false; }\r
-if($outdir!=""&&!file_exists($outdir)&&$extract===true) {\r
-       mkdir($outdir,0777); }\r
+if($extract===true) {\r
+if($outdir!=""&&!file_exists($outdir)) {\r
+       mkdir($outdir,0777); } }\r
 $thandle = fopen($tarfile, "r");\r
 if($extract===false) {\r
        $FileArray = null; $i = 0; }\r
index 08c45db..791d7b8 100644 (file)
@@ -11,7 +11,7 @@
     Copyright 2004-2011 iDB Support - http://idb.berlios.de/
     Copyright 2004-2011 Game Maker 2k - http://gamemaker2k.org/
 
-    $FileInfo: versioninfo.php - Last Update: 05/01/2011 SVN 640 - Author: cooldude2k $
+    $FileInfo: versioninfo.php - Last Update: 05/02/2011 SVN 641 - Author: cooldude2k $
 */
 $File3Name = basename($_SERVER['SCRIPT_NAME']);
 if ($File3Name=="versioninfo.php"||$File3Name=="/versioninfo.php") {
@@ -27,8 +27,8 @@ function version_info($proname,$subver,$ver,$supver,$reltype,$svnver,$showsvn) {
        return $return_var; }
 // Version number and date stuff. :P
 $VER1[0] = 0; $VER1[1] = 4; $VER1[2] = 4; $VERFull[1] = $VER1[0].".".$VER1[1].".".$VER1[2];
-$VER2[0] = "Alpha"; $VER2[1] = "Al"; $VER2[2] = "SVN"; $SubVerN = 640;
-$SVNDay[0] = 05; $SVNDay[1] = 01; $SVNDay[2] = 2011; $SVNDay[3] = $SVNDay[0]."/".$SVNDay[1]."/".$SVNDay[2];
+$VER2[0] = "Alpha"; $VER2[1] = "Al"; $VER2[2] = "SVN"; $SubVerN = 641;
+$SVNDay[0] = 05; $SVNDay[1] = 02; $SVNDay[2] = 2011; $SVNDay[3] = $SVNDay[0]."/".$SVNDay[1]."/".$SVNDay[2];
 $AltName = "RDB"; $AltName2 = "ReneeDB"; $RName = "iDB"; $SFName = "IntDB";
 $RFullName = "Internet Discussion Boards"; $AltFullName = "Renee Discussion Boards";
 if(!isset($Settings['usealtname'])) { $Settings['usealtname'] = "no"; }