Welcome, Guest. Please Login or Register.
April 27, 2025, 07:48:20 AM
Home Help Search Log in Register
News: SMF is the next generation in forum software, almost completely re-written from the ground up, make sure you don't fall for cheap imitations that suffer from feature bloat!

YaBB SE Community  |  Development  |  Completed mods  |  [Not really a mod]: Decompress the Install file « previous next »
Pages: [1] Reply Ignore Print
Author Topic: [Not really a mod]: Decompress the Install file  (Read 1360 times)
some_user
Noobie
*
Posts: 1


I'm a llama!

[Not really a mod]: Decompress the Install file
« on: April 15, 2003, 08:56:47 PM »
Reply with quote

I hope this is the right Place for this, but I could not find a better ;)
I just downloaded your great Board Software, and wanted to Install, when I saw that there are 1,9MB to Upload :(
I only use a 56K Modem, so I don't wanted to do this ;D
So I wrote this little PHP Script, to uncompress the yse151.ya file.
You just have to Compress the file either with bz2 or with gzip (first test what your hoster supports), upload it and the install.php from the yabbSE package, modify this code that it fits your needs and finaly upload this code.
Then call this Script in your Browser and be happy ;D
<?php
/***************************************************************************
 *
 *   This program is free software; you can redistribute it and/or modify
 *   it under the terms of the GNU General Public License as published by
 *   the Free Software Foundation; either version 2 of the License, or
 *   (at your option) any later version.
 *
 ***************************************************************************/
//Encoding! gz or bz2
$encoding "gz";
//The Input File
$ip "yse151.ya.gz";
//The Output File
$op "yse151.ya";
//The EXACT Size of the output File (in bytes)
$size"1998389";
//Delete the Input after Decompress it? 1 or 0
$del "1";

// Do NOT modify anything under this line!



echo "Opening packed file...<br>\n";
switch (
$encoding) {
   case 
"gz":
if(
$bz gzopen("$ip""r") AND $stringgzread($bz$size+1) AND gzclose($bz)){
echo 
"Writing to file.....<br>\n";
if(
$fp fopen("$op""w") AND fwrite($fp$string) AND fclose($fp)){
echo 
"All done<br>\n";
}
else
die(
"write error!");
}
else
die(
"read error!");
break;
case 
"bz2":
if(
$bz bzopen("$ip""r") AND $stringbzread($bz$size+1) AND bzclose($bz)){
echo 
"Writing to file.....<br>\n";
if(
$fp fopen("$op""w") AND fwrite($fp$string) AND fclose($fp)){
echo 
"All done<br>\n";
}
else
die(
"write error!");
}
else
die(
"read error!");
break;
}
if(
filesize($op) == $size) {
echo 
"Size Matches!<br>";
if (
$del == "1")
unlink($ip);
echo 
"<br><a href=\"install.php\">Start install!</a>";
}
else {
echo 
"WARNING: The Size of the Output file dont matches the Size written in This File!<br>";
echo 
"check if this is the right unpack file for this version, and also check the uploaded file!<br>";
}
?>
Logged
[Unknown]
Global Moderator
YaBB God
*****
Posts: 7830


ICQ - 179721867unknownbrackets@hotmail.com WWW
Re:[Not really a mod]: Decompress the Install file
« Reply #1 on: April 15, 2003, 09:26:14 PM »
Reply with quote

This could be done by default, but the problem is that some hosts do not support gzip or bzip2.

I've messed with possibly RLE'ing the file, or any manner of other things.... but I can't find a good solution.  (that is, one that every host would support...)

-[Unknown]
Logged
Pages: [1] Reply Ignore Print 
YaBB SE Community  |  Development  |  Completed mods  |  [Not really a mod]: Decompress the Install file « previous - next »
 


Powered by MySQL Powered by PHP YaBB SE Community | Powered by YaBB SE
© 2001-2003, YaBB SE Dev Team. All Rights Reserved.
SMF 2.1.4 © 2023, Simple Machines
Valid XHTML 1.0! Valid CSS

Page created in 0.036 seconds with 16 queries.