summaryrefslogtreecommitdiff
path: root/templates/themes/catalog
diff options
context:
space:
mode:
Diffstat (limited to 'templates/themes/catalog')
-rw-r--r--templates/themes/catalog/index.rss8
-rw-r--r--templates/themes/catalog/info.php8
-rw-r--r--templates/themes/catalog/theme.php1
3 files changed, 13 insertions, 4 deletions
diff --git a/templates/themes/catalog/index.rss b/templates/themes/catalog/index.rss
index e6576ffc..1d925398 100644
--- a/templates/themes/catalog/index.rss
+++ b/templates/themes/catalog/index.rss
@@ -2,15 +2,15 @@
<rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0">
<channel>
<title>/{{ board.uri }}/ - {{ board.title|e }}</title>
- <link>{{ config.root }}{{ board.uri }}/</link>
+ <link>{{ settings.base_url }}{{ config.root }}{{ board.uri }}/</link>
<description>Live feed of new threads on the board /{{ board.uri }}/ - {{ board.title|e }}.</description>
<atom:link href="{{ config.root }}{{ board.uri }}/index.rss" rel="self" type="application/rss+xml"/>
{% for post in recent_posts %}
<item>
<title>{% if post.subject %}{{ post.subject|e }}{% else %}{{ post.body_nomarkup[:256]|remove_modifiers|e }}{% endif %}</title>
- <link>{{ config.root }}{{ board.uri }}/res/{{ post.id }}.html</link>
- <guid>{{ config.root }}{{ board.uri }}/res/{{ post.id }}.html</guid>
- <comments>{{ config.root }}{{ board.uri }}/res/{{ post.id }}.html</comments>
+ <link>{{ settings.base_url }}{{ config.root }}{{ board.uri }}/res/{{ post.id }}.html</link>
+ <guid>{{ settings.base_url }}{{ config.root }}{{ board.uri }}/res/{{ post.id }}.html</guid>
+ <comments>{{ settings.base_url }}{{ config.root }}{{ board.uri }}/res/{{ post.id }}.html</comments>
<pubDate>{{ post.pubdate }}</pubDate>
<description><![CDATA[ <a href='{{ config.root }}{{ board.uri }}/res/{{ post.id }}.html' target=_blank><img style='float:left;margin:8px' border=0 src='{% if not config.uri_thumb %}{{ config.root }}{% endif %}{{ post.file }}'></a> {{ post.body }} ]]></description>
</item>
diff --git a/templates/themes/catalog/info.php b/templates/themes/catalog/info.php
index 0e7581f0..bc0e7eb5 100644
--- a/templates/themes/catalog/info.php
+++ b/templates/themes/catalog/info.php
@@ -84,6 +84,14 @@
'comment' => 'Check this if you wish to show a nice tooltip with info about the thread on mouse over.'
);
+ $theme['config'][] = Array(
+ 'title' => 'Base URL',
+ 'name' => 'base_url',
+ 'type' => 'text',
+ 'default' => 'http://test.com',
+ 'comment' => '(eg. "http://test.com")'
+ );
+
// Unique function name for building everything
$theme['build_function'] = 'catalog_build';
diff --git a/templates/themes/catalog/theme.php b/templates/themes/catalog/theme.php
index bc312fc0..1b55d56e 100644
--- a/templates/themes/catalog/theme.php
+++ b/templates/themes/catalog/theme.php
@@ -399,6 +399,7 @@
)));
file_write($config['dir']['home'] . $board_name . '/index.rss', Element('themes/catalog/index.rss', Array(
+ 'settings' => $this->settings,
'config' => $config,
'recent_posts' => $recent_posts,
'board' => $board