load($entries_fn); $xp = new DOMXPath($dom); $xp->registerNamespace("svn", "svn:"); $entries = $xp->query("//svn:entry[1]"); if ($entries->length) { $entry = $entries->item(0); $url = $xp->query("@url", $entry)->item(0)->nodeValue; $rev = $xp->query("@revision", $entry)->item(0)->nodeValue; $svn_text = "svn r$rev"; } else { $svn_text = 'svn xml?'; } } elseif (is_numeric($line)) { // post v1.4 entries file? fgets($f); fgets($f); $rev = trim(fgets($f)); $url = trim(fgets($f)); if (is_numeric($rev) && preg_match("/^http/", $url)) { $svn_text = "svn r$rev"; } else $svn_text = 'svn new?'; } else { $svn_text = "svn fmt?"; } } $eop_text .= " [$svn_text]"; } // now drop timing and anything else we want to show at the bottom of the page return str_replace("", $eop_text, $html); } if (!defined("PA_DISABLE_BUFFERING")) { ob_start("pa_end_of_page_ob_filter"); } /* turn off magic quotes as much as possible */ function stripslashes_deep($value) { $value = is_array($value) ? array_map('stripslashes_deep', $value) : stripslashes($value); return $value; } function killslashes() { if (defined("SLASHES_KILLED")) return; // no magic quotes, thanks! set_magic_quotes_runtime(0); if (get_magic_quotes_gpc()) { $_POST = stripslashes_deep($_POST); $_GET = stripslashes_deep($_GET); $_REQUEST = stripslashes_deep($_REQUEST); $_COOKIE = stripslashes_deep($_COOKIE); } define("SLASHES_KILLED", TRUE); } killslashes(); /* load configuration. procedure: 1. load local_config.php, or fail if it cannot be found. 2. detect network name and work out $base_url (which contains a template parameter in local_config.php). 2. check for a local_config.php (at $path_prefix/networks/$network_prefix/local_config.php) for the current network, and load that if it exists. */ function local_config_error($err) { ?>
Here is a sample local_config.php file:
Your $ls_fn file is missing a declaration for \$$varname.
Your local_config.php or project_config.php contains a definition for \$$oldvar (setting it to '".htmlspecialchars($$oldvar)."'). This is deprecated and should be replaced by $newvar.
e.g. $newvar = '".htmlspecialchars(str_replace("'", "\'", $$oldvar))."';
Your \$base_url variable needs to include the text %network_name% or spawning will not work.
Your \$domain_suffix variable must not start with a period.
Unable to locate network ..
Please edit local_config.php and remove the line that looks like this:
define("CURRENT_DB", "");
I can't find a database name in here: .
The $current_theme_rel_path variable (set to ) seems to be incorrect. The current setting indicates that the theme directory should be accessible at or , but it doesn't seem to be.
Check your local_config.php file.
1) { array_shift($domain_bits); } $domain_suffix = implode(".", $domain_bits); $base_url = "http://%network_name%.$domain_suffix"; for ($tries = 0; ($tries < 100) && (strpos($fn, "/web") !== FALSE); ++$tries) { if (strrpos($fn, "/web") == strlen($fn) - 4) { $uri = rtrim($uri, "/"); $base_url .= $uri; break; } $fn = dirname($fn); $uri = dirname($uri); } // format results as a local_config.php file return '<?php // database connection string $peepagg_dsn = "mysql://user:password@server/databasename"; // where to log messages and errors. note that this file must be writeable by the web server. $logger_logFile = "$path_prefix/log/pa.log"; // url of the "web" directory $base_url = "'.$base_url.'"; // the constant part of the domain (such that if we chop this off the server name, we should get the network name). $domain_suffix = "'.$domain_suffix.'"; ?>
(except with your own database details).
'; } define('TAG_TYPE_COLLECTION',1); define('TAG_TYPE_CONTENT',2); define('DEFAULT_TAG_SOUP_SIZE',1); // Constants for forums define('PARENT_TYPE_CATEGORY','category'); define('PARENT_TYPE_COLLECTION','collection'); define('PARENT_TYPE_NEWS','news'); define('PARENT_TYPE_MESSAGE','message'); //.... Constants for forums define('ALPHA_USERNAME', 'paalpha'); define('ALPHA_PASSWORD', 'paalpha'); // Debug $debug_for_user = TRUE; define('SB_DIR_NAME','sb-files'); define('SB_UPLOAD_DIR',"$path_prefix/web/".SB_DIR_NAME); define('SB_UPLOAD_URL',"$base_url/".SB_DIR_NAME); define('SB_MC_LOCATION',"$path_prefix/MCdescriptions"); define('DESCRIPTION_LENGTH', 300); /* This will set the maximum numbers of characters to be displayed on a line */ define('CHUNK_LENGTH', 26); define('LONGER_CHUNK_LENGTH', 60); define('TITLE_LENGTH', 38); define('GROUP_TITLE_LENGTH', 18); define('GROUP_TITLE_LENGTH_LONG', 25); define('COMMENT_LENGTH', 30); define('NAME_LENGTH', 15); /* Array for displaying messages in Community blog & My page . */ $post_type_message = array( 'all'=>array('message' => 'No content published.'), 'blog'=>array('message' => 'No blog posts published.'), 'event'=>array('message' => 'No events published.', 'queryString' => 'sb_mc_type=event/generic'), 'review'=>array('message' => 'No reviews published.', 'queryString' => 'sb_mc_type=review/localservice'), 'people_showcase'=>array('message' => 'No People Showcases published.', 'queryString' => 'sb_mc_type=showcase/person'), 'video'=>array('message' => 'No video published.', 'queryString' => 'sb_mc_type=media/video'), 'audio'=>array('message' => 'No audio published.', 'queryString' => 'sb_mc_type=media/audio'), 'image'=>array('message' => 'No image published.', 'queryString' => 'sb_mc_type=media/image'), 'group_showcase'=>array('message' => 'No Group Showcase published.', 'queryString' => 'sb_mc_type=showcase/group') ); /* This array has all the fields in which we will allow the basic html tags */ $allow_html_in_fields = array( 'description'=>'description', '/event/description'=>'/event/description', '/media/description'=>'/media/description', '/review/description'=>'/review/description', '/review/subject/activities'=>'/review/subject/activities', '/review/subject/touristspots'=>'/review/subject/touristspots', '/review/subject/historiclocations'=>'/review/subject/historiclocations', '/group/description'=>'/group/description', '/group/quote'=>'/group/quote', '/group/principles'=>'/group/principles', '/showcase/description'=>'/showcase/description', '/showcase/contributions'=>'/showcase/contributions', '/showcase/quote'=>'/showcase/quote', '/showcase/wishlist"'=>'/showcase/wishlist', '/showcase/movies'=>'/showcase/movies', '/showcase/books'=>'/showcase/books', '/showcase/musicians'=>'/showcase/musicians', '/showcase/food'=>'/showcase/food', 'groupdesc'=>'groupdesc', 'comment'=>'comment', 'body'=>'body' ); $outputthis_error_message = "You haven't specified any external blogs. Log on to OutputThis.org to specify targets"; define('OUTPUTTHIS_ERROR_MESSAGE', $outputthis_error_message); // Ping Server URL $ping_server = "$base_url/Ping/ping.php"; //Constant for Ping Server to define the type of activity define('PA_ACTIVITY_USER_ADDED', 1); define('PA_ACTIVITY_CONTENT_ADDED', 2); define('PA_ACTIVITY_GROUP_ADDED', 3); define('PA_ACTIVITY_NETWORK_ADDED', 4); // for query count $query_count_on_page = 0; $query_count_array = array(); define('FANCY_URL',0);//used to turn on or off the fancy url = now it will display fancy url // This array has the field names in which HTML tags are allowed. $tags_allowed_in_fields = array( 'description'=>true, 'groupdesc'=>true, 'network_description'=>true, 'comment'=>true, 'forum_contents'=>true, 'ad_script'=>true ); // internationalization - load messages $strings_file = "$path_prefix/web/languages/".PA::$language."/strings.php"; if (file_exists($strings_file)) { require_once $strings_file; } else { // Either an invalid language was selected, or one (e.g. English) without a strings.php file. $TRANSLATED_STRINGS = array(); } // translate string $s into the current language (specified by PA::$language, which can be changed in local_config.inc). function __($s) { // If we have a translated string, return it. global $TRANSLATED_STRINGS; if (isset($TRANSLATED_STRINGS[$s]) && !preg_match("/^\s*$/", $TRANSLATED_STRINGS[$s])) { return $TRANSLATED_STRINGS[$s]; } // No string found. if (defined("PA_LANG_DEBUG")) { return "[$s]"; } // Not debugging - just return English string. return $s; } // translate string and count into the current language. /* e.g. _n(";You have %d relations. 1;You have one relation. 0;You have no relations yet!", 42) == "You have 42 relations." */ function _n($fmt, $n) { $n = (int)$n; // See if we have a translated string global $TRANSLATED_STRINGS; if (isset($TRANSLATED_STRINGS[$fmt]) && !preg_match("/^\s*$/", $TRANSLATED_STRINGS[$fmt])) { $fmt = $TRANSLATED_STRINGS[$fmt]; $show_brackets = FALSE; } else { // Put square brackets around the response if we are debugging - looking for places to translate or strings that need marking $show_brackets = defined("PA_LANG_DEBUG"); } $translation = NULL; foreach (preg_split("/\n/", $fmt) as $line) { $line = trim($line); if (!$line) continue; if (!preg_match("/^(\d*)(?:\-(\d+))?;(.*)$/", $line, $m)) throw new PAException(GENERAL_SOME_ERROR, "Invalid line format for _n(): '$line'"); list(, $first, $last, $txt) = $m; if ($first === "") { // default, e.g. ;You have %d relations $translation = $txt; } elseif ($last === "") { // exact value, e.g. 1;You have one relation if ((int)$first == $n) { $translation = $txt; break; } } else { // range, e.g. 1-3;You have %d relations - go get some more! if ((int)$first <= $n && (int)$last >= $n) { $translation = $txt; break; } } } if (!$translation) throw new PAException(GENERAL_SOME_ERROR, "Couldn't find translation for format '$fmt' and number=$n"); $ret = sprintf($translation, $n); if ($show_brackets) { return "[$ret]"; } return $ret; } function parse_file_size_string($sz) { if (preg_match("/^(\d+)([gmk])$/i", $sz, $m)) { $num = (int)$m[1]; $mult = $m[2]; switch (strtolower($mult)) { case 'g': $num *= 1024; // fallthrough case 'm': $num *= 1024; // fallthrough case 'k': $num *= 1024; break; } return $num; } // failed to parse as something like '2M' - just force it to return as an integer return (int)$sz; } $upload_max_filesize = parse_file_size_string(ini_get("upload_max_filesize")); foreach ($GLOBALS['file_type_info'] as &$fti) { if ($fti['max_file_size'] > $upload_max_filesize) { $fti['max_file_size'] = $upload_max_filesize; } } function format_file_size($sz) { $sz = floatval($sz); if ($sz > 500*1024*1024) { return sprintf("%.dGB", $sz/1073741824.0); } if ($sz > 500*1024) { return sprintf("%.dMB", $sz/1048576.0); } if ($sz > 1023) { return sprintf("%.dKB", $sz/1024.0); } return sprintf("%d bytes", $sz); } ?>