From: <chr...@us...> - 2018-02-09 13:07:21
|
Revision: 13328 http://sourceforge.net/p/xoops/svn/13328 Author: chronolabscoop Date: 2018-02-09 13:07:19 +0000 (Fri, 09 Feb 2018) Log Message: ----------- Internet WhoIS Services REST API - Version 2.2.11! Modified Paths: -------------- *.xoops.org (Subdomain APIs & Sites)/whois.xoops.org/install/include/config.php *.xoops.org (Subdomain APIs & Sites)/whois.xoops.org/install/include/page.php *.xoops.org (Subdomain APIs & Sites)/whois.xoops.org/install/language/english/install.php *.xoops.org (Subdomain APIs & Sites)/whois.xoops.org/install/page_configsave.php Added Paths: ----------- *.xoops.org (Subdomain APIs & Sites)/whois.xoops.org/install/include/constants.dist.php *.xoops.org (Subdomain APIs & Sites)/whois.xoops.org/install/page_extrasettings.php Modified: *.xoops.org (Subdomain APIs & Sites)/whois.xoops.org/install/include/config.php =================================================================== --- *.xoops.org (Subdomain APIs & Sites)/whois.xoops.org/install/include/config.php 2018-02-09 12:52:41 UTC (rev 13327) +++ *.xoops.org (Subdomain APIs & Sites)/whois.xoops.org/install/include/config.php 2018-02-09 13:07:19 UTC (rev 13328) @@ -33,16 +33,6 @@ // extension_loaded $configs['extensions'] = array( - 'mbstring' => array('MBString', sprintf(PHP_EXTENSION, CHAR_ENCODING)), - 'intl' => array('Intl', sprintf(PHP_EXTENSION, INTL_SUPPORT)), -// 'iconv' => array('Iconv', sprintf(PHP_EXTENSION, ICONV_CONVERSION)), - 'xml' => array('XML', sprintf(PHP_EXTENSION, XML_PARSING)), - 'zlib' => array('Zlib', sprintf(PHP_EXTENSION, ZLIB_COMPRESSION)), - 'gd' => array( - (function_exists('gd_info') && $gdlib = @gd_info()) ? 'GD ' . $gdlib['GD Version'] : '', - sprintf(PHP_EXTENSION, IMAGE_FUNCTIONS)), - 'exif' => array('Exif', sprintf(PHP_EXTENSION, IMAGE_METAS)), - 'curl' => array('Curl', sprintf(PHP_EXTENSION, CURL_HTTP)), ); // Writable files and directories @@ -55,6 +45,11 @@ 'include/dbconfig.php', ); +// GeoIP Resource data files default paths +$configs['apiurl'] = array( + 'strata' => 'http://strata.snails.email' +); + // Modules to be installed by default $configs['modules'] = array(); Added: *.xoops.org (Subdomain APIs & Sites)/whois.xoops.org/install/include/constants.dist.php =================================================================== --- *.xoops.org (Subdomain APIs & Sites)/whois.xoops.org/install/include/constants.dist.php (rev 0) +++ *.xoops.org (Subdomain APIs & Sites)/whois.xoops.org/install/include/constants.dist.php 2018-02-09 13:07:19 UTC (rev 13328) @@ -0,0 +1,18 @@ +<?php +/** + * API constants file + * + * You may not change or alter any portion of this comment or credits + * of supporting developers from this source code or any supporting source code + * which is considered copyrighted (c) material of the original comment or credit authors. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * @copyright (c) 2000-2016 API Project (www.api.org) + * @license GNU GPL 2 (http://www.gnu.org/licenses/gpl-2.0.html) + */ + + +// APIs URLS +define('API_PLACES_API_URL', ''); Property changes on: *.xoops.org (Subdomain APIs & Sites)/whois.xoops.org/install/include/constants.dist.php ___________________________________________________________________ Added: svn:executable ## -0,0 +1 ## +* \ No newline at end of property Modified: *.xoops.org (Subdomain APIs & Sites)/whois.xoops.org/install/include/page.php =================================================================== --- *.xoops.org (Subdomain APIs & Sites)/whois.xoops.org/install/include/page.php 2018-02-09 12:52:41 UTC (rev 13327) +++ *.xoops.org (Subdomain APIs & Sites)/whois.xoops.org/install/include/page.php 2018-02-09 13:07:19 UTC (rev 13328) @@ -43,6 +43,11 @@ 'title' => PATHS_SETTINGS_TITLE, 'icon' => 'fa fa-fw fa-folder-open' ), + 'extrasettings' => array( + 'name' => PATHS_EXTRA, + 'title' => PATHS_EXTRA_TITLE, + 'icon' => 'fa fa-fw fa-folder-open' + ), 'dbconnection' => array( 'name' => DATABASE_CONNECTION, 'title' => DATABASE_CONNECTION_TITLE, Modified: *.xoops.org (Subdomain APIs & Sites)/whois.xoops.org/install/language/english/install.php =================================================================== --- *.xoops.org (Subdomain APIs & Sites)/whois.xoops.org/install/language/english/install.php 2018-02-09 12:52:41 UTC (rev 13327) +++ *.xoops.org (Subdomain APIs & Sites)/whois.xoops.org/install/language/english/install.php 2018-02-09 13:07:19 UTC (rev 13328) @@ -196,3 +196,10 @@ define('API_ERROR_SEE_BELOW', 'See below for messages.'); define('MODULES_AVAILABLE', 'Available Modules'); define('INSTALL_THIS_MODULE', 'Add %s'); + +// Whois REST API +define('API_EXTRAS', 'Extra Configuration Settings'); +define('PATHS_EXTRA', 'Extra Settings'); +define('PATHS_EXTRA_TITLE', 'Extra Settings'); +define('API_STRATA_API_URL_LABEL', 'Internet/Transnetworking Strata+Fallout REST API [ See: <a href="https://github.com/Chronolabs-Cooperative/Strata-API-PHP" target="_blank">Github.com...</a> ]'); +define('API_STRATA_API_URL_HELP', 'Internet/Transnetworking Strata+Fallout REST API [ See: <a href="https://github.com/Chronolabs-Cooperative/Strata-API-PHP" target="_blank">Github.com...</a> ]'); Modified: *.xoops.org (Subdomain APIs & Sites)/whois.xoops.org/install/page_configsave.php =================================================================== --- *.xoops.org (Subdomain APIs & Sites)/whois.xoops.org/install/page_configsave.php 2018-02-09 12:52:41 UTC (rev 13327) +++ *.xoops.org (Subdomain APIs & Sites)/whois.xoops.org/install/page_configsave.php 2018-02-09 13:07:19 UTC (rev 13328) @@ -62,6 +62,20 @@ $GLOBALS['error'] = !($result === true); } + $constants = file(__DIR__ . DIRECTORY_SEPARATOR . 'include' . DIRECTORY_SEPARATOR . 'constants.dist.php'); + foreach($constants as $line => $code) + { + foreach($_SESSION['constants'] as $key => $values) + { + if (is_array($values)) { + foreach($values as $field => $value) + if (strpos($code, "API_".strtoupper($key)."_".strtoupper($field))) + $constants[$line] = "define('API_".strtoupper($key)."_".strtoupper($field)."','$value');\n"; + } elseif (strpos($code, "API_".strtoupper($key))) + $constants[$line] = "define('API_".strtoupper($key)."','$values');\n"; + } + } + $GLOBALS['error'] = !file_put_contents(dirname(__DIR__) . DIRECTORY_SEPARATOR . 'include' . DIRECTORY_SEPARATOR . 'constants.php' , implode($constants)); $_SESSION['settings']['authorized'] = false; if ($result === true) { Added: *.xoops.org (Subdomain APIs & Sites)/whois.xoops.org/install/page_extrasettings.php =================================================================== --- *.xoops.org (Subdomain APIs & Sites)/whois.xoops.org/install/page_extrasettings.php (rev 0) +++ *.xoops.org (Subdomain APIs & Sites)/whois.xoops.org/install/page_extrasettings.php 2018-02-09 13:07:19 UTC (rev 13328) @@ -0,0 +1,73 @@ +<?php +/* + You may not change or alter any portion of this comment or credits + of supporting developers from this source code or any supporting source code + which is considered copyrighted (c) material of the original comment or credit authors. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +*/ +/** + * Installer path configuration page + * + * See the enclosed file license.txt for licensing information. + * If you did not receive this file, get it at http://www.gnu.org/licenses/gpl-2.0.html + * + * @copyright (c) 2000-2016 API Project (www.api.org) + * @license GNU GPL 2 or later (http://www.gnu.org/licenses/gpl-2.0.html) + * @package installer + * @since 2.3.0 + * @author Haruki Setoyama <ha...@pl...> + * @author Kazumi Ono <web...@my...> + * @author Skalpa Keo <sk...@ap...> + * @author Taiwen Jiang <ph...@us...> + * @author DuGris (aka L. JEN) <du...@fr...> + **/ + +require_once './include/common.inc.php'; +defined('API_INSTALL') || die('API Installation wizard die'); + +$wizard->loadLangFile('extras'); + +include_once './include/functions.php'; + +$pageHasForm = true; +$pageHasHelp = true; + +if ($_SERVER['REQUEST_METHOD'] === 'GET' && @$_GET['var'] && @$_GET['action'] === 'checkfile') { + $file = $_GET['var']; + echo genPathCheckHtml($file, is_file($file)); + exit(); +} +if ($_SERVER['REQUEST_METHOD'] === 'POST') { + $enabled = array(); + foreach($wizard->configs['apiurl'] as $setting => $values) + { + $_SESSION['constants'][$setting]['api_url'] = $_POST[$setting]; + } + $wizard->redirectToPage('+1'); + return 302; +} +ob_start(); +?> + <div class="panel panel-info"> + <div class="panel-heading"><?php echo API_EXTRAS; ?></div> + <div class="panel-body"> + <div class="form-group"> + <?php + foreach($wizard->configs['apiurl'] as $setting => $default) + {?> + <label for="<?php echo $setting; ?>"><?php echo constant("API_".strtoupper($setting) . "_API_URL_LABEL"); ?></label> + <div class="xoform-help alert alert-info"><?php echo constant("API_".strtoupper($setting) . "_API_URL_HELP"); ?></div> + <input type="text" class="form-control" name="<?php echo $setting; ?>" id="<?php echo $setting; ?>" value="<?php echo $default; ?>"/> + <?php } + ?> + </div> + </div> + +<?php +$content = ob_get_contents(); +ob_end_clean(); + +include './include/install_tpl.php'; Property changes on: *.xoops.org (Subdomain APIs & Sites)/whois.xoops.org/install/page_extrasettings.php ___________________________________________________________________ Added: svn:executable ## -0,0 +1 ## +* \ No newline at end of property |