Wie kann ich eigentlich die Loginformfunktion umbauen .
Ich will nämlich das alles nebeneinander steht , also so in etwa :
Hallo ..... Ihr Account Logout du hast Privatnachrichten du hast einen Eintrag im Gästebuch
Wie ist das machbar ?
Schau dir doch mal in der functions.php deines theme die function user_loginform an da wird das erstellt...
Ja , aber blick da nicht durch was ich alles Ändern muß :-[
So sieht dere Code bis jetzt aus , was muß ich da alles ändern ;)
################################################################
function mx_theme_loginform() {
global $prefix, $user_prefix;
$out = "";
if (!mxIsUser()) {
if(!defined("mxloginblockviewed")) define("mxloginblockviewed",TRUE);
$nickname = _NICKNAME;
$password = _PASSWORD;
$login = _LOGIN;
$check = mxGetUserLoginCheckField();
$out .=
<<<logform
<form action="modules.php?name=Your_Account" method="post">
$check
<table align="center" border="0" cellspacing="0" cellpadding="1">
<tbody>
<tr>
<td>Benutzername:</td>
<td><div align="left">
<input type="text" name="uname" size="14" maxlength="25" title="$nickname">
</div></td>
</tr>
<tr>
<td><div align="left">Passwort:</div></td>
<td><div align="left">
<input type="password" name="pass" size="14" maxlength="20" title="$password">
</div></td>
</tr>
<tr>
<td colspan="2" align="center"><div align="left">
<input name="submit" type="submit" value="$login">
</div></td>
</tr>
</tbody>
</table>
</form>
logform;
}
else {
$hallo = _HELLO;
$logout = _AB_LOGOUT;
$account = _YACCOUNT;
$privatemessages = "";
$cookie = mxgetusersession();
$username = $cookie[1];
if (mxModuleAllowed('Private_Messages')){ # falls pm-modul aktiv ist
$qry="SELECT Count(msg_id) FROM ${user_prefix}_priv_msgs WHERE to_userid=".$cookie[0]." AND read_msg=0;";
$result = sql_query($qry);
list($countpmunread) = sql_fetch_row($result);
if ($countpmunread) { # wenn angemeldeter User
$privatemessages = "<div style=\"text-align: left;\">"._YOUHAVE." <a href=\"modules.php?name=Private_Messages\" title=\""._PRIVATEMSG."\"><b style=\"color: orange; font-weight: bold;\">".intval($countpmunread)."</b> Nachricht(en)</a><div>";
}
}
# Usergaestebuch
$guestbook = "";
if (mxModuleAllowed("UserGuest")){ # falls gaestebuch vorhanden
$qry="SELECT Count(gid) FROM ${user_prefix}_userguest WHERE touserid='".$cookie[0]."' AND touser = '".$username."' AND dummy=0;";
$result = sql_query($qry);
list($gbnewentries) = sql_fetch_row($result);
if($gbnewentries){
$msg2 = ($GLOBALS['currentlang']=='english') ? 'new guestbookentries' : 'neue Gästebucheinträge';
$guestbook = "<div style=\"text-align: left; font-size: 9px;\">"._YOUHAVE." <a href=\"modules.php?name=UserGuest\" title=\""._GUESTBOOKVIEW."\"><b style=\"color: Yellow; font-weight: bold;\">".intval($gbnewentries)."</b> ".$msg2."</a></div>";
}
}
$out .=
<<<logform
$hallo <font color="orange">$username</font> !
<br><br>
$privatemessages $guestbook
<table align="left" width="100%" border="0">
<tr>
<td><img src="themes/mx-bluewave/images/ring.png"></td>
<td><a href="modules.php?name=Your_Account" title="$account">Ihr Account</a></td>
<td><img src="themes/mx-bluewave/images/ring.png"></td>
<td><a href="modules.php?name=Your_Account&op=logout" title="$logout">Logout</a></td>
</tr>
</table>
logform;
}
#$out .= "<input type='checkbox' value='1' name='rememberme'> "._REMEMBERLOGIN."<br>";
return $out;
}
#######################################################################################
Zitatwas muß ich da alles ändern
hmm was willste denn ändern ? Mach mal ein paar Angaben wie Du Dir das vorstellst, wie soll das Loginformular aussehen ?
Ich will ja nur das es nicht untereinander steht , sondern alle Angaben in einer Zeile nebeneinander ;)
So sollte es dann in etwa aussehen :
Hallo ..... Ihr Account Logout du hast Privatnachrichten du hast einen Eintrag im Gästebuch
Hi,
vielleicht so ... :-\
################################################################
function mx_theme_loginform() {
global $prefix, $user_prefix;
$out = "";
if (!mxIsUser()) {
if(!defined("mxloginblockviewed")) define("mxloginblockviewed",TRUE);
$nickname = _NICKNAME;
$password = _PASSWORD;
$login = _LOGIN;
$check = mxGetUserLoginCheckField();
$out .=
<<<logform
<table border="0" cellspacing="0" cellpading=1">
<tr>
<td><form action="modules.php?name=Your_Account" method="post">
$check
<table align="center" border="0" cellspacing="0" cellpadding="1">
<tbody>
<tr>
<td>Benutzername:</td>
<td><div align="left"><input type="text" name="uname" size="14" maxlength="25" title="$nickname"></div></td>
<td><div align="left">Passwort:</div></td>
<td><div align="left"><input type="password" name="pass" size="14" maxlength="20" title="$password"></div></td>
<td colspan="2" align="center"><div align="left"><input name="submit" type="submit" value="$login"></div></td>
</tr>
</tbody>
</table>
</form></td>
logform;
}
else {
$hallo = _HELLO;
$logout = _AB_LOGOUT;
$account = _YACCOUNT;
$privatemessages = "";
$cookie = mxgetusersession();
$username = $cookie[1];
if (mxModuleAllowed('Private_Messages')){
# falls pm-modul aktiv ist
$qry="SELECT Count(msg_id) FROM ${user_prefix}_priv_msgs WHERE to_userid=".$cookie[0]." AND read_msg=0;";
$result = sql_query($qry);
list($countpmunread) = sql_fetch_row($result);
if ($countpmunread) {
# wenn angemeldeter User
$privatemessages = "<div style=\"text-align: left;\">"._YOUHAVE." <a href=\"modules.php?name=Private_Messages\" title=\""._PRIVATEMSG."\"><b style=\"color: orange; font-weight: bold;\">".intval($countpmunread)." Nachricht(en)</a><div>";
}
}
# Usergaestebuch
$guestbook = "";
if (mxModuleAllowed("UserGuest")){
# falls gaestebuch vorhanden
$qry="SELECT Count(gid) FROM ${user_prefix}_userguest WHERE touserid='".$cookie[0]."' AND touser = '".$username."' AND dummy=0;";
$result = sql_query($qry);
list($gbnewentries) = sql_fetch_row($result);
if($gbnewentries){
$msg2 = ($GLOBALS['currentlang']=='english') ? 'new guestbookentries' : 'neue Gästebucheinträge';
$guestbook = "<div style=\"text-align: left; font-size: 9px;\">"._YOUHAVE." <a href=\"modules.php?name=UserGuest\" title=\""._GUESTBOOKVIEW."\"><b style=\"color: Yellow; font-weight: bold;\">".intval($gbnewentries)." ".$msg2."</a></div>";
}
}
$out .=
<<<logform
<td>$hallo <font color="orange">$username</font> ! $privatemessages $guestbook</td>
<td>
<table align="left" width="100%" border="0">
<tr>
<td><img src="themes/mx-bluewave/images/ring.png"></td>
<td><a href="modules.php?name=Your_Account" title="$account">Ihr Account</a></td>
<td><img src="themes/mx-bluewave/images/ring.png"></td>
<td><a href="modules.php?name=Your_Account&op=logout" title="$logout">Logout</a></td>
</tr>
</table>
</td>
</tr>
</table>
logform;
}
#$out .= "<input type='checkbox' value='1' name='rememberme'> "._REMEMBERLOGIN."
";
return $out;
}
#######################################################################################
In der oberen Tabelle die Zeilen rausgenommen und alles in eine Haupttabelle gelegt.
So hast du alles in einer Zeile stehen - zumindestens HTML-Technisch.
Danke funktioniert aber leider auch nicht :'(
Hi,
und was passt jetzt nicht???
Hast du mal einen Link oder Screenshot? Geht es noch etwas genauer? So kann dir niemand helfen ...
probiers mal so, wenn nicht wie Jörg schon sagte mehr Input bitte !!
################################################################
function mx_theme_loginform() {
global $prefix, $user_prefix;
$out = "";
if (!mxIsUser()) {
if(!defined("mxloginblockviewed")) define("mxloginblockviewed",TRUE);
$nickname = _NICKNAME;
$password = _PASSWORD;
$login = _LOGIN;
$check = mxGetUserLoginCheckField();
$out .=
<<<logform
<form action="modules.php?name=Your_Account" method="post">
$check
<table align="center" border="0" cellspacing="0" cellpadding="1">
<tbody>
<tr>
<td>Nick:</td>
<td><div align="left">
<input type="text" name="uname" size="11" maxlength="25" title="$nickname">
</div></td>
<td>Pass:</td>
<td><input type="password" name="pass" size="11" maxlength="20" title="$password"></td>
<td><input name="submit" type="submit" value="$login"></td>
</tr>
</tbody>
</table>
</form>
logform;
}
else {
$hallo = _HELLO;
$logout = _AB_LOGOUT;
$account = _YACCOUNT;
$privatemessages = "";
$cookie = mxgetusersession();
$username = $cookie[1];
if (mxModuleAllowed('Private_Messages')){ # falls pm-modul aktiv ist
$qry="SELECT Count(msg_id) FROM ${user_prefix}_priv_msgs WHERE to_userid=".$cookie[0]." AND read_msg=0;";
$result = sql_query($qry);
list($countpmunread) = sql_fetch_row($result);
if ($countpmunread) { # wenn angemeldeter User
$privatemessages = "<div style=\"text-align: center; font-size: 9px;\">"._YOUHAVE." <a href=\"modules.php?name=Private_Messages\" title=\""._PRIVATEMSG."\"><b style=\"color: Yellow; font-weight: bold;\">".intval($countpmunread)."</b> "._PRIVATEMSG."</a><div>";
}
}
# Usergaestebuch
$guestbook = "";
if (mxModuleAllowed("UserGuest")){ # falls gaestebuch vorhanden
$qry="SELECT Count(gid) FROM ${user_prefix}_userguest WHERE touserid='".$cookie[0]."' AND touser = '".$username."' AND dummy=0;";
$result = sql_query($qry);
list($gbnewentries) = sql_fetch_row($result);
if($gbnewentries){
$msg2 = ($GLOBALS['currentlang']=='english') ? 'new guestbookentries' : 'neue Gästebucheinträge';
$guestbook = "<div style=\"text-align: center; font-size: 9px;\">"._YOUHAVE." <a href=\"modules.php?name=UserGuest\" title=\""._GUESTBOOKVIEW."\"><b style=\"color: Yellow; font-weight: bold;\">".intval($gbnewentries)."</b> ".$msg2."</a></div>";
}
}
$out .=
<<<logform
<div style="font-weight: normal; padding-bottom: 3px; font-size: 11px;">$hallo $username</div>
$privatemessages $guestbook
<table align="center" width="100%" border="0">
<tr>
<td><a href="modules.php?name=Your_Account" title="$account">Ihr Account</a></td>
<td><a href="modules.php?name=Your_Account&op=logout" title="$logout">Logout</a></td>
</tr>
</table>
logform;
}
#$out .= "<input type='checkbox' value='1' name='rememberme'> "._REMEMBERLOGIN."<br>";
return $out;
}
Steht leider immer noch übereinander :'(
Hier habe ich mal einen Screenshot gemacht , so sollte es aussehen :
http://www.tuningcar.de/images/seite-login.jpg
(https://forum.pragmamx.org/proxy.php?request=http%3A%2F%2Fwww.tuningcar.de%2Fimages%2Fseite-login.jpg&hash=922c25bd68ef230455777c4a7c9cbfceb9c634af)
so müsste das klappen.. nicht getestet.. probier mal ;-)
################################################################
function mx_theme_loginform() {
global $prefix, $user_prefix;
$out = "";
if (!mxIsUser()) {
if(!defined("mxloginblockviewed")) define("mxloginblockviewed",TRUE);
$nickname = _NICKNAME;
$password = _PASSWORD;
$login = _LOGIN;
$check = mxGetUserLoginCheckField();
$out .=
<<<logform
<form action="modules.php?name=Your_Account" method="post">
$check
<table align="center" border="0" cellspacing="0" cellpadding="1">
<tbody>
<tr>
<td>Nick:</td>
<td><div align="left">
<input type="text" name="uname" size="11" maxlength="25" title="$nickname">
</div></td>
<td>Pass:</td>
<td><input type="password" name="pass" size="11" maxlength="20" title="$password"></td>
<td><input name="submit" type="submit" value="$login"></td>
</tr>
</tbody>
</table>
</form>
logform;
}
else {
$hallo = _HELLO;
$logout = _AB_LOGOUT;
$account = _YACCOUNT;
$privatemessages = "";
$cookie = mxgetusersession();
$username = $cookie[1];
if (mxModuleAllowed('Private_Messages')){ # falls pm-modul aktiv ist
$qry="SELECT Count(msg_id) FROM ${user_prefix}_priv_msgs WHERE to_userid=".$cookie[0]." AND read_msg=0;";
$result = sql_query($qry);
list($countpmunread) = sql_fetch_row($result);
if ($countpmunread) { # wenn angemeldeter User
$privatemessages = "<div style=\"text-align: center; font-size: 9px;\">"._YOUHAVE." <a href=\"modules.php?name=Private_Messages\" title=\""._PRIVATEMSG."\"><b style=\"color: Yellow; font-weight: bold;\">".intval($countpmunread)."</b> "._PRIVATEMSG."</a><div>";
}
}
# Usergaestebuch
$guestbook = "";
if (mxModuleAllowed("UserGuest")){ # falls gaestebuch vorhanden
$qry="SELECT Count(gid) FROM ${user_prefix}_userguest WHERE touserid='".$cookie[0]."' AND touser = '".$username."' AND dummy=0;";
$result = sql_query($qry);
list($gbnewentries) = sql_fetch_row($result);
if($gbnewentries){
$msg2 = ($GLOBALS['currentlang']=='english') ? 'new guestbookentries' : 'neue Gästebucheinträge';
$guestbook = "<div style=\"text-align: center; font-size: 9px;\">"._YOUHAVE." <a href=\"modules.php?name=UserGuest\" title=\""._GUESTBOOKVIEW."\"><b style=\"color: Yellow; font-weight: bold;\">".intval($gbnewentries)."</b> ".$msg2."</a></div>";
}
}
$out .=
<<<logform
<table align="center" width="100%" border="0">
<tr>
<td><div style="font-weight: normal; padding-bottom: 3px; font-size: 11px;">$hallo $username</div></td>
<td><a href="modules.php?name=Your_Account" title="$account">Ihr Account</a></td>
<td>$privatemessages</td>
<td>$guestbook </td>
<td><a href="modules.php?name=Your_Account&op=logout" title="$logout">Logout</a></td>
</tr>
</table>
logform;
}
#$out .= "<input type='checkbox' value='1' name='rememberme'> "._REMEMBERLOGIN."<br>";
return $out;
}
Danke :D , super jetzt klappt es .
Kann ich die kleinen Ringe ( vor Your Account ) auch wieder einbauen ?
Und wo ist die Farbsteuerung von dem text ?