1
|
<?php
|
2
|
|
3
|
// $Id: add.php 310 2006-02-19 05:31:10Z ryan $
|
4
|
|
5
|
/*
|
6
|
|
7
|
Website Baker Project <http://www.websitebaker.org/>
|
8
|
Copyright (C) 2004-2006, Ryan Djurovich
|
9
|
|
10
|
Website Baker is free software; you can redistribute it and/or modify
|
11
|
it under the terms of the GNU General Public License as published by
|
12
|
the Free Software Foundation; either version 2 of the License, or
|
13
|
(at your option) any later version.
|
14
|
|
15
|
Website Baker is distributed in the hope that it will be useful,
|
16
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
17
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
18
|
GNU General Public License for more details.
|
19
|
|
20
|
You should have received a copy of the GNU General Public License
|
21
|
along with Website Baker; if not, write to the Free Software
|
22
|
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
23
|
|
24
|
*/
|
25
|
|
26
|
// Must include code to stop this file being access directly
|
27
|
if(defined('WB_PATH') == false) { exit("Cannot access this file directly"); }
|
28
|
|
29
|
$header = '<style type=\"text/css\">
|
30
|
.post_title, .post_date { border-bottom: 1px solid #DDDDDD; }
|
31
|
.post_title { font-weight: bold; font-size: 12px; color: #000000; }
|
32
|
.post_date { text-align: right; font-weight: bold; }
|
33
|
.post_short { text-align: justify; padding-bottom: 5px; }
|
34
|
</style>
|
35
|
<table cellpadding=\"0\" cellspacing=\"0\" border=\"0\" width=\"100%\">';
|
36
|
$post_loop = '<tr class=\"post_top\">
|
37
|
<td class=\"post_title\"><a href=\"[LINK]\">[TITLE]</a></td>
|
38
|
<td class=\"post_date\">[TIME], [DATE]</td>
|
39
|
</tr>
|
40
|
<tr>
|
41
|
<td class=\"post_short\" colspan=\"2\">
|
42
|
[SHORT]
|
43
|
<a href=\"[LINK]\">[TEXT_READ_MORE]</a>
|
44
|
</td>
|
45
|
</tr>';
|
46
|
$footer = '</table>
|
47
|
<table cellpadding="0" cellspacing="0" border="0" width="100%" style="display: [DISPLAY_PREVIOUS_NEXT_LINKS]">
|
48
|
<tr>
|
49
|
<td width="35%" align="left">[PREVIOUS_PAGE_LINK]</td>
|
50
|
<td width="30%" align="center">[OF]</td>
|
51
|
<td width="35%" align="right">[NEXT_PAGE_LINK]</td>
|
52
|
</tr>
|
53
|
</table>';
|
54
|
$post_header = addslashes('<table cellpadding="0" cellspacing="0" border="0" width="100%">
|
55
|
<tr>
|
56
|
<td height="30"><h1>[TITLE]</h1></td>
|
57
|
<td rowspan="3" style="display: [DISPLAY_IMAGE]"><img src="[GROUP_IMAGE]" alt="[GROUP_TITLE]" /></td>
|
58
|
</tr>
|
59
|
<tr>
|
60
|
<td valign="top"><b>Posted by [DISPLAY_NAME] ([USERNAME]) on [DATE] at [TIME]</b></td>
|
61
|
</tr>
|
62
|
<tr style="display: [DISPLAY_GROUP]">
|
63
|
<td valign="top"><a href="[BACK]">[PAGE_TITLE]</a> >> <a href="[BACK]?g=[GROUP_ID]">[GROUP_TITLE]</a></td>
|
64
|
</tr>
|
65
|
</table>
|
66
|
<p style="text-align: justify;">');
|
67
|
$post_footer = '</p>
|
68
|
<a href=\"[BACK]\">Back</a>';
|
69
|
$comments_header = addslashes('<br /><br />
|
70
|
<style type="text/css">
|
71
|
.comment_title { font-weight: bold; }
|
72
|
.comment_text { font-weight: bold; background-color: #FDFDFD; border-bottom: 1px solid #DDDDDD; padding-bottom: 15px; }
|
73
|
.comment_title, .comment_text { border-left: 1px solid #DDDDDD; }
|
74
|
.comment_info { text-align: right; border-right: 1px solid #DDDDDD; }
|
75
|
.comment_title, .comment_info { border-top: 1px solid #DDDDDD; background-color: #EEEEEE; }
|
76
|
</style>
|
77
|
<h2>Comments</h2>
|
78
|
<table cellpadding="2" cellspacing="0" border="0" width="100%">');
|
79
|
$comments_loop = addslashes('<tr>
|
80
|
<td class="comment_title">[TITLE]</td>
|
81
|
<td class="comment_info">By [DISPLAY_NAME] on [DATE] at [TIME]</td>
|
82
|
</tr>
|
83
|
<tr>
|
84
|
<td colspan="2" class="comment_text">[COMMENT]</td>
|
85
|
</tr>');
|
86
|
$comments_footer = '</table>
|
87
|
<br /><a href=\"[ADD_COMMENT_URL]\">Add Comment</a>';
|
88
|
$comments_page = '<h1>Comment</h1>
|
89
|
<h2>[POST_TITLE]</h2>
|
90
|
<br />';
|
91
|
$commenting = 'none';
|
92
|
$use_captcha = true;
|
93
|
$database->query("INSERT INTO ".TABLE_PREFIX."mod_news_settings (section_id,page_id,header,post_loop,footer,post_header,post_footer,comments_header,comments_loop,comments_footer,comments_page,commenting,use_captcha) VALUES ('$section_id','$page_id','$header','$post_loop','$footer','$post_header','$post_footer','$comments_header','$comments_loop','$comments_footer','$comments_page','$commenting','$use_captcha')");
|
94
|
|
95
|
?>
|