Home arrow Forum
Latest posts of: ernsti
  Welcome, Guest. Please login or register.
December 03, 2008, 03:59:44 PM
Home New Posts Search Calendar


Login with username, password and session length
  Show Posts
Pages: [1]
1  International Forum / German Forum / Re: German Version Problem !? on: April 08, 2005, 01:26:37 PM
Das überascht mich - bei mir klappt es einwandfrei Shocked

Für die zu bretie Tabelle beim LogIn gibt es schon eine gute lösung, die ich im SMF-Forum gefunden hatte:

Lade dir die [mamboroot]/modules/mod_smf_login.php in eine Texteditor und ersetze deren kompletten Inhalt mit:
Code:
<?php

defined
'_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' );

$moduleclass_sfx  $params->get'moduleclass_sfx' );
$smf_align  $params->get'smf_align' );
$smf_personal_welcome  $params->get'smf_personal_welcome' );
$smf_profile $params->get'smf_profile' );
$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_calendar  $params->get'smf_calendar' );
$smf_members $params->get'smf_members' );

if (!
defined('SMF')){
  global $mosConfig_absolute_path;

  require($mosConfig_absolute_path."/administrator/components/com_smf/config.smf.php");
  require ($smf_path."/SSI.php");
}

global 
$context$txt$scripturl$settings$mos_prefix$smf_prefix$db_name$smf_date$mosConfig_db;

mysql_select_db($GLOBALS['db_name']);

$sql  "SELECT id FROM ".$mos_prefix."menu WHERE link='index.php?option=com_smf'";
$result mysql_query ($sql);

if (isset(
$result)) {
$row mysql_fetch_array($result);
}

$myurl basename($_SERVER['PHP_SELF'])."?option=com_smf&Itemid=" $row[0]."&";

$scripturl $myurl;

echo 
'
<div class="modules" style="position: relative; margin-right: 5px;">
<table width="100%" cellpadding="0" cellspacing="0" border="0" text-align="'
.$smf_align.'">';

if (!empty($context['user']['avatar'])) {
echo '
<tr>
<td valign="top" align="'
.$smf_align.'">'$context['user']['avatar']['image'], '</td>
</tr>'
;
}

echo '
<tr>
<td width="100%" valign="top" class="smalltext" style="font-family: verdana, arial, sans-serif;" align="'
.$smf_align.'">';

if ($context['user']['is_logged']) {
if ($smf_personal_welcome) {
echo '
Welcome <b>'
$context['user']['name'], '</b>:<br/>';
        }

if ($smf_new_pms ) {
  if ($context['allow_pm'])
echo $txt[152], ' <a href="'$scripturl'action=pm">'$context['user']['messages'], ' '$context['user']['messages'] != $txt[153] : $txt[471], '</a>';
        }

if( $smf_unread ){
echo $txt['newmessages4'], ' '$context['user']['unread_messages'], ' '$context['user']['unread_messages'] == $txt['newmessages0'] : $txt['newmessages1'] . '.';
}

if ($context['in_maintenance'] && $context['user']['is_admin'])
echo '<br />
<b>'
$txt[616], '</b>';

if (!empty($context['unapproved_members']))
echo '<br />
'
$context['unapproved_members'] == $txt['approve_thereis'] : $txt['approve_thereare'], ' <a href="'$scripturl'action=regcenter">'$context['unapproved_members'] == $txt['approve_member'] : $context['unapproved_members'] . ' ' $txt['approve_members'], '</a> '$txt['approve_members_waiting'];

        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'];
}


echo '
<table width="100%" border="0" cellpadding="0" cellspacing="0" class="moduletable'
,$moduleclass_sfx,'">';

if ($smf_profile) {
echo '
<tr align="left">
<td><a href="'
sefRelToAbs($scripturl "action=profile") ,'" class="mainlevel">'$txt[79], '</a></td>
</tr>'
;
}

if ($smf_unread) {
echo '
<tr align="left">
<td><a href="'
sefRelToAbs($scripturl "action=unread") ,'" class="mainlevel">'$txt['unread_topics_visit'], '</a></td>
</tr>'
;
}

if ($smf_new_answers) {
echo '
<tr align="left">
<td><a href="'
sefRelToAbs($scripturl "action=unreadreplies") ,'" class="mainlevel">'$txt['unread_replies'], '</a></td>
</tr>'
;
}

if ($smf_members) {
echo '
<tr align="left">
<td><a href="'
sefRelToAbs($scripturl "action=mlist") ,'" class="mainlevel">'$txt[332], '</a></td>
</tr>'
;
}

if ($smf_calendar) {
echo '
<tr align="left">
<td><a href="'
sefRelToAbs($scripturl "action=calendar") ,'" class="mainlevel">'$txt['calendar24'], '</a></td>
</tr>'
;
}

echo '
<tr align="left">
<td><a href="'
sefRelToAbs($scripturl."action=mambo_logout&returnurl=".$params->get('logout')."&sesc=".$context['session_id']),'" class="mainlevel">'$txt[108], '</a></td>
</tr>'
;

echo '
</table>'
;
}

else {
//$txt['welcome_guest'] = str_replace ($scripturl.'&action=register', $mosConfig_live_site.'/'.basename($_SERVER['PHP_SELF']).'&option=com_smf_registration&task=register' , $txt['welcome_guest']);
$txt['welcome_guest'] = $txt['hello_guest'] . " " $txt[28] . ",";
$txt['welcome_guest'] .= "<br>" $txt[249]. " " $txt[34];


if (!isset($message_login)) {
$message_login '';
}

echo '
'
$txt['welcome_guest'], '<br />

<form action="'
$scripturl'action=mambo_login" method="post" style="margin: 3px 1ex 1px 0; text-align:'.$smf_align.';">
$txt[35] . '<br/>
<input type="text" name="user" size="10" /><br />
$txt[36] . '<br/>
<input type="password" name="passwrd" size="10" /><br />
$txt[497] . '<br />
<select name="cookielength">
<option value="60">'
$txt['smf53'], '</option>
<option value="1440">'
$txt['smf47'], '</option>
<option value="10080">'
$txt['smf48'], '</option>
<option value="302400">'
$txt['smf49'], '</option>
<option value="-1" selected="selected">'
$txt['smf50'], '</option>
</select><br />
<input type="submit" value="'
$txt[34], '" /><br />
<input type="hidden" name="op2" value="login" />
<input type="hidden" name="returnurl" value="'
$params->get('login'),'" />
<input type="hidden" name="lang" value="'
,$mosConfig_lang,'" />
<input type="hidden" name="return" value="'
,$mosConfig_live_site,'/',basename($_SERVER['PHP_SELF']),'?',$_SERVER['QUERY_STRING'],'" />
<input type="hidden" name="message" value="'
,$message_login,'" />
</form><br />

<table class="moduletable'
,$moduleclass_sfx,'" width="100%" border="0" cellpadding="0" cellspacing="0">
<tr align="left">
<td><a href="'
,sefRelToAbs($scripturl."option=com_smf&task=lostPassword"),'" class="mainlevel" >'$txt[315], '</a></td>
</tr>
<tr align="left">
<td><a href="'
,sefRelToAbs($scripturl."option=com_smf&task=register"),'" class="mainlevel" >'$txt[97], '</a></td>
</tr>
</table>'
;
}

echo '</td></tr></table>
</div>'
;

mysql_select_db ($GLOBALS['mosConfig_db']);

?>


Dann hast du wieder einen sauberen Login-Bereich.

mfg.
ernsti
2  International Forum / German Forum / Re: German Version Problem !? on: April 08, 2005, 10:57:04 AM
Das gleiche Problem hatte ich auch bei Mambo4.5.2.1 und SMF1.03 (alles in deutsch).

So behebbar:
Die Installation des SMF-Mod (in der Forumadministration mittels Paket-Manager) kann so bleiben wie sie ist.

1.) In der Mamboadministration die Komponente und das Modul für die SMF-Integration wieder löschen.

2.) Die MOS-SMF-Bridge 3.02 HIER herunterladen und dann die Main Component (SMF.zip) und Login (mod_smf_login.zip) installieren.

3.) Nun noch in die verwendeten Templates vor
Code:
</head>
diesen Code einfügen:
Code:
<?php 
global $sc$context;

if (!
defined('SMF')){
  require ("administrator/components/com_smf/config.smf.php");
  require ($smf_path."/SSI.php");
}

$sc = &$context['session_id'];
$_SESSION['USER_AGENT'] = $_SERVER['HTTP_USER_AGENT'];

?>

4.) Wenn jetzt dieses Login-Moudul aktiviert wird, klappt es auch in der deutschen Version.

mfg.
ernsti
Pages: [1]


Login with username, password and session length

Powered by MySQL Powered by PHP Forum | Powered by SMF 1.0.5 & Mambo-SMF.
© 2001-2005, Lewis Media. All Rights Reserved.
Valid XHTML 1.0! Valid CSS!
None of the text or images in this public website may be copied without the expressed written consent of the authors.
Copyright 2005 by MamboHacks.com. Powered by Mambo. All rights reserved.
TERMS OF USE