Location: PHPKode > projects > Lame Node System > lns-0.6-11/include/header.php.inc
<?php

/************************************************************************
 *																		*
 * Copyright (C) 2001 Stuart Reeves										*
 *																		*
 * This program is free software; you can redistribute it and/or		*
 * modify it under the terms of the GNU General Public License			*
 * as published by the Free Software Foundation; either version 2		*
 * of the License, or (at your option) any later version.				*
 *																		*
 * This program is distributed in the hope that it will be useful,		*
 * but WITHOUT ANY WARRANTY; without even the implied warranty of		*
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the			*
 * GNU General Public License for more details.							*
 * 																		*
 * The GNU General Public License is available from:					*
 * http://www.gnu.org/copyleft/gpl.html									*
 *																		*
 ************************************************************************/

/* Stuart's lns (lame node system) */


// Version
define(VERSION, 				"0.6-11");
define(VERSION_NAME,			"captivish");


// Database connect info
define(HOSTNAME, 				"");
define(USERNAME, 				"");
define(PASSWORD, 				"");
define(DB_NAME, 				"");


// Table information
define(NODE_TABLE,  			"nodes");
define(AUTHINFO_TABLE,			"authinfo");


// Table creation queries
define(CREATE_NODE_TABLE, 		"CREATE TABLE " . NODE_TABLE . " (
									nodename 	VARCHAR(200) NOT NULL, 
									link 		VARCHAR(255), 
						  			ts  		TIMESTAMP NOT NULL, 
									author  	VARCHAR(200),
			  						contact 	VARCHAR(80), 
									text 		MEDIUMTEXT,
			  						protected 	CHAR,
									hidden		CHAR,
									username	VARCHAR(50),
									rawtype		VARCHAR(10),
									metatype	VARCHAR(50),
									FULLTEXT 	(nodename, text))");
							
define(CREATE_AUTHINFO_TABLE, 	"CREATE TABLE " . AUTHINFO_TABLE . " (
									ts			TIMESTAMP NOT NULL,
									created		TIMESTAMP NOT NULL,
									username 	VARCHAR(50) NOT NULL,
									password 	VARCHAR(50) NOT NULL,
									email		VARCHAR(100),
									website 	VARCHAR(150),
									profile 	TEXT,
									superuser	CHAR default 'f',
									loginstate	CHAR default 'f')");
	
	
// The default front page
define(HOME_NODE, 				"home");

// Predefined (reserved) nodes
// NOTE: you must add any new ones into the init script defines below
define(HELP_NODE,				"help");				// Site documentation
define(SUBMIT_NODE, 			"submit");
define(SEARCH_NODE, 			"search");
define(PREFERENCES_NODE,		"preferences");
define(NEW_USER_NODE,			"new user");
define(LOGIN_NODE,				"login");
define(LOGOUT_NODE,				"logout");
define(FINGER_NODE,				"finger");
define(LIST_NODE,				"list nodes");
define(WHO_NODE,				"who");


// Reserved node list for the init script
// NOTE: this is a variable, not a constant; any new hidden nodes must
// be added to this array
$HIDDEN_NODES = array (SUBMIT_NODE, 
					   SEARCH_NODE,
					   LIST_NODE,
					   WHO_NODE,
					   HELP_NODE,
					   NEW_USER_NODE,
					   PREFERENCES_NODE,
					   LOGIN_NODE,
					   LOGOUT_NODE,
					   FINGER_NODE); 	


// Default node raw types
define(RAWTYPE_DEFAULT, 		"plain");
define(RAWTYPE_IMAGE, 			"image");
define(RAWTYPE_EXT_LINK, 		"external");


// Default node meta-types
define(METATYPE_DEFAULT, 		"plain");
define(METATYPE_HOME,			"home");

// User-defined and default meta-types
$NODE_METATYPES = array (METATYPE_DEFAULT,
						 METATYPE_HOME,
						 "weblog",
						 "review",
						 "discussion",
						 "definition",
						 "encyclopedia");


// HTML specifics
define(HTML_TITLE,  				"PAGE TITLE GOES HERE");
define(COPYTEXT, 					"COPYTEXT GOES HERE");


// Search types passed through search form
define(SEARCH_NODENAME, 			"nodename");
define(SEARCH_TEXT, 				"text");
define(SEARCH_ALL,  				"all");
define(SEARCH_LOGICAL_OR, 			"or");
define(SEARCH_LOGICAL_AND,  		"and");


// Display options for the value of $listmode passed to the main page
define(SHOW_EXTERNAL_LINKS,			"extlinks");
define(SHOW_DISTINCT_NODES, 		"distinct");
define(SHOW_LATEST_NODES,			"latest");
define(SHOW_NODES_BY_TS,			"bytimestamp");

// Reserved node data
define(LAST_NODES_CREATED,  	 	15);			// Display last 15 nodes created on front page
define(SHOW_LATEST_NODES_MAXAGE,  	20); 			// 20 days old 


// Images
define(IMAGE_THUMB_PATH, 			"thumbnails");
define(IMAGE_SCALE_FACTOR_X, 		4);
define(IMAGE_SCALE_FACTOR_Y, 		4);


// NodeSearch
define(IMAGE_TYPES, 				"/png|gif|jpg|bmp|jpeg/");
define(SEARCH_REPLACE,  			"/'|-|\|\"/"); // Replace these characters in a search
define(SEARCH_TRUNCATE_CHARS_AFTER, 500);		   // Truncate nodetexts after this number of chars


// UserInput
define(ALLOWED_NODENAME_CHARS, 		"\w\d\s\+\=\{\}\-\.\^\&\$\'\`\!;:,");
define(NODE_PARSE_REGEXP,			"/\[([" . ALLOWED_NODENAME_CHARS . "]+)(\|)([" . 
										ALLOWED_NODENAME_CHARS . "]*)\]/");
define(NODE_PARSE_REPLACE,  	 	"<a title=\"$1\" href=\"?node=$1\">$3</a>");
define(NODE_PARSE_REGEXP2,			"/\[([" . ALLOWED_NODENAME_CHARS . "]+)\]/");
define(NODE_PARSE_REPLACE2, 		"<a title=\"$1\" href=\"?node=$1\">$1</a>");

define(ALLOWED_HTML, 			 	"<br><br/><em><quote><strong><tt><b><i><pre><u><s><big><small>
									 <sup><sub><span><dl><dd><dt><ul><ol><li>");
define(DISALLOWED_CONTACT_CHARS, 	"/'|\"|\s/");
define(DISALLOWED_NODENAME_CHARS, 	"/\\\|\£|\#|\%/");
define(DISALLOW_NODETEXT_HTML,		false);


// Reverse regular expression of NODE_PARSE_* (used with callback)
define(NODE_UNPARSE_REGEXP, 		"/<a[\=\"\?" . ALLOWED_NODENAME_CHARS . "]*node\=([" . 
										ALLOWED_NODENAME_CHARS . "]*)\"*>([" . 
										ALLOWED_NODENAME_CHARS . "]*)<\/a>/i");


// HTML themes
define(THEME_PATH,  				"themes");
define(DEFAULT_THEME, 				"default");
define(THEME_HEADER_FILE, 			"header.html");
define(THEME_FOOTER_FILE, 			"footer.html");
define(THEME_NODE_CONTENT_FILE,		"nodecontent.html");
define(THEME_NODE_MINIVIEW_FILE,	"miniview.html");
define(HEADER_COMMENT,  			"
	<!-- 						-->
	<!-- 	page created by lns " . VERSION . " [" . VERSION_NAME . "]	-->
	<!--						-->
	<!--	lns created by Stuart Reeves when he	-->
	<!--	should have been doing work...		-->
	<!-- 						-->
");


// Miscellaneous
define(REPORT_GEN_TIME, 	  	false);

// Authentication 
define(ENABLE_AUTHENTICATION, 	true);
define(ENABLE_ANONYMOUS_USERS,	true);

// Generated password lengths
define(GEN_PASSWORD_MIN, 	  	6);
define(GEN_PASSWORD_MAX, 	  	12);

// Password encryption
define(MD5_PASSWORD,			true);


?>

Return current item: Lame Node System