mirror of
https://github.com/e107inc/e107.git
synced 2025-08-04 21:57:51 +02:00
Blog calendar fixes (urls etc.)
This commit is contained in:
@@ -29,7 +29,7 @@ require_once(HEADERF);
|
||||
// initialize some cruft
|
||||
// ---------------------
|
||||
$bcSql = new db;
|
||||
$prefix = e_PLUGIN."blogcalendar_menu";
|
||||
$prefix = e_PLUGIN_ABS."blogcalendar_menu";
|
||||
$marray = array(BLOGCAL_M1, BLOGCAL_M2, BLOGCAL_M3, BLOGCAL_M4,
|
||||
BLOGCAL_M5, BLOGCAL_M6, BLOGCAL_M7, BLOGCAL_M8,
|
||||
BLOGCAL_M9, BLOGCAL_M10, BLOGCAL_M11, BLOGCAL_M12);
|
||||
@@ -119,6 +119,10 @@ for($i = 1; $i <= 12; $i++)
|
||||
$newline = 1;
|
||||
}
|
||||
$archive .= "<td style='vertical-align:top'>";
|
||||
|
||||
if(!deftrue('BOOTSTRAP'))
|
||||
{
|
||||
|
||||
$archive .= "<div class='fcaption' style='text-align:center; margin-bottom:2px;'>";
|
||||
|
||||
// href the current month regardless of newsposts or any month with news
|
||||
@@ -132,6 +136,8 @@ for($i = 1; $i <= 12; $i++)
|
||||
}
|
||||
|
||||
$archive .= "</div>";
|
||||
}
|
||||
|
||||
if (($req_year == $cur_year) && ($i == $cur_month))
|
||||
{
|
||||
$req_day = $cur_day;
|
||||
@@ -143,6 +149,7 @@ for($i = 1; $i <= 12; $i++)
|
||||
$archive .= "<div>".calendar($req_day, $i, $req_year, $day_links[$i], $pref['blogcal_ws'])."</div></td>\n";
|
||||
}
|
||||
$archive .= "</tr></table></div>";
|
||||
|
||||
$ns->tablerender(BLOGCAL_L2 ." $req_year", $archive);
|
||||
|
||||
require_once(FOOTERF);
|
||||
|
@@ -33,7 +33,7 @@ if(false === $cached)
|
||||
// ------------------------------
|
||||
// initialization + fetch options
|
||||
// ------------------------------
|
||||
$prefix = e_PLUGIN."blogcalendar_menu";
|
||||
$prefix = e_PLUGIN_ABS."blogcalendar_menu";
|
||||
$marray = array(BLOGCAL_M1, BLOGCAL_M2, BLOGCAL_M3, BLOGCAL_M4, BLOGCAL_M5, BLOGCAL_M6, BLOGCAL_M7, BLOGCAL_M8, BLOGCAL_M9, BLOGCAL_M10, BLOGCAL_M11, BLOGCAL_M12);
|
||||
$pref['blogcal_ws'] = "monday";
|
||||
|
||||
@@ -148,8 +148,6 @@ if(false === $cached)
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
// ------------------------
|
||||
// create and show calendar
|
||||
// ------------------------
|
||||
|
@@ -140,7 +140,7 @@ function calendar($req_day, $req_month, $req_year, $links = NULL, $ws = "sunday"
|
||||
|
||||
if(deftrue('BOOTSTRAP'))
|
||||
{
|
||||
$active = date("n") == $req_month ? 'active' : '';
|
||||
$active = date("n-Y") == ($req_month."-".$req_year) ? 'active' : '';
|
||||
$text = "<div class='item {$active}'>";
|
||||
$text .= "<h5>".$marray[$req_month]." ".$req_year."</h5>";
|
||||
$text .= $calendar;
|
||||
|
Reference in New Issue
Block a user