13.08.2012, 15:02:10
Hi, sorry für die lange Freischaltungsdauer aber das Forum hat mir nicht angezeigt, dass hier ein Beitrag auf die Freischaltung wartet. Bin eher durch Zufall darauf gestoßen.
Ich habe das für Dich mal durchgeführt und mit der aktuellen Version (0.6.9.3) getestet. Du kannst das jetzt auf zwei Arten lösen. Entweder Du lädst Dir die von mir veränderten Dateien in diesem Beitrag herunter und überspielst Deine eigenen damit. Dann solltest Du aber zuerst auf die 0.6.9.3 aktualisieren. Oder Du führst die Schritte manuell durch.
Wenn Du alles angepasst, oder die Dateien überschrieben hast, kannst Du mit der Variablesteuern ob eine eMail benötigt wird, oder nicht. Wenn ja, dann wird die eMail auf Gültigkeit geprüft. Wird keine eMail und auch sonst keine weiteren Informationen angegeben, wird die Zeile unter der Nachricht komplett ausgeblendet, denn sie wäre ja sonst leer.
1 = eMail wird benötigt
0 = eMail wird nicht benötigt
Angepasste Dateien:
space.png (Größe: 112 Bytes / Downloads: 10.306)
Manuell: Gehe wie folgt vor, um Dein Vorhaben zu realisieren (0.6.9.3).
1. Ersetze folgende Zeilen mit 2. Ersetze folgende Zeilen mit Somit wäre die Überprüfung schon mal wie von Dir gewünscht. Jetzt müssen wir noch die Handhabung in der index.php ändern, damit es so angezeigt wird, wie Du es haben willst. Gehe dazu wie folgt vor:
1. Ersetze mit 2. Ersetze mit 3. Füge nach Zeile Nr. 252 folgendes ein: 4. Ersetze mit Öffne als nächstes die "includes/load_templates.inc.php" und füge NACH Zeile 45 folgendes hinzu: Öffne die "templates/mgbModern/main/index_entry.tpl" und schneide folgendes aus: füge dafür das hier an der selben Stelle ein:Erstelle anschließend im selben Verzeichnis eine neue Datei namens "index_entry_info.tpl" und füge dort das ausgeschnittene wieder ein.
Öffne nun folgende Dateien und füge jeweils an das ENDE der Datei folgendes hinzu: Anschließend lädst Du Dir noch diese Datei herunter und kopierst sie in das default iconset Verzeichnis.
mgb_ohne_email_erforderlichkeit.zip (Größe: 17,64 KB / Downloads: 282)
Das sollte es dann eigentlich gewesen sein. Hoffe ich. Bei mir funktioniert es. Sollte dann so aussehen:
mgb.png (Größe: 17,96 KB / Downloads: 10.306)
Ich habe das für Dich mal durchgeführt und mit der aktuellen Version (0.6.9.3) getestet. Du kannst das jetzt auf zwei Arten lösen. Entweder Du lädst Dir die von mir veränderten Dateien in diesem Beitrag herunter und überspielst Deine eigenen damit. Dann solltest Du aber zuerst auf die 0.6.9.3 aktualisieren. Oder Du führst die Schritte manuell durch.
Wenn Du alles angepasst, oder die Dateien überschrieben hast, kannst Du mit der Variable
Code:
$email_is_necessary = 1;
1 = eMail wird benötigt
0 = eMail wird nicht benötigt
Angepasste Dateien:
space.png (Größe: 112 Bytes / Downloads: 10.306)
Manuell: Gehe wie folgt vor, um Dein Vorhaben zu realisieren (0.6.9.3).
1. Ersetze folgende Zeilen
Code:
275 // if you want the email field to be not necessary, just outcomment next line with "//"
276 if (!check_mail($_POST['email'])) { $errorcode = 4; }
Code:
275 // set the next variable to "0" if you want the email field not to be necessary
276 $email_is_necessary = 1;
Code:
290 // if you want the email field to be not necessary, just outcomment next line with "//"
291 if (!$_POST['email']) { $errorcode = 2; }
Code:
290 if (!$_POST['email'])
291 {
292 if ($email_is_necessary == 1)
293 {
294 $errorcode = 2;
295 }
296 }
297 elseif ($_POST['email'])
298 {
299 if (!check_mail($_POST['email'])) { $errorcode = 4; }
300 }
1. Ersetze
Code:
260 // find out if the user wants his email to be shown
261 if ($entry[$i]['user_show_email'] != 0)
262 {
263 if ($settings['spam_protection'] == 1)
264 {
265 $entry_email_path = "email.php?id=".$entry[$i]['ID'];
266 $entry_email_pic = "images/iconsets/".$settings['iconset_path']."/email.png";
267 $entry_email_text = $lang['email_yes'];
268 }
269 else
270 {
271 $entry_email_path = "mailto:".$entry[$i]['email'];
272 $entry_email_pic = "images/iconsets/".$settings['iconset_path']."/email.png";
273 $entry_email_text = $lang['email_yes'];
274 }
275 }
276 else
277 {
278 $entry_email_path = "email.php?id=denied";
279 $entry_email_pic = "images/iconsets/".$settings['iconset_path']."/email_error.png";
280 $entry_email_text = $lang['email_no'];
281 }
Code:
264 // check if email is set
265 if ($entry[$i]['email'])
266 {
267 // find out if the user wants his email to be shown
268 if ($entry[$i]['user_show_email'] != 0)
269 {
270 if ($settings['spam_protection'] == 1)
271 {
272 $entry_email_path = "email.php?id=".$entry[$i]['ID'];
273 $entry_email_pic = "images/iconsets/".$settings['iconset_path']."/email.png";
274 $entry_email_text = $lang['email_yes'];
275 }
276 else
277 {
278 $entry_email_path = "mailto:".$entry[$i]['email'];
279 $entry_email_pic = "images/iconsets/".$settings['iconset_path']."/email.png";
280 $entry_email_text = $lang['email_yes'];
281 }
282 }
283 else
284 {
285 $entry_email_path = "email.php?id=denied";
286 $entry_email_pic = "images/iconsets/".$settings['iconset_path']."/email_error.png";
287 $entry_email_text = $lang['email_no'];
288 }
289 }
290 else
291 {
292 $email = "";
293 }
Code:
257 if ($entry[$i]['city'] == "") { $city = ""; }
258 if ($entry[$i]['hp'] == "") { $hp = ""; }
259 if ($entry[$i]['icq'] == "") { $icq = ""; }
260 if ($entry[$i]['aim'] == "") { $aim = ""; }
261 if ($entry[$i]['msn'] == "") { $msn = ""; }
Code:
257 $info_icons = 5;
258
259 if ($entry[$i]['city'] == "") { $city = ""; }
260 if ($entry[$i]['hp'] == "") { $hp = ""; $info_icons--; }
261 if ($entry[$i]['icq'] == "") { $icq = ""; $info_icons--; }
262 if ($entry[$i]['aim'] == "") { $aim = ""; $info_icons--; }
263 if ($entry[$i]['msn'] == "") { $msn = ""; $info_icons--; }
Code:
253 $info = $content_index_entry_info;
Code:
342 // fill template with other templates if set
343 $page_entry[$i] = template("TEMPLATE_ENTRY_CITY", $city, $page_entry[$i]);
344 $page_entry[$i] = template("TEMPLATE_ENTRY_MESSAGE", $message, $page_entry[$i]);
345 $page_entry[$i] = template("TEMPLATE_ENTRY_EMAIL", $email, $page_entry[$i]);
346 $page_entry[$i] = template("TEMPLATE_ENTRY_HP", $hp, $page_entry[$i]);
347 if ($settings['gravatar_position'] == 0) {
348 $page_entry[$i] = template("ENTRY_GRAVATAR_LEFT", $gravatar, $page_entry[$i]);
349 $page_entry[$i] = template("ENTRY_GRAVATAR_RIGHT", "", $page_entry[$i]);
350 $page_entry[$i] = template("GRAVATAR_CSS", "entry_message_gravatar_left", $page_entry[$i]); }
351 else {
352 $page_entry[$i] = template("ENTRY_GRAVATAR_LEFT", "", $page_entry[$i]);
353 $page_entry[$i] = template("ENTRY_GRAVATAR_RIGHT", $gravatar, $page_entry[$i]);
354 $page_entry[$i] = template("GRAVATAR_CSS", "entry_message_gravatar_right", $page_entry[$i]); }
355 $page_entry[$i] = template("TEMPLATE_ENTRY_ICQ", $icq, $page_entry[$i]);
356 $page_entry[$i] = template("TEMPLATE_ENTRY_AIM", $aim, $page_entry[$i]);
357 $page_entry[$i] = template("TEMPLATE_ENTRY_MSN", $msn, $page_entry[$i]);
358 $page_entry[$i] = template("TEMPLATE_ENTRY_COMMENT", $comment, $page_entry[$i]);
Code:
342 // fill template with other templates if set
343 if ($info_icons > 0)
344 {
345 $page_entry[$i] = template("TEMPLATE_ENTRY_INFO", $info, $page_entry[$i]);
346 $page_entry[$i] = template("TEMPLATE_ENTRY_EMAIL", $email, $page_entry[$i]);
347 $page_entry[$i] = template("TEMPLATE_ENTRY_HP", $hp, $page_entry[$i]);
348 $page_entry[$i] = template("TEMPLATE_ENTRY_ICQ", $icq, $page_entry[$i]);
349 $page_entry[$i] = template("TEMPLATE_ENTRY_AIM", $aim, $page_entry[$i]);
350 $page_entry[$i] = template("TEMPLATE_ENTRY_MSN", $msn, $page_entry[$i]);
351 }
352 elseif ($info_icons == 0)
353 {
354 $page_entry[$i] = template("TEMPLATE_ENTRY_INFO", "", $page_entry[$i]);
355 }
356 $page_entry[$i] = template("TEMPLATE_ENTRY_CITY", $city, $page_entry[$i]);
357 $page_entry[$i] = template("TEMPLATE_ENTRY_MESSAGE", $message, $page_entry[$i]);
358 if ($settings['gravatar_position'] == 0) {
359 $page_entry[$i] = template("ENTRY_GRAVATAR_LEFT", $gravatar, $page_entry[$i]);
360 $page_entry[$i] = template("ENTRY_GRAVATAR_RIGHT", "", $page_entry[$i]);
361 $page_entry[$i] = template("GRAVATAR_CSS", "entry_message_gravatar_left", $page_entry[$i]); }
362 else {
363 $page_entry[$i] = template("ENTRY_GRAVATAR_LEFT", "", $page_entry[$i]);
364 $page_entry[$i] = template("ENTRY_GRAVATAR_RIGHT", $gravatar, $page_entry[$i]);
365 $page_entry[$i] = template("GRAVATAR_CSS", "entry_message_gravatar_right", $page_entry[$i]); }
366 $page_entry[$i] = template("TEMPLATE_ENTRY_COMMENT", $comment, $page_entry[$i]);
Code:
46 if (file_exists("templates/".$settings['template_path']."/main/index_entry_info.tpl")) { $content_index_entry_info = file_get_contents("templates/".$settings['template_path']."/main/index_entry_info.tpl"); } else { echo "<center><span class='errormessage'>(404) Missing file: templates/".$settings['template_path']."/main/index_entry_info.tpl - Incomplete template in use! If you are using your own template, and you updated to a newer version of MGB shortly, check changes in the main template 'mgbModern'.</span></center><br>"; }
Code:
<tr>
<td class="entry_info" colspan="3">{TEMPLATE_ENTRY_EMAIL}{TEMPLATE_ENTRY_HP}{TEMPLATE_ENTRY_ICQ}{TEMPLATE_ENTRY_AIM}{TEMPLATE_ENTRY_MSN}</td>
</tr>
Code:
{TEMPLATE_ENTRY_INFO}
Öffne nun folgende Dateien
Code:
index_entry_aim.tpl
index_entry_email.tpl
index_entry_hp.tpl
index_entry_icq.tpl
index_entry_msn.tpl
Code:
<img src="images/iconsets/{ICONSET_PATH}/space.png" alt="" title="" height="16" width="5">
mgb_ohne_email_erforderlichkeit.zip (Größe: 17,64 KB / Downloads: 282)
Das sollte es dann eigentlich gewesen sein. Hoffe ich. Bei mir funktioniert es. Sollte dann so aussehen:
mgb.png (Größe: 17,96 KB / Downloads: 10.306)