Verfasst: 11.08.2006 18:59
Oh sorry, ich bin das aus nem anderen Forum schon so gewohnt, dass der letzte Beitrag automatisch an den anderen angeknüpft wird wenn er von mir ist. 
phpBB.de - Die deutsche phpBB-Community
https://www.phpbb.de/community/
versuch's mal anhand dieses beispiels...<tr>
<td class="row1 one">{L_NOTIFY_ON_REPLY}:<br />{L_NOTIFY_ON_REPLY_EXPLAIN}</td>
<td class="row2 two"><input type="radio" class="checkbox" name="notifyreply" checked="checked" value="0" {NOTIFY_REPLY_YES} /> {L_YES}
<input type="radio" class="checkbox" name="notifyreply" value="1" {NOTIFY_REPLY_NO} /> {L_NO}</td>
</tr>
Also das in den geschweiften Klammern wegmachen und dann checked="checked"?{NOTIFY_REPLAY_NO} und {NOTIFY_REPLY_YES} werden, je nach dem was in der Datenbank gespeichert (beim Profil bearbeiten) oder in der usercp_register.php definiert (beim Registrieren) wurde, durch checked="checked" bzw. gar nichts ersetzt. Wenn man die Platzhalter also aus der profile_add_body.tpl rausnimmt, kann man, wie rabbit schon gezeigt hat, durch einfügen von checked="checked" in den entsprechenden input-tag die jeweilige Checkbox unabhängig von den Einstellungen des betreffenden Benutzer aktivieren.
Das ist den geschweiften Klammern + plus die geschweiften Klammern selbst ...MX998 hat geschrieben:Also das in den geschweiften Klammern wegmachen und dann checked="checked"?![]()
Wenn ich das mache und auf Profil aktualieren gehe, kommt ein SQL Syntax Errorsuche:
Code:
$notifyreply = ( isset($HTTP_POST_VARS['notifyreply']) ) ? ( ($HTTP_POST_VARS['notifyreply']) ? TRUE : 0 ) : 0;
$notifypm = ( isset($HTTP_POST_VARS['notifypm']) ) ? ( ($HTTP_POST_VARS['notifypm']) ? TRUE : 0 ) : TRUE;
$popup_pm = ( isset($HTTP_POST_VARS['popup_pm']) ) ? ( ($HTTP_POST_VARS['popup_pm']) ? TRUE : 0 ) : TRUE;
ersetze mit:
Code:
$notifyreply = ( isset($HTTP_POST_VARS['notifyreply']) ) ? ( ($HTTP_POST_VARS['notifyreply']) ? FALSE : 0 ) : 0;
$notifypm = ( isset($HTTP_POST_VARS['notifypm']) ) ? ( ($HTTP_POST_VARS['notifypm']) ? TRUE : 0 ) : FALSE;
$popup_pm = ( isset($HTTP_POST_VARS['popup_pm']) ) ? ( ($HTTP_POST_VARS['popup_pm']) ? TRUE : 0 ) : FALSE;
Die Zeilen sind doch absolut identisch? Wieso ist dann bei der Registrierung beim ersten "nein" und bei den anderen "ja"? Ich verstehe die Logik (sofern überhaupt vorhanden) dahinter nicht? Wieso lässt man die true, 1,0 & false dann nicht einfach weg? Bringen tun die Einträge ja offensichtlich nichts.$allowviewonline = ( isset($HTTP_POST_VARS['hideonline']) ) ? ( ($HTTP_POST_VARS['hideonline']) ? 0 : TRUE ) : TRUE;
$notifyreply = ( isset($HTTP_POST_VARS['notifyreply']) ) ? ( ($HTTP_POST_VARS['notifyreply']) ? 0 : TRUE ) : TRUE;
$notifypm = ( isset($HTTP_POST_VARS['notifypm']) ) ? ( ($HTTP_POST_VARS['notifypm']) ? 0 : TRUE ) : TRUE;
$popup_pm = ( isset($HTTP_POST_VARS['popup_pm']) ) ? ( ($HTTP_POST_VARS['popup_pm']) ? 0 : TRUE ) : TRUE;