diff options
| author | Savetheinternet <savetheinternet@tinyboard.org> | 2011-05-18 16:00:33 +1000 |
|---|---|---|
| committer | Savetheinternet <savetheinternet@tinyboard.org> | 2011-05-18 16:00:33 +1000 |
| commit | 15f804bcff8b7c9ef4211cd160eea8a37eb1cd51 (patch) | |
| tree | de03001a0375cce80d6c81454772c15bde79947b /inc | |
| parent | 7eac1fc242ef95f06c2ba75c16a49191af9e0d38 (diff) | |
Fixed bug in auto-detecting $config[root]
Diffstat (limited to 'inc')
| -rw-r--r-- | inc/config.php | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/inc/config.php b/inc/config.php index 85335e5a..36ec32d6 100644 --- a/inc/config.php +++ b/inc/config.php @@ -140,6 +140,7 @@ $config['error']['fileexists'] = 'That file <a href="%s">already exists</a>!'; $config['error']['delete_too_soon'] = 'You\'ll have to wait another %s before deleting that.'; $config['error']['mime_exploit'] = 'MIME type detection XSS exploit (IE) detected; post discarded.'; + $config['error']['invalid_embed'] = 'Couldn\'t make sense of the URL of the video you tried to embed.'; // Moderator errors $config['error']['invalid'] = 'Invalid username and/or password.'; @@ -216,7 +217,7 @@ // The root directory, including the trailing slash, for Tinyboard. // examples: '/', 'http://boards.chan.org/', '/chan/' - $config['root'] = ($_SERVER['REQUEST_URI'] == '/' ? '/' : str_replace('\\', '/', dirname($_SERVER['REQUEST_URI'])) . '/'); + $config['root'] = (str_replace('\\', '/', dirname($_SERVER['REQUEST_URI'])) == '/' ? '/' : str_replace('\\', '/', dirname($_SERVER['REQUEST_URI'])) . '/'); $config['dir']['img'] = 'src/'; $config['dir']['thumb'] = 'thumb/'; @@ -582,6 +583,18 @@ // Characters used to generate a random password (with Javascript) $config['genpassword_chars'] = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!@#$%^&*()_+'; + // Custom embedding (YouTube, vimeo, etc.) + $config['embedding'] = Array( + Array( + '/^https?:\/\/(\w+\.)?youtube\.com\/watch\?v=([a-zA-Z0-9-]{10,11})(&|$)/i', + '<iframe width="%%tb_width%%" height="%%tb_height%%" src="http://www.youtube.com/embed/$2" frameborder="0" allowfullscreen></iframe>' + ) + ); + // Embedding width and height + $config['embed_width'] = 200; + $config['embed_height'] = 164; + + // Enable IP range bans (eg. "127.*.0.1", "127.0.0.*", and "12*.0.0.1" all match "127.0.0.1"). // A little more load on the database $config['ban_range'] = true; |
