forked from Cronocide/reddit-top-rss
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig-default.php
71 lines (61 loc) · 1.81 KB
/
config-default.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
<?php
// Default subreddit
if (!empty($_SERVER["DEFAULT_SUBREDDIT"])) {
define('DEFAULT_SUBREDDIT', $_SERVER["DEFAULT_SUBREDDIT"]);
} else {
define('DEFAULT_SUBREDDIT', 'pics');
}
// Mercury Parser URL, e.g. https://mercuryparser.example.com
if (!empty($_SERVER["MERCURY_URL"])) {
define('MERCURY_URL', $_SERVER["MERCURY_URL"]);
} else {
define('MERCURY_URL', '');
}
// Mercury API key, e.g. YaaFZZf9rUvZJQLXmt&MN9efXKQJxMa1k8smtv09
if (!empty($_SERVER["MERCURY_API_KEY"])) {
define('MERCURY_API_KEY', $_SERVER["MERCURY_API_KEY"]);
} else {
define('MERCURY_API_KEY', '');
}
// Cache Reddit JSON files
if (!empty($_SERVER["CACHE_REDDIT_JSON"])) {
define('CACHE_REDDIT_JSON', $_SERVER["CACHE_REDDIT_JSON"]);
} else {
define('CACHE_REDDIT_JSON', 'true');
}
// Cache Mercury Contend
if (!empty($_SERVER["CACHE_MERCURY_CONTENT"])) {
define('CACHE_MERCURY_CONTENT', $_SERVER["CACHE_MERCURY_CONTENT"]);
} else {
define('CACHE_MERCURY_CONTENT', 'true');
}
// Cache RSS feeds
if (!empty($_SERVER["CACHE_RSS_FEEDS"])) {
define('CACHE_RSS_FEEDS', $_SERVER["CACHE_RSS_FEEDS"]);
} else {
define('CACHE_RSS_FEEDS', 'true');
}
// Reddit username
if (!empty($_SERVER["REDDIT_USER"])) {
define('REDDIT_USER', $_SERVER["REDDIT_USER"]);
} else {
define('REDDIT_USER', 'your_reddit_user');
}
// Reddit Client ID
if (!empty($_SERVER["REDDIT_CLIENT_ID"])) {
define('REDDIT_CLIENT_ID', $_SERVER["REDDIT_CLIENT_ID"]);
} else {
define('REDDIT_CLIENT_ID', 'your_app_id');
}
// Reddit Client Secret
if (!empty($_SERVER["REDDIT_CLIENT_SECRET"])) {
define('REDDIT_CLIENT_SECRET', $_SERVER["REDDIT_CLIENT_SECRET"]);
} else {
define('REDDIT_CLIENT_SECRET', 'your_app_secret');
}
// Config version
if (!empty($_SERVER["CONFIG_VERSION"])) {
define('CONFIG_VERSION', $_SERVER["CONFIG_VERSION"]);
} else {
define('CONFIG_VERSION', 1);
}