Project

General

Profile

« Previous | Next » 

Revision 853

Added by thorn over 16 years ago

fixed MODI_DATE/PUBLISHED_DATE issue in news-module. Added PUBLISHED_TIME, removed PUBL_DATE,PUBL_TIME. Thanks to forum-member timorotha

View differences:

trunk/CHANGELOG
10 10
# = Bugfix
11 11
! = Update/Change
12 12

  
13
------------------------------------- 2.7.1 -------------------------------------
13
------------------------------------- 2.7.1 -------------------------------------
14
05-Jul-2008 Thomas Hornik
15
# fixed MODI_DATE/PUBLISHED_DATE issue in news-module. Added PUBLISHED_TIME, removed PUBL_DATE,PUBL_TIME. Thanks to forum-member timorotha
14 16
02-Jul-2008 Christian Sommer
15 17
!	updated to latest FCKEditor version 2.6.2
16 18
01-Jul-2008 Thomas Hornik
trunk/wb/modules/news/view.php
178 178
				$post_date = gmdate(DATE_FORMAT, $post['posted_when']+TIMEZONE);
179 179
				$post_time = gmdate(TIME_FORMAT, $post['posted_when']+TIMEZONE);
180 180
				$publ_date = date(DATE_FORMAT,$post['published_when']);
181
				$publ_time = date(TIME_FORMAT,$post['published_when']);
181 182
				// Work-out the post link
182 183
				$post_link = page_link($post['link']);
183 184
				if(isset($_GET['p']) AND $position > 0) {
......
198 199
				$wb->preprocess($short);
199 200
				// Replace vars with values
200 201
				$post_long_len = strlen($post['content_long']);
201
				$vars = array('[PAGE_TITLE]', '[GROUP_ID]', '[GROUP_TITLE]', '[GROUP_IMAGE]', '[DISPLAY_GROUP]', '[DISPLAY_IMAGE]', '[TITLE]', '[SHORT]', '[LINK]', '[MODI_DATE]', '[MODI_TIME]', '[PUBLISHED_DATE]', '[USER_ID]', '[USERNAME]', '[DISPLAY_NAME]', '[EMAIL]', '[TEXT_READ_MORE]');
202
				$vars = array('[PAGE_TITLE]', '[GROUP_ID]', '[GROUP_TITLE]', '[GROUP_IMAGE]', '[DISPLAY_GROUP]', '[DISPLAY_IMAGE]', '[TITLE]', '[SHORT]', '[LINK]', '[MODI_DATE]', '[MODI_TIME]', '[PUBLISHED_DATE]', '[PUBLISHED_TIME]', '[USER_ID]', '[USERNAME]', '[DISPLAY_NAME]', '[EMAIL]', '[TEXT_READ_MORE]');
202 203
				if(isset($users[$uid]['username']) AND $users[$uid]['username'] != '') {
203 204
					if($post_long_len < 9) {
204
						$values = array(PAGE_TITLE, $group_id, $group_title, $group_image, $display_group, $display_image, $post['title'], $short, $post_link, $post_date, $post_time, $publ_date, $uid, $users[$uid]['username'], $users[$uid]['display_name'], $users[$uid]['email'], '');
205
						$values = array(PAGE_TITLE, $group_id, $group_title, $group_image, $display_group, $display_image, $post['title'], $short, $post_link, $post_date, $post_time, $publ_date, $publ_time, $uid, $users[$uid]['username'], $users[$uid]['display_name'], $users[$uid]['email'], '');
205 206
					} else {
206
						$values = array(PAGE_TITLE, $group_id, $group_title, $group_image, $display_group, $display_image, $post['title'], $short, $post_link, $post_date, $post_time, $publ_date, $uid, $users[$uid]['username'], $users[$uid]['display_name'], $users[$uid]['email'], $TEXT['READ_MORE']);
207
						$values = array(PAGE_TITLE, $group_id, $group_title, $group_image, $display_group, $display_image, $post['title'], $short, $post_link, $post_date, $post_time, $publ_date, $publ_time, $uid, $users[$uid]['username'], $users[$uid]['display_name'], $users[$uid]['email'], $TEXT['READ_MORE']);
207 208
					}
208 209
				} else {
209 210
					if($post_long_len < 9) {
210
						$values = array(PAGE_TITLE, $group_id, $group_title, $group_image, $display_group, $display_image, $post['title'], $short, $post_link, $post_date, $post_time, $publ_date, '', '', '', '', '');
211
						$values = array(PAGE_TITLE, $group_id, $group_title, $group_image, $display_group, $display_image, $post['title'], $short, $post_link, $post_date, $post_time, $publ_date, $publ_time, '', '', '', '', '');
211 212
					} else {
212
						$values = array(PAGE_TITLE, $group_id, $group_title, $group_image, $display_group, $display_image, $post['title'], $short, $post_link, $post_date, $post_time, $publ_date, '', '', '', '', $TEXT['READ_MORE']);
213
						$values = array(PAGE_TITLE, $group_id, $group_title, $group_image, $display_group, $display_image, $post['title'], $short, $post_link, $post_date, $post_time, $publ_date, $publ_time, '', '', '', '', $TEXT['READ_MORE']);
213 214
					}
214 215
				}
215 216
				echo str_replace($vars, $values, $setting_post_loop);
......
273 274
			$post_date = gmdate(DATE_FORMAT, $post['posted_when']+TIMEZONE);
274 275
			$post_time = gmdate(TIME_FORMAT, $post['posted_when']+TIMEZONE);
275 276
			$publ_date = date(DATE_FORMAT,$post['published_when']);
277
			$publ_time = date(TIME_FORMAT,$post['published_when']);
276 278
			// Get group id, title, and image
277 279
			$group_id = $post['group_id'];
278 280
			$group_title = $groups[$group_id]['title'];
279 281
			$group_image = $groups[$group_id]['image'];
280 282
			if($group_image == '') { $display_image = 'none'; } else { $display_image = ''; }
281 283
			if($group_id == 0) { $display_group = 'none'; } else { $display_group = ''; }
282
			$vars = array('[PAGE_TITLE]', '[GROUP_ID]', '[GROUP_TITLE]', '[GROUP_IMAGE]', '[DISPLAY_GROUP]', '[DISPLAY_IMAGE]', '[TITLE]', '[SHORT]', '[BACK]', '[MODI_DATE]', '[MODI_TIME]', '[PUBL_DATE]', '[USER_ID]', '[USERNAME]', '[DISPLAY_NAME]', '[EMAIL]');
284
			$vars = array('[PAGE_TITLE]', '[GROUP_ID]', '[GROUP_TITLE]', '[GROUP_IMAGE]', '[DISPLAY_GROUP]', '[DISPLAY_IMAGE]', '[TITLE]', '[SHORT]', '[BACK]', '[MODI_DATE]', '[MODI_TIME]', '[PUBLISHED_DATE]', '[PUBLISHED_TIME]', '[USER_ID]', '[USERNAME]', '[DISPLAY_NAME]', '[EMAIL]');
283 285
			$post_short=$post['content_short'];
284 286
			$wb->preprocess($post_short);
285 287
			if(isset($users[$uid]['username']) AND $users[$uid]['username'] != '') {
286
				$values = array(PAGE_TITLE, $group_id, $group_title, $group_image, $display_group, $display_image, $post['title'], $post_short, $page_link, $post_date, $post_time, $publ_date, $uid, $users[$uid]['username'], $users[$uid]['display_name'], $users[$uid]['email']);
288
				$values = array(PAGE_TITLE, $group_id, $group_title, $group_image, $display_group, $display_image, $post['title'], $post_short, $page_link, $post_date, $post_time, $publ_date, $publ_time, $uid, $users[$uid]['username'], $users[$uid]['display_name'], $users[$uid]['email']);
287 289
			} else {
288
				$values = array(PAGE_TITLE, $group_id, $group_title, $group_image, $display_group, $display_image, $post['title'], $post_short, $page_link, $post_date, $post_time, $publ_date, '', '', '', '');
290
				$values = array(PAGE_TITLE, $group_id, $group_title, $group_image, $display_group, $display_image, $post['title'], $post_short, $page_link, $post_date, $post_time, $publ_date, $publ_time, '', '', '', '');
289 291
			}
290 292
			$post_long = ($post['content_long']);
291 293
		}
trunk/wb/modules/news/add.php
29 29
$header = '<table cellpadding=\"0\" cellspacing=\"0\" border=\"0\" width=\"98%\">';
30 30
$post_loop = '<tr class=\"post_top\">
31 31
<td class=\"post_title\"><a href=\"[LINK]\">[TITLE]</a></td>
32
<td class=\"post_date\">[MODI_TIME], [MODI_DATE]</td>
32
<td class=\"post_date\">[PUBLISHED_TIME], [PUBLISHED_DATE]</td>
33 33
</tr>
34 34
<tr>
35 35
<td class=\"post_short\" colspan=\"2\">
......
51 51
<td rowspan="3" style="display: [DISPLAY_IMAGE]"><img src="[GROUP_IMAGE]" alt="[GROUP_TITLE]" /></td>
52 52
</tr>
53 53
<tr>
54
<td valign="top"><b>Posted by [DISPLAY_NAME] ([USERNAME]) on [PUBL_DATE]</b></td>
54
<td valign="top"><b>Posted by [DISPLAY_NAME] ([USERNAME]) on [PUBLISHED_DATE]</b></td>
55 55
</tr>
56 56
<tr style="display: [DISPLAY_GROUP]">
57 57
<td valign="top"><a href="[BACK]">[PAGE_TITLE]</a> >> <a href="[BACK]?g=[GROUP_ID]">[GROUP_TITLE]</a></td>

Also available in: Unified diff