You can subscribe to this list here.
2012 |
Jan
|
Feb
(214) |
Mar
(139) |
Apr
(198) |
May
(187) |
Jun
(151) |
Jul
(210) |
Aug
(169) |
Sep
(58) |
Oct
(53) |
Nov
(54) |
Dec
(301) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2013 |
Jan
(348) |
Feb
(178) |
Mar
(219) |
Apr
(154) |
May
(117) |
Jun
(194) |
Jul
(61) |
Aug
(132) |
Sep
(121) |
Oct
(110) |
Nov
(11) |
Dec
(18) |
2014 |
Jan
(34) |
Feb
(50) |
Mar
(82) |
Apr
(98) |
May
(39) |
Jun
(111) |
Jul
(67) |
Aug
(36) |
Sep
(33) |
Oct
(26) |
Nov
(53) |
Dec
(44) |
2015 |
Jan
(29) |
Feb
(47) |
Mar
(25) |
Apr
(19) |
May
(23) |
Jun
(20) |
Jul
(49) |
Aug
(7) |
Sep
(10) |
Oct
(10) |
Nov
(4) |
Dec
(25) |
2016 |
Jan
(8) |
Feb
(7) |
Mar
(1) |
Apr
|
May
(3) |
Jun
|
Jul
(1) |
Aug
(2) |
Sep
|
Oct
|
Nov
(7) |
Dec
(5) |
2017 |
Jan
(4) |
Feb
|
Mar
|
Apr
|
May
(15) |
Jun
|
Jul
(18) |
Aug
(24) |
Sep
|
Oct
(14) |
Nov
|
Dec
|
2018 |
Jan
|
Feb
(22) |
Mar
|
Apr
(11) |
May
(1) |
Jun
(17) |
Jul
(2) |
Aug
(2) |
Sep
|
Oct
(6) |
Nov
(5) |
Dec
|
2019 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(2) |
From: <txm...@us...> - 2012-03-12 13:08:52
|
Revision: 9124 http://xoops.svn.sourceforge.net/xoops/?rev=9124&view=rev Author: txmodxoops Date: 2012-03-12 13:08:41 +0000 (Mon, 12 Mar 2012) Log Message: ----------- Updated Modified Paths: -------------- ThirdParty/firephp/trunk/firephp/class/logger/firephp/FirePHPCore/italian.php Modified: ThirdParty/firephp/trunk/firephp/class/logger/firephp/FirePHPCore/italian.php =================================================================== --- ThirdParty/firephp/trunk/firephp/class/logger/firephp/FirePHPCore/italian.php 2012-03-12 13:02:22 UTC (rev 9123) +++ ThirdParty/firephp/trunk/firephp/class/logger/firephp/FirePHPCore/italian.php 2012-03-12 13:08:41 UTC (rev 9124) @@ -8,7 +8,7 @@ define ('_FIREPHP_LANG6', 'Avviso'); define ('_FIREPHP_LANG7', 'Errore'); define ('_FIREPHP_LANG8', 'Attenzione'); -define ('_FIREPHP_LANG9', 'Strict'); +define ('_FIREPHP_LANG9', 'Preciso'); define ('_FIREPHP_LANG10', 'Errori'); define ('_FIREPHP_LANG11', 'Numero di errore:'); define ('_FIREPHP_LANG12', 'Messaggio di errore:'); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <txm...@us...> - 2012-03-12 13:02:33
|
Revision: 9123 http://xoops.svn.sourceforge.net/xoops/?rev=9123&view=rev Author: txmodxoops Date: 2012-03-12 13:02:22 +0000 (Mon, 12 Mar 2012) Log Message: ----------- Italian Traslation Added Paths: ----------- ThirdParty/firephp/trunk/firephp/class/logger/firephp/FirePHPCore/italian.php Added: ThirdParty/firephp/trunk/firephp/class/logger/firephp/FirePHPCore/italian.php =================================================================== --- ThirdParty/firephp/trunk/firephp/class/logger/firephp/FirePHPCore/italian.php (rev 0) +++ ThirdParty/firephp/trunk/firephp/class/logger/firephp/FirePHPCore/italian.php 2012-03-12 13:02:22 UTC (rev 9123) @@ -0,0 +1,33 @@ +<?php +// Costanti di lingua per firephp +define ('_FIREPHP_LANG1', 'File inclusi'); +define ('_FIREPHP_LANG2', 'file'); +define ('_FIREPHP_LANG3', 'Nome file:'); +define ('_FIREPHP_LANG4', 'bytes'); +define ('_FIREPHP_LANG5', 'Utilizzo della memoria'); +define ('_FIREPHP_LANG6', 'Avviso'); +define ('_FIREPHP_LANG7', 'Errore'); +define ('_FIREPHP_LANG8', 'Attenzione'); +define ('_FIREPHP_LANG9', 'Strict'); +define ('_FIREPHP_LANG10', 'Errori'); +define ('_FIREPHP_LANG11', 'Numero di errore:'); +define ('_FIREPHP_LANG12', 'Messaggio di errore:'); +define ('_FIREPHP_LANG13', 'DB-Errore'); +define ('_FIREPHP_LANG14', 'Totale:'); +define ('_FIREPHP_LANG15', 'query'); +define ('_FIREPHP_LANG16', 'Query'); +define ('_FIREPHP_LANG17', 'Query con errori'); +define ("_FIREPHP_LANG18", ": %s in %s file %s linee"); +define ('_FIREPHP_LANG19', ': cache (rigenera ogni'); +define ('_FIREPHP_LANG20', 'secondo)'); +define ('_FIREPHP_LANG21', ': No Cache'); +define ('_FIREPHP_LANG22', 'blocchi'); +define ('_FIREPHP_LANG23', 'Blocchi'); +define ('_FIREPHP_LANG24', 'Extra'); +// define ('_FIREPHP_LANG25', 'si'); +define ('_FIREPHP_LANG26', 'secondi'); +define ('_FIREPHP_LANG27', 'Timer'); +define ('_FIREPHP_LANG28', 'Parte'); +define ('_FIREPHP_LANG29', 'Tempo di caricare'); + +?> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <be...@us...> - 2012-03-12 12:55:50
|
Revision: 9122 http://xoops.svn.sourceforge.net/xoops/?rev=9122&view=rev Author: beckmi Date: 2012-03-12 12:55:37 +0000 (Mon, 12 Mar 2012) Log Message: ----------- Adding FirePHP Debug package Added Paths: ----------- ThirdParty/firephp/ ThirdParty/firephp/branches/ ThirdParty/firephp/releases/ ThirdParty/firephp/releases/1.7/ ThirdParty/firephp/trunk/ ThirdParty/firephp/trunk/firephp/ ThirdParty/firephp/trunk/firephp/class/ ThirdParty/firephp/trunk/firephp/class/logger/ ThirdParty/firephp/trunk/firephp/class/logger/firephp/ ThirdParty/firephp/trunk/firephp/class/logger/firephp/FirePHPCore/ ThirdParty/firephp/trunk/firephp/class/logger/firephp/FirePHPCore/FirePHP.class.php ThirdParty/firephp/trunk/firephp/class/logger/firephp/FirePHPCore/LICENSE ThirdParty/firephp/trunk/firephp/class/logger/firephp/FirePHPCore/english.php ThirdParty/firephp/trunk/firephp/class/logger/firephp/FirePHPCore/fb.php ThirdParty/firephp/trunk/firephp/class/logger/firephp/FirePHPCore/german.php ThirdParty/firephp/trunk/firephp/class/logger/firephp/FirePHPCore/index.html ThirdParty/firephp/trunk/firephp/class/logger/firephp/logger.php ThirdParty/firephp/trunk/firephp/class/logger/legacy/ ThirdParty/firephp/trunk/firephp/class/logger/legacy/index.html ThirdParty/firephp/trunk/firephp/class/logger/legacy/logger.php ThirdParty/firephp/trunk/firephp/class/logger/legacy/render.php ThirdParty/firephp/trunk/firephp/class/logger/xoopslogger.php ThirdParty/firephp/trunk/firephp/class/smarty/ ThirdParty/firephp/trunk/firephp/class/smarty/internals/ ThirdParty/firephp/trunk/firephp/class/smarty/internals/core.display_debug_console.php ThirdParty/firephp/trunk/firephp/class/template.php ThirdParty/firephp/trunk/firephp/xoops_data/ ThirdParty/firephp/trunk/firephp/xoops_data/configs/ ThirdParty/firephp/trunk/firephp/xoops_data/configs/index.html ThirdParty/firephp/trunk/firephp/xoops_data/configs/xoopsconfig.php Added: ThirdParty/firephp/trunk/firephp/class/logger/firephp/FirePHPCore/FirePHP.class.php =================================================================== --- ThirdParty/firephp/trunk/firephp/class/logger/firephp/FirePHPCore/FirePHP.class.php (rev 0) +++ ThirdParty/firephp/trunk/firephp/class/logger/firephp/FirePHPCore/FirePHP.class.php 2012-03-12 12:55:37 UTC (rev 9122) @@ -0,0 +1,1828 @@ +<?php +// Authors: +// - cadorn, Christoph Dorn <chr...@ch...>, Copyright 2007, New BSD License +// - qbbr, Sokolov Innokenty <sok...@gm...>, Copyright 2011, New BSD License +// - cadorn, Christoph Dorn <chr...@ch...>, Copyright 2011, MIT License + +/** + * *** BEGIN LICENSE BLOCK ***** + * + * [MIT License](http://www.opensource.org/licenses/mit-license.php) + * + * Copyright (c) 2007+ [Christoph Dorn](http://www.christophdorn.com/) + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * + * ***** END LICENSE BLOCK ***** + * + * @copyright Copyright (C) 2007+ Christoph Dorn + * @author Christoph Dorn <chr...@ch...> + * @license [MIT License](http://www.opensource.org/licenses/mit-license.php) + * @package FirePHPCore + */ + +/** + * @see http://code.google.com/p/firephp/issues/detail?id=112 + */ +if (!defined('E_STRICT')) { + define('E_STRICT', 2048); +} +if (!defined('E_RECOVERABLE_ERROR')) { + define('E_RECOVERABLE_ERROR', 4096); +} +if (!defined('E_DEPRECATED')) { + define('E_DEPRECATED', 8192); +} +if (!defined('E_USER_DEPRECATED')) { + define('E_USER_DEPRECATED', 16384); +} + +/** + * Sends the given data to the FirePHP Firefox Extension. + * The data can be displayed in the Firebug Console or in the + * "Server" request tab. + * + * For more information see: http://www.firephp.org/ + * + * @copyright Copyright (C) 2007+ Christoph Dorn + * @author Christoph Dorn <chr...@ch...> + * @license [MIT License](http://www.opensource.org/licenses/mit-license.php) + * @package FirePHPCore + */ +class FirePHP { + + /** + * FirePHP version + * + * @var string + */ + const VERSION = '1.0b1rc1'; + + /** + * Firebug LOG level + * + * Logs a message to firebug console. + * + * @var string + */ + const LOG = 'LOG'; + + /** + * Firebug INFO level + * + * Logs a message to firebug console and displays an info icon before the message. + * + * @var string + */ + const INFO = 'INFO'; + + /** + * Firebug WARN level + * + * Logs a message to firebug console, displays an warning icon before the message and colors the line turquoise. + * + * @var string + */ + const WARN = 'WARN'; + + /** + * Firebug ERROR level + * + * Logs a message to firebug console, displays an error icon before the message and colors the line yellow. Also increments the firebug error count. + * + * @var string + */ + const ERROR = 'ERROR'; + + /** + * Dumps a variable to firebug's server panel + * + * @var string + */ + const DUMP = 'DUMP'; + + /** + * Displays a stack trace in firebug console + * + * @var string + */ + const TRACE = 'TRACE'; + + /** + * Displays an exception in firebug console + * + * Increments the firebug error count. + * + * @var string + */ + const EXCEPTION = 'EXCEPTION'; + + /** + * Displays an table in firebug console + * + * @var string + */ + const TABLE = 'TABLE'; + + /** + * Starts a group in firebug console + * + * @var string + */ + const GROUP_START = 'GROUP_START'; + + /** + * Ends a group in firebug console + * + * @var string + */ + const GROUP_END = 'GROUP_END'; + + /** + * Singleton instance of FirePHP + * + * @var FirePHP + */ + protected static $instance = null; + + /** + * Flag whether we are logging from within the exception handler + * + * @var boolean + */ + protected $inExceptionHandler = false; + + /** + * Flag whether to throw PHP errors that have been converted to ErrorExceptions + * + * @var boolean + */ + protected $throwErrorExceptions = true; + + /** + * Flag whether to convert PHP assertion errors to Exceptions + * + * @var boolean + */ + protected $convertAssertionErrorsToExceptions = true; + + /** + * Flag whether to throw PHP assertion errors that have been converted to Exceptions + * + * @var boolean + */ + protected $throwAssertionExceptions = false; + + /** + * Wildfire protocol message index + * + * @var integer + */ + protected $messageIndex = 1; + + /** + * Options for the library + * + * @var array + */ + protected $options = array('maxDepth' => 10, + 'maxObjectDepth' => 5, + 'maxArrayDepth' => 5, + 'useNativeJsonEncode' => true, + 'includeLineNumbers' => true); + + /** + * Filters used to exclude object members when encoding + * + * @var array + */ + protected $objectFilters = array( + 'firephp' => array('objectStack', 'instance', 'json_objectStack'), + 'firephp_test_class' => array('objectStack', 'instance', 'json_objectStack') + ); + + /** + * A stack of objects used to detect recursion during object encoding + * + * @var object + */ + protected $objectStack = array(); + + /** + * Flag to enable/disable logging + * + * @var boolean + */ + protected $enabled = true; + + /** + * The insight console to log to if applicable + * + * @var object + */ + protected $logToInsightConsole = null; + + /** + * When the object gets serialized only include specific object members. + * + * @return array + */ + public function __sleep() + { + return array('options', 'objectFilters', 'enabled'); + } + + /** + * Gets singleton instance of FirePHP + * + * @param boolean $autoCreate + * @return FirePHP + */ + public static function getInstance($autoCreate = false) + { + if ($autoCreate === true && !self::$instance) { + self::init(); + } + return self::$instance; + } + + /** + * Creates FirePHP object and stores it for singleton access + * + * @return FirePHP + */ + public static function init() + { + return self::setInstance(new self()); + } + + /** + * Set the instance of the FirePHP singleton + * + * @param FirePHP $instance The FirePHP object instance + * @return FirePHP + */ + public static function setInstance($instance) + { + return self::$instance = $instance; + } + + /** + * Set an Insight console to direct all logging calls to + * + * @param object $console The console object to log to + * @return void + */ + public function setLogToInsightConsole($console) + { + if (is_string($console)) { + if (get_class($this) != 'FirePHP_Insight' && !is_subclass_of($this, 'FirePHP_Insight')) { + throw new Exception('FirePHP instance not an instance or subclass of FirePHP_Insight!'); + } + $this->logToInsightConsole = $this->to('request')->console($console); + } else { + $this->logToInsightConsole = $console; + } + } + + /** + * Enable and disable logging to Firebug + * + * @param boolean $enabled TRUE to enable, FALSE to disable + * @return void + */ + public function setEnabled($enabled) + { + $this->enabled = $enabled; + } + + /** + * Check if logging is enabled + * + * @return boolean TRUE if enabled + */ + public function getEnabled() + { + return $this->enabled; + } + + /** + * Specify a filter to be used when encoding an object + * + * Filters are used to exclude object members. + * + * @param string $class The class name of the object + * @param array $filter An array of members to exclude + * @return void + */ + public function setObjectFilter($class, $filter) + { + $this->objectFilters[strtolower($class)] = $filter; + } + + /** + * Set some options for the library + * + * Options: + * - maxDepth: The maximum depth to traverse (default: 10) + * - maxObjectDepth: The maximum depth to traverse objects (default: 5) + * - maxArrayDepth: The maximum depth to traverse arrays (default: 5) + * - useNativeJsonEncode: If true will use json_encode() (default: true) + * - includeLineNumbers: If true will include line numbers and filenames (default: true) + * + * @param array $options The options to be set + * @return void + */ + public function setOptions($options) + { + $this->options = array_merge($this->options, $options); + } + + /** + * Get options from the library + * + * @return array The currently set options + */ + public function getOptions() + { + return $this->options; + } + + /** + * Set an option for the library + * + * @param string $name + * @param mixed $value + * @return void + * @throws Exception + */ + public function setOption($name, $value) + { + if (!isset($this->options[$name])) { + throw $this->newException('Unknown option: ' . $name); + } + $this->options[$name] = $value; + } + + /** + * Get an option from the library + * + * @param string $name + * @return mixed + * @throws Exception + */ + public function getOption($name) + { + if (!isset($this->options[$name])) { + throw $this->newException('Unknown option: ' . $name); + } + return $this->options[$name]; + } + + /** + * Register FirePHP as your error handler + * + * Will throw exceptions for each php error. + * + * @return mixed Returns a string containing the previously defined error handler (if any) + */ + public function registerErrorHandler($throwErrorExceptions = false) + { + //NOTE: The following errors will not be caught by this error handler: + // E_ERROR, E_PARSE, E_CORE_ERROR, + // E_CORE_WARNING, E_COMPILE_ERROR, + // E_COMPILE_WARNING, E_STRICT + + $this->throwErrorExceptions = $throwErrorExceptions; + + return set_error_handler(array($this, 'errorHandler')); + } + + /** + * FirePHP's error handler + * + * Throws exception for each php error that will occur. + * + * @param integer $errno + * @param string $errstr + * @param string $errfile + * @param integer $errline + * @param array $errcontext + */ + public function errorHandler($errno, $errstr, $errfile, $errline, $errcontext) + { + // Don't throw exception if error reporting is switched off + if (error_reporting() == 0) { + return; + } + // Only throw exceptions for errors we are asking for + if (error_reporting() & $errno) { + + $exception = new ErrorException($errstr, 0, $errno, $errfile, $errline); + if ($this->throwErrorExceptions) { + throw $exception; + } else { + $this->fb($exception); + } + } + } + + /** + * Register FirePHP as your exception handler + * + * @return mixed Returns the name of the previously defined exception handler, + * or NULL on error. + * If no previous handler was defined, NULL is also returned. + */ + public function registerExceptionHandler() + { + return set_exception_handler(array($this, 'exceptionHandler')); + } + + /** + * FirePHP's exception handler + * + * Logs all exceptions to your firebug console and then stops the script. + * + * @param Exception $exception + * @throws Exception + */ + function exceptionHandler($exception) + { + $this->inExceptionHandler = true; + + header('HTTP/1.1 500 Internal Server Error'); + + try { + $this->fb($exception); + } catch (Exception $e) { + echo 'We had an exception: ' . $e; + } + + $this->inExceptionHandler = false; + } + + /** + * Register FirePHP driver as your assert callback + * + * @param boolean $convertAssertionErrorsToExceptions + * @param boolean $throwAssertionExceptions + * @return mixed Returns the original setting or FALSE on errors + */ + public function registerAssertionHandler($convertAssertionErrorsToExceptions = true, $throwAssertionExceptions = false) + { + $this->convertAssertionErrorsToExceptions = $convertAssertionErrorsToExceptions; + $this->throwAssertionExceptions = $throwAssertionExceptions; + + if ($throwAssertionExceptions && !$convertAssertionErrorsToExceptions) { + throw $this->newException('Cannot throw assertion exceptions as assertion errors are not being converted to exceptions!'); + } + + return assert_options(ASSERT_CALLBACK, array($this, 'assertionHandler')); + } + + /** + * FirePHP's assertion handler + * + * Logs all assertions to your firebug console and then stops the script. + * + * @param string $file File source of assertion + * @param integer $line Line source of assertion + * @param mixed $code Assertion code + */ + public function assertionHandler($file, $line, $code) + { + if ($this->convertAssertionErrorsToExceptions) { + + $exception = new ErrorException('Assertion Failed - Code[ ' . $code . ' ]', 0, null, $file, $line); + + if ($this->throwAssertionExceptions) { + throw $exception; + } else { + $this->fb($exception); + } + + } else { + $this->fb($code, 'Assertion Failed', FirePHP::ERROR, array('File' => $file, 'Line' => $line)); + } + } + + /** + * Start a group for following messages. + * + * Options: + * Collapsed: [true|false] + * Color: [#RRGGBB|ColorName] + * + * @param string $name + * @param array $options OPTIONAL Instructions on how to log the group + * @return true + * @throws Exception + */ + public function group($name, $options = null) + { + + if (!$name) { + throw $this->newException('You must specify a label for the group!'); + } + + if ($options) { + if (!is_array($options)) { + throw $this->newException('Options must be defined as an array!'); + } + if (array_key_exists('Collapsed', $options)) { + $options['Collapsed'] = ($options['Collapsed']) ? 'true' : 'false'; + } + } + + return $this->fb(null, $name, FirePHP::GROUP_START, $options); + } + + /** + * Ends a group you have started before + * + * @return true + * @throws Exception + */ + public function groupEnd() + { + return $this->fb(null, null, FirePHP::GROUP_END); + } + + /** + * Log object with label to firebug console + * + * @see FirePHP::LOG + * @param mixes $object + * @param string $label + * @return true + * @throws Exception + */ + public function log($object, $label = null, $options = array()) + { + return $this->fb($object, $label, FirePHP::LOG, $options); + } + + /** + * Log object with label to firebug console + * + * @see FirePHP::INFO + * @param mixes $object + * @param string $label + * @return true + * @throws Exception + */ + public function info($object, $label = null, $options = array()) + { + return $this->fb($object, $label, FirePHP::INFO, $options); + } + + /** + * Log object with label to firebug console + * + * @see FirePHP::WARN + * @param mixes $object + * @param string $label + * @return true + * @throws Exception + */ + public function warn($object, $label = null, $options = array()) + { + return $this->fb($object, $label, FirePHP::WARN, $options); + } + + /** + * Log object with label to firebug console + * + * @see FirePHP::ERROR + * @param mixes $object + * @param string $label + * @return true + * @throws Exception + */ + public function error($object, $label = null, $options = array()) + { + return $this->fb($object, $label, FirePHP::ERROR, $options); + } + + /** + * Dumps key and variable to firebug server panel + * + * @see FirePHP::DUMP + * @param string $key + * @param mixed $variable + * @return true + * @throws Exception + */ + public function dump($key, $variable, $options = array()) + { + if (!is_string($key)) { + throw $this->newException('Key passed to dump() is not a string'); + } + if (strlen($key) > 100) { + throw $this->newException('Key passed to dump() is longer than 100 characters'); + } + if (!preg_match_all('/^[a-zA-Z0-9-_\.:]*$/', $key, $m)) { + throw $this->newException('Key passed to dump() contains invalid characters [a-zA-Z0-9-_\.:]'); + } + return $this->fb($variable, $key, FirePHP::DUMP, $options); + } + + /** + * Log a trace in the firebug console + * + * @see FirePHP::TRACE + * @param string $label + * @return true + * @throws Exception + */ + public function trace($label) + { + return $this->fb($label, FirePHP::TRACE); + } + + /** + * Log a table in the firebug console + * + * @see FirePHP::TABLE + * @param string $label + * @param string $table + * @return true + * @throws Exception + */ + public function table($label, $table, $options = array()) + { + return $this->fb($table, $label, FirePHP::TABLE, $options); + } + + /** + * Insight API wrapper + * + * @see Insight_Helper::to() + */ + public static function to() + { + $instance = self::getInstance(); + if (!method_exists($instance, '_to')) { + throw new Exception('FirePHP::to() implementation not loaded'); + } + $args = func_get_args(); + return call_user_func_array(array($instance, '_to'), $args); + } + + /** + * Insight API wrapper + * + * @see Insight_Helper::plugin() + */ + public static function plugin() + { + $instance = self::getInstance(); + if (!method_exists($instance, '_plugin')) { + throw new Exception('FirePHP::plugin() implementation not loaded'); + } + $args = func_get_args(); + return call_user_func_array(array($instance, '_plugin'), $args); + } + + /** + * Check if FirePHP is installed on client + * + * @return boolean + */ + public function detectClientExtension() + { + // Check if FirePHP is installed on client via User-Agent header + if (@preg_match_all('/\sFirePHP\/([\.\d]*)\s?/si', $this->getUserAgent(), $m) && + version_compare($m[1][0], '0.0.6', '>=')) { + return true; + } else + // Check if FirePHP is installed on client via X-FirePHP-Version header + if (@preg_match_all('/^([\.\d]*)$/si', $this->getRequestHeader('X-FirePHP-Version'), $m) && + version_compare($m[1][0], '0.0.6', '>=')) { + return true; + } + return false; + } + + /** + * Log varible to Firebug + * + * @see http://www.firephp.org/Wiki/Reference/Fb + * @param mixed $object The variable to be logged + * @return boolean Return TRUE if message was added to headers, FALSE otherwise + * @throws Exception + */ + public function fb($object) + { + if ($this instanceof FirePHP_Insight && method_exists($this, '_logUpgradeClientMessage')) { + if (!FirePHP_Insight::$upgradeClientMessageLogged) { // avoid infinite recursion as _logUpgradeClientMessage() logs a message + $this->_logUpgradeClientMessage(); + } + } + + static $insightGroupStack = array(); + + if (!$this->getEnabled()) { + return false; + } + + if ($this->headersSent($filename, $linenum)) { + // If we are logging from within the exception handler we cannot throw another exception + if ($this->inExceptionHandler) { + // Simply echo the error out to the page + echo '<div style="border: 2px solid red; font-family: Arial; font-size: 12px; background-color: lightgray; padding: 5px;"><span style="color: red; font-weight: bold;">FirePHP ERROR:</span> Headers already sent in <b>' . $filename . '</b> on line <b>' . $linenum . '</b>. Cannot send log data to FirePHP. You must have Output Buffering enabled via ob_start() or output_buffering ini directive.</div>'; + } else { + throw $this->newException('Headers already sent in ' . $filename . ' on line ' . $linenum . '. Cannot send log data to FirePHP. You must have Output Buffering enabled via ob_start() or output_buffering ini directive.'); + } + } + + $type = null; + $label = null; + $options = array(); + + if (func_num_args() == 1) { + } else if (func_num_args() == 2) { + switch (func_get_arg(1)) { + case self::LOG: + case self::INFO: + case self::WARN: + case self::ERROR: + case self::DUMP: + case self::TRACE: + case self::EXCEPTION: + case self::TABLE: + case self::GROUP_START: + case self::GROUP_END: + $type = func_get_arg(1); + break; + default: + $label = func_get_arg(1); + break; + } + } else if (func_num_args() == 3) { + $type = func_get_arg(2); + $label = func_get_arg(1); + } else if (func_num_args() == 4) { + $type = func_get_arg(2); + $label = func_get_arg(1); + $options = func_get_arg(3); + } else { + throw $this->newException('Wrong number of arguments to fb() function!'); + } + + if ($this->logToInsightConsole !== null && (get_class($this) == 'FirePHP_Insight' || is_subclass_of($this, 'FirePHP_Insight'))) { + $trace = debug_backtrace(); + if (!$trace) return false; + for ($i = 0; $i < sizeof($trace); $i++) { + if (isset($trace[$i]['class'])) { + if ($trace[$i]['class'] == 'FirePHP' || $trace[$i]['class'] == 'FB') { + continue; + } + } + if (isset($trace[$i]['file'])) { + $path = $this->_standardizePath($trace[$i]['file']); + if (substr($path, -18, 18) == 'FirePHPCore/fb.php' || substr($path, -29, 29) == 'FirePHPCore/FirePHP.class.php') { + continue; + } + } + if (isset($trace[$i]['function']) && $trace[$i]['function'] == 'fb' && + isset($trace[$i - 1]['file']) && substr($this->_standardizePath($trace[$i - 1]['file']), -18, 18) == 'FirePHPCore/fb.php') { + continue; + } + if (isset($trace[$i]['class']) && $trace[$i]['class'] == 'FB' && + isset($trace[$i - 1]['file']) && substr($this->_standardizePath($trace[$i - 1]['file']), -18, 18) == 'FirePHPCore/fb.php') { + continue; + } + break; + } + // adjust trace offset + $msg = $this->logToInsightConsole->option('encoder.trace.offsetAdjustment', $i); + + if ($object instanceof Exception) { + $type = self::EXCEPTION; + } + if ($label && $type != self::TABLE && $type != self::GROUP_START) { + $msg = $msg->label($label); + } + switch ($type) { + case self::DUMP: + case self::LOG: + return $msg->log($object); + case self::INFO: + return $msg->info($object); + case self::WARN: + return $msg->warn($object); + case self::ERROR: + return $msg->error($object); + case self::TRACE: + return $msg->trace($object); + case self::EXCEPTION: + return $this->plugin('error')->handleException($object, $msg); + case self::TABLE: + if (isset($object[0]) && !is_string($object[0]) && $label) { + $object = array($label, $object); + } + return $msg->table($object[0], array_slice($object[1], 1), $object[1][0]); + case self::GROUP_START: + $insightGroupStack[] = $msg->group(md5($label))->open(); + return $msg->log($label); + case self::GROUP_END: + if (count($insightGroupStack) == 0) { + throw new Error('Too many groupEnd() as opposed to group() calls!'); + } + $group = array_pop($insightGroupStack); + return $group->close(); + default: + return $msg->log($object); + } + } + + if (!$this->detectClientExtension()) { + return false; + } + + $meta = array(); + $skipFinalObjectEncode = false; + + if ($object instanceof Exception) { + + $meta['file'] = $this->_escapeTraceFile($object->getFile()); + $meta['line'] = $object->getLine(); + + $trace = $object->getTrace(); + if ($object instanceof ErrorException + && isset($trace[0]['function']) + && $trace[0]['function'] == 'errorHandler' + && isset($trace[0]['class']) + && $trace[0]['class'] == 'FirePHP') { + + $severity = false; + switch ($object->getSeverity()) { + case E_WARNING: + $severity = 'E_WARNING'; + break; + + case E_NOTICE: + $severity = 'E_NOTICE'; + break; + + case E_USER_ERROR: + $severity = 'E_USER_ERROR'; + break; + + case E_USER_WARNING: + $severity = 'E_USER_WARNING'; + break; + + case E_USER_NOTICE: + $severity = 'E_USER_NOTICE'; + break; + + case E_STRICT: + $severity = 'E_STRICT'; + break; + + case E_RECOVERABLE_ERROR: + $severity = 'E_RECOVERABLE_ERROR'; + break; + + case E_DEPRECATED: + $severity = 'E_DEPRECATED'; + break; + + case E_USER_DEPRECATED: + $severity = 'E_USER_DEPRECATED'; + break; + } + + $object = array('Class' => get_class($object), + 'Message' => $severity . ': ' . $object->getMessage(), + 'File' => $this->_escapeTraceFile($object->getFile()), + 'Line' => $object->getLine(), + 'Type' => 'trigger', + 'Trace' => $this->_escapeTrace(array_splice($trace, 2))); + $skipFinalObjectEncode = true; + } else { + $object = array('Class' => get_class($object), + 'Message' => $object->getMessage(), + 'File' => $this->_escapeTraceFile($object->getFile()), + 'Line' => $object->getLine(), + 'Type' => 'throw', + 'Trace' => $this->_escapeTrace($trace)); + $skipFinalObjectEncode = true; + } + $type = self::EXCEPTION; + + } else if ($type == self::TRACE) { + + $trace = debug_backtrace(); + if (!$trace) return false; + for ($i = 0; $i < sizeof($trace); $i++) { + + if (isset($trace[$i]['class']) + && isset($trace[$i]['file']) + && ($trace[$i]['class'] == 'FirePHP' + || $trace[$i]['class'] == 'FB') + && (substr($this->_standardizePath($trace[$i]['file']), -18, 18) == 'FirePHPCore/fb.php' + || substr($this->_standardizePath($trace[$i]['file']), -29, 29) == 'FirePHPCore/FirePHP.class.php')) { + /* Skip - FB::trace(), FB::send(), $firephp->trace(), $firephp->fb() */ + } else + if (isset($trace[$i]['class']) + && isset($trace[$i+1]['file']) + && $trace[$i]['class'] == 'FirePHP' + && substr($this->_standardizePath($trace[$i + 1]['file']), -18, 18) == 'FirePHPCore/fb.php') { + /* Skip fb() */ + } else + if ($trace[$i]['function'] == 'fb' + || $trace[$i]['function'] == 'trace' + || $trace[$i]['function'] == 'send') { + + $object = array('Class' => isset($trace[$i]['class']) ? $trace[$i]['class'] : '', + 'Type' => isset($trace[$i]['type']) ? $trace[$i]['type'] : '', + 'Function' => isset($trace[$i]['function']) ? $trace[$i]['function'] : '', + 'Message' => $trace[$i]['args'][0], + 'File' => isset($trace[$i]['file']) ? $this->_escapeTraceFile($trace[$i]['file']) : '', + 'Line' => isset($trace[$i]['line']) ? $trace[$i]['line'] : '', + 'Args' => isset($trace[$i]['args']) ? $this->encodeObject($trace[$i]['args']) : '', + 'Trace' => $this->_escapeTrace(array_splice($trace, $i + 1))); + + $skipFinalObjectEncode = true; + $meta['file'] = isset($trace[$i]['file']) ? $this->_escapeTraceFile($trace[$i]['file']) : ''; + $meta['line'] = isset($trace[$i]['line']) ? $trace[$i]['line'] : ''; + break; + } + } + + } else + if ($type == self::TABLE) { + + if (isset($object[0]) && is_string($object[0])) { + $object[1] = $this->encodeTable($object[1]); + } else { + $object = $this->encodeTable($object); + } + + $skipFinalObjectEncode = true; + + } else if ($type == self::GROUP_START) { + + if (!$label) { + throw $this->newException('You must specify a label for the group!'); + } + + } else { + if ($type === null) { + $type = self::LOG; + } + } + + if ($this->options['includeLineNumbers']) { + if (!isset($meta['file']) || !isset($meta['line'])) { + + $trace = debug_backtrace(); + for ($i = 0; $trace && $i < sizeof($trace); $i++) { + + if (isset($trace[$i]['class']) + && isset($trace[$i]['file']) + && ($trace[$i]['class'] == 'FirePHP' + || $trace[$i]['class'] == 'FB') + && (substr($this->_standardizePath($trace[$i]['file']), -18, 18) == 'FirePHPCore/fb.php' + || substr($this->_standardizePath($trace[$i]['file']), -29, 29) == 'FirePHPCore/FirePHP.class.php')) { + /* Skip - FB::trace(), FB::send(), $firephp->trace(), $firephp->fb() */ + } else + if (isset($trace[$i]['class']) + && isset($trace[$i + 1]['file']) + && $trace[$i]['class'] == 'FirePHP' + && substr($this->_standardizePath($trace[$i + 1]['file']), -18, 18) == 'FirePHPCore/fb.php') { + /* Skip fb() */ + } else + if (isset($trace[$i]['file']) + && substr($this->_standardizePath($trace[$i]['file']), -18, 18) == 'FirePHPCore/fb.php') { + /* Skip FB::fb() */ + } else { + $meta['file'] = isset($trace[$i]['file']) ? $this->_escapeTraceFile($trace[$i]['file']) : ''; + $meta['line'] = isset($trace[$i]['line']) ? $trace[$i]['line'] : ''; + break; + } + } + } + } else { + unset($meta['file']); + unset($meta['line']); + } + + $this->setHeader('X-Wf-Protocol-1', 'http://meta.wildfirehq.org/Protocol/JsonStream/0.2'); + $this->setHeader('X-Wf-1-Plugin-1', 'http://meta.firephp.org/Wildfire/Plugin/FirePHP/Library-FirePHPCore/' . self::VERSION); + + $structureIndex = 1; + if ($type == self::DUMP) { + $structureIndex = 2; + $this->setHeader('X-Wf-1-Structure-2', 'http://meta.firephp.org/Wildfire/Structure/FirePHP/Dump/0.1'); + } else { + $this->setHeader('X-Wf-1-Structure-1', 'http://meta.firephp.org/Wildfire/Structure/FirePHP/FirebugConsole/0.1'); + } + + if ($type == self::DUMP) { + $msg = '{"' . $label . '":' . $this->jsonEncode($object, $skipFinalObjectEncode) . '}'; + } else { + $msgMeta = $options; + $msgMeta['Type'] = $type; + if ($label !== null) { + $msgMeta['Label'] = $label; + } + if (isset($meta['file']) && !isset($msgMeta['File'])) { + $msgMeta['File'] = $meta['file']; + } + if (isset($meta['line']) && !isset($msgMeta['Line'])) { + $msgMeta['Line'] = $meta['line']; + } + $msg = '[' . $this->jsonEncode($msgMeta) . ',' . $this->jsonEncode($object, $skipFinalObjectEncode) . ']'; + } + + $parts = explode("\n", chunk_split($msg, 5000, "\n")); + + for ($i = 0; $i < count($parts); $i++) { + + $part = $parts[$i]; + if ($part) { + + if (count($parts) > 2) { + // Message needs to be split into multiple parts + $this->setHeader('X-Wf-1-' . $structureIndex . '-' . '1-' . $this->messageIndex, + (($i == 0) ? strlen($msg) : '') + . '|' . $part . '|' + . (($i < count($parts) - 2) ? '\\' : '')); + } else { + $this->setHeader('X-Wf-1-' . $structureIndex . '-' . '1-' . $this->messageIndex, + strlen($part) . '|' . $part . '|'); + } + + $this->messageIndex++; + + if ($this->messageIndex > 99999) { + throw $this->newException('Maximum number (99,999) of messages reached!'); + } + } + } + + $this->setHeader('X-Wf-1-Index', $this->messageIndex - 1); + + return true; + } + + /** + * Standardizes path for windows systems. + * + * @param string $path + * @return string + */ + protected function _standardizePath($path) + { + return preg_replace('/\\\\+/', '/', $path); + } + + /** + * Escape trace path for windows systems + * + * @param array $trace + * @return array + */ + protected function _escapeTrace($trace) + { + if (!$trace) return $trace; + for ($i = 0; $i < sizeof($trace); $i++) { + if (isset($trace[$i]['file'])) { + $trace[$i]['file'] = $this->_escapeTraceFile($trace[$i]['file']); + } + if (isset($trace[$i]['args'])) { + $trace[$i]['args'] = $this->encodeObject($trace[$i]['args']); + } + } + return $trace; + } + + /** + * Escape file information of trace for windows systems + * + * @param string $file + * @return string + */ + protected function _escapeTraceFile($file) + { + /* Check if we have a windows filepath */ + if (strpos($file, '\\')) { + /* First strip down to single \ */ + + $file = preg_replace('/\\\\+/', '\\', $file); + + return $file; + } + return $file; + } + + /** + * Check if headers have already been sent + * + * @param string $filename + * @param integer $linenum + */ + protected function headersSent(&$filename, &$linenum) + { + return headers_sent($filename, $linenum); + } + + /** + * Send header + * + * @param string $name + * @param string $value + */ + protected function setHeader($name, $value) + { + return header($name . ': ' . $value); + } + + /** + * Get user agent + * + * @return string|false + */ + protected function getUserAgent() + { + if (!isset($_SERVER['HTTP_USER_AGENT'])) return false; + return $_SERVER['HTTP_USER_AGENT']; + } + + /** + * Get all request headers + * + * @return array + */ + public static function getAllRequestHeaders() + { + static $_cachedHeaders = false; + if ($_cachedHeaders !== false) { + return $_cachedHeaders; + } + $headers = array(); + if (function_exists('getallheaders')) { + foreach (getallheaders() as $name => $value) { + $headers[strtolower($name)] = $value; + } + } else { + foreach ($_SERVER as $name => $value) { + if (substr($name, 0, 5) == 'HTTP_') { + $headers[strtolower(str_replace(' ', '-', str_replace('_', ' ', substr($name, 5))))] = $value; + } + } + } + return $_cachedHeaders = $headers; + } + + /** + * Get a request header + * + * @return string|false + */ + protected function getRequestHeader($name) + { + $headers = self::getAllRequestHeaders(); + if (isset($headers[strtolower($name)])) { + return $headers[strtolower($name)]; + } + return false; + } + + /** + * Returns a new exception + * + * @param string $message + * @return Exception + */ + protected function newException($message) + { + return new Exception($message); + } + + /** + * Encode an object into a JSON string + * + * Uses PHP's jeson_encode() if available + * + * @param object $object The object to be encoded + * @param boolean $skipObjectEncode + * @return string The JSON string + */ + public function jsonEncode($object, $skipObjectEncode = false) + { + if (!$skipObjectEncode) { + $object = $this->encodeObject($object); + } + + if (function_exists('json_encode') + && $this->options['useNativeJsonEncode'] != false) { + + return json_encode($object); + } else { + return $this->json_encode($object); + } + } + + /** + * Encodes a table by encoding each row and column with encodeObject() + * + * @param array $table The table to be encoded + * @return array + */ + protected function encodeTable($table) + { + if (!$table) return $table; + + $newTable = array(); + foreach ($table as $row) { + + if (is_array($row)) { + $newRow = array(); + + foreach ($row as $item) { + $newRow[] = $this->encodeObject($item); + } + + $newTable[] = $newRow; + } + } + + return $newTable; + } + + /** + * Encodes an object including members with + * protected and private visibility + * + * @param object $object The object to be encoded + * @param integer $Depth The current traversal depth + * @return array All members of the object + */ + protected function encodeObject($object, $objectDepth = 1, $arrayDepth = 1, $maxDepth = 1) + { + if ($maxDepth > $this->options['maxDepth']) { + return '** Max Depth (' . $this->options['maxDepth'] . ') **'; + } + + $return = array(); + + if (is_resource($object)) { + + return '** ' . (string) $object . ' **'; + + } else if (is_object($object)) { + + if ($objectDepth > $this->options['maxObjectDepth']) { + return '** Max Object Depth (' . $this->options['maxObjectDepth'] . ') **'; + } + + foreach ($this->objectStack as $refVal) { + if ($refVal === $object) { + return '** Recursion (' . get_class($object) . ') **'; + } + } + array_push($this->objectStack, $object); + + $return['__className'] = $class = get_class($object); + $classLower = strtolower($class); + + $reflectionClass = new ReflectionClass($class); + $properties = array(); + foreach ($reflectionClass->getProperties() as $property) { + $properties[$property->getName()] = $property; + } + + $members = (array)$object; + + foreach ($properties as $plainName => $property) { + + $name = $rawName = $plainName; + if ($property->isStatic()) { + $name = 'static:' . $name; + } + if ($property->isPublic()) { + $name = 'public:' . $name; + } else if ($property->isPrivate()) { + $name = 'private:' . $name; + $rawName = "\0" . $class . "\0" . $rawName; + } else if ($property->isProtected()) { + $name = 'protected:' . $name; + $rawName = "\0" . '*' . "\0" . $rawName; + } + + if (!(isset($this->objectFilters[$classLower]) + && is_array($this->objectFilters[$classLower]) + && in_array($plainName, $this->objectFilters[$classLower]))) { + + if (array_key_exists($rawName, $members) && !$property->isStatic()) { + $return[$name] = $this->encodeObject($members[$rawName], $objectDepth + 1, 1, $maxDepth + 1); + } else { + if (method_exists($property, 'setAccessible')) { + $property->setAccessible(true); + $return[$name] = $this->encodeObject($property->getValue($object), $objectDepth + 1, 1, $maxDepth + 1); + } else + if ($property->isPublic()) { + $return[$name] = $this->encodeObject($property->getValue($object), $objectDepth + 1, 1, $maxDepth + 1); + } else { + $return[$name] = '** Need PHP 5.3 to get value **'; + } + } + } else { + $return[$name] = '** Excluded by Filter **'; + } + } + + // Include all members that are not defined in the class + // but exist in the object + foreach ($members as $rawName => $value) { + + $name = $rawName; + + if ($name{0} == "\0") { + $parts = explode("\0", $name); + $name = $parts[2]; + } + + $plainName = $name; + + if (!isset($properties[$name])) { + $name = 'undeclared:' . $name; + + if (!(isset($this->objectFilters[$classLower]) + && is_array($this->objectFilters[$classLower]) + && in_array($plainName, $this->objectFilters[$classLower]))) { + + $return[$name] = $this->encodeObject($value, $objectDepth + 1, 1, $maxDepth + 1); + } else { + $return[$name] = '** Excluded by Filter **'; + } + } + } + + array_pop($this->objectStack); + + } elseif (is_array($object)) { + + if ($arrayDepth > $this->options['maxArrayDepth']) { + return '** Max Array Depth (' . $this->options['maxArrayDepth'] . ') **'; + } + + foreach ($object as $key => $val) { + + // Encoding the $GLOBALS PHP array causes an infinite loop + // if the recursion is not reset here as it contains + // a reference to itself. This is the only way I have come up + // with to stop infinite recursion in this case. + if ($key == 'GLOBALS' + && is_array($val) + && array_key_exists('GLOBALS', $val)) { + $val['GLOBALS'] = '** Recursion (GLOBALS) **'; + } + + if (!$this->is_utf8($key)) { + $key = utf8_encode($key); + } + + $return[$key] = $this->encodeObject($val, 1, $arrayDepth + 1, $maxDepth + 1); + } + } else { + if ($this->is_utf8($object)) { + return $object; + } else { + return utf8_encode($object); + } + } + return $return; + } + + /** + * Returns true if $string is valid UTF-8 and false otherwise. + * + * @param mixed $str String to be tested + * @return boolean + */ + protected function is_utf8($str) + { + if (function_exists('mb_detect_encoding')) { + return ( + mb_detect_encoding($str, 'UTF-8', true) == 'UTF-8' && + ($str === null || $this->jsonEncode($str, true) !== 'null') + ); + } + $c = 0; + $b = 0; + $bits = 0; + $len = strlen($str); + for ($i = 0; $i < $len; $i++) { + $c = ord($str[$i]); + if ($c > 128) { + if (($c >= 254)) return false; + elseif ($c >= 252) $bits = 6; + elseif ($c >= 248) $bits = 5; + elseif ($c >= 240) $bits = 4; + elseif ($c >= 224) $bits = 3; + elseif ($c >= 192) $bits = 2; + else return false; + if (($i + $bits) > $len) return false; + while($bits > 1) { + $i++; + $b = ord($str[$i]); + if ($b < 128 || $b > 191) return false; + $bits--; + } + } + } + return ($str === null || $this->jsonEncode($str, true) !== 'null'); + } + + /** + * Converts to and from JSON format. + * + * JSON (JavaScript Object Notation) is a lightweight data-interchange + * format. It is easy for humans to read and write. It is easy for machines + * to parse and generate. It is based on a subset of the JavaScript + * Programming Language, Standard ECMA-262 3rd Edition - December 1999. + * This feature can also be found in Python. JSON is a text format that is + * completely language independent but uses conventions that are familiar + * to programmers of the C-family of languages, including C, C++, C#, Java, + * JavaScript, Perl, TCL, and many others. These properties make JSON an + * ideal data-interchange language. + * + * This package provides a simple encoder and decoder for JSON notation. It + * is intended for use with client-side Javascript applications that make + * use of HTTPRequest to perform server communication functions - data can + * be encoded into JSON notation for use in a client-side javascript, or + * decoded from incoming Javascript requests. JSON format is native to + * Javascript, and can be directly eval()'ed with no further parsing + * overhead + * + * All strings should be in ASCII or UTF-8 format! + * + * LICENSE: Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: Redistributions of source code must retain the + * above copyright notice, this list of conditions and the following + * disclaimer. Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN + * NO EVENT SHALL CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR + * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE + * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH + * DAMAGE. + * + * @category + * @package Services_JSON + * @author Michal Migurski <mik...@te...> + * @author Matt Knapp <mdknapp[at]gmail[dot]com> + * @author Brett Stimmerman <brettstimmerman[at]gmail[dot]com> + * @author Christoph Dorn <chr...@ch...> + * @copyright 2005 Michal Migurski + * @version CVS: $Id: JSON.php,v 1.31 2006/06/28 05:54:17 migurski Exp $ + * @license http://www.opensource.org/licenses/bsd-license.php + * @link http://pear.php.net/pepr/pepr-proposal-show.php?id=198 + */ + + + /** + * Keep a list of objects as we descend into the array so we can detect recursion. + */ + private $json_objectStack = array(); + + + /** + * convert a string from one UTF-8 char to one UTF-16 char + * + * Normally should be handled by mb_convert_encoding, but + * provides a slower PHP-only method for installations + * that lack the multibye string extension. + * + * @param string $utf8 UTF-8 character + * @return string UTF-16 character + * @access private + */ + private function json_utf82utf16($utf8) + { + // oh please oh please oh please oh please oh please + if (function_exists('mb_convert_encoding')) { + return mb_convert_encoding($utf8, 'UTF-16', 'UTF-8'); + } + + switch (strlen($utf8)) { + case 1: + // this case should never be reached, because we are in ASCII range + // see: http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8 + return $utf8; + + case 2: + // return a UTF-16 character from a 2-byte UTF-8 char + // see: http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8 + return chr(0x07 & (ord($utf8{0}) >> 2)) + . chr((0xC0 & (ord($utf8{0}) << 6)) + | (0x3F & ord($utf8{1}))); + + case 3: + // return a UTF-16 character from a 3-byte UTF-8 char + // see: http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8 + return chr((0xF0 & (ord($utf8{0}) << 4)) + | (0x0F & (ord($utf8{1}) >> 2))) + . chr((0xC0 & (ord($utf8{1}) << 6)) + | (0x7F & ord($utf8{2}))); + } + + // ignoring UTF-32 for now, sorry + return ''; + } + + /** + * encodes an arbitrary variable into JSON format + * + * @param mixed $var any number, boolean, string, array, or object to be encoded. + * see argument 1 to Services_JSON() above for array-parsing behavior. + * if var is a strng, note that encode() always expects it + * to be in ASCII or UTF-8 format! + * + * @return mixed JSON string representation of input var or an error if a problem occurs + * @access public + */ + private function json_encode($var) + { + if (is_object($var)) { + if (in_array($var, $this->json_objectStack)) { + return '"** Recursion **"'; + } + } + + switch (gettype($var)) { + case 'boolean': + return $var ? 'true' : 'false'; + + case 'NULL': + return 'null'; + + case 'integer': + return (int) $var; + + case 'double': + case 'float': + return (float) $var; + + case 'string': + // STRINGS ARE EXPECTED TO BE IN ASCII OR UTF-8 FORMAT + $ascii = ''; + $strlen_var = strlen($var); + + /* + * Iterate over every character in the string, + * escaping with a slash or encoding to UTF-8 where necessary + */ + for ($c = 0; $c < $strlen_var; ++$c) { + + $ord_var_c = ord($var{$c}); + + switch (true) { + case $ord_var_c == 0x08: + $ascii .= '\b'; + break; + case $ord_var_c == 0x09: + $ascii .= '\t'; + break; + case $ord_var_c == 0x0A: + $ascii .= '\n'; + break; + case $ord_var_c == 0x0C: + $ascii .= '\f'; + break; + case $ord_var_c == 0x0D: + $ascii .= '\r'; + break; + + case $ord_var_c == 0x22: + case $ord_var_c == 0x2F: + case $ord_var_c == 0x5C: + // double quote, slash, slosh + $ascii .= '\\' . $var{$c}; + break; + + case (($ord_var_c >= 0x20) && ($ord_var_c <= 0x7F)): + // characters U-00000000 - U-0000007F (same as ASCII) + $ascii .= $var{$c}; + break; + + case (($ord_var_c & 0xE0) == 0xC0): + // characters U-00000080 - U-000007FF, mask 110XXXXX + // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8 + $char = pack('C*', $ord_var_c, ord($var{$c + 1})); + $c += 1; + $utf16 = $this->json_utf82utf16($char); + $ascii .= sprintf('\u%04s', bin2hex($utf16)); + break; + + case (($ord_var_c & 0xF0) == 0xE0): + // characters U-00000800 - U-0000FFFF, mask 1110XXXX + // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8 + $char = pack('C*', $ord_v... [truncated message content] |
From: <be...@us...> - 2012-03-12 12:02:11
|
Revision: 9121 http://xoops.svn.sourceforge.net/xoops/?rev=9121&view=rev Author: beckmi Date: 2012-03-12 12:01:57 +0000 (Mon, 12 Mar 2012) Log Message: ----------- Creating a branch for XoopsPartners 2.0 originally refactored by ForMuss Added Paths: ----------- XoopsModules/xoopspartners/branches/formuss/ XoopsModules/xoopspartners/branches/formuss/xoopspartners/ XoopsModules/xoopspartners/branches/formuss/xoopspartners/admin/ XoopsModules/xoopspartners/branches/formuss/xoopspartners/admin/about.php XoopsModules/xoopspartners/branches/formuss/xoopspartners/admin/admin_footer.php XoopsModules/xoopspartners/branches/formuss/xoopspartners/admin/admin_header.php XoopsModules/xoopspartners/branches/formuss/xoopspartners/admin/header.php XoopsModules/xoopspartners/branches/formuss/xoopspartners/admin/index.html XoopsModules/xoopspartners/branches/formuss/xoopspartners/admin/index.php XoopsModules/xoopspartners/branches/formuss/xoopspartners/admin/main.php XoopsModules/xoopspartners/branches/formuss/xoopspartners/admin/menu.php XoopsModules/xoopspartners/branches/formuss/xoopspartners/admin/partners.php XoopsModules/xoopspartners/branches/formuss/xoopspartners/blocks/ XoopsModules/xoopspartners/branches/formuss/xoopspartners/blocks/index.html XoopsModules/xoopspartners/branches/formuss/xoopspartners/blocks/partners.php XoopsModules/xoopspartners/branches/formuss/xoopspartners/class/ XoopsModules/xoopspartners/branches/formuss/xoopspartners/class/category.php XoopsModules/xoopspartners/branches/formuss/xoopspartners/class/index.html XoopsModules/xoopspartners/branches/formuss/xoopspartners/class/menu.php XoopsModules/xoopspartners/branches/formuss/xoopspartners/class/partners.php XoopsModules/xoopspartners/branches/formuss/xoopspartners/click.php XoopsModules/xoopspartners/branches/formuss/xoopspartners/css/ XoopsModules/xoopspartners/branches/formuss/xoopspartners/css/class.css XoopsModules/xoopspartners/branches/formuss/xoopspartners/css/index.html XoopsModules/xoopspartners/branches/formuss/xoopspartners/css/menu.css XoopsModules/xoopspartners/branches/formuss/xoopspartners/css/module.css XoopsModules/xoopspartners/branches/formuss/xoopspartners/docs/ XoopsModules/xoopspartners/branches/formuss/xoopspartners/docs/changelog.txt XoopsModules/xoopspartners/branches/formuss/xoopspartners/docs/credits.txt XoopsModules/xoopspartners/branches/formuss/xoopspartners/docs/index.html XoopsModules/xoopspartners/branches/formuss/xoopspartners/docs/install.txt XoopsModules/xoopspartners/branches/formuss/xoopspartners/docs/lang_diff.txt XoopsModules/xoopspartners/branches/formuss/xoopspartners/docs/licence.txt XoopsModules/xoopspartners/branches/formuss/xoopspartners/docs/readme.txt XoopsModules/xoopspartners/branches/formuss/xoopspartners/header.php XoopsModules/xoopspartners/branches/formuss/xoopspartners/images/ XoopsModules/xoopspartners/branches/formuss/xoopspartners/images/ajax.gif XoopsModules/xoopspartners/branches/formuss/xoopspartners/images/bg_tabs1.gif XoopsModules/xoopspartners/branches/formuss/xoopspartners/images/bg_tabs2.gif XoopsModules/xoopspartners/branches/formuss/xoopspartners/images/bg_tabs_alt1.gif XoopsModules/xoopspartners/branches/formuss/xoopspartners/images/bg_tabs_alt2.gif XoopsModules/xoopspartners/branches/formuss/xoopspartners/images/cancel.png XoopsModules/xoopspartners/branches/formuss/xoopspartners/images/delete.png XoopsModules/xoopspartners/branches/formuss/xoopspartners/images/edit.png XoopsModules/xoopspartners/branches/formuss/xoopspartners/images/index.html XoopsModules/xoopspartners/branches/formuss/xoopspartners/images/logo.png XoopsModules/xoopspartners/branches/formuss/xoopspartners/images/minus.gif XoopsModules/xoopspartners/branches/formuss/xoopspartners/images/ok.png XoopsModules/xoopspartners/branches/formuss/xoopspartners/images/plus.gif XoopsModules/xoopspartners/branches/formuss/xoopspartners/include/ XoopsModules/xoopspartners/branches/formuss/xoopspartners/include/functions.php XoopsModules/xoopspartners/branches/formuss/xoopspartners/include/index.html XoopsModules/xoopspartners/branches/formuss/xoopspartners/include/update.php XoopsModules/xoopspartners/branches/formuss/xoopspartners/index.php XoopsModules/xoopspartners/branches/formuss/xoopspartners/join.php XoopsModules/xoopspartners/branches/formuss/xoopspartners/js/ XoopsModules/xoopspartners/branches/formuss/xoopspartners/js/functions.js XoopsModules/xoopspartners/branches/formuss/xoopspartners/js/index.html XoopsModules/xoopspartners/branches/formuss/xoopspartners/js/mooticker.js XoopsModules/xoopspartners/branches/formuss/xoopspartners/js/mootools-1.2-core.js XoopsModules/xoopspartners/branches/formuss/xoopspartners/language/ XoopsModules/xoopspartners/branches/formuss/xoopspartners/language/english/ XoopsModules/xoopspartners/branches/formuss/xoopspartners/language/english/admin.php XoopsModules/xoopspartners/branches/formuss/xoopspartners/language/english/blocks.php XoopsModules/xoopspartners/branches/formuss/xoopspartners/language/english/help/ XoopsModules/xoopspartners/branches/formuss/xoopspartners/language/english/help/help.html XoopsModules/xoopspartners/branches/formuss/xoopspartners/language/english/help/index.html XoopsModules/xoopspartners/branches/formuss/xoopspartners/language/english/index.html XoopsModules/xoopspartners/branches/formuss/xoopspartners/language/english/join.tpl XoopsModules/xoopspartners/branches/formuss/xoopspartners/language/english/main.php XoopsModules/xoopspartners/branches/formuss/xoopspartners/language/english/modinfo.php XoopsModules/xoopspartners/branches/formuss/xoopspartners/language/index.html XoopsModules/xoopspartners/branches/formuss/xoopspartners/sql/ XoopsModules/xoopspartners/branches/formuss/xoopspartners/sql/index.html XoopsModules/xoopspartners/branches/formuss/xoopspartners/sql/mysql.sql XoopsModules/xoopspartners/branches/formuss/xoopspartners/templates/ XoopsModules/xoopspartners/branches/formuss/xoopspartners/templates/admin/ XoopsModules/xoopspartners/branches/formuss/xoopspartners/templates/admin/index.html XoopsModules/xoopspartners/branches/formuss/xoopspartners/templates/admin/xoopspartners_index.html XoopsModules/xoopspartners/branches/formuss/xoopspartners/templates/admin/xoopspartners_redirect.html XoopsModules/xoopspartners/branches/formuss/xoopspartners/templates/blocks/ XoopsModules/xoopspartners/branches/formuss/xoopspartners/templates/blocks/index.html XoopsModules/xoopspartners/branches/formuss/xoopspartners/templates/blocks/xoopspartners_block_site.html XoopsModules/xoopspartners/branches/formuss/xoopspartners/templates/index.html XoopsModules/xoopspartners/branches/formuss/xoopspartners/templates/xoopspartners_category.html XoopsModules/xoopspartners/branches/formuss/xoopspartners/templates/xoopspartners_header.html XoopsModules/xoopspartners/branches/formuss/xoopspartners/templates/xoopspartners_index.html XoopsModules/xoopspartners/branches/formuss/xoopspartners/templates/xoopspartners_join.html XoopsModules/xoopspartners/branches/formuss/xoopspartners/test/ XoopsModules/xoopspartners/branches/formuss/xoopspartners/test/AddPartner XoopsModules/xoopspartners/branches/formuss/xoopspartners/test/DeletePartner XoopsModules/xoopspartners/branches/formuss/xoopspartners/test/EditPartner XoopsModules/xoopspartners/branches/formuss/xoopspartners/test/SortPartner XoopsModules/xoopspartners/branches/formuss/xoopspartners/test/SortPartnerAutomatic XoopsModules/xoopspartners/branches/formuss/xoopspartners/test/ViewPartner XoopsModules/xoopspartners/branches/formuss/xoopspartners/test/XoopsPartnerSuite XoopsModules/xoopspartners/branches/formuss/xoopspartners/test/index.html XoopsModules/xoopspartners/branches/formuss/xoopspartners/test/readme.txt XoopsModules/xoopspartners/branches/formuss/xoopspartners/xoops_version.php Added: XoopsModules/xoopspartners/branches/formuss/xoopspartners/admin/about.php =================================================================== --- XoopsModules/xoopspartners/branches/formuss/xoopspartners/admin/about.php (rev 0) +++ XoopsModules/xoopspartners/branches/formuss/xoopspartners/admin/about.php 2012-03-12 12:01:57 UTC (rev 9121) @@ -0,0 +1,30 @@ +<?php +/** + * XoopsPartners module + * + * 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:: The XOOPS Project (http://www.xoops.org) + * @license :: GNU GPL (http://www.gnu.org/licenses/gpl-2.0.html/) + * @package :: XoopsPartners + * @since :: 1.11 + * @author :: Mage, Mamba + * @version :: $Id $ + * + */ + +require 'admin_header.php'; + +xoops_cp_header(); + +$aboutAdmin = new ModuleAdmin(); + +echo $aboutAdmin->addNavigation('about.php'); +echo $aboutAdmin->renderAbout('6KJ7RW5DR3VTJ', false); + +include 'admin_footer.php'; \ No newline at end of file Added: XoopsModules/xoopspartners/branches/formuss/xoopspartners/admin/admin_footer.php =================================================================== --- XoopsModules/xoopspartners/branches/formuss/xoopspartners/admin/admin_footer.php (rev 0) +++ XoopsModules/xoopspartners/branches/formuss/xoopspartners/admin/admin_footer.php 2012-03-12 12:01:57 UTC (rev 9121) @@ -0,0 +1,24 @@ +<?php +/** + * XoopsPartner module + * + * 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:: The XOOPS Project http://sourceforge.net/projects/xoops/ + * @license :: http://www.fsf.org/copyleft/gpl.html GNU public license + * @package :: XoopsPartners + * @since :: 1.11 + * @author :: XOOPS Development Team + * @version : $Id $ + **/ + +echo"<div class='adminfooter'>\n" . " <div style='text-align: center;'>\n" + . " <a href='http://www.xoops.org' target='_blank'><img src='{$pathIcon32}/xoopsmicrobutton.gif' alt='XOOPS' title='XOOPS'></a>\n" + . " </div>\n" . " " . _AM_XPARTNERS_FOOTER . "\n" . "</div>"; + +xoops_cp_footer(); \ No newline at end of file Added: XoopsModules/xoopspartners/branches/formuss/xoopspartners/admin/admin_header.php =================================================================== --- XoopsModules/xoopspartners/branches/formuss/xoopspartners/admin/admin_header.php (rev 0) +++ XoopsModules/xoopspartners/branches/formuss/xoopspartners/admin/admin_header.php 2012-03-12 12:01:57 UTC (rev 9121) @@ -0,0 +1,52 @@ +<?php +/** + * XoopsPartners module + * + * 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 :: The XOOPS Project http://sourceforge.net/projects/xoops/ + * @license :: http://www.fsf.org/copyleft/gpl.html GNU public license + * @package :: XoopsPartners + * @subpackage:: admin + * @since :: 1.11 + * @author :: XOOPS Team + * @version :: $Id $ + **/ +$path = dirname(dirname(dirname(dirname(__FILE__)))); +require_once $path . '/mainfile.php'; +include_once $path . '/include/cp_functions.php'; +require_once $path . '/include/cp_header.php'; + +// Xoops Class +xoops_load('xoopsformloader'); +//xoops_load('template'); +require_once XOOPS_ROOT_PATH . '/class/template.php'; + +global $xoopsModule; + +$thisModuleDir = $GLOBALS['xoopsModule']->getVar('dirname'); + +// Includes +require_once XOOPS_ROOT_PATH . '/modules/' . $xoopsModule->getVar('dirname') . '/include/functions.php'; + +// Load language files +xoops_loadLanguage('admin', $thisModuleDir); +xoops_loadLanguage('modinfo', $thisModuleDir); +xoops_loadLanguage('main', $thisModuleDir); + +$pathIcon16 = '../' . $xoopsModule->getInfo('icons16'); +$pathIcon32 = '../' . $xoopsModule->getInfo('icons32'); +$pathModuleAdmin = $xoopsModule->getInfo('dirmoduleadmin'); + +if (file_exists($GLOBALS['xoops']->path($pathModuleAdmin . '/moduleadmin.php'))) { + include_once $GLOBALS['xoops']->path($pathModuleAdmin . '/moduleadmin.php'); +} else { + redirect_header("../../../admin.php", 5, _AM_XPARTNERS_ERROR_MODADMIN, false); +} + +$myts = MyTextSanitizer::getInstance(); \ No newline at end of file Added: XoopsModules/xoopspartners/branches/formuss/xoopspartners/admin/header.php =================================================================== --- XoopsModules/xoopspartners/branches/formuss/xoopspartners/admin/header.php (rev 0) +++ XoopsModules/xoopspartners/branches/formuss/xoopspartners/admin/header.php 2012-03-12 12:01:57 UTC (rev 9121) @@ -0,0 +1,45 @@ +<?php +/** + * Admin header for the Xoops Partners Module + * + * LICENSE + * + * 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. + * + * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ + * @license http://www.fsf.org/copyleft/gpl.html GNU public license + * @author Andricq Nicolas (AKA MusS) + * @version $Id: header.php 8212 2011-11-07 04:37:28Z beckmi $ + * @since 2.3.0 + */ +include dirname(dirname(dirname(dirname(__FILE__)))) . '/include/cp_header.php'; +// Xoops Class +xoops_load('xoopsformloader'); +//xoops_load('template'); +require_once XOOPS_ROOT_PATH . '/class/template.php'; + +xoops_loadLanguage('modinfo', $xoopsModule->getVar('dirname')); +// Includes +require_once XOOPS_ROOT_PATH . '/modules/' . $xoopsModule->getVar('dirname') . '/include/functions.php'; +// Get menu tab handler +$menu_handler = &xoops_getmodulehandler('menu'); +// Define top navigation +$menu_handler->addMenuTop( + XOOPS_URL . '/modules/system/admin.php?fct=preferences&op=showmod&mod=' + . $xoopsModule->getVar('mid'), _PREFERENCES +); +$menu_handler->addMenuTop( + XOOPS_URL . '/modules/system/admin.php?fct=modulesadmin&op=update&module=' + . $xoopsModule->getVar('dirname'), _XO_MI_MENU_MODULEUPDATE +); +$menu_handler->addMenuTop(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/', _XO_MI_MENU_MODULEHOME); +// Define main tab navigation +foreach ( + $xoopsModule->getAdminMenu() as $menu +) { + $menu_handler->addMenuTabs($menu['link'], $menu['title']); +} + +?> \ No newline at end of file Added: XoopsModules/xoopspartners/branches/formuss/xoopspartners/admin/index.html =================================================================== --- XoopsModules/xoopspartners/branches/formuss/xoopspartners/admin/index.html (rev 0) +++ XoopsModules/xoopspartners/branches/formuss/xoopspartners/admin/index.html 2012-03-12 12:01:57 UTC (rev 9121) @@ -0,0 +1 @@ +<script>history.go(-1);</script> \ No newline at end of file Added: XoopsModules/xoopspartners/branches/formuss/xoopspartners/admin/index.php =================================================================== --- XoopsModules/xoopspartners/branches/formuss/xoopspartners/admin/index.php (rev 0) +++ XoopsModules/xoopspartners/branches/formuss/xoopspartners/admin/index.php 2012-03-12 12:01:57 UTC (rev 9121) @@ -0,0 +1,43 @@ +<?php +/** + * XoopsPartnersAdministration + * + * @copyright:: The XOOPS Project http://sourceforge.net/projects/xoops/ + * @license :: http://www.fsf.org/copyleft/gpl.html GNU public license + * @package :: xoopspartners + * @since :: 1.11 + * @author :: Raul Recio (aka UNFOR) + * @version : $Id: $ + */ + +require 'admin_header.php'; +xoops_cp_header(); + +$indexAdmin = new ModuleAdmin(); + +//----------------------- +$xpPartnerHandler = xoops_getmodulehandler('partners', $xoopsModule->getVar('dirname', 'n')); + +$totalPartners = $xpPartnerHandler->getCount(); +$totalNonActivePartners = $xpPartnerHandler->getCount(new Criteria('status', 0, '=')); +$totalActivePartners = $totalPartners - $totalNonActivePartners; + +$indexAdmin->addInfoBox(_MD_XPARTNERS_DASHBOARD); + +$indexAdmin->addInfoBoxLine( + _MD_XPARTNERS_DASHBOARD, "<infolabel>" . _MD_XPARTNERS_TOTALACTIVE . "</infolabel>", $totalActivePartners, 'Green' +); +$indexAdmin->addInfoBoxLine( + _MD_XPARTNERS_DASHBOARD, + "<infolabel>" . _MD_XPARTNERS_TOTALNONACTIVE . "</infolabel>", $totalNonActivePartners, 'Red' +); +$indexAdmin->addInfoBoxLine( + _MD_XPARTNERS_DASHBOARD, "<infolabel>" . _MD_XPARTNERS_TOTALPARTNERS . "</infolabel><infotext>", + $totalPartners . "</infotext>" +); +//---------------------------- + +echo $indexAdmin->addNavigation('index.php'); +echo $indexAdmin->renderIndex(); + +include 'admin_footer.php'; \ No newline at end of file Added: XoopsModules/xoopspartners/branches/formuss/xoopspartners/admin/main.php =================================================================== --- XoopsModules/xoopspartners/branches/formuss/xoopspartners/admin/main.php (rev 0) +++ XoopsModules/xoopspartners/branches/formuss/xoopspartners/admin/main.php 2012-03-12 12:01:57 UTC (rev 9121) @@ -0,0 +1,63 @@ +<?php +/** + * Admin Index File for Xoops Partners + * + * LICENSE + * + * 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. + * + * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ + * @license http://www.fsf.org/copyleft/gpl.html GNU public license + * @author Andricq Nicolas (AKA MusS) + * @version $Id: index.php 8212 2011-11-07 04:37:28Z beckmi $ + * @since 2.3.0 + */ + +// Include header +require 'admin_header.php'; + +$indexAdmin = new ModuleAdmin(); + +// Display Xoops header +xoops_cp_header(); +echo $indexAdmin->addNavigation('main.php?op=default'); +$indexAdmin->addItemButton(_MI_XPARTNERS_ADMIN_ADD_CATEGORY, 'partners.php?op=add&type=category', 'add', ''); +echo $indexAdmin->renderButton('right', ''); +// Diplay navigation menu +//$menu_handler->render(0); +// Create Template instance +$tpl = new XoopsTpl(); +// Get module handler +$partners_handler = &xoops_getModuleHandler('partners'); +$category_handler = &xoops_getModuleHandler('category'); +$objects = $category_handler->getObj(); +if ($objects['count'] > 0) { + foreach ( + $objects['list'] as $object + ) { + $category = array(); + $category['id'] = $object->getVar('cat_id'); + $category['name'] = $object->getVar('cat_title'); + $category['desc'] = $object->getVar('cat_description'); + + $contentsObj = $partners_handler->getByCategory($object->getVar('cat_id')); + if ($contentsObj['count']) { + foreach ( + $contentsObj['list'] as $content + ) { + $category['partners'][] = $content->toArray(); + } + } + $tpl->append_by_ref('categories', $category); + unset($category); + } +} +// Call template file +echo $tpl->fetch( + XOOPS_ROOT_PATH . '/modules/' . $xoopsModule->getVar('dirname') . '/templates/admin/xoopspartners_index.html' +); +// Display Xoops footer +include 'admin_footer.php'; +//xoops_cp_footer(); \ No newline at end of file Added: XoopsModules/xoopspartners/branches/formuss/xoopspartners/admin/menu.php =================================================================== --- XoopsModules/xoopspartners/branches/formuss/xoopspartners/admin/menu.php (rev 0) +++ XoopsModules/xoopspartners/branches/formuss/xoopspartners/admin/menu.php 2012-03-12 12:01:57 UTC (rev 9121) @@ -0,0 +1,48 @@ +<?php +/** + * Menu for the Xoops Partners Module + * + * LICENSE + * + * 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. + * + * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ + * @license http://www.fsf.org/copyleft/gpl.html GNU public license + * @author Andricq Nicolas (AKA MusS) + * @version $Id: menu.php 8212 2011-11-07 04:37:28Z beckmi $ + * @since 2.3.0 + */ +defined('XOOPS_ROOT_PATH') or die('Restricted access'); +/** + * Admin Menus + */ + +defined("XOOPS_ROOT_PATH") or die("XOOPS root path not defined"); + +$dirname = basename(dirname(dirname(__FILE__))); +$module_handler = xoops_gethandler('module'); +$module = $module_handler->getByDirname($dirname); +$pathIcon32 = $module->getInfo('icons32'); + +xoops_loadLanguage('admin', $dirname); + + +$adminmenu = array(); +$i = 1; +$adminmenu[$i]["title"] = _MI_XPARTNERS_MENU_01; +$adminmenu[$i]["link"] = "admin/index.php"; +$adminmenu[$i]["icon"] = $pathIcon32 . '/home.png'; +$i++; +$adminmenu[$i]["title"] = _MI_XPARTNERS_ADMIN_MANAGE; +$adminmenu[$i]["link"] = "admin/main.php?op=default"; +$adminmenu[$i]["icon"] = $pathIcon32 . '/manage.png'; +$i++; +$adminmenu[$i]["title"] = _MI_XPARTNERS_ADMIN_ADDP; +$adminmenu[$i]["link"] = "admin/partners.php?op=add&type=partners"; +$adminmenu[$i]["icon"] = $pathIcon32 . '/add.png'; +$i++; +$adminmenu[$i]["title"] = _MI_XPARTNERS_ADMIN_ABOUT; +$adminmenu[$i]["link"] = "admin/about.php"; +$adminmenu[$i]["icon"] = $pathIcon32 . '/about.png'; \ No newline at end of file Added: XoopsModules/xoopspartners/branches/formuss/xoopspartners/admin/partners.php =================================================================== --- XoopsModules/xoopspartners/branches/formuss/xoopspartners/admin/partners.php (rev 0) +++ XoopsModules/xoopspartners/branches/formuss/xoopspartners/admin/partners.php 2012-03-12 12:01:57 UTC (rev 9121) @@ -0,0 +1,150 @@ +<?php +/** + * Admin Partners managment for Xoops Partners + * + * LICENSE + * + * 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. + * + * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ + * @license http://www.fsf.org/copyleft/gpl.html GNU public license + * @author Andricq Nicolas (AKA MusS) + * @version $Id: partners.php 8212 2011-11-07 04:37:28Z beckmi $ + * @since 2.3.0 + */ + +// Include header +require 'admin_header.php'; + +$indexAdmin = new ModuleAdmin(); + +// Get default variables +$op = xoopsPartners_CleanVars($_REQUEST, 'op', 'add', 'string'); +$type = xoopsPartners_CleanVars($_REQUEST, 'type', 'partners', 'string'); + +// Display Xoops header +xoops_cp_header(); +//echo $indexAdmin->addNavigation('partners.php'); +//$indexAdmin->addItemButton(_MI_XPARTNERS_ADMIN_ADDP, 'partners.php?op=add&type=partners', 'add', ''); +//echo $indexAdmin->renderButton('right', ''); + +// Change form +if (!isset($_POST['post']) && isset($_POST['formtype'])) { + // Diplay navigation menu + //$menu_handler->render(1); + //echo $indexAdmin->addNavigation('partners.php?op=add&type=partners'); + // Redirect to other type + xoopsPartners_redirect('partners.php?op=add&type=' . $_POST['formtype'], 0, _XO_AD_WAIT_MESSAGE); + // Include footer + include 'admin_footer.php'; + //xoops_cp_footer(); + // Quit procedure + exit; +} +// Load Partner/Category Handler +$partners_handler = &xoops_getModuleHandler($type); +// Retreive form data for all case +switch ($op) { + case 'add': // Add Partner/Category + // Diplay navigation menu + //$menu_handler->render(1); + //echo $indexAdmin->addNavigation('partners.php?op=add&type=partners'); + $obj = $partners_handler->create(); + $obj->displayAdminForm(); + echo $indexAdmin->addNavigation('partners.php?op=add&type=partners'); + break; + + case 'edit': // Edit Partner/Category + // Diplay navigation menu + //$menu_handler->render(1); + //echo $indexAdmin->addNavigation('partners.php?op=add&type=partners'); + $id = xoopsPartners_CleanVars($_REQUEST, 'id', 0, 'int'); + $obj = $partners_handler->get($id); + $obj->displayAdminForm($op); + break; + + case 'save': + if (!$GLOBALS['xoopsSecurity']->check()) { + redirect_header('main.php', 0, $GLOBALS['xoopsSecurity']->getErrors(true)); + } + // Diplay navigation menu + //$menu_handler->render(1); + //echo $indexAdmin->addNavigation('partners.php?op=add&type=partners'); + $id = xoopsPartners_CleanVars($_REQUEST, $partners_handler->keyName, 0, 'int'); + $obj = ($id == 0) ? $partners_handler->create() : $partners_handler->get($id); + if (is_object($obj)) { + $obj->setVars($_REQUEST); + $obj->setVar('dohtml', isset($_REQUEST['dohtml']) ? 1 : 0); + $obj->setVar('dosmiley', isset($_REQUEST['dosmiley']) ? 1 : 0); + $obj->setVar('doxcode', isset($_REQUEST['doxcode']) ? 1 : 0); + $obj->setVar('doimage', isset($_REQUEST['doimage']) ? 1 : 0); + $obj->setVar('dobr', isset($_REQUEST['dobr']) ? 1 : 0); + $ret = $partners_handler->insert($obj, true); + if ($ret) { + xoopsPartners_redirect('main.php', 1, _XO_AD_DBSUCCESS); + // Display Xoops footer + xoops_cp_footer(); + exit; + } + } else { + // Display Error + xoops_error($ret, _XO_AD_PARTNER_SUBERROR); + } + break; + + case 'delete': + $ok = xoopsPartners_CleanVars($_REQUEST, 'ok', 0, 'int'); + $id = xoopsPartners_CleanVars($_REQUEST, 'id', 0, 'int'); + + if ($ok == 1) { + $id = xoopsPartners_CleanVars($_REQUEST, $partners_handler->keyName, 0, 'int'); + $obj = $partners_handler->get($id); + if (is_object($obj)) { + // if category, first delete all partners for this category + if ($type == 'category') { + $partnerHandler = &xoops_getModuleHandler('partners'); + $criteria = new CriteriaCompo(); + $criteria->add(new Criteria('cat_id', $id)); + $partnersArray = $partner_handler->getAll($criteria); + + foreach (array_keys($partnersArray) as $i) { + $objp = $partner_handler->get($i); + $partnerHandler->delete($objp); + } + } + + if ($partners_handler->delete($obj)) { + // Diplay navigation menu + //$menu_handler->render(0); + //echo $indexAdmin->addNavigation('partners.php?op=add&type=partners'); + xoopsPartners_redirect('main.php', 1, _XO_AD_DBSUCCESS); + // Display Xoops footer + include 'admin_footer.php'; + //xoops_cp_footer(); + } + } + } else { + // Diplay navigation menu + //$menu_handler->render(0); + //echo $indexAdmin->addNavigation('partners.php?op=add&type=partners'); + $obj = $partners_handler->get($id); + //confirm to delete (checks if it's Partner or Category + $message = ($type == 'partners') ? _XO_AD_DELETE_PARTNER : _XO_AD_DELETE_CAT; + $message .= '<div class="txtcenter">' . $obj->getVar($partners_handler->identifierName, 's') . '</div>'; +// $id = xoopsPartners_CleanVars($_REQUEST, 'id', 0, 'int'); + xoops_confirm( + array( + 'type' => $type, + 'op' => 'delete', + $partners_handler->keyName => $id, + 'ok' => 1 + ), 'partners.php', $message + ); + } + break; +} +// Display Xoops footer +include 'admin_footer.php'; +//xoops_cp_footer(); \ No newline at end of file Added: XoopsModules/xoopspartners/branches/formuss/xoopspartners/blocks/index.html =================================================================== --- XoopsModules/xoopspartners/branches/formuss/xoopspartners/blocks/index.html (rev 0) +++ XoopsModules/xoopspartners/branches/formuss/xoopspartners/blocks/index.html 2012-03-12 12:01:57 UTC (rev 9121) @@ -0,0 +1 @@ +<script>history.go(-1);</script> \ No newline at end of file Added: XoopsModules/xoopspartners/branches/formuss/xoopspartners/blocks/partners.php =================================================================== --- XoopsModules/xoopspartners/branches/formuss/xoopspartners/blocks/partners.php (rev 0) +++ XoopsModules/xoopspartners/branches/formuss/xoopspartners/blocks/partners.php 2012-03-12 12:01:57 UTC (rev 9121) @@ -0,0 +1,68 @@ +<?php +/** + * Partner Block + * + * LICENSE + * + * 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. + * + * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ + * @license http://www.fsf.org/copyleft/gpl.html GNU public license + * @author Andricq Nicolas (AKA MusS) + * @version $Id: partners.php 8212 2011-11-07 04:37:28Z beckmi $ + * @since 2.3.0 + */ + +define('_XOOPSPARTNERS_DIRNAME', basename(dirname(dirname(__FILE__)))); + +function b_xoopsPartners_show($options) +{ + global $xoTheme; + $block = array(); + // Get module handler + $partners_handler = &xoops_getModuleHandler('partners', _XOOPSPARTNERS_DIRNAME); + // Add stylesheet and scripts + $xoTheme->addStylesheet(XOOPS_URL . '/modules/' . _XOOPSPARTNERS_DIRNAME . '/css/class.css', null); + $xoTheme->addScript(XOOPS_URL . '/modules/' . _XOOPSPARTNERS_DIRNAME . '/js/functions.js', null, ''); + $xoTheme->addScript(XOOPS_URL . '/modules/' . _XOOPSPARTNERS_DIRNAME . '/js/mootools-1.2-core.js', null); + $xoTheme->addScript(XOOPS_URL . '/modules/' . _XOOPSPARTNERS_DIRNAME . '/js/mooticker.js', null); + // Get partner list + $partners = $partners_handler->getActive($options[1]); + if ($partners['count'] > 0) { + foreach ( + $partners['list'] as $partner + ) { + $block[] = $partner->toArray(); + } + } + // Return infos + return $block; +} + +function b_xoopsPartners_edit($options) +{ + // Get module handler + $category_handler = &xoops_getModuleHandler('category', _XOOPSPARTNERS_DIRNAME); + // Construct option + $form = _XO_MB_PARTNERS_CATEGORY . '<select name="' . $options[1] . '">'; + $objects = $category_handler->getObj(); + if ($objects['count'] > 0) { + foreach ( + $objects['list'] as $object + ) { + $category = array(); + $category['id'] = $object->getVar('cat_id'); + $category['name'] = $object->getVar('cat_title'); + $category['desc'] = $object->getVar('cat_description'); + $form .= '<option value="' . $category['id'] . '">' . $category['name'] . '</option>'; + unset($category); + } + } + $form .= '</select>'; + // Return form + return $form; +} + +?> \ No newline at end of file Added: XoopsModules/xoopspartners/branches/formuss/xoopspartners/class/category.php =================================================================== --- XoopsModules/xoopspartners/branches/formuss/xoopspartners/class/category.php (rev 0) +++ XoopsModules/xoopspartners/branches/formuss/xoopspartners/class/category.php 2012-03-12 12:01:57 UTC (rev 9121) @@ -0,0 +1,158 @@ +<?php +/** + * Xoops Partners Contents Class + * + * LICENSE + * + * 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. + * + * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ + * @license http://www.fsf.org/copyleft/gpl.html GNU public license + * @author Andricq Nicolas (AKA MusS) + * @version $Id: category.php 8212 2011-11-07 04:37:28Z beckmi $ + * @since 2.3.0 + */ +defined('XOOPS_ROOT_PATH') or die('Restricted access'); + +include_once XOOPS_ROOT_PATH . "/kernel/object.php"; + +class XoopspartnersCategory extends XoopsObject +{ + /** + * Constructor + */ + function __construct() + { + $this->XoopsObject(); + $this->initVar('cat_id', XOBJ_DTYPE_INT, null, false); + $this->initVar('cat_title', XOBJ_DTYPE_TXTBOX, null, false); + $this->initVar('cat_description', XOBJ_DTYPE_TXTAREA, null, false); + $this->initVar('cat_weight', XOBJ_DTYPE_INT, 0, false, 10); + $this->initVar('dohtml', XOBJ_DTYPE_INT); + $this->initVar('doxcode', XOBJ_DTYPE_INT); + $this->initVar('dosmiley', XOBJ_DTYPE_INT); + $this->initVar('doimage', XOBJ_DTYPE_INT); + $this->initVar('dobr', XOBJ_DTYPE_INT); + } + + function XoopspartnersCategory() + { + $this->__construct(); + } + + function displayAdminForm($mode = 'add') + { + // Create Form Partner + $title = ($mode == 'add') ? _XO_AD_ADD_CATEGORY : _XO_AD_EDIT_CATEGORY; + $form = new XoopsThemeForm($title, 'partner', 'partners.php', 'post', true); + $form->setExtra('enctype="multipart/form-data"'); + // Type + if ($mode == 'add') { + $type = new XoopsFormSelect(_XO_AD_TYPE, 'formtype', 'category'); + $type->addOption('category', _XO_AD_CATEGORY); + $type->addOption('partners', _XO_AD_PARTNER); + $type->setExtra("onchange='submit()'"); + $form->addElement($type); + } + // Title + $form->addElement(new XoopsFormText(_XO_AD_TITLE, 'cat_title', 50, 50, $this->getVar('cat_title')), true); + // Editor + $editor_tray = new XoopsFormElementTray(_XO_AD_DESCRIPTION, '<br />'); + if (class_exists('XoopsFormEditor')) { + $configs = array( + 'name' => 'cat_description', + 'value' => $this->getVar('cat_description', 'e'), + 'rows' => 25, + 'cols' => '100%', + 'width' => '100%', + 'height' => '250px', + 'editor' => xoopsPartners_setting('editor') + ); + $editor_tray->addElement(new XoopsFormEditor('', 'cat_description', $configs, false, $onfailure = 'textarea')); + } else { + $editor_tray->addElement(new XoopsFormDhtmlTextArea('', 'cat_description', $this->getVar('cat_description', 'e'), '100%', '100%')); + } + $editor_tray->setDescription(_XO_AD_DESCRIPTION_DSC); + if (!xoopsPartners_isEditorHTML()) { + if ($this->isNew()) { + $this->setVar('dohtml', 0); + $this->setVar('dobr', 1); + } + // HTML + $html_checkbox = new XoopsFormCheckBox('', 'dohtml', $this->getVar('dohtml', 'e')); + $html_checkbox->addOption(1, _XO_AD_DOHTML); + $editor_tray->addElement($html_checkbox); + // Break line + $breaks_checkbox = new XoopsFormCheckBox('', 'dobr', $this->getVar('dobr', 'e')); + $breaks_checkbox->addOption(1, _XO_AD_BREAKS); + $editor_tray->addElement($breaks_checkbox); + } else { + $form->addElement(new xoopsFormHidden('dohtml', 1)); + $form->addElement(new xoopsFormHidden('dobr', 0)); + } + // Xoops Image + $doimage_checkbox = new XoopsFormCheckBox('', 'doimage', $this->getVar('doimage', 'e')); + $doimage_checkbox->addOption(1, _XO_AD_DOIMAGE); + $editor_tray->addElement($doimage_checkbox); + // Xoops Code + $xcodes_checkbox = new XoopsFormCheckBox('', 'doxcode', $this->getVar('doxcode', 'e')); + $xcodes_checkbox->addOption(1, _XO_AD_DOXCODE); + $editor_tray->addElement($xcodes_checkbox); + // Xoops Smiley + $smiley_checkbox = new XoopsFormCheckBox('', 'dosmiley', $this->getVar('dosmiley', 'e')); + $smiley_checkbox->addOption(1, _XO_AD_DOSMILEY); + $editor_tray->addElement($smiley_checkbox); + // Editor and options + $form->addElement($editor_tray); + // Weight + $form->addElement(new XoopsFormText(_XO_AD_WEIGHT, 'cat_weight', 3, 10, $this->getVar('cat_weight'))); + // Hidden value + $form->addElement(new XoopsFormHidden('cat_id', $this->getVar('cat_id'))); + $form->addElement(new XoopsFormHidden('type', 'category')); + $form->addElement(new XoopsFormHidden('op', 'save')); + $form->addElement(new XoopsFormButton('', 'post', _SUBMIT, 'submit')); + // Display form + $form->display(); + } + +} + +class XoopspartnersCategoryHandler extends XoopsPersistableObjectHandler +{ + /** + * Construct + * + * @param mixed $db + */ + function __construct(&$db) + { + parent::__construct($db, 'partners_category', 'XoopspartnersCategory', 'cat_id', 'cat_title'); + } + + function XoopspartnersCategoryHandler(&$db) + { + $this->__construct($db); + } + + /** + * Return category order by weight + * + * @return + */ + function &getObj() + { + $myts = &MyTextSanitizer::getInstance(); + $obj = false; + $criteria = new CriteriaCompo(); + $criteria->setOrder('ASC'); + $criteria->setSort('cat_weight'); + + $obj['count'] = $this->getCount($criteria); + $obj['list'] = &$this->getObjects($criteria, false); + return $obj; + } +} + +?> \ No newline at end of file Added: XoopsModules/xoopspartners/branches/formuss/xoopspartners/class/index.html =================================================================== --- XoopsModules/xoopspartners/branches/formuss/xoopspartners/class/index.html (rev 0) +++ XoopsModules/xoopspartners/branches/formuss/xoopspartners/class/index.html 2012-03-12 12:01:57 UTC (rev 9121) @@ -0,0 +1 @@ +<script>history.go(-1);</script> \ No newline at end of file Added: XoopsModules/xoopspartners/branches/formuss/xoopspartners/class/menu.php =================================================================== --- XoopsModules/xoopspartners/branches/formuss/xoopspartners/class/menu.php (rev 0) +++ XoopsModules/xoopspartners/branches/formuss/xoopspartners/class/menu.php 2012-03-12 12:01:57 UTC (rev 9121) @@ -0,0 +1,204 @@ +<?php +/** + * Class for tab navigation + * + * LICENSE + * + * 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. + * + * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ + * @license http://www.fsf.org/copyleft/gpl.html GNU public license + * @author John Neill (AKA Catzwolf) + * @author Andricq Nicolas (AKA MusS) + * @version $Id: menu.php 8212 2011-11-07 04:37:28Z beckmi $ + * @since 2.3.0 + */ + +defined('XOOPS_ROOT_PATH') or die(); + +class XoopspartnersMenuHandler +{ + /** + * @var string + */ + var $_menutop = array(); + var $_menutabs = array(); + var $_obj; + var $_header; + var $_subheader; + + /** + * Constructor + */ + function XoopspartnersMenuHandler() + { + global $xoopsModule; + $this->_obj = &$xoopsModule; + } + + function getAddon($addon) + { + $this->_obj = &$addon; + } + + function addMenuTop($value, $name = "") + { + if ($name != "") { + $this->_menutop[$value] = $name; + } else { + $this->_menutop[$value] = $value; + } + } + + function addMenuTopArray($options, $multi = true) + { + if (is_array($options)) { + if ($multi == true) { + foreach ( + $options as $k => $v + ) { + $this->addOptionTop($k, $v); + } + } else { + foreach ( + $options as $k + ) { + $this->addOptiontop($k, $k); + } + } + } + } + + function addMenuTabs($value, $name = "") + { + if ($name != "") { + $this->_menutabs[$value] = $name; + } else { + $this->_menutabs[$value] = $value; + } + } + + function addMenuTabsArray($options, $multi = true) + { + if (is_array($options)) { + if ($multi == true) { + foreach ( + $options as $k => $v + ) { + $this->addMenuTabsTop($k, $v); + } + } else { + foreach ( + $options as $k + ) { + $this->addMenuTabsTop($k, $k); + } + } + } + } + + function addHeader($value) + { + $this->_header = $value; + } + + function addSubHeader($value) + { + $this->_subheader = $value; + } + + function breadcrumb_nav($basename = "Home") + { + global $bc_site, $bc_label; + $site = $bc_site; + $return_str = "<a href=\"/\">$basename</A>"; + $str = substr(dirname(xoops_getenv('PHP_SELF')), 1); + + $arr = split('/', $str); + $num = count($arr); + + if ($num > 1) { + foreach ( + $arr as $val + ) { + $return_str .= ' > <a href="' . $site . $val . '/">' . $bc_label[$val] . '</a>'; + $site .= $val . '/'; + } + } elseif ($num == 1) { + $arr = $str; + $return_str .= ' > <a href="' . $bc_site . $arr . '/">' . $bc_label[$arr] . '</a>'; + } + return $return_str; + } + + function render($currentoption = 1, $display = true) + { + global $modversion; + + $_dirname = $this->_obj->getVar('dirname'); + $i = 0; + /* + * Selects current menu tab + */ + foreach ( + $this->_menutabs as $k => $menus + ) { + $menuItems[] = $menus; + } + $breadcrumb = $menuItems[$currentoption]; + $menuItems[$currentoption] = 'current'; + //Not the best method of adding CSS but the only method available at the moment since xoops is shitty with the backend + $menu = "<style type=\"text/css\" media=\"screen\">@import \"" . XOOPS_URL . "/modules/" + . $this->_obj->getVar('dirname') . "/css/menu.css\";</style>"; + $menu .= "<div id='buttontop_mod'>"; + $menu .= "<table style='width: 100%; padding: 0;' cellspacing='0'>\n<tr>"; + $menu .= "<td style='font-size: 10px; text-align: left; color: #2F5376; padding: 0 6px; line-height: 18px;'>"; + foreach ( + $this->_menutop as $k => $v + ) { + $menu .= " <a href=\"$k\">$v</a> |"; + } + $menu .= "</td>"; + $menu .= "<td style='text-align: right;'><strong>" . $this->_obj->getVar('name') . "</strong> : " . $breadcrumb + . "</td>"; + $menu .= "</tr>\n</table>\n"; + $menu .= "</div>\n"; + $menu .= "<div id='buttonbar_mod'><ul>"; + foreach ( + $this->_menutabs as $k => $v + ) { + $menu .= "<li id='" . $menuItems[$i] . "'><a href=\"" . XOOPS_URL . "/modules/" + . $this->_obj->getVar('dirname', 'n') . "/$k\"><span>$v</span></a></li>\n"; + $i++; + } + $menu .= "</ul>\n</div>\n"; + if ($this->_header) { + $menu .= "<h4 class='admin_header'>"; + if (isset($modversion['name'])) { + if ($modversion['image'] && $this->_obj->getVar('mid') == 1) { + $system_image = XOOPS_URL . '/modules/system/images/system/' . $modversion['image']; + } else { + $system_image = XOOPS_URL . '/modules/' . $_dirname . '/images/' . $modversion['image']; + } + $menu .= "<img src='$system_image' align='middle' height='32' width='32' alt='' />"; + $menu .= " " . $modversion['name'] . "</h4>\n"; + } else { + $menu .= " " . $this->_header . "</h4>\n"; + } + } + if ($this->_subheader) { + $menu .= "<div class='admin_subheader'>" . $this->_subheader . "</div>\n"; + } + $menu .= '<div class="clear"> </div>'; + unset($this->_obj); + if ($display == true) { + echo $menu; + } else { + return $menu; + } + } +} + +?> \ No newline at end of file Added: XoopsModules/xoopspartners/branches/formuss/xoopspartners/class/partners.php =================================================================== --- XoopsModules/xoopspartners/branches/formuss/xoopspartners/class/partners.php (rev 0) +++ XoopsModules/xoopspartners/branches/formuss/xoopspartners/class/partners.php 2012-03-12 12:01:57 UTC (rev 9121) @@ -0,0 +1,339 @@ +<?php +/** + * Xoops Partners Partners Class + * + * LICENSE + * + * 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. + * + * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ + * @license http://www.fsf.org/copyleft/gpl.html GNU public license + * @author Andricq Nicolas (AKA MusS) + * @version $Id: partners.php 8212 2011-11-07 04:37:28Z beckmi $ + * @since 2.3.0 + */ +defined('XOOPS_ROOT_PATH') or die('Restricted access'); + +include_once XOOPS_ROOT_PATH . "/kernel/object.php"; + +class XoopspartnersPartners extends XoopsObject +{ + /** + * Constructor + */ + function __construct() + { + $this->XoopsObject(); + $this->initVar('id', XOBJ_DTYPE_INT, null, false); + $this->initVar('cat_id', XOBJ_DTYPE_INT, null, false); + $this->initVar('title', XOBJ_DTYPE_TXTBOX, null, false); + $this->initVar('description', XOBJ_DTYPE_TXTAREA, null, false); + $this->initVar('url', XOBJ_DTYPE_TXTBOX, null, true); + $this->initVar('image', XOBJ_DTYPE_TXTBOX, null, true); + $this->initVar('weight', XOBJ_DTYPE_INT, 0, false, 10); + $this->initVar('hits', XOBJ_DTYPE_INT, 0, true, 10); + $this->initVar('status', XOBJ_DTYPE_INT, 1, false); + $this->initVar('approve', XOBJ_DTYPE_INT, 1, false); + //$this->initVar('cat_id', XOBJ_DTYPE_INT, null, false); + $this->initVar('dohtml', XOBJ_DTYPE_INT); + $this->initVar('doxcode', XOBJ_DTYPE_INT); + $this->initVar('dosmiley', XOBJ_DTYPE_INT); + $this->initVar('doimage', XOBJ_DTYPE_INT); + $this->initVar('dobr', XOBJ_DTYPE_INT); + } + + /** + * Constructor + */ + function XoopspartnersPartners() + { + $this->__construct(); + } + + /** + * Display the partner form for admin area + * + */ + function displayJoinForm($mode = 'add') + { + $category_handler = &xoops_getModuleHandler('category'); + if (!$category_handler->getCount()) { + xoops_error('index.php', 3, _XO_MD_ERRORNOCAT); + return; + } + // Create Form Partner + $title = _XO_MD_JOIN; + $form = new XoopsThemeForm($title, 'partner', 'join.php', 'post', true); + $form->setExtra('enctype="multipart/form-data"'); + + $objects = $category_handler->getList(); + ; + $category = new XoopsFormSelect(_XO_AD_CATEGORY, 'cat_id', $this->getVar('cat_id', 'e'), 1, false); + $category->addOptionArray($objects); + $form->addElement($category); + // Title + $form->addElement(new XoopsFormText(_XO_AD_TITLE, 'title', 50, 50, $this->getVar('title')), true); + // URL + $form->addElement(new XoopsFormText(_XO_AD_URL, 'url', 50, 150, $this->getVar('url')), true); + // Logo + $form->addElement(new XoopsFormText(_XO_AD_IMAGE, 'image', 50, 150, $this->getVar('image'))); + // Editor + $editor_tray = new XoopsFormElementTray(_XO_AD_DESCRIPTION, '<br />'); + if (class_exists('XoopsFormEditor')) { + $configs = array( + 'name' => 'description', + 'value' => $this->getVar('description'), + 'rows' => 25, + 'cols' => '100%', + 'width' => '100%', + 'height' => '250px', + 'editor' => xoopsPartners_setting('editor') + ); + $editor_tray->addElement(new XoopsFormEditor('', 'description', $configs, false, $onfailure = 'textarea')); + } else { + $editor_tray->addElement(new XoopsFormDhtmlTextArea('', 'description', $this->getVar('description', 'e'), '100%', '100%')); + } + $editor_tray->setDescription(_XO_AD_DESCRIPTION_DSC); + if (!xoopsPartners_isEditorHTML()) { + if ($this->isNew()) { + $this->setVar('dohtml', 0); + $this->setVar('dobr', 1); + } + // HTML + $html_checkbox = new XoopsFormCheckBox('', 'dohtml', $this->getVar('dohtml', 'e')); + $html_checkbox->addOption(1, _XO_AD_DOHTML); + $editor_tray->addElement($html_checkbox); + // Break line + $breaks_checkbox = new XoopsFormCheckBox('', 'dobr', $this->getVar('dobr', 'e')); + $breaks_checkbox->addOption(1, _XO_AD_BREAKS); + $editor_tray->addElement($breaks_checkbox); + } else { + $form->addElement(new xoopsFormHidden('dohtml', 1)); + $form->addElement(new xoopsFormHidden('dobr', 0)); + } + // Xoops Image + $doimage_checkbox = new XoopsFormCheckBox('', 'doimage', $this->getVar('doimage', 'e')); + $doimage_checkbox->addOption(1, _XO_AD_DOIMAGE); + $editor_tray->addElement($doimage_checkbox); + // Xoops Code + $xcodes_checkbox = new XoopsFormCheckBox('', 'doxcode', $this->getVar('doxcode', 'e')); + $xcodes_checkbox->addOption(1, _XO_AD_DOXCODE); + $editor_tray->addElement($xcodes_checkbox); + // Xoops Smiley + $smiley_checkbox = new XoopsFormCheckBox('', 'dosmiley', $this->getVar('dosmiley', 'e')); + $smiley_checkbox->addOption(1, _XO_AD_DOSMILEY); + $editor_tray->addElement($smiley_checkbox); + // Editor and options + $form->addElement($editor_tray); + // Hidden value + $form->addElement(new XoopsFormHidden('weight', 0)); + $form->addElement(new XoopsFormHidden('status', 0)); + $form->addElement(new XoopsFormHidden('approve', 0)); + $form->addElement(new XoopsFormHidden('id', $this->getVar('id'))); + $form->addElement(new XoopsFormHidden('type', 'partners')); + $form->addElement(new XoopsFormHidden('op', 'save')); + $form->addElement(new XoopsFormButton('', 'post', _SUBMIT, 'submit')); + // Display form + $form->display(); + } + + /** + * Display the partner form for admin area + * + */ + function displayAdminForm($mode = 'add') + { + $category_handler = &xoops_getModuleHandler('category'); + if (!$category_handler->getCount()) { + xoopsPartners_redirect('partners.php?op=' . $mode . '&type=category', 3, _XO_AD_ERRORNOCAT); + xoops_cp_footer(); + exit; + } + // Create Form Partner + $title = ($mode == 'add') ? _XO_AD_ADD_PARTNER : _XO_AD_EDIT_PARTNER; + $form = new XoopsThemeForm($title, 'partner', 'partners.php', 'post', true); + $form->setExtra('enctype="multipart/form-data"'); + // Type + if ($mode == 'add') { + $type = new XoopsFormSelect(_XO_AD_TYPE, 'formtype', 'partners'); + $type->addOption('partners', _XO_AD_PARTNER); + $type->addOption('category', _XO_AD_CATEGORY); + $type->setExtra("onchange='submit()'"); + $form->addElement($type); + } + $objects = $category_handler->getList(); + ; + $category = new XoopsFormSelect(_XO_AD_CATEGORY, 'cat_id', $this->getVar('cat_id', 'e'), 1, false); + $category->addOptionArray($objects); + $form->addElement($category); + // Title + $form->addElement(new XoopsFormText(_XO_AD_TITLE, 'title', 50, 50, $this->getVar('title')), true); + // URL + $form->addElement(new XoopsFormText(_XO_AD_URL, 'url', 50, 150, $this->getVar('url')), true); + // Logo + $form->addElement(new XoopsFormText(_XO_AD_IMAGE, 'image', 50, 150, $this->getVar('image')), true); + // Editor + $editor_tray = new XoopsFormElementTray(_XO_AD_DESCRIPTION, '<br />'); + if (class_exists('XoopsFormEditor')) { + $configs = array( + 'name' => 'description', + 'value' => $this->getVar('description'), + 'rows' => 25, + 'cols' => '100%', + 'width' => '100%', + 'height' => '250px', + 'editor' => xoopsPartners_setting('editor') + ); + $editor_tray->addElement(new XoopsFormEditor('', 'description', $configs, false, $onfailure = 'textarea')); + } else { + $editor_tray->addElement(new XoopsFormDhtmlTextArea('', 'description', $this->getVar('description', 'e'), '100%', '100%')); + } + $editor_tray->setDescription(_XO_AD_DESCRIPTION_DSC); + if (!xoopsPartners_isEditorHTML()) { + if ($this->isNew()) { + $this->setVar('dohtml', 0); + $this->setVar('dobr', 1); + } + // HTML + $html_checkbox = new XoopsFormCheckBox('', 'dohtml', $this->getVar('dohtml', 'e')); + $html_checkbox->addOption(1, _XO_AD_DOHTML); + $editor_tray->addElement($html_checkbox); + // Break line + $breaks_checkbox = new XoopsFormCheckBox('', 'dobr', $this->getVar('dobr', 'e')); + $breaks_checkbox->addOption(1, _XO_AD_BREAKS); + $editor_tray->addElement($breaks_checkbox); + } else { + $form->addElement(new xoopsFormHidden('dohtml', 1)); + $form->addElement(new xoopsFormHidden('dobr', 0)); + } + // Xoops Image + $doimage_checkbox = new XoopsFormCheckBox('', 'doimage', $this->getVar('doimage', 'e')); + $doimage_checkbox->addOption(1, _XO_AD_DOIMAGE); + $editor_tray->addElement($doimage_checkbox); + // Xoops Code + $xcodes_checkbox = new XoopsFormCheckBox('', 'doxcode', $this->getVar('doxcode', 'e')); + $xcodes_checkbox->addOption(1, _XO_AD_DOXCODE); + $editor_tray->addElement($xcodes_checkbox); + // Xoops Smiley + $smiley_checkbox = new XoopsFormCheckBox('', 'dosmiley', $this->getVar('dosmiley', 'e')); + $smiley_checkbox->addOption(1, _XO_AD_DOSMILEY); + $editor_tray->addElement($smiley_checkbox); + // Editor and options + $form->addElement($editor_tray); + // Weight + $form->addElement(new XoopsFormText(_XO_AD_WEIGHT, 'weight', 3, 10, $this->getVar('weight'))); + // Status + $status = new XoopsFormSelect(_XO_AD_STATUS, 'status', $this->getVar('status')); + $status->addOption('1', _XO_AD_ACTIVE); + $status->addOption('0', _XO_AD_INACTIVE); + $form->addElement($status); + // Hidden value + $form->addElement(new XoopsFormHidden('approve', 1)); + $form->addElement(new XoopsFormHidden('id', $this->getVar('id'))); + $form->addElement(new XoopsFormHidden('type', 'partners')); + $form->addElement(new XoopsFormHidden('op', 'save')); + $form->addElement(new XoopsFormButton('', 'post', _SUBMIT, 'submit')); + // Display form + $form->display(); + } +} + +/** + * XoopspartnersPartnersHandler + * + * @package XoopsPartners + * @author Andricq Nicolas (AKA MusS) + * @copyright Copyright (c) 2009 + * @version $Id: partners.php 8212 2011-11-07 04:37:28Z beckmi $ + * @access public + */ +class XoopspartnersPartnersHandler extends XoopsPersistableObjectHandler +{ + /** + * Constructor + * + * @param mixed $db + */ + function __construct(&$db) + { + parent::__construct($db, 'partners', 'XoopspartnersPartners', 'id', 'title'); + } + + + /** + * Return the list of partners order by weight + * + * @return + */ + function &getObj() + { + $obj = false; + $criteria = new CriteriaCompo(); + $obj['count'] = $this->getCount($criteria); + if (!empty($args[0])) { + $criteria->setSort('ASC'); + $criteria->setOrder('weight'); + $criteria->setStart(0); + $criteria->setLimit(0); + } + $obj['list'] = &$this->getObjects($criteria, false); + return $obj; + } + + /** + * Return the list of partners for a category + * + * @return + */ + function &getByCategory($id = '') + { + $obj = false; + $criteria = new CriteriaCompo(); + if (isset($id)) { + $criteria->add(new Criteria('cat_id', $id, '=')); + } + $obj['count'] = $this->getCount($criteria); + if (!empty($args[0])) { + $criteria->setSort('ASC'); + $criteria->setOrder('weight'); + $criteria->setStart(0); + $criteria->setLimit(0); + } + $obj['list'] = &$this->getObjects($criteria, false); + return $obj; + } + + /** + * Return active partner + * + * @return + */ + function &getActive($id = '') + { + $obj = false; + $criteria = new CriteriaCompo(); + if (isset($id)) { + $criteria->add(new Criteria('cat_id', $id, '=')); + } + $obj['count'] = $this->getCount($criteria); + if (!empty($args[0])) { + $criteria->setSort('ASC'); + $criteria->setOrder('title'); + } + $obj['list'] = &$this->getObjects($criteria, false); + return $obj; + } + + /** + * Update counter when user click on link + */ + function setHits($id) + { + $db =& XoopsDatabaseFactory::getDatabaseConnection(); + $db->queryF("UPDATE " .... [truncated message content] |
From: <dj...@us...> - 2012-03-11 14:49:16
|
Revision: 9120 http://xoops.svn.sourceforge.net/xoops/?rev=9120&view=rev Author: djculex Date: 2012-03-11 14:49:10 +0000 (Sun, 11 Mar 2012) Log Message: ----------- Bugfix: in language files changed uppercase start.PNG to start.png Modified Paths: -------------- XoopsModules/smallworld/trunk/smallworld/docs/changelog.txt XoopsModules/smallworld/trunk/smallworld/language/danish/main.php XoopsModules/smallworld/trunk/smallworld/language/english/main.php Modified: XoopsModules/smallworld/trunk/smallworld/docs/changelog.txt =================================================================== --- XoopsModules/smallworld/trunk/smallworld/docs/changelog.txt 2012-03-10 21:51:24 UTC (rev 9119) +++ XoopsModules/smallworld/trunk/smallworld/docs/changelog.txt 2012-03-11 14:49:10 UTC (rev 9120) @@ -1,4 +1,10 @@ ------------------------------ +Changelog v.1.11 RC 5 +------------------------------ +11 Marts 2012 +- Bugfix: in language files changed uppercase start.PNG to start.png + +------------------------------ Changelog v.1.11 RC 4 ------------------------------ 23 February 2012 Modified: XoopsModules/smallworld/trunk/smallworld/language/danish/main.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/language/danish/main.php 2012-03-10 21:51:24 UTC (rev 9119) +++ XoopsModules/smallworld/trunk/smallworld/language/danish/main.php 2012-03-11 14:49:10 UTC (rev 9120) @@ -241,7 +241,7 @@ define ("_SMALLWORLD_MORE", ".. mere"); /* -------------- Upload formular -------------------- */ -define ('_SMALLWORLD_UPLOAD_HOWTO', 'Alle billeder fra dit album er vist her, og du kan bruge dette værktøj til at uploade eller slette billeder <br>Tryk på den grønne upload fil(er), Vælg dine billeder og uploade enten: < br> 1) En efter en - brug <img src="images/icon_start.PNG" style="display: inline-block;height:13px;"/>ikon.<br> 2) Vælg flere ved gennemsyn eller Drag * filer over på den grønne upload (* virker pt. ikke i IE) og tryk på Start alle <br> Bemærk: Hvis du vælger andre filtyper end billedfiler vil scriptet afbryde. Billedstørrelsen er højst 5 MBytes <br> '); +define ('_SMALLWORLD_UPLOAD_HOWTO', 'Alle billeder fra dit album er vist her, og du kan bruge dette værktøj til at uploade eller slette billeder <br>Tryk på den grønne upload fil(er), Vælg dine billeder og uploade enten: < br> 1) En efter en - brug <img src="images/icon_start.png" style="display: inline-block;height:13px;"/>ikon.<br> 2) Vælg flere ved gennemsyn eller Drag * filer over på den grønne upload (* virker pt. ikke i IE) og tryk på Start alle <br> Bemærk: Hvis du vælger andre filtyper end billedfiler vil scriptet afbryde. Billedstørrelsen er højst 5 MBytes <br> '); define ('_SMALLWORLD_UPLOADTITLE', 'Billedtitel'); define ('_SMALLWORLD_UPLOADDESC', 'Billedbeskrivelse'); define ('_SMALLWORLD_UPLOAD_TITLE', 'Upload billeder til dit album'); Modified: XoopsModules/smallworld/trunk/smallworld/language/english/main.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/language/english/main.php 2012-03-10 21:51:24 UTC (rev 9119) +++ XoopsModules/smallworld/trunk/smallworld/language/english/main.php 2012-03-11 14:49:10 UTC (rev 9120) @@ -241,7 +241,7 @@ define("_SMALLWORLD_MORE","..more"); /*-------------- Upload form --------------------*/ -define('_SMALLWORLD_UPLOAD_HOWTO','All images from your album is shown here, and you can use this tool to upload or delete images<br><br>Press the green upload file(s), Select your pictures and upload eighter:<br>1) One by one using the <img src="images/icon_start.PNG" style="display: inline-block;height:13px;"/> icon.<br>2) Select multible by browsing or Drag* files onto the green upload (* does currently not work in IE) and press start all<br><br>Note: If you choose other filetypes than image files the script wil break. Image size is maximum 5 MBytes<br><br>'); +define('_SMALLWORLD_UPLOAD_HOWTO','All images from your album is shown here, and you can use this tool to upload or delete images<br><br>Press the green upload file(s), Select your pictures and upload eighter:<br>1) One by one using the <img src="images/icon_start.png" style="display: inline-block;height:13px;"/> icon.<br>2) Select multible by browsing or Drag* files onto the green upload (* does currently not work in IE) and press start all<br><br>Note: If you choose other filetypes than image files the script wil break. Image size is maximum 5 MBytes<br><br>'); define('_SMALLWORLD_UPLOADTITLE','Image title'); define('_SMALLWORLD_UPLOADDESC','Image description'); define('_SMALLWORLD_UPLOAD_TITLE','Upload images to your image album'); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <txm...@us...> - 2012-03-10 21:51:32
|
Revision: 9119 http://xoops.svn.sourceforge.net/xoops/?rev=9119&view=rev Author: txmodxoops Date: 2012-03-10 21:51:24 +0000 (Sat, 10 Mar 2012) Log Message: ----------- Updated Files Revision Modified Paths: -------------- XoopsModules/TDMCreate/releases/1.39/TDMCreate/admin/building.php XoopsModules/TDMCreate/releases/1.39/TDMCreate/const/const_templates_pages.php XoopsModules/TDMCreate/releases/1.39/TDMCreate/const/const_user_pages.php XoopsModules/TDMCreate/releases/1.39/TDMCreate/const/const_xoopsversion.php XoopsModules/TDMCreate/releases/1.39/TDMCreate/docs/changelog.txt XoopsModules/TDMCreate/releases/1.39/TDMCreate/docs/lang_diff.txt XoopsModules/TDMCreate/releases/1.39/TDMCreate/include/functions.php XoopsModules/TDMCreate/releases/1.39/TDMCreate/xoops_version.php Modified: XoopsModules/TDMCreate/releases/1.39/TDMCreate/admin/building.php =================================================================== --- XoopsModules/TDMCreate/releases/1.39/TDMCreate/admin/building.php 2012-03-10 20:42:23 UTC (rev 9118) +++ XoopsModules/TDMCreate/releases/1.39/TDMCreate/admin/building.php 2012-03-10 21:51:24 UTC (rev 9119) @@ -42,7 +42,7 @@ $mods_display_admin = $mods->getVar('modules_display_admin'); $mods_display_user = $mods->getVar('modules_display_user'); //Remove the new module directory if it exists - TDMCreate_clearDir($modPath.'/modules/'.$mods_name); + //clearDir($modPath.'/modules/'.$modules_name); //Nom des tables et combien de tables $criteria = new CriteriaCompo(); Modified: XoopsModules/TDMCreate/releases/1.39/TDMCreate/const/const_templates_pages.php =================================================================== --- XoopsModules/TDMCreate/releases/1.39/TDMCreate/const/const_templates_pages.php 2012-03-10 20:42:23 UTC (rev 9118) +++ XoopsModules/TDMCreate/releases/1.39/TDMCreate/const/const_templates_pages.php 2012-03-10 21:51:24 UTC (rev 9119) @@ -54,7 +54,7 @@ $j++; } //if( $structure_parametres[3] == 1 || $i == 0) { - $text .= '<{$'.$tables_name.'.'.correctFormat($structure_champs[0]).'}><br /> + $text .= '<{$'.$tables_name.'.'.$structure_champs[0].'}><br /> '; //} } Modified: XoopsModules/TDMCreate/releases/1.39/TDMCreate/const/const_user_pages.php =================================================================== --- XoopsModules/TDMCreate/releases/1.39/TDMCreate/const/const_user_pages.php 2012-03-10 20:42:23 UTC (rev 9118) +++ XoopsModules/TDMCreate/releases/1.39/TDMCreate/const/const_user_pages.php 2012-03-10 21:51:24 UTC (rev 9119) @@ -65,34 +65,7 @@ { //$class = ($class == "even") ? "odd" : "even";'; $text .= ' - $xoopsTpl->append(\''.$tables_name.'\', array('; - $j = 0; //$commas[0] = '\'class\' => $class'; - for($i=0; $i<$nb_champs; $i++) { - $champs = explode(":", $champs_total[$i]); - //View the elements of the form and choose the parameters - /*if( $i != 0 ) - { */ - $params1 = explode(":", $params_total[$i-1]); - if ( $params1[4] != 1 ) - { - $tpl_var = correctFormat($champs[0]); - $commas[$i] .= '\''.$tpl_var.'\' => $'.$tables_name.'_arr[$i]->getVar(\''.$champs[0].'\')'; - } - //} - $j++; - } - //Problem commas - $key = ''; - for ($i=0; $i<$j; $i++) - { - if ( $i != $j - 1 ) { - $key .= ''.$commas[$i].', '; - } else { - $key .= ''.$commas[$i].''; - } - } - $text .= $key; unset($j); - $text .= ')); + $xoopsTpl->append(\''.$tables_name.'\', array('.$tables_name.')); } } '; Modified: XoopsModules/TDMCreate/releases/1.39/TDMCreate/const/const_xoopsversion.php =================================================================== --- XoopsModules/TDMCreate/releases/1.39/TDMCreate/const/const_xoopsversion.php 2012-03-10 20:42:23 UTC (rev 9118) +++ XoopsModules/TDMCreate/releases/1.39/TDMCreate/const/const_xoopsversion.php 2012-03-10 21:51:24 UTC (rev 9119) @@ -211,7 +211,7 @@ $modversion[\'config\'][$i][\'formtype\'] = "select"; $modversion[\'config\'][$i][\'valuetype\'] = "text"; $modversion[\'config\'][$i][\'default\'] = "dhtmltextarea"; -$modversion[\'config\'][$i][\'options\'] = XoopsLists::getDirListAsArray(XOOPS_ROOT_PATH . "/class/xoopseditor"); +$modversion[\'config\'][$i][\'options\'] = XoopsLists::getEditorList(); $modversion[\'config\'][$i][\'category\'] = "global"; $i++; $modversion[\'config\'][$i][\'name\'] = "keywords"; Modified: XoopsModules/TDMCreate/releases/1.39/TDMCreate/docs/changelog.txt =================================================================== --- XoopsModules/TDMCreate/releases/1.39/TDMCreate/docs/changelog.txt 2012-03-10 20:42:23 UTC (rev 9118) +++ XoopsModules/TDMCreate/releases/1.39/TDMCreate/docs/changelog.txt 2012-03-10 21:51:24 UTC (rev 9119) @@ -1,4 +1,13 @@ ================================= +2012/03/10: Version 1.39 Alpha 2 +================================= + +- Added new file readme.php (Timgno) +- Added new champ in modules table (Timgno) +- Changed file constArchitecture class with tdmcreate_architecture.php (Timgno) +- Fixed more bugs (Timgno) + +================================= 2012/02/14: Version 1.39 Alpha 1 ================================= Modified: XoopsModules/TDMCreate/releases/1.39/TDMCreate/docs/lang_diff.txt =================================================================== --- XoopsModules/TDMCreate/releases/1.39/TDMCreate/docs/lang_diff.txt 2012-03-10 20:42:23 UTC (rev 9118) +++ XoopsModules/TDMCreate/releases/1.39/TDMCreate/docs/lang_diff.txt 2012-03-10 21:51:24 UTC (rev 9119) @@ -1,3 +1,452 @@ Read Me First ============= -For a different language, pleace use the english language folder to traslate this module \ No newline at end of file +For a different language, pleace use the english language folder to traslate this module + +------------------------------------------------ +Version 1.0 - 1.1 +------------------------------------------------ +admin.php + +define("_AM_TDMCREATE_TABLES_CHAMPS_MORE_ELEMENTS","Form : Elements"); +define("_AM_TDMCREATE_TABLES_CHAMPS_MORE_DISPLAY_ADMIN","Page : Display admin"); +define("_AM_TDMCREATE_TABLES_CHAMPS_MORE_DISPLAY_USER","Page :Display user"); +define("_AM_TDMCREATE_TABLES_CHAMPS_MORE_BLOC","Bloc : Display"); +define("_AM_TDMCREATE_TABLES_CHAMPS_MORE_MAIN_FIELD","Table : Main Field"); +define("_AM_TDMCREATE_TABLES_CHAMPS_MORE_SEARCH","Search : Index"); +define("_AM_TDMCREATE_TABLES_CHAMPS_MORE_REQUIRED","Form : Required field"); + +define("_AM_TDMCREATE_FORMEDIT","Edit"); +define("_AM_TDMCREATE_FORMDEL","Delete"); +define("_AM_TDMCREATE_FORMCHAMPS","Edit fields"); +define("_AM_TDMCREATE_FORM_INFO_TABLE","Information on the table"); +define("_AM_TDMCREATE_FORM_INFO_TABLE_FIELD","There are 3 fields added automatically on each tables : table_submitter, table_date_created, table_online"); + +define("_AM_TDMCREATE_CONST_OK_COMS","Creation files for the coms"); +define("_AM_TDMCREATE_CONST_NOTOK_COMS","Problems : Creation files for the coms"); + +define("_AM_TDMCREATE_TABLES_COMS","Activer les commentaires pour cette table <br><i>Le module peut gerer pour l'instant les coms que sur une table<br>L'option commentaire sera desactivee si vous validez</i>"); + +modinfo.php + +//Menu +define("_MI_TDMCREATE_ADMIN_INDEX","Index"); +define("_MI_TDMCREATE_ADMIN_MODULES","Add a module"); +define("_MI_TDMCREATE_ADMIN_TABLES","Add a table"); +define("_MI_TDMCREATE_ADMIN_CONST","Build the module"); +define("_MI_TDMCREATE_ADMIN_ABOUT","Short About"); +define("_MI_TDMCREATE_ADMIN_PREFERENCES","Preferences"); +define("_MI_TDMCREATE_ADMIN_UPDATE","Update"); + +define("_MI_TDMCREATE_DESC","Module create of module made by TDM"); + +------------------------------------------------ +Version 1.1 - 1.15 +------------------------------------------------ +admin.php + +define("_AM_TDMCREATE_TABLES_CHAMPS_MORE_ELEMENTS","Form : Elements"); +define("_AM_TDMCREATE_TABLES_CHAMPS_MORE_DISPLAY_ADMIN","Page : Display admin"); +define("_AM_TDMCREATE_TABLES_CHAMPS_MORE_DISPLAY_USER","Page :Display user"); +define("_AM_TDMCREATE_TABLES_CHAMPS_MORE_BLOC","Bloc : Display"); +define("_AM_TDMCREATE_TABLES_CHAMPS_MORE_MAIN_FIELD","Table : Main Field"); +define("_AM_TDMCREATE_TABLES_CHAMPS_MORE_SEARCH","Search : Index"); +define("_AM_TDMCREATE_TABLES_CHAMPS_MORE_REQUIRED","Form : Required field"); + +define("_AM_TDMCREATE_FORMEDIT","Edit"); +define("_AM_TDMCREATE_FORMDEL","Delete"); +define("_AM_TDMCREATE_FORMCHAMPS","Edit fields"); +define("_AM_TDMCREATE_FORM_INFO_TABLE","Information on the table"); +define("_AM_TDMCREATE_FORM_INFO_TABLE_FIELD","There are 3 fields added automatically on each tables : table_submitter, table_date_created, table_online"); +// 1.15 +define("_AM_TDMCREATE_MODULES_AUTHOR_MAIL", "Author Email"); +define("_AM_TDMCREATE_MODULES_FORUM_SITE_URL","Topic URL"); +define("_AM_TDMCREATE_MODULES_FORUM_SITE_NAME","Topic URL title"); + +define("_AM_TDMCREATE_CONST_OK_COMS","Creation files for the coms"); +define("_AM_TDMCREATE_CONST_NOTOK_COMS","Problems : Creation files for the coms"); +// 1.15 +define("_AM_TDMCREATE_CONST_OK_MAIN_LANGUAGE", "Creation of main.php file into language folder"); +define("_AM_TDMCREATE_CONST_NOTOK_MAIN_LANGUAGE", "Problemes: Creation of main.php file into language folder"); + +define("_AM_TDMCREATE_TABLES_COMS","Activer les commentaires pour cette table <br><i>Le module peut gerer pour l'instant les coms que sur une table<br>L'option commentaire sera desactivee si vous validez</i>"); + +modinfo.php + +//Menu +define("_MI_TDMCREATE_ADMIN_INDEX","Index"); +define("_MI_TDMCREATE_ADMIN_MODULES","Add a module"); +define("_MI_TDMCREATE_ADMIN_TABLES","Add a table"); +define("_MI_TDMCREATE_ADMIN_CONST","Build the module"); +define("_MI_TDMCREATE_ADMIN_ABOUT","Short About"); +define("_MI_TDMCREATE_ADMIN_PREFERENCES","Preferences"); +define("_MI_TDMCREATE_ADMIN_UPDATE","Update"); + +define("_MI_TDMCREATE_DESC","Module create of module made by TDM"); + +------------------------------------------------ +Version 1.15 - 1.37 +------------------------------------------------ +admin.php + +define("_AM_TDMCREATE_TABLES_CHAMPS_MORE_ELEMENTS","Form : Elements"); +define("_AM_TDMCREATE_TABLES_CHAMPS_MORE_DISPLAY_ADMIN","Page : Display admin"); +define("_AM_TDMCREATE_TABLES_CHAMPS_MORE_DISPLAY_USER","Page :Display user"); +define("_AM_TDMCREATE_TABLES_CHAMPS_MORE_BLOC","Bloc : Display"); +define("_AM_TDMCREATE_TABLES_CHAMPS_MORE_MAIN_FIELD","Table : Main Field"); +define("_AM_TDMCREATE_TABLES_CHAMPS_MORE_SEARCH","Search : Index"); +define("_AM_TDMCREATE_TABLES_CHAMPS_MORE_REQUIRED","Form : Required field"); + +define("_AM_TDMCREATE_FORMEDIT","Edit"); +define("_AM_TDMCREATE_FORMDEL","Delete"); +define("_AM_TDMCREATE_FORMCHAMPS","Edit fields"); +define("_AM_TDMCREATE_FORM_INFO_TABLE","Information on the table"); +define("_AM_TDMCREATE_FORM_INFO_TABLE_FIELD","There are 3 fields added automatically on each tables : table_submitter, table_date_created, table_online"); +// 1.15 +define("_AM_TDMCREATE_MODULES_AUTHOR_MAIL", "Author Email"); +define("_AM_TDMCREATE_MODULES_FORUM_SITE_URL","Topic URL"); +define("_AM_TDMCREATE_MODULES_FORUM_SITE_NAME","Topic URL title"); + +define("_AM_TDMCREATE_CONST_OK_COMS","Creation files for the coms"); +define("_AM_TDMCREATE_CONST_NOTOK_COMS","Problems : Creation files for the coms"); +// 1.15 +define("_AM_TDMCREATE_CONST_OK_MAIN_LANGUAGE", "Creation of main.php file into language folder"); +define("_AM_TDMCREATE_CONST_NOTOK_MAIN_LANGUAGE", "Problemes: Creation of main.php file into language folder"); + +define("_AM_TDMCREATE_TABLES_COMS","Activer les commentaires pour cette table <br><i>Le module peut gerer pour l'instant les coms que sur une table<br>L'option commentaire sera desactivee si vous validez</i>"); + +// 1.37 +define("_AM_TDMCREATE_MODULES_LIST", "Modules List"); +define("_AM_TDMCREATE_MODULES_NEW", "New Module"); + +define("_AM_TDMCREATE_TABLES_SUBMITTER", "Add submitter"); +define("_AM_TDMCREATE_TABLES_DATE_CREATED", "Add date created"); +define("_AM_TDMCREATE_TABLES_ONLINE", "Add online"); + +modinfo.php + +//Menu +define("_MI_TDMCREATE_ADMIN_INDEX","Index"); +define("_MI_TDMCREATE_ADMIN_MODULES","Add a module"); +define("_MI_TDMCREATE_ADMIN_TABLES","Add a table"); +define("_MI_TDMCREATE_ADMIN_CONST","Build the module"); +define("_MI_TDMCREATE_ADMIN_ABOUT","Short About"); +define("_MI_TDMCREATE_ADMIN_PREFERENCES","Preferences"); +define("_MI_TDMCREATE_ADMIN_UPDATE","Update"); + +define("_MI_TDMCREATE_DESC","Module create of module made by TDM"); + +define("_MI_TDMCREATE_EDITOR", "Editor"); +define("_MI_TDMCREATE_EDITORDSC", "Select an editor to write"); +define("_MI_TDMCREATE_IDPAYPAL", "Paypal ID"); +define("_MI_TDMCREATE_IDPAYPAL_DESC", "ID Paypal for donations."); + +------------------------------------------------ +Version 1.37 - 1.38 +------------------------------------------------ +// 1.37 +admin.php + +define("_AM_TDMCREATE_MODULES_LIST", "Modules List"); +define("_AM_TDMCREATE_MODULES_NEW", "New Module"); + +define("_AM_TDMCREATE_TABLES_SUBMITTER", "Add submitter"); +define("_AM_TDMCREATE_TABLES_DATE_CREATED", "Add date created"); +define("_AM_TDMCREATE_TABLES_ONLINE", "Add online"); + +modinfo.php + +//Menu changed +define("_MI_TDMCREATE_ADMIN_INDEX","Index"); +define("_MI_TDMCREATE_ADMIN_MODULES","Add a module"); +define("_MI_TDMCREATE_ADMIN_TABLES","Add a table"); +define("_MI_TDMCREATE_ADMIN_CONST","Build the module"); +define("_MI_TDMCREATE_ADMIN_ABOUT","Short About"); +define("_MI_TDMCREATE_ADMIN_PREFERENCES","Preferences"); +define("_MI_TDMCREATE_ADMIN_UPDATE","Update"); + +define("_MI_TDMCREATE_DESC","Module create of module made by TDM"); + +define("_MI_TDMCREATE_EDITOR", "Editor"); +define("_MI_TDMCREATE_EDITORDSC", "Select an editor to write"); +define("_MI_TDMCREATE_IDPAYPAL", "Paypal ID"); +define("_MI_TDMCREATE_IDPAYPAL_DESC", "ID Paypal for donations."); + +// 1.38 +admin.php + +//Buttons +define("_AM_TDMCREATE_TABLES_NEW","Add Table"); +define("_AM_TDMCREATE_TABLES_LIST","List Tables"); + +define("_AM_TDMCREATE_TABLES_TOPICS","Add New Topics"); + +define("_AM_TDMCREATE_NEW","Add Define Language"); +define("_AM_TDMCREATE_LIST","List Defines Languages"); + +//Error NoFrameworks +define("_AM_ERROR_NOFRAMEWORKS","Error: You don't use the Frameworks \"admin module\". Please install this Frameworks"); +//Support +define("_AM_TDMCREATE_MAINTAINEDBY", "is maintained by the"); + +define("_AM_TDMCREATE_VERSION", "Version"); +define("_AM_TDMCREATE_RELEASE", "Date created"); +define("_AM_TDMCREATE_STATUS", "Status"); +define("_AM_TDMCREATE_SEARCH", "Search"); + +//deleted +define("_AM_TDMCREATE_TABLES_TOPICS", "Add Topic"); + +// Filemanager.php + //Nav +define('_AM_TDMCREATE_FILEMANAGER_NAV_MANAGER','File Manager'); +define('_AM_TDMCREATE_FILEMANAGER_NAV_MAIN','File Manager'); + +//Tips +define('_AM_TDMCREATE_FILEMANAGER_NAV_TIPS',' +<ul> +<li>Change file permission, content or just delete an unused file from your XOOPS site.</li> +</ul> +'); + +// Main +define('_AM_TDMCREATE_FILEMANAGER_DIRECTORY','Directory'); +define('_AM_TDMCREATE_FILEMANAGER_FILES','Files'); +define('_AM_TDMCREATE_FILEMANAGER_GENERATE','Force generation'); +define('_AM_TDMCREATE_FILEMANAGER_SELECT_THEME','Select theme'); +define('_AM_TDMCREATE_FILEMANAGER_FORCE_GENERATED','Force generated'); +define('_AM_TDMCREATE_FILEMANAGER_NAV_FILE_GENERATED','Files generated'); +define('_AM_TDMCREATE_FILEMANAGER_NOT_CREATED','No files created'); +define('_AM_TDMCREATE_FILEMANAGER_HOME','Home'); +define('_AM_TDMCREATE_FILEMANAGER_SAVE','Save'); +define('_AM_TDMCREATE_FILEMANAGER_CANCEL','Cancel'); +define('_AM_TDMCREATE_FILEMANAGER_RESTORE','Restore'); +define('_AM_TDMCREATE_FILEMANAGER_REFRESH','Refresh'); +define('_AM_TDMCREATE_FILEMANAGER_UPLOAD','Upload file'); +define('_AM_TDMCREATE_FILEMANAGER_UPLOAD_CHOOSE','Select file to upload'); +define('_AM_TDMCREATE_FILEMANAGER_ADDDIR','Add Directory'); +define('_AM_TDMCREATE_FILEMANAGER_ADDDIR_NAME','Choose name of directory'); +define('_AM_TDMCREATE_FILEMANAGER_ADDFILE','Add New File'); +define('_AM_TDMCREATE_FILEMANAGER_DELDIR','Delete Directory'); + +define('_AM_TDMCREATE_FILEMANAGER_RESTORE_ERROR_FILE_EXISTS','Error: File not exist'); +define('_AM_TDMCREATE_FILEMANAGER_RESTORE_ERROR_FILE_DELETE','Error: File not delete'); +define('_AM_TDMCREATE_FILEMANAGER_RESTORE_ERROR_FILE_RENAME','Error: File not rename'); +define('_AM_TDMCREATE_FILEMANAGER_BACK','Back'); +define('_AM_TDMCREATE_FILEMANAGER_DELETE','Delete'); +define('_AM_TDMCREATE_FILEMANAGER_ERROR','Error'); +define('_AM_TDMCREATE_FILEMANAGER_EDIT','Edit of:'); +define('_AM_TDMCREATE_FILEMANAGER_EMPTY_FILE','File empty'); +define('_AM_TDMCREATE_FILEMANAGER_DELDIR_NOTOK','Error: delete this directory'); +define('_AM_TDMCREATE_FILEMANAGER_DELDIR_OK','Directory successfully deleted'); + +// Message +define('_AM_TDMCREATE_FILEMANAGER_UPLOAD_FILE','Files successfully uploaded'); +define('_AM_TDMCREATE_FILEMANAGER_EXTRACT_FILE','Files successfully extracted'); +define('_AM_TDMCREATE_FILEMANAGER_EXTRACT_ERROR','Files could not be extracted'); +define('_AM_TDMCREATE_FILEMANAGER_DELETE_FILE','Files successfully deleted'); +define('_AM_TDMCREATE_FILEMANAGER_DIR_SUCCESS','Directory successfully created'); +define('_AM_TDMCREATE_FILEMANAGER_DIR_ERROR','Directory could not be created'); +define('_AM_TDMCREATE_FILEMANAGER_DIR_RYSDEL','Are you sure to delete this folder?'); +define('_AM_TDMCREATE_FILEMANAGER_FILE_SUCCESS','File successfully created'); +define('_AM_TDMCREATE_FILEMANAGER_SUREDEL', 'Are you sure to delete this file %s?'); +define('_AM_TDMCREATE_FILEMANAGER_DIR_SUREDEL', 'Are you sure you want to delete this directory %s?<br />Warning: all subdirectories and files file will be deleted'); + +modinfo.php + +// Main +define("_MI_TDMCREATE_NAME", "TDMCreate"); +define("_MI_TDMCREATE_DESC", "This module does to create others modules."); +// Admin +define("_MI_TDMCREATE_ADMIN_NAME","TDMCreate"); +define("_MI_TDMCREATE_ADMIN_DESC","This module does to create others modules: "); + +//Menu +define("_MI_TDMCREATE_ADMENU1","Home"); +define("_MI_TDMCREATE_ADMENU2","Modules"); +define("_MI_TDMCREATE_ADMENU3","Tables"); +define("_MI_TDMCREATE_ADMENU4","Languages"); +define("_MI_TDMCREATE_ADMENU5","Build"); +define("_MI_TDMCREATE_ADMENU6","File Manager"); +define("_MI_TDMCREATE_ADMENU7","About"); + +//Config +define("_MI_TDMCREATE_EDITOR","Editor"); +define("_MI_TDMCREATE_EDITOR_DESC","Choose an editor from the list"); +define("_MI_TDMCREATE_PERPAGEADMIN","Admin per page"); +define("_MI_TDMCREATE_PERPAGEADMIN_DESC","Select to view admin per page tables or modules"); +define("_MI_TDMCREATE_IDPAYPAL", "Paypal ID"); +define("_MI_TDMCREATE_IDPAYPAL_DESC", "Insert here your id paypal for donactions."); + +------------------------------------------------ +Version 1.38 - 1.39 +------------------------------------------------ +// 1.38 +admin.php + +//Buttons +define("_AM_TDMCREATE_TABLES_NEW","Add Table"); +define("_AM_TDMCREATE_TABLES_LIST","List Tables"); + +define("_AM_TDMCREATE_TABLES_TOPICS","Add New Topics"); + +define("_AM_TDMCREATE_NEW","Add Define Language"); +define("_AM_TDMCREATE_LIST","List Defines Languages"); + +//Error NoFrameworks +define("_AM_ERROR_NOFRAMEWORKS","Error: You don't use the Frameworks \"admin module\". Please install this Frameworks"); +//Support +define("_AM_TDMCREATE_MAINTAINEDBY", "is maintained by the"); + +define("_AM_TDMCREATE_VERSION", "Version"); +define("_AM_TDMCREATE_RELEASE", "Date created"); +define("_AM_TDMCREATE_STATUS", "Status"); +define("_AM_TDMCREATE_SEARCH", "Search"); + +//deleted +define("_AM_TDMCREATE_TABLES_TOPICS", "Add Topic"); + +// Filemanager.php + //Nav +define('_AM_TDMCREATE_FILEMANAGER_NAV_MANAGER','File Manager'); +define('_AM_TDMCREATE_FILEMANAGER_NAV_MAIN','File Manager'); + +//Tips +define('_AM_TDMCREATE_FILEMANAGER_NAV_TIPS',' +<ul> +<li>Change file permission, content or just delete an unused file from your XOOPS site.</li> +</ul> +'); + +// Main +define('_AM_TDMCREATE_FILEMANAGER_DIRECTORY','Directory'); +define('_AM_TDMCREATE_FILEMANAGER_FILES','Files'); +define('_AM_TDMCREATE_FILEMANAGER_GENERATE','Force generation'); +define('_AM_TDMCREATE_FILEMANAGER_SELECT_THEME','Select theme'); +define('_AM_TDMCREATE_FILEMANAGER_FORCE_GENERATED','Force generated'); +define('_AM_TDMCREATE_FILEMANAGER_NAV_FILE_GENERATED','Files generated'); +define('_AM_TDMCREATE_FILEMANAGER_NOT_CREATED','No files created'); +define('_AM_TDMCREATE_FILEMANAGER_HOME','Home'); +define('_AM_TDMCREATE_FILEMANAGER_SAVE','Save'); +define('_AM_TDMCREATE_FILEMANAGER_CANCEL','Cancel'); +define('_AM_TDMCREATE_FILEMANAGER_RESTORE','Restore'); +define('_AM_TDMCREATE_FILEMANAGER_REFRESH','Refresh'); +define('_AM_TDMCREATE_FILEMANAGER_UPLOAD','Upload file'); +define('_AM_TDMCREATE_FILEMANAGER_UPLOAD_CHOOSE','Select file to upload'); +define('_AM_TDMCREATE_FILEMANAGER_ADDDIR','Add Directory'); +define('_AM_TDMCREATE_FILEMANAGER_ADDDIR_NAME','Choose name of directory'); +define('_AM_TDMCREATE_FILEMANAGER_ADDFILE','Add New File'); +define('_AM_TDMCREATE_FILEMANAGER_DELDIR','Delete Directory'); + +define('_AM_TDMCREATE_FILEMANAGER_RESTORE_ERROR_FILE_EXISTS','Error: File not exist'); +define('_AM_TDMCREATE_FILEMANAGER_RESTORE_ERROR_FILE_DELETE','Error: File not delete'); +define('_AM_TDMCREATE_FILEMANAGER_RESTORE_ERROR_FILE_RENAME','Error: File not rename'); +define('_AM_TDMCREATE_FILEMANAGER_BACK','Back'); +define('_AM_TDMCREATE_FILEMANAGER_DELETE','Delete'); +define('_AM_TDMCREATE_FILEMANAGER_ERROR','Error'); +define('_AM_TDMCREATE_FILEMANAGER_EDIT','Edit of:'); +define('_AM_TDMCREATE_FILEMANAGER_EMPTY_FILE','File empty'); +define('_AM_TDMCREATE_FILEMANAGER_DELDIR_NOTOK','Error: delete this directory'); +define('_AM_TDMCREATE_FILEMANAGER_DELDIR_OK','Directory successfully deleted'); + +// Message +define('_AM_TDMCREATE_FILEMANAGER_UPLOAD_FILE','Files successfully uploaded'); +define('_AM_TDMCREATE_FILEMANAGER_EXTRACT_FILE','Files successfully extracted'); +define('_AM_TDMCREATE_FILEMANAGER_EXTRACT_ERROR','Files could not be extracted'); +define('_AM_TDMCREATE_FILEMANAGER_DELETE_FILE','Files successfully deleted'); +define('_AM_TDMCREATE_FILEMANAGER_DIR_SUCCESS','Directory successfully created'); +define('_AM_TDMCREATE_FILEMANAGER_DIR_ERROR','Directory could not be created'); +define('_AM_TDMCREATE_FILEMANAGER_DIR_RYSDEL','Are you sure to delete this folder?'); +define('_AM_TDMCREATE_FILEMANAGER_FILE_SUCCESS','File successfully created'); +define('_AM_TDMCREATE_FILEMANAGER_SUREDEL', 'Are you sure to delete this file %s?'); +define('_AM_TDMCREATE_FILEMANAGER_DIR_SUREDEL', 'Are you sure you want to delete this directory %s?<br />Warning: all subdirectories and files file will be deleted'); + +modinfo.php + +// Main +define("_MI_TDMCREATE_NAME", "TDMCreate"); +define("_MI_TDMCREATE_DESC", "This module does to create others modules."); +// Admin +define("_MI_TDMCREATE_ADMIN_NAME","TDMCreate"); +define("_MI_TDMCREATE_ADMIN_DESC","This module does to create others modules: "); + +//Menu +define("_MI_TDMCREATE_ADMENU1","Home"); +define("_MI_TDMCREATE_ADMENU2","Modules"); +define("_MI_TDMCREATE_ADMENU3","Tables"); +define("_MI_TDMCREATE_ADMENU4","Languages"); +define("_MI_TDMCREATE_ADMENU5","Build"); +define("_MI_TDMCREATE_ADMENU6","File Manager"); +define("_MI_TDMCREATE_ADMENU7","About"); + +//Config +define("_MI_TDMCREATE_EDITOR","Editor"); +define("_MI_TDMCREATE_EDITOR_DESC","Choose an editor from the list"); +define("_MI_TDMCREATE_PERPAGEADMIN","Admin per page"); +define("_MI_TDMCREATE_PERPAGEADMIN_DESC","Select to view admin per page tables or modules"); +define("_MI_TDMCREATE_IDPAYPAL", "Paypal ID"); +define("_MI_TDMCREATE_IDPAYPAL_DESC", "Insert here your id paypal for donactions."); + +// 1.39 +admin.php +// Modules +define("_AM_TDMCREATE_MODULES_NAMEANDFOLDER", "Module and Folder Name"); +define("_AM_TDMCREATE_MODULES_NAME", "Module Name"); +define("_AM_TDMCREATE_MODULES_FNAME", "Folder Name"); + +define("_AM_TDMCREATE_COMMENTS", "Comments"); + +define('_AM_TDMCREATE_FOLDER', "Folder"); +define('_AM_TDMCREATE_MODULES_NAMEANDFOLDER', "Module and Folder Name"); +define('_AM_TDMCREATE_MODULES_NAME', "Module Name"); +define('_AM_TDMCREATE_MODULES_FOLDER', "Folder Name"); +define('_AM_TDMCREATE_MODULES_DONATIONS', "Donations"); + +//Buttons +define("_AM_TDMCREATE_LANGUAGES_NEWFOLDER", "Add Folder"); +define("_AM_TDMCREATE_LANGUAGES_NEWFILE", "Add File"); + +//Champs +define ("_AM_TDMCREATE_TABLES_CHAMPS_ADD", "Add New Table"); +define ("_AM_TDMCREATE_TABLES_CHAMPS_EDIT", "Edit table"); +define ("_AM_TDMCREATE_TABLES_CHAMPS_ID", "ID"); +define ("_AM_TDMCREATE_TABLES_CHAMPS_NAME", "Champ"); +define ("_AM_TDMCREATE_TABLES_CHAMPS_TYPE", "Type"); +define ("_AM_TDMCREATE_TABLES_CHAMPS_VALUE", "Value"); +define ("_AM_TDMCREATE_TABLES_CHAMPS_ATTRIBUTES", "Attribute"); +define ("_AM_TDMCREATE_TABLES_CHAMPS_NULL", "Null"); +define ("_AM_TDMCREATE_TABLES_CHAMPS_DEFAULT", "(Default)"); +define ("_AM_TDMCREATE_TABLES_CHAMPS_KEY", "Key"); +define ("_AM_TDMCREATE_TABLES_CHAMPS_OTHERS", "Parameters"); +define ("_AM_TDMCREATE_TABLES_CHAMPS_OTHERS_ELEMENTS", "Forms: Elements"); +define ("_AM_TDMCREATE_TABLES_CHAMPS_OTHERS_DISPLAY_ADMIN", "Page: Admin View"); +define ("_AM_TDMCREATE_TABLES_CHAMPS_OTHERS_DISPLAY_USER", "Page: User View"); +define ("_AM_TDMCREATE_TABLES_CHAMPS_OTHERS_BLOCK", "Blocks: Blocks View"); +define ("_AM_TDMCREATE_TABLES_CHAMPS_OTHERS_MAIN_FIELD", "Table: Main Field"); +define ("_AM_TDMCREATE_TABLES_CHAMPS_OTHERS_SEARCH", "Search: Index"); +define ("_AM_TDMCREATE_TABLES_CHAMPS_OTHERS_REQUIRED", "Form: Require Field"); + +// Table Add +define("_AM_TDMCREATE_TABLES_NAME_EMPTY", "If activated, the table fields have a prefix"); + +define("_AM_MODULEADMIN_MISSING","Error: You don't use the Frameworks \"admin module\". Please install this Frameworks"); +define("_AM_TDMCREATE_MAINTAINEDBY", "<span class='bold green'>%s</span><span class='small italic'>is maintained by the<a href='http://www.txmodxoops.org/modules/newbb/' title='Visit TXMod Xoops Community' class='tooltip' rel='external'>TXMod Xoops Community</a> and by <a href='http://www.xoops.org/modules/newbb/' title='Visit Xoops Community' class='tooltip' rel='external'>Xoops Community</a></span>"); + +modinfo.php + +//Menu +define("_MI_TDMCREATE_ADMENU5", "Css"); +define("_MI_TDMCREATE_ADMENU6", "Changelog"); + +define('_MI_TDMCREATE_ADMENU10', "Readme"); + +//Config +define("_MI_TDMCREATE_SIZE", "File Size"); +define("_MI_TDMCREATE_MIMETYPES", "Mime types"); + +// Readme +define('_AM_TDMCREATE_README', "Readme"); +define('_AM_TDMCREATE_CHANGELOG', "Changelog"); +define('_AM_TDMCREATE_CREDITS', "Credits"); +define('_AM_TDMCREATE_INSTALL', "Install"); +define('_AM_TDMCREATE_LICENCE', "Licence"); +define('_AM_TDMCREATE_LANGDIFF', "Language Difference"); Modified: XoopsModules/TDMCreate/releases/1.39/TDMCreate/include/functions.php =================================================================== --- XoopsModules/TDMCreate/releases/1.39/TDMCreate/include/functions.php 2012-03-10 20:42:23 UTC (rev 9118) +++ XoopsModules/TDMCreate/releases/1.39/TDMCreate/include/functions.php 2012-03-10 21:51:24 UTC (rev 9119) @@ -221,4 +221,25 @@ return $ret; } +/** + * function clearDir + * Copyright (C) 2012 TXMod Xoops + * + * @version 1.0 + */ + +function clearDir($dir) { + if (!($dir = dir($dir))) { + return false; + } + while (false !== $item = $dir->read()) { + if ($item != '.' && $item != '..' && !rmdirr ($dir->path ."/". $item)) { + $dir->close(); + return false; + } + } + $dir->close(); + return true; +} + ?> \ No newline at end of file Modified: XoopsModules/TDMCreate/releases/1.39/TDMCreate/xoops_version.php =================================================================== --- XoopsModules/TDMCreate/releases/1.39/TDMCreate/xoops_version.php 2012-03-10 20:42:23 UTC (rev 9118) +++ XoopsModules/TDMCreate/releases/1.39/TDMCreate/xoops_version.php 2012-03-10 21:51:24 UTC (rev 9119) @@ -20,8 +20,7 @@ * * Version : 1.39 Tue 2012/02/14 16:20:18 : Timgno Exp $ * **************************************************************************** - */ - + */ if (!defined('XOOPS_ROOT_PATH')){ exit(); } $dirname = basename( dirname( __FILE__ ) ) ; @@ -104,7 +103,7 @@ $modversion["config"][$i]["formtype"] = "select"; $modversion["config"][$i]["valuetype"] = "text"; $modversion["config"][$i]["default"] = "dhtmltextarea"; -$modversion["config"][$i]["options"] = XoopsLists::getDirListAsArray(XOOPS_ROOT_PATH . "/class/xoopseditor"); +$modversion["config"][$i]["options"] = XoopsLists::getEditorList(); $modversion["config"][$i]["category"] = "global"; $i++; //Uploads : size cat_imgurl This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dh...@us...> - 2012-03-10 20:42:31
|
Revision: 9118 http://xoops.svn.sourceforge.net/xoops/?rev=9118&view=rev Author: dhcst Date: 2012-03-10 20:42:23 +0000 (Sat, 10 Mar 2012) Log Message: ----------- fix templates and many errors Modified Paths: -------------- XoopsModules/newbb/branches/alfred/newbb/action.post.php XoopsModules/newbb/branches/alfred/newbb/action.topic.php XoopsModules/newbb/branches/alfred/newbb/class/forum.php XoopsModules/newbb/branches/alfred/newbb/class/moderate.php XoopsModules/newbb/branches/alfred/newbb/class/online.php XoopsModules/newbb/branches/alfred/newbb/delete.php XoopsModules/newbb/branches/alfred/newbb/docs/changelog.txt XoopsModules/newbb/branches/alfred/newbb/header.php XoopsModules/newbb/branches/alfred/newbb/include/form.post.php XoopsModules/newbb/branches/alfred/newbb/include/functions.image.php XoopsModules/newbb/branches/alfred/newbb/include/search.inc.php XoopsModules/newbb/branches/alfred/newbb/include/sitemap.plugin.php XoopsModules/newbb/branches/alfred/newbb/index.php XoopsModules/newbb/branches/alfred/newbb/language/english/main.php XoopsModules/newbb/branches/alfred/newbb/language/german/main.php XoopsModules/newbb/branches/alfred/newbb/newtopic.php XoopsModules/newbb/branches/alfred/newbb/post.php XoopsModules/newbb/branches/alfred/newbb/seo_url.php XoopsModules/newbb/branches/alfred/newbb/templates/newbb_index.html XoopsModules/newbb/branches/alfred/newbb/templates/newbb_notification_select.html XoopsModules/newbb/branches/alfred/newbb/templates/newbb_thread.html XoopsModules/newbb/branches/alfred/newbb/templates/newbb_viewforum.html XoopsModules/newbb/branches/alfred/newbb/templates/newbb_viewforum_menu.html XoopsModules/newbb/branches/alfred/newbb/viewforum.php XoopsModules/newbb/branches/alfred/newbb/xoops_version.php Modified: XoopsModules/newbb/branches/alfred/newbb/action.post.php =================================================================== --- XoopsModules/newbb/branches/alfred/newbb/action.post.php 2012-03-10 15:07:40 UTC (rev 9117) +++ XoopsModules/newbb/branches/alfred/newbb/action.post.php 2012-03-10 20:42:23 UTC (rev 9118) @@ -201,11 +201,11 @@ break; } if (!empty($topic_id)) { - redirect_header("viewtopic.php?topic_id=$topic_id", 2, _MD_DBUPDATED); + redirect_header(XOOPS_URL."/modules/newbb/viewtopic.php?topic_id=$topic_id", 2, _MD_DBUPDATED); } elseif (!empty($forum_id)) { - redirect_header("viewforum.php?forum=$forum_id", 2, _MD_DBUPDATED); + redirect_header(XOOPS_URL."/modules/newbb/viewforum.php?forum=$forum_id", 2, _MD_DBUPDATED); } else { - redirect_header("viewpost.php?uid=$uid", 2, _MD_DBUPDATED); + redirect_header(XOOPS_URL."/modules/newbb/viewpost.php?uid=$uid", 2, _MD_DBUPDATED); } include XOOPS_ROOT_PATH.'/footer.php'; Modified: XoopsModules/newbb/branches/alfred/newbb/action.topic.php =================================================================== --- XoopsModules/newbb/branches/alfred/newbb/action.topic.php 2012-03-10 15:07:40 UTC (rev 9117) +++ XoopsModules/newbb/branches/alfred/newbb/action.topic.php 2012-03-10 20:42:23 UTC (rev 9118) @@ -166,9 +166,9 @@ $stats_handler = xoops_getmodulehandler('stats', 'newbb'); $stats_handler->reset(); if (empty($forum_id)) { - redirect_header("list.topic.php", 2, _MD_DBUPDATED); + redirect_header(XOOPS_URL."/modules/newbb/list.topic.php", 2, _MD_DBUPDATED); } else { - redirect_header("viewforum.php?forum=$forum_id", 2, _MD_DBUPDATED); + redirect_header(XOOPS_URL."/modules/newbb/viewforum.php?forum=$forum_id", 2, _MD_DBUPDATED); } include XOOPS_ROOT_PATH.'/footer.php'; Modified: XoopsModules/newbb/branches/alfred/newbb/class/forum.php =================================================================== --- XoopsModules/newbb/branches/alfred/newbb/class/forum.php 2012-03-10 15:07:40 UTC (rev 9117) +++ XoopsModules/newbb/branches/alfred/newbb/class/forum.php 2012-03-10 20:42:23 UTC (rev 9118) @@ -803,11 +803,7 @@ } $_forum_data['forum_lastpost_subject'] = $subject; } - //if ($icon = $post['icon']) { - // $_forum_data['forum_lastpost_icon'] = $icon; - //} else { - $_forum_data['forum_lastpost_icon'] = 'lastposticon.png'; - //} + $_forum_data['forum_lastpost_icon'] = 'lastposticon.png'; endif; Modified: XoopsModules/newbb/branches/alfred/newbb/class/moderate.php =================================================================== --- XoopsModules/newbb/branches/alfred/newbb/class/moderate.php 2012-03-10 15:07:40 UTC (rev 9117) +++ XoopsModules/newbb/branches/alfred/newbb/class/moderate.php 2012-03-10 20:42:23 UTC (rev 9118) @@ -14,9 +14,6 @@ exit(); } -defined("NEWBB_FUNCTIONS_INI") || include XOOPS_ROOT_PATH.'/modules/newbb/include/functions.ini.php'; -newbb_load_object(); - /** * A handler for User moderation management * @@ -31,8 +28,7 @@ { function Moderate() { - //$this->ArtObject("bb_moderates"); - $this->XoopsObject(); + $this->XoopsObject(); $this->initVar('mod_id', XOBJ_DTYPE_INT); $this->initVar('mod_start', XOBJ_DTYPE_INT); $this->initVar('mod_end', XOBJ_DTYPE_INT); Modified: XoopsModules/newbb/branches/alfred/newbb/class/online.php =================================================================== --- XoopsModules/newbb/branches/alfred/newbb/class/online.php 2012-03-10 15:07:40 UTC (rev 9117) +++ XoopsModules/newbb/branches/alfred/newbb/class/online.php 2012-03-10 20:42:23 UTC (rev 9118) @@ -51,8 +51,8 @@ mt_srand((double)microtime() * 1000000); // set gc probabillity to 10% for now.. - if (mt_rand(1, 100) < 75) { - $this->gc(300); + if (mt_rand(1, 100) < 60) { + $this->gc(150); } if (is_object($xoopsUser)) { $uid = $xoopsUser->getVar('uid'); Modified: XoopsModules/newbb/branches/alfred/newbb/delete.php =================================================================== --- XoopsModules/newbb/branches/alfred/newbb/delete.php 2012-03-10 15:07:40 UTC (rev 9117) +++ XoopsModules/newbb/branches/alfred/newbb/delete.php 2012-03-10 20:42:23 UTC (rev 9118) @@ -33,7 +33,8 @@ } $topic_id = $topic->getVar('topic_id'); if ( !$topic_id ) { - $redirect = empty($forum)?"index.php":'viewforum.php?forum='.$forum; + $redirect = empty($forum) ? "index.php":'viewforum.php?forum='.$forum; + $redirect = XOOPS_URL."/modules/newbb/".$redirect; redirect_header($redirect, 2, _MD_ERRORTOPIC); exit(); } @@ -53,12 +54,12 @@ if ( $topic_handler->getPermission($topic->getVar("forum_id"), $topic_status, 'delete') && ( $isadmin || $post_obj->checkIdentity() )) {} else { - redirect_header("viewtopic.php?topic_id=$topic_id&order=$order&viewmode=$viewmode&pid=$pid&forum=$forum", 2, _MD_DELNOTALLOWED); + redirect_header(XOOPS_URL."/modules/newbb/viewtopic.php?topic_id=$topic_id&order=$order&viewmode=$viewmode&pid=$pid&forum=$forum", 2, _MD_DELNOTALLOWED); exit(); } if (!$isadmin && !$post_obj->checkTimelimit('delete_timelimit')) { - redirect_header("viewtopic.php?forum=$forum&topic_id=$topic_id&post_id=$post_id&order=$order&viewmode=$viewmode&pid=$pid",2,_MD_TIMEISUPDEL); + redirect_header(XOOPS_URL."/modules/newbb/viewtopic.php?forum=$forum&topic_id=$topic_id&post_id=$post_id&order=$order&viewmode=$viewmode&pid=$pid",2,_MD_TIMEISUPDEL); exit(); } @@ -72,7 +73,7 @@ if ($post_obj->isTopic() && $topic->getVar("topic_replies")==0) $isDeleteOne=false; if ($isDeleteOne && $post_obj->isTopic() && $topic->getVar("topic_replies")>0) { //$post_handler->emptyTopic($post_obj); - redirect_header("viewtopic.php?topic_id=$topic_id&order=$order&viewmode=$viewmode&pid=$pid&forum=$forum", 2, _MD_POSTFIRSTWITHREPLYNODELETED); + redirect_header(XOOPS_URL."/modules/newbb/viewtopic.php?topic_id=$topic_id&order=$order&viewmode=$viewmode&pid=$pid&forum=$forum", 2, _MD_POSTFIRSTWITHREPLYNODELETED); exit(); } else { if (!empty($_POST['post_text'])) @@ -109,9 +110,9 @@ $post_obj->loadFilters("delete"); if ( $isDeleteOne ) { - redirect_header("viewtopic.php?topic_id=$topic_id&order=$order&viewmode=$viewmode&pid=$pid&forum=$forum", 2, _MD_POSTDELETED); + redirect_header(XOOPS_URL."/modules/newbb/viewtopic.php?topic_id=$topic_id&order=$order&viewmode=$viewmode&pid=$pid&forum=$forum", 2, _MD_POSTDELETED); } else { - redirect_header("viewforum.php?forum=$forum", 2, _MD_POSTSDELETED); + redirect_header(XOOPS_URL."/modules/newbb/viewforum.php?forum=$forum", 2, _MD_POSTSDELETED); } exit(); @@ -119,7 +120,7 @@ include XOOPS_ROOT_PATH."/header.php"; //xoops_confirm(array('post_id' => $post_id, 'viewmode' => $viewmode, 'order' => $order, 'forum' => $forum, 'topic_id' => $topic_id, 'ok' => 1), 'delete.php', _MD_DEL_ONE); echo '<div class="confirmMsg">' . _MD_DEL_ONE . '<br /> - <form method="post" action="delete.php">'; + <form method="post" action="'.XOOPS_URL.'/modules/newbb/delete.php">'; echo _MD_DELEDEDMSG . '<br />'; echo '<textarea name="post_text" cols="50" rows="5"></textarea><br />'; echo '<input type="hidden" name="post_id" value="' . htmlspecialchars($post_id) . '" />'; Modified: XoopsModules/newbb/branches/alfred/newbb/docs/changelog.txt =================================================================== --- XoopsModules/newbb/branches/alfred/newbb/docs/changelog.txt 2012-03-10 15:07:40 UTC (rev 9117) +++ XoopsModules/newbb/branches/alfred/newbb/docs/changelog.txt 2012-03-10 20:42:23 UTC (rev 9118) @@ -1,6 +1,6 @@ newBB Changelog 4.3 -03/06/2012 +03/10/2012 =========================================== 1 Fix Cache Config for SEO 2 Fix Typos in templates @@ -8,6 +8,8 @@ 4 Fix PDF for SEO 5 Fix Error Topic Number in Blocks 6 Fix Stats move or delete Topics + 7 Fix many typos in templates + 8 New cache for Seo newBB Changelog 4.2 Modified: XoopsModules/newbb/branches/alfred/newbb/header.php =================================================================== --- XoopsModules/newbb/branches/alfred/newbb/header.php 2012-03-10 15:07:40 UTC (rev 9117) +++ XoopsModules/newbb/branches/alfred/newbb/header.php 2012-03-10 20:42:23 UTC (rev 9118) @@ -18,15 +18,17 @@ if(((strpos(getenv('REQUEST_URI'), '.html') === false) && !empty($xoopsModuleConfig['do_rewrite']) && (!isset($_POST) || count($_POST) <= 0))) { $redir = false; - if ( strpos(getenv("REQUEST_URI"),"/".SEO_MODULE_NAME."/index.php?mark_read") === true || strpos(getenv("REQUEST_URI"),"/".REAL_MODULE_NAME."/index.php?mark_read") === true) { + if ( strpos(getenv("REQUEST_URI"),"mark_read=") === true || strpos(getenv("REQUEST_URI"),"mark=") === true) { // Mark Forums } else { if ( in_array(basename(getenv('SCRIPT_NAME')),$toseo_url) ) { //rewrite only for files if ( trim(getenv("SCRIPT_NAME")) != '' ) { - if ( strpos(getenv("REQUEST_URI") , "/".REAL_MODULE_NAME."/") === false ) { + if ( strpos(getenv("REQUEST_URI") , "/".SEO_MODULE_NAME."/") === false ) { $redir = true; + } else if ( getenv("QUERY_STRING") ) { + $redir = true; } } } @@ -34,12 +36,11 @@ if ($redir) { $s = "http://" . getenv('HTTP_HOST') . getenv("REQUEST_URI"); - $s = str_replace("/".preg_quote(SEO_MODULE_NAME)."/","/".preg_quote(REAL_MODULE_NAME)."/",$s); + $s = str_replace("/".REAL_MODULE_NAME."/","/".SEO_MODULE_NAME."/",$s); + $newurl = seo_urls('<a href="'.$s.'"></a>'); + $newurl = str_replace('<a href="','',$newurl); + $newurl = str_replace('"></a>','',$newurl); - $newurl = seo_urls('<a href="'.preg_quote($s).'"></a>'); - $newurl = str_replace('<a href="','',preg_quote($newurl)); - $newurl = str_replace('"></a>','',preg_quote($newurl)); - if ( !headers_sent() ) { header("HTTP/1.1 301 Moved Permanently"); header("Location: $newurl"); Modified: XoopsModules/newbb/branches/alfred/newbb/include/form.post.php =================================================================== --- XoopsModules/newbb/branches/alfred/newbb/include/form.post.php 2012-03-10 15:07:40 UTC (rev 9117) +++ XoopsModules/newbb/branches/alfred/newbb/include/form.post.php 2012-03-10 20:42:23 UTC (rev 9118) @@ -63,9 +63,9 @@ if (empty($post_parent_obj)) { $post_parent_obj =& $post_handler->get($pid); } - $form_title = _MD_REPLY . ": <a href=\"viewtopic.php?topic_id={$topic_id}&post_id={$pid}\" rel=\"external\">" . $post_parent_obj->getVar("subject") . "</a>"; + $form_title = _MD_REPLY . ": <a href=\"".XOOPS_URL."/modules/newbb/viewtopic.php?topic_id={$topic_id}&post_id={$pid}\" rel=\"external\">" . $post_parent_obj->getVar("subject") . "</a>"; } else { - $form_title = _EDIT . ": <a href=\"viewtopic.php?post_id={$post_id}\" rel=\"external\">" . $post_obj->getVar("subject") . "</a>"; + $form_title = _EDIT . ": <a href=\"".XOOPS_URL."/modules/newbb/viewtopic.php?post_id={$post_id}\" rel=\"external\">" . $post_obj->getVar("subject") . "</a>"; $editby = true; } $xoopsTpl->assign("form_title", $form_title); @@ -98,7 +98,7 @@ //$filname = XOOPS_URL.$_SERVER['REQUEST_URI']; -$forum_form = new XoopsThemeForm(htmlspecialchars(@$form_title), 'form_post', 'post.php', 'post', true); +$forum_form = new XoopsThemeForm(htmlspecialchars(@$form_title), 'form_post', XOOPS_URL.'/modules/newbb/post.php', 'post', true); $forum_form->setExtra('enctype="multipart/form-data"'); if ($editby) { @@ -320,9 +320,9 @@ $cancel_button = new XoopsFormButton('', 'cancel', _CANCEL, 'button'); if ( !empty($topic_id) ) { - $extra = "viewtopic.php?topic_id=" . intval($topic_id); + $extra = XOOPS_URL."/modules/newbb/viewtopic.php?topic_id=" . intval($topic_id); } else { - $extra = "viewforum.php?forum=" . $forum_obj->getVar('forum_id'); + $extra = XOOPS_URL."/modules/newbb/viewforum.php?forum=" . $forum_obj->getVar('forum_id'); } $cancel_button->setExtra("onclick='location=\"" . $extra . "\"'"); $cancel_button->setExtra("tabindex='6'"); Modified: XoopsModules/newbb/branches/alfred/newbb/include/functions.image.php =================================================================== --- XoopsModules/newbb/branches/alfred/newbb/include/functions.image.php 2012-03-10 15:07:40 UTC (rev 9117) +++ XoopsModules/newbb/branches/alfred/newbb/include/functions.image.php 2012-03-10 20:42:23 UTC (rev 9118) @@ -78,12 +78,12 @@ newbb_createThumbnail($source, $xoopsModuleConfig['max_image_width']); } } - if ($imginfo[0] > $xoopsModuleConfig['max_image_width']) { + if ($imginfo[0] > $xoopsModuleConfig['max_image_width'] || $imginfo[1] > $xoopsModuleConfig['max_image_height']) { $pseudo_width = $xoopsModuleConfig['max_image_width']; $pseudo_height = $xoopsModuleConfig['max_image_width']*($imginfo[1]/$imginfo[0]); $pseudo_size = "width='".$pseudo_width."px' height='".$pseudo_height."px'"; } - if ($xoopsModuleConfig['max_image_height']> 0 && $pseudo_height > $xoopsModuleConfig['max_image_height']) { + if ($xoopsModuleConfig['max_image_height'] > 0 && $pseudo_height > $xoopsModuleConfig['max_image_height']) { $pseudo_height = $xoopsModuleConfig['max_image_height']; $pseudo_width = $xoopsModuleConfig['max_image_height'] * ($imginfo[0]/$imginfo[1]); $pseudo_size = "width='".$pseudo_width."px' height='".$pseudo_height."px'"; Modified: XoopsModules/newbb/branches/alfred/newbb/include/search.inc.php =================================================================== --- XoopsModules/newbb/branches/alfred/newbb/include/search.inc.php 2012-03-10 15:07:40 UTC (rev 9117) +++ XoopsModules/newbb/branches/alfred/newbb/include/search.inc.php 2012-03-10 20:42:23 UTC (rev 9118) @@ -114,12 +114,12 @@ $users = array(); $i = 0; while($myrow = $xoopsDB->fetchArray($result)) { - $ret[$i]['link'] = "viewtopic.php?topic_id=".$myrow['topic_id']."&forum=".$myrow['forum_id']."&post_id=".$myrow['post_id']."#forumpost".$myrow['post_id']; + $ret[$i]['link'] = XOOPS_URL . "/modules/newbb/viewtopic.php?post_id=".$myrow['post_id']; $ret[$i]['title'] = $myrow['subject']; $ret[$i]['time'] = $myrow['post_time']; $ret[$i]['uid'] = $myrow['uid']; $ret[$i]['forum_name'] = $myts->htmlSpecialChars($myrow['forum_name']); - $ret[$i]['forum_link'] = "viewforum.php?forum=".$myrow['forum_id']; + $ret[$i]['forum_link'] = XOOPS_URL . "/modules/newbb/viewforum.php?forum=".$myrow['forum_id']; $users[$myrow['uid']] = 1; $ret[$i]['poster_name'] = $myrow['poster_name']; $i++; Modified: XoopsModules/newbb/branches/alfred/newbb/include/sitemap.plugin.php =================================================================== --- XoopsModules/newbb/branches/alfred/newbb/include/sitemap.plugin.php 2012-03-10 15:07:40 UTC (rev 9117) +++ XoopsModules/newbb/branches/alfred/newbb/include/sitemap.plugin.php 2012-03-10 20:42:23 UTC (rev 9118) @@ -67,7 +67,7 @@ $i = $cat_id; $sitemap['parent'][$i]['id'] = $cat_id; $sitemap['parent'][$i]['title'] = $category["cat_title"]; - $sitemap['parent'][$i]['url'] = "index.php?cat=".$cat_id; + $sitemap['parent'][$i]['url'] = XOOPS_URL."/modules/newbb/index.php?cat=".$cat_id; } foreach ( $forums as $id => $forum ) { $cid = $forum['cid']; Modified: XoopsModules/newbb/branches/alfred/newbb/index.php =================================================================== --- XoopsModules/newbb/branches/alfred/newbb/index.php 2012-03-10 15:07:40 UTC (rev 9117) +++ XoopsModules/newbb/branches/alfred/newbb/index.php 2012-03-10 20:42:23 UTC (rev 9118) @@ -184,9 +184,11 @@ 'forums' => $forums ); } + unset($categories, $forums_array, $forumsByCat); $xoopsTpl->assign_by_ref("category_icon", $category_icon); $xoopsTpl->assign_by_ref("categories", $category_array); +$xoopsTpl->assign("notifyicon", $category_icon); $xoopsTpl->assign(array( "index_title" => sprintf(_MD_WELCOME, htmlspecialchars($xoopsConfig['sitename'], ENT_QUOTES)), Modified: XoopsModules/newbb/branches/alfred/newbb/language/english/main.php =================================================================== --- XoopsModules/newbb/branches/alfred/newbb/language/english/main.php 2012-03-10 15:07:40 UTC (rev 9117) +++ XoopsModules/newbb/branches/alfred/newbb/language/english/main.php 2012-03-10 20:42:23 UTC (rev 9118) @@ -43,9 +43,9 @@ define('_MD_USER_LASTVISIT', 'Your last visit: %s'); define('_MD_USER_LASTPOST', 'Your last post: %s'); define('_MD_USER_NOLASTPOST', 'You have not posted yet'); -define('_MD_USER_TOPICS', 'Your Topics: '); -define('_MD_USER_POSTS', 'Posts: '); -define('_MD_USER_DIGESTS', 'Digests: '); +define('_MD_USER_TOPICS', 'Your Topics: %s'); +define('_MD_USER_POSTS', 'Posts: %s'); +define('_MD_USER_DIGESTS', 'Digests: %s'); define('_MD_VIEW_NEWPOSTS', 'View New Posts'); define('_MD_ADVSEARCH','Advanced Search'); define('_MD_POSTEDON','Posted on: '); @@ -476,4 +476,4 @@ define('_MD_SHARE_DIGG', "Digg"); define('_MD_SHARE_TECHNORATI', "Technorati"); define('_MD_SHARE_MRWONG', "Mr. Wong"); -define('_MD_USERINFO', "User Information"); \ No newline at end of file +?> \ No newline at end of file Modified: XoopsModules/newbb/branches/alfred/newbb/language/german/main.php =================================================================== --- XoopsModules/newbb/branches/alfred/newbb/language/german/main.php 2012-03-10 15:07:40 UTC (rev 9117) +++ XoopsModules/newbb/branches/alfred/newbb/language/german/main.php 2012-03-10 20:42:23 UTC (rev 9118) @@ -481,4 +481,4 @@ define('_MD_SHARE_DIGG', "Digg"); define('_MD_SHARE_TECHNORATI', "Technorati"); define('_MD_SHARE_MRWONG', "Mr. Wong"); -define('_MD_USERINFO', "Benutzerinformationen"); \ No newline at end of file +?> \ No newline at end of file Modified: XoopsModules/newbb/branches/alfred/newbb/newtopic.php =================================================================== --- XoopsModules/newbb/branches/alfred/newbb/newtopic.php 2012-03-10 15:07:40 UTC (rev 9117) +++ XoopsModules/newbb/branches/alfred/newbb/newtopic.php 2012-03-10 20:42:23 UTC (rev 9118) @@ -38,7 +38,7 @@ } $page_query = htmlspecialchars(implode("&", array_values($query_array))); unset($query_array); - redirect_header("viewforum.php?{$page_query}", 2, _MD_NORIGHTTOPOST); + redirect_header(XOOPS_URL."/modules/newbb/viewforum.php?{$page_query}", 2, _MD_NORIGHTTOPOST); exit(); } Modified: XoopsModules/newbb/branches/alfred/newbb/post.php =================================================================== --- XoopsModules/newbb/branches/alfred/newbb/post.php 2012-03-10 15:07:40 UTC (rev 9117) +++ XoopsModules/newbb/branches/alfred/newbb/post.php 2012-03-10 20:42:23 UTC (rev 9118) @@ -291,7 +291,7 @@ $topic_obj->setVar("topic_tags", @$_POST["topic_tags"]); } $topic_handler->insert($topic_obj); - + // Set read mark if (!empty($isnew)) { require_once XOOPS_ROOT_PATH . "/modules/newbb/include/functions.read.php"; @@ -382,6 +382,7 @@ $redirect = XOOPS_URL."/modules/newbb/viewforum.php?forum=" . $post_obj->getVar('forum_id'); $message = _MD_THANKSSUBMIT . "<br />" . _MD_WAITFORAPPROVAL . "<br />" . $error_upload; } + if ( $op == "add" ) { redirect_header(XOOPS_URL."/modules/newbb/polls.php?op=add&forum=" . $post_obj->getVar('forum_id') . "&topic_id=" . $post_obj->getVar('topic_id'), 1, _MD_ADDPOLL); exit(); Modified: XoopsModules/newbb/branches/alfred/newbb/seo_url.php =================================================================== --- XoopsModules/newbb/branches/alfred/newbb/seo_url.php 2012-03-10 15:07:40 UTC (rev 9117) +++ XoopsModules/newbb/branches/alfred/newbb/seo_url.php 2012-03-10 20:42:23 UTC (rev 9118) @@ -1,15 +1,15 @@ <?php defined('XOOPS_ROOT_PATH') or die('Restricted access'); -define('REAL_MODULE_NAME', 'modules/newbb'); //this is for normal Module -define('SEO_MODULE_NAME', 'modules/newbb'); //this is for rewrite-Hack +define('REAL_MODULE_NAME', 'modules/newbb'); //this is the Real Module directory +define('SEO_MODULE_NAME' , 'modules/newbb'); //this is SEO Name for rewrite Hack ob_start('seo_urls'); function seo_urls($s) { $XPS_URL = str_replace('/','\/', quotemeta(XOOPS_URL) ); - $module_name = str_replace('/','\/', quotemeta(REAL_MODULE_NAME)); + $module_name = str_replace('/','\/', quotemeta(SEO_MODULE_NAME)); $search = array( @@ -169,62 +169,75 @@ default: $req_string = $matches[6]; $add_to_url = $matches[5]; + //if ($add_to_url == '') $add_to_url ='index.php'; break; } if ($req_string == '?') { $req_string = ''; } - //$ret = '<'.$matches[1].$matches[2].$matches[3].'='.$matches[4].XOOPS_URL.'/modules/'.SEO_MODULE_NAME.'/'.$add_to_url.$req_string.$matches[7].$matches[8].'>'; - $ret = '<'.$matches[1].$matches[2].$matches[3].'='.$matches[4].XOOPS_URL.'/'.REAL_MODULE_NAME.'/'.$add_to_url.$req_string.$matches[7].$matches[8].'>'; + $ret = '<'.$matches[1].$matches[2].$matches[3].'='.$matches[4].XOOPS_URL.'/'.SEO_MODULE_NAME.'/'.$add_to_url.$req_string.$matches[7].$matches[8].'>'; + //$ret = '<'.$matches[1].$matches[2].$matches[3].'='.$matches[4].XOOPS_URL.'/'.REAL_MODULE_NAME.'/'.$add_to_url.$req_string.$matches[7].$matches[8].'>'; return $ret; } function forum_seo_cat($_cat_id) { - //$db =& Database::getInstance(); - $db = $GLOBALS['xoopsDB']; - $query = "SELECT cat_title FROM ". - $db->prefix('bb_categories'). - " WHERE cat_id = ".$_cat_id; - $result = $db->query($query); - $res = $db->fetchArray($result); - $ret = forum_seo_title($res['cat_title']); + xoops_load('XoopsCache'); + $key = "newbb_seo_cat"; + $ret = false; + if ( $ret = XoopsCache::read($key) ) { + $ret = @$ret[$_cat_id]; + if ($ret) return $ret; + } + $query = "SELECT cat_id, cat_title FROM ". $GLOBALS['xoopsDB']->prefix('bb_categories'); + $result = $GLOBALS['xoopsDB']->query($query); + $_ret = array(); + while ( $res = $GLOBALS['xoopsDB']->fetchArray($result) ) { + $_ret[$res['cat_id']] = forum_seo_title($res['cat_title']); + } + XoopsCache::write($key, $_ret); + $ret = XoopsCache::read($key); + $ret = $ret[$_cat_id]; return $ret; } function forum_seo_forum($_cat_id) { - //$db =& Database::getInstance(); - $db = $GLOBALS['xoopsDB']; - $query = "SELECT forum_name FROM ". - $db->prefix('bb_forums') . - " WHERE forum_id = ".$_cat_id; - $result = $db->query($query); - $res = $db->fetchArray($result); - $ret = forum_seo_title($res['forum_name']); + xoops_load('XoopsCache'); + $key = "newbb_seo_forum"; + $ret = false; + if ( $ret = XoopsCache::read($key) ) { + $ret = @$ret[$_cat_id]; + if ($ret) return $ret; + } + $query = "SELECT forum_id, forum_name FROM " . $GLOBALS['xoopsDB']->prefix('bb_forums') ; + $result = $GLOBALS['xoopsDB']->query($query); + $_ret = array(); + while ( $res = $GLOBALS['xoopsDB']->fetchArray($result) ) { + $_ret[$res['forum_id']] = forum_seo_title($res['forum_name']); + } + XoopsCache::write($key, $_ret); + $ret = XoopsCache::read($key); + $ret = $ret[$_cat_id]; return $ret; } function forum_seo_topic($_cat_id) { - //$db =& Database::getInstance(); - $db = $GLOBALS['xoopsDB']; $query = "SELECT topic_title FROM ". - $db->prefix('bb_topics') . + $GLOBALS['xoopsDB']->prefix('bb_topics') . " WHERE topic_id = ".$_cat_id; - $result = $db->query($query); - $res = $db->fetchArray($result); + $result = $GLOBALS['xoopsDB']->query($query); + $res = $GLOBALS['xoopsDB']->fetchArray($result); $ret = forum_seo_title($res['topic_title']); return $ret; } function forum_seo_post($_cat_id) { - //$db =& Database::getInstance(); - $db = $GLOBALS['xoopsDB']; $query = "SELECT subject FROM ". - $db->prefix('bb_posts') . + $GLOBALS['xoopsDB']->prefix('bb_posts') . " WHERE post_id = ".$_cat_id; - $result = $db->query($query); - $res = $db->fetchArray($result); + $result = $GLOBALS['xoopsDB']->query($query); + $res = $GLOBALS['xoopsDB']->fetchArray($result); $ret = forum_seo_title($res['subject']); return $ret; } Modified: XoopsModules/newbb/branches/alfred/newbb/templates/newbb_index.html =================================================================== --- XoopsModules/newbb/branches/alfred/newbb/templates/newbb_index.html 2012-03-10 15:07:40 UTC (rev 9117) +++ XoopsModules/newbb/branches/alfred/newbb/templates/newbb_index.html 2012-03-10 20:42:23 UTC (rev 9118) @@ -6,6 +6,7 @@ </div> </div> <div style="clear:both;"></div> +<{$subforum_display}> <{if $viewer_level gt 1}> <br /> <div class="forum_stats"> @@ -33,6 +34,7 @@ </div> <br style="clear: both;" /> <br /> + <!-- start forum categories --> <div class="index_category"> <!-- start forum categories --> @@ -74,14 +76,13 @@ <{/if}> <!-- start forums --> - <{if $subforum_display == "expand"}> <{foreachq item=forum from=$category.forums}> <tr> <td width="5%" class="even" align="center" valign="middle"><{$forum.forum_folder}></td> <td colspan="2" class="odd"> <div id="index_forum"> - <span class="item"><a href="<{$forum.topic_link}>"><{$forum.forum_name}></a> + <span class="item"><a href="<{$xoops_url}>/modules/<{$xoops_dirname}>/viewforum.php?forum=<{$forum.forum_id}>"><{$forum.forum_name}></a> <{if $rss_enable}> (<a href="<{$xoops_url}>/modules/<{$xoops_dirname}>/rss.php?f=<{$forum.forum_id}>" target="_blank" title="RSS feed">RSS</a>) <{/if}> @@ -114,185 +115,184 @@ </td> </tr> -<{if $forum.subforum}> - <tr class="head" > - <td width="5%"> </td> - <td width="5%" align="center"><{$img_subforum}> </td> - <td width="32%" align="center"><{$smarty.const._MD_SUBFORUMS}> </td> - <td width="9%" nowrap="nowrap"> </td> - <td width="9%" nowrap="nowrap"> </td> - <td width="40%" nowrap="nowrap"> </td> - </tr> -<{foreachq item=subforum from=$forum.subforum}> - <tr> - <td class="odd" width="5%"> </td> - <td class="even" align="center" valign="middle" width="5%"><{$subforum.forum_folder}></td> - <td width="32%" class="odd"> - <div id="index_forum"> - <span class="item"><a href="<{$xoops_url}>/modules/<{$xoops_dirname}>/viewforum.php?forum=<{$subforum.forum_id}>"><strong><{$subforum.forum_name}></strong></a> - <{if $rss_enable}> - (<a href="<{$xoops_url}>/modules/<{$xoops_dirname}>/rss.php?f=<{$subforum.forum_id}>" target="_blank" title="RSS feed">RSS</a>) - <{/if}> - <br /><{$subforum.forum_desc}> - </span> - <{if $subforum.forum_moderators}> - <span class="extra"> - <{$smarty.const._MD_MODERATOR}>: <{$subforum.forum_moderators}> - </span> - <{/if}> - </div> - </td> - <td class="even" width="9%" align="center" valign="middle"> - <{if $stats[$subforum.forum_id].topic.day}><strong><{$stats[$subforum.forum_id].topic.day}></strong>/<{/if}> - <{$subforum.forum_topics}> - </td> - <td class="odd" width="9%" align="center" valign="middle"> - <{if $stats[$subforum.forum_id].post.day}><strong><{$stats[$subforum.forum_id].post.day}></strong>/<{/if}> - <{$subforum.forum_posts}> - </td> - <td class="even" width="40%" align="right" valign="middle"> - <{if $subforum.forum_lastpost_subject}> - <{$subforum.forum_lastpost_time}> <{$smarty.const._MD_BY}> <{$subforum.forum_lastpost_user}><br /> - <a href="<{$xoops_url}>/modules/<{$xoops_dirname}>/viewtopic.php?post_id=<{$subforum.forum_lastpost_id}>"> - <{$subforum.forum_lastpost_subject}> <img src="<{$xoops_url}>/modules/<{$xoops_dirname}>/templates/images/icon/<{$forum.forum_lastpost_icon}>" alt="<{$smarty.const._MD_NEWBB_GOTOLASTPOST}>" title="<{$smarty.const._MD_NEWBB_GOTOLASTPOST}>" /> - </a> - <{else}> - <{$smarty.const._AM_NEWBB_NOTOPIC}> - <{/if}> - </td> - </tr> -<{/foreach}> -<{/if}> -<{/foreach}> + <{if $forum.subforum}> + <tr class="head" > + <td width="5%"> </td> + <td width="5%" align="center"><{$img_subforum}> </td> + <td width="32%" align="center"><{$smarty.const._MD_SUBFORUMS}> </td> + <td width="9%" nowrap="nowrap"> </td> + <td width="9%" nowrap="nowrap"> </td> + <td width="40%" nowrap="nowrap"> </td> + </tr> + <{foreachq item=subforum from=$forum.subforum}> + <tr> + <td class="odd" width="5%"> </td> + <td class="even" align="center" valign="middle" width="5%"><{$subforum.forum_folder}></td> + <td width="32%" class="odd"> + <div id="index_forum"> + <span class="item"><a href="<{$xoops_url}>/modules/<{$xoops_dirname}>/viewforum.php?forum=<{$subforum.forum_id}>"><strong><{$subforum.forum_name}></strong></a> + <{if $rss_enable}> + (<a href="<{$xoops_url}>/modules/<{$xoops_dirname}>/rss.php?f=<{$subforum.forum_id}>" target="_blank" title="RSS feed">RSS</a>) + <{/if}> + <br /><{$subforum.forum_desc}> + </span> + <{if $subforum.forum_moderators}> + <span class="extra"> + <{$smarty.const._MD_MODERATOR}>: <{$subforum.forum_moderators}> + </span> + <{/if}> + </div> + </td> + <td class="even" width="9%" align="center" valign="middle"> + <{if $stats[$subforum.forum_id].topic.day}><strong><{$stats[$subforum.forum_id].topic.day}></strong>/<{/if}> + <{$subforum.forum_topics}> + </td> + <td class="odd" width="9%" align="center" valign="middle"> + <{if $stats[$subforum.forum_id].post.day}><strong><{$stats[$subforum.forum_id].post.day}></strong>/<{/if}> + <{$subforum.forum_posts}> + </td> + <td class="even" width="40%" align="right" valign="middle"> + <{if $subforum.forum_lastpost_subject}> + <{$subforum.forum_lastpost_time}> <{$smarty.const._MD_BY}> <{$subforum.forum_lastpost_user}><br /> + <a href="<{$xoops_url}>/modules/<{$xoops_dirname}>/viewtopic.php?post_id=<{$subforum.forum_lastpost_id}>"> + <{$subforum.forum_lastpost_subject}> <img src="<{$xoops_url}>/modules/<{$xoops_dirname}>/templates/images/icon/<{$subforum.forum_lastpost_icon}>" alt="<{$smarty.const._MD_NEWBB_GOTOLASTPOST}>" title="<{$smarty.const._MD_NEWBB_GOTOLASTPOST}>" /> + </a> + <{else}> + <{$smarty.const._AM_NEWBB_NOTOPIC}> + <{/if}> + </td> + </tr> + <{/foreach}> + <{/if}> + <{/foreach}> -<{elseif $subforum_display == "collapse"}> + <{elseif $subforum_display == "collapse"}> -<{foreachq item=forum from=$category.forums}> - <tr> - <{if $forum.subforum}> - <td class="even" rowspan="2" align="center" valign="middle"><{$forum.forum_folder}></td> - <{else}> - <td class="even" align="center" valign="middle"><{$forum.forum_folder}></td> - <{/if}> - <td class="odd"> - <div id="index_forum"> - <span class="item"><a href="<{$xoops_url}>/modules/<{$xoops_dirname}>/viewforum.php?forum=<{$forum.forum_id}>"><{$forum.forum_name}></a> - <{if $rss_enable}> - (<a href="<{$xoops_url}>/modules/<{$xoops_dirname}>/rss.php?f=<{$forum.forum_id}>" target="_blank" title="RSS feed">RSS</a>) - <{/if}> - <br /><{$forum.forum_desc}> - </span> - <{if $forum.forum_moderators}> - <span class="extra"> - <{$smarty.const._MD_MODERATOR}>: <{$forum.forum_moderators}> - </span> - <{/if}> - </div> - </td> - <td class="even" align="center" valign="middle"> - <{if $stats[$forum.forum_id].topic.day}><strong><{$stats[$forum.forum_id].topic.day}></strong>/<{/if}> - <{$forum.forum_topics}> - </td> - <td class="odd" align="center" valign="middle"> - <{if $stats[$forum.forum_id].post.day}><strong><{$stats[$forum.forum_id].post.day}></strong>/<{/if}> - <{$forum.forum_posts}> - </td> - <td class="even" align="right" valign="middle"> - <{if $forum.forum_lastpost_subject}> - <{$forum.forum_lastpost_time}> <{$smarty.const._MD_BY}> <{$forum.forum_lastpost_user}><br /> - <a href="<{$xoops_url}>/modules/<{$xoops_dirname}>/viewtopic.php?post_id=<{$forum.forum_lastpost_id}>"> - <{$forum.forum_lastpost_subject}> <img src="<{$xoops_url}>/modules/<{$xoops_dirname}>/templates/images/icon/<{$forum.forum_lastpost_icon}>" alt="<{$smarty.const._MD_NEWBB_GOTOLASTPOST}>" title="<{$smarty.const._MD_NEWBB_GOTOLASTPOST}>" /> - </a> - <{else}> - <{$smarty.const._AM_NEWBB_NOTOPIC}> - <{/if}> - </td> - </tr> + <{foreachq item=forum from=$category.forums}> + <tr> + <{if $forum.subforum}> + <td class="even" rowspan="2" align="center" valign="middle"><{$forum.forum_folder}></td> + <{else}> + <td class="even" align="center" valign="middle"><{$forum.forum_folder}></td> + <{/if}> + <td class="odd"> + <div id="index_forum"> + <span class="item"><a href="<{$xoops_url}>/modules/<{$xoops_dirname}>/viewforum.php?forum=<{$forum.forum_id}>"><{$forum.forum_name}></a> + <{if $rss_enable}> + (<a href="<{$xoops_url}>/modules/<{$xoops_dirname}>/rss.php?f=<{$forum.forum_id}>" target="_blank" title="RSS feed">RSS</a>) + <{/if}> + <br /><{$forum.forum_desc}> + </span> + <{if $forum.forum_moderators}> + <span class="extra"> + <{$smarty.const._MD_MODERATOR}>: <{$forum.forum_moderators}> + </span> + <{/if}> + </div> + </td> + <td class="even" align="center" valign="middle"> + <{if $stats[$forum.forum_id].topic.day}><strong><{$stats[$forum.forum_id].topic.day}></strong>/<{/if}> + <{$forum.forum_topics}> + </td> + <td class="odd" align="center" valign="middle"> + <{if $stats[$forum.forum_id].post.day}><strong><{$stats[$forum.forum_id].post.day}></strong>/<{/if}> + <{$forum.forum_posts}> + </td> + <td class="even" align="right" valign="middle"> + <{if $forum.forum_lastpost_subject}> + <{$forum.forum_lastpost_time}> <{$smarty.const._MD_BY}> <{$forum.forum_lastpost_user}><br /> + <a href="<{$xoops_url}>/modules/<{$xoops_dirname}>/viewtopic.php?post_id=<{$forum.forum_lastpost_id}>"> + <{$forum.forum_lastpost_subject}> <img src="<{$xoops_url}>/modules/<{$xoops_dirname}>/templates/images/icon/<{$forum.forum_lastpost_icon}>" alt="<{$smarty.const._MD_NEWBB_GOTOLASTPOST}>" title="<{$smarty.const._MD_NEWBB_GOTOLASTPOST}>" /> + </a> + <{else}> + <{$smarty.const._AM_NEWBB_NOTOPIC}> + <{/if}> + </td> + </tr> - <{if $forum.subforum}> - <tr> - <td class="odd" colspan="4" align="left"><{$smarty.const._MD_SUBFORUMS}> <{$img_subforum}> - <{foreachq item=subforum from=$forum.subforum}> - [<a href="viewforum.php?forum=<{$subforum.forum_id}>"><{$subforum.forum_name}></a>] - <{/foreach}> - </td> - </tr> - <{/if}> -<{/foreach}> + <{if $forum.subforum}> + <tr> + <td class="odd" colspan="4" align="left"><{$smarty.const._MD_SUBFORUMS}> <{$img_subforum}> + <{foreachq item=subforum from=$forum.subforum}> + [<a href="<{$xoops_url}>/modules/<{$xoops_dirname}>/viewforum.php?forum=<{$subforum.forum_id}>"><{$subforum.forum_name}></a>] + <{/foreach}> + </td> + </tr> + <{/if}> + <{/foreach}> -<{else}> + <{else}> -<{foreachq item=forum from=$category.forums}> - <tr> - <td class="even" align="center" valign="middle"><{$forum.forum_folder}></td> - <td class="odd"> - <div id="index_forum"> - <span class="item"><a href="<{$xoops_url}>/modules/<{$xoops_dirname}>/viewforum.php?forum=<{$forum.forum_id}>"><{$forum.forum_name}></a> - <{if $rss_enable}> - (<a href="<{$xoops_url}>/modules/<{$xoops_dirname}>/rss.php?f=<{$forum.forum_id}>" target="_blank" title="RSS feed">RSS</a>) - <{/if}> - <br /><{$forum.forum_desc}> - </span> - <{if $forum.forum_moderators}> - <span class="extra"> - <{$smarty.const._MD_MODERATOR}>: <{$forum.forum_moderators}> - </span> - <{/if}> - </div> - </td> - <td class="even" align="center" valign="middle"> - <{if $stats[$forum.forum_id].topic.day}><strong><{$stats[$forum.forum_id].topic.day}></strong>/<{/if}> - <{$forum.forum_topics}> - </td> - <td class="odd" align="center" valign="middle"> - <{if $stats[$forum.forum_id].post.day}><strong><{$stats[$forum.forum_id].post.day}></strong>/<{/if}> - <{$forum.forum_posts}> - </td> - <td class="even" align="right" valign="middle"> - <{if $forum.forum_lastpost_subject}> - <{$forum.forum_lastpost_time}> <{$smarty.const._MD_BY}> <{$forum.forum_lastpost_user}><br /> - <a href="<{$xoops_url}>/modules/<{$xoops_dirname}>/viewtopic.php?post_id=<{$forum.forum_lastpost_id}>"> - <{$forum.forum_lastpost_subject}> <img src="<{$xoops_url}>/modules/<{$xoops_dirname}>/templates/images/icon/<{$forum.forum_lastpost_icon}>" alt="<{$smarty.const._MD_NEWBB_GOTOLASTPOST}>" title="<{$smarty.const._MD_NEWBB_GOTOLASTPOST}>" /> - </a> - <{else}> - <{$smarty.const._AM_NEWBB_NOTOPIC}> - <{/if}> - </td> - </tr> -<{/foreach}> + <{foreachq item=forum from=$category.forums}> + <tr> + <td class="even" align="center" valign="middle"><{$forum.forum_folder}></td> + <td class="odd"> + <div id="index_forum"> + <span class="item"><a href="<{$xoops_url}>/modules/<{$xoops_dirname}>/viewforum.php?forum=<{$forum.forum_id}>"><{$forum.forum_name}></a> + <{if $rss_enable}> + (<a href="<{$xoops_url}>/modules/<{$xoops_dirname}>/rss.php?f=<{$forum.forum_id}>" target="_blank" title="RSS feed">RSS</a>) + <{/if}> + <br /><{$forum.forum_desc}> + </span> + <{if $forum.forum_moderators}> + <span class="extra"> + <{$smarty.const._MD_MODERATOR}>: <{$forum.forum_moderators}> + </span> + <{/if}> + </div> + </td> + <td class="even" align="center" valign="middle"> + <{if $stats[$forum.forum_id].topic.day}><strong><{$stats[$forum.forum_id].topic.day}></strong>/<{/if}> + <{$forum.forum_topics}> + </td> + <td class="odd" align="center" valign="middle"> + <{if $stats[$forum.forum_id].post.day}><strong><{$stats[$forum.forum_id].post.day}></strong>/<{/if}> + <{$forum.forum_posts}> + </td> + <td class="even" align="right" valign="middle"> + <{if $forum.forum_lastpost_subject}> + <{$forum.forum_lastpost_time}> <{$smarty.const._MD_BY}> <{$forum.forum_lastpost_user}><br /> + <a href="<{$xoops_url}>/modules/<{$xoops_dirname}>/viewtopic.php?post_id=<{$forum.forum_lastpost_id}>"> + <{$forum.forum_lastpost_subject}> <img src="<{$xoops_url}>/modules/<{$xoops_dirname}>/templates/images/icon/<{$forum.forum_lastpost_icon}>" alt="<{$smarty.const._MD_NEWBB_GOTOLASTPOST}>" title="<{$smarty.const._MD_NEWBB_GOTOLASTPOST}>" /> + </a> + <{else}> + <{$smarty.const._AM_NEWBB_NOTOPIC}> + <{/if}> + </td> + </tr> + <{/foreach}> -<{/if}> - <!-- end forums --> -</table> -<br /> -</div> -<{/foreach}> -<!-- end forum categories --> -<div> - <div style="float: left; text-align: left;"> - <{$img_forum_new}> = <{$smarty.const._MD_NEWPOSTS}><br /> - <{$img_forum}> = <{$smarty.const._MD_NONEWPOSTS}><br /> - </div> - <div style="float: right; text-align: right;"> - <form action="<{$xoops_url}>/modules/<{$xoops_dirname}>/search.php" method="post" name="search" id="search"> - <input name="term" id="term" type="text" size="20" /> - <input type="hidden" name="forum" id="forum" value="all" /> - <input type="hidden" name="sortby" id="sortby" value="p.post_time desc" /> - <input type="hidden" name="searchin" id="searchin" value="both" /> - <input type="submit" name="submit" id="submit" value="<{$smarty.const._MD_SEARCH}>" /> + <{/if}> + <!-- end forums --> + </table> <br /> - [ <a href="<{$xoops_url}>/modules/<{$xoops_dirname}>/search.php"><{$smarty.const._MD_ADVSEARCH}></a> ] - </form> - <{if $rss_button}> - <br /> - <a href="<{$xoops_url}>/modules/<{$xoops_dirname}>/rss.php?c=<{$viewcat}>" target="_blank" title="RSS FEED"> - <{$rss_button}> - </a> - <br /><font size="0.7em;"><a href="http://www.simple-xoops.de">NewBB Version <{$version/100}></a></font> - <br /> - <{/if}> - </div> + </div> + <{/foreach}> + <!-- end forum categories --> +<div> +<div style="float: left; text-align: left;"> + <{$img_forum_new}> = <{$smarty.const._MD_NEWPOSTS}><br /> + <{$img_forum}> = <{$smarty.const._MD_NONEWPOSTS}><br /> </div> +<div style="float: right; text-align: right;"> + <form action="<{$xoops_url}>/modules/<{$xoops_dirname}>/search.php" method="post" name="search" id="search"> + <input name="term" id="term" type="text" size="20" /> + <input type="hidden" name="forum" id="forum" value="all" /> + <input type="hidden" name="sortby" id="sortby" value="p.post_time desc" /> + <input type="hidden" name="searchin" id="searchin" value="both" /> + <input type="submit" name="submit" id="submit" value="<{$smarty.const._MD_SEARCH}>" /> + <br /> + [ <a href="<{$xoops_url}>/modules/<{$xoops_dirname}>/search.php"><{$smarty.const._MD_ADVSEARCH}></a> ] + </form> + <{if $rss_button}> + <br /> + <a href="<{$xoops_url}>/modules/<{$xoops_dirname}>/rss.php?c=<{$viewcat}>" target="_blank" title="RSS FEED"> + <{$rss_button}> + </a> + <br /><font size="0.7em;"><a href="http://www.simple-xoops.de">NewBB Version <{$version/100}></a></font> + <br /> + <{/if}> +</div> <br style="clear: both;" /> <{if $currenttime}> <div> @@ -301,7 +301,6 @@ <strong><{$smarty.const._MD_NEWBB_STATS}></strong> </div> <div class="forum_stats odd" style="padding: 5px; line-height: 150%;"> - <!-- <div class="odd" style="padding: 5px; line-height: 150%;"> //--> <div class="forum_stats_left odd"> <{$currenttime}><br /> <{$smarty.const._MD_TOTALTOPICSC}> @@ -316,7 +315,6 @@ <{/if}> </div> <div class="forum_stats_right odd"> - <!-- <div style="align :right; float: right; width: 48%">//--> <a href="<{$xoops_url}>/modules/<{$xoops_dirname}>/viewpost.php?status=new" title="<{$smarty.const._MD_VIEW_NEWPOSTS}>"><{$smarty.const._MD_VIEW_NEWPOSTS}></a><br /> <{$smarty.const._MD_TODAYTOPICSC}><strong><{$stats[0].topic.day|default:0}></strong> | <{$smarty.const._MD_TODAYPOSTSC}><strong><{$stats[0].post.day|default:0}></strong> Modified: XoopsModules/newbb/branches/alfred/newbb/templates/newbb_notification_select.html =================================================================== --- XoopsModules/newbb/branches/alfred/newbb/templates/newbb_notification_select.html 2012-03-10 15:07:40 UTC (rev 9117) +++ XoopsModules/newbb/branches/alfred/newbb/templates/newbb_notification_select.html 2012-03-10 20:42:23 UTC (rev 9118) @@ -3,8 +3,10 @@ <h4 class="txtcenter"><{$lang_activenotifications}></h4> <input type="hidden" name="not_redirect" value="<{$xoops_url}><{$xoops_notification.redirect_script}>" /> <input type="hidden" name="XOOPS_TOKEN_REQUEST" value="<{php}>echo $GLOBALS['xoopsSecurity']->createToken();<{/php}>" /> - <table class="outer"> - <tr><th colspan="3"><{$lang_notificationoptions}></th></tr> + <table class="outer"> + <tr> + <th colspan="3"><{$lang_notificationoptions}></th> + </tr> <tr> <td class="head"><{$lang_category}></td> <td class="head"><input name="allbox" id="allbox" onclick="xoopsCheckAll('notification_select','allbox');" type="checkbox" value="<{$lang_checkall}>" /></td> Modified: XoopsModules/newbb/branches/alfred/newbb/templates/newbb_thread.html =================================================================== --- XoopsModules/newbb/branches/alfred/newbb/templates/newbb_thread.html 2012-03-10 15:07:40 UTC (rev 9117) +++ XoopsModules/newbb/branches/alfred/newbb/templates/newbb_thread.html 2012-03-10 20:42:23 UTC (rev 9118) @@ -14,125 +14,123 @@ </div> </th> </tr> - <tr> - <{if $topic_post.poster.uid gt -1}> - <td width="20%" class="odd" rowspan="2" valign="top"> - <{if $topic_post.poster.uid != 0}> - <div class="comUserRankText"><{$topic_post.poster.rank.title}><br /><{$topic_post.poster.rank.image}></div> - <{if $topic_post.poster.avatar != "blank.gif"}> - <br /><img class="comUserImg" src="<{$xoops_upload_url}>/<{$topic_post.poster.avatar}>" alt="" /> + <tr> + <{if $topic_post.poster.uid gt -1}> + <td width="20%" class="odd" rowspan="2" valign="top"> + <{if $topic_post.poster.uid != 0}> + <div class="comUserRankText"><{$topic_post.poster.rank.title}><br /><{$topic_post.poster.rank.image}></div> + <{if $topic_post.poster.avatar != "blank.gif"}> + <br /><img class="comUserImg" src="<{$xoops_upload_url}>/<{$topic_post.poster.avatar}>" alt="" /> + <{else}> + <br /><img class="comUserImg" src="<{$xoops_url}>/modules/<{$xoops_dirname}>/templates/images/icon/anonym.png" alt="" /> + <{/if}> + <br /> + <{if $infobox gt 0}> + <div> + <img style="padding:2px;" onclick="ToggleBlockCategory('<{$topic_post.post_id}>', this, '<{$xoops_url}>/modules/<{$xoops_dirname}>/templates/images/icon/more.png', '<{$xoops_url}>/modules/<{$xoops_dirname}>/templates/images/icon/more.png')" src="<{$icon_path}>/more.png" alt="Benutzerinformationen" title="Benutzerinformationen" /> + </div> + <div id="<{$topic_post.post_id}>" + <{if $infobox == 1}> style="display: none;" + <{else}> style="display:block;" + <{/if}> + > + <div class="comUserStat"><span class="comUserStatCaption"><{$smarty.const._MD_JOINED}>:</span><br /><{$topic_post.poster.regdate}></div> + <{if $topic_post.poster.from}> + <div class="comUserStat"><span class="comUserStatCaption"><{$smarty.const._MD_FROM}></span> <{$topic_post.poster.from}></div> + <{/if}> + <{if $topic_post.poster.groups}> + <div class="comUserStat"> <span class="comUserStatCaption"><{$smarty.const._MD_GROUP}></span> + <{foreachq item=group from=$topic_post.poster.groups}> <br /><{$group}><{/foreach}> + </div> + <{/if}> + <div class="comUserStat"> + <span class="comUserStatCaption"><{$smarty.const._MD_POSTS}>:</span> + <{if $topic_post.poster.posts gt 0}> + <a href="<{$xoops_url}>/modules/<{$xoops_dirname}>/viewpost.php?uid=<{$topic_post.poster.uid}>" title="<{$smarty.const._ALL}>" target="_self"><{$topic_post.poster.posts}></a> + <{else}> + 0 + <{/if}> + <{if $topic_post.poster.digests gt 0}> + | <span class="comUserStatCaption"><{$smarty.const._MD_DIGESTS}>:</span> <{$topic_post.poster.digests}> + <{/if}> + </div> + <{if $topic_post.poster.level}> + <div class="comUserStat" align="left"><{$topic_post.poster.level}></div> + <{/if}> + <{if $topic_post.poster.status}> + <div class="comUserStatus"><{$topic_post.poster.status}></div> + <{/if}> + </div> + <{/if}> + <{else}> + <div class="comUserRankText"><{$anonymous_prefix}><{$topic_post.poster.name}></div> + <{/if}> + </td> + + <td colspan="2" class="even"> <{else}> - <br /><img class="comUserImg" src="<{$xoops_url}>/modules/<{$xoops_dirname}>/templates/images/icon/anonym.png" alt="" /> + <td colspan="3" class="even"> <{/if}> - <br /> - <{if $infobox gt 0}> - <div> - <img style="padding:2px;" onclick="ToggleBlockCategory('<{$topic_post.post_id}>', this, '<{$xoops_url}>/modules/<{$xoops_dirname}>/templates/images/icon/more.png', '<{$xoops_url}>/modules/<{$xoops_dirname}>/templates/images/icon/more.png')" src="<{$icon_path}>/more.png" alt="<{$smarty.const._MD_USERINFO}>" title="<{$smarty.const._MD_USERINFO}>" /> - </div> - <div id="<{$topic_post.post_id}>" - <{if $infobox == 1}> - style="display: none;" - <{else}> - style="display:block;" - <{/if}> - > - <div class="comUserStat"><span class="comUserStatCaption"><{$smarty.const._MD_JOINED}>:</span><br /><{$topic_post.poster.regdate}></div> - <{if $topic_post.poster.from}> - <div class="comUserStat"><span class="comUserStatCaption"><{$smarty.const._MD_FROM}></span> <{$topic_post.poster.from}></div> - <{/if}> - <{if $topic_post.poster.groups}> - <div class="comUserStat"> <span class="comUserStatCaption"><{$smarty.const._MD_GROUP}></span> - <{foreachq item=group from=$topic_post.poster.groups}> <br /><{$group}><{/foreach}> - </div> - <{/if}> - <div class="comUserStat"> - <span class="comUserStatCaption"><{$smarty.const._MD_POSTS}>:</span> - <{if $topic_post.poster.posts gt 0}> - <a href="<{$xoops_url}>/modules/<{$xoops_dirname}>/viewpost.php?uid=<{$topic_post.poster.uid}>" title="<{$smarty.const._ALL}>" target="_self"><{$topic_post.poster.posts}></a> - <{else}> - 0 - <{/if}> - <{if $topic_post.poster.digests gt 0}> - | <span class="comUserStatCaption"><{$smarty.const._MD_DIGESTS}>:</span> <{$topic_post.poster.digests}> - <{/if}> + <div class="comText"><{$topic_post.post_text}></div> + <{if $topic_post.post_attachment}> + <div class="comText"><{$topic_post.post_attachment}></div> + <{/if}> + <div class="clear"></div> + <br /> + <div style="float: right; padding: 5px; margin-top: 10px;"> + <{if $topic_post.poster_ip}> + IP: <a href="http://www.whois.sc/<{$topic_post.poster_ip}>" target="_blank"><{$topic_post.poster_ip}></a> | + <{/if}> + <{if $topic_post.poster.uid gt 0}> + <{$smarty.const._MD_POSTEDON}><{$topic_post.post_date}></div> + <{/if}> + <{if $topic_post.post_edit}> + <div class="clear"></div> + <br /> + <div style="float: right; padding: 5px; margin-top: 10px; border:1px solid #000;"> + <small><{$topic_post.post_edit}></small> </div> - <{if $topic_post.poster.level}> - <div class="comUserStat" align="left"><{$topic_post.poster.level}></div> - <{/if}> - <{if $topic_post.poster.status}> - <div class="comUserStatus"><{$topic_post.poster.status}></div> - <{/if}> + <{/if}> + </td> + </tr> + + <tr> + <{if $topic_post.poster.uid gt -1}> + <td colspan="2" class="odd" valign="bottom"> + <{else}> + <td colspan="3" class="odd" valign="bottom"> + <{/if}> + <{if $topic_post.post_signature}> + <div class="signature"> + ____________________<br /> + <{$topic_post.post_signature}> </div> <{/if}> - <{else}> - <div class="comUserRankText"><{$anonymous_prefix}><{$topic_post.poster.name}></div> - <{/if}> - </td> + </td> + </tr> - <td colspan="2" class="even"> - <{else}> - <td colspan="3" class="even"> - <{/if}> - <div class="comText"><{$topic_post.post_text}></div> - <{if $topic_post.post_attachment}> - <div class="comText"><{$topic_post.post_attachment}></div> - <{/if}> - <div class="clear"></div> - <br /> - <div style="float: right; padding: 5px; margin-top: 10px;"> - <{if $topic_post.poster_ip}> - IP: <a href="http://www.whois.sc/<{$topic_post.poster_ip}>" target="_blank"><{$topic_post.poster_ip}></a> | - <{/if}> - <{if $topic_post.poster.uid gt 0}> - <{$smarty.const._MD_POSTEDON}><{$topic_post.post_date}></div> - <{/if}> - <{if $topic_post.post_edit}> - <div class="clear"></div> - <br /> - <div style="float: right; padding: 5px; margin-top: 10px; border:1px solid #000;"> - <small><{$topic_post.post_edit}></small> - </div> - <{/if}> - </td> - </tr> - - <tr> - <{if $topic_post.poster.uid gt -1}> - <td colspan="2" class="odd" valign="bottom"> - <{else}> - <td colspan="3" class="odd" valign="bottom"> - <{/if}> - <{if $topic_post.post_signature}> - <div class="signature"> - _________________<br /> - <{$topic_post.post_signature}> - </div> - <{/if}> - </td> - </tr> - - <tr> - <td colspan="3" class="foot"> - <table style="border: 0; padding: 0; margin: 0"> - <tr> - <td style="text-align:left;"> - <{foreachq item=btn from=$topic_post.thread_action}> - <a href="<{$btn.link}>&post_id=<{$topic_post.post_id}>" title="<{$btn.name}>" <{if $btn.target}>target="<{$btn.target}>"<{/if}>> <{$btn.image}></a> - <{/foreach}> - </td> - <td style="text-align: right;"> - <{if $mode gt 1}> - <a href="<{$xoops_url}>/modules/<{$xoops_dirname}>/action.post.php?post_id=<{$topic_post.post_id}>&op=split&mode=1" target="_self" title="<{$smarty.const._MD_SPLIT_ONE}>"><{$smarty.const._MD_SPLIT_ONE}></a> | - <a href="<{$xoops_url}>/modules/<{$xoops_dirname}>/action.post.php?post_id=<{$topic_post.post_id}>&op=split&mode=2" target="_self" title="<{$smarty.const._MD_SPLIT_TREE}>"><{$smarty.const._MD_SPLIT_TREE}></a> | - <a href="<{$xoops_url}>/modules/<{$xoops_dirname}>/action.post.php?post_id=<{$topic_post.post_id}>&op=split&mode=3" target="_self" title="<{$smarty.const._MD_SPLIT_ALL}>"><{$smarty.const._MD_SPLIT_ALL}></a> | - <input type="checkbox" name="post_id[]" id="post_id[<{$topic_post.post_id}>]" value="<{$topic_post.post_id}>" /> - <{else}> - <{foreachq item=btn from=$topic_post.thread_buttons}> <a href="<{$btn.link}>&post_id=<{$topic_post.post_id}>" title="<{$btn.name}>"> <{$btn.image}></a> <{/foreach}> - <{/if}> - <a href="#threadtop" title="<{$smarty.const._MD_TOP}>"> <{$p_up}></a> - </td> - </tr> - </table> - </td> - </tr> + <tr> + <td colspan="3" class="foot"> + <table style="border: 0; padding: 0; margin: 0"> + <tr> + <td style="text-align:left;"> + <{foreachq item=btn from=$topic_post.thread_action}> + <a href="<{$btn.link}>&post_id=<{$topic_post.post_id}>" title="<{$btn.name}>" <{if $btn.target}>target="<{$btn.target}>"<{/if}>> <{$btn.image}></a> + <{/foreach}> + </td> + <td style="text-align: right;"> + <{if $mode gt 1}> + <a href="<{$xoops_url}>/modules/<{$xoops_dirname}>/action.post.php?post_id=<{$topic_post.post_id}>&op=split&mode=1" target="_self" title="<{$smarty.const._MD_SPLIT_ONE}>"><{$smarty.const._MD_SPLIT_ONE}></a> | + <a href="<{$xoops_url}>/modules/<{$xoops_dirname}>/action.post.php?post_id=<{$topic_post.post_id}>&op=split&mode=2" target="_self" title="<{$smarty.const._MD_SPLIT_TREE}>"><{$smarty.const._MD_SPLIT_TREE}></a> | + <a href="<{$xoops_url}>/modules/<{$xoops_dirname}>/action.post.php?post_id=<{$topic_post.post_id}>&op=split&mode=3" target="_self" title="<{$smarty.const._MD_SPLIT_ALL}>"><{$smarty.const._MD_SPLIT_ALL}></a> | + <input type="checkbox" name="post_id[]" id="post_id[<{$topic_post.post_id}>]" value="<{$topic_post.post_id}>" /> + <{else}> + <{foreachq item=btn from=$topic_post.thread_buttons}> <a href="<{$btn.link}>&post_id=<{$topic_post.post_id}>" title="<{$btn.name}>"> <{$btn.image}></a> <{/foreach}> + <{/if}> + <a href="#threadtop" title="<{$smarty.const._MD_TOP}>"> <{$p_up}></a> + </td> + </tr> + </table> + </td> + </tr> </table> \ No newline at end of file Modified: XoopsModules/newbb/branches/alfred/newbb/templates/newbb_viewforum.html =================================================================== --- XoopsModules/newbb/branches/alfred/newbb/templates/newbb_viewforum.html 2012-03-10 15:07:40 UTC (rev 9117) +++ XoopsModules/newbb/branches/alfred/newbb/templates/newbb_viewforum.html 2012-03-10 20:42:23 UTC (rev 9118) @@ -29,13 +29,13 @@ <{/if}> <{if $mode gt 1}> -<form name="form_topics_admin" action="<{$xoops_url}>/modules/<{$xoops_dirname}>/action.topic.php" method="POST" onsubmit="javascript: if(window.document.form_topics_admin.op.value < 1){return false;}"> + <form name="form_topics_admin" action="<{$xoops_url}>/modules/<{$xoops_dirname}>/action.topic.php" method="POST" onsubmit="javascript: if(window.document.form_topics_admin.op.value < 1){return false;}"> <{/if}> <{if $viewer_level gt 1}> -<div class="left" style="padding: 5px;" id="admin"> - <{$forum_addpoll}> <{$forum_post_or_register}> -</div> + <div class="left" style="padding: 5px;" id="admin"> + <{$forum_addpoll}> <{$forum_post_or_register}> + </div> <div class="right" style="padding: 5px;"> <{if $mode gt 1}> <{$smarty.const._ALL}>: <input type="checkbox" name="topic_check1" id="topic_check1" value="1" onclick="xoopsCheckAll('form_topics_admin', 'topic_check1');" /> @@ -62,42 +62,42 @@ <{/if}> </div> <{else}> -<div class="right" style="padding: 5px;"> - <{$forum_addpoll}> <{$forum_post_or_register}> -</div> + <div class="right" style="padding: 5px;"> + <{$forum_addpoll}> <{$forum_post_or_register}> + </div> <{/if}> <div class="clear"></div> <br /> <div> -<div class="dropdown"> - <{includeq file="db:newbb_viewforum_menu.html"}> + <div class="dropdown"> + <{includeq file="db:newbb_viewforum_menu.html"}> + </div> + <div style="padding: 5px;float: right; text-align:right;"> + <{$forum_pagenav}> + </div> </div> -<div style="padding: 5px;float: right; text-align:right;"> -<{$forum_pagenav}> -</div> -</div> <div class="clear"></div> <br /> <table class="outer" cellpadding="6" cellspacing="1" border="0" width="100%" align="center"> <tr class="head" align="left"> - <td width="5%" colspan="2"> - <{if $mode gt 1}> - <{$smarty.const._ALL}>: <input type="checkbox" name="topic_check" id="topic_check" value="1" onclick="xoopsCheckAll('form_topics_admin', 'topic_check');" /> - <{else}> - - <{/if}> - </td> - <td> <strong><a href="<{$h_topic_link}>"... [truncated message content] |
From: <txm...@us...> - 2012-03-10 15:07:49
|
Revision: 9117 http://xoops.svn.sourceforge.net/xoops/?rev=9117&view=rev Author: txmodxoops Date: 2012-03-10 15:07:40 +0000 (Sat, 10 Mar 2012) Log Message: ----------- Restructuring Updated Files Revision Added New files Modified Paths: -------------- XoopsModules/TDMCreate/releases/1.39/TDMCreate/admin/admin_header.php XoopsModules/TDMCreate/releases/1.39/TDMCreate/admin/building.php XoopsModules/TDMCreate/releases/1.39/TDMCreate/admin/menu.php XoopsModules/TDMCreate/releases/1.39/TDMCreate/admin/modules.php XoopsModules/TDMCreate/releases/1.39/TDMCreate/admin/tables.php XoopsModules/TDMCreate/releases/1.39/TDMCreate/class/tdmcreate_modules.php XoopsModules/TDMCreate/releases/1.39/TDMCreate/class/tdmcreate_tables.php XoopsModules/TDMCreate/releases/1.39/TDMCreate/const/const_architecture.php XoopsModules/TDMCreate/releases/1.39/TDMCreate/const/const_main_language.php XoopsModules/TDMCreate/releases/1.39/TDMCreate/const/const_templates_footer.php XoopsModules/TDMCreate/releases/1.39/TDMCreate/const/const_user_index.php XoopsModules/TDMCreate/releases/1.39/TDMCreate/include/functions.php XoopsModules/TDMCreate/releases/1.39/TDMCreate/include/functions_const.php XoopsModules/TDMCreate/releases/1.39/TDMCreate/language/english/admin.php XoopsModules/TDMCreate/releases/1.39/TDMCreate/language/english/modinfo.php XoopsModules/TDMCreate/releases/1.39/TDMCreate/language/italian/admin.php XoopsModules/TDMCreate/releases/1.39/TDMCreate/language/italian/modinfo.php XoopsModules/TDMCreate/releases/1.39/TDMCreate/language/update language 1.38 to 1.39.txt XoopsModules/TDMCreate/releases/1.39/TDMCreate/sql/mysql.sql XoopsModules/TDMCreate/releases/1.39/TDMCreate/xoops_version.php Added Paths: ----------- XoopsModules/TDMCreate/releases/1.39/TDMCreate/admin/readme.php XoopsModules/TDMCreate/releases/1.39/TDMCreate/class/tdmcreate_architecture.php XoopsModules/TDMCreate/releases/1.39/TDMCreate/sql/mysql137.sql XoopsModules/TDMCreate/releases/1.39/TDMCreate/sql/mysql139a.sql Modified: XoopsModules/TDMCreate/releases/1.39/TDMCreate/admin/admin_header.php =================================================================== --- XoopsModules/TDMCreate/releases/1.39/TDMCreate/admin/admin_header.php 2012-03-08 15:11:47 UTC (rev 9116) +++ XoopsModules/TDMCreate/releases/1.39/TDMCreate/admin/admin_header.php 2012-03-10 15:07:40 UTC (rev 9117) @@ -28,22 +28,15 @@ //echo TDMCreate_adminMenu(_AM_ERROR_NOFRAMEWORKS); $pathDir = $GLOBALS['xoops']->path('/Frameworks/moduleclasses/moduleadmin'); -$globlang = $GLOBALS['xoopsConfig']['language']; -if ( file_exists($pathDir.'/language/'.$globlang.'/main.php')){ - include_once $pathDir.'/language/'.$globlang.'/main.php'; - }else{ - include_once $pathDir.'/language/english/main.php'; - } - if ( file_exists($pathDir.'/moduleadmin.php')){ - include_once $pathDir.'/moduleadmin.php'; - //return true; - }else{ - xoops_cp_header(); - echo xoops_error(_AM_MODULEADMIN_MISSING); - xoops_cp_footer(); - //return false; - } + include_once $pathDir.'/moduleadmin.php'; + //return true; +}else{ + xoops_cp_header(); + echo xoops_error(_AM_MODULEADMIN_MISSING); + xoops_cp_footer(); + //return false; +} $dirname = basename(dirname(dirname( __FILE__ ) )); $module_handler =& xoops_gethandler('module'); Modified: XoopsModules/TDMCreate/releases/1.39/TDMCreate/admin/building.php =================================================================== --- XoopsModules/TDMCreate/releases/1.39/TDMCreate/admin/building.php 2012-03-08 15:11:47 UTC (rev 9116) +++ XoopsModules/TDMCreate/releases/1.39/TDMCreate/admin/building.php 2012-03-10 15:07:40 UTC (rev 9117) @@ -34,6 +34,7 @@ case "creation": $mods =& $modsHandler->get($_REQUEST['modules_name']); $mods_name = $mods->getVar('modules_name'); + $mods_fname = $mods->getVar('modules_fname'); $mods_desc = $mods->getVar('modules_description'); $mods_author_website_name = $mods->getVar('modules_author_website_name'); $mods_author_website_url = $mods->getVar('modules_author_website_url'); @@ -41,7 +42,7 @@ $mods_display_admin = $mods->getVar('modules_display_admin'); $mods_display_user = $mods->getVar('modules_display_user'); //Remove the new module directory if it exists - clearDir($modPath.'/modules/'.$mods_name); + TDMCreate_clearDir($modPath.'/modules/'.$mods_name); //Nom des tables et combien de tables $criteria = new CriteriaCompo(); @@ -86,29 +87,29 @@ copy($tbls_img1, $modPath."/modules/".$mods_name."/images/deco/".$tbls_img); } //Creation des classes - const_class($mods, $mods_name, $tbls_module_table, $tbls_name, $tbls_champs, $tbls_parametres); + const_class($mods, $mods_fname, $tbls_module_table, $tbls_name, $tbls_champs, $tbls_parametres); //Creation of pages admin if ( $mods_display_admin == 1 ) { - const_admin_pages($mods, $mods_name, $tbls_id, $tbls_module_table, $tbls_name, $tbls_img, $tbls_champs, $tbls_parametres, $tbls_online, $tbls_pending); + const_admin_pages($mods, $mods_fname, $tbls_id, $tbls_module_table, $tbls_name, $tbls_img, $tbls_champs, $tbls_parametres, $tbls_online, $tbls_pending); } //Creation of pages and templates user if ( $mods_display_user == 1 ) { - const_user_pages($mods, $mods_name, $tbls_name, $tbls_champs, $tbls_champs, $tbls_parametres); + const_user_pages($mods, $mods_fname, $tbls_name, $tbls_champs, $tbls_champs, $tbls_parametres); // Creation of templates pages - const_templates_pages($mods, $mods_name, $tbls_name, $tbls_module_table, $tbls_champs, $tbls_parametres); + const_templates_pages($mods, $mods_fname, $tbls_name, $tbls_module_table, $tbls_champs, $tbls_parametres); } //Creation of search if ( $tbls_search == 1 ) { - const_include_search($mods, $mods_name, $tbls_name, $tbls_module_table, $tbls_champs, $tbls_parametres, $tbls_img); + const_include_search($mods, $mods_fname, $tbls_name, $tbls_module_table, $tbls_champs, $tbls_parametres, $tbls_img); } //Creation of the comments if ( $tbls_coms == 1 ) { - const_include_coms($mods, $mods_name, $tbls_name, $tbls_module_table, $tbls_champs, $tbls_parametres); + const_include_coms($mods, $mods_fname, $tbls_name, $tbls_module_table, $tbls_champs, $tbls_parametres); } //Creation of the file mysql.sql - const_sql($mods_name, $tbls_module_table, $tbls_name, $tbls_champs); + const_sql($mods_fname, $tbls_module_table, $tbls_name, $tbls_champs); $result = $xoopsDB->queryF("SELECT COUNT(*) FROM " . $xoopsDB->prefix("tdmcreate_tables"). " WHERE tables_name = 'topic' OR tables_name = '".$tbls_name."_topic' OR tables_name = 'cat' @@ -120,9 +121,9 @@ list( $topic ) = $xoopsDB->fetchRow($result); //Creation of the blocks if ( $tbls_blocks != 1 ) { - const_blocks($mods, $mods_name, $tbls_module_table, $tbls_name, $tbls_champs, $tbls_parametres, $topic); + const_blocks($mods, $mods_fname, $tbls_module_table, $tbls_name, $tbls_champs, $tbls_parametres, $topic); //Creation of template blocks - const_blocks_templates($mods, $mods_name, $tbls_name, $tbls_module_table, $tbls_champs, $tbls_parametres); + const_blocks_templates($mods, $mods_fname, $tbls_name, $tbls_module_table, $tbls_champs, $tbls_parametres); } } //Variables @@ -141,43 +142,43 @@ $tbls_coms = $tblsHandler->getVar('tables_coms'); //Creation of xoopsversion.php file //Xoops version set to integrate the end of the block, etc. - const_xoopsversion($mods, $mods_name, $tbls_arr, $tbls_module_table, $tbls_blocks); + const_xoopsversion($mods, $mods_fname, $tbls_arr, $tbls_module_table, $tbls_blocks); if($mods_display_user == 1){ // Creation of template index - const_templates_index($mods, $mods_name, $tbls_name, $tbls_module_table, $tbls_champs, $tbls_parametres); + const_templates_index($mods, $mods_fname, $tbls_name, $tbls_module_table, $tbls_champs, $tbls_parametres); // Creation of template header - const_templates_header($mods, $mods_name); + const_templates_header($mods, $mods_fname); // Creation of template footer - const_templates_footer($mods, $mods_name, $tbls_module_table); + const_templates_footer($mods, $mods_fname, $tbls_module_table); } //Creation of the file permissions $topic = 0; if ( $topic == 1 || $tbls_module_table != null) { // - const_admin_permissions($mods, $mods_name, $tbls_name, $topic); + const_admin_permissions($mods, $mods_fname, $tbls_name, $topic); } //Include //Configs - const_include_configs($mods, $mods_name, $mods_author_website_name, $mods_author_website_url); + const_include_configs($mods, $mods_fname, $mods_author_website_name, $mods_author_website_url); //Style - const_css_admin($mods, $mods_name); - const_css_style($mods, $mods_name); + const_css_admin($mods, $mods_fname); + const_css_style($mods, $mods_fname); //Functions - const_include_functions($mods, $mods_name); + const_include_functions($mods, $mods_fname); //Creation of the install file for uploads - const_include_install($mods, $mods_name, $tbls_arr); + const_include_install($mods, $mods_fname, $tbls_arr); //Language /////////////////////////////////////////////////////////////////////// //Creation of language main.php - const_main_language($mods, $mods_name, $mods_desc); + const_main_language($mods, $mods_fname, $mods_desc); //Creation of language modinfo.php - const_modinfo_language($mods, $mods_name, $tbls_arr, $mods_desc); + const_modinfo_language($mods, $mods_fname, $tbls_arr, $mods_desc); //Creation of language admin.php - const_admin_language($mods, $mods_name, $mods_desc, $tbls_name, $tbls_arr, $tbls_pending); + const_admin_language($mods, $mods_fname, $mods_desc, $tbls_name, $tbls_arr, $tbls_pending); //Creation of language blocks.php - const_blocks_language($mods, $mods_name); + const_blocks_language($mods, $mods_fname); //Creation of language help.php - const_help_language($mods, $mods_name, $mods_desc); + const_help_language($mods, $mods_fname, $mods_desc); //Creation of language //const_language($mods, $mods_name); /////////////////////////////////////////////////////////////////////// @@ -186,22 +187,22 @@ /************************************************/ if ( $mods_display_admin == 1 ) { //Creation of admin file admin_header.php - const_admin_header($mods, $mods_name, $tbls_arr); + const_admin_header($mods, $mods_fname, $tbls_arr); //Creation of admin file admin_footer.php - const_admin_footer($mods, $mods_name, $tbls_arr); + const_admin_footer($mods, $mods_fname, $tbls_arr); //Creation of admin file menu.php - const_admin_menu($mods, $mods_name, $tbls_arr, $topic); + const_admin_menu($mods, $mods_fname, $tbls_arr, $topic); //Creation of admin file about.php - const_admin_about($mods, $mods_name); + const_admin_about($mods, $mods_fname); //Creation of admin file index.php - const_admin_index($mods, $mods_name, $tbls_arr, $tbls_online, $tbls_pending); + const_admin_index($mods, $mods_fname, $tbls_arr, $tbls_online, $tbls_pending); } /************************************************/ /*User*/ /************************************************/ if ( $mods_display_user == 1 ) { - const_user_header($mods, $mods_name, $tbls_arr, $tbls_module_table); - const_user_index($mods, $mods_name); + const_user_header($mods, $mods_fname, $tbls_arr, $tbls_module_table); + const_user_index($mods, $mods_fname); } echo '</td></tr></table>'; Modified: XoopsModules/TDMCreate/releases/1.39/TDMCreate/admin/menu.php =================================================================== --- XoopsModules/TDMCreate/releases/1.39/TDMCreate/admin/menu.php 2012-03-08 15:11:47 UTC (rev 9116) +++ XoopsModules/TDMCreate/releases/1.39/TDMCreate/admin/menu.php 2012-03-10 15:07:40 UTC (rev 9117) @@ -22,58 +22,50 @@ * **************************************************************************** */ $dirname = basename( dirname( dirname( __FILE__ ) ) ) ; - $module_handler =& xoops_gethandler("module"); $xoopsModule =& XoopsModule::getByDirname($dirname); $moduleInfo =& $module_handler->get($xoopsModule->getVar("mid")); $pathImageAdmin = $moduleInfo->getInfo("icons32"); -$adminmenu = array(); - -$i = 1; +$adminmenu = array(); $i = 1; $adminmenu[$i]["title"] = _MI_TDMCREATE_ADMENU1; -//$adminmenu[$i]["desc"] = _MI_TDMCREATE_ADMENU1_DESC; $adminmenu[$i]["link"] = "admin/index.php"; $adminmenu[$i]["icon"] = "../../".$pathImageAdmin."/home.png"; $i++; $adminmenu[$i]["title"] = _MI_TDMCREATE_ADMENU2; -//$adminmenu[$i]["desc"] = _MI_TDMCREATE_ADMENU2_DESC $adminmenu[$i]["link"] = "admin/modules.php"; $adminmenu[$i]["icon"] = "../../".$pathImageAdmin."/addmodule.png"; $i++; $adminmenu[$i]["title"] = _MI_TDMCREATE_ADMENU3; -//$adminmenu[$i]["desc"] = _MI_TDMCREATE_ADMENU3_DESC $adminmenu[$i]["link"] = "admin/tables.php"; $adminmenu[$i]["icon"] = "../../".$pathImageAdmin."/addtable.png"; $i++; $adminmenu[$i]["title"] = _MI_TDMCREATE_ADMENU4; -//$adminmenu[$i]["desc"] = _MI_TDMCREATE_ADMENU4_DESC $adminmenu[$i]["link"] = "admin/languages.php"; $adminmenu[$i]["icon"] = "../../".$pathImageAdmin."/languages.png"; $i++; $adminmenu[$i]["title"] = _MI_TDMCREATE_ADMENU5; -//$adminmenu[$i]["desc"] = _MI_TDMCREATE_ADMENU5_DESC $adminmenu[$i]["link"] = "admin/css.php"; $adminmenu[$i]["icon"] = "../../".$pathImageAdmin."/stylesheet.png"; $i++; $adminmenu[$i]["title"] = _MI_TDMCREATE_ADMENU6; -//$adminmenu[$i]["desc"] = _MI_TDMCREATE_ADMENU6_DESC $adminmenu[$i]["link"] = "admin/changelog.php"; $adminmenu[$i]["icon"] = "../../".$pathImageAdmin."/changelog.png"; $i++; $adminmenu[$i]["title"] = _MI_TDMCREATE_ADMENU7; -//$adminmenu[$i]["desc"] = _MI_TDMCREATE_ADMENU7_DESC -$adminmenu[$i]["link"] = 'admin/building.php'; -$adminmenu[$i]["icon"] = '../../'.$pathImageAdmin.'/builder.png'; +$adminmenu[$i]["link"] = "admin/building.php"; +$adminmenu[$i]["icon"] = "../../".$pathImageAdmin."/builder.png"; $i++; $adminmenu[$i]["title"] = _MI_TDMCREATE_ADMENU8; -//$adminmenu[$i]["desc"] = _MI_TDMCREATE_ADMENU8_DESC -$adminmenu[$i]["link"] = 'admin/filesmanager.php'; -$adminmenu[$i]["icon"] = '../../'.$pathImageAdmin.'/file-manager.png'; +$adminmenu[$i]["link"] = "admin/filesmanager.php"; +$adminmenu[$i]["icon"] = "../../".$pathImageAdmin."/file-manager.png"; $i++; $adminmenu[$i]["title"] = _MI_TDMCREATE_ADMENU9; -//$adminmenu[$i]["desc"] = _MI_TDMCREATE_ADMENU9_DESC; $adminmenu[$i]["link"] = "admin/about.php"; $adminmenu[$i]["icon"] = "../../".$pathImageAdmin."/about.png"; +$i++; +$adminmenu[$i]["title"] = _MI_TDMCREATE_ADMENU10; +$adminmenu[$i]["link"] = "admin/readme.php"; +$adminmenu[$i]["icon"] = "../../".$pathImageAdmin."/document.png"; unset( $i ); ?> \ No newline at end of file Modified: XoopsModules/TDMCreate/releases/1.39/TDMCreate/admin/modules.php =================================================================== --- XoopsModules/TDMCreate/releases/1.39/TDMCreate/admin/modules.php 2012-03-08 15:11:47 UTC (rev 9116) +++ XoopsModules/TDMCreate/releases/1.39/TDMCreate/admin/modules.php 2012-03-10 15:07:40 UTC (rev 9117) @@ -43,7 +43,7 @@ $uploader = new XoopsMediaUploader($uploaddir, "gif|jpeg|pjpeg|png", 104857600, null, null); if ($uploader->fetchMedia($_POST['xoops_upload_file'][0])) { $extension = preg_replace( "/^.+\.([^.]+)$/sU" , "\\1" , $_FILES["attachedfile"]['name']); - $name_img = $_REQUEST['modules_name'].'_slogo.'.$extension; + $name_img = $_GET['modules_fname'].'_slogo.'.$extension; $uploader->setTargetFileName($name_img); $uploader->fetchMedia($_POST['xoops_upload_file'][0]); if (!$uploader->upload()) { @@ -57,6 +57,7 @@ } $obj->setVar('modules_name', $_REQUEST['modules_name']); + $obj->setVar('modules_fname', $_REQUEST['modules_fname']); $obj->setVar('modules_version', $_REQUEST['modules_version']); $obj->setVar('modules_description', $_REQUEST['modules_description']); $obj->setVar('modules_author', $_REQUEST['modules_author']); @@ -73,10 +74,11 @@ $obj->setVar('modules_demo_site_name', $_REQUEST['modules_demo_site_name']); $obj->setVar('modules_forum_site_url', $_REQUEST['modules_forum_site_url']); $obj->setVar('modules_forum_site_name', $_REQUEST['modules_forum_site_name']); - $obj->setVar('modules_module_website_url', $_REQUEST['modules_module_website_url']); - $obj->setVar('modules_module_website_name', $_REQUEST['modules_module_website_name']); + $obj->setVar('modules_website_url', $_REQUEST['modules_website_url']); + $obj->setVar('modules_website_name', $_REQUEST['modules_website_name']); $obj->setVar('modules_release', $_REQUEST['modules_release']); - $obj->setVar('modules_module_status', $_REQUEST['modules_module_status']); + $obj->setVar('modules_status', $_REQUEST['modules_status']); + $obj->setVar('modules_donations', $_REQUEST['modules_donations']); $obj->setVar('modules_display_admin', $_REQUEST['modules_display_admin']); $obj->setVar('modules_display_user', $_REQUEST['modules_display_user']); $obj->setVar('modules_active_search', $_REQUEST['modules_active_search']); @@ -125,15 +127,16 @@ echo $modAdmin->renderButton(); $criteria = new CriteriaCompo(); - $criteria->setSort('modules_name'); + $criteria->add(new Criteria('modules_id', 0, '>')); + $criteria->setSort('modules_id ASC, modules_fname'); $criteria->setOrder('ASC'); - $numrows_modules = $modsHandler->getCount(); + $numrows = $modsHandler->getCount(); if (isset($_REQUEST['limit'])) { $criteria->setLimit($_REQUEST['limit']); $limit = $_REQUEST['limit']; } else { - $criteria->setLimit($GLOBALS['xoopsModuleConfig']['admin_perpage']); - $limit = $GLOBALS['xoopsModuleConfig']['admin_perpage']; + $criteria->setLimit($GLOBALS['xoopsModuleConfig']['perpageadmin']); + $limit = $GLOBALS['xoopsModuleConfig']['perpageadmin']; } if (isset($_REQUEST['start'])) { $criteria->setStart($_REQUEST['start']); @@ -142,74 +145,62 @@ $criteria->setStart(0); $start = 0; } - $document_tri = 1; - $document_order = 1; - if (isset($_REQUEST['document_order'])) { - if ($_REQUEST['document_order'] ==1 ) { + $tri = 1; + $order = 1; + if (isset($_REQUEST['order'])) { + if ($_REQUEST['order'] ==1 ) { $criteria->setOrder('ASC'); - $document_order=1; + $order=1; } - if ($_REQUEST['document_order'] == 2) { + if ($_REQUEST['order'] == 2) { $criteria->setOrder('DESC'); - $document_order=2; + $order=2; } } else { $criteria->setOrder('DESC'); } - $mods_arr = $modsHandler->getall($criteria); - include_once XOOPS_ROOT_PATH . '/class/pagenav.php'; - if ( $numrows_modules > $limit ) { - $pagenav = new XoopsPageNav($numrows_modules, $limit, $start, 'start', 'op=modules_list&limit='.$limit.'&document_tri='.$document_tri.'&document_order='.$document_order); + $mods_arr = $modsHandler->getall($criteria); + if ( $numrows > $limit ) { + include_once XOOPS_ROOT_PATH . '/class/pagenav.php'; + $pagenav = new XoopsPageNav($numrows, $limit, $start, 'start', 'op=modules_list&limit='.$limit.'&tri='.$tri.'&order='.$order); $pagenav = $pagenav->renderNav(4); } else { $pagenav = ''; } //echo "<div class='center'>".$pagenav."</div>"; - if ( $numrows_modules > 0 ) + if ( $numrows > 0 ) { - echo '<table width="100%" cellspacing="1" class="outer">'; - echo '<tr class="center">'; - echo '<th width="10%">'._AM_TDMCREATE_ID.'</th>'; - echo '<th width="10%">'._AM_TDMCREATE_NAME.'</th>'; + echo '<table width="100%" cellspacing="1" class="outer"><tr class="center">'; + echo '<th width="5%">'._AM_TDMCREATE_ID.'</th>'; + echo '<th width="10%">'._AM_TDMCREATE_FOLDER.'</th>'; echo '<th width="10%">'._AM_TDMCREATE_IMAGE.'</th>'; - echo '<th width="10%">'._AM_TDMCREATE_VERSION.'</th>'; + echo '<th width="5%">'._AM_TDMCREATE_VERSION.'</th>'; echo '<th width="10%">'._AM_TDMCREATE_DISPLAY_ADMIN.'</th>'; echo '<th width="10%">'._AM_TDMCREATE_DISPLAY_USER.'</th>'; echo '<th width="10%">'._AM_TDMCREATE_RELEASE.'</th>'; - echo '<th width="10%">'._AM_TDMCREATE_STATUS.'</th>'; - echo '<th width="10%">'._AM_TDMCREATE_SEARCH.'</th>'; - echo '<th width="10%">'._AM_TDMCREATE_FORMACTION.' </th>'; - echo '</tr>'; - $class = 'odd'; - + echo '<th width="8%">'._AM_TDMCREATE_STATUS.'</th>'; + echo '<th width="8%">'._AM_TDMCREATE_SEARCH.'</th>'; + echo '<th width="8%">'._AM_TDMCREATE_COMMENTS.'</th>'; + echo '<th width="8%">'._AM_TDMCREATE_FORMACTION.' </th></tr>'; + $class = 'odd'; foreach (array_keys($mods_arr) as $i) { $mods_id = $mods_arr[$i]->getVar('modules_id'); - $mods_name = $mods_arr[$i]->getVar('modules_name'); - $mods_image = $mods_arr[$i]->getVar('modules_image'); - $mods_version = $mods_arr[$i]->getVar('modules_version'); - $mods_release = $mods_arr[$i]->getVar('modules_release'); - $mods_module_status = $mods_arr[$i]->getVar('modules_module_status'); - $mods_display_admin = $mods_arr[$i]->getVar('modules_display_admin'); - $mods_display_user = $mods_arr[$i]->getVar('modules_display_user'); - $mods_active_search = $mods_arr[$i]->getVar('modules_active_search'); - $display_admin = ($mods_display_admin == 1) ? _YES : _NO; - $display_user = ($mods_display_user == 1) ? _YES : _NO; - $active_search = ($mods_active_search == 1) ? _YES : _NO; - echo '<tr class="odd center">'; - echo '<td><b>'.$mods_id.'</b></td>'; - echo '<td><b>'.$mods_name.'</b></td>'; - echo '<td><img src="../images/uploads/modules/'.$mods_image.'" height="30px"></td>'; - echo '<td><b>'.$mods_version.'</b></td>'; - echo '<td>'.$display_admin.'</td>'; - echo '<td>'.$display_user.'</td>'; - echo '<td>'.$mods_release.'</td>'; - echo '<td>'.$mods_module_status.'</td>'; - echo '<td>'.$active_search.'</td>'; + $display_admin = ($mods_arr[$i]->getVar('modules_display_admin') == 1) ? _YES : _NO; + $display_user = ($mods_arr[$i]->getVar('modules_display_user') == 1) ? _YES : _NO; + $active_search = ($mods_arr[$i]->getVar('modules_active_search') == 1) ? _YES : _NO; + $active_comms = ($mods_arr[$i]->getVar('modules_active_comments') == 1) ? _YES : _NO; + echo '<tr class="odd center"><td><b>'.$mods_id.'</b></td>'; + echo '<td><b>'.$mods_arr[$i]->getVar('modules_name').'</b></td>'; + echo '<td><img src="../images/uploads/modules/'.$mods_arr[$i]->getVar('modules_image').'" height="30px"></td>'; + echo '<td><b>'.$mods_arr[$i]->getVar('modules_version').'</b></td>'; + echo '<td>'.$display_admin.'</td><td>'.$display_user.'</td>'; + echo '<td>'.$mods_arr[$i]->getVar('modules_release').'</td>'; + echo '<td>'.$mods_arr[$i]->getVar('modules_status').'</td>'; + echo '<td>'.$active_search.'</td><td>'.$active_comms.'</td>'; echo '<td>'; echo '<a href="modules.php?op=modules_edit&modules_id='.$mods_id.'"><img src='. $pathImageIcon ."/edit.png alt="._AM_TDMCREATE_FORMEDIT.'" title="'._AM_TDMCREATE_FORMEDIT.'"></a> <a href="modules.php?op=modules_delete&modules_id='.$mods_id.'"><img src='. $pathImageIcon ."/delete.png alt="._AM_TDMCREATE_FORMDEL.'" title="'._AM_TDMCREATE_FORMDEL.'"></a>'; - echo '</td>'; - echo '</tr>'; + echo '</td></tr>'; } echo '</table><br />'; echo "<div class='center'>".$pagenav."</div><br />"; Added: XoopsModules/TDMCreate/releases/1.39/TDMCreate/admin/readme.php =================================================================== --- XoopsModules/TDMCreate/releases/1.39/TDMCreate/admin/readme.php (rev 0) +++ XoopsModules/TDMCreate/releases/1.39/TDMCreate/admin/readme.php 2012-03-10 15:07:40 UTC (rev 9117) @@ -0,0 +1,97 @@ +<?php +/** + * **************************************************************************** + * - TDMCreate By TDM - TEAM DEV MODULE FOR XOOPS + * - Licence GPL Copyright (c) (http://www.tdmxoops.net) + * - Revision Copyright (c) (http://www.txmodxoops.org) + * + * This license contains restrictions!!! + * + * 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. + * + * @license TDM GPL license + * @author TDM TEAM DEV MODULE + * @author TXMod Xoops (in...@tx...) + * + * Version : 1.39 Tue 2012/02/14 16:20:18 : Timgno Exp $ + * **************************************************************************** + */ +include "admin_header.php"; +xoops_cp_header(); +$op = TDMCreate_CleanVars( $_REQUEST, 'op', 'default', 'string' ); +$readAdmin = new ModuleAdmin(); +switch ($op) { + case 'default': + case 'readme': + default: + echo $readAdmin->addNavigation('readme.php'); + $readAdmin->addItemButton(_AM_TDMCREATE_CHANGELOG, 'readme.php?op=changelog', 'list'); + $readAdmin->addItemButton(_AM_TDMCREATE_CREDITS, 'readme.php?op=credits', 'list'); + $readAdmin->addItemButton(_AM_TDMCREATE_INSTALL, 'readme.php?op=install', 'list'); + $readAdmin->addItemButton(_AM_TDMCREATE_LICENCE, 'readme.php?op=licence', 'list'); + $readAdmin->addItemButton(_AM_TDMCREATE_LANGDIFF, 'readme.php?op=lang_diff', 'list'); + echo $readAdmin->renderButton(); + echo TDMCreate_readData('readme.txt', _AM_TDMCREATE_README); + break; + + case 'changelog': + echo $readAdmin->addNavigation('readme.php'); + $readAdmin->addItemButton(_AM_TDMCREATE_README, 'readme.php?op=readme', 'list'); + $readAdmin->addItemButton(_AM_TDMCREATE_CREDITS, 'readme.php?op=credits', 'list'); + $readAdmin->addItemButton(_AM_TDMCREATE_INSTALL, 'readme.php?op=install', 'list'); + $readAdmin->addItemButton(_AM_TDMCREATE_LICENCE, 'readme.php?op=licence', 'list'); + $readAdmin->addItemButton(_AM_TDMCREATE_LANGDIFF, 'readme.php?op=lang_diff', 'list'); + echo $readAdmin->renderButton(); + echo TDMCreate_readData('changelog.txt', _AM_TDMCREATE_CHANGELOG); + break; + + case 'credits': + echo $readAdmin->addNavigation('readme.php'); + $readAdmin->addItemButton(_AM_TDMCREATE_README, 'readme.php?op=readme', 'list'); + $readAdmin->addItemButton(_AM_TDMCREATE_CHANGELOG, 'readme.php?op=changelog', 'list'); + $readAdmin->addItemButton(_AM_TDMCREATE_INSTALL, 'readme.php?op=install', 'list'); + $readAdmin->addItemButton(_AM_TDMCREATE_LICENCE, 'readme.php?op=licence', 'list'); + $readAdmin->addItemButton(_AM_TDMCREATE_LANGDIFF, 'readme.php?op=lang_diff', 'list'); + echo $readAdmin->renderButton(); + echo TDMCreate_readData('credits.txt', _AM_TDMCREATE_CREDITS); + break; + + case 'install': + echo $readAdmin->addNavigation('readme.php'); + $readAdmin->addItemButton(_AM_TDMCREATE_README, 'readme.php?op=readme', 'list'); + $readAdmin->addItemButton(_AM_TDMCREATE_CHANGELOG, 'readme.php?op=changelog', 'list'); + $readAdmin->addItemButton(_AM_TDMCREATE_CREDITS, 'readme.php?op=credits', 'list'); + $readAdmin->addItemButton(_AM_TDMCREATE_LICENCE, 'readme.php?op=licence', 'list'); + $readAdmin->addItemButton(_AM_TDMCREATE_LANGDIFF, 'readme.php?op=lang_diff', 'list'); + echo $readAdmin->renderButton(); + echo TDMCreate_readData('install.txt', _AM_TDMCREATE_INSTALL); + break; + + case 'licence': + echo $readAdmin->addNavigation('readme.php'); + $readAdmin->addItemButton(_AM_TDMCREATE_README, 'readme.php?op=readme', 'list'); + $readAdmin->addItemButton(_AM_TDMCREATE_CHANGELOG, 'readme.php?op=changelog', 'list'); + $readAdmin->addItemButton(_AM_TDMCREATE_CREDITS, 'readme.php?op=credits', 'list'); + $readAdmin->addItemButton(_AM_TDMCREATE_INSTALL, 'readme.php?op=install', 'list'); + $readAdmin->addItemButton(_AM_TDMCREATE_LANGDIFF, 'readme.php?op=lang_diff', 'list'); + echo $readAdmin->renderButton(); + echo TDMCreate_readData('licence.txt', _AM_TDMCREATE_LICENCE); + break; + + case 'lang_diff': + echo $readAdmin->addNavigation('readme.php'); + $readAdmin->addItemButton(_AM_TDMCREATE_README, 'readme.php?op=readme', 'list'); + $readAdmin->addItemButton(_AM_TDMCREATE_CHANGELOG, 'readme.php?op=changelog', 'list'); + $readAdmin->addItemButton(_AM_TDMCREATE_CREDITS, 'readme.php?op=credits', 'list'); + $readAdmin->addItemButton(_AM_TDMCREATE_INSTALL, 'readme.php?op=install', 'list'); + $readAdmin->addItemButton(_AM_TDMCREATE_LICENCE, 'readme.php?op=licence', 'list'); + echo $readAdmin->renderButton(); + echo TDMCreate_readData('lang_diff.txt', _AM_TDMCREATE_LANGDIFF); + break; +} +include "admin_footer.php"; \ No newline at end of file Modified: XoopsModules/TDMCreate/releases/1.39/TDMCreate/admin/tables.php =================================================================== --- XoopsModules/TDMCreate/releases/1.39/TDMCreate/admin/tables.php 2012-03-08 15:11:47 UTC (rev 9116) +++ XoopsModules/TDMCreate/releases/1.39/TDMCreate/admin/tables.php 2012-03-10 15:07:40 UTC (rev 9117) @@ -27,97 +27,17 @@ $op = TDMCreate_CleanVars( $_REQUEST, 'op', 'tables_list', 'string' ); $tablesAdmin = new ModuleAdmin(); switch ($op) { - case "tables_save": - if (!$GLOBALS['xoopsSecurity']->check()) { - redirect_header('tables.php', 3, implode(',', $GLOBALS['xoopsSecurity']->getErrors())); - } - - $tables_id = TDMCreate_CleanVars( $_REQUEST, 'tables_id', 0, 'int' ); - if (isset($_REQUEST['tables_id'])) { - $obj =& $tblsHandler->get($tables_id); - } else { - $obj =& $tblsHandler->create(); - } - - //Name of the module - $modules =& $modsHandler->get($_REQUEST['tables_modules']); - $modules_name = $modsHandler->getVar('modules_name'); - - $obj->setVar('tables_modules', $_REQUEST['tables_modules']); - $obj->setVar('tables_module_table', strtolower($modules_name.'_'.$_REQUEST['tables_name'])); - $obj->setVar('tables_name', strtolower($_REQUEST['tables_name'])); - $obj->setVar('tables_name_empty', $_REQUEST['tables_name_empty']); - $obj->setVar('tables_blocks', $_REQUEST['tables_blocks']); - $obj->setVar('tables_display_admin', $_REQUEST['tables_display_admin']); - $obj->setVar('tables_display_user', $_REQUEST['tables_display_user']); - $obj->setVar('tables_submitter', $_REQUEST['tables_submitter']); - $obj->setVar('tables_publisher', $_REQUEST['tables_publisher']); - $obj->setVar('tables_created', $_REQUEST['tables_created']); - $obj->setVar('tables_published', $_REQUEST['tables_published']); - $obj->setVar('tables_expired', $_REQUEST['tables_expired']); - $obj->setVar('tables_status', $_REQUEST['tables_status']); - $obj->setVar('tables_online', $_REQUEST['tables_online']); - $obj->setVar('tables_pending', $_REQUEST['tables_pending']); - $obj->setVar('tables_search', $_REQUEST['tables_search']); - $obj->setVar('tables_coms', $_REQUEST['tables_coms']); - $obj->setVar('tables_nb_champs', $_REQUEST['tables_nb_champs']); - - $tables_champs = ''; - $tables_parametres = ''; - for($i=0; $i<$_REQUEST['tables_nb_champs']; $i++) - { - //Coupure entre les champs et coupre entre les parametres - if ( $i != $_REQUEST['tables_nb_champs'] - 1) { - $tables_champs .= '|'; - if ( $i != 0 ) - $tables_parametres .= '|'; - } else { - // Options Extra Champs - if ( isset($_REQUEST['tables_submitter']) == 1 ) - $tables_champs .= '|'.strtolower($_REQUEST['tables_name']).'_submitter:int:11: :NOT NULL:0:'; - if ( isset($_REQUEST['tables_publisher']) == 1 ) - $tables_champs .= '|'.strtolower($_REQUEST['tables_name']).'_publisher:text: :NOT NULL: :'; - if ( isset($_REQUEST['tables_created']) == 1 ) - $tables_champs .= '|'.strtolower($_REQUEST['tables_name']).'_created:int:10: :NOT NULL:0:'; - if ( isset($_REQUEST['tables_published']) == 1 ) - $tables_champs .= '|'.strtolower($_REQUEST['tables_name']).'_published:int:10: :NOT NULL:0:'; - if ( isset($_REQUEST['tables_expired']) == 1 ) - $tables_champs .= '|'.strtolower($_REQUEST['tables_name']).'_expired:int:10: :NOT NULL:0:'; - if ( isset($_REQUEST['tables_status']) == 1 ) - $tables_champs .= '|'.strtolower($_REQUEST['tables_name']).'_status:tinyint:2: :NOT NULL:0:'; - if ( isset($_REQUEST['tables_online']) == 1 ) - $tables_champs .= '|'.strtolower($_REQUEST['tables_name']).'_online:tinyint:1: :NOT NULL:0:'; - if ( isset($_REQUEST['tables_pending']) == 1 ) - $tables_champs .= '|'.strtolower($_REQUEST['tables_name']).'_pending:tinyint:1: :NOT NULL:0:'; - // Parameters - $tables_parametres .= '|XoopsFormSelectUser:1:1:1:0:0:1|XoopsFormTextDateSelect:1:1:1:0:0:1|XoopsFormCheckBox:1:1:1:0:0:1'; - } - } - $obj->setVar('tables_champs', $tables_champs); - $obj->setVar('tables_parametres', $tables_parametres); - - if ($tblsHandler->insert($obj)) - { - redirect_header('tables.php?op=tables_list', 2, _AM_TDMCREATE_FORMOK); - } - - break; - - case "tables_save1": + // Save the first step + case "tables_save": if (!$GLOBALS['xoopsSecurity']->check()) { redirect_header('tables.php', 3, implode(',', $GLOBALS['xoopsSecurity']->getErrors())); - } - - $tables_id = TDMCreate_CleanVars( $_REQUEST, 'tables_id', 0, 'int' ); + } if (isset($_REQUEST['tables_id'])) { - $obj =& $tblsHandler->get($tables_id); + $obj =& $tblsHandler->get($_REQUEST['tables_id']); } else { $obj =& $tblsHandler->create(); } - //Name of the module - $modules =& $modulesHandler->get($_REQUEST['tables_modules']); - $modules_name = $modules->getVar('modules_name'); - + //Image include_once XOOPS_ROOT_PATH.'/class/uploader.php'; if(is_dir($pathImageAdmin)){ @@ -142,6 +62,10 @@ $obj->setVar('tables_img', $_REQUEST['tables_img']); } + //Name of the module + $modules =& $modsHandler->get($_REQUEST['tables_modules']); + $modules_name = $modsHandler->getVar('modules_name'); + $obj->setVar('tables_modules', strtolower($_REQUEST['tables_modules'])); $obj->setVar('tables_module_table', strtolower($modules_name.'_'.$_REQUEST['tables_name'])); $obj->setVar('tables_name', strtolower($_REQUEST['tables_name'])); @@ -175,9 +99,71 @@ $form->display(); break; + // Save the second step + case "champs_save": + if (!$GLOBALS['xoopsSecurity']->check()) { + redirect_header('tables.php', 3, implode(',', $GLOBALS['xoopsSecurity']->getErrors())); + } + + if (isset($_REQUEST['tables_id'])) { + $obj =& $tblsHandler->get($_REQUEST['tables_id']); + } else { + $obj =& $tblsHandler->create(); + } + + //Name of the module + $modules =& $modsHandler->get($_REQUEST['tables_modules']); + $modules_name = $modsHandler->getVar('modules_name'); + + $obj->setVar('tables_modules', $_REQUEST['tables_modules']); + $obj->setVar('tables_module_table', strtolower($modules_name.'_'.$_REQUEST['tables_name'])); + $obj->setVar('tables_name', strtolower($_REQUEST['tables_name'])); + $obj->setVar('tables_name_empty', $_REQUEST['tables_name_empty']); + $obj->setVar('tables_blocks', $_REQUEST['tables_blocks']); + $obj->setVar('tables_display_admin', $_REQUEST['tables_display_admin']); + $obj->setVar('tables_display_user', $_REQUEST['tables_display_user']); + $obj->setVar('tables_submitter', $_REQUEST['tables_submitter']); + $obj->setVar('tables_publisher', $_REQUEST['tables_publisher']); + $obj->setVar('tables_created', $_REQUEST['tables_created']); + $obj->setVar('tables_published', $_REQUEST['tables_published']); + $obj->setVar('tables_expired', $_REQUEST['tables_expired']); + $obj->setVar('tables_status', $_REQUEST['tables_status']); + $obj->setVar('tables_online', $_REQUEST['tables_online']); + $obj->setVar('tables_pending', $_REQUEST['tables_pending']); + $obj->setVar('tables_search', $_REQUEST['tables_search']); + $obj->setVar('tables_coms', $_REQUEST['tables_coms']); + $obj->setVar('tables_nb_champs', $_REQUEST['tables_nb_champs']); + + for($i=0; $i<intval($_REQUEST['tables_nb_champs']); $i++) + { + $obj->setVar('champ_id', $_REQUEST['champ_id']); + $obj->setVar('champ_name', $_REQUEST['champ_name']); + $obj->setVar('champ_type', $_REQUEST['champ_type']); + $obj->setVar('champ_value', $_REQUEST['champ_value']); + $obj->setVar('champ_attribute', $_REQUEST['champ_attribute']); + $obj->setVar('champ_null', $_REQUEST['champ_null']); + $obj->setVar('champ_default', $_REQUEST['champ_default']); + $obj->setVar('champ_key', $_REQUEST['champ_key']); + $obj->setVar('champ_elements_id', $_REQUEST['champ_elements_id']); + $obj->setVar('champ_elements_value', $_REQUEST['champ_elements_value']); + $obj->setVar('champ_elements_name', $_REQUEST['champ_elements_name']); + $obj->setVar('champ_elements_admin', $_REQUEST['champ_elements_admin']); + $obj->setVar('champ_elements_user', $_REQUEST['champ_elements_block']); + $obj->setVar('champ_elements_mfield', $_REQUEST['champ_elements_mfield']); + $obj->setVar('champ_elements_search', $_REQUEST['champ_elements_search']); + $obj->setVar('champ_elements_required', $_REQUEST['champ_elements_required']); + } + + if ($tblsHandler->insert($obj)) + { + redirect_header('tables.php?op=tables_list', 2, _AM_TDMCREATE_FORMOK); + } + + break; + case "edit_champs": $obj =& $tblsHandler->get($_REQUEST['tables_id']); - $form = $obj->getFormEditChamps(false, $_REQUEST['tables_id']); + $form = $obj->getFormChamps(); $form->display(); break; @@ -195,156 +181,105 @@ } else { xoops_confirm(array('ok' => 1, 'tables_id' => $_REQUEST['tables_id'], 'op' => 'delete_tables'), $_SERVER['REQUEST_URI'], sprintf(_AM_TDMCREATE_FORMSUREDEL, $obj->getVar('tables_name'))); } - break; + break; - case "modules_save": - if (!$GLOBALS['xoopsSecurity']->check()) { - redirect_header('tables.php', 3, implode(',', $GLOBALS['xoopsSecurity']->getErrors())); - } - $modules_id = TDMCreate_CleanVars( $_REQUEST, 'modules_id', 0, 'int' ); - if (isset($_REQUEST['modules_id'])) { - $obj =& $modsHandler->get($modules_id); - } else { - $obj =& $modsHandler->create(); - } - - //Image - include_once XOOPS_ROOT_PATH.'/class/uploader.php'; - $uploaddir = XOOPS_ROOT_PATH . "/modules/".$GLOBALS['xoopsModule']->dirname()."/images/uploads/modules/"; - $uploader = new XoopsMediaUploader($uploaddir, $GLOBALS['xoopsModuleConfig']["img_mimetypes"], - $GLOBALS['xoopsModuleConfig']["img_size"], null, null); - if ($uploader->fetchMedia($_POST['xoops_upload_file'][0])) { - $extension = preg_replace( "/^.+\.([^.]+)$/sU" , "\\1" , $_FILES["attachedfile"]['name']); - $name_img = $_GET['modules_name'].'_slogo.'.$extension; - $uploader->setTargetFileName($name_img); - $uploader->fetchMedia($_POST['xoops_upload_file'][0]); - if (!$uploader->upload()) { - $errors = $uploader->getErrors(); - redirect_header("javascript:history.go(-1)",3, $errors); - } else { - $obj->setVar('modules_image', $uploader->getSavedFileName()); - } - } else { - $obj->setVar('modules_image', $_REQUEST['modules_image']); - } - - $obj->setVar('modules_name', $_REQUEST['modules_name']); - $obj->setVar('modules_version', $_REQUEST['modules_version']); - $obj->setVar('modules_description', $_REQUEST['modules_description']); - $obj->setVar('modules_author', $_REQUEST['modules_author']); - $obj->setVar('modules_author_email', $_REQUEST['modules_author_email']); - $obj->setVar('modules_author_website_url', $_REQUEST['modules_author_website_url']); - $obj->setVar('modules_author_website_name', $_REQUEST['modules_author_website_name']); - $obj->setVar('modules_credits', $_REQUEST['modules_credits']); - $obj->setVar('modules_license', $_REQUEST['modules_license']); - $obj->setVar('modules_release_info', $_REQUEST['modules_release_info']); - $obj->setVar('modules_release_file', $_REQUEST['modules_release_file']); - $obj->setVar('modules_manual', $_REQUEST['modules_manual']); - $obj->setVar('modules_manual_file', $_REQUEST['modules_manual_file']); - $obj->setVar('modules_demo_site_url', $_REQUEST['modules_demo_site_url']); - $obj->setVar('modules_demo_site_name', $_REQUEST['modules_demo_site_name']); - $obj->setVar('modules_forum_site_url', $_REQUEST['modules_forum_site_url']); - $obj->setVar('modules_forum_site_name', $_REQUEST['modules_forum_site_name']); - $obj->setVar('modules_module_website_url', $_REQUEST['modules_module_website_url']); - $obj->setVar('modules_module_website_name', $_REQUEST['modules_module_website_name']); - $obj->setVar('modules_release', $_REQUEST['modules_release']); - $obj->setVar('modules_module_status', $_REQUEST['modules_module_status']); - $obj->setVar('modules_display_admin', $_REQUEST['modules_display_admin']); - $obj->setVar('modules_display_user', $_REQUEST['modules_display_user']); - $obj->setVar('modules_active_search', $_REQUEST['modules_active_search']); - $obj->setVar('modules_active_comments', $_REQUEST['modules_active_comments']); - - if ($modsHandler->insert($obj)) { - redirect_header('tables.php?op=tables_list', 2, _AM_TDMCREATE_FORMOK); - } - break; - - case "edit_modules": - $obj =& $modsHandler->get($_REQUEST['modules_id']); - $form = $obj->getForm(); - $form->display(); - break; - - case "delete_modules": - $obj =& $modsHandler->get($_REQUEST['modules_id']); - if (isset($_REQUEST['ok']) && $_REQUEST['ok'] == 1) { - if (!$GLOBALS['xoopsSecurity']->check()) { - redirect_header('tables.php', 3, implode(',', $GLOBALS['xoopsSecurity']->getErrors())); - } - if ($modsHandler->delete($obj)) { - $GLOBALS['xoopsDB']->queryF("DELETE FROM ".$GLOBALS['xoopsDB']->prefix("tdmcreate_tables")." WHERE tables_modules = ".$_REQUEST['modules_id']); - redirect_header('tables.php', 3, _AM_TDMCREATE_FORMDELOK); - } else { - echo $obj->getHtmlErrors(); - } - } else { - xoops_confirm(array('ok' => 1, 'modules_id' => $_REQUEST['modules_id'], 'op' => 'delete_modules'), $_SERVER['REQUEST_URI'], sprintf(_AM_TDMCREATE_FORMSUREDEL, $obj->getVar('modules_name'))); - } - break; - case "tables_champs": if (!$GLOBALS['xoopsSecurity']->check()) { redirect_header('tables.php', 3, implode(',', $GLOBALS['xoopsSecurity']->getErrors())); - } - $tables_id = TDMCreate_CleanVars( $_REQUEST, 'tables_id', 0, 'int' ); + } if (isset($_REQUEST['tables_id'])) { - $obj =& $tblsHandler->get($tables_id); + $obj =& $tblsHandler->get($_REQUEST['tables_id']); } else { $obj =& $tblsHandler->create(); } - for($i=0; $i<$_GET['tables_nb_champs']; $i++) - { - $obj->setVar('champ_id', $_POST['champ_id'][$i]); - $obj->setVar('champ_name', $_POST['champ_name'][$i]); - $obj->setVar('champ_tables_nb_champs', $_POST['champ_tables_nb_champs'][$i]); - $obj->setVar('champ_tables_champs', $_POST['champ_tables_champs'][$i]); - $obj->setVar('champ_type', $_POST['champ_type'][$i]); - $obj->setVar('champ_value', $_POST['champ_value'][$i]); - $obj->setVar('champ_attribute', $_POST['champ_attribute'][$i]); - $obj->setVar('champ_null', $_POST['champ_null'][$i]); - $obj->setVar('champ_default', $_POST['champ_default'][$i]); - $obj->setVar('champ_key', $_POST['champ_key'][$i]); - $obj->setVar('champ_parameters', $_POST['champ_parameters'][$i]); - $obj->setVar('champ_elements_id', $_POST['champ_elements_id'][$i]); - $obj->setVar('champ_elements_value', $_POST['champ_elements_value'][$i]); - $obj->setVar('champ_elements_name', $_POST['champ_elements_name'][$i]); - $obj->setVar('champ_elements_admin', $_POST['champ_elements_admin'][$i]); - $obj->setVar('champ_elements_user', $_POST['champ_elements_block'][$i]); - $obj->setVar('champ_elements_mfield', $_POST['champ_elements_mfield'][$i]); - $obj->setVar('champ_elements_search', $_POST['champ_elements_search'][$i]); - $obj->setVar('champ_elements_required', $_POST['champ_elements_required'][$i]); - } - - //Image - /*include_once XOOPS_ROOT_PATH.'/class/uploader.php'; - if(!is_dir($pathImageAdmin)){ - $uploaddir = $pathImageAdmin; - }else{ - $uploaddir = XOOPS_ROOT_PATH . "/modules/".$GLOBALS['xoopsModule']->dirname()."/images/uploads/tables/"; - } - $uploader = new XoopsMediaUploader($uploaddir, $GLOBALS['xoopsModuleConfig']["img_mimetypes"], - $GLOBALS['xoopsModuleConfig']["img_size"], null, null); - if ($uploader->fetchMedia($_POST['xoops_upload_file'][0])) { - $extension = preg_replace( "/^.+\.([^.]+)$/sU" , "\\1" , $_FILES["attachedfile"]['name']) ; - $name_img = $_GET['tables_name'].'.'.$extension; - $uploader->setTargetFileName($name_img); - $uploader->fetchMedia($_POST['xoops_upload_file'][0]); - if (!$uploader->upload()) { - $errors = $uploader->getErrors(); - redirect_header("javascript:history.go(-1)",3, $errors); - } else { - $obj->setVar('tables_img', $uploader->getSavedFileName()); + // If Champs exists + $criteria = new CriteriaCompo(); + $criteria->add(new Criteria('tables_modules', $_REQUEST['tables_modules'])); + $criteria->add(new Criteria('tables_name', $_REQUEST['tables_name'])); + $nb_tables = $tblsHandler->getCount($criteria); + + if ( $nb_tables < 1 ) + { + /* + for($i=0; $i<intval($_REQUEST['tables_nb_champs']); $i++) + { + $obj->setVar('champ_id', $_REQUEST['champ_id']); + $obj->setVar('champ_name', $_REQUEST['champ_name']); + $obj->setVar('champ_tables_nb_champs', $_REQUEST['champ_tables_nb_champs']); + $obj->setVar('champ_tables_champs', $_REQUEST['champ_tables_champs']); + $obj->setVar('champ_type', $_REQUEST['champ_type']); + $obj->setVar('champ_value', $_REQUEST['champ_value']); + $obj->setVar('champ_attribute', $_REQUEST['champ_attribute']); + $obj->setVar('champ_null', $_REQUEST['champ_null']); + $obj->setVar('champ_default', $_REQUEST['champ_default']); + $obj->setVar('champ_key', $_REQUEST['champ_key']); + $obj->setVar('champ_parameters', $_REQUEST['champ_parameters']); + $obj->setVar('champ_elements_id', $_REQUEST['champ_elements_id']); + $obj->setVar('champ_elements_value', $_REQUEST['champ_elements_value']); + $obj->setVar('champ_elements_name', $_REQUEST['champ_elements_name']); + $obj->setVar('champ_elements_admin', $_REQUEST['champ_elements_admin']); + $obj->setVar('champ_elements_user', $_REQUEST['champ_elements_block']); + $obj->setVar('champ_elements_mfield', $_REQUEST['champ_elements_mfield']); + $obj->setVar('champ_elements_search', $_REQUEST['champ_elements_search']); + $obj->setVar('champ_elements_required', $_REQUEST['champ_elements_required']); + } */ + + //Name of the module + $modules =& $modsHandler->get($_REQUEST['tables_modules']); + $modules_name = $modsHandler->getVar('modules_name'); + + $obj->setVar('tables_modules', $_REQUEST['tables_modules']); + $obj->setVar('tables_module_table', strtolower($modules_name.'_'.$_REQUEST['tables_name'])); + $obj->setVar('tables_name', strtolower($_REQUEST['tables_name'])); + $obj->setVar('tables_name_empty', $_REQUEST['tables_name_empty']); + $obj->setVar('tables_blocks', $_REQUEST['tables_blocks']); + $obj->setVar('tables_display_admin', $_REQUEST['tables_display_admin']); + $obj->setVar('tables_display_user', $_REQUEST['tables_display_user']); + $obj->setVar('tables_submitter', $_REQUEST['tables_submitter']); + $obj->setVar('tables_publisher', $_REQUEST['tables_publisher']); + $obj->setVar('tables_created', $_REQUEST['tables_created']); + $obj->setVar('tables_published', $_REQUEST['tables_published']); + $obj->setVar('tables_expired', $_REQUEST['tables_expired']); + $obj->setVar('tables_status', $_REQUEST['tables_status']); + $obj->setVar('tables_online', $_REQUEST['tables_online']); + $obj->setVar('tables_pending', $_REQUEST['tables_pending']); + $obj->setVar('tables_search', $_REQUEST['tables_search']); + $obj->setVar('tables_coms', $_REQUEST['tables_coms']); + $obj->setVar('tables_nb_champs', $_REQUEST['tables_nb_champs']); + + //Image + include_once XOOPS_ROOT_PATH.'/class/uploader.php'; + if(!is_dir($pathImageAdmin)){ + $uploaddir = $pathImageAdmin; + }else{ + $uploaddir = XOOPS_ROOT_PATH . "/modules/".$xoopsModule->dirname()."/images/uploads/tables/"; } - } else { - $obj->setVar('tables_img', $_REQUEST['tables_img']); - }*/ + $uploader = new XoopsMediaUploader($uploaddir, "gif|jpeg|pjpeg|png", 104857600, null, null); - if ($tblsHandler->insert($obj)) { - $tables_id = $GLOBALS['xoopsDB']->getInsertId(); - $obj = $tblsHandler->get($tables_id); - $form = $obj->getFormChamps(); - $form->display(); + if ($uploader->fetchMedia($_POST['xoops_upload_file'][0])) { + $extension = preg_replace( "/^.+\.([^.]+)$/sU" , "\\1" , $_FILES["attachedfile"]['name']) ; + $name_img = $_REQUEST['tables_name'].'.'.$extension; + $uploader->setTargetFileName($name_img); + $uploader->fetchMedia($_POST['xoops_upload_file'][0]); + if (!$uploader->upload()) { + $errors = $uploader->getErrors(); + redirect_header("javascript:history.go(-1)",3, $errors); + } else { + $obj->setVar('tables_img', $uploader->getSavedFileName()); + } + } else { + $obj->setVar('tables_img', $_REQUEST['tables_img']); + } + + if ($tblsHandler->insert($obj)) { + $tables_id = $GLOBALS['xoopsDB']->getInsertId(); + $obj = $tblsHandler->get($_REQUEST['tables_id']); + $form = $obj->getFormChamps(); + $form->display(); + } + } else { + redirect_header('tables.php?op=tables_list', 2, _AM_TDMCREATE_TABLES_EXIST); } break; @@ -391,24 +326,24 @@ $criteria->setStart(0); $start = 0; } - $document_tri = 1; - $document_order = 1; - if (isset($_REQUEST['document_order'])) { - if ($_REQUEST['document_order']==1){ + $tri = 1; + $order = 1; + if (isset($_REQUEST['order'])) { + if ($_REQUEST['order']==1){ $criteria->setOrder('ASC'); - $document_order=1; + $order=1; } - if ($_REQUEST['document_order']==2){ + if ($_REQUEST['order']==2){ $criteria->setOrder('DESC'); - $document_order=2; + $order=2; } } else { $criteria->setOrder('DESC'); } - $mods_arr = $modsHandler->getall($criteria); - include_once XOOPS_ROOT_PATH . '/class/pagenav.php'; + $mods_arr = $modsHandler->getall($criteria); if ( $numrows_modules > $limit ) { - $pagenav = new XoopsPageNav($numrows_modules, $limit, $start, 'start', 'op=modules_list&limit=' . $limit . '&document_tri=' . $document_tri. '&document_order=' . $document_order); + include_once XOOPS_ROOT_PATH . '/class/pagenav.php'; + $pagenav = new XoopsPageNav($numrows_modules, $limit, $start, 'start', 'op=modules_list&limit=' . $limit . '&tri=' . $tri. '&order=' . $order); $pagenav = $pagenav->renderNav(4); } else { $pagenav = ''; @@ -416,59 +351,47 @@ //echo "<div class='center'>".$pagenav."</div><br />"; if ( $numrows_modules > 0 ) { - echo '<table width="100%" cellspacing="1" class="outer">'; - echo '<tr>'; - echo '<th align="center" width="1%">'._AM_TDMCREATE_ID.'</th>'; - echo '<th align="center" width="12%">'._AM_TDMCREATE_NAME.'</th>'; - echo '<th align="center" width="8%">'._AM_TDMCREATE_IMAGE.'</th>'; - echo '<th align="center" width="10%">'._AM_TDMCREATE_DISPLAY_ADMIN.'</th>'; - echo '<th align="center" width="10%">'._AM_TDMCREATE_DISPLAY_USER.'</th>'; - echo '<th align="center" width="10%">'._AM_TDMCREATE_BLOCKS.'</th>'; - echo '<th align="center" width="10%">'._AM_TDMCREATE_SEARCH.'</th>'; - echo '<th align="center" width="10%">'._AM_TDMCREATE_COM.'</th>'; - echo '<th align="center" width="10%">'._AM_TDMCREATE_NB_CHAMPS.'</th>'; - echo '<th align="center" width="7%">'._AM_TDMCREATE_FORMACTION.'</th>'; - echo '</tr>'; + echo '<table width="100%" cellspacing="1" class="outer"><tr>'; + echo '<th class="center" width="1%">'._AM_TDMCREATE_ID.'</th>'; + echo '<th class="center" width="12%">'._AM_TDMCREATE_NAME.'</th>'; + echo '<th class="center" width="8%">'._AM_TDMCREATE_IMAGE.'</th>'; + echo '<th class="center" width="10%">'._AM_TDMCREATE_DISPLAY_ADMIN.'</th>'; + echo '<th class="center" width="10%">'._AM_TDMCREATE_DISPLAY_USER.'</th>'; + echo '<th class="center" width="10%">'._AM_TDMCREATE_BLOCKS.'</th>'; + echo '<th class="center" width="10%">'._AM_TDMCREATE_SEARCH.'</th>'; + echo '<th class="center" width="10%">'._AM_TDMCREATE_COMMENTS.'</th>'; + echo '<th class="center" width="10%">'._AM_TDMCREATE_NB_CHAMPS.'</th>'; + echo '<th class="center" width="7%">'._AM_TDMCREATE_FORMACTION.'</th></tr>'; $class = 'odd'; foreach (array_keys($mods_arr) as $i) { - $mods_id = $mods_arr[$i]->getVar('modules_id'); - $mods_name = $mods_arr[$i]->getVar('modules_name'); - $mods_image = $mods_arr[$i]->getVar('modules_image'); + $mods_id = $mods_arr[$i]->getVar('modules_id'); $mods_display_admin = $mods_arr[$i]->getVar('modules_display_admin'); $mods_display_user = $mods_arr[$i]->getVar('modules_display_user'); $mods_display_admin = ($mods_display_admin == 1) ? _YES : _NO; $mods_display_user = ($mods_display_user == 1) ? _YES : _NO; echo '<tr class="odd center">'; echo '<td class="center big red"><b>'.$mods_id.'</b></td>'; - echo '<td class="left big green"><b>'.$mods_name.'</b></td>'; - echo '<td><img src="../images/uploads/modules/'.$mods_image.'" height="30px"></td>'; - echo '<td>'.$mods_display_admin.'</td>'; - echo '<td>'.$mods_display_user.'</td>'; - echo '<td> </td>'; - echo '<td> </td>'; - echo '<td> </td>'; - echo '<td> </td>'; + echo '<td class="left big green"><b>'.$mods_arr[$i]->getVar('modules_name').'</b></td>'; + echo '<td><img src="../images/uploads/modules/'.$mods_arr[$i]->getVar('modules_image').'" height="30px"></td>'; + echo '<td>'.$mods_display_admin.'</td><td>'.$mods_display_user.'</td>'; + echo '<td> </td><td> </td><td> </td><td> </td>'; echo '<td class="center width5">'; - echo '<a href="tables.php?op=edit_modules&modules_id='.$mods_id.'"><img src='. $pathImageIcon ."/edit.png alt="._AM_TDMCREATE_FORMEDIT.'" title="'._AM_TDMCREATE_FORMEDIT.'"></a> <a href="tables.php?op=delete_modules&modules_id='.$mods_id.'"><img src='. $pathImageIcon ."/delete.png alt="._AM_TDMCREATE_FORMDEL.'" title="'._AM_TDMCREATE_FORMDEL.'"></a>'; - echo '</td>'; - echo '</tr>'; + echo '<a href="modules.php?op=modules_edit&modules_id='.$mods_id.'"><img src='. $pathImageIcon ."/edit.png alt="._AM_TDMCREATE_FORMEDIT.'" title="'._AM_TDMCREATE_FORMEDIT.'"></a> <a href="modules.php?op=modules_delete&modules_id='.$mods_id.'"><img src='. $pathImageIcon ."/delete.png alt="._AM_TDMCREATE_FORMDEL.'" title="'._AM_TDMCREATE_FORMDEL.'"></a>'; + echo '</td></tr>'; $criteria = new CriteriaCompo(); $criteria->add(new Criteria('tables_modules', $mods_id)); - $criteria->setSort('tables_name'); + $criteria->setSort('tables_id'); $criteria->setOrder('ASC'); $tbls_arr = $tblsHandler->getall($criteria); $numrows_tables = $tblsHandler->getCount(); if ( $numrows_tables != 0 ) { foreach (array_keys($tbls_arr) as $i) - { - $tbls_id = $tbls_arr[$i]->getVar('tables_id'); - $tbls_modules = $tbls_arr[$i]->getVar('tables_modules'); - $tbls_name = $tbls_arr[$i]->getVar('tables_name'); - $tbls_img = $tbls_arr[$i]->getVar('tables_img'); - $tbls_blocks = $tbls_arr[$i]->getVar('tables_blocks'); + { + $tbls_id = $tbls_arr[$i]->getVar('tables_id'); + $tbls_blocks = $tbls_arr[$i]->getVar('tables_blocks'); $tbls_display_admin = $tbls_arr[$i]->getVar('tables_display_admin'); $tbls_display_user = $tbls_arr[$i]->getVar('tables_display_user'); $tbls_search = $tbls_arr[$i]->getVar('tables_search'); @@ -481,22 +404,17 @@ $blocks = ($tbls_blocks == 1) ? _YES : _NO; echo '<tr class="even center">'; echo '<td class="center width5 green">'.$tbls_id.'</td>'; - echo '<td class="left"> <b>- '.$tbls_name.'</b></td>'; + echo '<td class="left"> <b>- '.$tbls_arr[$i]->getVar('tables_name').'</b></td>'; if(!is_dir($pathImageAdmin)){ - echo '<td><img src="'.$pathImageAdmin.'/'.$tbls_img.'" height="30px"></td>'; + echo '<td><img src="'.$pathImageAdmin.'/'.$tbls_arr[$i]->getVar('tables_img').'" height="30px"></td>'; }else{ - echo '<td><img src="../images/uploads/tables/'.$tbls_img.'" height="30px"></td>'; + echo '<td><img src="../images/uploads/tables/'.$tbls_arr[$i]->getVar('tables_img').'" height="30px"></td>'; } - echo '<td>'.$display_admin.'</td>'; - echo '<td>'.$display_user.'</td>'; - echo '<td>'.$blocks.'</td>'; - echo '<td>'.$search.'</td>'; - echo '<td>'.$coms.'</td>'; - echo '<td>'.$nb_champs.'</td>'; + echo '<td>'.$display_admin.'</td><td>'.$display_user.'</td><td>'.$blocks.'</td>'; + echo '<td>'.$search.'</td><td>'.$coms.'</td><td>'.$nb_champs.'</td>'; echo '<td class="center width5">'; echo '<a href="tables.php?op=edit_tables&tables_id='.$tbls_id.'"><img src='. $pathImageIcon ."/edit.png alt="._AM_TDMCREATE_FORMEDIT.'" title="'._AM_TDMCREATE_FORMEDIT.'"></a> <a href="tables.php?op=edit_champs&tables_id='.$tbls_id.'"><img src='. $pathImageIcon ."/inserttable.png alt="._AM_TDMCREATE_FORMCHAMPS.'" title="'._AM_TDMCREATE_FORMCHAMPS.'"></a> <a href="tables.php?op=delete_tables&tables_id='.$tbls_id.'"><img src='. $pathImageIcon ."/delete.png alt="._AM_TDMCREATE_FORMDEL.'" title="'._AM_TDMCREATE_FORMDEL.'"></a>'; - echo '</td>'; - echo '</tr>'; + echo '</td></tr>'; } } } Added: XoopsModules/TDMCreate/releases/1.39/TDMCreate/class/tdmcreate_architecture.php =================================================================== --- XoopsModules/TDMCreate/releases/1.39/TDMCreate/class/tdmcreate_architecture.php (rev 0) +++ XoopsModules/TDMCreate/releases/1.39/TDMCreate/class/tdmcreate_architecture.php 2012-03-10 15:07:40 UTC (rev 9117) @@ -0,0 +1,133 @@ +<?php +/** + * **************************************************************************** + * - TXModCreate By TXMod Xoops - TEAM DEV MODULE & THEMES FOR XOOPS + * - Licence GPL Copyright (c) (http://www.txmodxoops.org) ... [truncated message content] |
From: <dh...@us...> - 2012-03-08 15:11:58
|
Revision: 9116 http://xoops.svn.sourceforge.net/xoops/?rev=9116&view=rev Author: dhcst Date: 2012-03-08 15:11:47 +0000 (Thu, 08 Mar 2012) Log Message: ----------- fix templates and typo for icons Modified Paths: -------------- XoopsModules/newbb/branches/alfred/newbb/class/forum.php XoopsModules/newbb/branches/alfred/newbb/header.php XoopsModules/newbb/branches/alfred/newbb/seo_url.php XoopsModules/newbb/branches/alfred/newbb/templates/style.css Modified: XoopsModules/newbb/branches/alfred/newbb/class/forum.php =================================================================== --- XoopsModules/newbb/branches/alfred/newbb/class/forum.php 2012-03-08 09:38:30 UTC (rev 9115) +++ XoopsModules/newbb/branches/alfred/newbb/class/forum.php 2012-03-08 15:11:47 UTC (rev 9116) @@ -803,11 +803,11 @@ } $_forum_data['forum_lastpost_subject'] = $subject; } - if ($icon = $post['icon']) { - $_forum_data['forum_lastpost_icon'] = $icon; - } else { + //if ($icon = $post['icon']) { + // $_forum_data['forum_lastpost_icon'] = $icon; + //} else { $_forum_data['forum_lastpost_icon'] = 'lastposticon.png'; - } + //} endif; Modified: XoopsModules/newbb/branches/alfred/newbb/header.php =================================================================== --- XoopsModules/newbb/branches/alfred/newbb/header.php 2012-03-08 09:38:30 UTC (rev 9115) +++ XoopsModules/newbb/branches/alfred/newbb/header.php 2012-03-08 15:11:47 UTC (rev 9116) @@ -15,14 +15,32 @@ /* for seo */ $toseo_url = array("index.php","viewforum.php","viewtopic.php","rss.php"); -if(((strpos(getenv('REQUEST_URI'), '.html') === false) && !empty($xoopsModuleConfig['do_rewrite']) && (!isset($_POST) || count($_POST) <= 0))) +if(((strpos(getenv('REQUEST_URI'), '.html') === false) && !empty($xoopsModuleConfig['do_rewrite']) && (!isset($_POST) || count($_POST) <= 0))) { - if ( strpos(getenv("REQUEST_URI"),"/modules/newbb/index.php?mark_read") === false && in_array(basename(getenv('SCRIPT_NAME')),$toseo_url) && (trim(getenv("REQUEST_URI")) != '') && strpos(getenv("REQUEST_URI") , "/".REAL_MODULE_NAME."/") === false ) { - $s = "http://" . getenv('HTTP_HOST') . getenv("REQUEST_URI"); - $newurl = seo_urls('<a href="'.$s.'"></a>'); - $newurl = str_replace('<a href="','',$newurl); - $newurl = str_replace('"></a>','',$newurl); - if (!headers_sent()) { + $redir = false; + if ( strpos(getenv("REQUEST_URI"),"/".SEO_MODULE_NAME."/index.php?mark_read") === true || strpos(getenv("REQUEST_URI"),"/".REAL_MODULE_NAME."/index.php?mark_read") === true) { + // Mark Forums + } else { + if ( in_array(basename(getenv('SCRIPT_NAME')),$toseo_url) ) { + //rewrite only for files + + if ( trim(getenv("SCRIPT_NAME")) != '' ) { + if ( strpos(getenv("REQUEST_URI") , "/".REAL_MODULE_NAME."/") === false ) { + $redir = true; + } + } + } + } + + if ($redir) { + $s = "http://" . getenv('HTTP_HOST') . getenv("REQUEST_URI"); + $s = str_replace("/".preg_quote(SEO_MODULE_NAME)."/","/".preg_quote(REAL_MODULE_NAME)."/",$s); + + $newurl = seo_urls('<a href="'.preg_quote($s).'"></a>'); + $newurl = str_replace('<a href="','',preg_quote($newurl)); + $newurl = str_replace('"></a>','',preg_quote($newurl)); + + if ( !headers_sent() ) { header("HTTP/1.1 301 Moved Permanently"); header("Location: $newurl"); exit(); Modified: XoopsModules/newbb/branches/alfred/newbb/seo_url.php =================================================================== --- XoopsModules/newbb/branches/alfred/newbb/seo_url.php 2012-03-08 09:38:30 UTC (rev 9115) +++ XoopsModules/newbb/branches/alfred/newbb/seo_url.php 2012-03-08 15:11:47 UTC (rev 9116) @@ -1,7 +1,8 @@ <?php defined('XOOPS_ROOT_PATH') or die('Restricted access'); -define('REAL_MODULE_NAME', 'modules/newbb'); +define('REAL_MODULE_NAME', 'modules/newbb'); //this is for normal Module +define('SEO_MODULE_NAME', 'modules/newbb'); //this is for rewrite-Hack ob_start('seo_urls'); Modified: XoopsModules/newbb/branches/alfred/newbb/templates/style.css =================================================================== --- XoopsModules/newbb/branches/alfred/newbb/templates/style.css 2012-03-08 09:38:30 UTC (rev 9115) +++ XoopsModules/newbb/branches/alfred/newbb/templates/style.css 2012-03-08 15:11:47 UTC (rev 9116) @@ -30,13 +30,13 @@ .forum_stats_left { float: left; text-align: left; - width:49%; + width:45%; } .forum_stats_right { float: right; text-align: right; - width:49%; + width:45%; } .forum_body { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tst...@us...> - 2012-03-08 09:38:40
|
Revision: 9115 http://xoops.svn.sourceforge.net/xoops/?rev=9115&view=rev Author: tstempko Date: 2012-03-08 09:38:30 +0000 (Thu, 08 Mar 2012) Log Message: ----------- Added check if filter module is installed on server; filter module is needed by xoops (for example in admin->preferences menu), however it is not installed by default on some web server configurations. Modified Paths: -------------- XoopsCore/branches/2.5.x/2.5.5/htdocs/install/include/config.php XoopsCore/branches/2.5.x/2.5.5/htdocs/install/language/english/install.php Modified: XoopsCore/branches/2.5.x/2.5.5/htdocs/install/include/config.php =================================================================== --- XoopsCore/branches/2.5.x/2.5.5/htdocs/install/include/config.php 2012-03-08 09:21:58 UTC (rev 9114) +++ XoopsCore/branches/2.5.x/2.5.5/htdocs/install/include/config.php 2012-03-08 09:38:30 UTC (rev 9115) @@ -46,6 +46,7 @@ '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) ), + 'filter' => array('Filter', sprintf( PHP_EXTENSION, FILTER_FUNCTIONS) ), ); // Writable files and directories Modified: XoopsCore/branches/2.5.x/2.5.5/htdocs/install/language/english/install.php =================================================================== --- XoopsCore/branches/2.5.x/2.5.5/htdocs/install/language/english/install.php 2012-03-08 09:21:58 UTC (rev 9114) +++ XoopsCore/branches/2.5.x/2.5.5/htdocs/install/language/english/install.php 2012-03-08 09:38:30 UTC (rev 9115) @@ -181,6 +181,7 @@ define( "ZLIB_COMPRESSION", "Zlib Compression"); define( "IMAGE_FUNCTIONS", "Image functions"); define( "IMAGE_METAS", "Image meta data (exif)"); +define( "FILTER_FUNCTIONS", "Filter functions"); define( "ADMIN_EXIST", "The administrator account already exists.<br />Press <strong>next</strong> to go to the next step."); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tst...@us...> - 2012-03-08 09:22:09
|
Revision: 9114 http://xoops.svn.sourceforge.net/xoops/?rev=9114&view=rev Author: tstempko Date: 2012-03-08 09:21:58 +0000 (Thu, 08 Mar 2012) Log Message: ----------- 'bad ip' description corrected Modified Paths: -------------- XoopsCore/branches/2.5.x/2.5.5/htdocs/modules/system/language/english/admin/preferences.php Modified: XoopsCore/branches/2.5.x/2.5.5/htdocs/modules/system/language/english/admin/preferences.php =================================================================== --- XoopsCore/branches/2.5.x/2.5.5/htdocs/modules/system/language/english/admin/preferences.php 2012-03-07 19:42:13 UTC (rev 9113) +++ XoopsCore/branches/2.5.x/2.5.5/htdocs/modules/system/language/english/admin/preferences.php 2012-03-08 09:21:58 UTC (rev 9114) @@ -129,8 +129,8 @@ define("_MD_AM_BADUNAMESDSC", "Separate each with a <strong>|</strong>, case insensitive, regex enabled."); define("_MD_AM_DOBADIPS", "Enable IP bans?"); define("_MD_AM_DOBADIPSDSC", "Users from specified IP addresses will not be able to view your site"); -define("_MD_AM_BADIPS", "Enter IP addresses that should be banned from the site.<br />Separate each with a <strong>|</strong>, case insensitive, regex enabled."); -define("_MD_AM_BADIPSDSC", "^aaa.bbb.ccc will disallow visitors with an IP that starts with aaa.bbb.ccc<br />aaa.bbb.ccc$ will disallow visitors with an IP that ends with aaa.bbb.ccc<br />aaa.bbb.ccc will disallow visitors with an IP that contains aaa.bbb.ccc"); +define("_MD_AM_BADIPS", "Enter IP addresses that should be banned from the site.<br />Separate each with a <strong>|</strong>, case insensitive, regex enabled (so dot - '.' means 'any char' and '\.' means '.')."); +define("_MD_AM_BADIPSDSC", "^aaa\.bbb\.ccc will disallow visitors with an IP that starts with aaa.bbb.ccc<br />aaa\.bbb\.ccc$ will disallow visitors with an IP that ends with aaa.bbb.ccc<br />aaa\.bbb\.ccc will disallow visitors with an IP that contains aaa.bbb.ccc"); define("_MD_AM_PREFMAIN", "Preferences Main"); define("_MD_AM_METAKEY", "Meta Keywords"); define("_MD_AM_METAKEYDSC", "The keywords meta tag is a series of keywords that represents the content of your site. Type in keywords with each separated by a comma or a space in between. (Ex. XOOPS, PHP, mySQL, portal system)"); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <be...@us...> - 2012-03-07 19:42:25
|
Revision: 9113 http://xoops.svn.sourceforge.net/xoops/?rev=9113&view=rev Author: beckmi Date: 2012-03-07 19:42:13 +0000 (Wed, 07 Mar 2012) Log Message: ----------- restructuring folders Added Paths: ----------- XoopsModules/contact/branches/voltan/v1.8/contact/admin/ XoopsModules/contact/branches/voltan/v1.8/contact/class/ XoopsModules/contact/branches/voltan/v1.8/contact/css/ XoopsModules/contact/branches/voltan/v1.8/contact/docs/ XoopsModules/contact/branches/voltan/v1.8/contact/header.php XoopsModules/contact/branches/voltan/v1.8/contact/images/ XoopsModules/contact/branches/voltan/v1.8/contact/include/ XoopsModules/contact/branches/voltan/v1.8/contact/index.php XoopsModules/contact/branches/voltan/v1.8/contact/js/ XoopsModules/contact/branches/voltan/v1.8/contact/language/ XoopsModules/contact/branches/voltan/v1.8/contact/readme.html XoopsModules/contact/branches/voltan/v1.8/contact/sql/ XoopsModules/contact/branches/voltan/v1.8/contact/templates/ XoopsModules/contact/branches/voltan/v1.8/contact/xoops_version.php Removed Paths: ------------- XoopsModules/contact/branches/voltan/v1.8/admin/ XoopsModules/contact/branches/voltan/v1.8/class/ XoopsModules/contact/branches/voltan/v1.8/css/ XoopsModules/contact/branches/voltan/v1.8/docs/ XoopsModules/contact/branches/voltan/v1.8/header.php XoopsModules/contact/branches/voltan/v1.8/images/ XoopsModules/contact/branches/voltan/v1.8/include/ XoopsModules/contact/branches/voltan/v1.8/index.php XoopsModules/contact/branches/voltan/v1.8/js/ XoopsModules/contact/branches/voltan/v1.8/language/ XoopsModules/contact/branches/voltan/v1.8/readme.html XoopsModules/contact/branches/voltan/v1.8/sql/ XoopsModules/contact/branches/voltan/v1.8/templates/ XoopsModules/contact/branches/voltan/v1.8/xoops_version.php Copied: XoopsModules/contact/branches/voltan/v1.8/contact/header.php (from rev 9111, XoopsModules/contact/branches/voltan/v1.8/header.php) =================================================================== --- XoopsModules/contact/branches/voltan/v1.8/contact/header.php (rev 0) +++ XoopsModules/contact/branches/voltan/v1.8/contact/header.php 2012-03-07 19:42:13 UTC (rev 9113) @@ -0,0 +1,27 @@ +<?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. +*/ + +/** + * Contact module + * + * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ + * @license http://www.fsf.org/copyleft/gpl.html GNU public license + * @author Hossein Azizabadi (AKA Voltan) + * @version $Id$ + */ + +include "../../mainfile.php"; +include XOOPS_ROOT_PATH."/modules/contact/class/contact.php"; +include_once XOOPS_ROOT_PATH."/class/xoopsformloader.php"; + +$contact_handler = & xoops_getModuleHandler ( 'contact', 'contact' ); + +?> \ No newline at end of file Copied: XoopsModules/contact/branches/voltan/v1.8/contact/index.php (from rev 9111, XoopsModules/contact/branches/voltan/v1.8/index.php) =================================================================== --- XoopsModules/contact/branches/voltan/v1.8/contact/index.php (rev 0) +++ XoopsModules/contact/branches/voltan/v1.8/contact/index.php 2012-03-07 19:42:13 UTC (rev 9113) @@ -0,0 +1,89 @@ +<?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. +*/ + +/** + * Contact module + * + * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ + * @license http://www.fsf.org/copyleft/gpl.html GNU public license + * @author Hossein Azizabadi (AKA Voltan) + * @version $Id$ + */ + +include 'header.php'; +$xoopsOption['template_main'] = 'contact_index.html'; + +include XOOPS_ROOT_PATH."/header.php"; + +global $xoopsConfig, $xoopsOption, $xoopsTpl, $xoopsUser, $xoopsUserIsAdmin, $xoopsLogger; + +$op = $contact_handler->Contact_CleanVars($_POST, 'op', 'form', 'string'); +$department = $contact_handler->Contact_CleanVars($_GET, 'department', '', 'string'); + +switch($op) { + case 'form': default: + $obj = $contact_handler->create(); + $form = $obj->Contact_ContactForm($department); + $xoopsTpl->assign('form', $form->render()); + $xoopsTpl->assign('info', xoops_getModuleOption('contact_info','contact')); + break; + + case 'save': + + if (empty($_POST['submit']) | !$GLOBALS['xoopsSecurity']->check()) { + redirect_header ( XOOPS_URL, 3, _MD_CONTACT_MES_ERROR ); + exit(); + } else { + + // check captcha + xoops_load("captcha"); + $xoopsCaptcha = XoopsCaptcha::getInstance(); + if ( !$xoopsCaptcha->verify() ) { + redirect_header ( "javascript:history.go(-1)", 1, $xoopsCaptcha->getMessage() ); + exit(); + } + + // check email + if ( !$contact_handler->Contact_CleanVars($_POST, 'contact_mail', '', 'mail') ) { + redirect_header ( "javascript:history.go(-1)", 1, _MD_CONTACT_MES_NOVALIDEMAIL ); + exit(); + } + + // Info Processing + $contact = $contact_handler->Contact_InfoProcessing($_POST); + + // insert in DB + if($saveinfo = true) { + $obj = $contact_handler->create(); + $obj->setVars ( $contact ); + if(!$contact_handler->insert ( $obj )) { + redirect_header ( "index.php", 3, _MD_CONTACT_MES_NOTSAVE ); + exit(); + } + } + + // send mail can seet message + if($sendmail = true) { + $message = $contact_handler->Contact_SendMail($contact); + } else if ($saveinfo = true) { + $message = _MD_CONTACT_MES_SAVEINDB; + } else { + $message = _MD_CONTACT_MES_SENDERROR; + } + + redirect_header ( XOOPS_URL, 3, $message ); + } + + break; +} + +include XOOPS_ROOT_PATH."/footer.php"; +?> \ No newline at end of file Copied: XoopsModules/contact/branches/voltan/v1.8/contact/readme.html (from rev 9111, XoopsModules/contact/branches/voltan/v1.8/readme.html) =================================================================== --- XoopsModules/contact/branches/voltan/v1.8/contact/readme.html (rev 0) +++ XoopsModules/contact/branches/voltan/v1.8/contact/readme.html 2012-03-07 19:42:13 UTC (rev 9113) @@ -0,0 +1,70 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> +<html> +<head> +<title>Contact v1.6 for XOOPS 2.0.13x</title> +<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> +</head> + +<body> +<h1>Contact - Not just another <u>Contact Us</u> page!</h1> +<p>The first question that always comes to mind when someone see's a module like this is - <i>Why?</i><br /><br /> +For starters, there are many other versions of a Contact Us module out there - but guess what, none of them +did what I needed, or the client I wrote this for. As with any module <a href="http://xoops.ibdeeming.com" target="_blank">XOOPS</a>@<a href="http://www.ibdeeming.com" target="_blank">IBDeeming!</a> +puts out, I always find more options and configs that can be added. I think I have stretched this one out, and +really expect it will meet most any need out there! Whew - now check this out...</p> +<h2>Contact v1.6 - Updates to email deep check and From addressee</h2> +<p>For the most part, this module is the same as v1.5. The upgrade path is very simple. The changes made are +<ul><li>New deep check validation on submitted return email addresses<ul><li>The problem was with the socket command. Added routine to verify +MX records first. This sped up the overall check routine.</li></ul></li><li>Added AAINC (XOOPS@IBDeeming! User) suggestion for Fomr email who</li></ul> +</p> +<p>Upgrading from V1.5 - V1.6 is very easy! Just copy the files, log-in as admin, go to Modules control, and Update the Contact-Us module. +If you are successful, you should see version 1.6.</p> +<h2>Contact V1.5 - Based on the original by Skalpa - but nothing like it anymore!</h2> +<p><u>Contact v1.5</u> has many new features, so many that it doesn't really look like the original. First off, there are +<b>Settings</b> and <b>General</b> configs that can be applied to the <u>Contact</u> module. +<ul> + <li>Settings + <ul> + <li>Send Confirmation Switch - Basically allows the user to copy themselves on correspondence to you of your department (more on that).</li> + <li>Collect ICQ - on or off</li> + <li>Collect URL - on or off</li> + <li>Collect Company - on or off</li> + <li>Collect Location - on or off</li> + <li>Collect Address - on or off</li> + <li>Add Security Check - Security graphic - know why? It's really easy to SPAM your site with <u>Contact</u> emails, this will help deter + <ul> + <li>Sitekey definition - allows you to seed granularity</li> + </ul> + </li> + <li>Redirect Timeout - Allows you to set how long the redirect page is shown to the user</li> + <li>Validate Domain - Allows you to actually "deep-scan" the domain and tld for validity</li> + </ul> + </li> + <li>General + <ul> + <li>Intorduction - You can turn it on, set the heading, and the text displayed. This is great for businesses that want to show off their SNAIL address and phone numbers</li> + <li>Contact heading - What is your form called?</li> + <li>Thank You message - what your user sees</li> + <li>Department Definition - this is cool! Basically you can set up departments and have them assigned to dirfferent email addresses than just the site admin.</li> + <li>More Info - Have you ever seen those commercial contact pages where you can select from various topics to get more info? Now you can do it too!</li> + </ul> + </li> +</ul> +</p> +<h2>So, How do I install <u>Contact?</u></h2> +<p>It's really simple! + <ol> + <li>Deactivate your current Contact module</li> + <li>Uninstall the current Contact module</li> + <li>Copy <u>Contact v1.5</u> top your modules directory, overwrite all files!</li> + <li>Install <u>Contact v1.5</u></li> + <li>Verify your <u>Setting</u> and <u>General</u> sections of Contact from the Admin screen</li> + <li>Done!</li> + </ol> +</p> +<h2><a href="http://xoops.ibdeeming.com" target="_blank">XOOPS</a>@<a href="http://www.ibdeeming.com" target="_blank">IBDeeming!</a> Thanks You!</h2> +<p>I appreciate you taking the time to download and use the modules created by us. If you have nay questions, you are encouraged +to stop by and post them on our site.<br /><br />If you find our modules are worthwhile, and feel +the need to somehow donate back to our time spent, feel free to visit the site and select the donation icon! We appreciate your support!</p> +</body> +</html> Copied: XoopsModules/contact/branches/voltan/v1.8/contact/xoops_version.php (from rev 9111, XoopsModules/contact/branches/voltan/v1.8/xoops_version.php) =================================================================== --- XoopsModules/contact/branches/voltan/v1.8/contact/xoops_version.php (rev 0) +++ XoopsModules/contact/branches/voltan/v1.8/contact/xoops_version.php 2012-03-07 19:42:13 UTC (rev 9113) @@ -0,0 +1,179 @@ +<?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. +*/ + +/** + * Contact module + * + * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ + * @license http://www.fsf.org/copyleft/gpl.html GNU public license + * @author Hossein Azizabadi (AKA Voltan) + * @version $Id$ + */ + +if (!defined('XOOPS_ROOT_PATH')) { + die('XOOPS root path not defined'); +} + +$moduleDirName = basename( dirname( __FILE__ ) ) ; + +$modversion['name'] = _MI_CONTACT_NAME; +$modversion['version'] = 1.8; +$modversion['description'] = _MI_CONTACT_DESC; +$modversion['credits'] = ''; +$modversion['author'] = ''; +$modversion['nickname'] = ''; +$modversion['help'] = 'page=help'; +$modversion['license'] = 'GNU GPL 2.0'; +$modversion['license_url'] = "www.gnu.org/licenses/gpl-2.0.html/"; +$modversion['official'] = 1; +$modversion['image'] = "images/contact_slogo.png"; +$modversion['dirname'] = "contact"; +$modversion['onUpdate'] = 'include/function_update.php'; +$modversion['dirmoduleadmin'] = '/Frameworks/moduleclasses/moduleadmin'; +$modversion['icons16'] = '../../Frameworks/moduleclasses/icons/16'; +$modversion['icons32'] = '../../Frameworks/moduleclasses/icons/32'; + +// DB +$modversion['sqlfile']['mysql'] = "sql/mysql.sql"; +$modversion['tables'][0] = "contact"; + +//about +$modversion["module_website_url"] = "http://www.xoops.org/"; +$modversion["module_website_name"] = "XOOPS"; +$modversion["release_date"] = "2012/2/15"; +$modversion["module_status"] = "Alpha"; +$modversion["author_website_url"] = "http://www.xoops.org/"; +$modversion["author_website_name"] = "XOOPS"; +$modversion['min_php']='5.2'; +$modversion['min_xoops']='2.5'; +$modversion['min_admin']='1.1'; + +//Admin things +$modversion['hasAdmin'] = 1; + +// Menu +$modversion['hasMain'] = 1; +$modversion['adminindex'] = "admin/index.php"; +$modversion['adminmenu'] = "admin/menu.php"; + +// Set to 1 if you want to display menu generated by system module +$modversion['system_menu'] = 1; + +// Templates +$i = 1; +$modversion['templates'][$i]['file'] = 'contact_index.html'; +$modversion['templates'][$i]['description'] = '_MI_CONTACT_TEMPLATES'; + +// Settings +$modversion['config'][] = array( + 'name' => 'break', + 'title' => '_MI_CONTACT_HEAD_OPTIONS', + 'description' => '', + 'formtype' => 'line_break', + 'valuetype' => 'textbox', + 'default' => 'head'); + +$modversion['config'][] = array( + 'name' => 'form_url', + 'title' => '_MI_CONTACT_FORM_URL', + 'description' => '_MI_CONTACT_FORM_URL_DESC', + 'formtype' => 'yesno', + 'valuetype' => 'int', + 'default' => 0); + +$modversion['config'][] = array( + 'name' => 'form_icq', + 'title' => '_MI_CONTACT_FORM_ICQ', + 'description' => '_MI_CONTACT_FORM_ICQ_DESC', + 'formtype' => 'yesno', + 'valuetype' => 'int', + 'default' => 0); + +$modversion['config'][] = array( + 'name' => 'form_company', + 'title' => '_MI_CONTACT_FORM_COMPANY', + 'description' => '_MI_CONTACT_FORM_COMPANY_DESC', + 'formtype' => 'yesno', + 'valuetype' => 'int', + 'default' => 0); + +$modversion['config'][] = array( + 'name' => 'form_location', + 'title' => '_MI_CONTACT_FORM_LOCATION', + 'description' => '_MI_CONTACT_FORM_LOCATION_DESC', + 'formtype' => 'yesno', + 'valuetype' => 'int', + 'default' => 0); + +$modversion['config'][] = array( + 'name' => 'form_phone', + 'title' => '_MI_CONTACT_FORM_PHONE', + 'description' => '_MI_CONTACT_FORM_PHONE_DESC', + 'formtype' => 'yesno', + 'valuetype' => 'int', + 'default' => 0); + +$modversion['config'][] = array( + 'name' => 'form_address', + 'title' => '_MI_CONTACT_FORM_ADDRESS', + 'description' => '_MI_CONTACT_FORM_ADDRESS_DESC', + 'formtype' => 'yesno', + 'valuetype' => 'int', + 'default' => 0); + +$modversion['config'][] = array( + 'name' => 'form_dept', + 'title' => '_MI_CONTACT_FORM_DEPT', + 'description' => '_MI_CONTACT_FORM_DEPT_DESC', + 'formtype' => 'yesno', + 'valuetype' => 'int', + 'default' => 0); + +$modversion['config'][] = array( + 'name' => 'contact_dept', + 'title' => '_MI_CONTACT_DEPT', + 'description' => '_MI_CONTACT_DEPT_DESC', + 'formtype' => 'textarea', + 'valuetype' => 'array', + 'default' => ''); + +$modversion['config'][] = array( + 'name' => 'break', + 'title' => '_MI_CONTACT_HEAD_INFO', + 'description' => '', + 'formtype' => 'line_break', + 'valuetype' => 'textbox', + 'default' => 'head'); + +$modversion['config'][] = array( + 'name' => 'contact_info', + 'title' => '_MI_CONTACT_TOPINFO', + 'description' => '_MI_CONTACT_TOPINFO_DESC', + 'formtype' => 'textarea', + 'valuetype' => 'text', + 'default' => ''); + +$modversion['config'][] = array( + 'name' => 'break', + 'title' => '_MI_CONTACT_HEAD_ADMIN', + 'description' => '', + 'formtype' => 'line_break', + 'valuetype' => 'textbox', + 'default' => 'head'); + +$modversion['config'][] = array( + 'name' => 'admin_perpage', + 'title' => '_MI_CONTACT_PERPAGE', + 'description' => '_MI_CONTACT_PERPAGE_DESC', + 'formtype' => 'textbox', + 'valuetype' => 'int', + 'default' => 10); +?> \ No newline at end of file Deleted: XoopsModules/contact/branches/voltan/v1.8/header.php =================================================================== --- XoopsModules/contact/branches/voltan/v1.8/header.php 2012-03-07 19:40:41 UTC (rev 9112) +++ XoopsModules/contact/branches/voltan/v1.8/header.php 2012-03-07 19:42:13 UTC (rev 9113) @@ -1,27 +0,0 @@ -<?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. -*/ - -/** - * Contact module - * - * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ - * @license http://www.fsf.org/copyleft/gpl.html GNU public license - * @author Hossein Azizabadi (AKA Voltan) - * @version $Id$ - */ - -include "../../mainfile.php"; -include XOOPS_ROOT_PATH."/modules/contact/class/contact.php"; -include_once XOOPS_ROOT_PATH."/class/xoopsformloader.php"; - -$contact_handler = & xoops_getModuleHandler ( 'contact', 'contact' ); - -?> \ No newline at end of file Deleted: XoopsModules/contact/branches/voltan/v1.8/index.php =================================================================== --- XoopsModules/contact/branches/voltan/v1.8/index.php 2012-03-07 19:40:41 UTC (rev 9112) +++ XoopsModules/contact/branches/voltan/v1.8/index.php 2012-03-07 19:42:13 UTC (rev 9113) @@ -1,89 +0,0 @@ -<?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. -*/ - -/** - * Contact module - * - * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ - * @license http://www.fsf.org/copyleft/gpl.html GNU public license - * @author Hossein Azizabadi (AKA Voltan) - * @version $Id$ - */ - -include 'header.php'; -$xoopsOption['template_main'] = 'contact_index.html'; - -include XOOPS_ROOT_PATH."/header.php"; - -global $xoopsConfig, $xoopsOption, $xoopsTpl, $xoopsUser, $xoopsUserIsAdmin, $xoopsLogger; - -$op = $contact_handler->Contact_CleanVars($_POST, 'op', 'form', 'string'); -$department = $contact_handler->Contact_CleanVars($_GET, 'department', '', 'string'); - -switch($op) { - case 'form': default: - $obj = $contact_handler->create(); - $form = $obj->Contact_ContactForm($department); - $xoopsTpl->assign('form', $form->render()); - $xoopsTpl->assign('info', xoops_getModuleOption('contact_info','contact')); - break; - - case 'save': - - if (empty($_POST['submit']) | !$GLOBALS['xoopsSecurity']->check()) { - redirect_header ( XOOPS_URL, 3, _MD_CONTACT_MES_ERROR ); - exit(); - } else { - - // check captcha - xoops_load("captcha"); - $xoopsCaptcha = XoopsCaptcha::getInstance(); - if ( !$xoopsCaptcha->verify() ) { - redirect_header ( "javascript:history.go(-1)", 1, $xoopsCaptcha->getMessage() ); - exit(); - } - - // check email - if ( !$contact_handler->Contact_CleanVars($_POST, 'contact_mail', '', 'mail') ) { - redirect_header ( "javascript:history.go(-1)", 1, _MD_CONTACT_MES_NOVALIDEMAIL ); - exit(); - } - - // Info Processing - $contact = $contact_handler->Contact_InfoProcessing($_POST); - - // insert in DB - if($saveinfo = true) { - $obj = $contact_handler->create(); - $obj->setVars ( $contact ); - if(!$contact_handler->insert ( $obj )) { - redirect_header ( "index.php", 3, _MD_CONTACT_MES_NOTSAVE ); - exit(); - } - } - - // send mail can seet message - if($sendmail = true) { - $message = $contact_handler->Contact_SendMail($contact); - } else if ($saveinfo = true) { - $message = _MD_CONTACT_MES_SAVEINDB; - } else { - $message = _MD_CONTACT_MES_SENDERROR; - } - - redirect_header ( XOOPS_URL, 3, $message ); - } - - break; -} - -include XOOPS_ROOT_PATH."/footer.php"; -?> \ No newline at end of file Deleted: XoopsModules/contact/branches/voltan/v1.8/readme.html =================================================================== --- XoopsModules/contact/branches/voltan/v1.8/readme.html 2012-03-07 19:40:41 UTC (rev 9112) +++ XoopsModules/contact/branches/voltan/v1.8/readme.html 2012-03-07 19:42:13 UTC (rev 9113) @@ -1,70 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> -<html> -<head> -<title>Contact v1.6 for XOOPS 2.0.13x</title> -<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> -</head> - -<body> -<h1>Contact - Not just another <u>Contact Us</u> page!</h1> -<p>The first question that always comes to mind when someone see's a module like this is - <i>Why?</i><br /><br /> -For starters, there are many other versions of a Contact Us module out there - but guess what, none of them -did what I needed, or the client I wrote this for. As with any module <a href="http://xoops.ibdeeming.com" target="_blank">XOOPS</a>@<a href="http://www.ibdeeming.com" target="_blank">IBDeeming!</a> -puts out, I always find more options and configs that can be added. I think I have stretched this one out, and -really expect it will meet most any need out there! Whew - now check this out...</p> -<h2>Contact v1.6 - Updates to email deep check and From addressee</h2> -<p>For the most part, this module is the same as v1.5. The upgrade path is very simple. The changes made are -<ul><li>New deep check validation on submitted return email addresses<ul><li>The problem was with the socket command. Added routine to verify -MX records first. This sped up the overall check routine.</li></ul></li><li>Added AAINC (XOOPS@IBDeeming! User) suggestion for Fomr email who</li></ul> -</p> -<p>Upgrading from V1.5 - V1.6 is very easy! Just copy the files, log-in as admin, go to Modules control, and Update the Contact-Us module. -If you are successful, you should see version 1.6.</p> -<h2>Contact V1.5 - Based on the original by Skalpa - but nothing like it anymore!</h2> -<p><u>Contact v1.5</u> has many new features, so many that it doesn't really look like the original. First off, there are -<b>Settings</b> and <b>General</b> configs that can be applied to the <u>Contact</u> module. -<ul> - <li>Settings - <ul> - <li>Send Confirmation Switch - Basically allows the user to copy themselves on correspondence to you of your department (more on that).</li> - <li>Collect ICQ - on or off</li> - <li>Collect URL - on or off</li> - <li>Collect Company - on or off</li> - <li>Collect Location - on or off</li> - <li>Collect Address - on or off</li> - <li>Add Security Check - Security graphic - know why? It's really easy to SPAM your site with <u>Contact</u> emails, this will help deter - <ul> - <li>Sitekey definition - allows you to seed granularity</li> - </ul> - </li> - <li>Redirect Timeout - Allows you to set how long the redirect page is shown to the user</li> - <li>Validate Domain - Allows you to actually "deep-scan" the domain and tld for validity</li> - </ul> - </li> - <li>General - <ul> - <li>Intorduction - You can turn it on, set the heading, and the text displayed. This is great for businesses that want to show off their SNAIL address and phone numbers</li> - <li>Contact heading - What is your form called?</li> - <li>Thank You message - what your user sees</li> - <li>Department Definition - this is cool! Basically you can set up departments and have them assigned to dirfferent email addresses than just the site admin.</li> - <li>More Info - Have you ever seen those commercial contact pages where you can select from various topics to get more info? Now you can do it too!</li> - </ul> - </li> -</ul> -</p> -<h2>So, How do I install <u>Contact?</u></h2> -<p>It's really simple! - <ol> - <li>Deactivate your current Contact module</li> - <li>Uninstall the current Contact module</li> - <li>Copy <u>Contact v1.5</u> top your modules directory, overwrite all files!</li> - <li>Install <u>Contact v1.5</u></li> - <li>Verify your <u>Setting</u> and <u>General</u> sections of Contact from the Admin screen</li> - <li>Done!</li> - </ol> -</p> -<h2><a href="http://xoops.ibdeeming.com" target="_blank">XOOPS</a>@<a href="http://www.ibdeeming.com" target="_blank">IBDeeming!</a> Thanks You!</h2> -<p>I appreciate you taking the time to download and use the modules created by us. If you have nay questions, you are encouraged -to stop by and post them on our site.<br /><br />If you find our modules are worthwhile, and feel -the need to somehow donate back to our time spent, feel free to visit the site and select the donation icon! We appreciate your support!</p> -</body> -</html> Deleted: XoopsModules/contact/branches/voltan/v1.8/xoops_version.php =================================================================== --- XoopsModules/contact/branches/voltan/v1.8/xoops_version.php 2012-03-07 19:40:41 UTC (rev 9112) +++ XoopsModules/contact/branches/voltan/v1.8/xoops_version.php 2012-03-07 19:42:13 UTC (rev 9113) @@ -1,179 +0,0 @@ -<?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. -*/ - -/** - * Contact module - * - * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ - * @license http://www.fsf.org/copyleft/gpl.html GNU public license - * @author Hossein Azizabadi (AKA Voltan) - * @version $Id$ - */ - -if (!defined('XOOPS_ROOT_PATH')) { - die('XOOPS root path not defined'); -} - -$moduleDirName = basename( dirname( __FILE__ ) ) ; - -$modversion['name'] = _MI_CONTACT_NAME; -$modversion['version'] = 1.8; -$modversion['description'] = _MI_CONTACT_DESC; -$modversion['credits'] = ''; -$modversion['author'] = ''; -$modversion['nickname'] = ''; -$modversion['help'] = 'page=help'; -$modversion['license'] = 'GNU GPL 2.0'; -$modversion['license_url'] = "www.gnu.org/licenses/gpl-2.0.html/"; -$modversion['official'] = 1; -$modversion['image'] = "images/contact_slogo.png"; -$modversion['dirname'] = "contact"; -$modversion['onUpdate'] = 'include/function_update.php'; -$modversion['dirmoduleadmin'] = '/Frameworks/moduleclasses/moduleadmin'; -$modversion['icons16'] = '../../Frameworks/moduleclasses/icons/16'; -$modversion['icons32'] = '../../Frameworks/moduleclasses/icons/32'; - -// DB -$modversion['sqlfile']['mysql'] = "sql/mysql.sql"; -$modversion['tables'][0] = "contact"; - -//about -$modversion["module_website_url"] = "http://www.xoops.org/"; -$modversion["module_website_name"] = "XOOPS"; -$modversion["release_date"] = "2012/2/15"; -$modversion["module_status"] = "Alpha"; -$modversion["author_website_url"] = "http://www.xoops.org/"; -$modversion["author_website_name"] = "XOOPS"; -$modversion['min_php']='5.2'; -$modversion['min_xoops']='2.5'; -$modversion['min_admin']='1.1'; - -//Admin things -$modversion['hasAdmin'] = 1; - -// Menu -$modversion['hasMain'] = 1; -$modversion['adminindex'] = "admin/index.php"; -$modversion['adminmenu'] = "admin/menu.php"; - -// Set to 1 if you want to display menu generated by system module -$modversion['system_menu'] = 1; - -// Templates -$i = 1; -$modversion['templates'][$i]['file'] = 'contact_index.html'; -$modversion['templates'][$i]['description'] = '_MI_CONTACT_TEMPLATES'; - -// Settings -$modversion['config'][] = array( - 'name' => 'break', - 'title' => '_MI_CONTACT_HEAD_OPTIONS', - 'description' => '', - 'formtype' => 'line_break', - 'valuetype' => 'textbox', - 'default' => 'head'); - -$modversion['config'][] = array( - 'name' => 'form_url', - 'title' => '_MI_CONTACT_FORM_URL', - 'description' => '_MI_CONTACT_FORM_URL_DESC', - 'formtype' => 'yesno', - 'valuetype' => 'int', - 'default' => 0); - -$modversion['config'][] = array( - 'name' => 'form_icq', - 'title' => '_MI_CONTACT_FORM_ICQ', - 'description' => '_MI_CONTACT_FORM_ICQ_DESC', - 'formtype' => 'yesno', - 'valuetype' => 'int', - 'default' => 0); - -$modversion['config'][] = array( - 'name' => 'form_company', - 'title' => '_MI_CONTACT_FORM_COMPANY', - 'description' => '_MI_CONTACT_FORM_COMPANY_DESC', - 'formtype' => 'yesno', - 'valuetype' => 'int', - 'default' => 0); - -$modversion['config'][] = array( - 'name' => 'form_location', - 'title' => '_MI_CONTACT_FORM_LOCATION', - 'description' => '_MI_CONTACT_FORM_LOCATION_DESC', - 'formtype' => 'yesno', - 'valuetype' => 'int', - 'default' => 0); - -$modversion['config'][] = array( - 'name' => 'form_phone', - 'title' => '_MI_CONTACT_FORM_PHONE', - 'description' => '_MI_CONTACT_FORM_PHONE_DESC', - 'formtype' => 'yesno', - 'valuetype' => 'int', - 'default' => 0); - -$modversion['config'][] = array( - 'name' => 'form_address', - 'title' => '_MI_CONTACT_FORM_ADDRESS', - 'description' => '_MI_CONTACT_FORM_ADDRESS_DESC', - 'formtype' => 'yesno', - 'valuetype' => 'int', - 'default' => 0); - -$modversion['config'][] = array( - 'name' => 'form_dept', - 'title' => '_MI_CONTACT_FORM_DEPT', - 'description' => '_MI_CONTACT_FORM_DEPT_DESC', - 'formtype' => 'yesno', - 'valuetype' => 'int', - 'default' => 0); - -$modversion['config'][] = array( - 'name' => 'contact_dept', - 'title' => '_MI_CONTACT_DEPT', - 'description' => '_MI_CONTACT_DEPT_DESC', - 'formtype' => 'textarea', - 'valuetype' => 'array', - 'default' => ''); - -$modversion['config'][] = array( - 'name' => 'break', - 'title' => '_MI_CONTACT_HEAD_INFO', - 'description' => '', - 'formtype' => 'line_break', - 'valuetype' => 'textbox', - 'default' => 'head'); - -$modversion['config'][] = array( - 'name' => 'contact_info', - 'title' => '_MI_CONTACT_TOPINFO', - 'description' => '_MI_CONTACT_TOPINFO_DESC', - 'formtype' => 'textarea', - 'valuetype' => 'text', - 'default' => ''); - -$modversion['config'][] = array( - 'name' => 'break', - 'title' => '_MI_CONTACT_HEAD_ADMIN', - 'description' => '', - 'formtype' => 'line_break', - 'valuetype' => 'textbox', - 'default' => 'head'); - -$modversion['config'][] = array( - 'name' => 'admin_perpage', - 'title' => '_MI_CONTACT_PERPAGE', - 'description' => '_MI_CONTACT_PERPAGE_DESC', - 'formtype' => 'textbox', - 'valuetype' => 'int', - 'default' => 10); -?> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <be...@us...> - 2012-03-07 19:40:52
|
Revision: 9112 http://xoops.svn.sourceforge.net/xoops/?rev=9112&view=rev Author: beckmi Date: 2012-03-07 19:40:41 +0000 (Wed, 07 Mar 2012) Log Message: ----------- restructuring folders Added Paths: ----------- XoopsModules/contact/branches/voltan/v1.8/contact/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <be...@us...> - 2012-03-07 19:39:55
|
Revision: 9111 http://xoops.svn.sourceforge.net/xoops/?rev=9111&view=rev Author: beckmi Date: 2012-03-07 19:39:49 +0000 (Wed, 07 Mar 2012) Log Message: ----------- restructuring folders Added Paths: ----------- XoopsModules/contact/branches/voltan/v1.8/ Removed Paths: ------------- XoopsModules/contact/branches/v1.8/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <be...@us...> - 2012-03-07 19:38:34
|
Revision: 9110 http://xoops.svn.sourceforge.net/xoops/?rev=9110&view=rev Author: beckmi Date: 2012-03-07 19:38:28 +0000 (Wed, 07 Mar 2012) Log Message: ----------- restructuring folders Added Paths: ----------- XoopsModules/contact/branches/voltan/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dj...@us...> - 2012-03-07 18:44:17
|
Revision: 9109 http://xoops.svn.sourceforge.net/xoops/?rev=9109&view=rev Author: djculex Date: 2012-03-07 18:44:06 +0000 (Wed, 07 Mar 2012) Log Message: ----------- Modified Paths: -------------- XoopsModules/smallworld/trunk/smallworld/docs/changelog.txt Modified: XoopsModules/smallworld/trunk/smallworld/docs/changelog.txt =================================================================== --- XoopsModules/smallworld/trunk/smallworld/docs/changelog.txt 2012-03-07 18:43:19 UTC (rev 9108) +++ XoopsModules/smallworld/trunk/smallworld/docs/changelog.txt 2012-03-07 18:44:06 UTC (rev 9109) @@ -21,6 +21,7 @@ - Bugfix: Correction language/danish/js/bookmark.js - Bugfix: Calculating age in profile was (-1 year) when month == this month. Now only if day < this day - Bugfix: added some return false; or e.preventDefault; to js functions +- Bugfix: After pressing 'more' - avatar size in comment is wrong - Change: Preparing test for adding js / css to templates via function based on request page ------------------------------ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dj...@us...> - 2012-03-07 18:43:31
|
Revision: 9108 http://xoops.svn.sourceforge.net/xoops/?rev=9108&view=rev Author: djculex Date: 2012-03-07 18:43:19 +0000 (Wed, 07 Mar 2012) Log Message: ----------- - Bugfix: After pressing 'more' - avatar size in comment is wrong - Various css theme includes removed Modified Paths: -------------- XoopsModules/smallworld/trunk/smallworld/include/functions.php XoopsModules/smallworld/trunk/smallworld/js/smallworld.js XoopsModules/smallworld/trunk/smallworld/loadmore.php XoopsModules/smallworld/trunk/smallworld/templates/getmore.html Modified: XoopsModules/smallworld/trunk/smallworld/include/functions.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/include/functions.php 2012-03-07 17:09:19 UTC (rev 9107) +++ XoopsModules/smallworld/trunk/smallworld/include/functions.php 2012-03-07 18:43:19 UTC (rev 9108) @@ -882,8 +882,7 @@ $geolocate = $moduleConfig['geolocate']; } $xoTheme->addStylesheet(XOOPS_URL.'/modules/smallworld/css/base/jquery.ui.all.css'); - $xoTheme->addStylesheet(XOOPS_URL.'/modules/smallworld/css/smallworld.css'); - $xoTheme->addStylesheet(XOOPS_URL.'/modules/smallworld/css/apprise.css'); + $xoTheme->addStylesheet(XOOPS_URL.'/modules/smallworld/css/smallworld.css'); $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery-1.7.1.min.js'); $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery-ui-1.8.11.custom.js'); @@ -945,10 +944,9 @@ $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery.countdown.js'); $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery.innerfade.js'); $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery.colorbox.js'); - $xoTheme->addStylesheet(XOOPS_URL.'/modules/smallworld/css/colorbox.css'); - if ($p == 'register' || $p == 'editprofile') { + if ($p == 'register' || $p == 'editprofile' || $p == '') { $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery.validate.js'); $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery.validation.functions.js'); $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery.stepy.js'); @@ -980,8 +978,9 @@ ); } } - if ($p == 'index') { + if ($p == 'index' || $p == '') { $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery.oembed.js'); + $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery.countdown.js'); $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/wall.js'); $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/ajaxupload.3.5.js'); $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery.avatar_helper.js'); @@ -999,7 +998,7 @@ } } - if ($p == 'gallery') { + if ($p == 'gallery' || $p == '') { $xoTheme->addStylesheet(XOOPS_URL.'/modules/smallworld/css/galleriffic-5.css'); $xoTheme->addStylesheet(XOOPS_URL.'/modules/smallworld/css/basic.css'); $xoTheme->addStylesheet(XOOPS_URL.'/modules/smallworld/css/black.css'); @@ -1010,7 +1009,7 @@ $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery.elastic.source.js'); } - if ($p == 'imageupload') { + if ($p == 'imageupload' || $p == '') { $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery.fileupload-uix.js'); $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery.fileupload-ui.js'); $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery.fileupload.js'); @@ -1018,7 +1017,7 @@ $xoTheme->addStylesheet(XOOPS_URL.'/modules/smallworld/css/jquery.fileupload-ui.css'); } - if ($p == 'userprofile' || $p == 'friends') { + if ($p == 'userprofile' || $p == 'friends' || $p == '') { $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/apprise-1.5.full.js'); $xoTheme->addStylesheet(XOOPS_URL.'/modules/smallworld/css/jquery.fileupload-ui.css'); $xoTheme->addStylesheet(XOOPS_URL.'/modules/smallworld/css/oembed.css'); @@ -1040,7 +1039,7 @@ } - if ($p == 'perma' || $p == 'share') { + if ($p == 'perma' || $p == 'share' || $p == '') { $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery.oembed.js'); $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/wall.js'); $xoTheme->addStylesheet(XOOPS_URL.'/modules/smallworld/css/oembed.css'); Modified: XoopsModules/smallworld/trunk/smallworld/js/smallworld.js =================================================================== --- XoopsModules/smallworld/trunk/smallworld/js/smallworld.js 2012-03-07 17:09:19 UTC (rev 9107) +++ XoopsModules/smallworld/trunk/smallworld/js/smallworld.js 2012-03-07 18:43:19 UTC (rev 9108) @@ -567,13 +567,15 @@ }); } - xoops_smallworld('#smallworld_stats_scroller').innerfade({ - animationtype: 'fade', - speed: 1200, - timeout: 10000, - type: 'sequence', - containerheight: '50px' - }); + if (xoops_smallworld("#smallworld_stats_scroller").length > 0) { + xoops_smallworld('#smallworld_stats_scroller').innerfade({ + animationtype: 'fade', + speed: 1200, + timeout: 10000, + type: 'sequence', + containerheight: '50px' + }); + } // Return jSon with count of friends smallworld_getCountFriendMessagesEtcJS(); Modified: XoopsModules/smallworld/trunk/smallworld/loadmore.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/loadmore.php 2012-03-07 17:09:19 UTC (rev 9107) +++ XoopsModules/smallworld/trunk/smallworld/loadmore.php 2012-03-07 18:43:19 UTC (rev 9108) @@ -45,8 +45,10 @@ $tpl->assign('isadminuser', 'YES'); } - $myavatar = $Wall->Gravatar($id); - $myavatarlink = smallworld_getAvatarLink($id, $myavatar); + $myavatar = $Wall->Gravatar($id); + $myavatarlink = smallworld_getAvatarLink($id, $myavatar); + $myavatar_size = smallworld_getImageSize(80, 100, $myavatarlink); + $myavatar_highwide = smallworld_imageResize($myavatar_size[0], $myavatar_size[1], 35); $followers = Smallworld_array_flatten($Wall->getFollowers($id),0); if ($page == 'index') { @@ -112,5 +114,6 @@ $tpl->assign('pagename',$page); $tpl->assign('myavatar',$myavatar); $tpl->assign('myavatarlink',$myavatarlink); +$tpl->assign('myavatar_highwide',$myavatar_highwide); $tpl->display(XOOPS_ROOT_PATH .'/modules/smallworld/templates/getmore.html'); ?> Modified: XoopsModules/smallworld/trunk/smallworld/templates/getmore.html =================================================================== --- XoopsModules/smallworld/trunk/smallworld/templates/getmore.html 2012-03-07 17:09:19 UTC (rev 9107) +++ XoopsModules/smallworld/trunk/smallworld/templates/getmore.html 2012-03-07 18:43:19 UTC (rev 9108) @@ -95,7 +95,7 @@ </div> <!-- smallworld_commentcontainer --> <div class="smallworld_commentupdate" style='display:none' id='smallworld_commentbox<{$post.msg_id}>'> <div class="smallworld_stcommentimg"> - <img src="<{$myavatarlink}>" class='smallworld_small_face' <{$comm[i].avatar_highwide}>/> + <img src="<{$myavatarlink}>" class='smallworld_small_face' <{$myavatar_highwide}>/> </div> <div class="smallworld_stcommenttext" > <form method="post" action=""> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dj...@us...> - 2012-03-07 17:09:29
|
Revision: 9107 http://xoops.svn.sourceforge.net/xoops/?rev=9107&view=rev Author: djculex Date: 2012-03-07 17:09:19 +0000 (Wed, 07 Mar 2012) Log Message: ----------- Modified Paths: -------------- XoopsModules/smallworld/trunk/smallworld/include/functions.php XoopsModules/smallworld/trunk/smallworld/preloads/core.php Modified: XoopsModules/smallworld/trunk/smallworld/include/functions.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/include/functions.php 2012-03-07 16:36:39 UTC (rev 9106) +++ XoopsModules/smallworld/trunk/smallworld/include/functions.php 2012-03-07 17:09:19 UTC (rev 9107) @@ -145,13 +145,13 @@ $yearDiff = date("Y") - $year; $monthDiff = date("m") - $month; $dayDiff = date("d") - $day; - if ($MonthDiff == 0){ - if($DayDiff < 0) { - $YearDiff--; + if ($monthDiff == 0){ + if($dayDiff < 0) { + $yearDiff--; } } - if ($MonthDiff < 0){ - $YearDiff--; + if ($monthDiff < 0){ + $yearDiff--; } return $yearDiff; } Modified: XoopsModules/smallworld/trunk/smallworld/preloads/core.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/preloads/core.php 2012-03-07 16:36:39 UTC (rev 9106) +++ XoopsModules/smallworld/trunk/smallworld/preloads/core.php 2012-03-07 17:09:19 UTC (rev 9107) @@ -35,8 +35,6 @@ if ($module) { $moduleConfig =& $config_handler->getConfigsByCat(0, $module->getVar('mid')); } - //Check Language - $lang = $xoopsConfig['language']; // check geolocation style if(isset($moduleConfig['geolocate'])) { $geolocate = $moduleConfig['geolocate']; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tst...@us...> - 2012-03-07 16:36:48
|
Revision: 9106 http://xoops.svn.sourceforge.net/xoops/?rev=9106&view=rev Author: tstempko Date: 2012-03-07 16:36:39 +0000 (Wed, 07 Mar 2012) Log Message: ----------- bad ip description corrected Modified Paths: -------------- XoopsCore/trunk/htdocs/modules/system/language/english/admin/preferences.php Modified: XoopsCore/trunk/htdocs/modules/system/language/english/admin/preferences.php =================================================================== --- XoopsCore/trunk/htdocs/modules/system/language/english/admin/preferences.php 2012-03-07 16:27:29 UTC (rev 9105) +++ XoopsCore/trunk/htdocs/modules/system/language/english/admin/preferences.php 2012-03-07 16:36:39 UTC (rev 9106) @@ -129,8 +129,8 @@ define("_MD_AM_BADUNAMESDSC", "Separate each with a <strong>|</strong>, case insensitive, regex enabled."); define("_MD_AM_DOBADIPS", "Enable IP bans?"); define("_MD_AM_DOBADIPSDSC", "Users from specified IP addresses will not be able to view your site"); -define("_MD_AM_BADIPS", "Enter IP addresses that should be banned from the site.<br />Separate each with a <strong>|</strong>, case insensitive, regex enabled."); -define("_MD_AM_BADIPSDSC", "^aaa.bbb.ccc will disallow visitors with an IP that starts with aaa.bbb.ccc<br />aaa.bbb.ccc$ will disallow visitors with an IP that ends with aaa.bbb.ccc<br />aaa.bbb.ccc will disallow visitors with an IP that contains aaa.bbb.ccc"); +define("_MD_AM_BADIPS", "Enter IP addresses that should be banned from the site.<br />Separate each with a <strong>|</strong>, case insensitive, regex enabled (so dot - '.' means 'any char')."); +define("_MD_AM_BADIPSDSC", "^aaa\.bbb\.ccc will disallow visitors with an IP that starts with aaa.bbb.ccc<br />aaa\.bbb\.ccc$ will disallow visitors with an IP that ends with aaa.bbb.ccc<br />aaa\.bbb\.ccc will disallow visitors with an IP that contains aaa.bbb.ccc"); define("_MD_AM_PREFMAIN", "Preferences Main"); define("_MD_AM_METAKEY", "Meta Keywords"); define("_MD_AM_METAKEYDSC", "The keywords meta tag is a series of keywords that represents the content of your site. Type in keywords with each separated by a comma or a space in between. (Ex. XOOPS, PHP, mySQL, portal system)"); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tst...@us...> - 2012-03-07 16:27:39
|
Revision: 9105 http://xoops.svn.sourceforge.net/xoops/?rev=9105&view=rev Author: tstempko Date: 2012-03-07 16:27:29 +0000 (Wed, 07 Mar 2012) Log Message: ----------- Modified Paths: -------------- XoopsLanguages/polish/core/2.5.4/htdocs/modules/system/language/polish/admin/preferences.php Modified: XoopsLanguages/polish/core/2.5.4/htdocs/modules/system/language/polish/admin/preferences.php =================================================================== --- XoopsLanguages/polish/core/2.5.4/htdocs/modules/system/language/polish/admin/preferences.php 2012-03-07 03:58:13 UTC (rev 9104) +++ XoopsLanguages/polish/core/2.5.4/htdocs/modules/system/language/polish/admin/preferences.php 2012-03-07 16:27:29 UTC (rev 9105) @@ -147,8 +147,8 @@ define("_MD_AM_BADUNAMESDSC", "Odziel je używając <strong>|</strong>, wielkość znaków nie ma znaczenia, można używać wyrażeń regularnych."); define("_MD_AM_DOBADIPS", "Włączyć blokowanie adresów IP?"); define("_MD_AM_DOBADIPSDSC", "Użytkownicy z podanych adresów IP nie będą mieli dostępu do strony"); -define("_MD_AM_BADIPS", "Podaj adresy IP, które powinny być blokowane.<br />Oddziel je używając <strong>|</strong>, wielkość liter nie ma znaczenia, można używać wyrażeń regularnych."); -define("_MD_AM_BADIPSDSC", "^aaa.bbb.ccc zablokuje użytkowników, których IP zaczyna się od aaa.bbb.ccc<br />aaa.bbb.ccc$ zablokuje użytkowników, których IP kończy się na aaa.bbb.ccc<br />aaa.bbb.ccc zablokuje użytkowników z IP zawierającym aaa.bbb.ccc"); +define("_MD_AM_BADIPS", "Podaj adresy IP, które powinny być blokowane.<br />Oddziel je używając <strong>|</strong>, wielkość liter nie ma znaczenia, można używać wyrażeń regularnych (np. kropka - '.' - oznacza 'dowolny znak'."); +define("_MD_AM_BADIPSDSC", "^aaa\.bbb\.ccc zablokuje użytkowników, których IP zaczyna się od aaa.bbb.ccc<br />aaa\.bbb\.ccc$ zablokuje użytkowników, których IP kończy się na aaa.bbb.ccc<br />aaa\.bbb\.ccc zablokuje użytkowników z IP zawierającym aaa.bbb.ccc"); define("_MD_AM_PREFMAIN", "Ustawienia główne"); define("_MD_AM_METAKEY", "Słowa kluczowe (Meta Keywords)"); define("_MD_AM_METAKEYDSC", "Słowa kluczowe opisujące zawartość serwisu. Wpisz odpowiedenie słowa oddzielając przecinkami lub spacjami (np. XOOPS, PHP, MySQL, portal system)"); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dj...@us...> - 2012-03-07 03:58:23
|
Revision: 9104 http://xoops.svn.sourceforge.net/xoops/?rev=9104&view=rev Author: djculex Date: 2012-03-07 03:58:13 +0000 (Wed, 07 Mar 2012) Log Message: ----------- - Bugfix: function in preloads to define xoops_path to eighter http://www.domain or http://domain - Bugfix: No output from footer unless defined to show Modified Paths: -------------- XoopsModules/xim/releases/1.02/modules/xim/class/adminclass.php XoopsModules/xim/releases/1.02/modules/xim/include/functions.php XoopsModules/xim/releases/1.02/modules/xim/js/chat.js XoopsModules/xim/releases/1.02/modules/xim/preloads/core.php XoopsModules/xim/trunk/modules/xim/class/adminclass.php XoopsModules/xim/trunk/modules/xim/include/functions.php XoopsModules/xim/trunk/modules/xim/js/chat.js XoopsModules/xim/trunk/modules/xim/preloads/core.php Modified: XoopsModules/xim/releases/1.02/modules/xim/class/adminclass.php =================================================================== --- XoopsModules/xim/releases/1.02/modules/xim/class/adminclass.php 2012-03-07 03:53:13 UTC (rev 9103) +++ XoopsModules/xim/releases/1.02/modules/xim/class/adminclass.php 2012-03-07 03:58:13 UTC (rev 9104) @@ -236,6 +236,7 @@ function doCheckUpdate () { + global $pathIcon16; $version = $this->ModuleInstallVersion (); $critical = false; $update = false; Modified: XoopsModules/xim/releases/1.02/modules/xim/include/functions.php =================================================================== --- XoopsModules/xim/releases/1.02/modules/xim/include/functions.php 2012-03-07 03:53:13 UTC (rev 9103) +++ XoopsModules/xim/releases/1.02/modules/xim/include/functions.php 2012-03-07 03:58:13 UTC (rev 9104) @@ -135,5 +135,18 @@ $text = str_replace("\"", "'", $text); return $text; } - + + /** + * @Get url of smallworld + * @returns string + */ + function xim_getHostRequest() + { + $protocol = strpos(strtolower($_SERVER['SERVER_PROTOCOL']),'https') === FALSE ? 'http' : 'https'; + $host = $_SERVER['HTTP_HOST']; + $script = $_SERVER['SCRIPT_NAME']; + $params = $_SERVER['QUERY_STRING']; + $currentUrl = $protocol . '://' . $host; + return $currentUrl; + } ?> \ No newline at end of file Modified: XoopsModules/xim/releases/1.02/modules/xim/js/chat.js =================================================================== --- XoopsModules/xim/releases/1.02/modules/xim/js/chat.js 2012-03-07 03:53:13 UTC (rev 9103) +++ XoopsModules/xim/releases/1.02/modules/xim/js/chat.js 2012-03-07 03:58:13 UTC (rev 9104) @@ -35,11 +35,10 @@ var newMessagesUser = new Array(); var chatBoxes = new Array(); document.containers= new Object(); -xoops_im(document).ready(function(){ + var refreshId = setInterval(function() { xoops_im('#online_friends').load(xim_url+'blocks/blockupdater.php'); }, 5000); -}); xoops_im(document).ready(function(){ // if exists zetagenesis toolbar do hide it to not overlap 2 toolbars @@ -257,7 +256,9 @@ } function startChatSession(){ + if (showFooterBar !== 0) { createFooterBar(); + } if (showFooterBar==1) { setTimeout('updateUserList()',200); } Modified: XoopsModules/xim/releases/1.02/modules/xim/preloads/core.php =================================================================== --- XoopsModules/xim/releases/1.02/modules/xim/preloads/core.php 2012-03-07 03:53:13 UTC (rev 9103) +++ XoopsModules/xim/releases/1.02/modules/xim/preloads/core.php 2012-03-07 03:58:13 UTC (rev 9104) @@ -22,7 +22,7 @@ * @author Culex - homepage.: http://culex.dk & email.: cu...@cu... **/ defined('XOOPS_ROOT_PATH') or die('Restricted access'); - +include_once(XOOPS_ROOT_PATH."/modules/xim/include/functions.php"); class XimCorePreload extends XoopsPreloadItem{ function eventCoreHeaderAddmeta(){ @@ -79,7 +79,12 @@ $xoTheme->addScript(XOOPS_URL.'/modules/xim/js/jquery.metadata.js'); - $xoops_url= XOOPS_URL; + // Check if request url is with www or without + $urltest = xim_getHostRequest(); + $xoops_url = XOOPS_URL; + if (!strstr($urltest, 'www.')) { + $xoops_url = str_replace( 'www.', '', $xoops_url ); + } $script= <<<SCRIPT var xoops_url="$xoops_url"; var xim_url="$xoops_url/modules/xim/"; Modified: XoopsModules/xim/trunk/modules/xim/class/adminclass.php =================================================================== --- XoopsModules/xim/trunk/modules/xim/class/adminclass.php 2012-03-07 03:53:13 UTC (rev 9103) +++ XoopsModules/xim/trunk/modules/xim/class/adminclass.php 2012-03-07 03:58:13 UTC (rev 9104) @@ -236,6 +236,7 @@ function doCheckUpdate () { + global $pathIcon16; $version = $this->ModuleInstallVersion (); $critical = false; $update = false; Modified: XoopsModules/xim/trunk/modules/xim/include/functions.php =================================================================== --- XoopsModules/xim/trunk/modules/xim/include/functions.php 2012-03-07 03:53:13 UTC (rev 9103) +++ XoopsModules/xim/trunk/modules/xim/include/functions.php 2012-03-07 03:58:13 UTC (rev 9104) @@ -135,5 +135,18 @@ $text = str_replace("\"", "'", $text); return $text; } - + + /** + * @Get url of smallworld + * @returns string + */ + function xim_getHostRequest() + { + $protocol = strpos(strtolower($_SERVER['SERVER_PROTOCOL']),'https') === FALSE ? 'http' : 'https'; + $host = $_SERVER['HTTP_HOST']; + $script = $_SERVER['SCRIPT_NAME']; + $params = $_SERVER['QUERY_STRING']; + $currentUrl = $protocol . '://' . $host; + return $currentUrl; + } ?> \ No newline at end of file Modified: XoopsModules/xim/trunk/modules/xim/js/chat.js =================================================================== --- XoopsModules/xim/trunk/modules/xim/js/chat.js 2012-03-07 03:53:13 UTC (rev 9103) +++ XoopsModules/xim/trunk/modules/xim/js/chat.js 2012-03-07 03:58:13 UTC (rev 9104) @@ -35,11 +35,10 @@ var newMessagesUser = new Array(); var chatBoxes = new Array(); document.containers= new Object(); -xoops_im(document).ready(function(){ + var refreshId = setInterval(function() { xoops_im('#online_friends').load(xim_url+'blocks/blockupdater.php'); }, 5000); -}); xoops_im(document).ready(function(){ // if exists zetagenesis toolbar do hide it to not overlap 2 toolbars @@ -257,7 +256,9 @@ } function startChatSession(){ + if (showFooterBar !== 0) { createFooterBar(); + } if (showFooterBar==1) { setTimeout('updateUserList()',200); } Modified: XoopsModules/xim/trunk/modules/xim/preloads/core.php =================================================================== --- XoopsModules/xim/trunk/modules/xim/preloads/core.php 2012-03-07 03:53:13 UTC (rev 9103) +++ XoopsModules/xim/trunk/modules/xim/preloads/core.php 2012-03-07 03:58:13 UTC (rev 9104) @@ -22,7 +22,7 @@ * @author Culex - homepage.: http://culex.dk & email.: cu...@cu... **/ defined('XOOPS_ROOT_PATH') or die('Restricted access'); - +include_once(XOOPS_ROOT_PATH."/modules/xim/include/functions.php"); class XimCorePreload extends XoopsPreloadItem{ function eventCoreHeaderAddmeta(){ @@ -79,7 +79,12 @@ $xoTheme->addScript(XOOPS_URL.'/modules/xim/js/jquery.metadata.js'); - $xoops_url= XOOPS_URL; + // Check if request url is with www or without + $urltest = xim_getHostRequest(); + $xoops_url = XOOPS_URL; + if (!strstr($urltest, 'www.')) { + $xoops_url = str_replace( 'www.', '', $xoops_url ); + } $script= <<<SCRIPT var xoops_url="$xoops_url"; var xim_url="$xoops_url/modules/xim/"; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dj...@us...> - 2012-03-07 03:53:21
|
Revision: 9103 http://xoops.svn.sourceforge.net/xoops/?rev=9103&view=rev Author: djculex Date: 2012-03-07 03:53:13 +0000 (Wed, 07 Mar 2012) Log Message: ----------- - Bugfix: Crossdomain problem in ajax. Fixed by assigning var to function replaced Xoops_IRl based on request url. - Bugfix: preloads are multible loaded. - Bugfix: Merging a few css files into smallworld.css - Bugfix: Correction language/danish/js/bookmark.js - Bugfix: Calculating age in profile was (-1 year) when month == this month. Now only if day < this day - Bugfix: added some return false; or e.preventDefault; to js functions - Change: Preparing test for adding js / css to templates via function based on request page Modified Paths: -------------- XoopsModules/smallworld/trunk/smallworld/Get_Count.php XoopsModules/smallworld/trunk/smallworld/css/galleriffic-5.css XoopsModules/smallworld/trunk/smallworld/css/smallworld.css XoopsModules/smallworld/trunk/smallworld/docs/changelog.txt XoopsModules/smallworld/trunk/smallworld/editprofile.php XoopsModules/smallworld/trunk/smallworld/galleryshow.php XoopsModules/smallworld/trunk/smallworld/include/functions.php XoopsModules/smallworld/trunk/smallworld/index.php XoopsModules/smallworld/trunk/smallworld/js/smallworld.js XoopsModules/smallworld/trunk/smallworld/language/danish/js/jquery.ui.datepicker-language.js XoopsModules/smallworld/trunk/smallworld/language/danish/js/variables.js XoopsModules/smallworld/trunk/smallworld/preloads/core.php XoopsModules/smallworld/trunk/smallworld/register.php XoopsModules/smallworld/trunk/smallworld/templates/getlastcom.html XoopsModules/smallworld/trunk/smallworld/templates/getlastmsg.html XoopsModules/smallworld/trunk/smallworld/templates/getmore.html XoopsModules/smallworld/trunk/smallworld/templates/smallworld_userprofile_template.html XoopsModules/smallworld/trunk/smallworld/userprofile.php Modified: XoopsModules/smallworld/trunk/smallworld/Get_Count.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/Get_Count.php 2012-03-06 17:45:59 UTC (rev 9102) +++ XoopsModules/smallworld/trunk/smallworld/Get_Count.php 2012-03-07 03:53:13 UTC (rev 9103) @@ -23,8 +23,9 @@ include_once(XOOPS_ROOT_PATH."/modules/smallworld/include/functions.php"); include_once(XOOPS_ROOT_PATH."/modules/smallworld/class/class_collector.php"); -global $xoopsUser, $xoopsLogger, $xoopsDB; -$xoopsLogger->activated = false; +global $xoopsUser, $xoopsLogger, $xoopsDB, $xoopsTpl; +$xoopsLogger->activated = true; +$xoopsTpl->caching = 0; $_COOKIE[session_name()] = session_id(); if ($xoopsUser) { if($_GET['SmallworldGetUserMsgCount']) { Modified: XoopsModules/smallworld/trunk/smallworld/css/galleriffic-5.css =================================================================== --- XoopsModules/smallworld/trunk/smallworld/css/galleriffic-5.css 2012-03-06 17:45:59 UTC (rev 9102) +++ XoopsModules/smallworld/trunk/smallworld/css/galleriffic-5.css 2012-03-07 03:53:13 UTC (rev 9103) @@ -214,3 +214,116 @@ clear: both; padding-bottom: 20px; } + +html, body { +} +body{ +} +a{ + +} +a:focus, a:hover, a:active { +} +p, li { +} +h1, h2 { +} +h1 { +} +h2 { +} +pre { + font-size: 1.2em; + line-height: 1.2em; + overflow-x: auto; +} +div#page { + width: 900px; + background-color: #fff; + margin: 0 auto; + text-align: left; + border-color: #ddd; + border-style: none solid solid; + border-width: medium 1px 1px; +} +div#container { + padding: 20px; +} +div#ads { + clear: both; + padding: 12px 0 12px 66px; +} +div#footer { + clear: both; + color: #777; + margin: 0 auto; + padding: 20px 0 40px; + text-align: center; +} +#body{ + +} +a{ + +} +h2 { + +} +div#page { + +} +div#footer { + +} +div.caption-container { + +} +div.image-title { + font-weight: bold; + font-size: 1.4em; +} +div.image-desc { + border-style: solid; + border-width: 1px; + font-size: 1em; + height: 300px; + line-height: 1.3em; + padding-bottom: 12px; + padding-left: 15px; + padding-top: 12px; + overflow-x:none; + overflow-y:scroll; +} + +div.download { + margin-top: 8px; + font-size:1.0em; + margin-left: 33%; +} +div.photo-index { + + font-size:1.1em; +} +div.navigation a.prev { + background-image: url('../images/prevPageArrow.gif'); +} +div.navigation a.next { + background-image: url('../images/nextPageArrow.gif'); +} +div.loader { + background-image: url('../images/loader.gif'); +} +div.slideshow img { + +} +ul.thumbs li.selected a.thumb { + +} +div.pagination a:hover { + + font-size:1.0em; +} +div.pagination span.current { + + font-size:1.0em; +} \ No newline at end of file Modified: XoopsModules/smallworld/trunk/smallworld/css/smallworld.css =================================================================== --- XoopsModules/smallworld/trunk/smallworld/css/smallworld.css 2012-03-06 17:45:59 UTC (rev 9102) +++ XoopsModules/smallworld/trunk/smallworld/css/smallworld.css 2012-03-07 03:53:13 UTC (rev 9103) @@ -1296,4 +1296,136 @@ display: block; } -/* ------------ Tooltips ---------- */ +/* ------------ Aprice ---------- */ +.appriseOverlay + { + position:fixed; + top:0; + left:0; + background:rgba(0, 0, 0, 0.3); + display:none; + } +.appriseOuter + { + background:#eee; + border:1px solid #fff; + box-shadow:0px 3px 7px #333; + -moz-box-shadow:0px 3px 7px #333; + -webkit-box-shadow:0px 3px 7px #333; + -moz-border-radius:4px; + -webkit-border-radius:4px; + border-radius:4px; + -khtml-border-radius:4px; + position:absolute; + z-index:99999999; + min-width:200px; + min-height:50px; + max-width:75%; + position:fixed; + display:none; + } +.appriseInner + { + padding:20px; + color:#333; + text-shadow:0px 1px 0px #fff; + } +.appriseInner button + { + border:1px solid #bbb; + -moz-border-radius:3px; + -webkit-border-radius:3px; + border-radius:3px; + -khtml-border-radius:3px; + background: -moz-linear-gradient(100% 100% 90deg, #eee, #d5d5d5); + background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#eee), to(#d5d5d5)); + background: -webkit-linear-gradient(#eee, #d5d5d5); + background: -o-linear-gradient(#eee, #d5d5d5); + color:#232d3d; + font-size:12px; + font-weight:bold; + padding:4px 10px; + margin:0 3px; + text-shadow:0px 1px 0px #fff; + cursor:pointer; + box-shadow:0px 1px 2px #ccc; + -moz-box-shadow:0px 1px 2px #ccc; + -webkit-box-shadow:0px 1px 2px #ccc; + } +.appriseInner button:hover + { + color:#d85054; + } +.aButtons, .aInput + { + margin:20px 10px 0px 10px; + text-align:center; + } +.aTextbox + { + border:1px solid #aaa; + -moz-border-radius:4px; + -webkit-border-radius:4px; + border-radius:4px; + -khtml-border-radius:4px; + box-shadow:0px 1px 0px #fff; + -moz-box-shadow:0px 1px 0px #fff; + -webkit-box-shadow:0px 1px 0px #fff; + width:180px; + font-size:12px; + font-weight:bold; + padding:5px 10px; + } + +/* ------------------ Colorbox ---------------- */ +/* + ColorBox Core Style: + The following CSS is consistent between example themes and should not be altered. +*/ +#colorbox, #cboxOverlay, #cboxWrapper{position:absolute; top:0; left:0; z-index:9999; overflow:hidden;} +#cboxOverlay{position:fixed; width:100%; height:100%;} +#cboxMiddleLeft, #cboxBottomLeft{clear:left;} +#cboxContent{position:relative;} +#cboxLoadedContent{overflow:auto;} +#cboxTitle{margin:0;} +#cboxLoadingOverlay, #cboxLoadingGraphic{position:absolute; top:0; left:0; width:100%; height:100%;} +#cboxPrevious, #cboxNext, #cboxClose, #cboxSlideshow{cursor:pointer;} +.cboxPhoto{float:left; margin:auto; border:0; display:block;} +.cboxIframe{width:100%; height:100%; display:block; border:0;} + +/* + User Style: + Change the following styles to modify the appearance of ColorBox. They are + ordered & tabbed in a way that represents the nesting of the generated HTML. +*/ +#cboxOverlay{background:#000;} +#colorbox{} + #cboxTopLeft{width:14px; height:14px; background:url(../images/controls.png) no-repeat 0 0;} + #cboxTopCenter{height:14px; background:url(../images/bordercb.png) repeat-x top left;} + #cboxTopRight{width:14px; height:14px; background:url(../images/controlscb.png) no-repeat -36px 0;} + #cboxBottomLeft{width:14px; height:43px; background:url(../images/controlscb.png) no-repeat 0 -32px;} + #cboxBottomCenter{height:43px; background:url(../images/bordercb.png) repeat-x bottom left;} + #cboxBottomRight{width:14px; height:43px; background:url(../images/controlscb.png) no-repeat -36px -32px;} + #cboxMiddleLeft{width:14px; background:url(../images/controlscb.png) repeat-y -175px 0;} + #cboxMiddleRight{width:14px; background:url(../images/controlscb.png) repeat-y -211px 0;} + #cboxContent{background:#fff; overflow:visible;} + .cboxIframe{background:#fff;} + #cboxError{padding:50px; border:1px solid #ccc;} + #cboxLoadedContent{margin-bottom:5px;} + #cboxLoadingOverlay{background:url(../images/loading_backgroundcb.png) no-repeat center center;} + #cboxLoadingGraphic{background:url(../images/loadingcb.gif) no-repeat center center;} + #cboxTitle{position:absolute; bottom:-25px; left:0; text-align:center; width:100%; font-weight:bold; color:#7C7C7C;} + #cboxCurrent{position:absolute; bottom:-25px; left:58px; font-weight:bold; color:#7C7C7C;} + + #cboxPrevious, #cboxNext, #cboxClose, #cboxSlideshow{position:absolute; bottom:-29px; background:url(../images/controlscb.png) no-repeat 0px 0px; width:23px; height:23px; text-indent:-9999px;} + #cboxPrevious{left:0px; background-position: -51px -25px;} + #cboxPrevious:hover{background-position:-51px 0px;} + #cboxNext{left:27px; background-position:-75px -25px;} + #cboxNext:hover{background-position:-75px 0px;} + #cboxClose{right:0; background-position:-100px -25px;} + #cboxClose:hover{background-position:-100px 0px;} + + .cboxSlideshow_on #cboxSlideshow{background-position:-125px 0px; right:27px;} + .cboxSlideshow_on #cboxSlideshow:hover{background-position:-150px 0px;} + .cboxSlideshow_off #cboxSlideshow{background-position:-150px -25px; right:27px;} + .cboxSlideshow_off #cboxSlideshow:hover{background-position:-125px 0px;} Modified: XoopsModules/smallworld/trunk/smallworld/docs/changelog.txt =================================================================== --- XoopsModules/smallworld/trunk/smallworld/docs/changelog.txt 2012-03-06 17:45:59 UTC (rev 9102) +++ XoopsModules/smallworld/trunk/smallworld/docs/changelog.txt 2012-03-07 03:53:13 UTC (rev 9103) @@ -14,6 +14,15 @@ - Bugfix: Rankimages isset even if not existing giving error - Bugfix: el not defined in ajaxupload. Fixed by returning false if not defined +07 Marts 2012 +- Bugfix: Crossdomain problem in ajax. Fixed by assigning var to function replaced Xoops_IRl based on request url. +- Bugfix: preloads are multible loaded. +- Bugfix: Merging a few css files into smallworld.css +- Bugfix: Correction language/danish/js/bookmark.js +- Bugfix: Calculating age in profile was (-1 year) when month == this month. Now only if day < this day +- Bugfix: added some return false; or e.preventDefault; to js functions +- Change: Preparing test for adding js / css to templates via function based on request page + ------------------------------ Changelog v.1.11 RC 3 ------------------------------ Modified: XoopsModules/smallworld/trunk/smallworld/editprofile.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/editprofile.php 2012-03-06 17:45:59 UTC (rev 9102) +++ XoopsModules/smallworld/trunk/smallworld/editprofile.php 2012-03-07 03:53:13 UTC (rev 9103) @@ -318,7 +318,7 @@ $xoopsTpl->assign('smallworld_user_website',$r['website']); $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery.colorbox.js'); - $xoTheme->addStylesheet(XOOPS_URL.'/modules/smallworld/css/colorbox.css'); + $xoTheme->addStylesheet(XOOPS_URL.'/modules/smallworld/css/smallworld.css'); } } else { redirect_header("register.php", 1); Modified: XoopsModules/smallworld/trunk/smallworld/galleryshow.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/galleryshow.php 2012-03-06 17:45:59 UTC (rev 9102) +++ XoopsModules/smallworld/trunk/smallworld/galleryshow.php 2012-03-07 03:53:13 UTC (rev 9103) @@ -27,15 +27,12 @@ if ($xoopsUser) { $xoTheme->addStylesheet(XOOPS_URL.'/modules/smallworld/css/galleriffic-5.css'); - $xoTheme->addStylesheet(XOOPS_URL.'/modules/smallworld/css/basic.css'); - $xoTheme->addStylesheet(XOOPS_URL.'/modules/smallworld/css/black.css'); $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery.galleriffic.js'); $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery.history.js'); $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery.opacityrollover.js'); $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/gallery_mod.js'); $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery.innerfade.js'); - $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery.colorbox.js'); - $xoTheme->addStylesheet(XOOPS_URL.'/modules/smallworld/css/colorbox.css'); + $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery.colorbox.js'); $id = $xoopsUser->getVar('uid'); $check = new SmallWorldUser; Modified: XoopsModules/smallworld/trunk/smallworld/include/functions.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/include/functions.php 2012-03-06 17:45:59 UTC (rev 9102) +++ XoopsModules/smallworld/trunk/smallworld/include/functions.php 2012-03-07 03:53:13 UTC (rev 9103) @@ -145,9 +145,14 @@ $yearDiff = date("Y") - $year; $monthDiff = date("m") - $month; $dayDiff = date("d") - $day; - if ($dayDiff < 0 || $monthDiff < 0) { - $yearDiff--; + if ($MonthDiff == 0){ + if($DayDiff < 0) { + $YearDiff--; + } } + if ($MonthDiff < 0){ + $YearDiff--; + } return $yearDiff; } @@ -853,4 +858,211 @@ } else { return false; } - } \ No newline at end of file + } + + /** + * @Set css and js includes in pages based on $p = page + * @param string $p + * @returns void + */ + function smallworld_includeHeader($p='') + { + global $xoTheme,$xoopsUser,$xoopsConfig; + if ($xoopsUser) { + $module_handler =& xoops_gethandler('module'); + $module = $module_handler->getByDirname('smallworld'); + $config_handler =& xoops_gethandler('config'); + if ($module) { + $moduleConfig =& $config_handler->getConfigsByCat(0, $module->getVar('mid')); + } + //Check Language + $lang = $xoopsConfig['language']; + // check geolocation style + if(isset($moduleConfig['geolocate'])) { + $geolocate = $moduleConfig['geolocate']; + } + $xoTheme->addStylesheet(XOOPS_URL.'/modules/smallworld/css/base/jquery.ui.all.css'); + $xoTheme->addStylesheet(XOOPS_URL.'/modules/smallworld/css/smallworld.css'); + $xoTheme->addStylesheet(XOOPS_URL.'/modules/smallworld/css/apprise.css'); + + $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery-1.7.1.min.js'); + $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery-ui-1.8.11.custom.js'); + + $xoops_url= XOOPS_URL; + $myid = $xoopsUser->getVar('uid'); + // GET various variables from language folder + if (file_exists(XOOPS_ROOT_PATH.'/modules/smallworld/language/'.$lang.'/js/variables.js')) { + $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/language/'.$lang.'/js/variables.js'); + } else { + $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/language/english/js/variables.js'); + } + + // Check if USER is smallworld-registered user + $chkUser = new SmallWorldUser; + $ChkProf = $chkUser->CheckIfProfile($myid); + + // Check if there are requests pending + $count_invit = count($chkUser->getRequests($myid)); + + // Get module config for validation and place in javascript + $validate = $moduleConfig['validationstrenght']; + + // Check to see if smallworld should use username links to point to default xoops or smallworld + $takeoverlinks = $moduleConfig['takeoveruserlinks']; + $fieldstoshow = array_flip(smallworld_GetModuleOption('smallworldusethesefields', $repmodule='smallworld')); + $useverification = smallworld_GetModuleOption('smallworldmandatoryfields', $repmodule='smallworld'); + $smallworldUV = implode(',', $useverification); + + // Get users messages count based on users followerArray + $getUserMsgNum = smallworld_getCountFriendMessagesEtc (); + + + // Set javascript vars but only if not already defined. + // Check prevents multible loads + $script = "if (myID === undefined) {"."\n"; + $script .= "var smallworld_url = '" . $xoops_url . "/modules/smallworld/" . "';\n"; + $script .= "var smallworld_uploaddir = '" . $xoops_url . "/uploads/avatars/" . "';\n"; + $script .= "var xoops_smallworld = jQuery.noConflict();\n"; + $script .= "var myID = " . $myid . ";\n"; + $script .= "var userHasProfile = " . $ChkProf . ";\n"; + $script .= "var smallworldTakeOverLinks = " . $takeoverlinks . ";\n"; + $script .= "var geoL = " . $geolocate . ";\n"; + $script .= "var geocomplete = '';\n"; + $script .= "var smallworldVerString = '" . $smallworldUV . "';\n"; + $script .= "var smallworlduseverification = new Array();\n"; + $script .= "smallworlduseverification = smallworldVerString.split(',');\n"; + $script .= "var hasmessages = " . $count_invit . ";\n"; + $script .= "var smallworldvalidationstrenght = " . $validate . ";\n"; + $script .= "var smallworld_getFriendsMsgComCount = " . $getUserMsgNum . ";\n"; + $script .= "var $ = jQuery();\n"; + $script .= "} else {"."\n"; + $script .= "\n"; + $script .= "}"."\n"; + $xoTheme->addScript('','',$script); + + $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/smallworld.js'); + + $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery.countdown.js'); + $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery.innerfade.js'); + $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery.colorbox.js'); + $xoTheme->addStylesheet(XOOPS_URL.'/modules/smallworld/css/colorbox.css'); + + + if ($p == 'register' || $p == 'editprofile') { + $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery.validate.js'); + $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery.validation.functions.js'); + $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery.stepy.js'); + $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery.elastic.source.js'); + // Include geolocate styling + if ($geolocate != 1) { + $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/geoname.js'); + $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/geoname_now.js'); + } else { + $xoTheme->addScript("http://maps.google.com/maps/api/js?sensor=false&language="._LANGCODE); + $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/ui.geo_autocomplete.js'); + $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/ui.geo_autocomplete_now.js'); + } + if (file_exists(XOOPS_ROOT_PATH.'/modules/smallworld/language/' + . $lang . '/js/jquery.ui.datepicker-language.js') + ) { + $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/language/' + . $lang.'/js/jquery.ui.datepicker-language.js' + ); + $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/language/' + . $lang.'/js/jquery.countdown.js' + ); + } else { + $xoTheme->addScript(XOOPS_URL + . '/modules/smallworld/language/english/js/jquery.ui.datepicker-language.js' + ); + $xoTheme->addScript(XOOPS_URL + . '/modules/smallworld/language/english/js/jquery.countdown.js' + ); + } + } + if ($p == 'index') { + $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery.oembed.js'); + $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/wall.js'); + $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/ajaxupload.3.5.js'); + $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery.avatar_helper.js'); + $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery.bookmark.js'); + $xoTheme->addStylesheet(XOOPS_URL.'/modules/smallworld/css/oembed.css'); + $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery.elastic.source.js'); + // Include geolocate styling + if ($geolocate != 1) { + $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/geoname.js'); + $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/geoname_now.js'); + } else { + $xoTheme->addScript("http://maps.google.com/maps/api/js?sensor=false&language="._LANGCODE); + $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/ui.geo_autocomplete.js'); + $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/ui.geo_autocomplete_now.js'); + } + + } + if ($p == 'gallery') { + $xoTheme->addStylesheet(XOOPS_URL.'/modules/smallworld/css/galleriffic-5.css'); + $xoTheme->addStylesheet(XOOPS_URL.'/modules/smallworld/css/basic.css'); + $xoTheme->addStylesheet(XOOPS_URL.'/modules/smallworld/css/black.css'); + $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery.galleriffic.js'); + $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery.history.js'); + $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery.opacityrollover.js'); + $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/gallery_mod.js'); + $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery.elastic.source.js'); + } + + if ($p == 'imageupload') { + $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery.fileupload-uix.js'); + $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery.fileupload-ui.js'); + $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery.fileupload.js'); + $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/upload_application.js'); + $xoTheme->addStylesheet(XOOPS_URL.'/modules/smallworld/css/jquery.fileupload-ui.css'); + } + + if ($p == 'userprofile' || $p == 'friends') { + $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/apprise-1.5.full.js'); + $xoTheme->addStylesheet(XOOPS_URL.'/modules/smallworld/css/jquery.fileupload-ui.css'); + $xoTheme->addStylesheet(XOOPS_URL.'/modules/smallworld/css/oembed.css'); + $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery.oembed.js'); + $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/wall.js'); + $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/ajaxupload.3.5.js'); + $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery.avatar_helper.js'); + $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery.bookmark.js'); + $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery.elastic.source.js'); + // Include geolocate styling + if ($geolocate != 1) { + $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/geoname.js'); + $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/geoname_now.js'); + } else { + $xoTheme->addScript("http://maps.google.com/maps/api/js?sensor=false&language="._LANGCODE); + $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/ui.geo_autocomplete.js'); + $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/ui.geo_autocomplete_now.js'); + } + + } + + if ($p == 'perma' || $p == 'share') { + $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery.oembed.js'); + $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/wall.js'); + $xoTheme->addStylesheet(XOOPS_URL.'/modules/smallworld/css/oembed.css'); + $xoTheme->addStylesheet(XOOPS_URL.'/modules/smallworld/css/smallworld.css'); + $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery.innerfade.js'); + $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery.bookmark.js'); + $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery.elastic.source.js'); + } + + }//end if user +} + + /** + * @Get url of smallworld + * @returns string + */ + function smallworld_getHostRequest() + { + $protocol = strpos(strtolower($_SERVER['SERVER_PROTOCOL']),'https') === FALSE ? 'http' : 'https'; + $host = $_SERVER['HTTP_HOST']; + $script = $_SERVER['SCRIPT_NAME']; + $params = $_SERVER['QUERY_STRING']; + $currentUrl = $protocol . '://' . $host; + return $currentUrl; + } \ No newline at end of file Modified: XoopsModules/smallworld/trunk/smallworld/index.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/index.php 2012-03-06 17:45:59 UTC (rev 9102) +++ XoopsModules/smallworld/trunk/smallworld/index.php 2012-03-07 03:53:13 UTC (rev 9103) @@ -143,7 +143,7 @@ $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery.bookmark.js'); $xoTheme->addStylesheet(XOOPS_URL.'/modules/smallworld/css/oembed.css'); $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery.colorbox.js'); - $xoTheme->addStylesheet(XOOPS_URL.'/modules/smallworld/css/colorbox.css'); + $xoTheme->addStylesheet(XOOPS_URL.'/modules/smallworld/css/smallworld.css'); } else { redirect_header(XOOPS_URL . "/user.php", 1, _NOPERM); } Modified: XoopsModules/smallworld/trunk/smallworld/js/smallworld.js =================================================================== --- XoopsModules/smallworld/trunk/smallworld/js/smallworld.js 2012-03-06 17:45:59 UTC (rev 9102) +++ XoopsModules/smallworld/trunk/smallworld/js/smallworld.js 2012-03-07 03:53:13 UTC (rev 9103) @@ -196,7 +196,8 @@ // Steps for registration and submitbutton name using // formToWizzard.js - xoops_smallworld(function() { + if (xoops_smallworld("#smallworld_profileform").length > 0) { + xoops_smallworld(function() { xoops_smallworld('#smallworld_profileform').stepy({ backLabel: SmallworldValidationBackButton, block: true, @@ -207,22 +208,37 @@ titleClick: false }); }); + } // Attach geolocate autocomplete to forms - if (geoL === 1) { - xoops_smallworld('#birthplace').geo_autocomplete(); - xoops_smallworld('#present_city').geo_autocomplete_now(); - } else { - // do something or not - } + xoops_smallworld(function() { + if (geoL === 1) { + if (xoops_smallworld("#birthplace").length > 0) { + xoops_smallworld('#birthplace').geo_autocomplete(); + } + if (xoops_smallworld("#present_city").length > 0){ + xoops_smallworld('#present_city').geo_autocomplete_now(); + } + } else { + // do something or not + } + }); + // Make Textareas elastic - xoops_smallworld(function() { - xoops_smallworld('.favourites, .smallworld_comment, #smallworld_update, #smallworld_update_profile').elastic(); - xoops_smallworld('.smallworld_comment').css('max-width', xoops_smallworld('.smallworld_stcommentbody').outerWidth() - 90 + 'px'); - xoops_smallworld('#smallworld_update').css('max-width', xoops_smallworld('#smallworld_wall_container').outerWidth() - 30 + 'px'); + if (xoops_smallworld(".favourites").length > 0 || + xoops_smallworld(".smallworld_comment").length > 0 || + xoops_smallworld("#smallworld_update").length > 0 || + xoops_smallworld("#smallworld_update_profile").length > 0 + ) + { + xoops_smallworld(function() { + xoops_smallworld('.favourites, .smallworld_comment, #smallworld_update, #smallworld_update_profile').elastic(); + xoops_smallworld('.smallworld_comment').css('max-width', xoops_smallworld('.smallworld_stcommentbody').outerWidth() - 90 + 'px'); + xoops_smallworld('#smallworld_update').css('max-width', xoops_smallworld('#smallworld_wall_container').outerWidth() - 30 + 'px'); - }); + }); + } // Toggle the form 'partner' if choosen status is married, in relationship, complicated xoops_smallworld(function() { @@ -564,8 +580,8 @@ // Sharing bookmarks defines xoops_smallworld(function () { - xoops_smallworld('.share').live('click',function() { - // e.preventDefault(); + xoops_smallworld('.share').live('click',function(e) { + e.preventDefault(); var id = xoops_smallworld(this).attr('id'); var ref = xoops_smallworld('span[name="' + id + '"]').attr('rel'); var desc = xoops_smallworld('span[name="' + id + '"]').attr('rel1'); @@ -900,6 +916,7 @@ xoops_smallworld('#smallworld_profileform-next-0').show(); xoops_smallworld('#smallworld_profileform-next-1').show(); } + return false; } function attachAvatarOpen () { @@ -931,4 +948,5 @@ }; }); //close click }); + return false; } \ No newline at end of file Modified: XoopsModules/smallworld/trunk/smallworld/language/danish/js/jquery.ui.datepicker-language.js =================================================================== --- XoopsModules/smallworld/trunk/smallworld/language/danish/js/jquery.ui.datepicker-language.js 2012-03-06 17:45:59 UTC (rev 9102) +++ XoopsModules/smallworld/trunk/smallworld/language/danish/js/jquery.ui.datepicker-language.js 2012-03-07 03:53:13 UTC (rev 9103) @@ -1,29 +1,24 @@ /* http://keith-wood.name/datepick.html Danish localisation for jQuery Datepicker. - Written by Jan Christensen ( del...@gm...). */ -(function($) { - $.datepick.regional['da'] = { - monthNames: ['Januar','Februar','Marts','April','Maj','Juni', + Written by Culex <cu...@cu...> */ +jQuery(function(xoops_smallworld){ + xoops_smallworld.datepicker.regional['da-DK'] = { + closeText: 'Luk', closeStatus: 'Luk uden ændringer', + prevText: '<Forrige', prevStatus: 'Vis forrige måned', + prevJumpText: '<<', prevJumpStatus: '', + currentText: 'Idag', currentStatus: 'Vis aktuel måned', + monthNames: ['Januar','Februar','Marts','April','Maj','Juni', 'Juli','August','September','Oktober','November','December'], - monthNamesShort: ['Jan','Feb','Mar','Apr','Maj','Jun', + monthNamesShort: ['Jan','Feb','Mar','Apr','Maj','Jun', 'Jul','Aug','Sep','Okt','Nov','Dec'], dayNames: ['Søndag','Mandag','Tirsdag','Onsdag','Torsdag','Fredag','Lørdag'], dayNamesShort: ['Søn','Man','Tir','Ons','Tor','Fre','Lør'], dayNamesMin: ['Sø','Ma','Ti','On','To','Fr','Lø'], - dateFormat: 'dd-mm-yyyy', firstDay: 0, - renderer: $.datepick.defaultRenderer, - prevText: '<Forrige', prevStatus: 'Vis forrige måned', - prevJumpText: '<<', prevJumpStatus: '', - nextText: 'Næste>', nextStatus: 'Vis næste måned', - nextJumpText: '>>', nextJumpStatus: '', - currentText: 'Idag', currentStatus: 'Vis aktuel måned', - todayText: 'Idag', todayStatus: 'Vis aktuel måned', - clearText: 'Nulstil', clearStatus: 'Nulstil den aktuelle dato', - closeText: 'Luk', closeStatus: 'Luk uden ændringer', - yearStatus: 'Vis et andet år', monthStatus: 'Vis en anden måned', - weekText: 'Uge', weekStatus: 'Årets uge', - dayStatus: 'Vælg D, M d', defaultStatus: 'Vælg en dato', - isRTL: false - }; - $.datepick.setDefaults($.datepick.regional['da']); -})(jQuery); \ No newline at end of file + weekHeader: 'Ug', + dateFormat: 'dd-mm-yyyy', + firstDay: 0, + isRTL: false, + showMonthAfterYear: false, + yearSuffix: ''}; + xoops_smallworld.datepicker.setDefaults(xoops_smallworld.datepicker.regional['da-DK']); +}); Modified: XoopsModules/smallworld/trunk/smallworld/language/danish/js/variables.js =================================================================== --- XoopsModules/smallworld/trunk/smallworld/language/danish/js/variables.js 2012-03-06 17:45:59 UTC (rev 9102) +++ XoopsModules/smallworld/trunk/smallworld/language/danish/js/variables.js 2012-03-07 03:53:13 UTC (rev 9103) @@ -10,6 +10,9 @@ var _smallworldCancel = "Afbryd"; var _smallworldClose = "Luk"; +var _smallworldCommentsMoreMore = "..Vis mere"; +var _smallworldCommentsMoreLess = "..vis mindre"; + var SmallworldGenderError = "Vælg dit køn"; var SmallworldBirthdayError = "Vælg din fødselsdag"; var SmallworldEmailError = "Skriv venligst mindst eén email"; Modified: XoopsModules/smallworld/trunk/smallworld/preloads/core.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/preloads/core.php 2012-03-06 17:45:59 UTC (rev 9102) +++ XoopsModules/smallworld/trunk/smallworld/preloads/core.php 2012-03-07 03:53:13 UTC (rev 9103) @@ -43,17 +43,15 @@ } $xoTheme->addStylesheet(XOOPS_URL.'/modules/smallworld/css/base/jquery.ui.all.css'); - $xoTheme->addStylesheet(XOOPS_URL.'/modules/smallworld/css/smallworld.css'); - $xoTheme->addStylesheet(XOOPS_URL.'/modules/smallworld/css/apprise.css'); + $xoTheme->addStylesheet(XOOPS_URL.'/modules/smallworld/css/smallworld.css'); $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery-1.7.1.min.js'); $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery-ui-1.8.11.custom.js'); - $xoops_url= XOOPS_URL; $myid = $xoopsUser->getVar('uid'); // GET various variables from language folder - if (file_exists(XOOPS_ROOT_PATH.'/modules/smallworld/language/js/'.$lang.'/variables.js')) { - $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/language/'.$lang.'/js/variables.js'); + if (file_exists(XOOPS_ROOT_PATH.'/modules/smallworld/language/'.$xoopsConfig['language'].'/js/variables.js')) { + $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/language/'.$xoopsConfig['language'].'/js/variables.js'); } else { $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/language/english/js/variables.js'); } @@ -77,9 +75,16 @@ // Get users messages count based on users followerArray $getUserMsgNum = smallworld_getCountFriendMessagesEtc (); - + // Check if request url is with www or without + $urltest = smallworld_getHostRequest(); + $xoops_url = XOOPS_URL; + if (!strstr($urltest, 'www.')) { + $xoops_url = str_replace( 'www.', '', $xoops_url ); + } + // Set javascript vars but only if not already defined. - // Check prevents multible loads + // Check prevents multible loads + $script = "if (myID === undefined) {"."\n"; $script .= "var smallworld_url = '" . $xoops_url . "/modules/smallworld/" . "';\n"; $script .= "var smallworld_uploaddir = '" . $xoops_url . "/uploads/avatars/" . "';\n"; @@ -106,13 +111,14 @@ $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery.validation.functions.js'); $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery.stepy.js'); + $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery.oembed.js'); $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery.elastic.source.js'); $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery.countdown.js'); $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery.innerfade.js'); - if ( file_exists(XOOPS_ROOT_PATH.'/modules/smallworld/language/js/'.$lang.'/jquery.ui.datepicker-language.js')) { - $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/language/'.$lang.'/js/jquery.ui.datepicker-language.js'); - $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/language/'.$lang.'/js/jquery.countdown.js'); + if ( file_exists(XOOPS_ROOT_PATH.'/modules/smallworld/language/'.$xoopsConfig['language'].'/js/jquery.ui.datepicker-language.js')) { + $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/language/'.$xoopsConfig['language'].'/js/jquery.ui.datepicker-language.js'); + $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/language/'.$xoopsConfig['language'].'/js/jquery.countdown.js'); } else { $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/language/english/js/jquery.ui.datepicker-language.js'); $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/language/english/js/jquery.countdown.js'); Modified: XoopsModules/smallworld/trunk/smallworld/register.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/register.php 2012-03-06 17:45:59 UTC (rev 9102) +++ XoopsModules/smallworld/trunk/smallworld/register.php 2012-03-07 03:53:13 UTC (rev 9103) @@ -289,7 +289,7 @@ $xoopsTpl->assign('smallworld_save',_SMALLWORLD_SUBMIT); $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery.colorbox.js'); - $xoTheme->addStylesheet(XOOPS_URL.'/modules/smallworld/css/colorbox.css'); + $xoTheme->addStylesheet(XOOPS_URL.'/modules/smallworld/css/smallworld.css'); } } else { redirect_header(XOOPS_URL . "/user.php", 1, _NOPERM); Modified: XoopsModules/smallworld/trunk/smallworld/templates/getlastcom.html =================================================================== --- XoopsModules/smallworld/trunk/smallworld/templates/getlastcom.html 2012-03-06 17:45:59 UTC (rev 9102) +++ XoopsModules/smallworld/trunk/smallworld/templates/getlastcom.html 2012-03-07 03:53:13 UTC (rev 9103) @@ -38,7 +38,7 @@ </div> <{/section}> <script type="text/javascript"> -xoops_smallworld(document).ready(function() { +xoops_smallworld(document).ready(function(){ smallworldCheckNumDivs(); attachAvatarOpen(); }); Modified: XoopsModules/smallworld/trunk/smallworld/templates/getlastmsg.html =================================================================== --- XoopsModules/smallworld/trunk/smallworld/templates/getlastmsg.html 2012-03-06 17:45:59 UTC (rev 9102) +++ XoopsModules/smallworld/trunk/smallworld/templates/getlastmsg.html 2012-03-07 03:53:13 UTC (rev 9103) @@ -121,7 +121,7 @@ <br><br> <{/foreach}> <script type="text/javascript"> -xoops_smallworld(document).ready(function() { +xoops_smallworld(document).ready(function(){ smallworldCheckNumDivs(); attachAvatarOpen(); }); Modified: XoopsModules/smallworld/trunk/smallworld/templates/getmore.html =================================================================== --- XoopsModules/smallworld/trunk/smallworld/templates/getmore.html 2012-03-06 17:45:59 UTC (rev 9102) +++ XoopsModules/smallworld/trunk/smallworld/templates/getmore.html 2012-03-07 03:53:13 UTC (rev 9103) @@ -115,7 +115,7 @@ <a href="javascript:void(0)" class="smallworld_msg_counter" rel="<{$pagename}>" id="<{$post.msg_id}>">MORE</a> <br><br> <script type="text/javascript"> -xoops_smallworld(document).ready(function() { +xoops_smallworld(document).ready(function(){ smallworldCheckNumDivs(); attachAvatarOpen(); }); Modified: XoopsModules/smallworld/trunk/smallworld/templates/smallworld_userprofile_template.html =================================================================== --- XoopsModules/smallworld/trunk/smallworld/templates/smallworld_userprofile_template.html 2012-03-06 17:45:59 UTC (rev 9102) +++ XoopsModules/smallworld/trunk/smallworld/templates/smallworld_userprofile_template.html 2012-03-07 03:53:13 UTC (rev 9103) @@ -292,7 +292,9 @@ <div id="smallworld_inspection_desc"><{$smarty.const._SMALLWORLD_INSPEC_DESC}> <p id = "clock-<{$ownerofpage}>"></p> <script type='text/javascript'> - xoops_smallworld('#clock-<{$ownerofpage}>').countdown({onExpiry:smallworldRefresh,until: +<{$inspecttime}>}); + xoops_smallworld(document).ready(function(){ + xoops_smallworld('#clock-<{$ownerofpage}>').countdown({onExpiry:smallworldRefresh,until: +<{$inspecttime}>}); + }); </script> </div> </div> Modified: XoopsModules/smallworld/trunk/smallworld/userprofile.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/userprofile.php 2012-03-06 17:45:59 UTC (rev 9102) +++ XoopsModules/smallworld/trunk/smallworld/userprofile.php 2012-03-07 03:53:13 UTC (rev 9103) @@ -220,7 +220,7 @@ $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery.avatar_helper.js'); $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery.bookmark.js'); $xoTheme->addScript(XOOPS_URL.'/modules/smallworld/js/jquery.colorbox.js'); - $xoTheme->addStylesheet(XOOPS_URL.'/modules/smallworld/css/colorbox.css'); + $xoTheme->addStylesheet(XOOPS_URL.'/modules/smallworld/css/smallworld.css'); //Check Language $lang = $xoopsConfig['language']; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <be...@us...> - 2012-03-06 17:46:08
|
Revision: 9102 http://xoops.svn.sourceforge.net/xoops/?rev=9102&view=rev Author: beckmi Date: 2012-03-06 17:45:59 +0000 (Tue, 06 Mar 2012) Log Message: ----------- Updating version number Modified Paths: -------------- XoopsModules/newbb/branches/alfred/newbb/xoops_version.php Modified: XoopsModules/newbb/branches/alfred/newbb/xoops_version.php =================================================================== --- XoopsModules/newbb/branches/alfred/newbb/xoops_version.php 2012-03-06 17:06:36 UTC (rev 9101) +++ XoopsModules/newbb/branches/alfred/newbb/xoops_version.php 2012-03-06 17:45:59 UTC (rev 9102) @@ -11,7 +11,7 @@ */ $modversion['name'] = _MI_NEWBB_NAME; -$modversion['version'] = 4.2; +$modversion['version'] = 4.3; $modversion['description'] = _MI_NEWBB_DESC; $modversion['credits'] = "NewBB 2 developed by Marko Schmuck (predator) / D.J. (phppp) / Alfred(dhcst)"; $modversion['author'] = "Marko Schmuck (predator) / D.J. (phppp) / Alfred(dhcst)"; @@ -27,10 +27,10 @@ $modversion['status_version'] = "4.2"; //about -$modversion['release_date'] = '2012/02/08'; +$modversion['release_date'] = '2012/03/06'; $modversion["module_website_url"] = "http://www.simple-xoops.de/"; $modversion["module_website_name"] = "SIMPLE-XOOPS"; -$modversion["module_status"] = "STABLE"; +$modversion["module_status"] = "BETA 1"; $modversion['min_php'] = "5.2"; $modversion['min_xoops'] = "2.5"; $modversion['min_admin'] = "1.1"; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <be...@us...> - 2012-03-06 17:06:46
|
Revision: 9101 http://xoops.svn.sourceforge.net/xoops/?rev=9101&view=rev Author: beckmi Date: 2012-03-06 17:06:36 +0000 (Tue, 06 Mar 2012) Log Message: ----------- fixing hard-coded language string "User Information" Modified Paths: -------------- XoopsModules/newbb/branches/alfred/newbb/language/english/main.php XoopsModules/newbb/branches/alfred/newbb/language/german/main.php XoopsModules/newbb/branches/alfred/newbb/language/italian/main.php XoopsModules/newbb/branches/alfred/newbb/templates/newbb_thread.html Modified: XoopsModules/newbb/branches/alfred/newbb/language/english/main.php =================================================================== --- XoopsModules/newbb/branches/alfred/newbb/language/english/main.php 2012-03-06 16:43:51 UTC (rev 9100) +++ XoopsModules/newbb/branches/alfred/newbb/language/english/main.php 2012-03-06 17:06:36 UTC (rev 9101) @@ -476,4 +476,4 @@ define('_MD_SHARE_DIGG', "Digg"); define('_MD_SHARE_TECHNORATI', "Technorati"); define('_MD_SHARE_MRWONG', "Mr. Wong"); -?> \ No newline at end of file +define('_MD_USERINFO', "User Information"); \ No newline at end of file Modified: XoopsModules/newbb/branches/alfred/newbb/language/german/main.php =================================================================== --- XoopsModules/newbb/branches/alfred/newbb/language/german/main.php 2012-03-06 16:43:51 UTC (rev 9100) +++ XoopsModules/newbb/branches/alfred/newbb/language/german/main.php 2012-03-06 17:06:36 UTC (rev 9101) @@ -481,4 +481,4 @@ define('_MD_SHARE_DIGG', "Digg"); define('_MD_SHARE_TECHNORATI', "Technorati"); define('_MD_SHARE_MRWONG', "Mr. Wong"); -?> \ No newline at end of file +define('_MD_USERINFO', "Benutzerinformationen"); \ No newline at end of file Modified: XoopsModules/newbb/branches/alfred/newbb/language/italian/main.php =================================================================== --- XoopsModules/newbb/branches/alfred/newbb/language/italian/main.php 2012-03-06 16:43:51 UTC (rev 9100) +++ XoopsModules/newbb/branches/alfred/newbb/language/italian/main.php 2012-03-06 17:06:36 UTC (rev 9101) @@ -522,10 +522,5 @@ define("_MD_SHARE_DELICIOUS", "Del.icio.us"); define("_MD_SHARE_DIGG", "Digg"); define("_MD_SHARE_TECHNORATI", "Technorati"); - -?><?php - -// Translation done by XTransam & admin (in...@tx...) -// XTransam 1.2 is written by Chronolabs Co-op & The XOOPS Project - File Dumped on 2011-11-18 14:39 - -?> \ No newline at end of file +define('_MD_SHARE_MRWONG', "Mr. Wong"); +define('_MD_USERINFO', "User Information"); \ No newline at end of file Modified: XoopsModules/newbb/branches/alfred/newbb/templates/newbb_thread.html =================================================================== --- XoopsModules/newbb/branches/alfred/newbb/templates/newbb_thread.html 2012-03-06 16:43:51 UTC (rev 9100) +++ XoopsModules/newbb/branches/alfred/newbb/templates/newbb_thread.html 2012-03-06 17:06:36 UTC (rev 9101) @@ -27,7 +27,7 @@ <br /> <{if $infobox gt 0}> <div> - <img style="padding:2px;" onclick="ToggleBlockCategory('<{$topic_post.post_id}>', this, '<{$xoops_url}>/modules/<{$xoops_dirname}>/templates/images/icon/more.png', '<{$xoops_url}>/modules/<{$xoops_dirname}>/templates/images/icon/more.png')" src="<{$icon_path}>/more.png" alt="Benutzerinformationen" title="Benutzerinformationen" /> + <img style="padding:2px;" onclick="ToggleBlockCategory('<{$topic_post.post_id}>', this, '<{$xoops_url}>/modules/<{$xoops_dirname}>/templates/images/icon/more.png', '<{$xoops_url}>/modules/<{$xoops_dirname}>/templates/images/icon/more.png')" src="<{$icon_path}>/more.png" alt="<{$smarty.const._MD_USERINFO}>" title="<{$smarty.const._MD_USERINFO}>" /> </div> <div id="<{$topic_post.post_id}>" <{if $infobox == 1}> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dh...@us...> - 2012-03-06 16:44:04
|
Revision: 9100 http://xoops.svn.sourceforge.net/xoops/?rev=9100&view=rev Author: dhcst Date: 2012-03-06 16:43:51 +0000 (Tue, 06 Mar 2012) Log Message: ----------- fix templates and many errors Modified Paths: -------------- XoopsModules/newbb/branches/alfred/newbb/action.topic.php XoopsModules/newbb/branches/alfred/newbb/class/category.php XoopsModules/newbb/branches/alfred/newbb/class/digest.php XoopsModules/newbb/branches/alfred/newbb/class/forum.php XoopsModules/newbb/branches/alfred/newbb/class/moderate.php XoopsModules/newbb/branches/alfred/newbb/class/online.php XoopsModules/newbb/branches/alfred/newbb/class/post.php XoopsModules/newbb/branches/alfred/newbb/class/rate.php XoopsModules/newbb/branches/alfred/newbb/class/readforum.php XoopsModules/newbb/branches/alfred/newbb/class/readtopic.php XoopsModules/newbb/branches/alfred/newbb/class/report.php XoopsModules/newbb/branches/alfred/newbb/class/topic.php XoopsModules/newbb/branches/alfred/newbb/class/topic.renderer.php XoopsModules/newbb/branches/alfred/newbb/docs/changelog.txt XoopsModules/newbb/branches/alfred/newbb/header.php XoopsModules/newbb/branches/alfred/newbb/include/functions.welcome.inc.php XoopsModules/newbb/branches/alfred/newbb/language/english/main.php XoopsModules/newbb/branches/alfred/newbb/language/english/modinfo.php XoopsModules/newbb/branches/alfred/newbb/post.php XoopsModules/newbb/branches/alfred/newbb/templates/newbb_index.html XoopsModules/newbb/branches/alfred/newbb/templates/newbb_thread.html XoopsModules/newbb/branches/alfred/newbb/templates/newbb_viewforum.html XoopsModules/newbb/branches/alfred/newbb/templates/newbb_viewpost.html XoopsModules/newbb/branches/alfred/newbb/templates/newbb_viewtopic.html XoopsModules/newbb/branches/alfred/newbb/viewforum.php XoopsModules/newbb/branches/alfred/newbb/viewpost.php XoopsModules/newbb/branches/alfred/newbb/viewtopic.php Modified: XoopsModules/newbb/branches/alfred/newbb/action.topic.php =================================================================== --- XoopsModules/newbb/branches/alfred/newbb/action.topic.php 2012-03-05 21:45:51 UTC (rev 9099) +++ XoopsModules/newbb/branches/alfred/newbb/action.topic.php 2012-03-06 16:43:51 UTC (rev 9100) @@ -106,8 +106,6 @@ foreach (array_keys($forums_obj) as $id) { $forum_handler->synchronization($forums_obj[$id]); } - $stats_handler = xoops_getmodulehandler('stats', 'newbb'); - $stats_handler->reset(); unset($topics_obj, $forums_obj); break; case "move": @@ -119,7 +117,7 @@ $post_handler->updateAll("forum_id", intval($_POST["newforum"]), $criteria, true); $topic_handler->updateAll("forum_id", intval($_POST["newforum"]), $criteria, true); $forum_handler->synchronization($_POST["newforum"]); - $forum_handler->synchronization($forum_id); + $forum_handler->synchronization($forum_id); } else { include XOOPS_ROOT_PATH."/header.php"; $category_handler =& xoops_getmodulehandler('category', 'newbb'); @@ -165,6 +163,8 @@ } break; } +$stats_handler = xoops_getmodulehandler('stats', 'newbb'); +$stats_handler->reset(); if (empty($forum_id)) { redirect_header("list.topic.php", 2, _MD_DBUPDATED); } else { Modified: XoopsModules/newbb/branches/alfred/newbb/class/category.php =================================================================== --- XoopsModules/newbb/branches/alfred/newbb/class/category.php 2012-03-05 21:45:51 UTC (rev 9099) +++ XoopsModules/newbb/branches/alfred/newbb/class/category.php 2012-03-06 16:43:51 UTC (rev 9100) @@ -23,7 +23,7 @@ function __construct() { - //$this->XoopsObject(); + $this->XoopsObject(); $this->initVar('cat_id', XOBJ_DTYPE_INT); $this->initVar('cat_title', XOBJ_DTYPE_TXTBOX); $this->initVar('cat_image', XOBJ_DTYPE_SOURCE, "blank.gif"); @@ -118,6 +118,11 @@ $perm_handler =& xoops_getmodulehandler('permission', 'newbb'); return $perm_handler->setCategoryPermission($category->getVar("cat_id")); } + + function synchronization($object = null) + { + return true; + } } ?> \ No newline at end of file Modified: XoopsModules/newbb/branches/alfred/newbb/class/digest.php =================================================================== --- XoopsModules/newbb/branches/alfred/newbb/class/digest.php 2012-03-05 21:45:51 UTC (rev 9099) +++ XoopsModules/newbb/branches/alfred/newbb/class/digest.php 2012-03-06 16:43:51 UTC (rev 9100) @@ -26,7 +26,7 @@ function __construct() { - //$this->XoopsObject(); + $this->XoopsObject(); $this->initVar('digest_id', XOBJ_DTYPE_INT); $this->initVar('digest_time', XOBJ_DTYPE_INT); $this->initVar('digest_content', XOBJ_DTYPE_TXTAREA); Modified: XoopsModules/newbb/branches/alfred/newbb/class/forum.php =================================================================== --- XoopsModules/newbb/branches/alfred/newbb/class/forum.php 2012-03-05 21:45:51 UTC (rev 9099) +++ XoopsModules/newbb/branches/alfred/newbb/class/forum.php 2012-03-06 16:43:51 UTC (rev 9100) @@ -626,8 +626,8 @@ } if (!$object->getVar("forum_id")) return false; + $sql = "SELECT MAX(post_id) AS last_post, COUNT(*) AS total FROM " . $this->db->prefix("bb_posts") . " AS p LEFT JOIN " . $this->db->prefix("bb_topics") . " AS t ON p.topic_id=t.topic_id WHERE p.approved=1 AND t.approved=1 AND p.forum_id = ".$object->getVar("forum_id"); - $sql = "SELECT MAX(post_id) AS last_post, COUNT(*) AS total FROM " . $this->db->prefix("bb_posts") . " AS p LEFT JOIN " . $this->db->prefix("bb_topics") . " AS t ON p.topic_id=t.topic_id WHERE p.approved=1 AND t.approved=1 AND p.forum_id = ".$object->getVar("forum_id"); if ( $result = $this->db->query($sql)) { $last_post = 0; $posts = 0; @@ -651,7 +651,7 @@ } } } - + $object->setDirty(); return $this->insert($object, true); } Modified: XoopsModules/newbb/branches/alfred/newbb/class/moderate.php =================================================================== --- XoopsModules/newbb/branches/alfred/newbb/class/moderate.php 2012-03-05 21:45:51 UTC (rev 9099) +++ XoopsModules/newbb/branches/alfred/newbb/class/moderate.php 2012-03-06 16:43:51 UTC (rev 9100) @@ -26,11 +26,13 @@ * @copyright copyright (c) 2005 XOOPS.org */ -class Moderate extends ArtObject { - +//class Moderate extends ArtObject { +class Moderate extends XoopsObject +{ function Moderate() { - $this->ArtObject("bb_moderates"); + //$this->ArtObject("bb_moderates"); + $this->XoopsObject(); $this->initVar('mod_id', XOBJ_DTYPE_INT); $this->initVar('mod_start', XOBJ_DTYPE_INT); $this->initVar('mod_end', XOBJ_DTYPE_INT); @@ -41,11 +43,18 @@ } } -class NewbbModerateHandler extends ArtObjectHandler +//class NewbbModerateHandler extends ArtObjectHandler +class NewbbModerateHandler extends XoopsPersistableObjectHandler { - function NewbbModerateHandler(&$db) { - $this->ArtObjectHandler($db, 'bb_moderates', 'Moderate', 'mod_id', 'uid'); + function __construct(&$db) + { + parent::__construct($db, 'bb_moderates', 'Moderate', 'mod_id', 'uid'); } + + function NewbbModerateHandler(&$db) + { + $this->__construct($db); + } /** * Clear garbage Modified: XoopsModules/newbb/branches/alfred/newbb/class/online.php =================================================================== --- XoopsModules/newbb/branches/alfred/newbb/class/online.php 2012-03-05 21:45:51 UTC (rev 9099) +++ XoopsModules/newbb/branches/alfred/newbb/class/online.php 2012-03-06 16:43:51 UTC (rev 9100) @@ -51,9 +51,9 @@ mt_srand((double)microtime() * 1000000); // set gc probabillity to 10% for now.. - //if (mt_rand(1, 100) < 75) { + if (mt_rand(1, 100) < 75) { $this->gc(300); - //} + } if (is_object($xoopsUser)) { $uid = $xoopsUser->getVar('uid'); $uname = $xoopsUser->getVar('uname'); Modified: XoopsModules/newbb/branches/alfred/newbb/class/post.php =================================================================== --- XoopsModules/newbb/branches/alfred/newbb/class/post.php 2012-03-05 21:45:51 UTC (rev 9099) +++ XoopsModules/newbb/branches/alfred/newbb/class/post.php 2012-03-06 16:43:51 UTC (rev 9100) @@ -37,11 +37,13 @@ newbb_load_object(); class Post extends ArtObject { +//class Post extends XoopsObject { var $attachment_array = array(); function Post() { $this->ArtObject("bb_posts"); + //$this->XoopsObject(); $this->initVar('post_id', XOBJ_DTYPE_INT); $this->initVar('topic_id', XOBJ_DTYPE_INT, 0, true); $this->initVar('forum_id', XOBJ_DTYPE_INT, 0, true); @@ -558,11 +560,19 @@ } class NewbbPostHandler extends ArtObjectHandler +//class NewbbPostHandler extends XoopsPersistableObjectHandler { - function NewbbPostHandler(&$db) { - $this->ArtObjectHandler($db, 'bb_posts', 'Post', 'post_id', 'subject'); + function __construct(&$db) + { + parent::__construct($db, 'bb_posts', 'Post', 'post_id', 'subject'); } + function NewbbPostHandler(&$db) + { + $this->__construct($db); + } + + function &get($id) { $id = intval($id); @@ -700,6 +710,7 @@ $topic_obj->setVar("topic_time", $post->getVar("post_time")); $topic_obj->setVar("poster_name", $post->getVar("poster_name"), true); $topic_obj->setVar("approved", $post->getVar("approved"), true); + if (!$topic_id = $topic_handler->insert($topic_obj, $force)) { $post->deleteAttachment(); $post->setErrors("insert topic error"); @@ -742,6 +753,7 @@ if ($post->getVar("approved") != $topic_obj->getVar("approved")) { $topic_obj->setVar("approved", $post->getVar("approved")); } + $topic_obj->setDirty(); if (!$result = $topic_handler->insert($topic_obj, $force)) { $post->setErrors("update topic error"); //xoops_error($topic_obj->getErrors()); @@ -936,6 +948,12 @@ } return $ret; } + + function synchronization() + { + //$this->cleanOrphan(); + return true; + } /** * clean orphan items from database Modified: XoopsModules/newbb/branches/alfred/newbb/class/rate.php =================================================================== --- XoopsModules/newbb/branches/alfred/newbb/class/rate.php 2012-03-05 21:45:51 UTC (rev 9099) +++ XoopsModules/newbb/branches/alfred/newbb/class/rate.php 2012-03-06 16:43:51 UTC (rev 9100) @@ -55,6 +55,11 @@ $this->ArtObjectHandler($db, 'bb_votedata', 'Nrate', 'ratingid'); } + function synchronization() + { + return; + } + /** * clean orphan items from database * Modified: XoopsModules/newbb/branches/alfred/newbb/class/readforum.php =================================================================== --- XoopsModules/newbb/branches/alfred/newbb/class/readforum.php 2012-03-05 21:45:51 UTC (rev 9099) +++ XoopsModules/newbb/branches/alfred/newbb/class/readforum.php 2012-03-06 16:43:51 UTC (rev 9100) @@ -110,5 +110,10 @@ return true; } + + function synchronization() + { + return; + } } ?> \ No newline at end of file Modified: XoopsModules/newbb/branches/alfred/newbb/class/readtopic.php =================================================================== --- XoopsModules/newbb/branches/alfred/newbb/class/readtopic.php 2012-03-05 21:45:51 UTC (rev 9099) +++ XoopsModules/newbb/branches/alfred/newbb/class/readtopic.php 2012-03-06 16:43:51 UTC (rev 9100) @@ -159,5 +159,10 @@ } return true; } + + function synchronization() + { + return; + } } ?> \ No newline at end of file Modified: XoopsModules/newbb/branches/alfred/newbb/class/report.php =================================================================== --- XoopsModules/newbb/branches/alfred/newbb/class/report.php 2012-03-05 21:45:51 UTC (rev 9099) +++ XoopsModules/newbb/branches/alfred/newbb/class/report.php 2012-03-06 16:43:51 UTC (rev 9100) @@ -91,6 +91,11 @@ } return $ret; } + + function synchronization() + { + return; + } /** * clean orphan items from database Modified: XoopsModules/newbb/branches/alfred/newbb/class/topic.php =================================================================== --- XoopsModules/newbb/branches/alfred/newbb/class/topic.php 2012-03-05 21:45:51 UTC (rev 9099) +++ XoopsModules/newbb/branches/alfred/newbb/class/topic.php 2012-03-06 16:43:51 UTC (rev 9100) @@ -418,7 +418,7 @@ return $this->deleteAll($crit_expire, true/*, true*/); } - function synchronization(&$object/*, $force = true*/) + function synchronization($object = NULL, $force = true) { if (!is_object($object)) { $object =& $this->get(intval($object)); Modified: XoopsModules/newbb/branches/alfred/newbb/class/topic.renderer.php =================================================================== --- XoopsModules/newbb/branches/alfred/newbb/class/topic.renderer.php 2012-03-05 21:45:51 UTC (rev 9099) +++ XoopsModules/newbb/branches/alfred/newbb/class/topic.renderer.php 2012-03-06 16:43:51 UTC (rev 9100) @@ -485,6 +485,7 @@ } require_once XOOPS_ROOT_PATH.'/class/pagenav.php'; $nav = new XoopsPageNav($count_topic, $this->config['topics_per_page'], @$this->vars["start"], "start", implode("&", $args)); + if (!empty($GLOBALS['xoopsModuleConfig']['do_rewrite'])) $nav->url = XOOPS_URL . $nav->url; if ($this->config['pagenav_display'] == 'select') $navi = $nav->renderSelect(); elseif ($this->config['pagenav_display'] == 'bild') Modified: XoopsModules/newbb/branches/alfred/newbb/docs/changelog.txt =================================================================== --- XoopsModules/newbb/branches/alfred/newbb/docs/changelog.txt 2012-03-05 21:45:51 UTC (rev 9099) +++ XoopsModules/newbb/branches/alfred/newbb/docs/changelog.txt 2012-03-06 16:43:51 UTC (rev 9100) @@ -1,9 +1,13 @@ newBB Changelog 4.3 -02/12/2012 +03/06/2012 =========================================== 1 Fix Cache Config for SEO 2 Fix Typos in templates + 3 Fix Nav for SEO + 4 Fix PDF for SEO + 5 Fix Error Topic Number in Blocks + 6 Fix Stats move or delete Topics newBB Changelog 4.2 Modified: XoopsModules/newbb/branches/alfred/newbb/header.php =================================================================== --- XoopsModules/newbb/branches/alfred/newbb/header.php 2012-03-05 21:45:51 UTC (rev 9099) +++ XoopsModules/newbb/branches/alfred/newbb/header.php 2012-03-06 16:43:51 UTC (rev 9100) @@ -17,8 +17,8 @@ if(((strpos(getenv('REQUEST_URI'), '.html') === false) && !empty($xoopsModuleConfig['do_rewrite']) && (!isset($_POST) || count($_POST) <= 0))) { - if ( strpos(getenv("REQUEST_URI"),"/modules/newbb/index.php?mark_read") === false && in_array(basename(getenv('SCRIPT_NAME')),$toseo_url) && (trim(getenv("REQUEST_URI")) != '') && trim(getenv("REQUEST_URI")) != "/".REAL_MODULE_NAME."/") { - $s = XOOPS_URL . getenv("REQUEST_URI"); + if ( strpos(getenv("REQUEST_URI"),"/modules/newbb/index.php?mark_read") === false && in_array(basename(getenv('SCRIPT_NAME')),$toseo_url) && (trim(getenv("REQUEST_URI")) != '') && strpos(getenv("REQUEST_URI") , "/".REAL_MODULE_NAME."/") === false ) { + $s = "http://" . getenv('HTTP_HOST') . getenv("REQUEST_URI"); $newurl = seo_urls('<a href="'.$s.'"></a>'); $newurl = str_replace('<a href="','',$newurl); $newurl = str_replace('"></a>','',$newurl); Modified: XoopsModules/newbb/branches/alfred/newbb/include/functions.welcome.inc.php =================================================================== --- XoopsModules/newbb/branches/alfred/newbb/include/functions.welcome.inc.php 2012-03-05 21:45:51 UTC (rev 9099) +++ XoopsModules/newbb/branches/alfred/newbb/include/functions.welcome.inc.php 2012-03-06 16:43:51 UTC (rev 9100) @@ -94,7 +94,7 @@ $message = sprintf(_MD_WELCOME_MESSAGE, $xoopsUser->getVar('uname'))."\n\n"; $message .= _PROFILE.": <a href='".XOOPS_URL . "/userinfo.php?uid=" . $xoopsUser->getVar('uid')."'><strong>".$xoopsUser->getVar('uname')."</strong></a> "; - $message .= " | <a href='".XOOPS_URL . "/pmlite.php?send2=1&to_userid=" . $xoopsUser->getVar('uid')."'>"._MD_PM."</a>\n"; + //$message .= " | <a href='".XOOPS_URL . "/pmlite.php?send2=1&to_userid=" . $xoopsUser->getVar('uid')."'>"._MD_PM."</a>\n"; foreach ($categories as $category) { if (isset($category["fields"])) { $message .= "\n\n".$category["cat_title"].":\n\n"; Modified: XoopsModules/newbb/branches/alfred/newbb/language/english/main.php =================================================================== --- XoopsModules/newbb/branches/alfred/newbb/language/english/main.php 2012-03-05 21:45:51 UTC (rev 9099) +++ XoopsModules/newbb/branches/alfred/newbb/language/english/main.php 2012-03-06 16:43:51 UTC (rev 9100) @@ -439,7 +439,7 @@ %s was deleted by me -As justification, I would like to let you know following: +As justification, I am taking the following information on: %s @@ -450,7 +450,7 @@ %s %s"); define("_MD_FORUMHOME","Board index"); -define("_MD_NEWBB_SEEWAITREPORT","There were <font color=\"red\"> <b>%s </b> Contributions reported </font>"); +define("_MD_NEWBB_SEEWAITREPORT","There were <font color=\"red\"> <b>%s</b> Contributions reported </font>"); define('NEWBB_PDF_SUBJECT','Title: '); define('NEWBB_PDF_TOPIC','Post: '); define('NEWBB_PDF_AUTHOR','Author: '); Modified: XoopsModules/newbb/branches/alfred/newbb/language/english/modinfo.php =================================================================== --- XoopsModules/newbb/branches/alfred/newbb/language/english/modinfo.php 2012-03-05 21:45:51 UTC (rev 9099) +++ XoopsModules/newbb/branches/alfred/newbb/language/english/modinfo.php 2012-03-06 16:43:51 UTC (rev 9100) @@ -62,6 +62,8 @@ define("_MI_IMAGELIB_DESC", "Select which Image library to use for creating Thumbnails. Leave AUTO for automatic choice."); define("_MI_MAX_IMG_WIDTH", "Maximum Image Width"); define("_MI_MAX_IMG_WIDTH_DESC", "Sets the maximum allowed <strong>Width</strong> size of an uploaded image otherwise thumbnail will be used. <br >Input 0 if you do not want to create thumbnails."); +define("_MI_MAX_IMG_HEIGHT","Maximum height of an image"); +define("_MI_MAX_IMG_HEIGHT_DESC", "Sets the maximum allowed height of an uploaded image."); define("_MI_MAX_IMAGE_WIDTH", "Maximum Image Width for creating thumbnail"); define("_MI_MAX_IMAGE_WIDTH_DESC", "Sets the maximum width of an uploaded image to create thumbnail. <br >Image with width larger than the value will not use thumbnail."); define("_MI_MAX_IMAGE_HEIGHT", "Maximum Image Height for creating thumbnail"); @@ -254,7 +256,4 @@ define("_MI_ADVERTISING_DESC","shows a commercial break after the 2nd Thread"); define("_MI_USERATTACH_ENABLE","Display attachments only for registered users"); define("_MI_USERATTACH_DESC","shows attachments in the forum only after logging in."); - -define("_MI_MAX_IMG_HEIGHT","Maximum height of an image"); -define("_MI_MAX_IMG_HEIGHT_DESC", "Sets the maximum allowed height of an uploaded image."); ?> \ No newline at end of file Modified: XoopsModules/newbb/branches/alfred/newbb/post.php =================================================================== --- XoopsModules/newbb/branches/alfred/newbb/post.php 2012-03-05 21:45:51 UTC (rev 9099) +++ XoopsModules/newbb/branches/alfred/newbb/post.php 2012-03-06 16:43:51 UTC (rev 9100) @@ -65,6 +65,7 @@ $error_message = array(); if ( !empty($_POST['contents_submit']) ) { + $token_valid = false; $token_valid = $GLOBALS['xoopsSecurity']->check(); @@ -141,7 +142,7 @@ && ( $isadmin || ( $post_obj->checkTimelimit('edit_timelimit') && $post_obj->checkIdentity() )) ) {} else { - redirect_header("viewtopic.php?forum={$forum_id}&topic_id={$topic_id}&post_id={$post_id}&order={$order}&viewmode={$viewmode}", 2, _MD_NORIGHTTOEDIT); + redirect_header(XOOPS_URL."/modules/newbb/viewtopic.php?forum={$forum_id}&topic_id={$topic_id}&post_id={$post_id}&order={$order}&viewmode={$viewmode}", 2, _MD_NORIGHTTOEDIT); exit(); } @@ -153,13 +154,13 @@ if ($topic_id) { $topic_status = $topic_obj->getVar('topic_status'); if (!$topic_handler->getPermission($forum_obj, $topic_status, 'reply')) { - redirect_header("viewtopic.php?forum={$forum_id}&topic_id={$topic_id}&post_id={$post_id}&order={$order}&viewmode={$viewmode}", 2, _MD_NORIGHTTOREPLY); + redirect_header(XOOPS_URL."/modules/newbb/viewtopic.php?forum={$forum_id}&topic_id={$topic_id}&post_id={$post_id}&order={$order}&viewmode={$viewmode}", 2, _MD_NORIGHTTOREPLY); exit(); } } else { $topic_status = 0; if (!$topic_handler->getPermission($forum_obj, $topic_status, 'post')) { - redirect_header("viewtopic.php?forum={$forum_id}", 2, _MD_NORIGHTTOPOST); + redirect_header(XOOPS_URL."/modules/newbb/viewtopic.php?forum={$forum_id}", 2, _MD_NORIGHTTOPOST); exit(); } } @@ -268,6 +269,7 @@ } $postid = $post_handler->insert($post_obj); + if ( !$postid ) { include_once XOOPS_ROOT_PATH . '/header.php'; xoops_error($post_obj->getErrors()); @@ -275,7 +277,6 @@ exit(); } newbb_setsession("LP", time()); // Recording last post time - $topic_obj =& $topic_handler->get( $post_obj->getVar("topic_id") ); $uid = (is_object($xoopsUser)) ? $xoopsUser->getVar('uid') : 0; if ( newbb_isAdmin($forum_obj) @@ -374,15 +375,15 @@ ); } - $redirect = "viewtopic.php?post_id=" . $postid ; + $redirect = XOOPS_URL."/modules/newbb/viewtopic.php?post_id=" . $postid ; $message = _MD_THANKSSUBMIT . "<br />" . $error_upload; } else { - $redirect = "viewforum.php?forum=" . $post_obj->getVar('forum_id'); + $redirect = XOOPS_URL."/modules/newbb/viewforum.php?forum=" . $post_obj->getVar('forum_id'); $message = _MD_THANKSSUBMIT . "<br />" . _MD_WAITFORAPPROVAL . "<br />" . $error_upload; } if ( $op == "add" ) { - redirect_header("polls.php?op=add&forum=" . $post_obj->getVar('forum_id') . "&topic_id=" . $post_obj->getVar('topic_id'), 1, _MD_ADDPOLL); + redirect_header(XOOPS_URL."/modules/newbb/polls.php?op=add&forum=" . $post_obj->getVar('forum_id') . "&topic_id=" . $post_obj->getVar('topic_id'), 1, _MD_ADDPOLL); exit(); } else { redirect_header($redirect, 2, $message); Modified: XoopsModules/newbb/branches/alfred/newbb/templates/newbb_index.html =================================================================== --- XoopsModules/newbb/branches/alfred/newbb/templates/newbb_index.html 2012-03-05 21:45:51 UTC (rev 9099) +++ XoopsModules/newbb/branches/alfred/newbb/templates/newbb_index.html 2012-03-06 16:43:51 UTC (rev 9100) @@ -1,185 +1,166 @@ -<fieldset> - <div class="forum_header"> - <div class="forum_title" style="float:left;"> - <h2><a href="<{$xoops_url}>/modules/<{$xoops_dirname}>/index.php"><{$index_title}></a></h2> - <hr align="left" width="50%" size="1"/> - <{$index_desc}> - </div> +<div class="forum_header"> + <div class="forum_title" style="float:left;"> + <h2><a href="<{$xoops_url}>/modules/<{$xoops_dirname}>/index.php"><{$index_title}></a></h2> + <hr align="left" width="50%" size="1" /> + <{$index_desc}> </div> - <div style="clear:both;"></div> - <{if $viewer_level gt 1}> - <br/> - - <div class="forum_stats"> - <div class="forum_stats_left"> - <{$smarty.const._MD_TOPIC}>: - <a href="<{$xoops_url}>/modules/<{$xoops_dirname}>/list.topic.php?status=active#admin" target="_self" title="<{$smarty.const._MD_TYPE_ADMIN}>"><{$smarty.const._MD_TYPE_ADMIN}></a> - | - <a href="<{$xoops_url}>/modules/<{$xoops_dirname}>/list.topic.php?status=pending#admin" target="_self" title="<{$smarty.const._MD_TYPE_PENDING}>"><{if - $wait_new_topic}>(<font color="red"><b><{$wait_new_topic}></b></font>) - <{/if}><{$smarty.const._MD_TYPE_PENDING}></a> | - <a href="<{$xoops_url}>/modules/<{$xoops_dirname}>/list.topic.php?status=deleted#admin" target="_self" title="<{$smarty.const._MD_TYPE_DELETED}>"><{if - $delete_topic}>(<font color="red"><b><{$delete_topic}></b></font>) - <{/if}><{$smarty.const._MD_TYPE_DELETED}></a><br/> - <{$smarty.const._MD_POST2}>: - <a href="<{$xoops_url}>/modules/<{$xoops_dirname}>/viewpost.php?status=active#admin" target="_self" title="<{$smarty.const._MD_TYPE_ADMIN}>"><{$smarty.const._MD_TYPE_ADMIN}></a> - | - <a href="<{$xoops_url}>/modules/<{$xoops_dirname}>/viewpost.php?status=pending#admin" target="_self" title="<{$smarty.const._MD_TYPE_PENDING}>"><{if - $wait_new_post}>(<font color="red"><b><{$wait_new_post}></b></font>) - <{/if}><{$smarty.const._MD_TYPE_PENDING}></a> | - <a href="<{$xoops_url}>/modules/<{$xoops_dirname}>/viewpost.php?status=deleted#admin" target="_self" title="<{$smarty.const._MD_TYPE_DELETED}>"><{if - $delete_post}>(<font color="red"><b><{$delete_post}></b></font>) - <{/if}><{$smarty.const._MD_TYPE_DELETED}></a> +</div> +<div style="clear:both;"></div> +<{if $viewer_level gt 1}> + <br /> + <div class="forum_stats"> + <div class="forum_stats_left"> + <{$smarty.const._MD_TOPIC}>: + <a href="<{$xoops_url}>/modules/<{$xoops_dirname}>/list.topic.php?status=active#admin" target="_self" title="<{$smarty.const._MD_TYPE_ADMIN}>"><{$smarty.const._MD_TYPE_ADMIN}></a> | + <a href="<{$xoops_url}>/modules/<{$xoops_dirname}>/list.topic.php?status=pending#admin" target="_self" title="<{$smarty.const._MD_TYPE_PENDING}>"><{if $wait_new_topic}>(<font color="red"><b><{$wait_new_topic}></b></font>) <{/if}><{$smarty.const._MD_TYPE_PENDING}></a> | + <a href="<{$xoops_url}>/modules/<{$xoops_dirname}>/list.topic.php?status=deleted#admin" target="_self" title="<{$smarty.const._MD_TYPE_DELETED}>"><{if $delete_topic}>(<font color="red"><b><{$delete_topic}></b></font>) <{/if}><{$smarty.const._MD_TYPE_DELETED}></a><br /> + <{$smarty.const._MD_POST2}>: + <a href="<{$xoops_url}>/modules/<{$xoops_dirname}>/viewpost.php?status=active#admin" target="_self" title="<{$smarty.const._MD_TYPE_ADMIN}>"><{$smarty.const._MD_TYPE_ADMIN}></a> | + <a href="<{$xoops_url}>/modules/<{$xoops_dirname}>/viewpost.php?status=pending#admin" target="_self" title="<{$smarty.const._MD_TYPE_PENDING}>"><{if $wait_new_post}>(<font color="red"><b><{$wait_new_post}></b></font>) <{/if}><{$smarty.const._MD_TYPE_PENDING}></a> | + <a href="<{$xoops_url}>/modules/<{$xoops_dirname}>/viewpost.php?status=deleted#admin" target="_self" title="<{$smarty.const._MD_TYPE_DELETED}>"><{if $delete_post}>(<font color="red"><b><{$delete_post}></b></font>) <{/if}><{$smarty.const._MD_TYPE_DELETED}></a> </div> <div class="forum_stats_right"> - <{if $report_post}><a href="<{$xoops_url}>/modules/<{$xoops_dirname}>/admin/admin_report.php"><{$report_post}></a><{/if}> - <br/><a href="<{$xoops_url}>/modules/<{$xoops_dirname}>/moderate.php" target="_self" title="<{$smarty.const._MD_TYPE_SUSPEND}>"><{$smarty.const._MD_TYPE_SUSPEND}></a> - | + <{if $report_post}><a href="<{$xoops_url}>/modules/<{$xoops_dirname}>/admin/admin_report.php"><{$report_post}></a><{/if}> + <br /><a href="<{$xoops_url}>/modules/<{$xoops_dirname}>/moderate.php" target="_self" title="<{$smarty.const._MD_TYPE_SUSPEND}>"><{$smarty.const._MD_TYPE_SUSPEND}></a> | <a href="<{$xoops_url}>/modules/<{$xoops_dirname}>/admin/index.php" target="_self" title="<{$smarty.const._MD_ADMINCP}>"><{$smarty.const._MD_ADMINCP}></a> - </div> - <div style="clear:both;"></div> - </div> - <{/if}> -</fieldset> -<br style="clear: both;"/> -<fieldset> - <div class="dropdown"> - <{includeq file="db:newbb_index_menu.html"}> - </div> -</fieldset> -<br style="clear: both;"/> -<fieldset> -<br/> + </div> + <div style="clear:both;"></div> + </div> +<{/if}> +<br style="clear: both;" /> +<div class="dropdown"> + <{includeq file="db:newbb_index_menu.html"}> +</div> +<br style="clear: both;" /> +<br /> <!-- start forum categories --> -<div class="index_category"> -<!-- start forum categories --> -<{foreachq item=category from=$categories}> -<table class="index_category" cellspacing="0" width="100%"> - <tr class="head"> - <td width="3%" valign="middle" align="center"> - <img onclick="ToggleBlockCategory('<{$category.cat_element_id}>', this, '<{$category_icon.expand}>', '<{$category_icon.collapse}>')" src="<{$category.cat_icon_display}>" alt=""/> - </td> - <{if $category.cat_image}> - <td width="8%"><img src="<{$category.cat_image}>" alt="<{$category.cat_title}>"/></td> - <{/if}> - <td align="left"> - <a href="<{$xoops_url}>/modules/<{$xoops_dirname}>/index.php?cat=<{$category.cat_id}>"><{$category.cat_title}></a> - <{if $category.cat_description}><p class="desc"><{$category.cat_description}></p><{/if}> - </td> - <{if $category.cat_sponsor}> - <td width="15%" nowrap="nowrap" align="right"> - <p class="desc"> - <a href="<{$category.cat_sponsor.link}>" title="<{$category.cat_sponsor.title}>" target="_blank"><{$category.cat_sponsor.title}></a> - </p> - </td> - <{/if}> - </tr> -</table> +<div class="index_category"> + <!-- start forum categories --> + <{foreachq item=category from=$categories}> + <table class="index_category" cellspacing="0" width="100%"> + <tr class="head"> + <td width="3%" valign="middle" align="center"> + <img onclick="ToggleBlockCategory('<{$category.cat_element_id}>', this, '<{$category_icon.expand}>', '<{$category_icon.collapse}>')" src="<{$category.cat_icon_display}>" alt="" /> + </td> + <{if $category.cat_image}> + <td width="8%"><img src="<{$category.cat_image}>" alt="<{$category.cat_title}>" /></td> + <{/if}> + <td align="left"> + <a href="<{$xoops_url}>/modules/<{$xoops_dirname}>/index.php?cat=<{$category.cat_id}>"><{$category.cat_title}></a> + <{if $category.cat_description}><p class="desc"><{$category.cat_description}></p><{/if}> + </td> + <{if $category.cat_sponsor}> + <td width="15%" nowrap="nowrap" align="right"> + <p class="desc"><a href="<{$category.cat_sponsor.link}>" title="<{$category.cat_sponsor.title}>" target="_blank"><{$category.cat_sponsor.title}></a></p> + </td> + <{/if}> + </tr> + </table> -<div id="<{$category.cat_element_id}>" style="display: <{$category.cat_display}>"> -<table border="0" cellspacing="2" cellpadding="0" width="100%"> -<{if $category.forums}> -<tr class="head" align="center"> - <td width="5%"> </td> - <{if $subforum_display == "expand"}> - <td colspan="2" width="37%" nowrap="nowrap" align="left"><{$smarty.const._MD_FORUM}></td> - <{else}> - <td width="37%" nowrap="nowrap" align="left"><{$smarty.const._MD_FORUM}></td> - <{/if}> - <td width="9%" nowrap="nowrap"><{$smarty.const._MD_TOPICS}></td> - <td width="9%" nowrap="nowrap"><{$smarty.const._MD_POSTS}></td> - <td width="40%" nowrap="nowrap"><{$smarty.const._MD_LASTPOST}></td> -</tr> -<{/if}> + <div id="<{$category.cat_element_id}>" style="display: <{$category.cat_display}>"> + <table border="0" cellspacing="2" cellpadding="0" width="100%"> + <{if $category.forums}> + <tr class="head" align="center"> + <td width="5%"> </td> + <{if $subforum_display == "expand"}> + <td colspan="2" width="37%" nowrap="nowrap" align="left"><{$smarty.const._MD_FORUM}></td> + <{else}> + <td width="37%" nowrap="nowrap" align="left"><{$smarty.const._MD_FORUM}></td> + <{/if}> + <td width="9%" nowrap="nowrap"><{$smarty.const._MD_TOPICS}></td> + <td width="9%" nowrap="nowrap"><{$smarty.const._MD_POSTS}></td> + <td width="40%" nowrap="nowrap"><{$smarty.const._MD_LASTPOST}></td> + </tr> + <{/if}> -<!-- start forums --> + <!-- start forums --> -<{if $subforum_display == "expand"}> -<{foreachq item=forum from=$category.forums}> -<tr> - <td width="5%" class="even" align="center" valign="middle"><{$forum.forum_folder}></td> - <td colspan="2" class="odd"> - <div id="index_forum"> + <{if $subforum_display == "expand"}> + <{foreachq item=forum from=$category.forums}> + <tr> + <td width="5%" class="even" align="center" valign="middle"><{$forum.forum_folder}></td> + <td colspan="2" class="odd"> + <div id="index_forum"> <span class="item"><a href="<{$forum.topic_link}>"><{$forum.forum_name}></a> <{if $rss_enable}> (<a href="<{$xoops_url}>/modules/<{$xoops_dirname}>/rss.php?f=<{$forum.forum_id}>" target="_blank" title="RSS feed">RSS</a>) <{/if}> - <br/><{$forum.forum_desc}> + <br /><{$forum.forum_desc}> </span> - <{if $forum.forum_moderators}> + <{if $forum.forum_moderators}> <span class="extra"> <{$smarty.const._MD_MODERATOR}>: <{$forum.forum_moderators}> </span> - <{/if}> - </div> - </td> - <td class="even" align="center" valign="middle"> - <{if $stats[$forum.forum_id].topic.day}><strong><{$stats[$forum.forum_id].topic.day}></strong>/<{/if}> - <{$forum.forum_topics}> - </td> - <td class="odd" align="center" valign="middle"> - <{if $stats[$forum.forum_id].post.day}><strong><{$stats[$forum.forum_id].post.day}></strong>/<{/if}> - <{$forum.forum_posts}> - </td> - <td class="even" align="right" valign="middle"> - <{if $forum.forum_lastpost_subject}> - <{$forum.forum_lastpost_time}> <{$smarty.const._MD_BY}> <{$forum.forum_lastpost_user}><br/> - <a href="<{$xoops_url}>/modules/<{$xoops_dirname}>/viewtopic.php?post_id=<{$forum.forum_lastpost_id}>"> - <{$forum.forum_lastpost_subject}> <img src="<{$xoops_url}>/modules/<{$xoops_dirname}>/templates/images/icon/<{$forum.forum_lastpost_icon}>" alt="<{$smarty.const._MD_NEWBB_GOTOLASTPOST}>" title="<{$smarty.const._MD_NEWBB_GOTOLASTPOST}>"/> - </a> - <{else}> - <{$smarty.const._AM_NEWBB_NOTOPIC}> - <{/if}> - </td> -</tr> + <{/if}> + </div> + </td> + <td class="even" align="center" valign="middle"> + <{if $stats[$forum.forum_id].topic.day}><strong><{$stats[$forum.forum_id].topic.day}></strong>/<{/if}> + <{$forum.forum_topics}> + </td> + <td class="odd" align="center" valign="middle"> + <{if $stats[$forum.forum_id].post.day}><strong><{$stats[$forum.forum_id].post.day}></strong>/<{/if}> + <{$forum.forum_posts}> + </td> + <td class="even" align="right" valign="middle"> + <{if $forum.forum_lastpost_subject}> + <{$forum.forum_lastpost_time}> <{$smarty.const._MD_BY}> <{$forum.forum_lastpost_user}><br /> + <a href="<{$xoops_url}>/modules/<{$xoops_dirname}>/viewtopic.php?post_id=<{$forum.forum_lastpost_id}>"> + <{$forum.forum_lastpost_subject}> <img src="<{$xoops_url}>/modules/<{$xoops_dirname}>/templates/images/icon/<{$forum.forum_lastpost_icon}>" alt="<{$smarty.const._MD_NEWBB_GOTOLASTPOST}>" title="<{$smarty.const._MD_NEWBB_GOTOLASTPOST}>" /> + </a> + <{else}> + <{$smarty.const._AM_NEWBB_NOTOPIC}> + <{/if}> + </td> + </tr> <{if $forum.subforum}> -<tr class="head"> - <td width="5%"> </td> - <td width="5%" align="center"><{$img_subforum}> </td> - <td width="32%" align="center"><{$smarty.const._MD_SUBFORUMS}> </td> - <td width="9%" nowrap="nowrap"> </td> - <td width="9%" nowrap="nowrap"> </td> - <td width="40%" nowrap="nowrap"> </td> -</tr> + <tr class="head" > + <td width="5%"> </td> + <td width="5%" align="center"><{$img_subforum}> </td> + <td width="32%" align="center"><{$smarty.const._MD_SUBFORUMS}> </td> + <td width="9%" nowrap="nowrap"> </td> + <td width="9%" nowrap="nowrap"> </td> + <td width="40%" nowrap="nowrap"> </td> + </tr> <{foreachq item=subforum from=$forum.subforum}> -<tr> - <td class="odd" width="5%"> </td> - <td class="even" align="center" valign="middle" width="5%"><{$subforum.forum_folder}></td> - <td width="32%" class="odd"> - <div id="index_forum"> + <tr> + <td class="odd" width="5%"> </td> + <td class="even" align="center" valign="middle" width="5%"><{$subforum.forum_folder}></td> + <td width="32%" class="odd"> + <div id="index_forum"> <span class="item"><a href="<{$xoops_url}>/modules/<{$xoops_dirname}>/viewforum.php?forum=<{$subforum.forum_id}>"><strong><{$subforum.forum_name}></strong></a> <{if $rss_enable}> (<a href="<{$xoops_url}>/modules/<{$xoops_dirname}>/rss.php?f=<{$subforum.forum_id}>" target="_blank" title="RSS feed">RSS</a>) <{/if}> - <br/><{$subforum.forum_desc}> + <br /><{$subforum.forum_desc}> </span> - <{if $subforum.forum_moderators}> + <{if $subforum.forum_moderators}> <span class="extra"> <{$smarty.const._MD_MODERATOR}>: <{$subforum.forum_moderators}> </span> - <{/if}> + <{/if}> </div> - </td> - <td class="even" width="9%" align="center" valign="middle"> - <{if $stats[$subforum.forum_id].topic.day}><strong><{$stats[$subforum.forum_id].topic.day}></strong>/<{/if}> - <{$subforum.forum_topics}> - </td> - <td class="odd" width="9%" align="center" valign="middle"> - <{if $stats[$subforum.forum_id].post.day}><strong><{$stats[$subforum.forum_id].post.day}></strong>/<{/if}> - <{$subforum.forum_posts}> - </td> - <td class="even" width="40%" align="right" valign="middle"> - <{if $subforum.forum_lastpost_subject}> - <{$subforum.forum_lastpost_time}> <{$smarty.const._MD_BY}> <{$subforum.forum_lastpost_user}><br/> - <a href="<{$xoops_url}>/modules/<{$xoops_dirname}>/viewtopic.php?post_id=<{$subforum.forum_lastpost_id}>"> - <{$subforum.forum_lastpost_subject}> <img src="<{$xoops_url}>/modules/<{$xoops_dirname}>/templates/images/icon/<{$forum.forum_lastpost_icon}>" alt="<{$smarty.const._MD_NEWBB_GOTOLASTPOST}>" title="<{$smarty.const._MD_NEWBB_GOTOLASTPOST}>"/> - </a> - <{else}> - <{$smarty.const._AM_NEWBB_NOTOPIC}> - <{/if}> - </td> -</tr> + </td> + <td class="even" width="9%" align="center" valign="middle"> + <{if $stats[$subforum.forum_id].topic.day}><strong><{$stats[$subforum.forum_id].topic.day}></strong>/<{/if}> + <{$subforum.forum_topics}> + </td> + <td class="odd" width="9%" align="center" valign="middle"> + <{if $stats[$subforum.forum_id].post.day}><strong><{$stats[$subforum.forum_id].post.day}></strong>/<{/if}> + <{$subforum.forum_posts}> + </td> + <td class="even" width="40%" align="right" valign="middle"> + <{if $subforum.forum_lastpost_subject}> + <{$subforum.forum_lastpost_time}> <{$smarty.const._MD_BY}> <{$subforum.forum_lastpost_user}><br /> + <a href="<{$xoops_url}>/modules/<{$xoops_dirname}>/viewtopic.php?post_id=<{$subforum.forum_lastpost_id}>"> + <{$subforum.forum_lastpost_subject}> <img src="<{$xoops_url}>/modules/<{$xoops_dirname}>/templates/images/icon/<{$forum.forum_lastpost_icon}>" alt="<{$smarty.const._MD_NEWBB_GOTOLASTPOST}>" title="<{$smarty.const._MD_NEWBB_GOTOLASTPOST}>" /> + </a> + <{else}> + <{$smarty.const._AM_NEWBB_NOTOPIC}> + <{/if}> + </td> + </tr> <{/foreach}> <{/if}> <{/foreach}> @@ -187,181 +168,170 @@ <{elseif $subforum_display == "collapse"}> <{foreachq item=forum from=$category.forums}> -<tr> - <{if $forum.subforum}> - <td class="even" rowspan="2" align="center" valign="middle"><{$forum.forum_folder}></td> - <{else}> - <td class="even" align="center" valign="middle"><{$forum.forum_folder}></td> - <{/if}> - <td class="odd"> - <div id="index_forum"> + <tr> + <{if $forum.subforum}> + <td class="even" rowspan="2" align="center" valign="middle"><{$forum.forum_folder}></td> + <{else}> + <td class="even" align="center" valign="middle"><{$forum.forum_folder}></td> + <{/if}> + <td class="odd"> + <div id="index_forum"> <span class="item"><a href="<{$xoops_url}>/modules/<{$xoops_dirname}>/viewforum.php?forum=<{$forum.forum_id}>"><{$forum.forum_name}></a> <{if $rss_enable}> (<a href="<{$xoops_url}>/modules/<{$xoops_dirname}>/rss.php?f=<{$forum.forum_id}>" target="_blank" title="RSS feed">RSS</a>) <{/if}> - <br/><{$forum.forum_desc}> + <br /><{$forum.forum_desc}> </span> - <{if $forum.forum_moderators}> + <{if $forum.forum_moderators}> <span class="extra"> <{$smarty.const._MD_MODERATOR}>: <{$forum.forum_moderators}> </span> - <{/if}> + <{/if}> </div> - </td> - <td class="even" align="center" valign="middle"> - <{if $stats[$forum.forum_id].topic.day}><strong><{$stats[$forum.forum_id].topic.day}></strong>/<{/if}> - <{$forum.forum_topics}> - </td> - <td class="odd" align="center" valign="middle"> - <{if $stats[$forum.forum_id].post.day}><strong><{$stats[$forum.forum_id].post.day}></strong>/<{/if}> - <{$forum.forum_posts}> - </td> - <td class="even" align="right" valign="middle"> - <{if $forum.forum_lastpost_subject}> - <{$forum.forum_lastpost_time}> <{$smarty.const._MD_BY}> <{$forum.forum_lastpost_user}><br/> - <a href="<{$xoops_url}>/modules/<{$xoops_dirname}>/viewtopic.php?post_id=<{$forum.forum_lastpost_id}>"> - <{$forum.forum_lastpost_subject}> <img src="<{$xoops_url}>/modules/<{$xoops_dirname}>/templates/images/icon/<{$forum.forum_lastpost_icon}>" alt="<{$smarty.const._MD_NEWBB_GOTOLASTPOST}>" title="<{$smarty.const._MD_NEWBB_GOTOLASTPOST}>"/> - </a> - <{else}> - <{$smarty.const._AM_NEWBB_NOTOPIC}> - <{/if}> - </td> -</tr> + </td> + <td class="even" align="center" valign="middle"> + <{if $stats[$forum.forum_id].topic.day}><strong><{$stats[$forum.forum_id].topic.day}></strong>/<{/if}> + <{$forum.forum_topics}> + </td> + <td class="odd" align="center" valign="middle"> + <{if $stats[$forum.forum_id].post.day}><strong><{$stats[$forum.forum_id].post.day}></strong>/<{/if}> + <{$forum.forum_posts}> + </td> + <td class="even" align="right" valign="middle"> + <{if $forum.forum_lastpost_subject}> + <{$forum.forum_lastpost_time}> <{$smarty.const._MD_BY}> <{$forum.forum_lastpost_user}><br /> + <a href="<{$xoops_url}>/modules/<{$xoops_dirname}>/viewtopic.php?post_id=<{$forum.forum_lastpost_id}>"> + <{$forum.forum_lastpost_subject}> <img src="<{$xoops_url}>/modules/<{$xoops_dirname}>/templates/images/icon/<{$forum.forum_lastpost_icon}>" alt="<{$smarty.const._MD_NEWBB_GOTOLASTPOST}>" title="<{$smarty.const._MD_NEWBB_GOTOLASTPOST}>" /> + </a> + <{else}> + <{$smarty.const._AM_NEWBB_NOTOPIC}> + <{/if}> + </td> + </tr> -<{if $forum.subforum}> -<tr> - <td class="odd" colspan="4" align="left"><{$smarty.const._MD_SUBFORUMS}> <{$img_subforum}> - <{foreachq item=subforum from=$forum.subforum}> - [<a href="viewforum.php?forum=<{$subforum.forum_id}>"><{$subforum.forum_name}></a>] - <{/foreach}> - </td> -</tr> -<{/if}> + <{if $forum.subforum}> + <tr> + <td class="odd" colspan="4" align="left"><{$smarty.const._MD_SUBFORUMS}> <{$img_subforum}> + <{foreachq item=subforum from=$forum.subforum}> + [<a href="viewforum.php?forum=<{$subforum.forum_id}>"><{$subforum.forum_name}></a>] + <{/foreach}> + </td> + </tr> + <{/if}> <{/foreach}> <{else}> <{foreachq item=forum from=$category.forums}> -<tr> - <td class="even" align="center" valign="middle"><{$forum.forum_folder}></td> - <td class="odd"> - <div id="index_forum"> + <tr> + <td class="even" align="center" valign="middle"><{$forum.forum_folder}></td> + <td class="odd"> + <div id="index_forum"> <span class="item"><a href="<{$xoops_url}>/modules/<{$xoops_dirname}>/viewforum.php?forum=<{$forum.forum_id}>"><{$forum.forum_name}></a> <{if $rss_enable}> (<a href="<{$xoops_url}>/modules/<{$xoops_dirname}>/rss.php?f=<{$forum.forum_id}>" target="_blank" title="RSS feed">RSS</a>) <{/if}> - <br/><{$forum.forum_desc}> + <br /><{$forum.forum_desc}> </span> - <{if $forum.forum_moderators}> + <{if $forum.forum_moderators}> <span class="extra"> <{$smarty.const._MD_MODERATOR}>: <{$forum.forum_moderators}> </span> - <{/if}> + <{/if}> </div> - </td> - <td class="even" align="center" valign="middle"> - <{if $stats[$forum.forum_id].topic.day}><strong><{$stats[$forum.forum_id].topic.day}></strong>/<{/if}> - <{$forum.forum_topics}> - </td> - <td class="odd" align="center" valign="middle"> - <{if $stats[$forum.forum_id].post.day}><strong><{$stats[$forum.forum_id].post.day}></strong>/<{/if}> - <{$forum.forum_posts}> - </td> - <td class="even" align="right" valign="middle"> - <{if $forum.forum_lastpost_subject}> - <{$forum.forum_lastpost_time}> <{$smarty.const._MD_BY}> <{$forum.forum_lastpost_user}><br/> - <a href="<{$xoops_url}>/modules/<{$xoops_dirname}>/viewtopic.php?post_id=<{$forum.forum_lastpost_id}>"> - <{$forum.forum_lastpost_subject}> <img src="<{$xoops_url}>/modules/<{$xoops_dirname}>/templates/images/icon/<{$forum.forum_lastpost_icon}>" alt="<{$smarty.const._MD_NEWBB_GOTOLASTPOST}>" title="<{$smarty.const._MD_NEWBB_GOTOLASTPOST}>"/> - </a> - <{else}> - <{$smarty.const._AM_NEWBB_NOTOPIC}> - <{/if}> - </td> -</tr> + </td> + <td class="even" align="center" valign="middle"> + <{if $stats[$forum.forum_id].topic.day}><strong><{$stats[$forum.forum_id].topic.day}></strong>/<{/if}> + <{$forum.forum_topics}> + </td> + <td class="odd" align="center" valign="middle"> + <{if $stats[$forum.forum_id].post.day}><strong><{$stats[$forum.forum_id].post.day}></strong>/<{/if}> + <{$forum.forum_posts}> + </td> + <td class="even" align="right" valign="middle"> + <{if $forum.forum_lastpost_subject}> + <{$forum.forum_lastpost_time}> <{$smarty.const._MD_BY}> <{$forum.forum_lastpost_user}><br /> + <a href="<{$xoops_url}>/modules/<{$xoops_dirname}>/viewtopic.php?post_id=<{$forum.forum_lastpost_id}>"> + <{$forum.forum_lastpost_subject}> <img src="<{$xoops_url}>/modules/<{$xoops_dirname}>/templates/images/icon/<{$forum.forum_lastpost_icon}>" alt="<{$smarty.const._MD_NEWBB_GOTOLASTPOST}>" title="<{$smarty.const._MD_NEWBB_GOTOLASTPOST}>" /> + </a> + <{else}> + <{$smarty.const._AM_NEWBB_NOTOPIC}> + <{/if}> + </td> + </tr> <{/foreach}> <{/if}> -<!-- end forums --> + <!-- end forums --> </table> -<br/> +<br /> </div> <{/foreach}> <!-- end forum categories --> -</fieldset> -<fieldset> - <div> - <div style="float: left; text-align: left;"> - <{$img_forum_new}> = <{$smarty.const._MD_NEWPOSTS}><br/> - <{$img_forum}> = <{$smarty.const._MD_NONEWPOSTS}><br/> - </div> - <div style="float: right; text-align: right;"> - <form action="<{$xoops_url}>/modules/<{$xoops_dirname}>/search.php" method="post" name="search" id="search"> - <input name="term" id="term" type="text" size="20"/> - <input type="hidden" name="forum" id="forum" value="all"/> - <input type="hidden" name="sortby" id="sortby" value="p.post_time desc"/> - <input type="hidden" name="searchin" id="searchin" value="both"/> - <input type="submit" name="submit" id="submit" value="<{$smarty.const._MD_SEARCH}>"/> - <br/> - [ <a href="<{$xoops_url}>/modules/<{$xoops_dirname}>/search.php"><{$smarty.const._MD_ADVSEARCH}></a> ] - </form> - <{if $rss_button}> - <br/> - <a href="<{$xoops_url}>/modules/<{$xoops_dirname}>/rss.php?c=<{$viewcat}>" target="_blank" title="RSS FEED"> - <{$rss_button}> - </a> - <br/><font size="0.7em;">NewBB Version <{$version/100}></font> - <br/> - <{/if}> - </div> - </div> -</fieldset> -<br style="clear: both;"/> -<{if $currenttime}> -<fieldset> - <div> - <div class="even" style="padding: 5px; line-height: 150%;"> - <span style="padding: 2px;"><{$online.statistik}></span> - <strong><{$smarty.const._MD_NEWBB_STATS}></strong> - </div> - <div class="forum_stats odd" style="padding: 5px; line-height: 150%;"> - <!-- <div class="odd" style="padding: 5px; line-height: 150%;"> //--> - <div class="forum_stats_left odd"> - <{$currenttime}><br/> - <{$smarty.const._MD_TOTALTOPICSC}> - <strong><a href="<{$xoops_url}>/modules/<{$xoops_dirname}>/list.topic.php" title="<{$smarty.const._MD_ALL}>"><{$stats[0].topic.total}></a></strong> - | - <{$smarty.const._MD_TOTALPOSTSC}><strong><a href="<{$xoops_url}>/modules/<{$xoops_dirname}>/viewpost.php" title="<{$smarty.const._MD_ALLPOSTS}>"><{$stats[0].post.total}></a></strong> - <{if $stats[0].digest.total}> - | - <{$smarty.const._MD_TOTALDIGESTSC}><strong><a href="<{$xoops_url}>/modules/<{$xoops_dirname}>/list.topic.php?status=digest" title="<{$smarty.const._MD_TOTALDIGESTSC}>"><{$stats[0].digest.total}></a></strong> - <{/if}> - <{if $userstats}> - <br/><br/> - <{$userstats.lastvisit}><br/><{$userstats.lastpost}> - <{/if}> - </div> - <div class="forum_stats_right odd"> - <!-- <div style="align :right; float: right; width: 48%">//--> - <a href="<{$xoops_url}>/modules/<{$xoops_dirname}>/viewpost.php?status=new" title="<{$smarty.const._MD_VIEW_NEWPOSTS}>"><{$smarty.const._MD_VIEW_NEWPOSTS}></a><br/> - <{$smarty.const._MD_TODAYTOPICSC}><strong><{$stats[0].topic.day|default:0}></strong> - | <{$smarty.const._MD_TODAYPOSTSC}><strong><{$stats[0].post.day|default:0}></strong> - <{if $userstats}> - <br/><br/> - <{$userstats.topics}> | <{$userstats.posts}><{if $userstats.digests}><br/><{$userstats.digests}><{/if}> - <{/if}> - </div> - </div> - </div> -</fieldset> +<div> + <div style="float: left; text-align: left;"> + <{$img_forum_new}> = <{$smarty.const._MD_NEWPOSTS}><br /> + <{$img_forum}> = <{$smarty.const._MD_NONEWPOSTS}><br /> + </div> + <div style="float: right; text-align: right;"> + <form action="<{$xoops_url}>/modules/<{$xoops_dirname}>/search.php" method="post" name="search" id="search"> + <input name="term" id="term" type="text" size="20" /> + <input type="hidden" name="forum" id="forum" value="all" /> + <input type="hidden" name="sortby" id="sortby" value="p.post_time desc" /> + <input type="hidden" name="searchin" id="searchin" value="both" /> + <input type="submit" name="submit" id="submit" value="<{$smarty.const._MD_SEARCH}>" /> + <br /> + [ <a href="<{$xoops_url}>/modules/<{$xoops_dirname}>/search.php"><{$smarty.const._MD_ADVSEARCH}></a> ] + </form> + <{if $rss_button}> + <br /> + <a href="<{$xoops_url}>/modules/<{$xoops_dirname}>/rss.php?c=<{$viewcat}>" target="_blank" title="RSS FEED"> + <{$rss_button}> + </a> + <br /><font size="0.7em;"><a href="http://www.simple-xoops.de">NewBB Version <{$version/100}></a></font> + <br /> + <{/if}> + </div> +</div> +<br style="clear: both;" /> +<{if $currenttime}> + <div> + <div class="even" style="padding: 5px; line-height: 150%;"> + <span style="padding: 2px;"><{$online.statistik}></span> + <strong><{$smarty.const._MD_NEWBB_STATS}></strong> + </div> + <div class="forum_stats odd" style="padding: 5px; line-height: 150%;"> + <!-- <div class="odd" style="padding: 5px; line-height: 150%;"> //--> + <div class="forum_stats_left odd"> + <{$currenttime}><br /> + <{$smarty.const._MD_TOTALTOPICSC}> + <strong><a href="<{$xoops_url}>/modules/<{$xoops_dirname}>/list.topic.php" title="<{$smarty.const._MD_ALL}>"><{$stats[0].topic.total}></a></strong> + | <{$smarty.const._MD_TOTALPOSTSC}><strong><a href="<{$xoops_url}>/modules/<{$xoops_dirname}>/viewpost.php" title="<{$smarty.const._MD_ALLPOSTS}>"><{$stats[0].post.total}></a></strong> + <{if $stats[0].digest.total}> + | <{$smarty.const._MD_TOTALDIGESTSC}><strong><a href="<{$xoops_url}>/modules/<{$xoops_dirname}>/list.topic.php?status=digest" title="<{$smarty.const._MD_TOTALDIGESTSC}>"><{$stats[0].digest.total}></a></strong> + <{/if}> + <{if $userstats}> + <br /><br /> + <{$userstats.lastvisit}><br /><{$userstats.lastpost}> + <{/if}> + </div> + <div class="forum_stats_right odd"> + <!-- <div style="align :right; float: right; width: 48%">//--> + <a href="<{$xoops_url}>/modules/<{$xoops_dirname}>/viewpost.php?status=new" title="<{$smarty.const._MD_VIEW_NEWPOSTS}>"><{$smarty.const._MD_VIEW_NEWPOSTS}></a><br /> + <{$smarty.const._MD_TODAYTOPICSC}><strong><{$stats[0].topic.day|default:0}></strong> + | <{$smarty.const._MD_TODAYPOSTSC}><strong><{$stats[0].post.day|default:0}></strong> + <{if $userstats}> + <br /><br /> + <{$userstats.topics}> | <{$userstats.posts}><{if $userstats.digests}><br /><{$userstats.digests}><{/if}> + <{/if}> + </div> + </div> + </div> <{/if}> <br style="clear:both;"/> -<{if $online}> -<fieldset> - <{includeq file="db:newbb_online.html"}> -</fieldset> +<{if $online}> + <{includeq file="db:newbb_online.html"}> <{/if}> -<fieldset> - <{includeq file='db:newbb_notification_select.html'}> -</fieldset> +<{includeq file='db:newbb_notification_select.html'}> <!-- end module contents --> \ No newline at end of file Modified: XoopsModules/newbb/branches/alfred/newbb/templates/newbb_thread.html =================================================================== --- XoopsModules/newbb/branches/alfred/newbb/templates/newbb_thread.html 2012-03-05 21:45:51 UTC (rev 9099) +++ XoopsModules/newbb/branches/alfred/newbb/templates/newbb_thread.html 2012-03-06 16:43:51 UTC (rev 9100) @@ -129,7 +129,7 @@ <{else}> <{foreachq item=btn from=$topic_post.thread_buttons}> <a href="<{$btn.link}>&post_id=<{$topic_post.post_id}>" title="<{$btn.name}>"> <{$btn.image}></a> <{/foreach}> <{/if}> - <a href="#threadtop" title="<{$smarty.const._MD_TOP}>"> <{$up}></a> + <a href="#threadtop" title="<{$smarty.const._MD_TOP}>"> <{$p_up}></a> </td> </tr> </table> Modified: XoopsModules/newbb/branches/alfred/newbb/templates/newbb_viewforum.html =================================================================== --- XoopsModules/newbb/branches/alfred/newbb/templates/newbb_viewforum.html 2012-03-05 21:45:51 UTC (rev 9099) +++ XoopsModules/newbb/branches/alfred/newbb/templates/newbb_viewforum.html 2012-03-06 16:43:51 UTC (rev 9100) @@ -1,4 +1,3 @@ -<fieldset> <div class="forum_header"> <div class="forum_title"> <h2><a href="<{$xoops_url}>/modules/<{$xoops_dirname}>/index.php"><{$forum_index_title}></a></h2> @@ -237,5 +236,5 @@ <{includeq file="db:newbb_online.html"}> <{/if}> <{includeq file='db:newbb_notification_select.html'}> -</fieldset> + <!-- end module contents --> \ No newline at end of file Modified: XoopsModules/newbb/branches/alfred/newbb/templates/newbb_viewpost.html =================================================================== --- XoopsModules/newbb/branches/alfred/newbb/templates/newbb_viewpost.html 2012-03-05 21:45:51 UTC (rev 9099) +++ XoopsModules/newbb/branches/alfred/newbb/templates/newbb_viewpost.html 2012-03-06 16:43:51 UTC (rev 9100) @@ -1,4 +1,3 @@ -<fieldset> <div class="forum_header"> <div class="forum_title"> <h2><a href="<{$xoops_url}>/modules/<{$xoops_dirname}>/index.php"><{$lang_forum_index}></a></h2> @@ -137,5 +136,5 @@ <br /> <{includeq file="db:newbb_online.html"}> <{/if}> -</fieldset> + <!-- end module contents --> \ No newline at end of file Modified: XoopsModules/newbb/branches/alfred/newbb/templates/newbb_viewtopic.html =================================================================== --- XoopsModules/newbb/branches/alfred/newbb/templates/newbb_viewtopic.html 2012-03-05 21:45:51 UTC (rev 9099) +++ XoopsModules/newbb/branches/alfred/newbb/templates/newbb_viewtopic.html 2012-03-06 16:43:51 UTC (rev 9100) @@ -1,4 +1,3 @@ -<fieldset> <div class="forum_header"> <div class="forum_title"> <h2><a href="<{$xoops_url}>/modules/<{$xoops_dirname}>/index.php"><{$lang_forum_index}></a></h2> @@ -242,7 +241,7 @@ <br /> <{includeq file='db:newbb_notification_select.html'}> -</fieldset> + <script type="text/javascript"> <!-- xoopsGetElementById('aktuell').scrollIntoView(true); Modified: XoopsModules/newbb/branches/alfred/newbb/viewforum.php =================================================================== --- XoopsModules/newbb/branches/alfred/newbb/viewforum.php 2012-03-05 21:45:51 UTC (rev 9099) +++ XoopsModules/newbb/branches/alfred/newbb/viewforum.php 2012-03-06 16:43:51 UTC (rev 9100) @@ -255,7 +255,6 @@ } $xoopsTpl->assign('forum_topicstatus', $current_status); - $all_topics = $forum_handler->getTopicCount($forum_obj, $startdate, $status); if ( $all_topics > $xoopsModuleConfig['topics_per_page']) { include XOOPS_ROOT_PATH.'/class/pagenav.php'; @@ -264,7 +263,7 @@ $page_query_nav = implode("&", array_values($query_nav)); unset($query_nav); $nav = new XoopsPageNav($all_topics, $xoopsModuleConfig['topics_per_page'], $start, "start", $page_query_nav); - + if (!empty($xoopsModuleConfig['do_rewrite'])) $nav->url = XOOPS_URL.$nav->url; if ($xoopsModuleConfig['pagenav_display'] == 'select') $navi = $nav->renderSelect(); elseif ($xoopsModuleConfig['pagenav_display'] == 'bild') Modified: XoopsModules/newbb/branches/alfred/newbb/viewpost.php =================================================================== --- XoopsModules/newbb/branches/alfred/newbb/viewpost.php 2012-03-05 21:45:51 UTC (rev 9099) +++ XoopsModules/newbb/branches/alfred/newbb/viewpost.php 2012-03-06 16:43:51 UTC (rev 9100) @@ -333,6 +333,7 @@ if ( $postCount > $post_perpage ) { include XOOPS_ROOT_PATH.'/class/pagenav.php'; $nav = new XoopsPageNav($postCount, $post_perpage, $start, "start", 'forum='.$forum_id.'&viewmode='.$viewmode.'&status='.$status.'&uid='.$uid.'&order='.$order."&mode=".$mode); + if (!empty($xoopsModuleConfig['do_rewrite'])) $nav->url = XOOPS_URL . $nav->url; if ($xoopsModuleConfig['pagenav_display'] == 'select') $navi = $nav->renderSelect(); elseif ($xoopsModuleConfig['pagenav_display'] == 'bild') Modified: XoopsModules/newbb/branches/alfred/newbb/viewtopic.php ===========================================... [truncated message content] |