Hi this is in realtion to JcalPro and My forum. I added an event in joomla admin fine (BACKEND) But on my website www.rpmmagazine.co.uk (go to news and reviews) (than go to Events and Calendar) and try and add an event or click the + symbol in the calendar days and it comes up with this
QuoteFatal error: Cannot redeclare unhtmlentities() (previously declared in /home/httpd/vhosts/rpmmagazine.co.uk/httpdocs/rpm/forum/Sources/Subs-Seo4SMF.php:1277) in /home/httpd/vhosts/rpmmagazine.co.uk/httpdocs/rpm/components/com_jcalpro/admin_events.php on line 179
What am I doing wrong or how can I fic this. I am usinf joomla 1.0.12 stable, SMF 1.1.2 (BRIDGE login) and Jcal Pro 1.5. If you need more information please let me know! The fatal error is going into my /forum/comonents/com_jcalpro/admin_events.php ??? Why is it going into my smf forum? Is this to do with the bridge. Thankyou for any help you can give. PAUL (Note to Orstio - Im still ticking away and its been almost two months and I am finally getting somewhere. I have ended up using joomla and Im very happy. Thanks for all you support.) ;D
Looks like you've got a function name collision between Seo4SMF and JCalPro. The both contain a function named unhtmlentities.
Okay! Would there be at all a possible way around this problem or not. It's a function for administrators to add events to the calendar but I can still add events through the admin! It would be nice to allow members (only a few) to be able to add events without having to go into the admin but do it straight from the site. If you could thing of any possibilities to solving this problem please let me know. How are you by the way? Paul.
why don't you just use the SMF calendar?
Hi Kindred
Well i wanted to keep that for forum users to add their events etc etc and the main calendar if for myself and my Partner and our events. Does that make sense? I swear Kindred I am loosing the plot, I have never spent so long in fornt of a computer. I am also sorry If I got a little sharp-tongued with you in the past. I was very frustarted than. I also would like to add to this post that for some VERY VERY odd reason... When i log in and out in FIREFOX the page loads back to the page the user logged in or out. However in IE 7.0 it id directing the user to the homepage for both login and out.
Its crazy you know. I get so far and today I was almost bouncing with the way things are going and now this happens. I have NO Idea what to do and I am beginning to really hate IE as it seems so unstable to be honest. Is this a problem with my site or IE. Whay would firfox be different when logging in and out? If anyone, anyone could suggest or help with this it would be great.
Well, I was hoping to finish things up this weekend but it looks like Im in for another very long EASTER! YEAH.
Paul
Below is the joomla / smf login module. For those who are not sure that is in your 'joomla directory'/modules/mod_smf_login.php
Can anyone see if there is something in here that may be conflicting with IE 7.0?
<?php
/**********************************************************************************
* mod_smf_login.php *
***********************************************************************************
* SMF: Simple Machines Forum *
* Open-Source Project Inspired by Zef Hemel ([email protected]) *
* =============================================================================== *
* Software Version: SMF 1.1 *
* Software by: Simple Machines (http://www.simplemachines.org) *
* Copyright 2006 by: Simple Machines LLC (http://www.simplemachines.org) *
* 2001-2006 by: Lewis Media (http://www.lewismedia.com) *
* Support, News, Updates at: http://www.simplemachines.org *
***********************************************************************************
* This program is free software; you may redistribute it and/or modify it under *
* the terms of the provided license as published by Simple Machines LLC. *
* *
* This program is distributed in the hope that it is and will be useful, but *
* WITHOUT ANY WARRANTIES; without even any implied warranty of MERCHANTABILITY *
* or FITNESS FOR A PARTICULAR PURPOSE. *
* *
* See the "license.txt" file for details of the Simple Machines license. *
* The latest version can always be found at http://www.simplemachines.org. *
**********************************************************************************/
if (!defined('_VALID_MOS'))
die('Direct Access to this location is not allowed.');
global $smf_path, $bridge_reg, $maintenance, $sourcedir, $context, $user, $mosConfig_live_site, $mosConfig_db, $mosConfig_dbprefix, $synch_lang;
// Get the configuration. This will tell Mambo where SMF is, and some integration settings
$database->setQuery("
SELECT `variable`, `value1`
FROM #__smf_config
");
$variables = $database->loadAssocList();
foreach ($variables as $variable){
$variable_name = $variable['variable'];
$$variable_name = $variable['value1'];
}
//This entire structure only needs to be executed on non-SMF pages.
if (!defined('SMF_INTEGRATION_SETTINGS')){
define('SMF_INTEGRATION_SETTINGS', serialize(array(
'integrate_pre_load' => 'integrate_pre_load',
)));
function integrate_pre_load () {
global $lang, $language, $mosConfig_lang, $synch_lang, $smf_lang, $smf_path;
$language_conversion = array(
'aa' => 'afar',
'ab' => 'abkhaz',
'ae' => 'avestan',
'af' => 'afrikaans',
'ak' => 'akan',
'ar' => 'arabic',
'am' => 'amharic',
'an' => 'aragonese',
'as' => 'assamese',
'av' => 'avaric',
'ay' => 'aymara',
'az' => 'azerbaijani',
'ba' => 'bashkir',
'be' => 'belarusian',
'bg' => 'bulgarian',
'bh' => 'bihari',
'bi' => 'bislama',
'bm' => 'bambara',
'bn' => 'bangla',
'br' => 'breton',
'bs' => 'bosnian',
'cr' => 'cree',
'da' => 'danish',
'de' => 'german',
'dv' => 'divehi',
'dz' => 'dzongkha',
'en' => 'english',
'fa' => 'farsi',
'es' => 'spanish',
'fr' => 'french',
'gn' => 'guarani',
'hr' => 'croatian',
'hu' => 'hungarian',
'hy' => 'armenian',
'it' => 'italian',
'kr' => 'kanuri',
'ml' => 'malayalam',
'mo' => 'moldovan',
'nb' => 'bokmål',
'nl' => 'dutch',
'nn' => 'nynorsk',
'no' => 'norsk',
'pl' => 'polish',
'pt' => 'portuguese',
'sh' => 'serbo-croatian',
'sr' => 'serbian',
'sq' => 'albanian',
'tg' => 'tajik',
'th' => 'thai',
'tr' => 'turkish',
'iu' => 'inuktitut',
'za' => 'zhuang',
'zh' => 'chinese',
'zu' => 'zulu',
);
if(isset($mosConfig_lang) && $synch_lang == 'true'){
if (isset($_COOKIE['mbfcookie']) || isset($_REQUEST['lang'])){
if (isset($_COOKIE['mbfcookie']['lang'])){
if (isset($language_conversion[$_COOKIE['mbfcookie']['lang']]) && file_exists($smf_path . '/Themes/default/languages/index.' . $language_conversion[$_COOKIE['mbfcookie']['lang']] . '.php'))
$GLOBALS['language'] = $language_conversion[$_COOKIE['mbfcookie']['lang']];
else if (isset($language_conversion[$_COOKIE['mbfcookie']['lang']]) && file_exists($smf_path . '/Themes/default/languages/index.' . $language_conversion[$_COOKIE['mbfcookie']['lang']] . '-utf8.php'))
$GLOBALS['language'] = $language_conversion[$_COOKIE['mbfcookie']['lang']] . '-utf8';
else if (file_exists($smf_path . '/Themes/default/languages/index.' . $_COOKIE['mbfcookie']['lang'] . '.php'))
$GLOBALS['language'] = $_COOKIE['mbfcookie']['lang'];
else if (file_exists($smf_path . '/Themes/default/languages/index.' . $_COOKIE['mbfcookie']['lang'] . '-utf8.php'))
$GLOBALS['language'] = $_COOKIE['mbfcookie']['lang'] . '-utf8';
}
if (isset($_REQUEST['lang'])){
if (isset($language_conversion[substr($_REQUEST['lang'],0,2)]) && file_exists($smf_path . '/Themes/default/languages/index.' . $language_conversion[substr($_REQUEST['lang'],0,2)] . '.php'))
$GLOBALS['language'] = $language_conversion[substr($_REQUEST['lang'],0,2)];
else if (isset($language_conversion[substr($_REQUEST['lang'],0,2)]) && file_exists($smf_path . '/Themes/default/languages/index.' . $language_conversion[substr($_REQUEST['lang'],0,2)] . '-utf8.php'))
$GLOBALS['language'] = $language_conversion[substr($_REQUEST['lang'],0,2)] . '-utf8';
else if (file_exists($smf_path . '/Themes/default/languages/index.' . $_REQUEST['lang'] . '.php'))
$GLOBALS['language'] = $_REQUEST['lang'];
else if (file_exists($smf_path . '/Themes/default/languages/index.' . $_REQUEST['lang'] . '-utf8.php'))
$GLOBALS['language'] = $_REQUEST['lang'] . '-utf8';
}
} else if ($synch_lang == 'true')
$GLOBALS['language'] = $mosConfig_lang;
}
$smf_lang = $GLOBALS['language'];
}
}
if (!defined('SMF'))
{
require_once($smf_path . '/SSI.php');
}
global $boarddir, $context, $txt, $scripturl, $boardurl, $settings, $mosConfig_dbprefix, $db_prefix, $db_name, $smf_date, $mosConfig_db, $mosConfig_sef, $smf_lang, $language;
include_once ( $boarddir . '/Themes/default/languages/index.' . (isset($smf_lang) ? $smf_lang : $language) . '.php');
mysql_select_db($mosConfig_db);
$result = mysql_query("
SELECT id
FROM {$mosConfig_dbprefix}menu
WHERE link = 'index.php?option=com_smf'");
if ($result !== false)
list($menu_item['id']) = mysql_fetch_row($result);
else
$menu_item['id'] = 1;
$myurl = basename($_SERVER['PHP_SELF']) . '?option=com_smf&Itemid=' . $menu_item['id'] . '&';
if ($mosConfig_sef == '1'){
$scripturl = $myurl;
} else {
$scripturl = $mosConfig_live_site . '/' . $myurl;
}
$smf_align = $params->get('smf_align');
$smf_personal_welcome = $params->get('smf_personal_welcome');
$smf_notification = $params->get('smf_notification');
$smf_unread = $params->get('smf_unread');
$smf_new_answers = $params->get('smf_new_answers');
$smf_new_pms = $params->get('smf_new_pms');
$smf_loggedin_time = $params->get('smf_loggedin_time');
$smf_notify_logged_in = $params->get('smf_notify_logged_in');
$smf_logout_button = $params->get('smf_logout_button');
$smf_logout_button_image = $params->get('smf_logout_button_image');
mysql_select_db($db_name);
echo '
<div class="module" style="margin-right: 5px;">
<table width="99%" cellpadding="0" cellspacing="5" border="0" align="', $smf_align, '">
<tr>', empty($context['user']['avatar']) ? '' : '
<td valign="top" align="' . $smf_align . '">' . $context['user']['avatar']['image'] . '
</td>
</tr>
<tr>', '
<td width="100%" valign="top" class="smalltext" style="font-family: verdana, arial, sans-serif;" align="', $smf_align, '">';
// If the user is logged in, display stuff like their name, new messages, etc.
if ($context['user']['is_logged']){
if ($smf_personal_welcome){
echo '
', $txt[247], ' <b>', $context['user']['name'], '</b>,';
}
// If defined in parameters mod_smf a special message for logged in users will displayed.
if ($smf_personal_welcome && $smf_notify_logged_in)
echo '<br />';
if ($smf_notify_logged_in)
echo $smf_notify_logged_in;
// Only tell them about their messages if they can read their messages!
if($smf_new_pms && $context['allow_pm'])
echo
' ', $txt[152], ' <a href="', sefReltoAbs($scripturl. 'action=pm'), '">', $context['user']['messages'], ' ', $context['user']['messages'] != 1 ? $txt[153] : $txt[471], '</a>';
// if defined user can read their new messages
if($smf_unread)
echo
$txt['newmessages4'], ' ', $context['user']['unread_messages'], ' ', $context['user']['unread_messages'] == 1 ? $txt['newmessages0'] : $txt['newmessages1'] . '.';
// Is the forum in maintenance mode?
if ($context['in_maintenance'] && $context['user']['is_admin'])
echo '<br />
<b>', $txt[616], '</b>';
// Are there any members waiting for approval?
if (!empty($context['unapproved_members']))
echo '<br />
', $context['unapproved_members'] == 1 ? $txt['approve_thereis'] : $txt['approve_thereare'], ' <a href="', sefReltoAbs($scripturl. 'action=regcenter').'">', $context['unapproved_members'] == 1 ? $txt['approve_member'] : $context['unapproved_members'] . ' ' . $txt['approve_members'], '</a> ', $txt['approve_members_waiting'];
// Show the total time logged in?
if($smf_loggedin_time && !empty($context['user']['total_time_logged_in']))
{
echo '<br />
', $txt['totalTimeLogged1'];
// If days is just zero, don't bother to show it.
if ($context['user']['total_time_logged_in']['days'] > 0)
echo $context['user']['total_time_logged_in']['days'] . $txt['totalTimeLogged2'];
// Same with hours - only show it if it's above zero.
if ($context['user']['total_time_logged_in']['hours'] > 0)
echo $context['user']['total_time_logged_in']['hours'] . $txt['totalTimeLogged3'];
// But, let's always show minutes - Time wasted here: 0 minutes ;).
echo $context['user']['total_time_logged_in']['minutes'], $txt['totalTimeLogged4'];
}
if ($smf_unread)
echo '<br />
<a href="', sefReltoAbs($scripturl . 'action=unread'),'">', $txt['unread_since_visit'], '</a>';
if ($smf_new_answers)
echo '<br />
<a href="', sefReltoAbs($scripturl. 'action=unreadreplies'),'">', $txt['show_unread_replies'], '</a>';
if ($smf_date)
echo '<br />
' . $context['current_time'];
if ($params->get('logout')=="2")
$_SESSION['return'] = $mosConfig_sef=='1' ? sefReltoAbs(basename($_SERVER['PHP_SELF']) . '?' . $_SERVER['QUERY_STRING']) : $mosConfig_live_site . '/' . basename($_SERVER['PHP_SELF']) . '?' . $_SERVER['QUERY_STRING'];
echo '<br />
<a href="', sefReltoAbs($scripturl . 'action=logout&returnurl='.$params->get('logout').'&sesc='. $context['session_id']), '">', $smf_logout_button ? '<img src="' . (!empty($smf_logout_button_image) && $smf_logout_button_image!="" ? $smf_logout_button_image : $settings['images_url'] . '/' . $context['user']['language'] . '/logout.gif').'" alt="' . $txt[108] . '" style="margin: 0px 0;" border="0" />' : $txt[108], '</a>';
}
// Otherwise they're a guest - so politely ask them to register or login.
else
{
$txt['welcome_guest'] = str_replace($boardurl.'/index.php?', $scripturl , $txt['welcome_guest']);
$txt['welcome_guest'] = str_replace($scripturl.'?', $scripturl, $txt['welcome_guest']);
$txt['welcome_guest'] = str_replace($scripturl.'action=login', sefReltoAbs($scripturl.'action=login'), $txt['welcome_guest']);
switch ($bridge_reg){
case "bridge":
$txt['welcome_guest'] = str_replace($scripturl.'action=register', sefReltoAbs(basename($_SERVER['PHP_SELF']) . '?option=com_smf_registration&task=register'), $txt['welcome_guest']);
$txt['welcome_guest'] = str_replace($scripturl.'action=activate', sefReltoAbs(basename($_SERVER['PHP_SELF']) . '?option=com_smf_registration&task=lostCode'), $txt['welcome_guest']);
break;
case "SMF":
$txt['welcome_guest'] = str_replace($scripturl.'action=register', sefReltoAbs($scripturl.'action=register'),$txt['welcome_guest']);
$txt['welcome_guest'] = str_replace($scripturl.'action=activate', sefReltoAbs($scripturl.'action=activate'),$txt['welcome_guest']);
break;
case "default":
$txt['welcome_guest'] = str_replace($scripturl.'action=register', sefReltoAbs(basename($_SERVER['PHP_SELF']) . '?option=com_registration&task=register'), $txt['welcome_guest']);
$txt['welcome_guest'] = str_replace($scripturl.'action=activate', sefReltoAbs(basename($_SERVER['PHP_SELF']) . '?option=com_smf_registration&task=lostCode'), $txt['welcome_guest']);
break;
case "CB":
$txt['welcome_guest'] = str_replace($scripturl.'action=register', sefReltoAbs(basename($_SERVER['PHP_SELF']) . '?option=com_comprofiler&task=registers'), $txt['welcome_guest']);
$txt['welcome_guest'] = str_replace($scripturl.'action=activate', sefReltoAbs(basename($_SERVER['PHP_SELF']) . '?option=com_smf_registration&task=lostCode'), $txt['welcome_guest']);
break;
case "jw":
$txt['welcome_guest'] = str_replace($scripturl.'action=register', sefReltoAbs(basename($_SERVER['PHP_SELF']) . '?option=com_jw_registration&task=register'), $txt['welcome_guest']);
$txt['welcome_guest'] = str_replace($scripturl.'action=activate', sefReltoAbs(basename($_SERVER['PHP_SELF']) . '?option=com_smf_registration&task=lostCode'), $txt['welcome_guest']);
break;
}
$txt[34] = str_replace('&?','&', $txt[34]);
if (!isset($login))
{$login = '';}
if (!isset($message_login))
{$message_login = '';}
echo '
', $txt['welcome_guest'], '<br />
<script language="JavaScript" type="text/javascript" src="', $settings['default_theme_url'], '/sha1.js"></script>
<form action="', sefReltoAbs($scripturl . 'action=login2'), '" method="post" style="margin: 2px 1ex 1px 0;"', empty($context['disable_login_hashing']) ? ' onsubmit="hashLoginPassword(this, \'' . $context['session_id'] . '\');"' : '', '','>
',$txt[35],': <input class="inputbox" type="text" name="user" size="10" />
',$txt[36],': <input class="inputbox" type="password" name="passwrd" size="10" />
<input class="none" name="Submit" type="image" src="http://www.rpmmagazine.co.uk/arrow_3D_green_right.gif" margin="0" padding="0" width="11" height="11" border="0" underline="0">
<br />
<input type="hidden" name="hash_passwrd" value="" />
<input type="hidden" name="op2" value="login" />
<input type="hidden" name="option" value="com_smf" />
<input type="hidden" name="Itemid" value="', $menu_item['id'], '" />
<input type="hidden" name="action" value="login2" />
<input type="hidden" name="returnurl" value="', $params->get('login'), '" />
<input type="hidden" name="lang" value="', $mosConfig_lang, '" />
<input type="hidden" name="return" value="', $mosConfig_sef=='1' ? sefReltoAbs(basename($_SERVER['PHP_SELF']) . '?' . $_SERVER['QUERY_STRING']) : $mosConfig_live_site . '/' . basename($_SERVER['PHP_SELF']) . '?' . $_SERVER['QUERY_STRING'], '" />
<input type="hidden" name="message" value="', $message_login, '" />
</form>
<a href="', ($bridge_reg!='SMF' ? sefReltoAbs(basename($_SERVER['PHP_SELF']). '?option=com_smf_registration&task=lostPassword') : sefReltoAbs($scripturl . 'action=reminder')) , '">',$txt[315],'</a>';
}
if ($params->get('login') == '2' && (!isset($_REQUEST['action']) || $_REQUEST['action'] != 'login') && (!isset($_REQUEST['option']) || $_REQUEST['option'] != 'com_smf_registration'))
$_SESSION['return'] = $mosConfig_sef=='1' ? sefReltoAbs(basename($_SERVER['PHP_SELF']) . '?' . $_SERVER['QUERY_STRING']) : $mosConfig_live_site . '/' . basename($_SERVER['PHP_SELF']) . '?' . $_SERVER['QUERY_STRING'];
echo '
</td>
</tr></table>
</div>';
mysql_select_db($mosConfig_db);
?>
For your original problem, you'll need to talk to the developers of either JCalPro or Seo4SMF to see if either of them will change the name of their function to avoid the collision.
Your redirect issue has nothing to do with the code in the login module. Redirection is handled in the bridge component, not in the module. It may have to do with the fact that you are using Seo4SMF with the bridge. I'm not certain that situation has been tested fully.
GREAT!!! Seo4SMF was the problem. I can now use JCalPro no problems. However I am still having the problem in IE 7.0 with login and logout. I can login and logout but whenever I do this is, it is redirecting me to the joomla homepage, instead of the page they were on prior to login/out process. I am going to add the bridge component if anyone can help. Thankyou Orstio.
<?php
/**********************************************************************************
* smf.php *
***********************************************************************************
* SMF: Simple Machines Forum *
* Open-Source Project Inspired by Zef Hemel ([email protected]) *
* =============================================================================== *
* Software Version: SMF 1.1 *
* Software by: Simple Machines (http://www.simplemachines.org) *
* Copyright 2006 by: Simple Machines LLC (http://www.simplemachines.org) *
* 2001-2006 by: Lewis Media (http://www.lewismedia.com) *
* Support, News, Updates at: http://www.simplemachines.org *
***********************************************************************************
* This program is free software; you may redistribute it and/or modify it under *
* the terms of the provided license as published by Simple Machines LLC. *
* *
* This program is distributed in the hope that it is and will be useful, but *
* WITHOUT ANY WARRANTIES; without even any implied warranty of MERCHANTABILITY *
* or FITNESS FOR A PARTICULAR PURPOSE. *
* *
* See the "license.txt" file for details of the Simple Machines license. *
* The latest version can always be found at http://www.simplemachines.org. *
**********************************************************************************/
/* This file is the core of the Mambo-SMF bridge component
string ob_mambofix(string $buffer)
- fixes URLs in SMF to point to Mambo component
bool integrate_redirect (&$setLocation, $refresh)
- sets redirection in forum for form submissions
mambo_smf_exit(string $with_output)
- exits SMF securely
integrate_change_email($username, $email)
- updates Mambo with email changes made in SMF
integrate_change_member_data ( array $memberNames, string $var, string $value)
- updates Mambo with member data changes in SMF
integrate_reset_pass($old_username, $username, $password)
- updates Mambo username and password changes made in SMF
integrate_logout($username)
- logs user out of Mambo
integrate_outgoing_email($subject, &$message, $headers)
- fixes URLs in outgoing emails to direct traffic to the component correctly
integrate_login($username, $passwd, $cookielength)
- writes user into Mambo if user doesn't already exist
- logs user into Mambo
integrate_validate_login($username, $password, $cookietime)
- validates the existence of the user in Mambo
- checks for user in SMF
- writes user to SMF if none exists
integrate_delete_member($user)
- deletes mamber from Mambo when admin deletes SMF member
integrate_register($regOptions, $theme_vars)
- writes user into Mambo upon registration in SMF. Function for use with "SMF Registration" option in Mambo admin panel.
*/
/** ensure this file is being included by a parent file and stop direct linking */
defined( '_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' );
//This helps Mambo allow posts with HTML. Please note that this does not necessarily work with all installations.
if (!defined('_MOS_ALLOWHTML'))
define('_MOS_ALLOWHTML', 0x0002);
// Raise the memory limit -- Loading Mambo/Joomla and SMF can take a lot of RAM
@ini_set('memory_limit', '16M');
// Just to make sure nobody tries it
@ini_set('allow_url_fopen', 0);
global $params, $database, $mosConfig_dbprefix, $db_prefix, $mosConfig_db, $txt;
global $mosConfig_absolute_path, $wrapped, $mosConfig_live_site, $mosConfig_sef;
global $bridge_reg, $menu, $Itemid, $context, $cb_reg, $database, $smf_css, $synch_lang, $language_conversion;
// Get the configuration. This will tell Mambo where SMF is, and some integration settings
$database->setQuery("
SELECT `variable`, `value1`
FROM #__smf_config
");
$variables = $database->loadAssocList();
foreach ($variables as $variable){
$variable_name = $variable['variable'];
$$variable_name = $variable['value1'];
}
//Retrofit the query string
$_SERVER['QUERY_STRING'] = strtr($_SERVER['QUERY_STRING'], array('&?' => '&', '&?' => '&' , '#' => '.'));
require_once ($mosConfig_absolute_path . '/components/com_smf/smf_integration_arrays.php');
// Are Mambo and SMF using the same database connection?
if (empty($Itemid) && $database->_resource == $db_connection)
{
$database->setQuery("
SELECT id
FROM #__menu
WHERE link = 'index.php?option=com_smf'
LIMIT 1");
$Itemid = $database->loadResult();
}
// This fixes automatic links that might look like Itemid=43?action=...
if (strpos($_SERVER['QUERY_STRING'], 'Itemid=' . $Itemid . '?') !== false)
$_SERVER['QUERY_STRING'] = strtr($_SERVER['QUERY_STRING'], array('Itemid=' . $Itemid . '?' => 'Itemid=' . $Itemid . '&'));
// Just in case it gets flushed in the middle for any reason..
ob_start('ob_mambofix');
ob_start();
require($smf_path . '/index.php');
$buffer = ob_get_contents();
ob_end_clean();
ob_start();
// --- This means that the buffer may be mambofix'd twice - see above ob_start.
echo ob_mambofix($buffer);
// Ignore notices from Mambo.
error_reporting(E_ALL & !E_NOTICE);
if ($database->_resource == $db_connection)
mysql_select_db($mosConfig_db);
// --- Changed to use action in a notice-friendly way. I would still recommend instead: (more mod friendly!)
if ($wrapped != 'true' || !in_array('main', $context['template_layers']))
{
mysql_select_db($db_name);
die;
}
echo '
<div class="componentheading">
', $menu->name, '
</div>';
// Rewrite URLs to include the session ID.
function ob_mambofix($buffer)
{
global $scripturl, $mosConfig_live_site, $mosConfig_sef, $boardurl;
global $bridge_reg, $Itemid, $_VERSION, $wrapped;
//Don't rewrite URLs if this is a database dump
if (isset($_REQUEST['action']) && $_REQUEST['action'] == 'dumpdb')
return;
$myurl = $mosConfig_live_site . '/' . basename($_SERVER['PHP_SELF']) . '?option=com_smf&Itemid=' . $Itemid . '&';
// jumpto redirects
$buffer = str_replace('"?board=', $mosConfig_sef=='1' ? '"/board,' : '"&board=', $buffer);
$buffer = str_replace('"?action=', $mosConfig_sef=='1' ? '"/action,' : '"&action=', $buffer);
//relative anchors
$buffer = str_replace('href="#', 'href="' . $mosConfig_live_site . '/' . basename($_SERVER['PHP_SELF']) . '?' . $_SERVER['QUERY_STRING'] . '#', $buffer);
//get rid of the question mark
$buffer = str_replace('"' . $scripturl . '?', '"' . $myurl, $buffer);
//if it's the forum index, we don't need a trailing ampersand
$buffer = str_replace('"' . $scripturl . '"', '"' . substr($myurl, 0, -5) . '"', $buffer);
//make sure there are no html entities in the javascript of the unwrapped forum
if ($mosConfig_sef != '1' && $wrapped != 'true')
$buffer = str_replace('var smf_scripturl = "'.substr($myurl, 0, -5).'"', un_htmlspecialchars('var smf_scripturl = "'.substr($myurl, 0, -5).'"'), $buffer);
//Sometimes links are inside single quotes
$buffer = str_replace('\'' . $scripturl . '?', '\'' . $myurl, $buffer);
$buffer = str_replace('\'' . $scripturl, '\'' . $myurl, $buffer);
//Don't forget XML feeds
$buffer = str_replace('<link>'.$scripturl . '?', '<link>'.$myurl, $buffer );
$buffer = str_replace('<link>'.$scripturl, '<link>'.$myurl, $buffer );
$buffer = str_replace('<comments>'.$scripturl . '?', '<comments>'.$myurl, $buffer );
$buffer = str_replace('<comments>'.$scripturl, '<comments>'.$myurl, $buffer );
$buffer = str_replace('<guid>'.$scripturl . '?', '<guid>'.$myurl, $buffer );
$buffer = str_replace('<guid>'.$scripturl, '<guid>'.$myurl, $buffer );
//An ampersand followed by a # is not kosher
$buffer = str_replace($scripturl . '#', substr($myurl, 0, -5) . '#', $buffer);
//SMF admin panel does some funky things after admin login...luckily it's easy to fix
$buffer = str_replace('option=com_smf;Itemid=' . $Itemid . ';', '', $buffer);
// New bridged profile options. Not yet available
//$buffer = str_replace($scripturl . 'action=profile;', $mosConfig_live_site . '/' . basename($_SERVER['PHP_SELF']) . '?option=com_smf_profile&task=view&', $buffer);
//$buffer = str_replace($scripturl . 'action=profile', $mosConfig_live_site . '/' . basename($_SERVER['PHP_SELF']) . '?option=com_smf_profile&task=view', $buffer);
// Bridge registration links
switch ($bridge_reg){
case "bridge":
$buffer = str_replace($myurl . 'action=register', $mosConfig_live_site . '/' . basename($_SERVER['PHP_SELF']) . '?option=com_smf_registration&task=register', $buffer);
$buffer = str_replace($myurl . 'action=activate"', $mosConfig_live_site . '/' . basename($_SERVER['PHP_SELF']) . '?option=com_smf_registration&task=lostCode"', $buffer);
$buffer = str_replace($myurl . 'action=reminder', $mosConfig_live_site . '/' . basename($_SERVER['PHP_SELF']) . '?option=com_smf_registration&task=lostPassword', $buffer);
break;
case "default":
$buffer = str_replace($myurl . 'action=register', $mosConfig_live_site . '/' . basename($_SERVER['PHP_SELF']) . '?option=com_registration&task=register', $buffer);
$buffer = str_replace($myurl . 'action=activate"', $mosConfig_live_site . '/' . basename($_SERVER['PHP_SELF']) . '?option=com_smf_registration&task=lostCode"', $buffer);
$buffer = str_replace($myurl . 'action=reminder', $mosConfig_live_site . '/' . basename($_SERVER['PHP_SELF']) . '?option=com_smf_registration&task=lostPassword', $buffer);
break;
case "CB":
$buffer = str_replace($myurl . 'action=register', $mosConfig_live_site . '/' . basename($_SERVER['PHP_SELF']) . '?option=com_comprofiler&task=registers', $buffer);
$buffer = str_replace($myurl . 'action=activate"', $mosConfig_live_site . '/' . basename($_SERVER['PHP_SELF']) . '?option=com_smf_registration&task=lostCode"', $buffer);
$buffer = str_replace($myurl . 'action=reminder', $mosConfig_live_site . '/' . basename($_SERVER['PHP_SELF']) . '?option=com_smf_registration&task=lostPassword', $buffer);
break;
case "jw":
$buffer = str_replace($myurl . 'action=register', $mosConfig_live_site . '/' . basename($_SERVER['PHP_SELF']) . '?option=com_jw_registration&task=register', $buffer);
$buffer = str_replace($myurl . 'action=activate"', $mosConfig_live_site . '/' . basename($_SERVER['PHP_SELF']) . '?option=com_smf_registration&task=lostCode"', $buffer);
$buffer = str_replace($myurl . 'action=reminder', $mosConfig_live_site . '/' . basename($_SERVER['PHP_SELF']) . '?option=com_smf_registration&task=lostPassword', $buffer);
break;
}
// Don't forget attachments and CAPTCHA
$buffer = str_replace($myurl . 'action=dlattach', $boardurl . '/' . basename($_SERVER['PHP_SELF']) . '?action=dlattach', $buffer);
$buffer = str_replace($myurl . 'action=verificationcode', $boardurl . '/' . basename($_SERVER['PHP_SELF']) . '?action=verificationcode', $buffer);
//And Niko's Arcade Mod
$buffer = str_replace($myurl . 'action=arcade;sa=download;file=swf', $boardurl . '/' . basename($_SERVER['PHP_SELF']) . '?action=arcade;sa=download;file=swf', $buffer);
// and now for SEF
if (!empty($mosConfig_sef) && $mosConfig_sef == '1')
{
preg_match_all('~([\(=]")' . preg_quote($mosConfig_live_site . '/index.php?option=com_smf') . '([^"]*)"{1}~', $buffer, $nonsefurls);
foreach($nonsefurls[0] as $nonsefurl)
{
$nqsefurl = substr($nonsefurl, 0, strpos($nonsefurl, 'option')) . preg_replace('/(\;)([^=#]*)([#"])/', '$1$2=$2$3', substr($nonsefurl, strpos($nonsefurl, 'option'), strlen($nonsefurl)));
$sefurl = sefReltoAbs(substr($nqsefurl, strlen($mosConfig_live_site) + 3, strlen($nqsefurl) - strlen($mosConfig_live_site) - 4));
$sefurl = str_replace(";", "/", $sefurl);
$sefurl = str_replace("=", ",", $sefurl);
if (substr($sefurl, strlen($sefurl) - 1, 1) == '/')
$sefurl = substr($sefurl, 0, strlen($sefurl) - 1);
$buffer = str_replace(substr($nonsefurl,1,strlen($nonsefurl)), '"' . $sefurl . '"', $buffer);
//Fix for Joomla! 1.0.10 fragment
$buffer = str_replace("/#", "#", $buffer);
}
}
return $buffer;
}
function mambo_smf_url($url)
{
global $scripturl, $Itemid, $mosConfig_live_site;
if ($Itemid == 0)
$Itemid = (int) $_REQUEST['Itemid'];
//The ampersands need to be non-entities, because they are used mainly in javascript
$myurl = $mosConfig_live_site . '/' . basename($_SERVER['PHP_SELF']) . '?option=com_smf&Itemid=' . $Itemid . '&';
$url = str_replace($scripturl . '?', $myurl, $url);
$url = str_replace($scripturl, $myurl, $url);
return $url;
}
function mambo_smf_exit($with_output)
{
global $wrapped, $mosConfig_db, $mosConfig_dbprefix, $database, $cur_template, $mainframe, $boardurl, $smf_css, $mosConfig_sef, $mosConfig_debug, $db_name;
$buffer = ob_get_contents();
ob_end_clean();
if (!$with_output || $wrapped !='true')
{
//$buffer = mambo_smf_url($buffer);
$buffer = ob_mambofix($buffer);
echo $buffer;
exit;
}
//We want to pull in the rest of the globals, but use then as locals, so they won't affect anything outside this function
foreach ($GLOBALS as $name => $value)
$$name = &$GLOBALS[$name];
$_MOS_OPTION['buffer'] = ob_mambofix($buffer);
mysql_select_db($mosConfig_db);
$result = mysql_query("
SELECT id
FROM {$mosConfig_dbprefix}menu
WHERE link = 'index.php?option=com_smf'");
if ($result !== false)
list($menu_item['id']) = mysql_fetch_row($result);
else
$menu_item['id'] = 1;
$myurl = basename($_SERVER['PHP_SELF']) . '?option=com_smf&Itemid=' . $menu_item['id'] . '&';
$mainframe->addCustomHeadTag( '<script language="JavaScript" type="text/javascript" src="'. $settings['default_theme_url']. '/script.js?fin11"></script>' );
$mainframe->addCustomHeadTag( '<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
var smf_theme_url = "'. $settings['theme_url']. '";
var smf_images_url = "'. $settings['images_url']. '";');
if ($mosConfig_sef=='1')
$mainframe->addCustomHeadTag( ob_mambofix('var smf_scripturl ="'. $scripturl . '";'));
else
$mainframe->addCustomHeadTag( 'var smf_scripturl = "'. un_htmlspecialchars(mambo_smf_url($scripturl)) . '";');
$mainframe->addCustomHeadTag( ' var smf_session_id = "'. $context['session_id'] . '";
// ]]></script>' );
if ($smf_css == 'true'){
$mainframe->addCustomHeadTag( '<link rel="stylesheet" type="text/css" href="'. $settings['theme_url']. '/style.css?fin11" />' );
$mainframe->addCustomHeadTag( '<link rel="stylesheet" type="text/css" href="'. $settings['default_theme_url']. '/print.css?fin11" media="print" />' );
}
$mainframe->addCustomHeadTag( '<link rel="help" href="'. mambo_smf_url($scripturl. 'action=help') .'" target="_blank" />' );
$mainframe->addCustomHeadTag( '<link rel="search" href="' . mambo_smf_url($scripturl . 'action=search') .'" />' );
$mainframe->addCustomHeadTag( '<link rel="contents" href="'. mambo_smf_url($scripturl). '" />' );
// If RSS feeds are enabled, advertise the presence of one.
if (!empty($modSettings['xmlnews_enable']))
$mainframe->addCustomHeadTag( '<link rel="alternate" type="application/rss+xml" title="'. $context['forum_name']. ' - RSS" href="'. ( $mosConfig_sef == 1 ? sefReltoAbs($myurl. 'type=rss&action=.xml') : $mosConfig_live_site . '/'. $myurl . 'type=rss&action=.xml') . '" />' );
// If we're viewing a topic, these should be the previous and next topics, respectively.
if (!empty($context['current_topic'])){
$mainframe->addCustomHeadTag( '<link rel="prev" href="'. ( $mosConfig_sef == 1 ? sefReltoAbs($myurl. 'topic='. $context['current_topic']. '.0&prev_next=prev') : $mosConfig_live_site . '/'. $myurl . 'topic='. $context['current_topic']. '.0;prev_next=prev') . '" />');
$mainframe->addCustomHeadTag( '<link rel="next" href="'. ( $mosConfig_sef == 1 ? sefReltoAbs($myurl. 'topic='. $context['current_topic']. '.0&prev_next=next') : $mosConfig_live_site . '/'. $myurl . 'topic='. $context['current_topic']. '.0;prev_next=next') . '" />');
}
// If we're in a board, or a topic for that matter, the index will be the board's index.
if (!empty($context['current_board']))
$mainframe->addCustomHeadTag( '<link rel="index" href="' . ( $mosConfig_sef == 1 ? sefReltoAbs($myurl . 'board=' . $context['current_board'] . '.0') : $mosConfig_live_site . '/' . $myurl . 'board=' . $context['current_board'] . '.0') .'" />');
// We'll have to use the cookie to remember the header...
if ($context['user']['is_guest'])
$options['collapse_header'] = !empty($_COOKIE['upshrink']);
// Output any remaining HTML headers. (from mods, maybe?)
$mainframe->addCustomHeadTag(((!isset($_REQUEST['action']) || (isset($_REQUEST['action']) && $_REQUEST['action']!= 'login2')) ? ob_mambofix($context['html_headers']): '') . '
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
var current_header = ' . (empty($options['collapse_header']) ? 'false' : 'true') . ';
function shrinkHeader(mode)
{' );
// Guests don't have theme options!!
if ($context['user']['is_guest'])
$mainframe->addCustomHeadTag( ' document.cookie = "upshrink=" + (mode ? 1 : 0);');
else
$mainframe->addCustomHeadTag(' smf_setThemeOption("collapse_header", mode ? 1 : 0, null, "'. $context['session_id']. '");');
$mainframe->addCustomHeadTag('
document.getElementById("upshrink").src = smf_images_url + (mode ? "/upshrink2.gif" : "/upshrink.gif");
document.getElementById("upshrinkHeader").style.display = mode ? "none" : "";
document.getElementById("upshrinkHeader2").style.display = mode ? "none" : "";
current_header = mode;
}
// ]]></script>');
// the routine for the info center upshrink
$mainframe->addCustomHeadTag('
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
var current_header_ic = '. (empty($options['collapse_header_ic']) ? 'false' : 'true'). ';
function shrinkHeaderIC(mode)
{');
if ($context['user']['is_guest'])
$mainframe->addCustomHeadTag( '
document.cookie = "upshrinkIC=" + (mode ? 1 : 0);');
else
$mainframe->addCustomHeadTag( '
smf_setThemeOption("collapse_header_ic", mode ? 1 : 0, null, "'. $context['session_id']. '");');
$mainframe->addCustomHeadTag( '
document.getElementById("upshrink_ic").src = smf_images_url + (mode ? "/expand.gif" : "/collapse.gif");
document.getElementById("upshrinkHeaderIC").style.display = mode ? "none" : "";
current_header_ic = mode;
}
// ]]></script>');
// Get last item.
end($context['linktree']);
$last_link_key = key($context['linktree']);
foreach ($context['linktree'] as $link_num => $tree)
{
if ($link_num > 0) { // Don't show first linktree element, because forum menu item will already be in Mambo Pathway.
//If there is a url and this is not the last link item, show as a link. Otherwise just show.
$mainframe->appendPathWay(((isset($tree['url']) && ($last_link_key != $link_num)) ? ob_mambofix('<a href="' . $tree['url'] . '" class="pathway">') . $tree['name'] . '</a>' : $tree['name']) . ' ');
}
}
// Ignore notices from Mambo.
error_reporting(0);
initGzip();
// Loads template file.
if (!file_exists('templates/' . $cur_template . '/index.php'))
echo _TEMPLATE_WARN . $cur_template;
else
{
require_once('templates/' . $cur_template . '/index.php');
echo '<!-- ' . time() . ' -->';
}
// Displays queries performed for page.
if ($mosConfig_debug)
{
echo $database->_ticker . ' queries executed';
echo '<pre>';
foreach ($database->_log as $k => $sql)
echo $k + 1, "\n", $sql, '<hr />';
}
doGzip();
mysql_select_db($db_name);
die;
}
function integrate_reset_pass($old_username, $username, $password)
{
global $mosConfig_db, $mosConfig_dbprefix, $db_name;
$newpass = md5($password);
mysql_select_db($mosConfig_db);
$request = mysql_query("
UPDATE {$mosConfig_dbprefix}users
SET
password = '$newpass',
username = '$username'
WHERE username = '" . addslashes($old_username) . "'
LIMIT 1");
mysql_select_db($db_name);
return true;
}
function integrate_change_email($username, $email)
{
global $mosConfig_db, $mosConfig_dbprefix, $db_name;
mysql_select_db($mosConfig_db);
$request = mysql_query("
UPDATE {$mosConfig_dbprefix}users
SET emailAddress = '$email'
WHERE username = '" . addslashes($username) . "'
LIMIT 1");
mysql_select_db($db_name);
return true;
}
function integrate_change_member_data ($memberNames, $var, $value)
{
global $mosConfig_db, $db_name, $mosConfig_dbprefix;
$synch_mambo_fields = array(
'memberName' => 'username',
'realName' => 'name',
'emailAddress' => 'email',
'ID_GROUP' => '',
'gender'=>'',
'birthdate'=>'',
'websiteTitle'=>'',
'websiteUrl'=>'',
'location'=>'',
'hideEmail'=>'',
'timeFormat'=>'',
'timeOffset'=>'',
'avatar'=>'',
'lngfile'=>'',
);
$field = $synch_mambo_fields[$var];
if ($field != ''){
mysql_select_db($mosConfig_db);
foreach ($memberNames as $memberName){
mysql_query ("UPDATE {$mosConfig_dbprefix}users
SET `$field` = $value
WHERE username = '$memberName'
LIMIT 1");
// If the real name is changed, we need to make sure to update the ACL
if ($var == 'realName'){
$mos_find_id = mysql_query("
SELECT `id`
FROM {$mosConfig_dbprefix}users
WHERE name = $value
LIMIT 1");
$mos_id_array = mysql_fetch_array($mos_find_id);
$mos_id = $mos_id_array[0];
$mos_write = mysql_query("
UPDATE {$mosConfig_dbprefix}core_acl_aro
SET `name` = $value
WHERE `value` = '$mos_id'");
}
}
mysql_select_db($db_name);
}
if ($var == 'ID_GROUP'){
mysql_select_db($mosConfig_db);
$query = mysql_query (" SELECT `value2`
FROM {$mosConfig_dbprefix}smf_config
WHERE `variable` = 'sync_group' AND `value1` = $value");
list($group) = mysql_fetch_row($query);
//Just in case....
if (!isset($group) || $group == '' || $group == 0 )
$group = '18';
foreach ($memberNames as $memberName){
mysql_query ("UPDATE {$mosConfig_dbprefix}users
SET `gid` = '$group'
WHERE username = '$memberName'
");
$mos_find_name = mysql_query("
SELECT `name`
FROM {$mosConfig_dbprefix}users
WHERE username = '$memberName'
LIMIT 1");
list($mos_name) = mysql_fetch_row($mos_find_name);
$mos_map_sql = mysql_query("
SELECT aro_id
FROM {$mosConfig_dbprefix}core_acl_aro
WHERE name = '$mos_name'
LIMIT 1");
list($aro_id) = mysql_fetch_row($mos_map_sql);
mysql_query ("UPDATE {$mosConfig_dbprefix}core_acl_groups_aro_map
SET `group_id` = '$group'
WHERE aro_id = '$aro_id'
");
}
mysql_select_db($db_name);
}
}
function integrate_outgoing_email($subject, &$message, $headers)
{
global $boardurl, $mosConfig_live_site, $Itemid, $scripturl, $mosConfig_sef, $modSettings, $Itemid, $hotmail_fix;
//First, we need to set up the email so that ob_mambofix knows what to do with it
$message = str_replace ($scripturl, '"="' . $scripturl, $message);
//Next, let's make sure that URLs with # and . characters don't get mashed up
$message = str_replace ('#new', '"#new', $message);
$message = preg_replace ('/(\.[0-9])/', '"$1', $message);
$message .= '"="';
$message = ob_mambofix($message);
//Now we need to undo those changes so the email looks normal again
$message = str_replace ('"="', ' ', $message);
$message = str_replace ('"#new', '#new', $message);
$message = str_replace ('".', '.', $message);
//This is an email, after all, so let's make sure entities and special characters are text, not HTML
$message = trim($message);
$message = html_entity_decode($message);
$message = un_htmlspecialchars($message);
//No idea why sefReltoAbs does this, but....
$message = str_replace ('____', '
', $message ); //yes, it looks ridiculous, but it works :P
$message = substr($message, 0, -1);
$hotmail_fix = false;
return true;
/* if ($mosConfig_sef == '1'){
$message = str_replace ($mosConfig_live_site . '/index.php', 'index.php', $message);
preg_match ('~index\.php.+~', $message, $url);
if (isset($url[0])){
$new_url = sefReltoAbs(trim($url[0]));
$new_url = str_replace(';', '/', $new_url);
$message = str_replace($url[0], $new_url, $message);
}
}*/
}
function integrate_login($username, $passwd, $cookielength)
{
global $mosConfig_db, $mosConfig_dbprefix, $user_settings, $db_name, $_VERSION;
global $scripturl, $cb_reg, $mosConfig_absolute_path, $mosConfig_live_site, $database;
if (!isset($passwd) || $passwd == '' || $passwd == null)
$passwd = 'migrated';
mysql_select_db($mosConfig_db);
// Let's see if the user already exists in Mambo
$mos_sql = "
SELECT username, block, password
FROM {$mosConfig_dbprefix}users
WHERE username = '$username';";
$mos_result = mysql_query($mos_sql);
$mos_array = mysql_fetch_array($mos_result);
$mos_user = $mos_array[0];
//if the user doesn't exist in Mambo, they've already been verified by SMF, so register them into Mambo as well
if (!isset($mos_user))
{
// What Mambo group do we put you in? Let's find the sync with $user_settings
$mos_sync_groups = mysql_query("
SELECT `value2`
FROM {$mosConfig_dbprefix}smf_config
WHERE `variable` = 'sync_group' AND `value1`='" . $user_settings['ID_GROUP'] . "'
");
list($group) = mysql_fetch_row($mos_sync_groups);
//Just in case....
if (!isset($group) || $group == '' || $group == 0 )
$group = '18';
$mos_write = mysql_query("
INSERT INTO {$mosConfig_dbprefix}users
(name,username,email,password,gid)
VALUES ('$username', '$username', '$user_settings[emailAddress]', '$passwd', '$group')");
$mos_find_id = mysql_query("
SELECT id
FROM {$mosConfig_dbprefix}users
WHERE name = '$username'
LIMIT 1");
$mos_id_array = mysql_fetch_array($mos_find_id);
$mos_id = $mos_id_array[0];
$mos_write = mysql_query("
INSERT INTO {$mosConfig_dbprefix}core_acl_aro
(section_value, value, order_value, name, hidden)
VALUES ('users', '$mos_id', '0', '$username', '0');");
$mos_map_sql = mysql_query("
SELECT aro_id
FROM {$mosConfig_dbprefix}core_acl_aro
WHERE name = '$username'
LIMIT 1");
$mos_map_array = mysql_fetch_array($mos_map_sql);
$aro_id = $mos_map_array[0];
$mos_write = mysql_query ("
INSERT INTO {$mosConfig_dbprefix}core_acl_groups_aro_map
(group_id, section_value, aro_id)
VALUES ('$group', '', '$aro_id');");
//Do you have Community Builder? Might has well get them in there too...
if ($cb_reg=="on")
$sql = mysql_query("
INSERT INTO {$mosConfig_dbprefix}comprofiler
(id, user_id)
VALUES ('$mos_id', '$mos_id')");
//maybe this user exists, but has not yet activated their account?
}
elseif ($mos_array[1] == 1)
{
echo '
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
alert("' . _LOGIN_BLOCKED . '");
window.history.go(-1);
// ]]></script>', "\n";
exit();
}
$mos_pwd_qry = mysql_query("
SELECT password
FROM {$mosConfig_dbprefix}users
WHERE username = '$username'
LIMIT 1");
list($passwd) = mysql_fetch_row($mos_pwd_qry);
$currentDate = date("Y-m-d\TH:i:s");
mysql_query("
UPDATE {$mosConfig_dbprefix}users
SET lastvisitDate = '$currentDate'
WHERE username = '$username'");
// Get rid of the online entry for that old guest....
// Log into Mambo now.....
$request = mysql_query("
SELECT username, id, gid, block, usertype
FROM {$mosConfig_dbprefix}users
WHERE username = '$username'
AND password = '$passwd'");
$row = mysql_fetch_array($request);
//Some people are confused by case sensitivity....
$username = $row['username'];
// Fudge the group stuff.
$session =& $this['_session'];
$session['guest'] = 0;
$session['username'] = $username;
$session['userid'] = intval($row['id']);
$session['usertype'] = $row['usertype'];
$session['gid'] = intval($row['gid']);
$currentDate = date("Y-m-d\TH:i:s");
mysql_query("
UPDATE {$mosConfig_dbprefix}users
SET lastvisitDate = '$currentDate'
WHERE id = '$session[userid]'");
$lifetime = time() + (60 * $cookielength);
setcookie('usercookie[username]', $username, $lifetime, '/');
setcookie('usercookie[password]', $passwd, $lifetime, '/');
setcookie('sessioncookie', '', -3600, '/');
//Let's make sure this works in both Mambo and Joomla
$sessionCookieName = md5('site' . $mosConfig_live_site);
setcookie($sessionCookieName, '', -3600, '/');
//Joomla 1.0.8 compatibility
if (isset($_VERSION) && $_VERSION->PRODUCT == 'Joomla!' && $_VERSION->DEV_LEVEL >= '8'){
$remCookieName = mosMainFrame::remCookieName_User();
//Joomla 1.0.9 compatibility
if ($_VERSION->DEV_LEVEL>='9')
$remCookieValue = mosMainFrame::remCookieValue_User( $username ) . mosMainFrame::remCookieValue_Pass( $passwd ) . $row['id'];
else
$remCookieValue = mosMainFrame::remCookieValue_User( $username ) . mosMainFrame::remCookieValue_Pass( $passwd );
setcookie( $remCookieName, $remCookieValue, $lifetime, '/' );
}
//Let's try to minimize the effects of those nasty extra sessions
$sql = mysql_query("
DELETE FROM {$mosConfig_dbprefix}session
WHERE username = '$username'");
//Try to set the redirect by the login module params...
$sql = mysql_query ("
SELECT params
FROM {$mosConfig_dbprefix}modules
WHERE module='mod_smf_login'");
$result = mysql_fetch_array($sql);
$paramlist = $result[0];
$paramslogin = mosParseParams($paramlist);
$returncheck = $paramslogin->login;
if (!isset($Itemid) || $Itemid == 0)
$Itemid = (int) $_REQUEST['Itemid'];
$myurl = $mosConfig_live_site . '/' . basename($_SERVER['PHP_SELF']) . '?option=com_smf&Itemid=' . $Itemid . '&';
// Default, in case we couldn't find anything, or the admin forgot to configure the login module
// direct to SMF => 1
// direct to frontpage => 0
// option 2 cannot be used for default
if (empty($_SESSION['return']) && ($returncheck == '' || $returncheck == '2'))
$returncheck = '1';
//Set the redirection URL
switch ($returncheck)
{
//Redirect to Mambo
case '0':
$_SESSION['login_url'] = $mosConfig_live_site;
break;
//Redirect to SMF
case '1':
$_SESSION['login_url'] = $myurl;
break;
//Redirect back to login page
case '2':
if (strpos($_SESSION['return'],'register')===false || strpos($_SESSION['return'],'activate')===false)
$_SESSION['login_url'] = sefReltoAbs($_SESSION['return']);
else
$_SESSION['login_url'] = $myurl;
break;
//There still might be nothing....
case '':
$_SESSION['login_url'] = $mosConfig_live_site;
break;
}
mysql_select_db($db_name);
return true;
}
function integrate_redirect (&$setLocation, $refresh)
{
global $boardurl, $mosConfig_live_site, $mosConfig_sef;
$myurl = basename($_SERVER['PHP_SELF']) . '?option=com_smf&Itemid=' . $_REQUEST['Itemid'] . '&' ;
if ($setLocation == '')
$setLocation = $mosConfig_sef == 1 ? sefReltoAbs($myurl) : $mosConfig_live_site . '/' . $myurl;
$setLocation = ob_mambofix('="' . $setLocation . '"');
$setLocation = str_replace('="','',$setLocation);
$setLocation = str_replace('"','', $setLocation);
$setLocation = un_htmlspecialchars($setLocation);
}
function integrate_logout ($username)
{
global $mosConfig_db, $mosConfig_dbprefix, $db_name, $mosConfig_live_site, $scripturl, $_VERSION, $mosConfig_sef;
setcookie('usercookie[username]', $username, time() - 3600, '/');
setcookie('usercookie[password]', '', time() - 3600, '/');
setcookie('sessioncookie' , '' , time() - 3600 , '/');
//Let's make sure this works in both Mambo and Joomla
$sessionCookieName = md5('site' . $mosConfig_live_site);
setcookie($sessionCookieName, '', time() - 3600, '/');
//Joomla 1.0.8 compatibilty
if (isset($_VERSION) && $_VERSION->PRODUCT == 'Joomla!' && $_VERSION->DEV_LEVEL >= '8'){
$lifetime = time() - 86400;
$remCookieName = mosMainFrame::remCookieName_User();
setcookie( $remCookieName, ' ', $lifetime, '/' );
}
mysql_select_db($mosConfig_db);
// Let's try to minimize the effects of those nasty extra sessions.
$sql = mysql_query("
DELETE FROM {$mosConfig_dbprefix}session
WHERE username = '$username'");
//Try to set up the logout redirection
if (!isset($_REQUEST['returnurl']))
{
$sql = mysql_query("
SELECT params
FROM {$mosConfig_dbprefix}modules
WHERE module='mod_smf_login'");
$result = mysql_fetch_array($sql);
$paramlist = $result[0];
$paramslogin = mosParseParams($paramlist);
$returncheck = $paramslogin->logout;
}
else
$returncheck = $_REQUEST['returnurl'];
// Default, in case we couldn't find anything, or the admin forgot to configure the login module
// direct to SMF => 1
// direct to frontpage => 0
// option 2 cannot be used for default
if (empty($_SESSION['return']) && ($returncheck == '' || $returncheck == '2'))
$returncheck = "1";
$myurl = basename($_SERVER['PHP_SELF']) . '?option=com_smf&Itemid=' . $_REQUEST['Itemid'] . '&' ;
//Set the redirection URL
switch ($returncheck)
{
//Redirect to Mambo frontpage
case "0";
$_SESSION['logout_url'] = $mosConfig_live_site;
break;
//Redirect to SMF
case "1";
$_SESSION['logout_url'] = $mosConfig_sef == 1 ? sefReltoAbs($myurl) : $mosConfig_live_site . '/' . $myurl;
break;
//Redirect back to logout page
case "2";
$_SESSION['logout_url'] = sefReltoAbs($_SESSION['return']);
break;
}
mysql_select_db($db_name);
}
function integrate_delete_member($user)
{
global $db_name, $db_prefix, $mosConfig_db, $mosConfig_dbprefix;
$query1 = mysql_query ("
SELECT memberName, realName
FROM {$db_prefix}members
WHERE ID_MEMBER = '$user'");
list($username, $name) = mysql_fetch_row($query1);
mysql_select_db($mosConfig_db);
$query2 = mysql_query ("
DELETE FROM {$mosConfig_dbprefix}users
WHERE username = '$username'");
$query3 = mysql_query ("
SELECT aro_id
FROM {$mosConfig_dbprefix}core_acl_aro
WHERE name = '$name'");
list($aro_id) = mysql_fetch_row($query3);
$query4 = mysql_query ("
DELETE FROM {$mosConfig_dbprefix}core_acl_aro
WHERE name = '$name'");
$query5 = mysql_query ("
DELETE FROM {$mosConfig_dbprefix}core_acl_groups_aro_map
WHERE aro_id = '$aro_id'");
mysql_select_db($db_name);
}
function integrate_validate_login($username, $password, $cookietime)
{
global $db_name, $db_prefix, $mosConfig_db, $mosConfig_dbprefix, $use_realname, $database;
// Check if the user already exists in SMF.
mysql_select_db($db_name);
$request = mysql_query("
SELECT ID_MEMBER
FROM {$db_prefix}members
WHERE memberName = '$username'
LIMIT 1");
if ($request !== false && mysql_num_rows($request) === 1)
{
mysql_free_result($request);
return false;
}
//OK, so no user in SMF. Does this user exist in Mambo?
else
{
mysql_select_db($mosConfig_db);
//!!! How about sendEmail and activation?
$request = mysql_query("
SELECT name, password, email, UNIX_TIMESTAMP(registerDate) AS dateRegistered, activation
FROM {$mosConfig_dbprefix}users
WHERE username = '$username'");
//No user in Mambo, either. This guy is just guessing....
if (mysql_num_rows($request) === 0){
mysql_select_db($db_name);
return false;
}
$mos_user = mysql_fetch_assoc($request);
mysql_free_result($request);
//If there's no user in SMF, and the Mambo/Joomla user isn't activated, we don't want them logging in
if ($mos_user['activation']!='')
fatal_lang_error('still_awaiting_approval');
mysql_select_db($db_name);
//Do we want to use real names on the forum?
if ($use_realname == 'true')
$name = $mos_user['name'];
else
$name = $username;
//There must be a result, so let's write this one into SMF....
mysql_query("
INSERT INTO {$db_prefix}members
(memberName, realName, passwd, emailAddress, dateRegistered, ID_POST_GROUP, lngfile, buddy_list, pm_ignore_list, messageLabels, personalText, websiteTitle, websiteUrl, location, ICQ, MSN, signature, avatar, usertitle, memberIP, memberIP2, secretQuestion, additionalGroups)
VALUES ('$username', '$name', '$mos_user[password]', '$mos_user[email]', $mos_user[dateRegistered], '4', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '')");
$memberID = db_insert_id();
updateStats('member', $memberID, $name);
mysql_query("
UPDATE {$db_prefix}log_activity
SET registers = registers + 1
WHERE date ='" . date("Y-m-d") . "'
LIMIT 1");
return 'retry';
}
}
function integrate_register($Options, $theme_vars)
{
global $db_name, $db_prefix, $mosConfig_db, $mosConfig_dbprefix;
global $cb_reg, $bridge_reg;
//This function is only for SMF registration
if ($bridge_reg!='SMF')
return;
mysql_select_db($mosConfig_db);
// What Mambo group do we put you in? SMF Newbies are group #4...
$mos_sync_groups = mysql_query("
SELECT `value2`
FROM {$mosConfig_dbprefix}smf_config
WHERE `variable` = 'sync_group' AND `value1`='4'
");
list($group) = mysql_fetch_row($mos_sync_groups);
//Just in case....
if (!isset($group) || $group == '' || $group == 0 )
$group = '18';
//What if the realName field isn't being used?
if (!isset($Options['register_vars']['realName']) || $Options['register_vars']['realName']=='')
$Options['register_vars']['realName'] = $Options['register_vars']['memberName'];
mysql_query("
INSERT INTO {$mosConfig_dbprefix}users
(name, username, email, password, gid)
VALUES (" . $Options['register_vars']['realName'] . ", " . $Options['register_vars']['memberName'] . ", " . $Options['register_vars']['emailAddress'] . ", '" . md5($Options['password']) . "', '$group')");
$mos_find_userid = mysql_query("
SELECT `id`
FROM {$mosConfig_dbprefix}users
WHERE username = " . $Options['register_vars']['memberName'] . "
LIMIT 1");
list($mos_id) = mysql_fetch_row($mos_find_userid);
mysql_query( "
INSERT INTO {$mosConfig_dbprefix}core_acl_aro
(aro_id, section_value, value, order_value, name, hidden)
VALUES ('', 'users', '$mos_id', '0', " . $Options['register_vars']['realName'] . ", '0');");
$mos_map_sql = mysql_query("
SELECT aro_id
FROM {$mosConfig_dbprefix}core_acl_aro
WHERE name = " . $Options['register_vars']['realName'] . "
LIMIT 1");
list($aro_id) = mysql_fetch_row($mos_map_sql);
mysql_query ("
INSERT INTO {$mosConfig_dbprefix}core_acl_groups_aro_map
(group_id, section_value, aro_id)
VALUES ('$group', '', '" . $aro_id . "');");
//Do you have Community Builder? Might has well get them in there too...
if ($cb_reg == 'on')
mysql_query("
INSERT INTO {$mosConfig_dbprefix}comprofiler
(id, user_id)
VALUES ('$mos_id', '$mos_id')");
mysql_select_db($db_name);
}
function integrate_pre_load () {
// Try to modify settings so that bridging is less problematic if people have the wrong settings
global $modSettings, $smf_path;
//Turn off compressed output
$modSettings['enableCompressedOutput'] = '0';
//Turn off local cookies
$modSettings['localCookies'] = '0';
//Turn off SEF in SMF
$modSettings['queryless_urls'] = '';
// Change the SMF language according to the Mambo/Joomla settings
global $mosConfig_lang, $language, $synch_lang, $language_conversion;
if(isset($mosConfig_lang) && $synch_lang == 'true'){
if (isset($_COOKIE['mbfcookie']) || isset($_REQUEST['lang'])){
if (isset($_COOKIE['mbfcookie']['lang'])){
if (isset($language_conversion[$_COOKIE['mbfcookie']['lang']]) && file_exists($smf_path . '/Themes/default/languages/index.' . $language_conversion[$_COOKIE['mbfcookie']['lang']] . '.php'))
$GLOBALS['language'] = $language_conversion[$_COOKIE['mbfcookie']['lang']];
else if (isset($language_conversion[$_COOKIE['mbfcookie']['lang']]) && file_exists($smf_path . '/Themes/default/languages/index.' . $language_conversion[$_COOKIE['mbfcookie']['lang']] . '-utf8.php'))
$GLOBALS['language'] = $language_conversion[$_COOKIE['mbfcookie']['lang']] . '-utf8';
else if (file_exists($smf_path . '/Themes/default/languages/index.' . $_COOKIE['mbfcookie']['lang'] . '.php'))
$GLOBALS['language'] = $_COOKIE['mbfcookie']['lang'];
else if (file_exists($smf_path . '/Themes/default/languages/index.' . $_COOKIE['mbfcookie']['lang'] . '-utf8.php'))
$GLOBALS['language'] = $_COOKIE['mbfcookie']['lang'] . '-utf8';
}
if (isset($_REQUEST['lang'])){
if (isset($language_conversion[substr($_REQUEST['lang'],0,2)]) && file_exists($smf_path . '/Themes/default/languages/index.' . $language_conversion[substr($_REQUEST['lang'],0,2)] . '.php'))
$GLOBALS['language'] = $language_conversion[substr($_REQUEST['lang'],0,2)];
else if (isset($language_conversion[substr($_REQUEST['lang'],0,2)]) && file_exists($smf_path . '/Themes/default/languages/index.' . $language_conversion[substr($_REQUEST['lang'],0,2)] . '-utf8.php'))
$GLOBALS['language'] = $language_conversion[substr($_REQUEST['lang'],0,2)] . '-utf8';
else if (file_exists($smf_path . '/Themes/default/languages/index.' . $_REQUEST['lang'] . '.php'))
$GLOBALS['language'] = $_REQUEST['lang'] . '-utf8';
else if (file_exists($smf_path . '/Themes/default/languages/index.' . $_REQUEST['lang'] . '-utf8.php'))
$GLOBALS['language'] = $_REQUEST['lang'] . '-utf8';
}
} else if ($synch_lang == 'true')
$GLOBALS['language'] = $mosConfig_lang;
}
}
function integrate_whos_online ($actions) {
global $txt, $database, $mosConfig_db, $mosConfig_dbprefix, $db_name;
//First, we need to add the new language strings
add_to_txt();
//it must be the main page
if (!isset($actions['option']))
return $txt['who_home'];
//let's make sure there is an option...
if (isset($actions['option'])){
//still the main page
if ($actions['option']=='com_frontpage')
return $txt['who_home'];
//It's the forum ;)
else if ($actions['option']=='com_smf')
return $txt['who_index'];
//let's try the content
else if ($actions['option']=='com_content'){
if (isset($actions['task'])){
if($actions['task']=='view'){
mysql_select_db($mosConfig_db);
$mos_find_article = mysql_query ("SELECT title
FROM {$mosConfig_dbprefix}content
WHERE id = $actions[id]
LIMIT 1");
list ($article_name) = mysql_fetch_row($mos_find_article);
mysql_select_db($db_name);
return sprintf($txt['who_article'], $actions['id'], $actions['Itemid'], $article_name);
}
if ($actions['task']=='section'){
mysql_select_db($mosConfig_db);
$mos_find_article = mysql_query ("SELECT title
FROM {$mosConfig_dbprefix}sections
WHERE id = $actions[id]
LIMIT 1");
list ($section_name) = mysql_fetch_row($mos_find_article);
mysql_select_db($db_name);
return sprintf($txt['who_section'], $actions['id'], $actions['Itemid'], $section_name);
}
if ($actions['task']=='blogsection'){
mysql_select_db($mosConfig_db);
$mos_find_article = mysql_query ("SELECT title
FROM {$mosConfig_dbprefix}sections
WHERE id = $actions[id]
LIMIT 1");
list ($section_name) = mysql_fetch_row($mos_find_article);
mysql_select_db($db_name);
return sprintf($txt['who_blogsection'], $actions['id'], $actions['Itemid'], $section_name);
}
if ($actions['task']=='category'){
mysql_select_db($mosConfig_db);
$mos_find_article = mysql_query ("SELECT title
FROM {$mosConfig_dbprefix}categories
WHERE id = $actions[id]
LIMIT 1");
list ($category_name) = mysql_fetch_row($mos_find_article);
mysql_select_db($db_name);
return sprintf($txt['who_category'], $actions['id'], $actions['Itemid'], $category_name);
}
if ($actions['task']=='blogcategory'){
mysql_select_db($mosConfig_db);
$mos_find_article = mysql_query ("SELECT title
FROM {$mosConfig_dbprefix}categories
WHERE id = $actions[id]
LIMIT 1");
list ($category_name) = mysql_fetch_row($mos_find_article);
mysql_select_db($db_name);
return sprintf($txt['who_blogcategory'], $actions['id'], $actions['Itemid'], $category_name);
}
}
}
else if ($actions['option']=='com_newsfeeds'){
if (isset($actions['task'])){
if ($actions['task']=='view')
return sprintf($txt['who_newsfeeds'], $actions['Itemid']);
}
}
//Site search
else if ($actions['option']=='com_search')
return sprintf($txt['who_sitesearch'], $actions['Itemid']);
//Hmm...attention shoppers in aisle Itemid
else if ($actions['option']=='com_virtuemart'){
return sprintf($txt['who_virtuemart'], $actions['Itemid']);
}
//How about the Wiki?
else if (($actions['option']=='com_wikidoc') || ($actions['option']=='com_jd-wiki')) {
return sprintf($txt['who_wiki'], $actions['option'], $actions['Itemid']);
}
//How about the Games?
else if ($actions['option']=='com_dcs_flashgames') {
return sprintf($txt['who_games'], $actions['option'], $actions['Itemid']);
}
//How about the Links?
else if (($actions['option']=='com_bookmarks') || ($actions['option']=='com_links')) {
return sprintf($txt['who_links'], $actions['option'], $actions['Itemid']);
}
//How about the Link exchange?
else if ($actions['option']=='com_linkexchange') {
return sprintf($txt['who_linkexchange'], $actions['option'], $actions['Itemid']);
}
and the rest
//How about the Guestbook?
else if (($actions['option']=='com_easygb') || ($actions['option']=='com_guestbook')) {
return sprintf($txt['who_guestbook'], $actions['option'], $actions['Itemid']);
}
//How about the Contact page?
else if (($actions['option']=='com_staff') || ($actions['option']=='com_contact')) {
return sprintf($txt['who_contact'], $actions['option'], $actions['Itemid']);
}
//How about the gallery?
else if (($actions['option']=='com_gallery2') || ($actions['option']=='com_zoom') || ($actions['option']=='com_rsgallery2') || ($actions['option']=='com_coppermine')) {
return sprintf($txt['who_gallery'], $actions['option'], $actions['Itemid']);
}
//How about the Polls?
else if (($actions['option']=='com_exitpoll') || ($actions['option']=='com_poll')) {
return sprintf($txt['who_polls'], $actions['option'], $actions['Itemid']);
}
//How about the Credits?
else if ($actions['option']=='com_jm-credits') {
return sprintf($txt['who_credits'], $actions['option'], $actions['Itemid']);
}
//How about the Glossary?
else if ($actions['option']=='com_glossary') {
return sprintf($txt['who_glossary'], $actions['option'], $actions['Itemid']);
}
//How about the Review Pages?
else if ($actions['option']=='com_simple_review') {
return sprintf($txt['who_review'], $actions['option'], $actions['Itemid']);
}
//How about the Classifieds?
else if (($actions['option']=='com_classifieds') || ($actions['option']=='com_noah')) {
return sprintf($txt['who_classifieds'], $actions['option'], $actions['Itemid']);
}
//How about the Recipes?
else if (($actions['option']=='com_ricettario') || ($actions['option']=='com_pccookbook')) {
return sprintf($txt['who_recipes'], $actions['option'], $actions['Itemid']);
}
//How about the Writing Section?
else if ($actions['option']=='com_ewriting') {
return sprintf($txt['who_writing'], $actions['option'], $actions['Itemid']);
}
else {
return sprintf($txt['who_other'], $actions['option'], $actions['Itemid']);
}
}
}
?>
It looks to me like the session is being erased somewhere....
Okay, would there be any way to find out or stop this from happening? Its very strange because it was working and now all of a sudden its not! However in FireFox its fine.
Paul
I have also asked Joomla but they dont seem to know to much about it! Its not a huge problem I suppose but I really want this site to be perfect and if it does this I won't to be very honest be pleased with what I creaed (perfectionist i try). Can anyone at least point me in some kind of direction as so I can begin to understand or slove this problem? How can I stop the session from being erased. Orstio would you like any scripts or anything like that to look at. Is this a fairly big problem?
Paul
I saw that you have VirtueMart installed. Are there any bots for the VM component? Perhaps looking through that code to see if anything is done with the session?
Also, did you download Joomla from joomla.org, or from the VirtueMart site?
Okay! I installed joomla from joomla and virtuemart later. What would I be looking for in the code to be more precise?
There are NO mambots with virtue mart.
Then I have no idea what else would be wiping the session like that. The return URL should be stored in $_SESSION['return'].
Oh! Okay....
I have also just run a diagnostic on joomla to check everything is in order and have this:
QuoteWARNING /home/httpd/vhosts/rpmmagazine.co.uk/httpdocs/rpm/globals.php File is corrupted or has been altered
The setting is '0'
/**
* Use 1 to emulate register_globals = on
* WARNING: SETTING TO 1 MAY BE REQUIRED FOR BACKWARD COMPATIBILITY
* OF SOME THIRD-PARTY COMPONENTS BUT IS NOT RECOMMENDED
*
* Use 0 to emulate regsiter_globals = off
* NOTE: THIS IS THE RECOMMENDED SETTING FOR YOUR SITE BUT YOU MAY
* EXPERIENCE PROBLEMS WITH SOME THIRD-PARTY COMPONENTS
*/
define( 'RG_EMULATION', 0 );
I also have this
QuoteWARNING /home/httpd/vhosts/rpmmagazine.co.uk/httpdocs/rpm/language/english.php File is corrupted or has been altered
I changed this
// common
DEFINE('_LANGUAGE','en');
DEFINE('_NOT_AUTH','HELLO <strong>Guest!</strong>, I\'m afraid you wont be able to access this page unles you login or register. RPMmagazine.co.uk is a fast growing community where anyone interested in <strong>House Music</strong> can do all sorts of great things. This is a free resource of everything house ranging from - Community Forums, News and Reviews, Events, Calendars, The Music Itself, Features, Tickets and a whole lot more. You can even message other users who have the same interest. So WHAT are you waiting for, you have nothing to lose and a whole HOUSE community to GAIN!');
DEFINE('_DO_LOGIN','<font size="12">You need to <a href="http://www.rpmmagazine.co.uk/rpm/index.php?option=com_smf&Itemid=28&action=login" >login</a> or <a href="http://www.rpmmagazine.co.uk/rpm/index.php?option=com_smf_registration&task=register">register</a>.</font>');
DEFINE('_VALID_AZ09',"Please enter a valid %s. No spaces, more than %d characters and contain 0-9,a-z,A-Z");
DEFINE('_VALID_AZ09_USER',"Please enter a valid %s. More than %d characters and contain 0-9,a-z,A-Z");
DEFINE('_CMN_YES','Yes');
DEFINE('_CMN_NO','No');
DEFINE('_CMN_SHOW','Show');
DEFINE('_CMN_HIDE','Hide');
Would this have anything to do with this problem??? Or am i classping at things as usual.
Paul
With what editor did you alter those files?
Directly in plesk. Thats what I have always done?? Am I a complete NOOB? You have worried me now because Im guessing I should be using a professional editor than.
Paul
Do you have Joomla and SMF installed in the same database?
Yep! They are both in the same database. Which i think was the best idea Yes?
Paul
Orstio do you want my plesk, joomla admin, rpm login details? I didnt know wether you might like to have a quick look it could shed more light on the situation. I asked a Joomla moderator and they seem to have no idea.
Paul
Since this is something going on in the dynamic of the bridge/SMF, Joomla developers and moderators would probably have no idea what to do.
Yes, if I can get Joomla superadmin access, that would be helpful to see what is going on.
No problem. I have PM'ed you with those details. Hope you might be able to find something. FINGERS CROSSED
Paul
Just to throw this into the mix...
I have been doing a bit of research and reading both in the SMF forum and Joomla forum and have read that some templates (joomla) can conflict with SMF Theme??? So this leads me to ask if this really has nothing to do with my problem. I am guessing not as It was working fine awhile ago but I thought I would ask anyways as I edit the template constantly as well as the css.
I have read that some people using IE cant even see the website because of this conflict!! I just thought I would ask.
QuoteOut of curiosity what Joomla template are you using, many have conflicts, it's an issue that is not unknown with IE7.
No, themes and templates should have nothing to do with sessions.
To update anyone looking at this forum this is what we know -
QuoteEverything seems OK, except for the $_SESSION['return'] variable, which doesn't seem to make it back to the bridge intact. I am definitely puzzled.
QuoteThere is no need to panic.
VirtueMart is a good product. The developer works very hard at making sure of it.
The version of Joomla distributed by VirtueMart contains code that does not play very nicely with the bridge, so as long as you downloaded from joomla.org, and then installed VM as a component, all should be well.
The $_SESSION['return'] is used only by the bridge to remember where to redirect after login or logout. So, the impact there is fairly minor, except for the annoyance of not going back to the proper page.
I personally downloaded from Joomla first than later on downloaded Virtue Mart... (I did something right for once)
I will also try posting on other forums to see if anyone out there will be able to figure this out and again for everyones knowledge I am using Joomla 1.0.12, SMF 1.1.2, SMF Official Bridge 1.1.7, VirtueMart 1.0.10, and JCcal Pro 1.5.3 (Calendar Component).
So if anyone out there can help oor would like to look through any code please let me know.
Hoping all the time
Paul
Has / Does anyone else have this problem? If so could you say.
Thankyou
Paul
Jcal Pro said the following:
QuoteJCalPro doesn't use any session commands or variables at all, so I doubt it could be the problem. The default theme sets cookies, but doesn't mess with session variables at all.
It sounds like something is either completly resetting the session variables, or just messing with the "return" variable. If you could edit the appropriate code to use "smf_return" instead of "return", it might help narrow things down and could actually make it work. This could be trivial or incredibly difficult to do, depending on how the code is written.
Does this help or shed light on anything at all?? If anyone thinks it does please let me know
Paul