[geeklog-cvs] geeklog-1.3/public_html calendar.php,1.40,1.41 calendar_event.php,1.30,1.31 comment.php,1.69,1.70 lib-common.php,1.351,1.352 links.php,1.32,1.33 pollbooth.php,1.23,1.24 profiles.php,1.32,1.33 search.php,1.52,1.53 stats.php,1.26,1.27 submit.php,1.68,1.69 users.php,1.80,1.81
dhaun at iowaoutdoors.org
dhaun at iowaoutdoors.org
Thu Aug 5 08:54:49 EDT 2004
Update of /var/cvs/geeklog-1.3/public_html
In directory www:/tmp/cvs-serv12371
Modified Files:
calendar.php calendar_event.php comment.php lib-common.php
links.php pollbooth.php profiles.php search.php stats.php
submit.php users.php
Log Message:
Replace the default page title with something more meaningful, where possible (feature request #95)
Index: submit.php
===================================================================
RCS file: /var/cvs/geeklog-1.3/public_html/submit.php,v
retrieving revision 1.68
retrieving revision 1.69
diff -C2 -d -r1.68 -r1.69
*** submit.php 4 Aug 2004 18:44:23 -0000 1.68
--- submit.php 5 Aug 2004 12:54:46 -0000 1.69
***************
*** 57,61 ****
$retval = '';
!
COM_clearSpeedlimit ($_CONF['speedlimit'], 'submit');
--- 57,61 ----
$retval = '';
!
COM_clearSpeedlimit ($_CONF['speedlimit'], 'submit');
***************
*** 698,702 ****
$display = '';
- $display .= COM_siteHeader();
// note that 'type' _may_ come in through $HTTP_GET_VARS even when the
--- 698,701 ----
***************
*** 717,720 ****
--- 716,720 ----
if ($mode == $LANG12[8]) { // submit
+ $display .= COM_siteHeader();
$display .= savesubmission ($type, $HTTP_POST_VARS);
} else {
***************
*** 768,771 ****
--- 768,783 ----
$topic = COM_applyFilter ($http_vars['topic']);
+ switch ($type) {
+ case 'event':
+ $_CONF['pagetitle'] = $LANG12[4];
+ break;
+ case 'link':
+ $_CONF['pagetitle'] = $LANG12[5];
+ break;
+ default:
+ $_CONF['pagetitle'] = $LANG12[6];
+ break;
+ }
+ $display .= COM_siteHeader();
$display .= submissionform($type, $mode, $month, $day, $year, $hour, $topic);
}
Index: search.php
===================================================================
RCS file: /var/cvs/geeklog-1.3/public_html/search.php,v
retrieving revision 1.52
retrieving revision 1.53
diff -C2 -d -r1.52 -r1.53
*** search.php 26 Jul 2004 10:12:32 -0000 1.52
--- search.php 5 Aug 2004 12:54:46 -0000 1.53
***************
*** 9,13 ****
// | Geeklog search tool. |
// +---------------------------------------------------------------------------+
! // | Copyright (C) 2000-2003 by the following authors: |
// | |
// | Authors: Tony Bibbs - tony at tonybibbs.com |
--- 9,13 ----
// | Geeklog search tool. |
// +---------------------------------------------------------------------------+
! // | Copyright (C) 2000-2004 by the following authors: |
// | |
// | Authors: Tony Bibbs - tony at tonybibbs.com |
***************
*** 37,47 ****
require_once($_CONF['path_system'] . 'classes/search.class.php');
- $display = COM_siteHeader();
-
$searchObj = new Search();
if ($HTTP_GET_VARS['mode'] == 'search') {
$display .= $searchObj->doSearch();
} else {
$display .= $searchObj->showForm();
}
--- 37,49 ----
require_once($_CONF['path_system'] . 'classes/search.class.php');
$searchObj = new Search();
if ($HTTP_GET_VARS['mode'] == 'search') {
+ $_CONF['pagetitle'] = $LANG09[11];
+ $display = COM_siteHeader();
$display .= $searchObj->doSearch();
} else {
+ $_CONF['pagetitle'] = $LANG09[1];
+ $display = COM_siteHeader();
$display .= $searchObj->showForm();
}
Index: calendar_event.php
===================================================================
RCS file: /var/cvs/geeklog-1.3/public_html/calendar_event.php,v
retrieving revision 1.30
retrieving revision 1.31
diff -C2 -d -r1.30 -r1.31
*** calendar_event.php 9 Jun 2004 07:53:55 -0000 1.30
--- calendar_event.php 5 Aug 2004 12:54:46 -0000 1.31
***************
*** 184,188 ****
$month_options .= '<option value="' . $i . '"';
if ($i == date('n',strtotime($A['startdate']))) {
! $month_options .= ' selected="SELECTED"';
}
$month_options .= '>' . $i . '</option>';
--- 184,188 ----
$month_options .= '<option value="' . $i . '"';
if ($i == date('n',strtotime($A['startdate']))) {
! $month_options .= ' selected="selected"';
}
$month_options .= '>' . $i . '</option>';
***************
*** 194,198 ****
$day_options .= '<option value="' . $i . '"';
if ($i == date('j',strtotime($A['startdate']))) {
! $day_options .= ' selected="SELECTED"';
}
$day_options .= '>' . $i . '</option>';
--- 194,198 ----
$day_options .= '<option value="' . $i . '"';
if ($i == date('j',strtotime($A['startdate']))) {
! $day_options .= ' selected="selected"';
}
$day_options .= '>' . $i . '</option>';
***************
*** 204,208 ****
$year_options .= '<option value="' .$i .'"';
if ($i == date('Y',strtotime($A['startdate']))) {
! $year_options .= ' selected="SELECTED"';
}
$year_options .= '>' . $i . '</option>';
--- 204,208 ----
$year_options .= '<option value="' .$i .'"';
if ($i == date('Y',strtotime($A['startdate']))) {
! $year_options .= ' selected="selected"';
}
$year_options .= '>' . $i . '</option>';
***************
*** 214,218 ****
$hour_options .= '<option value="' . $i . '"';
if ($i == date('g',strtotime($A['startdate']))) {
! $hour_options .= ' selected="SELECTED"';
}
$hour_options .= '>' . $i . '</option>';
--- 214,218 ----
$hour_options .= '<option value="' . $i . '"';
if ($i == date('g',strtotime($A['startdate']))) {
! $hour_options .= ' selected="selected"';
}
$hour_options .= '>' . $i . '</option>';
***************
*** 225,235 ****
$cal_templates->set_var('start30_selected','');
$cal_templates->set_var('start45_selected','');
! $cal_templates->set_var('start' . $startmin . '_selected', 'selected="SELECTED"');
if (date('a',strtotime($A['startdate'])) == 'am') {
! $cal_templates->set_var('startam_selected', 'selected="SELECTED"');
$cal_templates->set_var('startpm_selected', '');
} else {
$cal_templates->set_var('startam_selected', '');
! $cal_templates->set_var('startpm_selected', 'selected="SELECTED"');
}
--- 225,235 ----
$cal_templates->set_var('start30_selected','');
$cal_templates->set_var('start45_selected','');
! $cal_templates->set_var('start' . $startmin . '_selected', 'selected="selected"');
if (date('a',strtotime($A['startdate'])) == 'am') {
! $cal_templates->set_var('startam_selected', 'selected="selected"');
$cal_templates->set_var('startpm_selected', '');
} else {
$cal_templates->set_var('startam_selected', '');
! $cal_templates->set_var('startpm_selected', 'selected="selected"');
}
***************
*** 242,246 ****
$month_options .= '<option value="' . $i . '"';
if ($i == date('n',strtotime($A['enddate']))) {
! $month_options .= ' selected="SELECTED"';
}
$month_options .= '>' . $i . '</option>';
--- 242,246 ----
$month_options .= '<option value="' . $i . '"';
if ($i == date('n',strtotime($A['enddate']))) {
! $month_options .= ' selected="selected"';
}
$month_options .= '>' . $i . '</option>';
***************
*** 252,256 ****
$day_options .= '<option value="' . $i . '"';
if ($i == date('j',strtotime($A['enddate']))) {
! $day_options .= ' selected="SELECTED"';
}
$day_options .= '>' . $i . '</option>';
--- 252,256 ----
$day_options .= '<option value="' . $i . '"';
if ($i == date('j',strtotime($A['enddate']))) {
! $day_options .= ' selected="selected"';
}
$day_options .= '>' . $i . '</option>';
***************
*** 262,266 ****
$year_options .= '<option value="' .$i .'"';
if ($i == date('Y',strtotime($A['enddate']))) {
! $year_options .= ' selected="SELECTED"';
}
$year_options .= '>' . $i . '</option>';
--- 262,266 ----
$year_options .= '<option value="' .$i .'"';
if ($i == date('Y',strtotime($A['enddate']))) {
! $year_options .= ' selected="selected"';
}
$year_options .= '>' . $i . '</option>';
***************
*** 275,279 ****
$hour_options .= '<option value="' . $i . '"';
if ($i == date('g',strtotime($A['enddate']))) {
! $hour_options .= ' selected="SELECTED"';
}
$hour_options .= '>' . $i . '</option>';
--- 275,279 ----
$hour_options .= '<option value="' . $i . '"';
if ($i == date('g',strtotime($A['enddate']))) {
! $hour_options .= ' selected="selected"';
}
$hour_options .= '>' . $i . '</option>';
***************
*** 289,299 ****
$cal_templates->set_var('end30_selected','');
$cal_templates->set_var('end45_selected','');
! $cal_templates->set_var('end' . $endmin . '_selected', 'selected="SELECTED"');
if (date('a',strtotime($A['enddate'])) == 'am') {
! $cal_templates->set_var('endam_selected', 'selected="SELECTED"');
$cal_templates->set_var('endpm_selected', '');
} else {
$cal_templates->set_var('endam_selected', '');
! $cal_templates->set_var('endpm_selected', 'selected="SELECTED"');
}
--- 289,299 ----
$cal_templates->set_var('end30_selected','');
$cal_templates->set_var('end45_selected','');
! $cal_templates->set_var('end' . $endmin . '_selected', 'selected="selected"');
if (date('a',strtotime($A['enddate'])) == 'am') {
! $cal_templates->set_var('endam_selected', 'selected="selected"');
$cal_templates->set_var('endpm_selected', '');
} else {
$cal_templates->set_var('endam_selected', '');
! $cal_templates->set_var('endpm_selected', 'selected="selected"');
}
***************
*** 321,325 ****
$state_options .= '<option value="' . key($_STATES) . '"';
if ($A['state'] == key($_STATES)) {
! $state_options .= ' selected="SELECTED"';
}
$state_options .= '>' . current($_STATES) . '</option>';
--- 321,325 ----
$state_options .= '<option value="' . key($_STATES) . '"';
if ($A['state'] == key($_STATES)) {
! $state_options .= ' selected="selected"';
}
$state_options .= '>' . current($_STATES) . '</option>';
***************
*** 426,429 ****
--- 426,430 ----
if (!empty ($eid)) {
if ($mode == 'personal' AND DB_count($_TABLES['events'],'eid',$eid) == 0) {
+ $_CONF['pagetitle'] = $LANG30[38];
$display .= COM_siteHeader('menu');
$display .= COM_startBlock($LANG30[38]);
***************
*** 436,462 ****
break;
} else {
- $display .= COM_siteHeader('menu');
if (strpos ($LANG30[9], '%') === false) {
! $display .= COM_startBlock ($LANG30[9]);
} else {
! $display .= COM_startBlock (sprintf ($LANG30[9],
! $_CONF['site_name']));
}
$datesql = "SELECT *,datestart AS start,dateend AS end FROM {$_TABLES['events']} WHERE eid = '$eid'";
}
} else {
$display .= COM_siteHeader ('menu');
! $display .= COM_startBlock ($LANG30[10] . ' '
! . strftime ($_CONF['shortdate'],
! mktime (0, 0, 0, $month, $day, $year)));
$thedate = sprintf ('%4d-%02d-%02d', $year, $month, $day);
$datesql = "SELECT *,datestart AS start,dateend AS end FROM {$_TABLES['events']} WHERE \"$thedate\" BETWEEN DATE_FORMAT(datestart,'%Y-%m-%d') and DATE_FORMAT(dateend,'%Y-%m-%d') ORDER BY datestart ASC,title";
}
$cal_templates = new Template($_CONF['path_layout'] . 'calendar');
! $cal_templates->set_file(array(
! 'events'=>'events.thtml',
! 'details'=>'eventdetails.thtml',
! 'addremove'=>'addremoveevent.thtml'
! ));
$cal_templates->set_var('lang_addevent', $LANG02[6]);
--- 437,474 ----
break;
} else {
if (strpos ($LANG30[9], '%') === false) {
! $_CONF['pagetitle'] = $LANG30[9];
} else {
! $_CONF['pagetitle'] = sprintf ($LANG30[9], $_CONF['site_name']);
}
+ $display .= COM_siteHeader ('menu');
+ $display .= COM_startBlock ($_CONF['pagetitle']);
+
$datesql = "SELECT *,datestart AS start,dateend AS end FROM {$_TABLES['events']} WHERE eid = '$eid'";
}
} else {
+ $year = COM_applyFilter ($HTTP_GET_VARS['year']);
+ $month = COM_applyFilter ($HTTP_GET_VARS['month']);
+ $day = COM_applyFilter ($HTTP_GET_VARS['day']);
+ if (($year == 0) || ($month == 0) || ($day == 0)) {
+ $year = date ('Y');
+ $month = date ('n');
+ $day = date ('j');
+ }
+
+ $_CONF['pagetitle'] = $LANG30[10] . ' ' . strftime ($_CONF['shortdate'],
+ mktime (0, 0, 0, $month, $day, $year));
$display .= COM_siteHeader ('menu');
! $display .= COM_startBlock ($_CONF['pagetitle']);
!
$thedate = sprintf ('%4d-%02d-%02d', $year, $month, $day);
$datesql = "SELECT *,datestart AS start,dateend AS end FROM {$_TABLES['events']} WHERE \"$thedate\" BETWEEN DATE_FORMAT(datestart,'%Y-%m-%d') and DATE_FORMAT(dateend,'%Y-%m-%d') ORDER BY datestart ASC,title";
}
$cal_templates = new Template($_CONF['path_layout'] . 'calendar');
! $cal_templates->set_file (array (
! 'events' => 'events.thtml',
! 'details' => 'eventdetails.thtml',
! 'addremove' => 'addremoveevent.thtml'
! ));
$cal_templates->set_var('lang_addevent', $LANG02[6]);
***************
*** 481,490 ****
$A = DB_fetchArray($result);
if (SEC_hasAccess($A['owner_id'],$A['group_id'],$A['perm_owner'],$A['perm_group'],$A['perm_members'],$A['perm_anon']) > 0) {
! if (strftime("%B",strtotime($A["start"])) != $currentmonth) {
$str_month = $cal->getMonthName(strftime('%m',strtotime($A['start'])));
$cal_templates->set_var('lang_month', $str_month);
$cal_templates->set_var('event_year', strftime('%Y',strtotime($A['start'])));
! //$display .= '<br><h1>' . strftime("%B %Y",strtotime($A["start"])) . '</h1>' . LB;
! $currentmonth = strftime("%B",strtotime($A["start"]));
}
$cal_templates->set_var('event_title', stripslashes($A['title']));
--- 493,502 ----
$A = DB_fetchArray($result);
if (SEC_hasAccess($A['owner_id'],$A['group_id'],$A['perm_owner'],$A['perm_group'],$A['perm_members'],$A['perm_anon']) > 0) {
! if (strftime('%B',strtotime($A['start'])) != $currentmonth) {
$str_month = $cal->getMonthName(strftime('%m',strtotime($A['start'])));
$cal_templates->set_var('lang_month', $str_month);
$cal_templates->set_var('event_year', strftime('%Y',strtotime($A['start'])));
! //$display .= '<br><h1>' . strftime('%B %Y',strtotime($A['start'])) . '</h1>' . LB;
! $currentmonth = strftime('%B',strtotime($A['start']));
}
$cal_templates->set_var('event_title', stripslashes($A['title']));
***************
*** 538,542 ****
} else {
! $thedatetime = strftime("%A, " . $_CONF['shortdate'],strtotime($A['start']));
$cal_templates->set_var('event_start', $thedatetime);
$cal_templates->set_var('event_end', $LANG30[26]);
--- 550,554 ----
} else {
! $thedatetime = strftime('%A, ' . $_CONF['shortdate'],strtotime($A['start']));
$cal_templates->set_var('event_start', $thedatetime);
$cal_templates->set_var('event_end', $LANG30[26]);
Index: users.php
===================================================================
RCS file: /var/cvs/geeklog-1.3/public_html/users.php,v
retrieving revision 1.80
retrieving revision 1.81
diff -C2 -d -r1.80 -r1.81
*** users.php 17 Jun 2004 11:15:29 -0000 1.80
--- users.php 5 Aug 2004 12:54:46 -0000 1.81
***************
*** 63,73 ****
* This grabs the user profile for a given user and displays it
*
! * @param int $user User ID of profile to get
! * @return string HTML for user profile page
*
*/
! function userprofile($user)
{
! global $_TABLES, $_CONF, $_USER, $LANG04, $LANG01, $LANG_LOGIN, $_GROUPS;
if (empty ($_USER['username']) &&
--- 63,74 ----
* This grabs the user profile for a given user and displays it
*
! * @param int $user User ID of profile to get
! * @param int $msg Message to display (if != 0)
! * @return string HTML for user profile page
*
*/
! function userprofile ($user, $msg)
{
! global $_CONF, $_TABLES, $_USER, $LANG01, $LANG04, $LANG_LOGIN;
if (empty ($_USER['username']) &&
***************
*** 97,100 ****
--- 98,107 ----
$A = DB_fetchArray($result);
+ $_CONF['pagetitle'] = $LANG04[1] . ' ' . $A['username'];
+ $retval .= COM_siteHeader ('menu');
+ if ($msg > 0) {
+ $retval .= COM_showMessage ($msg);
+ }
+
// format date/time to user preference
$curtime = COM_getUserDateTimeFormat($A["regdate"]);
***************
*** 272,275 ****
--- 279,283 ----
$retval .= PLG_profileBlocksDisplay ($user);
+ $retval .= COM_siteFooter ();
return $retval;
***************
*** 683,693 ****
$uid = COM_applyFilter ($HTTP_GET_VARS['uid'], true);
if (is_numeric ($uid) && ($uid > 0)) {
- $display .= COM_siteHeader('menu');
$msg = COM_applyFilter ($HTTP_GET_VARS['msg'], true);
! if ($msg > 0) {
! $display .= COM_showMessage ($msg);
! }
! $display .= userprofile ($uid);
! $display .= COM_siteFooter ();
} else {
$display .= COM_refresh ($_CONF['site_url'] . '/index.php');
--- 691,696 ----
$uid = COM_applyFilter ($HTTP_GET_VARS['uid'], true);
if (is_numeric ($uid) && ($uid > 0)) {
$msg = COM_applyFilter ($HTTP_GET_VARS['msg'], true);
! $display .= userprofile ($uid, $msg);
} else {
$display .= COM_refresh ($_CONF['site_url'] . '/index.php');
Index: links.php
===================================================================
RCS file: /var/cvs/geeklog-1.3/public_html/links.php,v
retrieving revision 1.32
retrieving revision 1.33
diff -C2 -d -r1.32 -r1.33
*** links.php 9 Jun 2004 11:30:31 -0000 1.32
--- links.php 5 Aug 2004 12:54:46 -0000 1.33
***************
*** 9,13 ****
// | This is the links page |
// +---------------------------------------------------------------------------+
! // | Copyright (C) 2000-2003 by the following authors: |
// | |
// | Authors: Tony Bibbs - tony at tonybibbs.com |
--- 9,13 ----
// | This is the links page |
// +---------------------------------------------------------------------------+
! // | Copyright (C) 2000-2004 by the following authors: |
// | |
// | Authors: Tony Bibbs - tony at tonybibbs.com |
***************
*** 39,43 ****
--- 39,45 ----
// MAIN
+ $_CONF['pagetitle'] = $LANG06[1];
$display = COM_siteHeader();
+
if (empty ($_USER['username']) &&
(($_CONF['loginrequired'] == 1) || ($_CONF['linksloginrequired'] == 1))) {
***************
*** 60,64 ****
$linklist = new Template($_CONF['path_layout'] . 'links');
! $linklist->set_file(array('linklist'=>'links.thtml','catlinks'=>'categorylinks.thtml','link'=>'linkdetails.thtml','catnav'=>'categorynavigation.thtml','catrow'=>'categoryrow.thtml','catcol'=>'categorycol.thtml','actcol'=>'categoryactivecol.thtml','pagenav'=>'pagenavigation.thtml'));
if ($_CONF['linkcols'] > 0) {
--- 62,73 ----
$linklist = new Template($_CONF['path_layout'] . 'links');
! $linklist->set_file (array ('linklist' => 'links.thtml',
! 'catlinks' => 'categorylinks.thtml',
! 'link' => 'linkdetails.thtml',
! 'catnav' => 'categorynavigation.thtml',
! 'catrow' => 'categoryrow.thtml',
! 'catcol' => 'categorycol.thtml',
! 'actcol' => 'categoryactivecol.thtml',
! 'pagenav' => 'pagenavigation.thtml'));
if ($_CONF['linkcols'] > 0) {
***************
*** 116,120 ****
$sql .= COM_getPermSQL ();
}
! $sql .= " ORDER BY category asc,title";
$result = DB_query($sql);
$nrows = DB_numRows($result);
--- 125,129 ----
$sql .= COM_getPermSQL ();
}
! $sql .= ' ORDER BY category asc,title';
$result = DB_query($sql);
$nrows = DB_numRows($result);
Index: profiles.php
===================================================================
RCS file: /var/cvs/geeklog-1.3/public_html/profiles.php,v
retrieving revision 1.32
retrieving revision 1.33
diff -C2 -d -r1.32 -r1.33
*** profiles.php 27 Jul 2004 07:31:54 -0000 1.32
--- profiles.php 5 Aug 2004 12:54:46 -0000 1.33
***************
*** 89,93 ****
if (!empty ($sig)) {
$sig = strip_tags (COM_stripslashes ($sig));
! $sig = "\r\n\r\n-- \r\n" . $sig;
}
}
--- 89,93 ----
if (!empty ($sig)) {
$sig = strip_tags (COM_stripslashes ($sig));
! $sig = "\n\n-- \n" . $sig;
}
}
***************
*** 102,105 ****
--- 102,106 ----
$retval .= COM_refresh($_CONF['site_url'] . '/index.php?msg=27');
} else {
+ $_CONF['pagetitle'] = $LANG04[81];
$retval .= COM_siteHeader('menu')
.COM_errorLog($LANG08[3],2)
***************
*** 108,111 ****
--- 109,113 ----
}
} else {
+ $_CONF['pagetitle'] = $LANG04[81];
$retval .= COM_siteHeader('menu')
.COM_errorLog($LANG08[4],2)
***************
*** 356,359 ****
--- 358,362 ----
. '/article.php?story=' . $sid);
} else {
+ $_CONF['pagetitle'] = $LANG08[17];
$display .= COM_siteHeader() . mailstoryform($sid) . COM_siteFooter();
}
***************
*** 374,377 ****
--- 377,381 ----
$uid = COM_applyFilter ($HTTP_GET_VARS['uid'], true);
if ($uid > 1) {
+ $_CONF['pagetitle'] = $LANG04[81];
$display .= COM_siteHeader ()
. contactform ($uid)
Index: stats.php
===================================================================
RCS file: /var/cvs/geeklog-1.3/public_html/stats.php,v
retrieving revision 1.26
retrieving revision 1.27
diff -C2 -d -r1.26 -r1.27
*** stats.php 26 Jul 2004 10:12:32 -0000 1.26
--- stats.php 5 Aug 2004 12:54:46 -0000 1.27
***************
*** 57,60 ****
--- 57,61 ----
// MAIN
+ $_CONF['pagetitle'] = $LANG10[1];
$display .= COM_siteHeader() . COM_startBlock($LANG10[1]);
Index: comment.php
===================================================================
RCS file: /var/cvs/geeklog-1.3/public_html/comment.php,v
retrieving revision 1.69
retrieving revision 1.70
diff -C2 -d -r1.69 -r1.70
*** comment.php 27 Jul 2004 18:37:16 -0000 1.69
--- comment.php 5 Aug 2004 12:54:46 -0000 1.70
***************
*** 811,814 ****
--- 811,815 ----
}
if (!empty ($type)) {
+ $_CONF['pagetitle'] = $LANG03[1];
$display .= COM_siteHeader()
. commentform ($_USER['uid'], $title, '', $sid, $pid, $type,
Index: calendar.php
===================================================================
RCS file: /var/cvs/geeklog-1.3/public_html/calendar.php,v
retrieving revision 1.40
retrieving revision 1.41
diff -C2 -d -r1.40 -r1.41
*** calendar.php 4 Aug 2004 18:44:54 -0000 1.40
--- calendar.php 5 Aug 2004 12:54:46 -0000 1.41
***************
*** 75,78 ****
--- 75,79 ----
$thedata = array();
$nrows = DB_numRows($result);
+
for ($i = 1; $i <= $nrows; $i++) {
$A = DB_fetchArray($result);
***************
*** 321,326 ****
}
- $display .= COM_siteHeader('');
-
$mode = '';
if (isset ($HTTP_POST_VARS['mode'])) {
--- 322,325 ----
***************
*** 334,337 ****
--- 333,343 ----
}
+ if ($mode == 'personal') {
+ $_CONF['pagetitle'] = $LANG12[40];
+ } else {
+ $_CONF['pagetitle'] = $LANG12[39];
+ }
+ $display .= COM_siteHeader ('menu');
+
// Set mode back to master if user refreshes screen after their session expires
if (($_USER['uid'] <= 1) AND $mode == 'personal') {
***************
*** 459,472 ****
} else {
$cal_templates->set_var('calendar_title', $_CONF['site_name'] . ' ' . $LANG30[29]);
! if (!empty($_USER['uid']) AND $_CONF['personalcalendars'] == 1) {
! $cal_templates->set_var('calendar_toggle', '[<a href="' . $_CONF['site_url'] . "/calendar.php?mode=personal&view=day&month=$month&day=$day&year=$year\">" . $LANG30[12] . '</a>]');
! } else {
! $cal_templates->set_var('calendar_toggle', '');
! }
}
$thedate = COM_getUserDateTimeFormat(mktime(0,0,0,$month,$day,$year));
$cal_templates->set_var('week_num',strftime('%V',$thedate[1]));
if ($mode == 'personal') {
! $calsql = "SELECT * FROM {$_TABLES['personal_events']} WHERE (uid = {$_USER["uid"]}) AND ((allday=1 AND datestart = \"$year-$month-$day\") OR (datestart >= \"$year-$month-$day 00:00:00\" AND datestart <= \"$year-$month-$day 23:59:59\") OR (dateend >= \"$year-$month-$day 00:00:00\" AND dateend <= \"$year-$month-$day 23:59:59\") OR (\"$year-$month-$day\" between datestart and dateend)) ORDER BY datestart,timestart";
} else {
$calsql = "SELECT * FROM {$_TABLES['events']} WHERE ((allday=1 AND datestart = \"$year-$month-$day\") OR (datestart >= \"$year-$month-$day 00:00:00\" AND datestart <= \"$year-$month-$day 23:59:59\") OR (dateend >= \"$year-$month-$day 00:00:00\" AND dateend <= \"$year-$month-$day 23:59:59\") OR (\"$year-$month-$day\" between datestart and dateend)) ORDER BY datestart,timestart";
--- 465,478 ----
} else {
$cal_templates->set_var('calendar_title', $_CONF['site_name'] . ' ' . $LANG30[29]);
! if (!empty($_USER['uid']) AND $_CONF['personalcalendars'] == 1) {
! $cal_templates->set_var('calendar_toggle', '[<a href="' . $_CONF['site_url'] . "/calendar.php?mode=personal&view=day&month=$month&day=$day&year=$year\">" . $LANG30[12] . '</a>]');
! } else {
! $cal_templates->set_var('calendar_toggle', '');
! }
}
$thedate = COM_getUserDateTimeFormat(mktime(0,0,0,$month,$day,$year));
$cal_templates->set_var('week_num',strftime('%V',$thedate[1]));
if ($mode == 'personal') {
! $calsql = "SELECT * FROM {$_TABLES['personal_events']} WHERE (uid = {$_USER['uid']}) AND ((allday=1 AND datestart = \"$year-$month-$day\") OR (datestart >= \"$year-$month-$day 00:00:00\" AND datestart <= \"$year-$month-$day 23:59:59\") OR (dateend >= \"$year-$month-$day 00:00:00\" AND dateend <= \"$year-$month-$day 23:59:59\") OR (\"$year-$month-$day\" between datestart and dateend)) ORDER BY datestart,timestart";
} else {
$calsql = "SELECT * FROM {$_TABLES['events']} WHERE ((allday=1 AND datestart = \"$year-$month-$day\") OR (datestart >= \"$year-$month-$day 00:00:00\" AND datestart <= \"$year-$month-$day 23:59:59\") OR (dateend >= \"$year-$month-$day 00:00:00\" AND dateend <= \"$year-$month-$day 23:59:59\") OR (\"$year-$month-$day\" between datestart and dateend)) ORDER BY datestart,timestart";
***************
*** 503,543 ****
//$cal_templates->set_var('title_colspan', $maxcols + 1);
for ($i = 0; $i <= 23; $i++) {
! if ($hourcols[$i] > 0) {
} else {
$cal_templates->set_var('event_entry',' ');
- //$cal_templates->parse($i . '_cols','column',true);
- //$cal_templates->parse($i . '_cols','column');
- }
- if ($nrows > 0) {
- $numevents = current($hourcols);
- }
-
- //$colsleft = $maxcols;
- $cal_templates->set_var('layout_url', $_CONF['layout_url']);
- for ($j = 1; $j <= $numevents; $j++) {
- $A = current($thedata);
- $cal_templates->set_var('event_time', date('g:ia',strtotime($A['datestart'].' '.$A['timestart'])) . '-'. date('g:ia',strtotime($A['dateend'].' '.$A['timeend'])));
- if (SEC_hasAccess($A['owner_id'],$A['group_id'],$A['perm_owner'],$A['perm_group'],$A['perm_members'],$A['perm_anon']) > 0 AND $mode == 'personal') {
- $cal_templates->set_var('delete_imagelink','<a href="' . $_CONF['site_url'] . '/calendar_event.php?action=deleteevent&eid=' . $eid . '"><img alt="' . $LANG30[30] . '" src="' . $_CONF['layout_url'] . '/images/icons/delete_event.gif" border="0"></a>');
- } else {
- $cal_templates->set_var('delete_imagelink','');
- }
- $cal_templates->set_var('eid', $A['eid']);
- $cal_templates->set_var('event_title', stripslashes($A['title']));
- if ($j < $numevents) {
- $cal_templates->set_var('br', '<br>');
- } else {
- $cal_templates->set_var('br', '');
- }
- $cal_templates->parse('event_entry','event',true);
- $colsleft = $colsleft - 1;
- next($thedata);
}
$cal_templates->set_var ($i . '_hour',
strftime ($_CONF['timeonly'], mktime ($i, 0)));
! $cal_templates->parse($i.'_cols','column',true);
! if ($nrows > 0) {
! next($hourcols);
! }
}
--- 509,547 ----
//$cal_templates->set_var('title_colspan', $maxcols + 1);
for ($i = 0; $i <= 23; $i++) {
! $numevents = $hourcols[$i];
! if ($numevents > 0) {
! // $colsleft = $maxcols;
! $cal_templates->set_var ('layout_url', $_CONF['layout_url']);
! for ($j = 1; $j <= $numevents; $j++) {
! $A = current ($thedata);
! $cal_templates->set_var ('event_time',
! date ('g:ia', strtotime ($A['datestart'] . ' '
! . $A['timestart'])) . '-'
! . date ('g:ia', strtotime ($A['dateend'] . ' '
! . $A['timeend'])));
! if (SEC_hasAccess ($A['owner_id'], $A['group_id'],
! $A['perm_owner'], $A['perm_group'], $A['perm_members'],
! $A['perm_anon']) > 0 AND $mode == 'personal') {
! $cal_templates->set_var ('delete_imagelink', '<a href="' . $_CONF['site_url'] . '/calendar_event.php?action=deleteevent&eid=' . $eid . '"><img alt="' . $LANG30[30] . '" src="' . $_CONF['layout_url'] . '/images/icons/delete_event.gif" border="0"></a>');
! } else {
! $cal_templates->set_var('delete_imagelink','');
! }
! $cal_templates->set_var('eid', $A['eid']);
! $cal_templates->set_var('event_title', stripslashes($A['title']));
! if ($j < $numevents) {
! $cal_templates->set_var('br', '<br>');
! } else {
! $cal_templates->set_var('br', '');
! }
! $cal_templates->parse('event_entry','event',true);
! // $colsleft = $colsleft - 1;
! next($thedata);
! }
} else {
$cal_templates->set_var('event_entry',' ');
}
$cal_templates->set_var ($i . '_hour',
strftime ($_CONF['timeonly'], mktime ($i, 0)));
! $cal_templates->parse ($i . '_cols', 'column', true);
}
Index: pollbooth.php
===================================================================
RCS file: /var/cvs/geeklog-1.3/public_html/pollbooth.php,v
retrieving revision 1.23
retrieving revision 1.24
diff -C2 -d -r1.23 -r1.24
*** pollbooth.php 20 Apr 2004 21:54:10 -0000 1.23
--- pollbooth.php 5 Aug 2004 12:54:46 -0000 1.24
***************
*** 170,173 ****
--- 170,174 ----
if (empty($qid)) {
+ $_CONF['pagetitle'] = $LANG07[4];
$display .= COM_siteHeader() . polllist();
} else if ($aid == 0) {
Index: lib-common.php
===================================================================
RCS file: /var/cvs/geeklog-1.3/public_html/lib-common.php,v
retrieving revision 1.351
retrieving revision 1.352
diff -C2 -d -r1.351 -r1.352
*** lib-common.php 4 Aug 2004 18:42:41 -0000 1.351
--- lib-common.php 5 Aug 2004 12:54:46 -0000 1.352
***************
*** 1040,1043 ****
--- 1040,1068 ----
));
+ // get topic if not on home page
+ if( !isset( $HTTP_GET_VARS['topic'] ))
+ {
+ if( isset( $HTTP_GET_VARS['story'] ))
+ {
+ $sid = COM_applyFilter( $HTTP_GET_VARS['story'] );
+ }
+ elseif( isset( $HTTP_GET_VARS['sid'] ))
+ {
+ $sid = COM_applyFilter( $HTTP_GET_VARS['sid'] );
+ }
+ elseif( isset( $HTTP_POST_VARS['story'] ))
+ {
+ $sid = COM_applyFilter( $HTTP_POST_VARS['story'] );
+ }
+ if( !empty( $sid ))
+ {
+ $topic = DB_getItem( $_TABLES['stories'], 'tid', "sid='$sid'" );
+ }
+ }
+ else
+ {
+ $topic = COM_applyFilter( $HTTP_GET_VARS['topic'] );
+ }
+
$pagetitle = '';
if( isset( $_CONF['pagetitle'] ))
***************
*** 1047,1051 ****
if( empty( $pagetitle ))
{
! $pagetitle = $_CONF['site_slogan'];
}
if( !empty( $pagetitle ))
--- 1072,1084 ----
if( empty( $pagetitle ))
{
! if( empty( $topic ))
! {
! $pagetitle = $_CONF['site_slogan'];
! }
! else
! {
! $pagetitle = DB_getItem( $_TABLES['topics'], 'topic',
! "tid = '$topic'" );
! }
}
if( !empty( $pagetitle ))
***************
*** 1147,1173 ****
{
// Now show any blocks -- need to get the topic if not on home page
- if( !isset( $HTTP_GET_VARS['topic'] ))
- {
- if( isset( $HTTP_GET_VARS['story'] ))
- {
- $sid = COM_applyFilter( $HTTP_GET_VARS['story'] );
- }
- elseif( isset( $HTTP_GET_VARS['sid'] ))
- {
- $sid = COM_applyFilter( $HTTP_GET_VARS['sid'] );
- }
- elseif( isset( $HTTP_POST_VARS['story'] ))
- {
- $sid = COM_applyFilter( $HTTP_POST_VARS['story'] );
- }
- if( !empty( $sid ))
- {
- $topic = DB_getItem( $_TABLES['stories'], 'tid', "sid='$sid'" );
- }
- }
- else
- {
- $topic = COM_applyFilter( $HTTP_GET_VARS['topic'] );
- }
$header->set_var( 'geeklog_blocks', COM_showBlocks( 'left', $topic ));
$header->parse( 'left_blocks', 'leftblocks', true );
--- 1180,1183 ----
More information about the geeklog-cvs
mailing list