Added the possibility to either convert favicons to PNG or leave them in ICO format. New favicon.php and install.php
This commit is contained in:
19
install.php
19
install.php
@@ -33,7 +33,7 @@ $submit = set_post_bool_var ('submit', false);
|
||||
$admin_message = '';
|
||||
|
||||
if (intval(str_replace('.', '', phpversion())) < 430) {
|
||||
print_msg ('You are running PHP version '.PHP_VERSION.'. Online-Bookmarks requires at least PHP 4.3.0 to run properly. You must upgrade your PHP installation before you can continue.', "error");
|
||||
print_msg ('You are running PHP version '.PHP_VERSION.'. Online-Bookmarks requires at least PHP 4.1.0 to run properly. You must upgrade your PHP installation before you can continue.', "error");
|
||||
}
|
||||
|
||||
############## database control ##############
|
||||
@@ -97,7 +97,7 @@ function create_table_user () {
|
||||
show_bookmark_description enum('0','1') NOT NULL default '1',
|
||||
show_bookmark_icon enum('0','1') NOT NULL default '1',
|
||||
show_column_date enum('0','1') NOT NULL default '1',
|
||||
date_format CHAR(10) NOT NULL DEFAULT 'd.m.Y',
|
||||
date_format SMALLINT(6) NOT NULL DEFAULT '0',
|
||||
show_column_edit enum('0','1') NOT NULL default '1',
|
||||
show_column_move enum('0','1') NOT NULL default '1',
|
||||
show_column_delete enum('0','1') NOT NULL default '1',
|
||||
@@ -404,7 +404,7 @@ if ($submit) {
|
||||
print_msg ("Table user exists, checking for version:", "notice");
|
||||
|
||||
# check for date_format field in table
|
||||
upgrade_table ("user", "date_format", "ALTER TABLE user ADD COLUMN date_format CHAR(10) NOT NULL DEFAULT 'd.m.Y' AFTER show_column_date");
|
||||
upgrade_table ("user", "date_format", "ALTER TABLE user ADD COLUMN date_format SMALLINT(6) NOT NULL DEFAULT '0' AFTER show_column_date");
|
||||
|
||||
# check for show_public field in table
|
||||
upgrade_table ("user", "show_public", "ALTER TABLE user ADD COLUMN show_public ENUM('0','1') DEFAULT 1 NOT NULL");
|
||||
@@ -416,19 +416,23 @@ if ($submit) {
|
||||
############## favicon support ##############
|
||||
|
||||
if ($convert = @exec ('which convert')) {
|
||||
$convert_favicons = "true";
|
||||
print_msg ("ImageMagick convert found: $convert", "success");
|
||||
}
|
||||
else {
|
||||
$convert = "";
|
||||
print_msg ("ImageMagick convert not found. Make sure ImageMagick is installed and specify location of convert manually in ./config/config.php", "error");
|
||||
$convert_favicons = "false";
|
||||
print_msg ("ImageMagick convert not found. Make sure ImageMagick is installed and specify location of convert manually or set \$convert_favicons to false.", "error");
|
||||
}
|
||||
|
||||
if ($identify = @exec ('which identify')) {
|
||||
$convert_favicons = "true";
|
||||
print_msg ("ImageMagick identify found: $identify", "success");
|
||||
}
|
||||
else {
|
||||
$identify = "";
|
||||
print_msg ("ImageMagick identify not found. Make sure ImageMagick is installed and specify location of identify manually in ./config/config.php", "error");
|
||||
$convert_favicons = "false";
|
||||
print_msg ("ImageMagick identify not found. Make sure ImageMagick is installed and specify location of identify manually or set \$convert_favicons to false.", "error");
|
||||
}
|
||||
|
||||
if (is_writable ("./favicons/")) {
|
||||
@@ -482,6 +486,7 @@ $date_formats = array (
|
||||
\'m.d.y\',
|
||||
);
|
||||
|
||||
$convert_favicons = ' . $convert_favicons . ';
|
||||
$convert = \'' . $convert . '\';
|
||||
$identify = \'' . $identify . '\';
|
||||
$timeout = 5;
|
||||
@@ -507,7 +512,9 @@ $delimiter = "/";
|
||||
echo '<pre style="background-color: #E0E0E0; border: 1px black solid; padding: 20px">';
|
||||
echo $config;
|
||||
echo "</pre>\n";
|
||||
echo '<a href="./index.php">Now go Bookmark...</a>';
|
||||
echo "After completing the configuration, create useraccounts with the following MySQL command:\n";
|
||||
echo "<pre>mysql> INSERT INTO user (username, password) VALUES ('johndoe', MD5('johndoes_password'));</pre>\n";
|
||||
echo '<a href="./index.php">Go Bookmark...</a>';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user