· 10 years ago · Mar 20, 2016, 02:06 AM
1<?php
2error_reporting(7);
3
4require("includes/getglobals.php");
5
6$version = "1.0.4 Pro";
7
8if (function_exists("set_time_limit") == 1) {
9 @set_time_limit(1200);
10}
11
12if (($step != "writeconfig") & ($step != "confirmempty") & ($step != "empty")) {
13 settype($step,"integer");
14}
15
16if (!$step) {
17 $step = 1;
18}
19
20function undoescapetext($string="") {
21 $string = str_replace("||| ||","|||||",$string);
22 $string = substr($string,1,-1);
23
24 return $string;
25}
26
27?>
28<html>
29<head>
30<title>Install VirtuaNews <?php echo $version?></title>
31
32<script language="javascript">
33<!--
34function confirmempty() {
35 if (confirm("You are about to clear ALL the contents from your database,\nthis is NOT reversable and you will loose EVERYTHING including any forum tables\n\nAre you sure?")) {
36 if (confirm("You have chosen to clear your ENTIRE MySQL database.\nVirtuaNews can hold no responsibility\nfor any loss of data incurred as a result of performing this action.\n\nDo you agree to these terms?")) {
37 return true;
38 } else {
39 return false;
40 }
41 } else {
42 return false;
43 }
44}
45-->
46</script>
47
48<link rel="StyleSheet" href="admin/style.css" type="text/css">
49</head>
50<body>
51<table cellspacing="0" cellpadding="2" class="header">
52 <tr>
53 <td class="header">Welcome to the VirtuaNews <?php echo $version; ?> install process</td>
54 </tr>
55</table>
56<table cellpadding="2" cellspacing="0" class="main">
57<?
58
59if ($step == "1") {
60
61 echo " <tr>\n <td>Running this install script will do a clean install of VirtuaNews on your server</td>\n </tr>\n";
62
63 $perm_check_dir[] = "static";
64 $perm_check_dir[] = "static/sub_pages";
65 $perm_check_dir[] = "static/comment";
66 $perm_check_dir[] = "static/index";
67 $perm_check_dir[] = "static/polls";
68 $perm_check_dir[] = "pages/default";
69 $perm_check_dir[] = "pages/default/mod";
70 $perm_check_dir[] = "pages/user";
71 $perm_check_dir[] = "pages/user/mod";
72
73 foreach ($perm_check_dir AS $dir) {
74
75 $canwrite = @is_writeable($dir);
76
77 if (!$canwrite) {
78 if (!@chmod($dir,0773)) {
79 echo " <tr>\n <td>Error cannot write to $dir directory and cannot change the permissions of it. You must set the file permissions to allow writing, usually chmod(0777). Please do this then refresh the page</td>\n </tr>\n";
80 $error = 1;
81 }
82 }
83 }
84
85 if (!$error) {
86 echo " <tr>\n <td>Click <a href=\"install.php?step=2\">here</a> to continue</td>\n </tr>\n";
87 }
88
89}
90
91if ($step == "2") {
92
93 $fileexists = @file_exists("admin/config.php");
94
95 $canwrite = @fopen("admin/config.php","a");
96 @fclose($canwrite);
97
98 if (!$fileexists & !$canwrite) {
99?>
100 <tr>
101 <td>Cannot find config.php file and cannot create one</td>
102 </tr>
103 <tr>
104 <td>You must ensure you have uploaded this file to the admin directory and it looks something like this:</td>
105 </tr>
106 <tr>
107 <td>
108 <textarea cols="80" rows="15" class="form" readonly="readonly"><?php
109// type of database running
110// (only mysql is supported at the moment)
111$dbservertype = "mysql";
112
113// hostname or ip of server
114$servername = "localhost";
115
116// username and password to log onto db server
117$dbusername = "root";
118$dbpassword = "";
119
120// name of database
121$dbname = "virtuanews";
122
123// technical email address, to specify multiple emails seperate each one with a space
124$technicalemail = "webmaster@yourhost.com";
125
126// set the staff ids for the users which can prune the admin log
127// enter a single id, or a string of ids seperated by a , eg. "1,5,7"
128$canprunelog = "1";
129
130// 0 shows no debug info
131// 1 allows creation times to be viewed by adding showqueries=1 onto the query string,
132// also displays the time in the admin panel
133// 2 allows sql queries to be viewed also by adding showqueries=1 onto the query string
134$debug = 1;
135
136// If you have a problem having the directory /admin/ on your server then change this variable below
137// Please ensure you do not have a / as the first or that last character
138// You must also edit the file admin/toggle.js to replace admin/ with whatever you want
139// Also, you MUST edit global.php and admin.php and edit the line saying require("admin/config.php");
140// to point it to this file
141$admindirectory = "admin";
142
143?>
144 </textarea>
145 </td>
146 </tr>
147<?php
148 }
149
150 if (!$fileexists & ($canwrite != 0)) {
151 ?>
152 <tr>
153 <td>Cannot find config.php file, going to create one now</td>
154 </tr>
155 <tr>
156 <td>Please confirm the details below</td>
157 </tr>
158 <tr>
159 <td>
160 <form action="install.php" method="post" name="form">
161 <input type="hidden" name="step" value="writeconfig">
162 <table width="50%" cellpadding="5" cellspacing="0">
163 <tr>
164 <td>Database Server Type:</td>
165 <td><input type="text" name="dbservertype" value="mysql" class="form" size="40"></td>
166 </tr>
167 <tr>
168 <td>Database Hostname Or IP:</td>
169 <td><input type="text" name="dbservername" value="localhost" class="form" size="40"></td>
170 </tr>
171 <tr>
172 <td>Database Username:</td>
173 <td><input type="text" name="dbusername" value="root" class="form" size="40"></td>
174 </tr>
175 <tr>
176 <td>Database Password:</td>
177 <td><input type="text" name="dbpassword" value="" class="form" size="40"></td>
178 </tr>
179 <tr>
180 <td>Database Name:</td>
181 <td><input type="text" name="dbname" value="VirtuaNews" class="form" size="40"></td>
182 </tr>
183 <tr>
184 <td>Technical Email:<br>Seperate multiple emails with a space</td>
185 <td><input type="text" name="technicalemail" value="webmaster@<?php echo $SERVER_NAME?>" class="form" size="40"></td>
186 </tr>
187 <tr>
188 <td colspan="2"><input type="submit" name="submit" value="Submit" class="form"> <input type="reset" name="reset" value="Reset" class="form"></td>
189 </tr>
190 </table>
191 </form>
192 </td>
193 </tr>
194<?php
195 }
196
197 if ($fileexists & !$canwrite) {
198 include("admin/config.php");
199?>
200 <tr>
201 <td>Please confirm the details below, only continue if they are correct</td>
202 </tr>
203 <tr>
204 <td>
205 <table width="50%" cellpadding="5" cellspacing="0">
206 <tr>
207 <td>Database Server Type:</td>
208 <td><?php echo $dbservertype?></td>
209 </tr>
210 <tr>
211 <td>Database Hostname Or IP:</td>
212 <td><?php echo $dbservername?></td>
213 </tr>
214 <tr>
215 <td>Database Username:</td>
216 <td><?php echo $dbusername?></td>
217 </tr>
218 <tr>
219 <td>Database Password:</td>
220 <td><?php echo $dbpassword?></td>
221 </tr>
222 <tr>
223 <td>Database Name:</td>
224 <td><?php echo $dbname?></td>
225 </tr>
226 <tr>
227 <td>Technical Email:</td>
228 <td><?php echo $technicalemail?></td>
229 </tr>
230 <tr>
231 <td colspan="2">Click <a href="install.php?step=3">here</a> to continue</td>
232 </tr>
233 </table>
234 </form>
235 </td>
236 </tr>
237<?php
238 }
239
240 if ($fileexists & ($canwrite != 0)) {
241 include("admin/config.php");
242?>
243 <tr>
244 <td>Please confirm the details below</td>
245 </tr>
246 <tr>
247 <td>
248 <form action="install.php" method="post" name="form">
249 <input type="hidden" name="step" value="writeconfig">
250 <table width="50%" cellpadding="5" cellspacing="0">
251 <tr>
252 <td>Database Server Type:</td>
253 <td><input type="text" name="dbservertype" value="<?php echo $dbservertype?>" class="form" size="40"></td>
254 </tr>
255 <tr>
256 <td>Database Hostname Or IP:</td>
257 <td><input type="text" name="dbservername" value="<?php echo $dbservername?>" class="form" size="40"></td>
258 </tr>
259 <tr>
260 <td>Database Username:</td>
261 <td><input type="text" name="dbusername" value="<?php echo $dbusername?>" class="form" size="40"></td>
262 </tr>
263 <tr>
264 <td>Database Password:</td>
265 <td><input type="text" name="dbpassword" value="<?php echo $dbpassword?>" class="form" size="40"></td>
266 </tr>
267 <tr>
268 <td>Database Name:</td>
269 <td><input type="text" name="dbname" value="<?php echo $dbname?>" class="form" size="40"></td>
270 </tr>
271 <tr>
272 <td>Technical Email:<br>Seperate multiple emails with a space</td>
273 <td><input type="text" name="technicalemail" value="<?php echo $technicalemail?>" class="form" size="40"></td>
274 </tr>
275 <tr>
276 <td colspan="2"><input type="submit" name="submit" value="Submit" class="form"> <input type="reset" name="reset" value="Reset" class="form"></td>
277 </tr>
278 </table>
279 </form>
280 </td>
281 </tr>
282<?php
283 }
284
285}
286
287if ($step == "writeconfig") {
288
289 $dbservertype = strtolower($dbservertype);
290
291 $configfile = "<"."?php
292// type of database running
293// (only mysql is supported at the moment)
294\$dbservertype = \"$dbservertype\";
295
296// hostname or ip of server
297\$dbservername = \"$dbservername\";
298
299// username and password to log onto db server
300\$dbusername = \"$dbusername\";
301\$dbpassword = \"$dbpassword\";
302
303// name of database
304\$dbname = \"$dbname\";
305
306// technical email address, to specify multiple emails seperate each one with a space
307\$technicalemail = \"$technicalemail\";
308
309// set the staff ids for the users which can prune the admin log
310// enter a single id, or a string of ids seperated by a , eg. \"1,5,7\"
311\$canprunelog = \"1\";
312
313// 0 shows no debug info
314// 1 allows creation times to be viewed by adding showqueries=1 onto the query string,
315// also displays the time in the admin panel
316// 2 allows sql queries to be viewed also by adding showqueries=1 onto the query string
317\$debug = 1;
318
319// If you have a problem having the directory /admin/ on your server then change this variable below
320// Please ensure you do not have a / as the first or that last character
321// You must also edit the file admin/toggle.js to replace admin/ with whatever you want
322// Also, you MUST edit global.php and admin.php and edit the line saying require(\"admin/config.php\");
323// to point it to this file
324\$admindirectory = \"admin\";
325
326?>";
327
328 $file = fopen("admin/config.php","w");
329 fwrite($file,$configfile);
330 $file = fclose($file);
331
332 $step = 3;
333
334}
335
336if ($step == 3) {
337
338 include("admin/config.php");
339 include("includes/db_$dbservertype.php");
340
341 $db = vn_connect(0);
342
343 if (geterrno() == 1049) {
344
345 echo " <tr>\n <td>Database Not Real, trying to create one now..</td>\n </tr>\n";
346 query("CREATE DATABASE $dbname",0);
347 if (geterrno() != 0) {
348 echo " <tr>\n <td>Unable to create database:<br>Error Number: ".geterrno()."<br>Error Description: ".geterrordesc()."</td>\n </tr>\n";
349 echo " <tr>\n <td>Please create it manually or contact your system administrator for help</td>\n </tr>\n";
350 } else {
351 echo " <tr>\n <td>Database now created</td>\n </tr>\n";
352 echo " <tr>\n <td>Click <a href=\"install.php?step=4\">here</a> to continue</td>\n </tr>\n";
353 }
354
355 } elseif (geterrno() == 0) {
356
357 echo " <tr>\n <td>Connect succeeded, database already exists, checking for database contents....</td>\n </tr>\n";
358
359 $gettables = query("SHOW TABLES");
360
361 if (countrows($gettables)) {
362 echo " <tr>\n <td>The database exists, however it is NOT empty</td>\n </tr>\n";
363 echo " <tr>\n <td>If you would like to empty the database please click <a href=\"install.php?step=confirmempty\" onclick=\"return confirmempty()\">here</a>. <font class=\"red\">THIS WILL UNCONDITIONALLY ERASE ALL THE DATE FROM YOUR DATABASE. DO NOT DO THIS IF YOU PLAN TO USE A FORUM FOR YOUR USER TABLES.</font></td>\n </tr>\n";
364 echo " <tr>\n <td>Click <a href=\"install.php?step=4\">here</a> to continue to the next step if you wish to leave your database intact</td>\n </tr>\n";
365 } else {
366 echo " <tr>\n <td>The database exists and is empty</td>\n </tr>\n";
367 echo " <tr>\n <td>Click <a href=\"install.php?step=4\">here</a> to continue</td>\n </tr>\n";
368 }
369
370 } else {
371 echo " <tr>\n <td>Unable to conntect to server:<br>Error Number: ".geterrno()."<br>Error Description: ".geterrordesc()."</td>\n </tr>\n";
372 echo " <tr>\n <td>Please go back and check the details in config.php and try again. Click <a href=\"http://www.virtuanews.co.uk\">here</a> to go to the VirtuaNews website</td>\n </tr>\n";
373 }
374
375}
376
377if ($step == "confirmempty") {
378 echo " <tr>\n <td><font class=\"red\">YOU ARE ABOUT TO DELETE ALL THE DATA FROM YOUR DATABASE. VIRTUANEWS CANNOT BE HELD RESPONSABLE FOR ANY LOSS OF DATA CAUSED BY THIS ACTION. DO NOT DO THIS IF YOU PLAN TO USE YOUR FORUM FOR YOUR USER TABLES.</font></td>\n </tr>\n";
379 echo " <tr>\n <td>If you agree to these terms then please click <a href=\"install.php?step=empty&agree=1\" onclick=\"return confirmempty()\">here</a> otherwise click <a href=\"install.php?step=4\">here</a> to continue to the next step without erasing your data.</td>\n </tr>\n";
380}
381
382if (($step == "empty") & ($agree == 1)) {
383 include("admin/config.php");
384 include("includes/db_$dbservertype.php");
385 $db = vn_connect();
386 $gettables = query("SHOW TABLES");
387
388 while ($table_arr = fetch_array($gettables)) {
389 $query[$table_arr[0]] = "DROP TABLE $table_arr[0]";
390 }
391
392 echo " <tr>\n <td>VirtuaNews is wiping your database:</tr>\n";
393
394 foreach ($query AS $table_name => $query_text) {
395 query($query_text,0);
396 if (geterrno() == 0) {
397 echo " <tr>\n <td>Deleting Table: $table_name</td>\n </tr>\n";
398 } else {
399 echo " <tr>\n <td>Error Deleting Table: $table_name<br>Error Number: ".geterrno()."<br>Error Description: ".geterrordesc()."</td>\n </tr>\n";
400 $error = 1;
401 }
402 }
403
404 if ($error) {
405 echo " <tr>\n <td>There has been an error deleting one or more of the tables. Please examine this error and only continue if you are sure it will not effect the install process. Click <a href=\"install.php?step=4\">here</a> to continue or <a href=\"http://www.virtuanews.co.uk\">here</a> to go to the VirtuaNews website</td>\n </tr>\n";
406 } else {
407 echo " <tr>\n <td>All tables are deleted, please click <a href=\"install.php?step=4\">here</a> to continue</tr>\n";
408 }
409}
410
411if ($step > 3) {
412 include("admin/config.php");
413 include("includes/db_$dbservertype.php");
414 $db = vn_connect();
415}
416
417if ($step == 4) {
418
419 $query[news_activation] = "CREATE TABLE news_activation (
420 id INT(10) NOT NULL auto_increment,
421 userid INT(10) DEFAULT '0' NOT NULL,
422 date INT(10) DEFAULT '' NOT NULL,
423 activateid INT(10) UNSIGNED DEFAULT '0' NOT NULL,
424 type TINYINT(1) DEFAULT '1' NOT NULL,
425 PRIMARY KEY (id))";
426
427 $query[news_adminlog] = "CREATE TABLE news_adminlog (
428 id INT(10) UNSIGNED NOT NULL auto_increment,
429 staffid SMALLINT(5) DEFAULT '0' NOT NULL,
430 time INT(10) DEFAULT '' NOT NULL,
431 script VARCHAR(20) DEFAULT '' NOT NULL,
432 action VARCHAR(20) DEFAULT '' NOT NULL,
433 extrainfo VARCHAR(200) DEFAULT '' NOT NULL,
434 ipaddress VARCHAR(15) DEFAULT '' NOT NULL,
435 PRIMARY KEY (id))";
436
437 $query[news_announcement] = "CREATE TABLE news_announcement (
438 catid SMALLINT(5) DEFAULT '0' NOT NULL,
439 content MEDIUMTEXT DEFAULT '' NOT NULL,
440 image VARCHAR(255) DEFAULT '' NOT NULL,
441 link VARCHAR(255) DEFAULT '' NOT NULL,
442 PRIMARY KEY (catid))";
443
444 $query[news_article] = "CREATE TABLE news_article (
445 id SMALLINT(5) NOT NULL auto_increment,
446 date INT(10) DEFAULT '' NOT NULL,
447 title VARCHAR(255) DEFAULT '' NOT NULL,
448 staffid SMALLINT(5) DEFAULT '0' NOT NULL,
449 authorname VARCHAR(255) DEFAULT '' NOT NULL,
450 numpages SMALLINT(2) DEFAULT '' NOT NULL,
451 views INT(10) DEFAULT '' NOT NULL,
452 rating FLOAT DEFAULT '' NOT NULL,
453 page1 MEDIUMTEXT DEFAULT '' NOT NULL,
454 page2 MEDIUMTEXT DEFAULT '' NOT NULL,
455 page3 MEDIUMTEXT DEFAULT '' NOT NULL,
456 page4 MEDIUMTEXT DEFAULT '' NOT NULL,
457 page5 MEDIUMTEXT DEFAULT '' NOT NULL,
458 page6 MEDIUMTEXT DEFAULT '' NOT NULL,
459 page7 MEDIUMTEXT DEFAULT '' NOT NULL,
460 page8 MEDIUMTEXT DEFAULT '' NOT NULL,
461 page9 MEDIUMTEXT DEFAULT '' NOT NULL,
462 page10 MEDIUMTEXT DEFAULT '' NOT NULL,
463 catid SMALLINT(5) DEFAULT '0' NOT NULL,
464 parsenewline TINYINT(1) DEFAULT '1' NOT NULL,
465 display SMALLINT(1) DEFAULT '1' NOT NULL,
466 PRIMARY KEY (id))";
467
468 $query[news_articlecat] = "CREATE TABLE news_articlecat (
469 id SMALLINT(5) NOT NULL auto_increment,
470 title VARCHAR(255) DEFAULT '' NOT NULL,
471 description MEDIUMTEXT DEFAULT '' NOT NULL,
472 parentid SMALLINT(5) DEFAULT '0' NOT NULL,
473 children SMALLINT(5) DEFAULT '0' NOT NULL,
474 numarticles SMALLINT(5) DEFAULT '0' NOT NULL,
475 displayorder SMALLINT(4) DEFAULT '0' NOT NULL,
476 display SMALLINT(1) DEFAULT '1' NOT NULL,
477 PRIMARY KEY (id))";
478
479 $query[news_articlevote] = "CREATE TABLE news_articlevote (
480 id INT(10) UNSIGNED NOT NULL auto_increment,
481 articleid INT(10) DEFAULT '0' NOT NULL,
482 userid INT(10) DEFAULT '0' NOT NULL,
483 votedate INT(10) DEFAULT '' NOT NULL,
484 voteoption INT(10) DEFAULT '' NOT NULL,
485 PRIMARY KEY (id))";
486
487 $query[news_category] = "CREATE TABLE news_category (
488 id SMALLINT(5) NOT NULL auto_increment,
489 parentid SMALLINT(5) DEFAULT '' NOT NULL,
490 children SMALLINT(5) DEFAULT '' NOT NULL,
491 name VARCHAR(255) NOT NULL,
492 description MEDIUMTEXT NOT NULL,
493 image VARCHAR(255) NOT NULL,
494 posts SMALLINT(5) DEFAULT '' NOT NULL,
495 allowcomments TINYINT(1) DEFAULT '' NOT NULL,
496 allowview TINYINT(1) DEFAULT '' NOT NULL,
497 showsitestats TINYINT(1) DEFAULT '' NOT NULL,
498 showforumstats TINYINT(1) DEFAULT '' NOT NULL,
499 showforumoptions TINYINT(1) DEFAULT '' NOT NULL,
500 showpoll TINYINT(1) DEFAULT '' NOT NULL,
501 showannouncement TINYINT(1) DEFAULT '' NOT NULL,
502 showsubcats TINYINT(1) DEFAULT '' NOT NULL,
503 defaulttheme SMALLINT(5) DEFAULT '' NOT NULL,
504 forcetheme TINYINT(1) DEFAULT '' NOT NULL,
505 recentpost VARCHAR(255) NOT NULL,
506 display TINYINT(1) DEFAULT '' NOT NULL,
507 displayorder SMALLINT(5) DEFAULT '' NOT NULL,
508 displaymain TINYINT(1) DEFAULT '' NOT NULL,
509 pollid SMALLINT(5) NOT NULL,
510 PRIMARY KEY (id),
511 KEY displayorder (displayorder))";
512
513 $query[news_comment] = "CREATE TABLE news_comment (
514 id INT(10) UNSIGNED NOT NULL auto_increment,
515 newsid SMALLINT(5) DEFAULT '' NOT NULL,
516 username VARCHAR(255) NOT NULL,
517 userid SMALLINT(5) UNSIGNED DEFAULT '' NOT NULL,
518 useremail VARCHAR(255),
519 ip VARCHAR(15),
520 comment MEDIUMTEXT NOT NULL,
521 showsig TINYINT(1) DEFAULT '' NOT NULL,
522 time INT(10) DEFAULT '' NOT NULL,
523 parentid INT(10) DEFAULT '' NOT NULL,
524 editlock TINYINT(1) DEFAULT '' NOT NULL,
525 edituserid SMALLINT(5) UNSIGNED DEFAULT '' NOT NULL,
526 editdate INT(10) DEFAULT '' NOT NULL,
527 PRIMARY KEY (id),
528 KEY userid (userid),
529 KEY newsid (newsid,time))";
530
531 $query[news_hit] = "CREATE TABLE news_hit (
532 time INT(10) DEFAULT '' NOT NULL,
533 ip VARCHAR(20) NOT NULL,
534 browser VARCHAR(15) NOT NULL,
535 os VARCHAR(15) NOT NULL,
536 location VARCHAR(255) NOT NULL,
537 PRIMARY KEY (ip)
538 ) TYPE=HEAP";
539
540 $query[news_module] = "CREATE TABLE news_module (
541 id MEDIUMINT(5) NOT NULL auto_increment,
542 name VARCHAR(255) NOT NULL,
543 text VARCHAR(255) NOT NULL,
544 description MEDIUMTEXT,
545 version VARCHAR(255),
546 templates MEDIUMTEXT,
547 table_list MEDIUMTEXT,
548 display TINYINT(1) DEFAULT '' NOT NULL,
549 enable TINYINT(1) DEFAULT '' NOT NULL,
550 options MEDIUMTEXT,
551 PRIMARY KEY (id))";
552
553 $query[news_news] = "CREATE TABLE news_news (
554 id INT(10) UNSIGNED NOT NULL auto_increment,
555 catid SMALLINT(5) DEFAULT '' NOT NULL,
556 title VARCHAR(255) NOT NULL,
557 mainnews MEDIUMTEXT NOT NULL,
558 extendednews MEDIUMTEXT NOT NULL,
559 logoimage VARCHAR(50),
560 logoimageborder SMALLINT(1) DEFAULT '' NOT NULL,
561 commentcount SMALLINT(5) DEFAULT '' NOT NULL,
562 lastcommentuser VARCHAR(255),
563 time INT(11) DEFAULT '' NOT NULL,
564 staffid SMALLINT(5) DEFAULT '' NOT NULL,
565 stickypost TINYINT(1) DEFAULT '' NOT NULL,
566 parsenewline TINYINT(1) DEFAULT '' NOT NULL,
567 program SMALLINT(1) DEFAULT '' NOT NULL,
568 display SMALLINT(1) DEFAULT '' NOT NULL,
569 allowcomments SMALLINT(1) DEFAULT '' NOT NULL,
570 editstaffid SMALLINT(5) DEFAULT '' NOT NULL,
571 editdate INT(10) DEFAULT '' NOT NULL,
572 PRIMARY KEY (id),
573 KEY catid (catid),
574 KEY program (program),
575 KEY staffid (staffid))";
576
577 $query[news_option] = "CREATE TABLE news_option (
578 id SMALLINT(5) NOT NULL auto_increment,
579 optiongroup VARCHAR(100),
580 varname VARCHAR(100) NOT NULL,
581 value TEXT NOT NULL,
582 title VARCHAR(100),
583 description MEDIUMTEXT,
584 code MEDIUMTEXT,
585 PRIMARY KEY (id))";
586
587 $query[news_page] = "CREATE TABLE news_page (
588 id SMALLINT(5) NOT NULL auto_increment,
589 pagesetid SMALLINT(4) DEFAULT '' NOT NULL,
590 title VARCHAR(255) NOT NULL,
591 description MEDIUMTEXT,
592 onserver TINYINT(1) DEFAULT '' NOT NULL,
593 PRIMARY KEY (id))";
594
595 $query[news_pageset] = "CREATE TABLE news_pageset (
596 id SMALLINT(5) NOT NULL auto_increment,
597 title VARCHAR(255) NOT NULL,
598 PRIMARY KEY (id))";
599
600 $query[news_pm] = "CREATE TABLE news_pm (
601 id SMALLINT(5) UNSIGNED NOT NULL auto_increment,
602 fromuserid SMALLINT(5) UNSIGNED DEFAULT '' NOT NULL,
603 touserid SMALLINT(5) UNSIGNED DEFAULT '' NOT NULL,
604 folder TINYINT(1) DEFAULT '' NOT NULL,
605 senddate INT(10) DEFAULT '' NOT NULL,
606 readdate INT(10) DEFAULT '' NOT NULL,
607 subject VARCHAR(255) NOT NULL,
608 message MEDIUMTEXT NOT NULL,
609 showsig TINYINT(1) DEFAULT '' NOT NULL,
610 copyid SMALLINT(5) UNSIGNED DEFAULT '' NOT NULL,
611 PRIMARY KEY (id))";
612
613 $query[news_poll] = "CREATE TABLE news_poll (
614 id SMALLINT(5) NOT NULL auto_increment,
615 question VARCHAR(255) NOT NULL,
616 option1 VARCHAR(255) NOT NULL,
617 option2 VARCHAR(255) NOT NULL,
618 option3 VARCHAR(255),
619 option4 VARCHAR(255),
620 option5 VARCHAR(255),
621 option6 VARCHAR(255),
622 option7 VARCHAR(255),
623 option8 VARCHAR(255),
624 option9 VARCHAR(255),
625 option10 VARCHAR(255),
626 totalvotes SMALLINT(5) DEFAULT '' NOT NULL,
627 votes VARCHAR(255) NOT NULL,
628 display VARCHAR(255) NOT NULL,
629 PRIMARY KEY (id))";
630
631 $query[news_pollvote] = "CREATE TABLE news_pollvote (
632 id INT(10) UNSIGNED NOT NULL auto_increment,
633 pollid INT(10) DEFAULT '' NOT NULL,
634 userid INT(10) DEFAULT '' NOT NULL,
635 votedate INT(10) DEFAULT '' NOT NULL,
636 voteoption INT(10) DEFAULT '' NOT NULL,
637 PRIMARY KEY (id),
638 KEY pollid (pollid,userid))";
639
640 $query[news_profilefield] = "CREATE TABLE news_profilefield (
641 id SMALLINT(5) NOT NULL auto_increment,
642 title VARCHAR(255) NOT NULL,
643 description MEDIUMTEXT NOT NULL,
644 required TINYINT(1) DEFAULT '' NOT NULL,
645 hidden TINYINT(1) DEFAULT '' NOT NULL,
646 editable TINYINT(1) DEFAULT '' NOT NULL,
647 displayorder SMALLINT(5) DEFAULT '' NOT NULL,
648 maxlength SMALLINT(5) DEFAULT '' NOT NULL,
649 size SMALLINT(5) DEFAULT '' NOT NULL,
650 PRIMARY KEY (id))";
651
652 $query[news_referer] = "CREATE TABLE news_referer (
653 name varchar(255) NOT NULL default '',
654 value int(10) unsigned NOT NULL default '0',
655 PRIMARY KEY (name))";
656
657 $query[news_smilie] = "CREATE TABLE news_smilie (
658 id SMALLINT(5) UNSIGNED NOT NULL auto_increment,
659 title CHAR(100) NOT NULL,
660 smilietext CHAR(100) NOT NULL,
661 smiliepath CHAR(100) NOT NULL,
662 PRIMARY KEY (id))";
663
664 $query[news_staff] = "CREATE TABLE news_staff (
665 id SMALLINT(5) NOT NULL auto_increment,
666 userid MEDIUMINT(8) UNSIGNED DEFAULT '' NOT NULL,
667 job VARCHAR(100) NOT NULL,
668 newsposts SMALLINT(5) DEFAULT '' NOT NULL,
669 caneditallnews SMALLINT(1) DEFAULT '' NOT NULL,
670 caneditallcomments SMALLINT(1) DEFAULT '' NOT NULL,
671 canmakesticky TINYINT(1) DEFAULT '' NOT NULL,
672 caneditusers TINYINT(1) DEFAULT '' NOT NULL,
673 caneditprofilefields TINYINT(1) DEFAULT '' NOT NULL,
674 caneditstaff SMALLINT(1) DEFAULT '' NOT NULL,
675 caneditcategories SMALLINT(1) DEFAULT '' NOT NULL,
676 caneditarticles TINYINT(1) DEFAULT '' NOT NULL,
677 caneditsmilies TINYINT(1) DEFAULT '' NOT NULL,
678 caneditpolls SMALLINT(1) DEFAULT '' NOT NULL,
679 candeletelogos TINYINT(1) DEFAULT '' NOT NULL,
680 caneditmodules TINYINT(1) DEFAULT '' NOT NULL,
681 caneditthemes SMALLINT(1) DEFAULT '' NOT NULL,
682 caneditoptions TINYINT(1) DEFAULT '' NOT NULL,
683 canmaintaindb TINYINT(1) DEFAULT '' NOT NULL,
684 canviewlog SMALLINT(1) DEFAULT '' NOT NULL,
685 canpost_1 SMALLINT(1) DEFAULT '' NOT NULL,
686 PRIMARY KEY (id),
687 KEY userid (userid))";
688
689 $query[news_stats] = "CREATE TABLE news_stats (
690 lastupdate int(10) unsigned NOT NULL default '0',
691 uniquestotal int(10) unsigned NOT NULL default '0',
692 uniquestoday int(10) unsigned NOT NULL default '0',
693 maxusersonline int(10) unsigned NOT NULL default '0')";
694
695 $query[news_style] = "CREATE TABLE news_style (
696 id SMALLINT(5) NOT NULL auto_increment,
697 stylesetid SMALLINT(5) DEFAULT '0' NOT NULL,
698 varname TEXT DEFAULT '' NOT NULL,
699 value TEXT DEFAULT '' NOT NULL,
700 PRIMARY KEY (id),
701 KEY stylesetid (stylesetid))";
702
703 $query[news_styleset] = "CREATE TABLE news_styleset (
704 id SMALLINT(5) NOT NULL auto_increment,
705 title VARCHAR(255) DEFAULT '' NOT NULL,
706 PRIMARY KEY (id))";
707
708 $query[news_subscribe] = "CREATE TABLE news_subscribe (
709 id MEDIUMINT(10) NOT NULL auto_increment,
710 newsid MEDIUMINT(10) DEFAULT '' NOT NULL,
711 userid MEDIUMINT(10) DEFAULT '' NOT NULL,
712 lastview INT(10) DEFAULT '' NOT NULL,
713 emailupdate TINYINT(1) DEFAULT '' NOT NULL,
714 PRIMARY KEY (id),
715 KEY newsid (newsid,userid))";
716
717 $query[news_theme] = "CREATE TABLE news_theme (
718 id SMALLINT(5) NOT NULL auto_increment,
719 title VARCHAR(255) DEFAULT '' NOT NULL,
720 pagesetid SMALLINT(5) DEFAULT '0' NOT NULL,
721 stylesetid SMALLINT(5) DEFAULT '0' NOT NULL,
722 allowselect TINYINT(1) DEFAULT '1' NOT NULL,
723 PRIMARY KEY (id))";
724
725 $query[news_user] = "CREATE TABLE news_user (
726 userid INT(10) UNSIGNED NOT NULL auto_increment,
727 username VARCHAR(50) NOT NULL,
728 password VARCHAR(50) NOT NULL,
729 email VARCHAR(50) NOT NULL,
730 showemail TINYINT(1) DEFAULT '' NOT NULL,
731 homepage VARCHAR(100) NOT NULL,
732 icq VARCHAR(20) NOT NULL,
733 aim VARCHAR(20) NOT NULL,
734 yahoo VARCHAR(20) NOT NULL,
735 signature MEDIUMTEXT NOT NULL,
736 activated TINYINT(1) DEFAULT '' NOT NULL,
737 moderated TINYINT(1) DEFAULT '' NOT NULL,
738 joindate INT(10) DEFAULT '' NOT NULL,
739 posts SMALLINT(5) UNSIGNED DEFAULT '' NOT NULL,
740 emailnotification TINYINT(1) DEFAULT '' NOT NULL,
741 commentdefault TINYINT(1) DEFAULT '' NOT NULL,
742 viewsigs TINYINT(1) DEFAULT '' NOT NULL,
743 allowpm TINYINT(1) DEFAULT '' NOT NULL,
744 emailpm TINYINT(1) DEFAULT '' NOT NULL,
745 isbanned TINYINT(1) DEFAULT '' NOT NULL,
746 PRIMARY KEY (userid))";
747
748 $query[news_useragent] = "CREATE TABLE news_useragent (
749 name VARCHAR(255) DEFAULT '' NOT NULL,
750 type VARCHAR(15) DEFAULT '' NOT NULL,
751 value INT(10) DEFAULT '' NOT NULL,
752 PRIMARY KEY (name,type))";
753
754 $query[news_userfield] = "CREATE TABLE news_userfield (
755 userid INT(10) DEFAULT '0' NOT NULL,
756 field1 VARCHAR(250) DEFAULT ''NOT NULL,
757 field2 VARCHAR(250) DEFAULT ''NOT NULL,
758 field3 VARCHAR(255) DEFAULT ''NOT NULL,
759 field4 VARCHAR(255) DEFAULT ''NOT NULL,
760 PRIMARY KEY (userid),
761 UNIQUE KEY id (userid))";
762
763 echo " <tr>\n <td>Installing the VirtuaNews tables:</tr>\n";
764
765 while (list($table_name,$query_text) = each($query)) {
766 query($query_text,0);
767 if (geterrno() == 0) {
768 echo " <tr>\n <td>Creating table: $table_name</td>\n </tr>\n";
769 } else {
770 echo " <tr>\n <td>Error Creating table: $table_name<br>Error Number: ".geterrno()."<br>Error Description: ".geterrordesc()."</td>\n </tr>\n";
771 $error = 1;
772 }
773 }
774
775 if ($error) {
776 echo " <tr>\n <td>There has been an error creating one or more of the tables. Please examine this error and only continue if you are sure it will not effect the install process. Click <a href=\"install.php?step=5\">here</a> to continue or <a href=\"http://www.virtuanews.co.uk\">here</a> to go to the VirtuaNews website</td>\n </tr>\n";
777 } else {
778 echo " <tr>\n <td>All tables created correctly, please click <a href=\"install.php?step=5\">here</a> to continue</tr>\n";
779 }
780
781}
782
783if ($step == 5) {
784
785 $query[news_announcement][] = "INSERT INTO news_announcement VALUES ('1','','','')";
786
787 $query[news_category][] = "INSERT INTO news_category VALUES ('1','0','0','Main','View the latest news from our site here.','','1','3','3','1','1','1','1','1','0','1','0','1','1','1','1','1');";
788
789 $query[news_news][] = "INSERT INTO news_news VALUES (NULL,'1','New Site','Welcome to our new website, powered by VirtuaNews version $version we hope to be able to bring you the latest and best information available on the web.\n\nFor more information on VirtuaNews visit their website at <a href=\"http://www.virtuanews.co.uk\" target=\"_blank\">http://www.virtuanews.co.uk</a>\n\nYour admin team','','virtuanews_logo.gif','0','0','','".time()."','1','0','1','0','1','1','0','0')";
790
791 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','aboutus_main','This template displays information about news posters and the admin of the site, along with any other info you wish to display on the page.','1')";
792 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','aboutus_record','This template displays the indervidual records for the user on the aboutus page.','0')";
793 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','archive_header','This template creates a table that will contain the posts over that day on the archive page.','0')";
794 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','archive_next_days_link','This template will provide a link to the next set of days on the archive page.','0')";
795 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','archive_page','This template is the main archive page which will output the list of posts over the number of days set int he options.','1')";
796 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','archive_post','This template is used to display an indervidual news post on the archive page.','0')";
797 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','archive_previous_days_link','This template will provide a link to the previous set of days on the archive page.','0')";
798 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','articles_cats_page','This template will display the articles within the category specified by the user.','1')";
799 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','articles_cats_record','This template will display indervidual links to the articles within the category specified.','0')";
800 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','articles_cats_sub_cat','This template will display links to the sub categories to the category specified.','0')";
801 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','articles_display_page','This template will display each article to the user.','1')";
802 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','articles_display_rating','This template will display an option for the user to rate the article, it will not be shown if a user has already selected a rating for the article.','0')";
803 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','articles_index_cat','This template displays the top level article categories.','1')";
804 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','articles_index_page','This template will display links to the first 2 levels of categories of articles on the main article page.','1')";
805 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','articles_index_sub_cat','This template displays the sub categories on the article index page.','1')";
806 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','comments_add_autoparse_check','This template will display a check box allowing users to select if they wish to automatically parse urls or not.','0')";
807 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','comments_add_closed','This template is displayed in place of the table to add comments when comments are not allowed to be posted.','0')";
808 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','comments_add_disabled','This template is displayed instead of the table to add a comment when a user does not have permission to post comments.','0')";
809 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','comments_add_new','This template displays the table to add a comment to a news post.','0')";
810 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','comments_add_notify_check','This template will display a check box allowing registered users to select if they wish to subscribe to a comment or not.','0')";
811 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','comments_add_qhtml_disabled','This template is shown inplace of the qhtml buttons when qhtml for the user is disabled.','0')";
812 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','comments_add_qhtml_links','This template provides the buttons to insert qhtml into the comment, when it is enabled for the user on the comments page.','0')";
813 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','comments_add_reply','This template displays the table to reply to a comment from a news post.','0')";
814 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','comments_add_signature_check','This template will display a check box allowing registered users to select if they wish to use their signature or not.','0')";
815 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','comments_comment_admin_del_link','This template is used to display a link to posters (thoses who have permissions) to delete users comments.','0')";
816 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','comments_comment_admin_edit_link','This template is used to display a link to posters (thoses who have permissions) to edit users comments.','0')";
817 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','comments_comment_close_link','This template is used to display a link to close all comment replies for a specific comment.','0')";
818 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','comments_comment_data','This template is used to display the comments that dont have any replies to them for the news posts.','0')";
819 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','comments_comment_data_child','This template is used to display the comments which are replies to other comments.','0')";
820 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','comments_comment_data_parent','This template is used to display the comments that have replies to them for the news posts.','0')";
821 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','comments_comment_editedby','This template is used to display details about who has edited a comment.','0')";
822 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','comments_comment_edit_link','This template is used to display a link to reply to the comments.','0')";
823 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','comments_comment_open_link','This template is used to display a link to open all comment replies for a specific comment.','0')";
824 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','comments_comment_outer_table','This template is used as a parent to the comments for a news post, this will contain all comment info which can then be outputted to the main comment page.','0')";
825 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','comments_comment_reply_last','This template will display a link on the last child comment displaying a link to reply to the parent.','0')";
826 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','comments_comment_reply_link','This template is used to display a link to the user allowing them to reply to a comment. It is not displayed with the child comments, apart from the last one for each parent.','0')";
827 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','comments_comment_report_link','This page bit is displayed along with comments providing a link to report them when the user is allowed to report comments.','0')";
828 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','comments_comment_signature','This template is used to display a users signature along with their comment post if they have one.','0')";
829 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','comments_comment_user_post_count','This template is used to display a users post count on the forum and comments along with their comment.','0')";
830 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','comments_emailnotify_msg','This template is the main body of the emails that are sent users to tell them when there is a new comment to a news post they have subscribed to.','0')";
831 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','comments_emailnotify_subject','This template is the subject of the emails that are sent users to tell them when there is a new comment to a news post they have subscribed to.','0')";
832 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','comments_logged_in','This template is displayed in the comment add form to show the username that is logged in.','0')";
833 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','comments_logged_out','This template is displayed in the comment add form displaying text boxes to allow an unregistered user to enter a name to comment under.','0')";
834 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','comments_news_admin_close','This template is displayed when a user views a news post that can open and close posts, it will provide it will provide a link to close the news post.','0')";
835 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','comments_news_admin_open','This template is displayed when a user views a news post that can open and close posts, it will provide it will provide a link to open the news post.','0')";
836 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','comments_news_data','This template displays the news post and extended news on the comments page.','0')";
837 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','comments_news_editedby','This template is used to display details about who has edited a news post.','0')";
838 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','comments_news_logo','This template is for the logo that is optionally displayed with news posts on the comments page.','0')";
839 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','comments_news_logo_border','This template is for the logo border that is optionally displayed around the logo with news posts on the comments page.','0')";
840 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','comments_news_oc_link','This template is displayed when the comment reply system is enabled, allowing the user to open or close all comments to a news post.','0')";
841 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','comments_page','This template is used as the comments page displaying the comment and news data within.','1')";
842 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','comments_report','This page will display a form allowing users to report a comment to the staff.','1')";
843 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','comments_report_email','This page bit contains the body of the email that will be sent to staff when a comment is reported.','0')";
844 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','comments_smilies_disabled','This template is displayed in place of the clickable smilies table when smilies are not allowed to be used.','0')";
845 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','comments_smilies_row','This page bit will display a row containing the clickable smilies.','0')";
846 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','comments_smilies_smiliebit','This template displays the actual clickable smilies in the table.','0')";
847 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','comments_smilies_table','This template is used to provide a table of clickable smilies to insert into the comment text area on the comment page, it is displayed only when the smilies are enabled.','0')";
848 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','comment_news_subscribe_link','This page bit is displayed allowing a registered user to subscribe to a news post.','0')";
849 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','edit_page','This template is displayed when a user is editing a comment, it contains the form they will use to do so.','1')";
850 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','error_account_notmoderated','This template is displayed when a user tries to access the user panel, but their account has not yet been moderated.','0')";
851 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','error_activation_expired','This template is displayed when a user tries to activate their account using an activation id which has expired. It will display a form allowing them to email a new activation id to their email address.','0')";
852 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','error_already_activated','This template is displayed when a user requests a new activation id and has already activated their account.','0')";
853 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','error_already_logged_in','This template is displayed when a user is trying to log in and is already logged in.','0')";
854 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','error_already_registered','This template will be displayed when a user tries to register that is already registered.','0')";
855 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','error_already_voted','This template is displayed when a user tries to vote more than once for a poll or an article.','0')";
856 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','error_blank_field','This template is displayed when a required field is left blank.','0')";
857 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','error_cannot_edit','This template is displayed whena user tries to edit a comment and comment editing is not allowed.','0')";
858 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','error_category_hidden','This page bit is displayed when a user tries to view a category which is hidden from view to them.','0')";
859 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','error_comments_closed','This template is displayed when a user tries to post a comment to a news post that they are not permitted to do.','0')";
860 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','error_comment_edit_locked','this template is displayed when a user tries to edit a comment that has already been edited by a poster and locked for editing.','0')";
861 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','error_comment_long','This template is displayed when a user enters a comment which is over the character limit.','0')";
862 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','error_comment_user_taken','This template is displayed when a user tries to post a comment with a username which is already in use by a member.','0')";
863 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','error_comment_wrong_user','This template is displayed when a user tries to post a comment with a different user name to what they are logged in as.','0')";
864 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','error_edit_wrong_user','This template is displayed when a user tries to edit a comment that is not their own.','0')";
865 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','error_email_failed','This template is displayed if an email fails to send at any time.','0')";
866 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','error_email_hidden','This template is displayed when a user tries to email another user that has specified that they have their email address hidden.','0')";
867 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','error_email_long','This template is displayed when a user enters an email address which is over the character limit.','0')";
868 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','error_email_mismatch','This template is displayed when a user is registering and enters a different email address in the email confirm box to that which they entered first.','0')";
869 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','error_email_notactivated','This template is displayed when a user tries to access the user panel, and has not yet activated their email address.','0')";
870 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','error_email_taken','This template is displayed when a user tries to register with an email address that another member already has.','0')";
871 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','error_field_long','This template is displayed when a user is registering or editing their profile and enters data greater than the max length of a custom field.','0')";
872 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','error_invalid_cat','This template is displayed when a user specifies an invalid category to post a comment in.','0')";
873 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','error_invalid_email','This template is displayed when a user enters an email address which is not valid.','0')";
874 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','error_invalid_id','This template is displayed when the user specifies an invlaid id.','0')";
875 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','error_invalid_link','this template is displayed when the user specifies an invalid link.','0')";
876 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','error_invalid_rating','This template is displayed when a user tries to vote for something and specifies an invalid option.','0')";
877 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','error_ip_banned','This template is displayed when a user who\'s IP has been banned tries to view the site.','0')";
878 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','error_memberlist_disabled','This template is displayed when a user tries to access the member list and it is disabled in the site options.','0')";
879 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','error_module_disabled','This template is displayed when a user tries to access a module which has been disabled.','0')";
880 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','error_no_anon_voting','This template is displayed when a user tries to vote and is not logged in when anonymous voting is not allowed.','0')";
881 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','error_no_next_post','This page bit is displayed when a user tries to view the next post to the one they are viewing but there is no newer post.','0')";
882 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','error_no_perms','This template is displayed when a user tries to do an action they are not permitted to do.','0')";
883 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','error_no_previous_post','This page bit is displayed when a user tries to view the previous post to the one they are viewing but there is no older post.','0')";
884 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','error_page','This template is used when there is an error on the site, it will output the error to the user. This template is the basic outline of the error page, containing the error message within.','1')";
885 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','error_page_hidden','This page bit will be displayed when a user tries to view a page they do not have the permission to view.','0')";
886 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','error_password_mismatch','This template is displayed when a user is registering and enters a different password in the password confirm box to that which they entered first.','0')";
887 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','error_password_request_expired','This template is displayed when a user tries to reset their password using an activation id that has expired.','0')";
888 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','error_pm_bounce','This template is displayed when a user tries to send a message to another user who cannot recieve them.','0')";
889 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','error_pm_disabled','This is displayed when a user tries to access their private messages but has them turned off in their profile.','0')";
890 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','error_pm_full','This template is displayed when a user tries to send a new private message and their pm in/outbox is full.','0')";
891 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','error_pm_invalid_user','This template is displayed when a user tries to view a private message that is not theirs.','0')";
892 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','error_pm_no_perms','This template is displayed when a user tries to access their private messages but do not have the permissions to do so.','0')";
893 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','error_profile_disabled','This template is shown when a user tries to view a users profile but viewing of profiles has been disabled.','0')";
894 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','error_search_disabled','This template is displayed when a user tries to search the site but searching has been disabled.','0')";
895 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','error_server_busy','This template is displayed when there are too many users on the site causing it too slow.','0')";
896 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','error_signup_disabled','This template is displayed when a user tries to register and registration is disabled.','0')";
897 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','error_site_closed','This template is displayed when the site is closed.','0')";
898 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','error_stats_disabled','This template is displayed when a user tries to view the stats.php page and viewing of stats has been disabled.','0')";
899 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','error_too_many_images','This template is displayed when a user includes too many images in their post.','0')";
900 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','error_username_taken','This template is displayed when a user tries to register with a username which is already taken.','0')";
901 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','error_user_banned','This template is displayed when a banned user tries to access the site.','0')";
902 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','error_user_long','This template is displayed when a user enters a username which is over the character limit.','0')";
903 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','error_wrong_password','This template is displayed when a user is logging in and enters an invlaid password.','0')";
904 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','error_wrong_username','This template is displayed when a user is logging in and enters an invlaid username.','0')";
905 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','help_faq','This will display a page showing answers to frequently asked questions to help the users.','1')";
906 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','help_qhtml','This will display a page showing information about the quick HTML code help the users.','1')";
907 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','help_smilie','This will display a page showing a list of all smilies to help the users.','1')";
908 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','help_smilie_bit','This page bit will the indervidual smilies on the smilie list.','0')";
909 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','main_catlist_empty','This page bit is displayed when there are no sub categories to list.','0')";
910 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','main_catlist_image','This template is used to display the image along with each category on the category list page.','0')";
911 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','main_catlist_name_link','This page bit displays the category names on the listing page, it is used to give a link to the main page showing the news posts.','0')";
912 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','main_catlist_name_nolink','This page bit displays the category names on the listing page, it is used when showing details about a category which is set not to display on the main page.','0')";
913 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','main_catlist_page','This template is used to display a page listing all of the news categories and their info.','1')";
914 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','main_catlist_record','This template is used to display each category on the category list.','0')";
915 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','main_catlist_sub_record','This page bit will display details about the sub categories on the category listing page.','0')";
916 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','main_custom_page','This page is displayed as a custom start page when it is set to display first (in site options).','1')";
917 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','main_home_page','This template is used on the front page of the site, displaying the news posts.','1')";
918 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','main_news_post','This template is used to display the news posts on the front page of the site.','1')";
919 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','main_news_post_comments_image','This template is the name of the image with the link to the comments. This will display when the comments are allowed.','1')";
920 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','main_news_post_comments_image_lock','This template is the name of the image with the link to the comments. This will display when the comments are closed.','1')";
921 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','main_news_post_logo','This template is used when a news post is displayed with a logo.','1')";
922 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','main_news_post_logo_border','This template is used when a news post is displayed with a logo which has a border round it selected.','1')";
923 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','main_news_post_no_comments','This template is used to show that there are no comments to a news post, it will be replaced by the last comment username when there is.','0')";
924 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','main_news_post_read_more','This template is used when extended news is entered for a news post, providing a link to read more.','1')";
925 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','main_news_sticky','This page bit is used to display sticky news posts on the main news page.','1')";
926 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','member_email_content','This template is the content of them email which will be used to email users containing the message from the sender.','0')";
927 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','member_email_disabled','This template is displayed when a user tries to use the email form but dont have permission to do so, instead it will just display the email address as a link.','0')";
928 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','member_email_form','This template is displayed so that a user can email another user.','1')";
929 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','member_email_subject','This template is the subject of the email which will be sent to users by people using the email form.','0')";
930 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','member_list_page','This template will display a list of all the members on your site.','1')";
931 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','member_list_record','This template is used to display the indervidual details about each member on the member list page.','0')";
932 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','member_list_record_email','This template will display a link to email a user on the member list page.','0')";
933 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','member_list_record_homepage','This template will display a link to a users homepage on the member list page.','0')";
934 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','member_list_search','This template will display a search form allowing the user to search the members table.','1')";
935 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','member_list_search_blank','This template is displayed if a user conducts a member search and there are no results.','0')";
936 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','member_profile_custom','This page bit will display details of a members custom fields on their profile page.','0')";
937 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','member_profile_email','This template is used to display a link to email a user on the profile page.','0')";
938 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','member_profile_homepage','This template is used to display a link to a users homepage on the profile pahe.','0')";
939 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','member_profile_page','This template is used to display the profile about a certain member.','1')";
940 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','member_profile_pm','This template will display a link to send the user a private message for users who are able to do so.','0')";
941 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','menu_1','This page is the menu for the category called <b>Main</b>.','1')";
942 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','misc_announcement','This template will output the announcement for the news category the user is browsing.','1')";
943 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','misc_announcement_image','This template will output an image without a link next to the announcement, if there is an image entered.','1')";
944 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','misc_announcement_image_link','This template will output an image with a link next to the announcement, if there is an image link entered.','1')";
945 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','misc_cat_nav_link','This template displays the links to the different news sections on each page.','1')";
946 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','misc_cat_nav_off','This page bit displays the name of the category which is being viewed on the category nav.','1')";
947 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','misc_footer','This template is the footer, displayed at the bottom of every page.<br>\n<br>\nNOTE DO NOT REMOVE THE COPYRIGHT NOTICE','1')";
948 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','misc_forum_options','This template outputs options for the forums to be displayed on every page.','1')";
949 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','misc_header','This template is the header, displayed at the top of every page.','1')";
950 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','misc_module_link','Template is used to provide links to the modules that are on the site.','1')";
951 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','misc_nav_bar','This template will display the nav bar at the top of the page.','0')";
952 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','misc_nav_joiner','This template will join the links in the nav bar at the top of the page.','0')";
953 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','misc_nav_link_off','This template is displayed for a link on the nav bar at the top of the page, when only the title is displayed, no link.','0')";
954 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','misc_nav_link_on','This template is displayed for a link on the nav bar at the top of the page, where an actual link is required.','0')";
955 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','misc_page_nav_curr_page','This template displays the current page number.','0')";
956 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','misc_page_nav_first_link','This template displays a link to the very first page of the set,.','0')";
957 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','misc_page_nav_last_link','This template displays a link to the very last page of the set,.','0')";
958 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','misc_page_nav_main','This template displays the page navigation, shown where there are multiple pages for search results etc. This contains the seperate page links as variables.','0')";
959 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','misc_page_nav_next_link','This template displays a link to the next page to the current one the user is on.','0')";
960 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','misc_page_nav_prev_link','This template displays a link to the previous page to the current one the user is on.','0')";
961 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','misc_recent_post_header','This template is the header displayed at the top of the recent posts.','1')";
962 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','misc_recent_post_link','This template displays the links to the comment pages for the recent post display.','1')";
963 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','misc_sitejump_cat','This page bit will display the indervidual categories in the site jump.','0')";
964 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','misc_sitejump_main','This page bit will display the outline of the site jump.','0')";
965 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','misc_sitejump_news','This page bit will display the news posts in the site jump.','0')";
966 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','misc_stats_forum','This template is displayed on every page (when forum stats are enabled in the category being browsed) containing stats about the forum.','0')";
967 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','misc_stats_site','This template is displayed on every page (when stats are enable in the category being browsed) containing the site counter and users online.','0')";
968 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','misc_theme_selector','This template provides the selector for the site styles, it is the parent drop down box which will be filled by the options.','0')";
969 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','misc_theme_selector_option','This template provides the indervidual options for the style selector allowing the user to choose which style they wish to use.','0')";
970 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','misc_username_email','This template will be used to display a persons name whent they post comments or news etc and provide a link to their email.','0')";
971 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','misc_username_noemail','This template will be used to display a persons name whent they post comments or news etc, it is used when no email address is given.','0')";
972 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','misc_username_profile','This template will be used to display a persons name whent they post comments or news etc and provide a link to their profile.','0')";
973 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','misc_welcometext_logged_in','This template is the welcome text displayed for users who are logged in.','0')";
974 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','misc_welcometext_logged_out','This template is the welcome text displayed for users who are either not registered or not logged in to the site.','0')";
975 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','poll_options_option','This template is used to display the poll options on every page so a user can vote for the poll from any page.','1')";
976 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','poll_options_table','This template is the table in which the poll will be displayed on all pages when the user has not already voted.','1')";
977 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','poll_results_option','This template is used to display the poll results for each option on every page.','1')";
978 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','poll_results_table','This template is the table in which the poll will be displayed on all pages when the user has already voted.','1')";
979 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','poll_view_results','This template displays all the polls that have been on the site from the past, this is the main page for this and contiains all the data about the polls.','1')";
980 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','poll_view_results_option','This template is used to display the poll results for each option on the page showing all the polls from the past on the site.','1')";
981 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','poll_view_results_table','This template is used to display the polls on the page showing all of the polls.','1')";
982 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','print_news','This template is displayed so that a user can print out a news post, ie there are only a few images and simple text.','1')";
983 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','print_news_comment','This template is used to display the comments on the print post page.','0')";
984 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','print_news_comment_child','This template is used to display the comments which are replies to other comments on the print post page.','0')";
985 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','print_news_comment_parent','This template is used to display the comments which have replies on the print post page.','0')";
986 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','print_news_post','This template is used to display the news post on the print post page.','0')";
987 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','redirect_acitvation_resent','This template is displayed when the user is being redirected after a new activation id has been sent to a new user.','0')";
988 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','redirect_activation_complete','This template is displayed when the user is being redirected after email activation is complete.','0')";
989 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','redirect_comment_edit','This template is displayed when the user is being redirected after editing a comment.','0')";
990 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','redirect_comment_new','This template is displayed when the user is being redirected after posting a new comment.','0')";
991 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','redirect_comment_report','This template is displayed when the user is being redirected after they have reported a comment.','0')";
992 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','redirect_comment_sub','This template is displayed when the user is being redirected after they have subscribed to a news post.','0')";
993 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','redirect_comment_usub','This template is displayed when the user is being redirected after they have unsubscribed from a news post.','0')";
994 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','redirect_login','This template is displayed when the user is being redirected after Logging in.','0')";
995 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','redirect_logout','This template is displayed when the user is being redirected after logging out.','0')";
996 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','redirect_member_email','This template is displayed when the user is being redirected after emailing a member.','0')";
997 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','redirect_page','This template is displayed after a user has submitted something tot he site, it will redirect them to the correct page.','0')";
998 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','redirect_pm_delete','This template is displayed when the user is being redirected after delete a private message.','0')";
999 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','redirect_pm_sent','This template is displayed when the user is being redirected after they have sent a private message.','0')";
1000 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','redirect_profile_updated','This template is displayed when the user is being redirected after they have updated their profile.','0')";
1001 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','redirect_pwd_forgot','This template is displayed when the user is being redirected after an email has been sent to auser containing details how to reset their password.','0')";
1002 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','redirect_pwd_reset','This template is displayed when the user is being redirected after they have reset their password.','0')";
1003 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','redirect_pwd_updated','This template is displayed when the user is being redirected after they have updated their password.','0')";
1004 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','redirect_registration_done','This template is displayed when the user is being redirected after registering with the site.','0')";
1005 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','redirect_voted','This template is displayed when the user is being redirected after voting for an article or poll.','0')";
1006 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','register_email_activation_msg','This template is emailed in the main body of the email, to a new user with details of how to activate their account.','0')";
1007 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','register_email_activation_subject','This template is the subject of the email which is sent to new users to give them details about activating their account.','0')";
1008 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','register_email_details_msg','This template is the body of the email which is sent to a user, after their account has been activated, confirming their login details.','0')";
1009 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','register_email_details_subject','This template is the subject of the email which is sent to a user, after their account has been activated, confirming their login details.','0')";
1010 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','register_email_moderated','This page is sent in the body of an email to users who have been moderated by staff.','0')";
1011 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','register_email_mod_msg','This page is sent in the body of an email to users after they have activated their email if their account still requires admin moderation.','0')";
1012 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','register_email_mod_subject','This page is sent as the subject of an email to users after they have activated their email if their account still requires admin moderation.','0')";
1013 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','register_email_newuser_msg','This page is sent in the body of an email to staff after a new user registeres requiring moderation.','0')";
1014 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','register_email_newuser_subject','This page is sent as the subject of an email to staff after a new user registeres requiring moderation.','0')";
1015 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','register_form','This template displays the form allowing users to register with your site.','1')";
1016 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','register_form_custom_field','This template will display a text box for the custom profile fields you use, allowing the user to enter data into them.','0')";
1017 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','register_lost_activation','This page will display a form allowing users to request new activation details be sent to them.','0')";
1018 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','search_page','This template is the search form the user will use to search the site.','1')";
1019 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','search_page_cat_option','This template displays the options on the search page allowing the user to search specific news categories.','0')";
1020 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','search_results_article','This template will contain all the articles found by the search.','0')";
1021 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','search_results_article_record','This template displays the indervidual articles found by the search.','0')";
1022 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','search_results_news','This template will contain all the news posts found by the search.','0')";
1023 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','search_results_news_record','This template displays the indervidual news posts found by the search.','0')";
1024 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','search_results_page','This template is used as the main page for the search results, on it will be a list of the posts found by the users search.','1')";
1025 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','stats_browser_row','This template will display the info about the browsers for the site.','0')";
1026 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','stats_main_page','This template is displayed when a user views the site stats page. This template is the main page, in which the details will be displayed.','1')";
1027 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','stats_os_row','This template will display the info about the operating systems for the site.','0')";
1028 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','user_forget_request_emailmsg','This template will be emailed to users containing information on how to reset their password.','0')";
1029 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','user_forget_request_emailsub','This template is the subject of the email which will be sent containing details on how to reset a users password.','0')";
1030 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','user_forget_request_form','This template is displayed allowing a user to request that their password be sent to them when they forget it.','1')";
1031 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','user_forget_reset_emailmsg','This template will be emailed to a user contianing their new password after it has been reset.','0')";
1032 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','user_forget_reset_emailsub','This template is the subject of the email that will be sent to users containing their new password.','0')";
1033 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','user_index_first_unread_link','This template is displayed giving a link to the first unread post for the user to a news post which they have subscribed to.','0')";
1034 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','user_index_page','This template is displayed on the front page of the user control panel. It contains links to each part of the control panel and details about posts users have subscribed to.','1')";
1035 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','user_index_pm','This template is used to display a list of new private messages for users on the front page of the user panel.','0')";
1036 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','user_index_pm_empty','This template is displayed on the front page of the user panel when a user has no new private messages.','0')";
1037 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','user_index_post','This template is used to display the indervidual post details about posts which users have subcribed to.','0')";
1038 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','user_index_post_empty','This template is displayed on the front page of the user panel for users that are not subscribed to any posts.','0')";
1039 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','user_login_form','This template is displayed when a user logs in, it contains the form they will use to do so.','1')";
1040 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','user_pm_email_msg','This template is sent as an email in the body to a user when they recieve a new private message.','0')";
1041 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','user_pm_email_subject','This template is sent as an email in the subject to a user when they recieve a new private message.','0')";
1042 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','user_pm_empty','This template is displayed when a user views their pm inbox or outbox and it is empty.','0')";
1043 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','user_pm_form','This template will display a form allowing users to send a new pm to someone.','1')";
1044 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','user_pm_inbox','This template will display a page allowing users to view their pm inbox.','1')";
1045 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','user_pm_inbox_record','This template is used to display the indervidual messages in a users inbox.','0')";
1046 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','user_pm_outbox','This template will display a page listing all messages sent by the user and the times they were read plus a list of messages that havent been read so far.','1')";
1047 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','user_pm_outbox_record','This template is used to display the indervidual messages in a users outbox.','0')";
1048 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','user_pm_show','This template is used to display indervidual private messages to the users.','1')";
1049 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','user_pm_unread','This template will be displayed instead of the read date for private messages which have yet to be read by users.','0')";
1050 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','user_profile_edit','This template will allow users to update their profile.','1')";
1051 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','user_profile_email_msg','This page is sent in the body of an email to users after they change their email address allowing them to validate it again.','0')";
1052 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','user_profile_email_subject','This page is sent as the subject of an email to users after they change their email address.','0')";
1053 $query[news_page][] = "INSERT INTO news_page VALUES (NULL,'-1','user_pwd_edit','This template will display a form allowing users to alter their password.','1')";
1054
1055 $query[news_pageset][] = "INSERT INTO news_pageset VALUES (1,'Default')";
1056
1057 $query[news_poll][] = "INSERT INTO news_poll VALUES (NULL,'Do You Like VirtuaNews?','I love it','Its Good','Seen Better','Whats VirtuaNews?','','','','','','','0','0,0,0,0','1')";
1058
1059 $query[news_profilefield][] = "INSERT INTO news_profilefield VALUES (NULL,'Biography','What are you like?','0','0','1','1','250','40')";
1060 $query[news_profilefield][] = "INSERT INTO news_profilefield VALUES (NULL,'Location','Where do you live?','0','0','1','2','250','40')";
1061 $query[news_profilefield][] = "INSERT INTO news_profilefield VALUES (NULL,'Interests','What are your hobbies?','0','0','1','3','250','40')";
1062 $query[news_profilefield][] = "INSERT INTO news_profilefield VALUES (NULL,'Occupation','What is your job?','0','0','1','4','250','40')";
1063
1064 $query[news_referer][] = "INSERT INTO news_referer VALUES ('Home','0')";
1065 $query[news_referer][] = "INSERT INTO news_referer VALUES ('None','0')";
1066
1067 $query[news_smilie][] = "INSERT INTO news_smilie VALUES (NULL,'smile',':)','images/smilies/smile.gif')";
1068 $query[news_smilie][] = "INSERT INTO news_smilie VALUES (NULL,'frown',':(','images/smilies/frown.gif')";
1069 $query[news_smilie][] = "INSERT INTO news_smilie VALUES (NULL,'embarrasment',':o','images/smilies/redface.gif')";
1070 $query[news_smilie][] = "INSERT INTO news_smilie VALUES (NULL,'big grin',':D','images/smilies/biggrin.gif')";
1071 $query[news_smilie][] = "INSERT INTO news_smilie VALUES (NULL,'wink',';)','images/smilies/wink.gif')";
1072 $query[news_smilie][] = "INSERT INTO news_smilie VALUES (NULL,'stick out tongue',':p','images/smilies/tongue.gif')";
1073 $query[news_smilie][] = "INSERT INTO news_smilie VALUES (NULL,'cool',':cool:','images/smilies/cool.gif')";
1074 $query[news_smilie][] = "INSERT INTO news_smilie VALUES (NULL,'roll eyes (sarcastic)',':rolleyes:','images/smilies/rolleyes.gif')";
1075 $query[news_smilie][] = "INSERT INTO news_smilie VALUES (NULL,'mad',':mad:','images/smilies/mad.gif')";
1076 $query[news_smilie][] = "INSERT INTO news_smilie VALUES (NULL,'eek!',':eek:','images/smilies/eek.gif')";
1077 $query[news_smilie][] = "INSERT INTO news_smilie VALUES (NULL,'confused',':confused:','images/smilies/confused.gif')";
1078 $query[news_smilie][] = "INSERT INTO news_smilie VALUES (NULL,'knockout',':knockout:','images/smilies/knockout.gif')";
1079
1080 $query[news_stats][] = "INSERT INTO news_stats VALUES ('" . time() . "','0','0','0')";
1081
1082 $query[news_style][] = "INSERT INTO news_style VALUES(NULL,'-1','body','body style=\"background-color:#476297;margin:8px\"')";
1083 $query[news_style][] = "INSERT INTO news_style VALUES(NULL,'-1','bordercolor','#555555')";
1084 $query[news_style][] = "INSERT INTO news_style VALUES(NULL,'-1','charset','utf-8')";
1085 $query[news_style][] = "INSERT INTO news_style VALUES(NULL,'-1','csspath','images/blue/style.css')";
1086 $query[news_style][] = "INSERT INTO news_style VALUES(NULL,'-1','headerbgcolor','#FFFBF7')";
1087 $query[news_style][] = "INSERT INTO news_style VALUES(NULL,'-1','headertablewidth','100%')";
1088 $query[news_style][] = "INSERT INTO news_style VALUES(NULL,'-1','htmldoctype','<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">')";
1089 $query[news_style][] = "INSERT INTO news_style VALUES(NULL,'-1','imagefolder','images/blue')";
1090 $query[news_style][] = "INSERT INTO news_style VALUES(NULL,'-1','logopath','images/blue/virtuanews_logo.gif')";
1091 $query[news_style][] = "INSERT INTO news_style VALUES(NULL,'-1','mainbgcolor','#EFF1F6')";
1092 $query[news_style][] = "INSERT INTO news_style VALUES(NULL,'-1','maincellpadding','3')";
1093 $query[news_style][] = "INSERT INTO news_style VALUES(NULL,'-1','maincellspacing','0')";
1094 $query[news_style][] = "INSERT INTO news_style VALUES(NULL,'-1','maintablewidth','95%')";
1095 $query[news_style][] = "INSERT INTO news_style VALUES(NULL,'-1','menubgcolor','#FFFBF7')";
1096 $query[news_style][] = "INSERT INTO news_style VALUES(NULL,'-1','submitbutton','<input type=\"image\" src=\"images/blue/submit.gif\" />')";
1097
1098 $query[news_style][] = "INSERT INTO news_style VALUES(NULL,'2','body','body style=\"background-color:#666666;margin:8px\"')";
1099 $query[news_style][] = "INSERT INTO news_style VALUES(NULL,'2','csspath','images/grey/style.css')";
1100 $query[news_style][] = "INSERT INTO news_style VALUES(NULL,'2','headerbgcolor','#E2E2E2')";
1101 $query[news_style][] = "INSERT INTO news_style VALUES(NULL,'2','imagefolder','images/grey')";
1102 $query[news_style][] = "INSERT INTO news_style VALUES(NULL,'2','logopath','images/grey/virtuanews_logo.gif')";
1103 $query[news_style][] = "INSERT INTO news_style VALUES(NULL,'2','mainbgcolor','#FFFFFF')";
1104 $query[news_style][] = "INSERT INTO news_style VALUES(NULL,'2','menubgcolor','#E2E2E2')";
1105 $query[news_style][] = "INSERT INTO news_style VALUES(NULL,'2','submitbutton','<input type=\"image\" src=\"images/grey/submit.gif\" />')";
1106
1107 $query[news_style][] = "INSERT INTO news_style VALUES(NULL,'3','body','body style=\"background-color:#666699;margin:8px\"')";
1108 $query[news_style][] = "INSERT INTO news_style VALUES(NULL,'3','csspath','images/purple/style.css')";
1109 $query[news_style][] = "INSERT INTO news_style VALUES(NULL,'3','headerbgcolor','#EAEDF7')";
1110 $query[news_style][] = "INSERT INTO news_style VALUES(NULL,'3','imagefolder','images/purple')";
1111 $query[news_style][] = "INSERT INTO news_style VALUES(NULL,'3','logopath','images/purple/virtuanews_logo.gif')";
1112 $query[news_style][] = "INSERT INTO news_style VALUES(NULL,'3','mainbgcolor','#ffffff')";
1113 $query[news_style][] = "INSERT INTO news_style VALUES(NULL,'3','menubgcolor','#EAEDF7')";
1114 $query[news_style][] = "INSERT INTO news_style VALUES(NULL,'3','submitbutton','<input type=\"image\" src=\"images/purple/submit.gif\" />')";
1115
1116 $query[news_styleset][] = "INSERT INTO news_styleset VALUES('1','Blue')";
1117 $query[news_styleset][] = "INSERT INTO news_styleset VALUES('2','Grey')";
1118 $query[news_styleset][] = "INSERT INTO news_styleset VALUES('3','Purple')";
1119
1120 $query[news_theme][] = "INSERT INTO news_theme VALUES ('1','Blue','1','1','1')";
1121 $query[news_theme][] = "INSERT INTO news_theme VALUES ('2','Grey','1','2','1')";
1122 $query[news_theme][] = "INSERT INTO news_theme VALUES ('3','Purple','1','3','1')";
1123
1124 $query[news_useragent][] = "INSERT INTO news_useragent VALUES ('Netscape','browser','0')";
1125 $query[news_useragent][] = "INSERT INTO news_useragent VALUES ('Opera','browser','0')";
1126 $query[news_useragent][] = "INSERT INTO news_useragent VALUES ('MSIE','browser','0')";
1127 $query[news_useragent][] = "INSERT INTO news_useragent VALUES ('Lynx','browser','0')";
1128 $query[news_useragent][] = "INSERT INTO news_useragent VALUES ('WebTV','browser','0')";
1129 $query[news_useragent][] = "INSERT INTO news_useragent VALUES ('Konqueror','browser','0')";
1130 $query[news_useragent][] = "INSERT INTO news_useragent VALUES ('Bot','browser','0')";
1131 $query[news_useragent][] = "INSERT INTO news_useragent VALUES ('Other','browser','0')";
1132 $query[news_useragent][] = "INSERT INTO news_useragent VALUES ('Windows','os','0')";
1133 $query[news_useragent][] = "INSERT INTO news_useragent VALUES ('Mac','os','0')";
1134 $query[news_useragent][] = "INSERT INTO news_useragent VALUES ('Linux','os','0')";
1135 $query[news_useragent][] = "INSERT INTO news_useragent VALUES ('SunOS','os','0')";
1136 $query[news_useragent][] = "INSERT INTO news_useragent VALUES ('IRIX','os','0')";
1137 $query[news_useragent][] = "INSERT INTO news_useragent VALUES ('BeOS','os','0')";
1138 $query[news_useragent][] = "INSERT INTO news_useragent VALUES ('OS/2','os','0')";
1139 $query[news_useragent][] = "INSERT INTO news_useragent VALUES ('Other','os','0')";
1140
1141 echo " <tr>\n <td>Inserting the default data into the VirtuaNews tables:</tr>\n";
1142
1143 while (list($table_name,$query_arr) = each($query)) {
1144 echo " <tr>\n <td>Adding $table_name Data</td>\n </tr>\n";
1145 foreach ($query_arr AS $query_text) {
1146 query($query_text,0);
1147 if (geterrno() != 0) {
1148 echo " <tr>\n <td>Error Adding $table_name Data<br>Error Number: ".geterrno()."<br>Error Description: ".geterrordesc()."</td>\n </tr>\n";
1149 $error = 1;
1150 }
1151 }
1152 }
1153
1154 if ($error) {
1155 echo " <tr>\n <td>There has been an error inserting one or more of the records. Please examine this error and only continue if you are sure it will not effect the install process. Click <a href=\"install.php?step=6\">here</a> to continue or <a href=\"http://www.virtuanews.co.uk\">here</a> to go to the VirtuaNews website</td>\n </tr>\n";
1156 } else {
1157 echo " <tr>\n <td>All tables created correctly, please click <a href=\"install.php?step=6\">here</a> to continue</tr>\n";
1158 }
1159
1160}
1161
1162if ($step == 6) {
1163
1164 echo " <tr>\n <td>Inserting the default templates:</td>\n </tr>\n";
1165
1166 if (!file_exists("admin/virtuanews.set")) {
1167 echo " <tr>\n <td>Cannot find the template file. Please ensure it is uploaded to admin/virtuanews.set When you are sure it is uploaded correctly please refresh this page and continue</td>\n </tr>\n";
1168 echo "</body>\n</html>";
1169 exit;
1170 }
1171
1172 $filesize = @filesize("admin/virtuanews.set");
1173
1174 $fp = @fopen("admin/virtuanews.set","r");
1175 $filecontent = @fread($fp,$filesize);
1176 @fclose($fp);
1177
1178 if (trim($filecontent) == "") {
1179 echo " <tr>\n <td>The template file is not the virtuanews master file, you must upload the master file and then refresh this page to continue.</td>\n </tr>\n";
1180 echo "</body>\n</html>";
1181 exit;
1182 }
1183
1184 $data_arr = explode("|||||",$filecontent);
1185
1186 unset($filecontent);
1187
1188 foreach ($data_arr AS $data) {
1189 $count ++;
1190 if ($count%2 == 1) {
1191 $info[$data] = "";
1192 $last_info = $data;
1193 } else {
1194 $info[$last_info] = $data;
1195 }
1196 }
1197 unset($data_arr);
1198
1199 if (($info[' theme title'] == "!!MASTER!!") & ($info[' page set'] == "!!MASTER!!") & ($info[' style set'] == "!!MASTER!!")) {
1200 $is_master = 1;
1201 } else {
1202 echo " <tr>\n <td>The template file is not the virtuanews master file, you must upload the master file and then refresh this page to continue.</td>\n </tr>\n";
1203 echo "</body>\n</html>";
1204 exit;
1205 }
1206
1207 $pagesetid = "-1";
1208 $stylesetid = "-1";
1209
1210 unset($info[' version']);
1211 unset($info[' theme title']);
1212 unset($info[' style set']);
1213 unset($info[' page set']);
1214
1215 foreach($info AS $title => $data) {
1216
1217 $data = undoescapetext($data);
1218
1219 if (substr($title,0,9) == " page !!!") {
1220 $name = substr($title,9);
1221 if ($name != "") {
1222 if ($file = @fopen("pages/default/".$name.".vnp","w")) {
1223 @fwrite($file,$data);
1224 @$file = fclose($file);
1225 } else {
1226 $error = 1;
1227 }
1228 }
1229 }
1230 }
1231
1232 if ($error) {
1233 echo " <tr>\n <td>There has been an error inserting one or more of the records. Please examine this error and only continue if you are sure it will not effect the install process. Click <a href=\"install.php?step=7\">here</a> to continue or <a href=\"http://www.virtuanews.co.uk\">here</a> to go to the VirtuaNews website</td>\n </tr>\n";
1234 } else {
1235 echo " <tr>\n <td>All templates inserted correctly, please click <a href=\"install.php?step=7\">here</a> to continue</tr>\n";
1236 }
1237
1238}
1239
1240if ($step == 7) {
1241?>
1242 <tr>
1243 <td>Please Enter the following details about your site to set up the options</td>
1244 </tr>
1245 <tr>
1246 <td>If you plan to use a forum on your site it MUST be installed already, also please note there is no easy way of converting between forums so please ensure you set it correct now. If you have any questions about this please contact support at <a href="mailto:support@virtuanews.co.uk">support@virtuanews.co.uk</a>.</td>
1247 </tr>
1248 <tr>
1249 <td>
1250 <form action="install.php" method="post" name="form">
1251 <input type="hidden" name="step" value="8">
1252 <table width="95%" cellpadding="5" cellspacing="0">
1253 <tr>
1254 <td>Site Name:</td>
1255 <td><input type="text" name="sitename" value="" class="form" size="40"></td>
1256 </tr>
1257 <tr>
1258 <td>Home URL:<br><font class="red">Without trailing slash</font></td>
1259 <td><input type="text" name="homeurl" value="http://<?php echo $SERVER_NAME?>" class="form" size="40"></td>
1260 </tr>
1261 <tr>
1262 <td>Webmaster Email:</td>
1263 <td><input type="text" name="webmasteremail" value="webmaster@<?php echo $SERVER_NAME?>" class="form" size="40"></td>
1264 </tr>
1265 <td width="65%"><b>Forum To Use:</b><br>Please select the forums that you have installed on your server so that VirtuaNews can use the member tables from that to save your users having to log in twice. For this to work VirtuaNews must be installed in the same database as your forums and the cookie path must be set so that VirtuaNews can also read and write to users cookies.</td>
1266 <td width="35%">
1267 <input type="radio" name="use_forum" value="" checked="checked"> None<br>
1268 <input type="radio" name="use_forum" value="vb_30"> VBulletin 3.0.x (Note, you must first edit the file includes/forum_vb_30.php for this to work, simply open up the file in a text editor and edit the top section as it instructs<br>
1269 <input type="radio" name="use_forum" value="vb_22"> VBulletin 2.2.x<br>
1270 <input type="radio" name="use_forum" value="vb_20"> VBulletin 2.0.x<br>
1271 <input type="radio" name="use_forum" value="ib_20"> IBforums 2.x.x<br>
1272 <input type="radio" name="use_forum" value="ib_10"> IBforums 1.x.x<br>
1273 <input type="radio" name="use_forum" value="phpbb_20"> phpBB 2.0.x
1274 </td>
1275 </tr>
1276 <tr>
1277 <td>Forum Path:<br><font class="red">Relative to the VirtuaNews index.php file, without trailing slash</font><br>Only needed if you are using a forum on your site.</td>
1278 <td><input type="text" name="forumpath" value="" class="form" size="40"></td>
1279 </tr>
1280 <tr>
1281 <td colspan="2" align="center"><input type="submit" name="submit" value="Submit" class="form"> <input type="reset" name="reset" value="Reset" class="form"></td>
1282 </tr>
1283 </table>
1284 </form>
1285 </td>
1286 </tr>
1287<?php
1288
1289}
1290
1291if ($step == 8) {
1292
1293 if (($sitename == "") | ($homeurl == "") | ($webmasteremail == "")) {
1294 echo " <tr>\n <td>Please enter new values in all the fields on the previous page. Press the back button and correct the error and then try again</tr>\n";
1295 echo "</body>\n</html>";
1296 exit;
1297 }
1298
1299 if (($use_forum == "vn_20") | ($use_forum == "vb_22") | ($use_forum == "ib_10") | ($use_forum == "ib_20") | ($use_forum == "phpbb_20") | ($use_forum == "vb_30")) {
1300 if ($forumpath == "") {
1301 echo " <tr>\n <td>You have sepcified to use the VBulletin user tables, however, you have not set a forum path, you must go back and do so.</tr>\n";
1302 echo "</body>\n</html>";
1303 exit;
1304 }
1305 } elseif (!empty($use_forum)) {
1306 echo " <tr>\n <td>The forum you have specified to use is not supported currently by VirtuaNews, for more information on what forums VirtuaNews supports please view the website <a href=\"http://www.virtuanews.co.uk\" target=\"blank\">here</a>.</tr>\n";
1307 echo "</body>\n</html>";
1308 exit;
1309 }
1310
1311 $query[] = "INSERT INTO news_option VALUES (NULL,'','use_forum','$use_forum','Forum To Use','DO NOT ALTER - It can lead to a major security risk','')";
1312 $query[] = "INSERT INTO news_option VALUES (NULL,'','version','$version','VirtuaNews Version','DO NOT ALTER','')";
1313
1314 $query[] = "INSERT INTO news_option VALUES (NULL,'article','articleanonvote','1','Allow Anonymous Votes','Allow anonymous votes for articles.','yesno')";
1315 $query[] = "INSERT INTO news_option VALUES (NULL,'article','articlerateall','1','Show Rating Options On All Pages','Show the article rating options on all pages, if set to no it will only be displayed on the last page.','yesno')";
1316 $query[] = "INSERT INTO news_option VALUES (NULL,'article','articlesperpage','20','Articles per page','The number of articles listed per page by default','')";
1317
1318 $query[] = "INSERT INTO news_option VALUES (NULL,'comment','allowreport','2','Allow Users To Report Comments','Set who can report comments, when a comment is reported an email will be sent to all staff who have permission to edit that comment informing them about it.','".addslashes("<input type=\\\"radio\\\" name=\\\"option_\$options[varname]\\\" \".iif(\$options[value]==0,\"checked\",\"\").\" value=\\\"0\\\"> No one<br>
1319<input type=\\\"radio\\\" name=\\\"option_\$options[varname]\\\" \".iif(\$options[value]==1,\"checked\",\"\").\" value=\\\"1\\\"> Staff Only<br>
1320<input type=\\\"radio\\\" name=\\\"option_\$options[varname]\\\" \".iif(\$options[value]==2,\"checked\",\"\").\" value=\\\"2\\\"> Registered Users Only<br>
1321<input type=\\\"radio\\\" name=\\\"option_\$options[varname]\\\" \".iif(\$options[value]==3,\"checked\",\"\").\" value=\\\"3\\\"> All Users")."')";
1322 $query[] = "INSERT INTO news_option VALUES (NULL,'comment','commentchrlimit','5000','Comment text length limit','Set a limit to the length of comments on the site to save flooding the page, set to 0 to disable','')";
1323 $query[] = "INSERT INTO news_option VALUES (NULL,'comment','commentemaillimit','40','Comment email length limit','Set a limit to the length of users email addresses that are entered on the comments page to save flooding the page, set to 0 to disable','')";
1324 $query[] = "INSERT INTO news_option VALUES (NULL,'comment','commentreplydefault','1','Comment Reply Default Layout','Set the default layout for the comment reply system, either all replies shown, or all hidden as default.','".addslashes("<input type=\\\"radio\\\" name=\\\"option_\$options[varname]\\\" \".iif(\$options[value]==1,\"checked\",\"\").\" value=\\\"1\\\"> All Replies Hidden<br>
1325<input type=\\\"radio\\\" name=\\\"option_\$options[varname]\\\" \".iif(\$options[value]==2,\"checked\",\"\").\" value=\\\"2\\\"> All Replies Shown")."')";
1326 $query[] = "INSERT INTO news_option VALUES (NULL,'comment','commentreplytext_p','Replies','Reply Text - Plural','Text that will be available to be displayed when there are multiple replies to a comment.','')";
1327 $query[] = "INSERT INTO news_option VALUES (NULL,'comment','commentreplytext_s','Reply','Reply Text - Single','Text that will be available to be displayed when there is a single reply to a comment.','')";
1328 $query[] = "INSERT INTO news_option VALUES (NULL,'comment','commenttext1_p','are','Comment Text 1 - Plural','Text that will be available to be displayed when there are multiple comments.','')";
1329 $query[] = "INSERT INTO news_option VALUES (NULL,'comment','commenttext1_s','is','Comment Text 1 - Single','Text that will be available to be displayed when there is a single comment.','')";
1330 $query[] = "INSERT INTO news_option VALUES (NULL,'comment','commenttext2_p','comments','Comment Text 2 - Plural','Text that will be available to be displayed when there are multiple comments.','')";
1331 $query[] = "INSERT INTO news_option VALUES (NULL,'comment','commenttext2_s','comment','Comment Text 2 - Single','Text that will be available to be displayed when there is a single comment.','')";
1332 $query[] = "INSERT INTO news_option VALUES (NULL,'comment','commentuserlimit','40','Comment username length limit','Set a limit to the length of usernames that are entered on the comments page to save flooding the page, set to 0 to disable','')";
1333 $query[] = "INSERT INTO news_option VALUES (NULL,'comment','displayips','1','Display IPs','You may wish to display users IP address after they have posted a comment. You can select who to display these ips to here','".addslashes("<input type=\\\"radio\\\" name=\\\"option_\$options[varname]\\\" \".iif(\$options[value]==0,\"checked\",\"\").\" value=\\\"0\\\"> Do Not Display IPs<br>
1334<input type=\\\"radio\\\" name=\\\"option_\$options[varname]\\\" \".iif(\$options[value]==1,\"checked\",\"\").\" value=\\\"1\\\"> Only Display To Staff<br>
1335<input type=\\\"radio\\\" name=\\\"option_\$options[varname]\\\" \".iif(\$options[value]==2,\"checked\",\"\").\" value=\\\"2\\\"> Do Not Display To Non-Registered Users<br>
1336<input type=\\\"radio\\\" name=\\\"option_\$options[varname]\\\" \".iif(\$options[value]==3,\"checked\",\"\").\" value=\\\"3\\\"> Display To All Users")."')";
1337 $query[] = "INSERT INTO news_option VALUES (NULL,'comment','enablecommentreply','1','Enable Comment Reply System','Set here whether to enable the comment reply system or not for news posts. Please note, if users have already posted replies to comments they will remain replies unless deleted.','yesno')";
1338 $query[] = "INSERT INTO news_option VALUES (NULL,'comment','iphiddentext','Hidden','Text to hide users ip','Text that will be displayed when a users ip is hidden on the comments page','')";
1339
1340 $query[] = "INSERT INTO news_option VALUES (NULL,'commentedit','allowediting','1','Allow Comment Editing','Allow Editing of comments for registered users, note unregistered users cannot edit comments','yesno')";
1341 $query[] = "INSERT INTO news_option VALUES (NULL,'commentedit','commenteditlock','1','Lock Users Comments After Staff Editing','You can set whether to lock users comments to prevent further editing after a member of staff has edited them.','yesno')";
1342 $query[] = "INSERT INTO news_option VALUES (NULL,'commentedit','commentedittext','1','Show Edited by text','Show the \"Edit by \" text when a user edits a comment','yesno')";
1343 $query[] = "INSERT INTO news_option VALUES (NULL,'commentedit','commentedittextadmin','1','Show Edited By Text For Admin','Show the \"Edit by \" text when an admin edits a comment','yesno')";
1344 $query[] = "INSERT INTO news_option VALUES (NULL,'commentedit','commentedittexttime','180','Time delay for "Edited By xxx" text','Time limit (in seconds) to wait before the "Edited By xxx" text is displayed at the bottom of comments after they have been edited.','')";
1345
1346 $query[] = "INSERT INTO news_option VALUES (NULL,'commentpost','emailreplydefault','1','Enable Email Reply By Default','Have the email notification checked by default on the comments page.','yesno')";
1347 $query[] = "INSERT INTO news_option VALUES (NULL,'commentpost','enableemail','1','Enable Email Notification','Enable the ability for registered users to have emails sent to them when a new comment has been posted to a news post they subscribed to','yesno')";
1348 $query[] = "INSERT INTO news_option VALUES (NULL,'commentpost','logips','3','Log IPs','You may wish to log users IP address when they post a comment. You can log everyones IP, everyones but news posters, only non-registered users, or none at all','".addslashes("<input type=\\\"radio\\\" name=\\\"option_\$options[varname]\\\" \".iif(\$options[value]==0,\"checked\",\"\").\" value=\\\"0\\\"> Do Not Log IPs<br>
1349<input type=\\\"radio\\\" name=\\\"option_\$options[varname]\\\" \".iif(\$options[value]==1,\"checked\",\"\").\" value=\\\"1\\\"> Only Log Non-Registered Users<br>
1350<input type=\\\"radio\\\" name=\\\"option_\$options[varname]\\\" \".iif(\$options[value]==2,\"checked\",\"\").\" value=\\\"2\\\"> Log All But Staff<br>
1351<input type=\\\"radio\\\" name=\\\"option_\$options[varname]\\\" \".iif(\$options[value]==3,\"checked\",\"\").\" value=\\\"3\\\"> Log All IPs")."')";
1352 $query[] = "INSERT INTO news_option VALUES (NULL,'commentpost','msietextarea','80','MSIE Text Area Width','Due To differences in the way Internet Explorer and Netscape display the <textarea> element, you can set the width of the text areas to be displayed for the comment page for the two main browsers here','')";
1353 $query[] = "INSERT INTO news_option VALUES (NULL,'commentpost','nettextarea','50','Netscape Text Area Width','Due To differences in the way Internet Explorer and Netscape display the <textarea> element, you can set the width of the text areas to be displayed for the comment page for the two main browsers here','')";
1354
1355 $query[] = "INSERT INTO news_option VALUES (NULL,'datetime','aboutusdate','d F Y','About Us Date Format','Date format for the about us page, showing the date posters joined, shows server adjusted time<br>Help: <a href=\"http://www.php.net/manual/function.date.php\" target=\"_blank\">PHP Manual</a>','')";
1356 $query[] = "INSERT INTO news_option VALUES (NULL,'datetime','archivedate','H:i','Archive Date Format','Date format for the archive, shows server adjusted time<br>Help: <a href=\"http://www.php.net/manual/function.date.php\" target=\"_blank\">PHP Manual</a>','')";
1357 $query[] = "INSERT INTO news_option VALUES (NULL,'datetime','archiveheaddate','l, d M Y','Archive Header Date Format','This is the time format displayed on the archive page at the top of each days posts, it show the server adjusted time/date<br>Help: <a href=\"http://www.php.net/manual/function.date.php\" target=\"_blank\">PHP Manual</a>','')";
1358 $query[] = "INSERT INTO news_option VALUES (NULL,'datetime','articlesdate','d F Y','Articles date format','Date format for the articles, shows server adjusted time<br>Help: <a href=\"http://www.php.net/manual/function.date.php\" target=\"_blank\">PHP Manual</a>','')";
1359 $query[] = "INSERT INTO news_option VALUES (NULL,'datetime','commentdate',' d M Y - H:i','Comment date format','Date format for the commets, shows server adjusted time<br>Help: <a href=\"http://www.php.net/manual/function.date.php\" target=\"_blank\">PHP Manual</a>','')";
1360 $query[] = "INSERT INTO news_option VALUES (NULL,'datetime','joindateformat','d F Y','Member List Join Date Format','Date format for the memberlist showing join date, shows server adjusted time<br>Help: <a href=\"http://www.php.net/manual/function.date.php\" target=\"_blank\">PHP Manual</a>','')";
1361 $query[] = "INSERT INTO news_option VALUES (NULL,'datetime','newsdate',' d M Y - H:i','News date format','Date format for the news posts, shows server adjusted time<br>Help: <a href=\"http://www.php.net/manual/function.date.php\" target=\"_blank\">PHP Manual</a>','')";
1362 $query[] = "INSERT INTO news_option VALUES (NULL,'datetime','pmdate','d M Y - H:i','Private Message Date','Date format for the private messages, shows server adjusted time<br>Help: <a href=\"http://www.php.net/manual/function.date.php\" target=\"_blank\">PHP Manual</a>','')";
1363
1364 $query[] = "INSERT INTO news_option VALUES (NULL,'format','censorwords','','Censor Words','Enter any words you wish to be censored in any posts (news,comments,articles etc) that are made to your site. Seperate each word by a space, for instance if you wish the sentance "The cat chased the dog" to be replaced with "The *** ***sed the dog" you would enter "cat cha" into the text area. Please note, this is case insensative.','textarea')";
1365 $query[] = "INSERT INTO news_option VALUES (NULL,'format','loggedout_allowhtml','0','Allow HTML - Unregistered Users','Users the use of HTML by unregistered users in their comments.','yesno')";
1366 $query[] = "INSERT INTO news_option VALUES (NULL,'format','loggedout_allowimg','0','Allow [img] - Unregistered Users','Allow the tag [img] to be used by unregistered users in their comments to create images.','yesno')";
1367 $query[] = "INSERT INTO news_option VALUES (NULL,'format','loggedout_allowqhtml','1','Allow Quick HTML - Unregistered Users','Allow quick html to be used by unregistered users in their comments.','yesno')";
1368 $query[] = "INSERT INTO news_option VALUES (NULL,'format','loggedout_allowsmilies','1','Allow Smilies - Unregistered Users','Allow smilies to be used by unregistered users in their comments.','yesno')";
1369 $query[] = "INSERT INTO news_option VALUES (NULL,'format','maximages','10','Maximum Images In Posts','You can set a maximum number of images your users may post in their comments and messages. Set this to 0 to disable it.','')";
1370 $query[] = "INSERT INTO news_option VALUES (NULL,'format','staff_allowhtml','1','Allow HTML - Staff','Allow the use of HTML by staff in their comments and news posts etc.','yesno')";
1371 $query[] = "INSERT INTO news_option VALUES (NULL,'format','staff_allowimg','1','Allow [img] - Staff','Allow the tag [img] to be used by staff in their comments and news posts etc to create images.','yesno')";
1372 $query[] = "INSERT INTO news_option VALUES (NULL,'format','staff_allowqhtml','1','Allow Quick HTML - Staff','Allow quick html to be used by staff in their comments and news posts etc.','yesno')";
1373 $query[] = "INSERT INTO news_option VALUES (NULL,'format','staff_allowsmilies','1','Allow Smilies - Staff','Allow smilies to be used by staff in their comments and news posts etc.','yesno')";
1374 $query[] = "INSERT INTO news_option VALUES (NULL,'format','user_allowhtml','0','Allow HTML - Users','Users the use of HTML by users in their comments.','yesno')";
1375 $query[] = "INSERT INTO news_option VALUES (NULL,'format','user_allowimg','1','Allow [img] - Users','Allow the tag [img] to be used by users in their comments to create images.','yesno')";
1376 $query[] = "INSERT INTO news_option VALUES (NULL,'format','user_allowqhtml','1','Allow Quick HTML - Users','Allow quick html to be used by users in their comments.','yesno')";
1377 $query[] = "INSERT INTO news_option VALUES (NULL,'format','user_allowsmilies','1','Allow Smilies - Users','Allow smilies to be used by users in their comments.','yesno')";
1378
1379 $query[] = "INSERT INTO news_option VALUES (NULL,'general','defaultcat_loggedin','1','Default Category For Registered Users','The default category for the registered user on the site, this is the category they will see if they dont specify a category.','')";
1380 $query[] = "INSERT INTO news_option VALUES (NULL,'general','defaultcat_loggedout','1','Default Category For Unregistered Users','The default category for the unregistered user on the site, this is the category they will see if they dont specify a category. Also, the settings for this category will be used on all sub pages, eg the archive and search pages.','')";
1381 $query[] = "INSERT INTO news_option VALUES (NULL,'general','defaultcat_staff','1','Default Category For Staff','The default category for the staff, this is the category they will see if they dont specify a category.','')";
1382 $query[] = "INSERT INTO news_option VALUES (NULL,'general','forumpath','$forumpath','Bulletin Board Path','Path to the bulletin board on the site. Note the path is relative to the index.php page of VirtuaNews. Please do not include the trailing slash after the path. You may leave this blank if you are using the member tables from VirtuaNews.','')";
1383 $query[] = "INSERT INTO news_option VALUES (NULL,'general','homeurl','$homeurl','Home Page URL','The url of your home page, without the trailing /','')";
1384 $query[] = "INSERT INTO news_option VALUES (NULL,'general','loadlimit','0','Load Limit','On *nix servers you may set a load limit to prevent your server becoming overloaded. A typical setting for a high load would be 5.00. Once the load reaches this point users will no longer be allowed to view the site. Set to 0 to disable it.','')";
1385 $query[] = "INSERT INTO news_option VALUES (NULL,'general','sessionlimit','0','Session Limit','Limit the number of users you may have at any one time on your site. Set to 0 to disable.','')";
1386 $query[] = "INSERT INTO news_option VALUES (NULL,'general','sitename','$sitename','Site title','The title of your site','')";
1387 $query[] = "INSERT INTO news_option VALUES (NULL,'general','siteopen','1','Site active','From time to time you may wish to shut your site, use this option to decide if your site is open. Please note, your site will always remain open to staff.','yesno')";
1388 $query[] = "INSERT INTO news_option VALUES (NULL,'general','startpage','news','Start Page','The option will set what the user first sees when they go to your site on index.php.','')";
1389 $query[] = "INSERT INTO news_option VALUES (NULL,'general','timeoffset','0','Time Zone Offset','Set the time zone that your server is located is so that all times can be adjusted to display GMT.','".addslashes("<select name=\\\"option_\$options[varname]\\\" class=\\\"form\\\">
1390<option value=\\\"-12\\\" \".iif(\$options[value]==-12,\"selected\",\"\").\">(GMT -12:00 hours) Eniwetok, Kwajalein</option>
1391<option value=\\\"-11\\\" \".iif(\$options[value]==-11,\"selected\",\"\").\">(GMT -11:00 hours) Midway Island, Samoa</option>
1392<option value=\\\"-10\\\" \".iif(\$options[value]==-10,\"selected\",\"\").\">(GMT -10:00 hours) Hawaii</option>
1393<option value=\\\"-9\\\" \".iif(\$options[value]==-9,\"selected\",\"\").\">(GMT -9:00 hours) Alaska</option>
1394<option value=\\\"-8\\\" \".iif(\$options[value]==-8,\"selected\",\"\").\">(GMT -8:00 hours) Pacific Time (US & Canada)</option>
1395<option value=\\\"-7\\\" \".iif(\$options[value]==-7,\"selected\",\"\").\">(GMT -7:00 hours) Mountain Time (US & Canada)</option>
1396<option value=\\\"-6\\\" \".iif(\$options[value]==-6,\"selected\",\"\").\">(GMT -6:00 hours) Central Time (US & Canada)</option>
1397<option value=\\\"-5\\\" \".iif(\$options[value]==-5,\"selected\",\"\").\">(GMT -5:00 hours) Eastern Time (US & Canada)</option>
1398<option value=\\\"-4\\\" \".iif(\$options[value]==-4,\"selected\",\"\").\">(GMT -4:00 hours) Atlantic Time (Canada)</option>
1399<option value=\\\"-3.5\\\" \".iif(\$options[value]==-3.5,\"selected\",\"\").\">(GMT -3:30 hours) Newfoundland</option>
1400<option value=\\\"-3\\\" \".iif(\$options[value]==-3,\"selected\",\"\").\">(GMT -3:00 hours) Brazil, Buenos Aires, Georgetown</option>
1401<option value=\\\"-2\\\" \".iif(\$options[value]==-2,\"selected\",\"\").\">(GMT -2:00 hours) Mid-Atlantic</option>
1402<option value=\\\"-1\\\" \".iif(\$options[value]==-1,\"selected\",\"\").\">(GMT -1:00 hours) Azores, Cape Verde Islands</option>
1403<option value=\\\"0\\\" \".iif(\$options[value]==0,\"selected\",\"\").\">(GMT) Western Europe Time, London, Lisbon</option>
1404<option value=\\\"+1\\\" \".iif(\$options[value]==+1,\"selected\",\"\").\">(GMT +1:00 hours) CET(Central Europe Time)</option>
1405<option value=\\\"+2\\\" \".iif(\$options[value]==+2,\"selected\",\"\").\">(GMT +2:00 hours) EET(Eastern Europe Time)</option>
1406<option value=\\\"+3\\\" \".iif(\$options[value]==+3,\"selected\",\"\").\">(GMT +3:00 hours) Baghdad, Kuwait, Riyadh, Moscow</option>
1407<option value=\\\"+3.5\\\" \".iif(\$options[value]==+3.5,\"selected\",\"\").\">(GMT +3:30 hours) Tehran</option>
1408<option value=\\\"+4\\\" \".iif(\$options[value]==+4,\"selected\",\"\").\">(GMT +4:00 hours) Abu Dhabi, Muscat, Baku, Tbilisi</option>
1409<option value=\\\"+4.5\\\" \".iif(\$options[value]==+4.5,\"selected\",\"\").\">(GMT +4:30 hours) Kabul</option>
1410<option value=\\\"+5\\\" \".iif(\$options[value]==+5,\"selected\",\"\").\">(GMT +5:00 hours) Ekaterinburg, Islamabad, Karachi</option>
1411<option value=\\\"+5.5\\\" \".iif(\$options[value]==+5.5,\"selected\",\"\").\">(GMT +5:30 hours) Bombay, Calcutta, Madras</option>
1412<option value=\\\"+6\\\" \".iif(\$options[value]==+6,\"selected\",\"\").\">(GMT +6:00 hours) Almaty, Dhaka, Colombo</option>
1413<option value=\\\"+7\\\" \".iif(\$options[value]==+7,\"selected\",\"\").\">(GMT +7:00 hours) Bangkok, Hanoi, Jakarta</option>
1414<option value=\\\"+8\\\" \".iif(\$options[value]==+8,\"selected\",\"\").\">(GMT +8:00 hours) Beijing, Perth, Singapore, Hong Kong</option>
1415<option value=\\\"+9\\\" \".iif(\$options[value]==+9,\"selected\",\"\").\">(GMT +9:00 hours) Tokyo, Seoul, Osaka, Sapporo</option>
1416<option value=\\\"+9.5\\\" \".iif(\$options[value]==+9.5,\"selected\",\"\").\">(GMT +9:30 hours) Adelaide, Darwin</option>
1417<option value=\\\"+10\\\" \".iif(\$options[value]==+10,\"selected\",\"\").\">(GMT +10:00 hours) EAST(East Australian Standard)</option>
1418<option value=\\\"+11\\\" \".iif(\$options[value]==+11,\"selected\",\"\").\">(GMT +11:00 hours) Magadan, Solomon Islands</option>
1419<option value=\\\"+12\\\" \".iif(\$options[value]==+12,\"selected\",\"\").\">(GMT +12:00 hours) Auckland, Wellington, Fiji</option>
1420</select>")."')";
1421 $query[] = "INSERT INTO news_option VALUES (NULL,'general','webmasteremail','$webmasteremail','Web Master Email','Contact email for the web master of the site','')";
1422
1423 $query[] = "INSERT INTO news_option VALUES (NULL,'ipbanning','banhost','','Hostnames To Ban','You may wish to ban certain host names from your site. Enter them here and they will be matched against the users hostname, seperate each name with a space. Using this option can often result in a delay when loading pages due to PHP being slow at resolving hostnames. We advise that you either keep this as short as possable or enter specific IP\'s to ban.','textarea')";
1424 $query[] = "INSERT INTO news_option VALUES (NULL,'ipbanning','banip','','IP Addresses To Ban','You may wish to ban certain ip address from your site. Enter them here and they will be matched against the users IP address, seperate each address with a space. You may enter a specific IP range by using * eg 125.213.213.* will ban any user with that range.','textarea')";
1425
1426 $query[] = "INSERT INTO news_option VALUES (NULL,'news','archiveperpage','7','Days Per Page On Archive','Number of days to show per page on the archive','')";
1427 $query[] = "INSERT INTO news_option VALUES (NULL,'news','newsallowlogoup','1','Allow Upload Of News Logos','Allow posters to upload news logos to post along with their news posts.','yesno')";
1428 $query[] = "INSERT INTO news_option VALUES (NULL,'news','newsautolock','0','Automatically Lock News','You may set your news posts to automatically lock to prevent further commenting on old news posts. Please enter the number of days old a post must be to be automatically locked, enter 0 to disable it.','')";
1429 $query[] = "INSERT INTO news_option VALUES (NULL,'news','newsedittext','0','Show Edited by text','Show the \"Edited by \" text when a user edits a news post','yesno')";
1430 $query[] = "INSERT INTO news_option VALUES (NULL,'news','newsedittexttime','180','Time delay for "Edited By xxx" text','Time limit (in seconds) to wait before the "Edited By xxx" text is displayed at the bottom of news posts after they have been edited.','')";
1431 $query[] = "INSERT INTO news_option VALUES (NULL,'news','newslogooverwrite','0','Allow Logos To be Overwritten','Set whether to allow staff to overwrite news logos when they upload new ones.','yesno')";
1432 $query[] = "INSERT INTO news_option VALUES (NULL,'news','newslogoupsize','102400','Maximum Size Of Logo Uploads','Set the maximum size in bytes that a member of staff may upload for use in news posts. Enter 0 to enable any sized uploads, (1 KB = 1024 bytes and 1 MB = 1048576 bytes).','')";
1433 $query[] = "INSERT INTO news_option VALUES (NULL,'news','newslogouptype','gif jpg png bmp jpeg','Valid Extentions Of Logo Uploads','Please specify the types of files that staff may upload to display as news logos. Seperate each entry with a space, eg "gif jpg" would only allow .gif and .jpg files to be uploaded.','')";
1434 $query[] = "INSERT INTO news_option VALUES (NULL,'news','newsperpage','15','News Posts Per Page','Set the number of news posts to display on the front page','')";
1435 $query[] = "INSERT INTO news_option VALUES (NULL,'news','showsubcatlist','0','Show Sub Categories On Cat List','You can display the sub categories to the category being viewed on the category listing, use this options to set whether to allow it or not.','yesno')";
1436
1437 $query[] = "INSERT INTO news_option VALUES (NULL,'output','cookiedomain','','Cookie Domain','Set the domain to save cookies under.','')";
1438 $query[] = "INSERT INTO news_option VALUES (NULL,'output','cookiepath','/','Cookie Path','Path to save cookies. Please note, if you are using VBulletin user tables then this option MUST be the same as your VBulletin setting, and set to a path that both VirtuaNews and VBulletin can access (eg. / NOT /vbulletin/).','')";
1439 $query[] = "INSERT INTO news_option VALUES (NULL,'output','gziplevel','1','GZip Level','Set the level of compression (between 1 and 9) for gzipping your pages, higher values will increase server load drimatically.','')";
1440 $query[] = "INSERT INTO news_option VALUES (NULL,'output','gzipoutput','0','GZip output','If enabled then all pages will be compressed using the gzip funtion, this will save bandwidth on your site, however, it will increase server load. Please note your server must support gzip for this function to work (no error will be generated if you enable this and your server does not support gzip).','yesno')";
1441 $query[] = "INSERT INTO news_option VALUES (NULL,'output','nocacheheaders','0','Force Refreshing of Pages Automatically','If enabled then VirtuaNews will send headers to the users browsers preventing them from caching any pages on your site, effectively forcing the user to refresh the page every time they visit.','yesno')";
1442 $query[] = "INSERT INTO news_option VALUES (NULL,'output','useredirects','1','Use Redirect Page','After a user submits something to the site they are redirected to a different place, by default a page saying "Thank You, you are being redirected to..." is displayed, you can turn this off and users will be redirected immediatly without seeing anything. You can use this to save on time or bandwidth.','yesno')";
1443
1444 $query[] = "INSERT INTO news_option VALUES (NULL,'pm','allowpms','2','Allow Private Messaging','Set who can use the private message system.','".addslashes("<input type=\\\"radio\\\" name=\\\"option_\$options[varname]\\\" \".iif(\$options[value]==0,\"checked\",\"\").\" value=\\\"0\\\"> No One<br>
1445<input type=\\\"radio\\\" name=\\\"option_\$options[varname]\\\" \".iif(\$options[value]==1,\"checked\",\"\").\" value=\\\"1\\\"> Staff Only<br>
1446<input type=\\\"radio\\\" name=\\\"option_\$options[varname]\\\" \".iif(\$options[value]==2,\"checked\",\"\").\" value=\\\"2\\\"> All Registered Users Only")."')";
1447 $query[] = "INSERT INTO news_option VALUES (NULL,'pm','getpmmsg','1','Display Private Messages','Get the users private message details (logged in users only) eg. how many messages in their inbox, to be displayed on the site','yesno')";
1448 $query[] = "INSERT INTO news_option VALUES (NULL,'pm','pmcharlimit','5000','Private Message Character Limit','Set the how long private messages may be. Set to 0 to disable it.','')";
1449 $query[] = "INSERT INTO news_option VALUES (NULL,'pm','pmcountsent','1','Count Sent Messages Towards Limit','If set to yes then messages users have stored that they have sent will be counted towards theit PM limit. If set to no then users can have as many sent messages stored as they wish.','yesno')";
1450 $query[] = "INSERT INTO news_option VALUES (NULL,'pm','pmlimitstaff','100','PM Limit For Staff','Limit the number of pm\'s staff may have stored. Set to 0 to disable it.','')";
1451 $query[] = "INSERT INTO news_option VALUES (NULL,'pm','pmlimituser','50','PM Limit For Users','Set the number of PM\'s ordinary users may have stored. Set to 0 to disable it.','')";
1452 $query[] = "INSERT INTO news_option VALUES (NULL,'pm','pmperpage','20','Private Messages Displayed Per Page','Set the number of pm\'s to be displayed per page for users.','')";
1453
1454 $query[] = "INSERT INTO news_option VALUES (NULL,'polls','pollanonvote','1','Allow Anonymous Votes','Allow anonymous votes for polls.','yesno')";
1455 $query[] = "INSERT INTO news_option VALUES (NULL,'polls','pollsperpage','10','Polls shown per page','The number of polls shown on the summary page for all the polls','')";
1456
1457 $query[] = "INSERT INTO news_option VALUES (NULL,'recentpost','recentpostchr','35','Recent Post Characters','You can limit the number of characters there will be in the titles shown on the recent post, to prevent long titles from making the layout look incorrect, set this number of characters here','')";
1458 $query[] = "INSERT INTO news_option VALUES (NULL,'recentpost','recentpostcount','5','Number Of Recent Posts','Number of recent posts to show in the table','')";
1459
1460 $query[] = "INSERT INTO news_option VALUES (NULL,'search','allowsearch','1','Allow Searches','Allow searches through the news on the site','yesno')";
1461 $query[] = "INSERT INTO news_option VALUES (NULL,'search','highlightsearch','1','Highlight Search Phrase','If set this will highlight the search phrase if found in the title of the results red','yesno')";
1462 $query[] = "INSERT INTO news_option VALUES (NULL,'search','searchperpage','40','Search results shown per page','The number of search results shown per page by default','')";
1463
1464 $query[] = "INSERT INTO news_option VALUES (NULL,'sitejump','showsitejump','0','Show Site Jump','You cant set whether or not to show the site jump on your pages, this is used to allow your users to quickly jump to places on your site.','yesno')";
1465 $query[] = "INSERT INTO news_option VALUES (NULL,'sitejump','sitejump_newsposts','15','News Posts To List','Set the number of recent news posts to list in the site jump.','')";
1466 $query[] = "INSERT INTO news_option VALUES (NULL,'sitejump','sitejump_shownews','0','Show News In Site Jump','If set to yes then the site jump will show a list of recent news in the current category to jump to.','yesno')";
1467
1468 $query[] = "INSERT INTO news_option VALUES (NULL,'stats','allowstats','1','Allow Stats To Be Viewed','Allow the stats page to be viewed by users, the stats page contains the information on browsers and operating systems of the visitors to the site. Note, this feature is always available in the admin section for posters','yesno')";
1469 $query[] = "INSERT INTO news_option VALUES (NULL,'stats','dohttpreferer','1','Count HTTP Referers','Use the built in function to count HTTP referes to your site, see who links to your site','yesno')";
1470 $query[] = "INSERT INTO news_option VALUES (NULL,'stats','dositestats','1','Use site counter','Use the built in hit counter, it this is not enabled, then no stats features will work at all','yesno')";
1471 $query[] = "INSERT INTO news_option VALUES (NULL,'stats','sessiontimeout','900','User session time out','The length of time before a users session times out (in seconds), used to detirmine how many users are online at any one time','')";
1472
1473 $query[] = "INSERT INTO news_option VALUES (NULL,'user','allowmultiplesignups','0','Allow Multiple Sign Ups','If enabled then your users will be able to sign up to your site multiple times, if not they can only register once.','yesno')";
1474 $query[] = "INSERT INTO news_option VALUES (NULL,'user','allowsignup','1','Allow New Users','Allow new users to sign up to your site.','yesno')";
1475 $query[] = "INSERT INTO news_option VALUES (NULL,'user','allowuserprofile','1','Allow Viewing Of User Profiles','Set whether you wish to allow users to view each others profiles or not.','yesno')";
1476 $query[] = "INSERT INTO news_option VALUES (NULL,'user','allowusersigs','1','Allow User Signatures','Set whether to allow user signatures or not with posts. Only available for registered users, note, will work for VBulletin users as well.','yesno')";
1477 $query[] = "INSERT INTO news_option VALUES (NULL,'user','enablememberlist','1','Enable Member List','If set to yes then users will be able to view the member list showing details of all the members on your site.','yesno')";
1478 $query[] = "INSERT INTO news_option VALUES (NULL,'user','memberlistperpage','30','Members Shown Per Page','Set the number of members shown per page on the member list.','')";
1479 $query[] = "INSERT INTO news_option VALUES (NULL,'user','newuseremail','0','Email Staff About New Users','If enabled then staff who have permission to edit the users of your site will be emailed when a new user registeres.','yesno')";
1480 $query[] = "INSERT INTO news_option VALUES (NULL,'user','requireuniqueemail','0','Require Unique Email Address','If enabled then new users signing up will be forced to enter a unique email address.','yesno')";
1481 $query[] = "INSERT INTO news_option VALUES (NULL,'user','requirevalidemail','1','Require Valid Email Address','If enabled then new users will be required to activate their email address before they are a valid member in order to confirm their address.','yesno')";
1482 $query[] = "INSERT INTO news_option VALUES (NULL,'user','usememberemail','2','Use Member Email Form','Set whether users can use the email form allowing them to email other users (is not possable if user has specified to hide their email). If this is disabled then users will not be able to contact other users by email.','".addslashes("<input type=\\\"radio\\\" name=\\\"option_\$options[varname]\\\" \".iif(\$options[value]==0,\"checked\",\"\").\" value=\\\"0\\\"> None<br>
1483<input type=\\\"radio\\\" name=\\\"option_\$options[varname]\\\" \".iif(\$options[value]==1,\"checked\",\"\").\" value=\\\"1\\\"> Staff Only<br>
1484<input type=\\\"radio\\\" name=\\\"option_\$options[varname]\\\" \".iif(\$options[value]==2,\"checked\",\"\").\" value=\\\"2\\\"> Registered Users Only<br>
1485<input type=\\\"radio\\\" name=\\\"option_\$options[varname]\\\" \".iif(\$options[value]==3,\"checked\",\"\").\" value=\\\"3\\\"> All Users")."')";
1486 $query[] = "INSERT INTO news_option VALUES (NULL,'user','usermoderation','0','Require User Moderation','If enabled then when a new user signs up to your site they will not be a full member till their account is moderated by a poster.','yesno')";
1487 $query[] = "INSERT INTO news_option VALUES (NULL,'user','usersubperpage','30','User Subscribe Posts Per Page','Set the number of posts to display on the user panel showing the posts users have subscribed to.','')";
1488
1489 echo " <tr>\n <td>Inserting the option data into the VirtuaNews tables</tr>\n";
1490
1491 while (list($key,$query_text) = each($query)) {
1492 query($query_text,0);
1493 if (geterrno() != 0) {
1494 echo " <tr>\n <td>Error Adding Option Data<br>Error Number: ".geterrno()."<br>Error Description: ".geterrordesc()."</td>\n </tr>\n";
1495 $error = 1;
1496 }
1497 }
1498
1499 if ($error) {
1500 echo " <tr>\n <td>There has been an error inserting one or more of the records. Please examine this error and only continue if you are sure it will not effect the install process. Click <a href=\"install.php?step=9\">here</a> to continue or <a href=\"http://www.virtuanews.co.uk\">here</a> to go to the VirtuaNews website</td>\n </tr>\n";
1501 } else {
1502 echo " <tr>\n <td>All options inserted correctly, please click <a href=\"install.php?step=9\">here</a> to continue</tr>\n";
1503 }
1504
1505}
1506
1507if ($step == 9) {
1508
1509 $get_options = query("SELECT varname,value FROM news_option WHERE varname IN ('use_forum','forumpath')");
1510 while ($option_arr = fetch_array($get_options)) {
1511 ${$option_arr[varname]} = $option_arr[value];
1512 }
1513
1514 include("includes/functions.php");
1515
1516 if (!empty($use_forum)) {
1517 include("includes/forum_".strtolower(trim($use_forum)).".php");
1518
1519 if ($userinfo = validateuser($userid,$userpassword)) {
1520?>
1521 <tr>
1522 <td>
1523 <form action="install.php" method="post" name="form">
1524 <input type="hidden" name="step" value="10">
1525 <table width="95%" cellpadding="5" cellspacing="0">
1526 <tr>
1527 <td colspan="2">Please confirm the following details, they have been taken from your cookies which you are logged into your forums with. If they are not correct, please login to your forums with the correct details then refresh this page.</td>
1528 </tr>
1529 <tr>
1530 <td>Username:</td>
1531 <td><?php echo $userinfo[username];?></td>
1532 </tr>
1533 <tr>
1534 <td>Email Address:</td>
1535 <td><?php echo $userinfo[email];?></td>
1536 </tr>
1537 <tr>
1538 <td colspan="2"><input type="submit" name="submit" value="Submit" class="form"></td>
1539 </tr>
1540 </table>
1541 </form>
1542 </td>
1543 </tr>
1544<?php
1545 } else {
1546 echo " <tr>\n <td>You are not logged in correctly to your forums and you have selected to use user tables from your forums, you must first be logged in correctly as a registered user on the forums before you can be added as the administrator to VirtuaNews. Please log in then refresh this page</td>\n </tr>\n</table>\n</body>\n</html>";
1547 exit;
1548 }
1549
1550 } else {
1551?>
1552 <tr>
1553 <td>
1554 <form action="install.php" method="post" name="form">
1555 <input type="hidden" name="step" value="10">
1556 <table width="95%" cellpadding="5" cellspacing="0">
1557 <tr>
1558 <td colspan="2">Please enter the following details to set you up as a staff member.</td>
1559 </tr>
1560 <tr>
1561 <td>Username:</td>
1562 <td><input type="text" name="username" size="40" class="form"></td>
1563 </tr>
1564 <tr>
1565 <td>Password:</td>
1566 <td><input type="text" name="password" size="40" class="form"></td>
1567 </tr>
1568 <tr>
1569 <td>Email Address:</td>
1570 <td><input type="text" name="email" size="40" class="form"></td>
1571 </tr>
1572 <tr>
1573 <td colspan="2"><input type="submit" name="submit" value="Submit" class="form"></td>
1574 </tr>
1575 </table>
1576 </form>
1577 </td>
1578 </tr>
1579<?php
1580 }
1581}
1582
1583if ($step == 10) {
1584
1585 $get_options = query("SELECT varname,value FROM news_option WHERE varname IN ('use_forum','forumpath')");
1586 while ($option_arr = fetch_array($get_options)) {
1587 ${$option_arr[varname]} = $option_arr[value];
1588 }
1589
1590 include("includes/functions.php");
1591
1592 if (!empty($use_forum)) {
1593 include("includes/forum_".strtolower(trim($use_forum)).".php");
1594
1595 if ($userinfo = validateuser($userid,$userpassword)) {
1596 $username = $userinfo[username];
1597 $password = $userpassword;
1598 $email = $userinfo[email];
1599 } else {
1600 echo " <tr>\n <td>You are not logged in correctly to your forums and you have selected to use user tables from your forums, you must first be logged in correctly as a registered user on the forums before you can be added as the administrator to VirtuaNews. Please log in then refresh this page</td>\n </tr>\n</table>\n</body>\n</html>";
1601 exit;
1602 }
1603 } else {
1604 include("includes/forum_vn.php");
1605 $userid = 1;
1606 $password = md5($password);
1607 }
1608
1609 query("INSERT INTO news_user VALUES ('1','$username','$password','$email','1','','','','','','1','1','".time()."','0','1','1','1','1','1','0')");
1610 query("INSERT INTO news_userfield VALUES (1,'','','','')");
1611 query("INSERT INTO news_staff VALUES ('1','$userid','Admin','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1')");
1612
1613 include("includes/adminfunctions.php");
1614 include("includes/writefunctions.php");
1615
1616 saveoptions();
1617 $cat_arr = getcat_arr();
1618 $theme_arr = getthemearr();
1619 $timeoffset = $timeoffset * 3600;
1620 $defaultcategory = 1;
1621
1622 $themeid = 1;
1623 $pagesetid = 1;
1624
1625 writeallpages();
1626
1627 echo " <tr>\n <td>You have now completed the install of VirtuaNews, the control pannel can be found <a href=\"admin.php\">here</a>, available once you have deleted this install file.</td>\n </tr>\n";
1628
1629}
1630?>
1631</table>
1632</body>
1633</html>