source: forum/includes/smartfeed_constants.php@ 5

Last change on this file since 5 was 5, checked in by george, 18 years ago

import

File size: 3.8 KB
Line 
1<?php
2/***************************************************************************
3 smartfeed_constants.php
4 -----------------------
5 begin : Thurs Dec 29 2005
6 copyright : (C) 2000 The phpBB Group
7 email : mhamill@computer.org
8
9 $Id: $
10
11 ***************************************************************************/
12
13/***************************************************************************
14 *
15 * This program is free software; you can redistribute it and/or modify
16 * it under the terms of the GNU General Public License as published by
17 * the Free Software Foundation; either version 2 of the License, or
18 * (at your option) any later version.
19 *
20 ***************************************************************************/
21
22// smartfeed_constants.php
23// Written by Mark D. Hamill, mhamill@computer.org
24// This software is designed to work with phpBB Version 2.0.19
25
26if ( !defined('IN_PHPBB') )
27{
28 die('Hacking attempt');
29}
30
31// Caution do not change the next four values or you may get unexpected results from the feedcreator class, which expects these literals
32
33define('SMARTFEED_ATOM_10_VALUE', 'ATOM1.0');
34define('SMARTFEED_RSS_20_VALUE', 'RSS2.0');
35define('SMARTFEED_RSS_10_VALUE', 'RSS1.0');
36define('SMARTFEED_RSS_091_VALUE', 'RSS0.91');
37
38// You may need to change the following defaults
39define('TTL','60'); // How many minutes to cache before refreshing the feed? Throttle the number up if your board is getting overwhelmed, but newsreaders may ignore your advice. Only works with RSS 2.0.
40define('MAX_ITEMS',0); // Set some upper bound on the number of items in a newsfeed. If 0, no limit. For heavily trafficked boards you may find you have to set a limit to keep the board from getting bogged down. Make sure this is a whole number.
41define('DEFAULT_FETCH_TIME_LIMIT', time() - (24 * 60 * 60)); // If the fetch is being done by someone who is not registered, and no cookie is set, this will set a point in time beyond which no posts will be retrieved. Otherwise it could take minutes or hours to try to assemble a newsfeed for every message in every public forum in your database. The default is to go back one day.
42define('SMARTFEED_RFC1766_LANG', 'cs-CZ'); // Language of feed content. Use only values at http://www.w3.org/TR/REC-html40/struct/dirlang.html#langcodes
43define('SMARTFEED_FAKE_EMAIL', 'noreply@' . trim($board_config['server_name'])); // Used when an email address is required for a RSS 0.91 feed, but phpBB profile for user says not to show it
44
45// Override the Feed Creator Generator information to include info on this modification
46define('FEEDCREATOR_VERSION', "SmartFeed phpBB Modification (mhamill@computer.org)");
47// Override the Feed Creator timezone to reflect the board timezone
48define('TIME_ZONE',str_replace('.',':',sprintf("%+'06.2f",$board_config['board_timezone'])));
49define('SMARTFEED_FEED_IMAGE_PATH', 'templates/subSilver/images/logo_phpBB.gif'); // The phpBB icon (or the image you substituted for it) is used by default for the newsfeed's image.
50
51// Code from rss.php Mod by Sascha Carlin, slightly modified. Create an absolute URL to the site.
52$script_name = preg_replace('/^\/?(.*?)\/?$/', '\1', trim($board_config['script_path']));
53$server_name = trim($board_config['server_name']);
54$server_protocol = ( $board_config['cookie_secure'] ) ? 'https://' : 'http://';
55$server_port = ( $board_config['server_port'] <> 80 ) ? ':' . trim($board_config['server_port']) . '/' : '/';
56$siteURL = $server_protocol . $server_name . $server_port . $script_name;
57if (substr($siteURL,(strlen($siteURL)-1),1) <> '/')
58{
59 $siteURL .= '/';
60}
61define('SITE_URL', $siteURL);
62unset($script_name, $server_name, $server_protocol, $server_port, $siteURL);
63$smilies_url = $siteURL . $board_config['smilies_path'];
64define('SMILIES_URL', $smilies_url);
65unset($smilies_url);
66// End copied code
67
68?>
Note: See TracBrowser for help on using the repository browser.