YourWBB


yourWBB » WoltLab Burning Board Generation 2 * » Alles von und für das WBB 2.3.x » [WBB 2.3.x] Allg. Fragen und Probleme » Problem mit Nextbirthdaybit » Hallo Gast [Anmelden|Registrieren]
Letzter Beitrag | Erster ungelesener Beitrag 1.428 Views | | Thema zu Favoriten hinzufügen

Neues Thema erstellen Antwort erstellen

Dieses Thema wurde als erledigt markiert. Thread erledigt

Zum Ende der Seite springen Problem mit Nextbirthdaybit
Autor
Beitrag « Vorheriges Thema | Nächstes Thema »
bastifantasti bastifantasti ist männlich
Mitglied


images/avatars/avatar-5730.gif

Dabei seit: 09.04.06
Beiträge: 70
Fähigkeiten: WBB2 Fortgeschritten
Forenversion: 2.3

 Problem mit Nextbirthdaybit Antworten Zitieren Editieren Melden       UP

Problembeschreibung:
Auf einmal werden zukünftige Geburtstage nicht mehr angezeigt. Vorher lief das problemlos.


Fehlermeldung:
Es kommt keine Fehlermeldung, es werden einfach nur keine zukünftigen Geburtstage mehr angezeigt. Aktuelle Geburtstage hingegen schon.

Link zum Forum und Screenshot (KEINE Bilderhoster, per Dateianhang):
Screenshot ist in meinen Augen hier überflüssig.

Was wurde zuletzt geändert oder eingebaut?
Bin mir nicht ganz sicher, aber könnte sein, dass es nur der Nexteventbit war, den ich danach noch eingebaut habe.
(Dieser funktioniert auch noch)


Hier das, was im Index-Template steht:
code:
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
    <if(isset($birthdaybit) || isset($eventbit) || isset($nextbirthdaybit) || isset($nexteventbit))>
  <then>

  <tr>
    <td class="tabletitle" align="left" colspan="<if($hide_modcell==0)><then>6</then><else>5</else></if>"><span class="smallfont"><b>{$lang->items['LANG_START_SHOWEVENTS']}</b></span></td>
  </tr>
   
    <if(isset($birthdaybit))>
    <then>
     <tr>
      <td class="tableb" width="10%" align="center"><img src="{$style['imagefolder']}/birthday.gif" alt="" title="" border="0" /></td>
      <td class="tablea" width="90%" colspan="<if($hide_modcell==0)><then>5</then><else>4</else></if>" align="left"><span class="smallfont"><b>{$lang->items['LANG_START_BIRTHDAY']}</b><br />$birthdaybit</span><if(isset($nextbirthdaybit))><then><br /><span class="smallfont"><div style="margin-top: 6px;"><b>{$lang->items['LANG_START_NEXTBIRTHDAY']}</b><br />$nextbirthdaybit</span></div></then></if></td>
     </tr>
    </then>
   </if>
   
   <if(isset($nextbirthdaybit) && !isset($birthdaybit))>
    <then>
     <tr>
      <td class="tableb" width="10%" align="center"><img src="{$style['imagefolder']}/birthday.gif" alt="" title="" border="0" /></td>
      <td class="tablea" width="90%" colspan="<if($hide_modcell==0)><then>5</then><else>4</else></if>" align="left"><span class="smallfont"><b>{$lang->items['LANG_START_NEXTBIRTHDAY']}</b><br />$nextbirthdaybit</span></td>
     </tr>
    </then>
   </if>

   
 <if(isset($eventbit))>
    <then>
     <tr>
      <td class="tableb" width="10%" align="center"><img src="{$style['imagefolder']}/events.gif" alt="" title="" border="0" /></td>
      <td class="tablea" width="90%" colspan="<if($hide_modcell==0)><then>5</then><else>4</else></if>" align="left"><span class="smallfont"><b>{$lang->items['LANG_START_TODAYEVENT']}</b><br />$eventbit</span><if(isset($nexteventbit))><then><br /><span class="smallfont"><div style="margin-top: 6px;">$nexteventbit</span></div></then></if></td>
     </tr>
    </then>
   </if>
   
   <if(isset($nexteventbit) && !isset($eventbit))>
    <then>
     <tr>
      <td class="tableb" width="10%" align="center"><img src="{$style['imagefolder']}/events.gif" alt="" title="" border="0" /></td>
      <td class="tablea" width="90%" colspan="<if($hide_modcell==0)><then>5</then><else>4</else></if>" align="left"><span class="smallfont">$nexteventbit</span></td>
     </tr>
    </then>
   </if>
   
  </then>
  </if>


Hier die Index.php:
code:
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
69:
70:
71:
72:
73:
74:
75:
76:
77:
78:
79:
80:
81:
82:
83:
84:
85:
86:
87:
88:
89:
90:
91:
92:
93:
94:
95:
96:
97:
98:
99:
100:
101:
102:
103:
104:
105:
106:
107:
108:
109:
110:
111:
112:
113:
114:
115:
116:
117:
118:
119:
120:
121:
122:
123:
124:
125:
126:
127:
128:
129:
130:
/* ############## BIRTHDAYS ############## */
unset($birthdaybit);
if ($showbirthdays == 1  && $wbbuserdata['can_view_calendar'] != 0) 
{

	$currentdate = formatdate("m-d", time());
	$currentyear = intval(formatdate("Y", time()));
	$result = $db->unbuffered_query("SELECT userid, username, birthday FROM bb".$n."_users WHERE birthday LIKE '%-$currentdate' ORDER BY username ASC");


	while ($row = $db->fetch_array($result)) 
        {
		$row['username'] = htmlconverter($row['username']);
		$birthyear = intval(wbb_substr($row['birthday'], 0, 4));
		$age = $currentyear - $birthyear;
		if ($age < 1 || $age > 200) $age = '';
		else $age = "&nbsp;($age)";
		if (isset($birthdaybit)) eval("\$birthdaybit .= \"".$tpl->get("index_birthdaybit")."\";");
		else eval("\$birthdaybit = \"".$tpl->get("index_birthdaybit")."\";");
	}




        /* NEXT BIRTHDAYS (c) by Peh */
	$weekdays = array(0=>"Sonntag", 1=>"Montag", 2=>"Dienstag", 3=>"Mittwoch", 4=>"Donnerstag", 5=>"Freitag", 6=>"Samstag");

	if ($shownextbirthdays > 0) 
        {
		unset($query);
		$i = intval($shownextbirthdays);
		$today = mktime(0, 0, 0, date("m"), date("d"),  date("Y")); //date("Y-m-d");


		while ($i > 0)
                {
			$currentdate = formatdate("m-d", mktime(0, 0, 0, date("m"), date("d")+$i,  date("Y")));
			
			if (isset($query)) $query .= " OR birthday LIKE '%-$currentdate'";
			else $query = "birthday LIKE '%-$currentdate'";
			$i--;
		}


		$result = $db->unbuffered_query("SELECT userid, username, birthday FROM bb".$n."_users WHERE ".$query." ORDER BY username ASC");


		while ($row = $db->fetch_array($result)) 
                {
			$row['username'] = htmlconverter($row['username']);
			$birthyear = intval(wbb_substr($row['birthday'], 0, 4));
			$age = $currentyear - $birthyear;
			
			$birthday = mktime(0, 0, 0, wbb_substr($row['birthday'], 6, 2), wbb_substr($row['birthday'], -2), date("Y")); 
			$days = floor(($birthday - $today)/86400);
			
			$weekday[$days] = $weekdays[intval(date("w",$birthday))];
                        $birthdaydate = date($dateformat, $birthday); 
			
			if ($age < 1 || $age > 200) $age = '';
			else $age = "&nbsp;($age)";
			
			$lang->items['LANG_START_INDAYS'] = $lang->get("LANG_START_DAYS", array('$days' => $days));

			if (isset($daybit[$days])) eval("\$daybit[$days] .= \"".$tpl->get("index_nextbirthdaybit")."\";");
			else eval("\$daybit[$days] = \"".$tpl->get("index_nextbirthdaybit")."\";");
		}


		$j = 1;
		unset($nextbirthdaybit);


		while ($j <= intval($shownextbirthdays))
                {
			if (!isset($nextbirthdaybit)) $nextbirthdaybit = $daybit[$j];
			else if (isset($daybit[$j])) $nextbirthdaybit .= "; ".$daybit[$j];
			$j++;
		}
	}
}

/* ############## EVENTS ############## */
unset($eventbit);
if ($showevents == 1 && $wbbuserdata['can_view_calendar'] != 0) {
	$currentdate = date("Y-m-d"); 
	$result = $db->unbuffered_query("SELECT eventid, subject, public FROM bb".$n."_events WHERE eventdate = '$currentdate' AND (public=2 OR (public=0 AND userid = '$wbbuserdata[userid]')) ORDER BY public ASC, subject ASC");
	while ($row = $db->fetch_array($result)) {
		$row['subject'] = htmlconverter($row['subject']);
		if (isset($eventbit)) eval("\$eventbit .= \"".$tpl->get("index_eventbit")."\";");
		else eval("\$eventbit = \"".$tpl->get("index_eventbit")."\";");
	}


/** NEXT EVENTS (c) by Peh **/
	unset($daybit);
	if ($shownextevents > 0) {
		unset($sql);
		$i = intval($shownextevents);
		$today = mktime(0, 0, 0, date("m"), date("d"),  date("Y")); 
		while ($i > 0){
			$currentdate = formatdate("Y-m-d", mktime(0, 0, 0, date("m"), date("d")+$i,  date("Y")));
			
			if (isset($sql)) $sql .= " OR eventdate = '$currentdate'";
			else $sql = "eventdate = '$currentdate'";
			$i--;
		}

		$result = $db->unbuffered_query("SELECT eventid, subject, public, eventdate FROM bb".$n."_events WHERE ".$sql." AND (public=2 OR (public=0 AND userid = '$wbbuserdata[userid]')) ORDER BY public ASC, subject ASC");
		while ($row = $db->fetch_array($result)) {
			$row['subject'] = htmlconverter($row['subject']);
			
			$eventday = mktime(0, 0, 0, wbb_substr($row['eventdate'], 6, 2), wbb_substr($row['eventdate'], -2), wbb_substr($row['eventdate'], 0, 4)); 
			$days = floor(($eventday - $today)/86400);
			
			$lang->items['LANG_START_INDAYS'] = $lang->get("LANG_START_DAYS", array('$days' => $days));

			if (isset($daybit[$days])) eval("\$daybit[$days] .= \"".$tpl->get("index_nexteventbit")."\";");
			else eval("\$daybit[$days] = \"".$tpl->get("index_nexteventbit")."\";");
		}
		$j = 1;
		unset($nexteventbit);
		while ($j <= intval($shownextevents)){
			if (!isset($nexteventbit)) $nexteventbit = $daybit[$j];
			else if (isset($daybit[$j])) $nexteventbit .= "; ".$daybit[$j];
			$j++;
		}
	}
}


Vielleicht sieht jemand ja da schon einen Fehler. Ansonst lad ich nochmal das komplette Template + php hoch.

Hoffe mir kann jemand helfen.

Achso: Ja ich habe im ACP die Einstellung "Zukünftige Geburtstage vorher anzeigen?" nicht auf 0 stehen. Augenzwinkern (Zum testen sogar mal auf 365 gestellt. Aber auch das geht nicht)
01.11.10 14:29 bastifantasti ist offline E-Mail Finden Als Freund hinzufügen
bastifantasti bastifantasti ist männlich
Mitglied


images/avatars/avatar-5730.gif

Dabei seit: 09.04.06
Beiträge: 70
Fähigkeiten: WBB2 Fortgeschritten
Forenversion: 2.3

Themenstarter Thema begonnen von bastifantasti
Antworten Zitieren Editieren Melden       UP

Kann denn keiner helfen?
21.11.10 21:57 bastifantasti ist offline E-Mail Finden Als Freund hinzufügen
minette
HTML - Fanatiker


Dabei seit: 07.03.07
Beiträge: 235
Fähigkeiten: WBB3 Anfänger; WBB2 Profi
Herkunft: aus der bauch meine mutter
Forenversion: 3.1; 2.3

Antworten Zitieren Editieren Melden       UP

mögen dir das helfen ?
Next Birthdays 1.1

__________________
isch bin es

Dieser Beitrag wurde 1 mal editiert, zum letzten Mal von minette: 21.11.10 23:36.

21.11.10 23:31 minette ist offline E-Mail Finden Als Freund hinzufügen
bastifantasti bastifantasti ist männlich
Mitglied


images/avatars/avatar-5730.gif

Dabei seit: 09.04.06
Beiträge: 70
Fähigkeiten: WBB2 Fortgeschritten
Forenversion: 2.3

Themenstarter Thema begonnen von bastifantasti
Antworten Zitieren Editieren Melden       UP

Vielen Vielen Dank!!! smile
Es funktioniert! Krass!
21.11.10 23:39 bastifantasti ist offline E-Mail Finden Als Freund hinzufügen
minette
HTML - Fanatiker


Dabei seit: 07.03.07
Beiträge: 235
Fähigkeiten: WBB3 Anfänger; WBB2 Profi
Herkunft: aus der bauch meine mutter
Forenversion: 3.1; 2.3

Antworten Zitieren Editieren Melden       UP

großes Grinsen großes Grinsen großes Grinsen

__________________
isch bin es

21.11.10 23:50 minette ist offline E-Mail Finden Als Freund hinzufügen
Baumstruktur | Brettstruktur
Gehe zu:

Neues Thema erstellen Antwort erstellen

yourWBB » WoltLab Burning Board Generation 2 * » Alles von und für das WBB 2.3.x » [WBB 2.3.x] Allg. Fragen und Probleme » Problem mit Nextbirthdaybit