Merge commit 'mike/master'
This commit is contained in:
commit
3ad7c395fb
12 changed files with 143 additions and 45 deletions
|
@ -196,3 +196,114 @@ function age($dob,$owner_tz = '',$viewer_tz = '') {
|
|||
$year_diff--;
|
||||
return $year_diff;
|
||||
}
|
||||
|
||||
|
||||
|
||||
// Get days in month
|
||||
// get_dim($year, $month);
|
||||
// returns number of days.
|
||||
// $month[1] = 'January';
|
||||
// to match human usage.
|
||||
|
||||
if(! function_exists('get_dim')) {
|
||||
function get_dim($y,$m) {
|
||||
|
||||
$dim = array( 0,
|
||||
31, 28, 31, 30, 31, 30,
|
||||
31, 31, 30, 31, 30, 31);
|
||||
|
||||
if($m != 2)
|
||||
return $dim[$m];
|
||||
if(((($y % 4) == 0) && (($y % 100) != 0)) || (($y % 400) == 0))
|
||||
return 29;
|
||||
return $dim[2];
|
||||
}}
|
||||
|
||||
|
||||
// Returns the first day in month for a given month, year
|
||||
// get_first_dim($year,$month)
|
||||
// returns 0 = Sunday through 6 = Saturday
|
||||
// Months start at 1.
|
||||
|
||||
if(! function_exists('get_first_dim')) {
|
||||
function get_first_dim($y,$m) {
|
||||
$d = sprintf('%04d-%02d-01 00:00', intval($y), intval($m));
|
||||
return datetime_convert('UTC','UTC',$d,'w');
|
||||
}}
|
||||
|
||||
// output a calendar for the given month, year.
|
||||
// if $links are provided (array), e.g. $links[12] => 'http://mylink' ,
|
||||
// date 12 will be linked appropriately. Today's date is also noted by
|
||||
// altering td class.
|
||||
// Months count from 1.
|
||||
|
||||
|
||||
// TODO: provide (prev,next) links, define class variations for different size calendars
|
||||
|
||||
|
||||
if(! function_exists('cal')) {
|
||||
function cal($y = 0,$m = 0, $links = false) {
|
||||
|
||||
|
||||
// month table - start at 1 to match human usage.
|
||||
|
||||
$mtab = array(' ',
|
||||
'January','February','March',
|
||||
'April','May','June',
|
||||
'July','August','September',
|
||||
'October','November','December'
|
||||
);
|
||||
|
||||
$thisyear = datetime_convert('UTC',date_default_timezone_get(),'now','Y');
|
||||
$thismonth = datetime_convert('UTC',date_default_timezone_get(),'now','m');
|
||||
if(! $y)
|
||||
$y = $thisyear;
|
||||
if(! $m)
|
||||
$m = intval($thismonth);
|
||||
|
||||
$dn = array('Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday');
|
||||
$f = get_first_dim($y,$m);
|
||||
$l = get_dim($y,$m);
|
||||
$d = 1;
|
||||
$dow = 0;
|
||||
$started = false;
|
||||
|
||||
if(($y == $thisyear) && ($m == $thismonth))
|
||||
$tddate = intval(datetime_convert('UTC',date_default_timezone_get(),'now','j'));
|
||||
|
||||
$str_month = day_translate($mtab[$m]);
|
||||
$o = '<table class="calendar">';
|
||||
$o .= "<caption>$str_month $y</caption><tr>";
|
||||
for($a = 0; $a < 7; $a ++)
|
||||
$o .= '<th>' . substr(day_translate($dn[$a]),0,3) . '</th>';
|
||||
$o .= '</tr><tr>';
|
||||
|
||||
while($d <= $l) {
|
||||
if(($dow == $f) && (! $started))
|
||||
$started = true;
|
||||
$today = (((isset($tddate)) && ($tddate == $d)) ? "class=\"today\" " : '');
|
||||
$o .= "<td $today>";
|
||||
$day = str_replace(' ',' ',sprintf('%2.2d', $d));
|
||||
if($started) {
|
||||
if(is_array($links) && isset($links[$d]))
|
||||
$o .= "<a href=\"{$links[$d]}\">$day</a>";
|
||||
else
|
||||
$o .= $day;
|
||||
$d ++;
|
||||
}
|
||||
else
|
||||
$o .= ' ';
|
||||
$o .= '</td>';
|
||||
$dow ++;
|
||||
if(($dow == 7) && ($d <= $l)) {
|
||||
$dow = 0;
|
||||
$o .= '</tr><tr>';
|
||||
}
|
||||
}
|
||||
if($dow)
|
||||
for($a = $dow; $a < 7; $a ++)
|
||||
$o .= '<td> </td>';
|
||||
$o .= '</tr></table>'."\r\n";
|
||||
|
||||
return $o;
|
||||
}}
|
||||
|
|
|
@ -108,6 +108,9 @@ function notifications_content(&$a) {
|
|||
'$intro_id' => $rr['intro_id'],
|
||||
'$friend_selected' => $friend_selected,
|
||||
'$fan_selected' => $fan_selected,
|
||||
'$approve_as' => t('Approve as: '),
|
||||
'$as_friend' => t('Friend'),
|
||||
'$as_fan' => t('Fan/Admirer')
|
||||
));
|
||||
}
|
||||
|
||||
|
|
|
@ -276,6 +276,9 @@ $a->strings['Hide Ignored Requests'] = 'Hide Ignored Requests';
|
|||
$a->strings['Claims to be known to you: '] = 'Claims to be known to you: ';
|
||||
$a->strings['yes'] = 'yes';
|
||||
$a->strings['no'] = 'no';
|
||||
$a->strings['Approve as: '] = 'Approve as: ';
|
||||
$a->strings['Friend'] = 'Friend';
|
||||
$a->strings['Fan/Admirer'] = 'Fan/Admirer';
|
||||
$a->strings['Notification type: '] = 'Notification type: ';
|
||||
$a->strings['Friend/Connect Request'] = 'Friend/Connect Request';
|
||||
$a->strings['New Follower'] = 'New Follower';
|
||||
|
|
|
@ -1,14 +0,0 @@
|
|||
<div class="intro-approve-as-friend-desc">Genehmigen als: </div>
|
||||
|
||||
<div class="intro-approve-as-friend-wrapper">
|
||||
<label class="intro-approve-as-friend-label" for="intro-approve-as-friend-$intro_id">Freund</label>
|
||||
<input type="radio" name="duplex" id="intro-approve-as-friend-$intro_id" class="intro-approve-as-friend" $friend_selected value="1" />
|
||||
<div class="intro-approve-friend-break" ></div>
|
||||
</div>
|
||||
<div class="intro-approve-as-friend-end"></div>
|
||||
<div class="intro-approve-as-fan-wrapper">
|
||||
<label class="intro-approve-as-fan-label" for="intro-approve-as-fan-$intro_id">Fan/Verehrer</label>
|
||||
<input type="radio" name="duplex" id="intro-approve-as-fan-$intro_id" class="intro-approve-as-fan" $fan_selected value="0" />
|
||||
<div class="intro-approve-fan-break"></div>
|
||||
</div>
|
||||
<div class="intro-approve-as-end"></div>
|
|
@ -274,6 +274,9 @@ $a->strings['Hide Ignored Requests'] = 'Verberge ignorierte Anfragen';
|
|||
$a->strings['Claims to be known to you: '] = 'Behauptet dich zu kennen: ';
|
||||
$a->strings['yes'] = 'ja';
|
||||
$a->strings['no'] = 'nein';
|
||||
$a->strings['Approve as: '] = 'Genehmigen als: ';
|
||||
$a->strings['Friend'] = 'Freund';
|
||||
$a->strings['Fan/Admirer'] = 'Fan/Verehrer';
|
||||
$a->strings['Notification type: '] = 'Benachrichtigungs Typ: ';
|
||||
$a->strings['Friend/Connect Request'] = 'Kontakt-/Freundschaftsanfrage';
|
||||
$a->strings['New Follower'] = 'Neuer Bewunderer';
|
||||
|
|
|
@ -1,14 +0,0 @@
|
|||
<div class="intro-approve-as-friend-desc">Approve as: </div>
|
||||
|
||||
<div class="intro-approve-as-friend-wrapper">
|
||||
<label class="intro-approve-as-friend-label" for="intro-approve-as-friend-$intro_id">Friend</label>
|
||||
<input type="radio" name="duplex" id="intro-approve-as-friend-$intro_id" class="intro-approve-as-friend" $friend_selected value="1" />
|
||||
<div class="intro-approve-friend-break" ></div>
|
||||
</div>
|
||||
<div class="intro-approve-as-friend-end"></div>
|
||||
<div class="intro-approve-as-fan-wrapper">
|
||||
<label class="intro-approve-as-fan-label" for="intro-approve-as-fan-$intro_id">Fan/Admirer</label>
|
||||
<input type="radio" name="duplex" id="intro-approve-as-fan-$intro_id" class="intro-approve-as-fan" $fan_selected value="0" />
|
||||
<div class="intro-approve-fan-break"></div>
|
||||
</div>
|
||||
<div class="intro-approve-as-end"></div>
|
|
@ -262,6 +262,9 @@ $a->strings['Hide Ignored Requests'] = 'Cacher les demandes ignorées';
|
|||
$a->strings['Claims to be known to you: '] = 'Prétend que vous le connaissez: ';
|
||||
$a->strings['yes'] = 'oui';
|
||||
$a->strings['no'] = 'non';
|
||||
$a->strings['Approve as: '] = 'Approuver en tant que: ';
|
||||
$a->strings['Friend'] = 'Ami';
|
||||
$a->strings['Fan/Admirer'] = 'Fan/Admirateur';
|
||||
$a->strings['Notification type: '] = 'Type de notification: ';
|
||||
$a->strings['Friend/Connect Request'] = 'Demande de connexion/relation';
|
||||
$a->strings['New Follower'] = 'Nouvel abonné';
|
||||
|
|
|
@ -1,14 +0,0 @@
|
|||
<div class="intro-approve-as-friend-desc">Approva come: </div>
|
||||
|
||||
<div class="intro-approve-as-friend-wrapper">
|
||||
<label class="intro-approve-as-friend-label" for="intro-approve-as-friend-$intro_id">Amico</label>
|
||||
<input type="radio" name="duplex" id="intro-approve-as-friend-$intro_id" class="intro-approve-as-friend" $friend_selected value="1" />
|
||||
<div class="intro-approve-friend-break" ></div>
|
||||
</div>
|
||||
<div class="intro-approve-as-friend-end"></div>
|
||||
<div class="intro-approve-as-fan-wrapper">
|
||||
<label class="intro-approve-as-fan-label" for="intro-approve-as-fan-$intro_id">Fan/Ammiratore</label>
|
||||
<input type="radio" name="duplex" id="intro-approve-as-fan-$intro_id" class="intro-approve-as-fan" $fan_selected value="0" />
|
||||
<div class="intro-approve-fan-break"></div>
|
||||
</div>
|
||||
<div class="intro-approve-as-end"></div>
|
|
@ -236,6 +236,9 @@ $a->strings['Hide Ignored Requests'] = 'Nascondi richieste ignorate';
|
|||
$a->strings['Claims to be known to you: '] = 'Dice di conoscerti: ';
|
||||
$a->strings['yes'] = 'si';
|
||||
$a->strings['no'] = 'no';
|
||||
$a->strings['Approve as: '] = 'Approva come: ';
|
||||
$a->strings['Friend'] = 'Amico';
|
||||
$a->strings['Fan/Admirer'] = 'Fan/Admiratore';
|
||||
$a->strings['Notification type: '] = 'Tipo di notifica: ';
|
||||
$a->strings['Friend/Connect Request'] = 'Richiesta Amicizia/Connessione';
|
||||
$a->strings['New Follower'] = 'Nuovo Seguace';
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
<div class="intro-approve-as-friend-desc">Approve as: </div>
|
||||
<div class="intro-approve-as-friend-desc">$approve_as</div>
|
||||
|
||||
<div class="intro-approve-as-friend-wrapper">
|
||||
<label class="intro-approve-as-friend-label" for="intro-approve-as-friend-$intro_id">Friend</label>
|
||||
<label class="intro-approve-as-friend-label" for="intro-approve-as-friend-$intro_id">$as_friend</label>
|
||||
<input type="radio" name="duplex" id="intro-approve-as-friend-$intro_id" class="intro-approve-as-friend" $friend_selected value="1" />
|
||||
<div class="intro-approve-friend-break" ></div>
|
||||
</div>
|
||||
<div class="intro-approve-as-friend-end"></div>
|
||||
<div class="intro-approve-as-fan-wrapper">
|
||||
<label class="intro-approve-as-fan-label" for="intro-approve-as-fan-$intro_id">Fan/Admirer</label>
|
||||
<label class="intro-approve-as-fan-label" for="intro-approve-as-fan-$intro_id">$as_fan</label>
|
||||
<input type="radio" name="duplex" id="intro-approve-as-fan-$intro_id" class="intro-approve-as-fan" $fan_selected value="0" />
|
||||
<div class="intro-approve-fan-break"></div>
|
||||
</div>
|
|
@ -2019,3 +2019,9 @@ a.mail-list-link {
|
|||
}
|
||||
|
||||
|
||||
.calendar {
|
||||
font-family: Courier, monospace;
|
||||
}
|
||||
.today {
|
||||
color: #FF0000;
|
||||
}
|
||||
|
|
|
@ -2065,3 +2065,11 @@ a.mail-list-link {
|
|||
.tool-link {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
|
||||
.calendar {
|
||||
font-family: Courier, monospace;
|
||||
}
|
||||
.today {
|
||||
color: #FF0000;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue