Simple Machines Community Forum

SMF Support => Language Specific Support => Hilfe zu SMF (German) => Aiheen aloitti: michael24179 - marraskuu 01, 2007, 03:32:35 IP

Otsikko: Suche Mod`und finde Ihn nicht
Kirjoitti: michael24179 - marraskuu 01, 2007, 03:32:35 IP
Ich bin beim stöbern auf folgenden Mod gestossen.



Wo finde ich diesen Mod ?????
Otsikko: Re: Suche Mod`und finde Ihn nicht
Kirjoitti: PfalzNacht - marraskuu 01, 2007, 04:23:39 IP
Das ist kein Mod, sondern ein PHP Script.

Kuck mal im TinyPortal, dort hab ich den irgendwo eingestellt.
Otsikko: Re: Suche Mod`und finde Ihn nicht
Kirjoitti: Dom - marraskuu 01, 2007, 09:02:55 IP
Hi PfalzNacht,
kannst du mal den Code posten?
Will ihn versuchen in mein MKP einzubauen.
Ich Hoffe, du bist so frei.

mfg Dom :)
Otsikko: Re: Suche Mod`und finde Ihn nicht
Kirjoitti: michael24179 - marraskuu 01, 2007, 11:18:35 IP
Lainaus käyttäjältä: PfalzNacht - marraskuu 01, 2007, 04:23:39 IP
Das ist kein Mod, sondern ein PHP Script.

Kuck mal im TinyPortal, dort hab ich den irgendwo eingestellt.

Dazu muss ich aber wissen wo nach ich suchen muss.
Otsikko: Re: Suche Mod`und finde Ihn nicht
Kirjoitti: Jorin - marraskuu 02, 2007, 03:02:04 AP
Nach "calendar", "birthday", "holiday" oder "calendar script" vielleicht?  :-\

Bevor man laut um Hilfe ruft, sollte man zumindest eine gewisse Vorarbeit geleistet haben. Geiz ist hier nicht (!) geil!
Otsikko: Re: Suche Mod`und finde Ihn nicht
Kirjoitti: michael24179 - marraskuu 02, 2007, 10:10:36 AP
Ich habe hier in der Mod Datenbank gesucht und ich will lediglich wissen wie der Mod heißt und nicht das er mir noch eingebaut wird. Wenn ich keinen Anhaltspunkt habe dann frag ich und da das SMF zum goß teil in Englisch ist, ist es nicht einfach ein bestimmten Mod zu bekommen. Außerdem sind dafür Foren da um sich helfen zu lassen.
Otsikko: Re: Suche Mod`und finde Ihn nicht
Kirjoitti: Jorin - marraskuu 02, 2007, 11:21:46 AP
Das Skript wirst du vermutlich bei www.tinyportal.net finden, und nicht hier. Hier gibt es nur Modifikationen für das SMF, keine Skripte für das Tinyportal.

edit: Hat mich jetzt 2 Minuten gekostet: http://www.tinyportals.net/index.php?topic=16675.0
Otsikko: Re: Suche Mod`und finde Ihn nicht
Kirjoitti: michael24179 - marraskuu 02, 2007, 01:49:17 IP
Es ist schön das du dir die 2 Minuten Zeit genommen hattest aber nach der ersten Antwort hier habe ich das TinyPortal durchsucht un d bin dabei auf deinen Link gestoßen. Wenn du dir jedoch weitere 2 Minuten zeit genommen hättest dann wäre dir aufgefallen das der gesuchte block nicht dabei ist.
Otsikko: Re: Suche Mod`und finde Ihn nicht
Kirjoitti: Jorin - marraskuu 02, 2007, 02:02:06 IP
Wie soll ich das wissen, wo ich TP nicht nutze und insofern auch den Kalender nicht testen kann?

Egal.
Otsikko: Re: Suche Mod`und finde Ihn nicht
Kirjoitti: PfalzNacht - marraskuu 02, 2007, 04:26:04 IP
Haste das Script jetzt gefunden?

Wenn nicht, schau ich mal ob ich den noch irgendwo hab.

Es ist auf jeden Fall im deutschen Board bei TP.
Otsikko: Re: Suche Mod`und finde Ihn nicht
Kirjoitti: michael24179 - marraskuu 03, 2007, 04:15:34 IP
Ich habe die suche mit allen möglichen Varianten mißbraucht und nix gefunden. Wäre echt genial wenn du es finden würdest. Danke
Otsikko: Re: Suche Mod`und finde Ihn nicht
Kirjoitti: PfalzNacht - marraskuu 03, 2007, 05:50:04 IP
Ich brauch da nicht zu suchen, ich hab den selbst.

Es ist aber lediglich der Kalender, ohne die Uhr.

Hier der Link zum Thema: http://www.tinyportals.net/index.php?topic=16675.0

Hier der Code:

global $scripturl, $modSettings, $context, $db_prefix, $user_profile;

smf_loadCalendarInfo();

$now = mktime() + $modSettings['time_offset'] * 3600;

$today = date('j',$now);
$year = date('Y',$now);
$month = date('n',$now);

$days = array($today=>array(NULL,NULL,'<a class="smalltext" style="color:steelblue; font-weight:bold; border:solid 1px black; background-color: white; padding: 0px 4px 0px 4px;" href="'.$scripturl.'?action=calendar;sa=post;month='.$month.';year='.$year.';day='.$today.'" target="_self">'.$today.'</a>'));

$day_name_length = 2;

$month_href = $scripturl . '?action=calendar&month=' . $month;
$first_day = 1;
$pn = array();

$first_of_month = gmmktime(0,0,0,$month,1,$year);

$day_names = array();                                      #generate all the day names according to the current locale
for($n=0,$t=(3+$first_day)*86400; $n<7; $n++,$t+=86400)    #January 4, 1970 was a Sunday
    $day_names[$n] = ucfirst(gmstrftime('%A',$t));         #%A means full textual day name

list($month, $year, $month_name, $weekday) = explode(',',gmstrftime('%m,%Y,%B,%w',$first_of_month));

$weekday = ($weekday + 7 - $first_day) % 7;                #adjust for $first_day
$title   = htmlentities(ucfirst($month_name)).' '.$year;   #note that some locales don't capitalize month and day names

@list($p, $pl) = each($pn); @list($n, $nl) = each($pn); #previous and next links, if applicable
if($p) $p = '<span class="smalltext">'.($pl ? '<a href="'.htmlspecialchars($pl).'">'.$p.'</a>' : $p).'</span> ';
if($n) $n = ' <span class="smalltext">'.($nl ? '<a href="'.htmlspecialchars($nl).'">'.$n.'</a>' : $n).'</span>';
$calendar = '<table align="center">'.'<caption >'.$p.($month_href ? '<a href="'.htmlspecialchars($month_href).'">'.$title.'</a>' : $title).$n.'</caption><tr>';

if($day_name_length){                                      #if the day names should be shown ($day_name_length > 0)
    foreach($day_names as $d)
    $calendar .= '<th class="smalltext" abbr="'.htmlentities($d).'">'.htmlentities($day_name_length < 4 ? substr($d,0,$day_name_length) : $d).'</th>';
    $calendar .= '</tr><tr style="text-align:right;">';
    }

if($weekday > 0) $calendar .= '<td class="smalltext" colspan="'.$weekday.'"> </td>'; #initial 'empty' days

for($day=1,$days_in_month=gmdate('t',$first_of_month); $day<=$days_in_month; $day++,$weekday++){
    if($weekday == 7){
        $weekday   = 0; #start a new week
        $calendar .= '</tr><tr style="text-align:right;">';
        }

    if(isset($days[$day]) and is_array($days[$day])){
        @list($link, $classes, $content) = $days[$day];
        if(is_null($content))  $content  = $day;
        $calendar .= '<td '.($classes ? ' class="'.htmlspecialchars($classes).'">' : '>').($link ? '<a href="'.htmlspecialchars($link).'">'.$content.'</a>' : $content).'</td>';
        }
    else
        {
        $calendar .= '<td class="smalltext" style="padding-right:4px;"><a';
        if(((($weekday+$first_day) % 7)==0)||((($weekday+$first_day) % 7)==6))
            {
            $calendar .= ' style="color:#C00000;"';
            }
        $calendar .= ' href="'.$scripturl.'?action=calendar;sa=post;month='.$month.';year='.$year.';day='.$day.'" target="_self">'.$day.'</a></td>';
        }
    }

if($weekday != 7) $calendar .= '<td class="smalltext" colspan="'.(7-$weekday).'"> </td>'; #remaining "empty" days

echo $calendar.'</tr>';

/////////////////////////////////////////////////////////////////
//   BIRTHDAY SECTION
//
if (!empty($context['calendar_birthdays']))
{
    echo '<tr><td colspan="2"><hr></td><td colspan="3" class="smalltext" align="center" style="font-weight: bold; color: #' . $modSettings['cal_bdaycolor'] . ';">Birthdays</td><td colspan="2"><hr></td></tr><td colspan="7" class="smalltext">';

    foreach ($context['calendar_birthdays'] as $member)
    {
        $query = db_query(
            "SELECT birthdate
            FROM {$db_prefix}members
            WHERE ID_MEMBER='".$member['id']."'", __FILE__, __LINE__);

        $row = mysql_fetch_assoc($query);
list ($uyear, $umonth, $uday) = explode('-', $row['birthdate']);
        $birthdate = strtotime(sprintf('%04d-%02d-%02d', date("Y"), $umonth, $uday));
        mysql_free_result($query);

        $dummy = array();
        $dummy[] = $member['id'];
        loadMemberData($dummy);
        $profile = &$user_profile[$member['id']];

        echo '<div align="center">';
        echo '<a href="', $scripturl, '?action=calendar;year=' . date("Y") . ';month=' . date("n",$birthdate) . '"><strong>' . date("M j",$birthdate) . '</strong></a>';
        echo ' - ';
        echo '<a href="', $scripturl, '?action=profile;u=', $member['id'], '">';
        if (!empty($profile['member_group_color']))
        {
        echo '<font color="' . $profile['member_group_color'] . '">' . $member['name'] . (isset($member['age']) ? '(' . $member['age'] . ')' : '') . '</font>';
        }
        else
        {
        echo $member['name'] . (isset($member['age']) ? '(' . $member['age'] . ')' : '');
        }
        echo '</a>';
        echo '</div>';
    }
    echo '</td></tr>';
}

/////////////////////////////////////////////////////////////////
//   EVENTS SECTION
//
if (!empty($context['calendar_events']))
{
    echo '<tr><td colspan="2"><hr></td><td colspan="3" class="smalltext" align="center" style="font-weight: bold; color: #' . $modSettings['cal_eventcolor'] . ';">Events</td><td colspan="2"><hr></td></tr><td colspan="7" class="smalltext">';

    foreach ($context['calendar_events'] as $event)
    {
        $query = db_query(
            "SELECT startDate
            FROM {$db_prefix}calendar
            WHERE ID_EVENT='".$event['id']."'", __FILE__, __LINE__);

        $row = mysql_fetch_assoc($query);
        $startdate = strtotime($row['startDate']);

        mysql_free_result($query);

        echo '<div align="center">';
        echo '<a href="', $scripturl, '?action=calendar;year=' . date("Y") . ';month=' . date("n",$startdate) . '"><strong>' . date("M j",$startdate) . '</strong></a>';
        echo ' - ';
        echo $event['link'] ;
        echo '</div>';
    }
    echo '</td></tr>';
}

/////////////////////////////////////////////////////////////////
//   HOLIDAY SECTION
// WHERE title='".str_replace("'","''",$holiday)."'
if (!empty($context['calendar_holidays']))
{
    echo '<tr><td colspan="2"><hr></td><td colspan="3" class="smalltext" align="center" style="font-weight: bold; color: #' . $modSettings['cal_holidaycolor'] . ';">Holidays</td><td colspan="2"><hr></td></tr><td colspan="7" class="smalltext">';

    foreach ($context['calendar_holidays'] as $holiday)
    {
        $query = db_query(
            "SELECT eventDate
            FROM {$db_prefix}calendar_holidays
            WHERE title='".str_replace("'","''",$holiday)."'
            AND (eventDate LIKE '".date("Y")."-%' OR eventDate LIKE '0004-%')", __FILE__, __LINE__);

        $row = mysql_fetch_assoc($query);
        $eventdate = strtotime(date("Y").substr($row['eventDate'], 4));

        mysql_free_result($query);

        echo '<div align="center">';
        echo '<a href="', $scripturl, '?action=calendar;year=' . date("Y") . ';month=' . date("n",$eventdate) . '"><strong>' . date("M j",$eventdate) . '</strong></a>';
        echo ' - ';
        echo $holiday;
        echo '</div>';
    }
    echo '</td></tr>';
}

echo '</table>';
Otsikko: Re: Suche Mod`und finde Ihn nicht
Kirjoitti: michael24179 - marraskuu 03, 2007, 07:19:34 IP
Danke dir. Die Uhr ist mir egal!!!!!