diff options
| author | Appleman1234 <applemansigloo@gmail.com> | 2022-01-12 14:17:20 +1000 |
|---|---|---|
| committer | Appleman1234 <applemansigloo@gmail.com> | 2022-01-12 14:17:20 +1000 |
| commit | 57cf30cf7f068b71dbacca33ccc49965de8e71d8 (patch) | |
| tree | b974d3555158a10fd11136b50eb1afffa1761fff /templates/themes | |
| parent | 353ef1ddee8dbb34cd58b12546f7dc62d30a2954 (diff) | |
Make index.rss catalog rss use full url linking instead of relative links
Diffstat (limited to 'templates/themes')
| -rw-r--r-- | templates/themes/catalog/index.rss | 8 | ||||
| -rw-r--r-- | templates/themes/catalog/info.php | 8 | ||||
| -rw-r--r-- | templates/themes/catalog/theme.php | 1 |
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 |
