|
From: OryNider <ory...@us...> - 2007-09-24 22:28:19
|
Update of /cvsroot/mxbb/mx_smartor/album_mod In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv10201/album_mod Added Files: album_bbconstants.php Log Message: bbcode albuming stuff --- NEW FILE: album_bbconstants.php --- <?php /** * * @package mxBB Portal Module - mx_smartor * @version $Id: album_bbconstants.php,v 1.2 2007/09/24 22:28:10 orynider Exp $ * @copyright (c) 2003 [ory...@rd..., OryNider] mxBB Development Team * @license http://opensource.org/licenses/gpl-license.php GNU General Public License v2 * */ if ( !defined('IN_PORTAL') ) { die('Hacking attempt'); } if ( !defined('IN_ALBUM') ) { define('IN_ALBUM', true); } !defined('ALBUM_CONFIG_TABLE') ? define('ALBUM_CONFIG_TABLE', $mx_table_prefix.'smartor_album_config') : false; $sql = "SELECT config_value FROM " . ALBUM_CONFIG_TABLE . " WHERE config_name = 'index'"; if ( !($result = $db->sql_query($sql)) ) { mx_message_die(CRITICAL_ERROR, 'Could not query album config database'); } if ( $row = $db->sql_fetchrow($result) ) { $db->sql_freeresult($result); $album_index = $row['config_value']; } function this_smartor_mxurl($args = '', $force_standalone_mode = false) { global $mx_root_path, $album_index, $phpEx, $integration_enabled, $is_block; $module_root_path = $mx_root_path . 'modules/mx_smartor/'; if( $force_standalone_mode || !$is_block ) { $mxurl = $mx_root_path . 'modules/mx_smartor/' . 'album.' . $phpEx . ($args == '' ? '' : '?' . $args); } else { $mxurl = $mx_root_path . 'index.' . $phpEx; $mxurl .= '?page=' . $album_index . ($args == '' ? '' : '&' . $args); } return $mxurl; } define('ALBUM_INDEX', this_smartor_mxurl()); define('ALBUM_SHOWPAGE', this_smartor_mxurl('smartor_mode=album_showpage')); define('ALBUM_PICM', this_smartor_mxurl('smartor_mode=album_picm', true)); define('ALBUM_THUMBNAIL', this_smartor_mxurl('smartor_mode=album_thumbnail', true)); ?> |