-
Notifications
You must be signed in to change notification settings - Fork 0
/
news_readme.html
56 lines (49 loc) · 2 KB
/
news_readme.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
<!DOCTYPE html>
<html>
<head>
<title>News Scripting for Wedge</title>
<style>
body {
background-color: white;
color: black;
font: small Verdana, sans-serif;
}
h1 {
font-size: 18pt;
margin: 0;
}
li {
padding-bottom: 2ex;
}
</style>
</head>
<body>
<h1>News Scripting for Wedge</h1>
<br />
<ol>
<li>
Setup the include statement on the page you wish your news to appear on according to the type of file you will be using (either PHP or SHTML.) This example will use PHP.
</li>
<li>
Start with the include to point to SSI.php in your root Wedge folder.<br />
<em>e.g. <?php include('<a href="http://wedge.org/SSI.php">http://wedge.org/SSI.php</a>'); ?></em>
</li>
<li>
Add ?ssi_function=boardNews;board=<em>n</em> to the end of the URL above. Make sure you replace the <em>n</em> with the number of the board you want news to appear from.<br />
<em>e.g. <?php echo file_get_contents('<a href="http://wedge.org/SSI.php?ssi_function=boardNews;board=119">http://wedge.org/SSI.php?ssi_function=boardNews;board=119</a>'); ?></em>
</li>
</ol>
That is all you need to do to get your basic script running. You can add any of the following to the end of that, but make sure you put a semicolon (<strong>;</strong>) between each variable. These variables aren't needed, but provide better versatility.<br />
<dl>
<dt>limit=<em>n</em></dt>
<dd>Limits the amount of news items to show (the default is <em>5</em>.)</dd>
<dt>length=<em>n</em></dt>
<dd>Limits the length of each post to <em>n</em> characters (the default is to impose no limit.)</dd>
<dt>start=<em>n</em></dt>
<dd>Starts the news items at a certain offset. (the default is <em>0</em>)</dd>
</dl>
<em>e.g. <?php echo file_get_contents('<a href="http://wedge.org/SSI.php?ssi_function=boardNews;board=119;limit=7">http://wedge.org/SSI.php?ssi_function=boardNews;board=119;limit=7</a>'); ?></em><br />
<br />
This shows an example of how one might change the limit on the news items.
</body>
</html>