238 |
238 |
*/
|
239 |
239 |
|
240 |
240 |
// These are the default setting
|
|
241 |
$header = '<table cellpadding=\"0\" cellspacing=\"0\" class=\"loop-header\">'."\n";
|
241 |
242 |
$post_loop = '<tr class=\"post_top\">
|
242 |
243 |
<td class=\"post_title\"><a href=\"[LINK]\">[TITLE]</a></td>
|
243 |
244 |
<td class=\"post_date\">[PUBLISHED_TIME], [PUBLISHED_DATE]</td>
|
244 |
245 |
</tr>
|
245 |
246 |
<tr>
|
246 |
247 |
<td class=\"post_short\" colspan=\"2\">
|
247 |
|
[SHORT]
|
|
248 |
[SHORT]
|
248 |
249 |
<span style=\"visibility:[SHOW_READ_MORE];\"><a href=\"[LINK]\">[TEXT_READ_MORE]</a></span>
|
249 |
250 |
</td>
|
250 |
251 |
</tr>';
|
251 |
|
$post_header = addslashes('<table cellpadding="0" cellspacing="0" border="0" width="98%">
|
|
252 |
$footer = '</table>
|
|
253 |
<table cellpadding="0" cellspacing="0" class="page-header" style="display: [DISPLAY_PREVIOUS_NEXT_LINKS]">
|
252 |
254 |
<tr>
|
253 |
|
<td height="30"><h1>[TITLE]</h1></td>
|
254 |
|
<td rowspan="3" style="display: [DISPLAY_IMAGE]"><img src="[GROUP_IMAGE]" alt="[GROUP_TITLE]" /></td>
|
|
255 |
<td class="page-left">[PREVIOUS_PAGE_LINK]</td>
|
|
256 |
<td class="page-center">[OF]</td>
|
|
257 |
<td class="page-right">[NEXT_PAGE_LINK]</td>
|
255 |
258 |
</tr>
|
|
259 |
</table>';
|
|
260 |
$post_header = addslashes('<table cellpadding="0" cellspacing="0" class="post-header">
|
256 |
261 |
<tr>
|
257 |
|
<td valign="top"><b>[TEXT_POSTED_BY] [DISPLAY_NAME] ([USERNAME]) [TEXT_ON] [PUBLISHED_DATE]</b></td>
|
|
262 |
<td><h1>[TITLE]</h1></td>
|
|
263 |
<td rowspan="3" style="display: [DISPLAY_IMAGE]">[GROUP_IMAGE]</td>
|
258 |
264 |
</tr>
|
|
265 |
<tr>
|
|
266 |
<td class="public-info"><b>[TEXT_POSTED_BY] [DISPLAY_NAME] ([USERNAME]) [TEXT_ON] [PUBLISHED_DATE]</b></td>
|
|
267 |
</tr>
|
259 |
268 |
<tr style="display: [DISPLAY_GROUP]">
|
260 |
|
<td valign="top"><a href="[BACK]">[PAGE_TITLE]</a> >> <a href="[BACK]?g=[GROUP_ID]">[GROUP_TITLE]</a></td>
|
|
269 |
<td class="group-page"><a href="[BACK]">[PAGE_TITLE]</a> >> <a href="[BACK]?g=[GROUP_ID]">[GROUP_TITLE]</a></td>
|
261 |
270 |
</tr>
|
262 |
271 |
</table>');
|
263 |
272 |
$post_footer = '<p>[TEXT_LAST_CHANGED]: [MODI_DATE] [TEXT_AT] [MODI_TIME]</p>
|
264 |
273 |
<a href=\"[BACK]\">[TEXT_BACK]</a>';
|
265 |
274 |
$comments_header = addslashes('<br /><br />
|
266 |
275 |
<h2>[TEXT_COMMENTS]</h2>
|
267 |
|
<table cellpadding="2" cellspacing="0" border="0" width="98%">');
|
|
276 |
<table cellpadding="2" cellspacing="0" class="comment-header">');
|
268 |
277 |
$comments_loop = addslashes('<tr>
|
269 |
278 |
<td class="comment_title">[TITLE]</td>
|
270 |
279 |
<td class="comment_info">[TEXT_BY] [DISPLAY_NAME] [TEXT_ON] [DATE] [TEXT_AT] [TIME]</td>
|
... | ... | |
286 |
295 |
echo "<br /><u>Add default settings to database for news section_id= ".$result['section_id']."</u><br />";
|
287 |
296 |
$section_id = $result['section_id'];
|
288 |
297 |
|
|
298 |
if($database->query("UPDATE `".TABLE_PREFIX."mod_news_settings` SET `header` = '$header' WHERE `section_id` = $section_id")) {
|
|
299 |
echo 'Database data header added successfully';
|
|
300 |
}
|
|
301 |
echo mysql_error().'<br />';
|
|
302 |
|
289 |
303 |
if($database->query("UPDATE `".TABLE_PREFIX."mod_news_settings` SET `post_loop` = '$post_loop' WHERE `section_id` = $section_id")) {
|
290 |
304 |
echo 'Database data post_loop added successfully';
|
291 |
305 |
}
|
292 |
306 |
echo mysql_error().'<br />';
|
293 |
307 |
|
|
308 |
if($database->query("UPDATE `".TABLE_PREFIX."mod_news_settings` SET `footer` = '$footer' WHERE `section_id` = $section_id")) {
|
|
309 |
echo 'Database data footer added successfully';
|
|
310 |
}
|
|
311 |
echo mysql_error().'<br />';
|
|
312 |
|
294 |
313 |
if($database->query("UPDATE `".TABLE_PREFIX."mod_news_settings` SET `post_header` = '$post_header' WHERE `section_id` = $section_id")) {
|
295 |
314 |
echo 'Database data post_header added successfully';
|
296 |
315 |
}
|
Updated upgrade_script to make use of the changed news settings