Browse Source

RSS Limit

Antes 11 years ago
parent
commit
9c34b2a0a0

+ 1 - 0
Sources/ManageNews.php

@@ -1040,6 +1040,7 @@ function ModifyNewsSettings($return_config = false)
 			// Just the remaining settings.
 			array('check', 'xmlnews_enable', 'onclick' => 'document.getElementById(\'xmlnews_maxlen\').disabled = !this.checked;'),
 			array('text', 'xmlnews_maxlen', 'subtext' => $txt['xmlnews_maxlen_note'], 10),
+			array('text', 'rss_limit', 'subtext' => $txt['rss_limit_note'], 10),
 	);
 
 	call_integration_hook('integrate_modify_news_settings', array(&$config_vars));

+ 1 - 1
Themes/default/index.template.php

@@ -372,7 +372,7 @@ function template_body_below()
 			<ul class="reset">
 				<li class="copyright">', theme_copyright(), '</li>
 				<li><a id="button_xhtml" href="http://validator.w3.org/check?uri=referer" target="_blank" class="new_win" title="', $txt['valid_xhtml'], '"><span>', $txt['xhtml'], '</span></a></li>
-				', !empty($modSettings['xmlnews_enable']) && (!empty($modSettings['allow_guestAccess']) || $context['user']['is_logged']) ? '<li><a id="button_rss" href="' . $scripturl . '?action=.xml;type=rss" class="new_win"><span>' . $txt['rss'] . '</span></a></li>' : '', '
+				', !empty($modSettings['xmlnews_enable']) && (!empty($modSettings['allow_guestAccess']) || $context['user']['is_logged']) ? '<li><a id="button_rss" href="' . $scripturl . '?action=.xml;type=rss;limit='.$modSettings['rss_limit'].'" class="new_win"><span>' . $txt['rss'] . '</span></a></li>' : '', '
 				<li class="last"><a id="button_wap2" href="', $scripturl , '?wap2" class="new_win"><span>', $txt['wap2'], '</span></a></li>
 			</ul>';
 

+ 2 - 0
Themes/default/languages/Admin.english.php

@@ -495,6 +495,8 @@ $txt['groups_send_mail'] = 'Groups allowed to send out forum newsletters';
 $txt['xmlnews_enable'] = 'Enable XML/RSS news';
 $txt['xmlnews_maxlen'] = 'Maximum message length';
 $txt['xmlnews_maxlen_note'] = '(0 to disable, bad idea.)';
+$txt['rss_limit'] = 'RSS Limit';
+$txt['rss_limit_note'] = 'Set how many RSS item you want to show';
 $txt['editnews_clickadd'] = 'Add another item';
 $txt['editnews_remove_selected'] = 'Remove selected';
 $txt['editnews_remove_confirm'] = 'Are you sure you want to delete the selected news items?';