pragmaMx Support Forum

pragmaMx => Themes & Design => Thema gestartet von: tuningcar in 10 Mai 2005, 18:04:40

Titel: Loginform Funktion umbauen
Beitrag von: tuningcar in 10 Mai 2005, 18:04:40
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 ?
Titel: Re: Loginform Funktion umbauen
Beitrag von: NeMeSiSX2LC in 11 Mai 2005, 11:38:40
Schau dir doch mal in der functions.php deines theme die function user_loginform an da wird das erstellt...
Titel: Re: Loginform Funktion umbauen
Beitrag von: tuningcar in 11 Mai 2005, 18:04:34
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>&nbsp;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&auml;stebucheintr&auml;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&amp;op=logout" title="$logout">Logout</a></td>
  </tr>
</table>
logform;
}
#$out .= "<input type='checkbox' value='1' name='rememberme'>&nbsp;"._REMEMBERLOGIN."<br>";
return $out;

}

#######################################################################################
Titel: Re: Loginform Funktion umbauen
Beitrag von: henne in 13 Mai 2005, 17:53:06
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 ?
Titel: Re: Loginform Funktion umbauen
Beitrag von: tuningcar in 13 Mai 2005, 19:25:45
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
Titel: Re: Loginform Funktion umbauen
Beitrag von: ruajoerg in 14 Mai 2005, 07:07:47
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)."&nbsp;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&auml;stebucheintr&auml;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&amp;op=logout" title="$logout">Logout</a></td>
  </tr>
  </table>
</td>
</tr>
</table>
logform;
}
#$out .= "<input type='checkbox' value='1' name='rememberme'>&nbsp;"._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.
Titel: Re: Loginform Funktion umbauen
Beitrag von: tuningcar in 16 Mai 2005, 12:35:47
Danke funktioniert aber leider auch nicht  :'(
Titel: Re: Loginform Funktion umbauen
Beitrag von: ruajoerg in 17 Mai 2005, 08:11:18
Hi,

und was passt jetzt nicht???
Hast du mal einen Link oder Screenshot? Geht es noch etwas genauer? So kann dir niemand helfen ...
Titel: Re: Loginform Funktion umbauen
Beitrag von: henne in 17 Mai 2005, 09:32:12
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&auml;stebucheintr&auml;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&amp;op=logout" title="$logout">Logout</a></td>
    </tr>
  </table>



logform;

}

#$out .= "<input type='checkbox' value='1' name='rememberme'>&nbsp;"._REMEMBERLOGIN."<br>";

return $out;

}
Titel: Re: Loginform Funktion umbauen
Beitrag von: tuningcar in 09 Juni 2005, 20:31:29
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)
Titel: Re: Loginform Funktion umbauen
Beitrag von: henne in 09 Juni 2005, 22:48:26
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&auml;stebucheintr&auml;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&amp;op=logout" title="$logout">Logout</a></td>
  </tr>
</table>



logform;

}

#$out .= "<input type='checkbox' value='1' name='rememberme'>&nbsp;"._REMEMBERLOGIN."<br>";

return $out;

}
Titel: Re: Loginform Funktion umbauen
Beitrag von: tuningcar in 10 Juni 2005, 22:17:32
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 ?