This commit is contained in:
Laurent Destailleur 2020-05-23 12:57:58 +02:00
parent 50d063256e
commit aff2872fc1
3 changed files with 8 additions and 10 deletions

View File

@ -127,4 +127,6 @@ OtherLanguages=Other languages
UseManifest=Provide a manifest.json file
PublicAuthorAlias=Public author alias
AvailableLanguagesAreDefinedIntoWebsiteProperties=Available languages are defined into website properties
ReplacementDoneInXPages=Replacement done in %s pages or containers
ReplacementDoneInXPages=Replacement done in %s pages or containers
RSSFeed=RSS Feed
RSSFeedDesc=You can get a RSS feed of latest articles with type 'blogpost' using this URL

View File

@ -2979,15 +2979,10 @@ if ($action == 'editcss')
// RSS
print '<tr><td class="tdtop">';
//$htmlhelp = $langs->trans("Example").' :<br>';
//$htmlhelp .= dol_htmlentitiesbr($manifestjsoncontentdefault);
$htmlhelp = '';
print $form->textwithpicto($langs->trans('RSSFeed'), $htmlhelp, 1, 'help', '', 0, 2, 'rsstooltip');
$htmlhelp = $langs->trans('RSSFeedDesc');
print $form->textwithpicto($langs->trans('RSSFeed'), $htmlhelp, 1, 'help', '', 0, 2, '');
print '</td><td>';
//print $langs->trans("RSS").': '.$form->selectyesno('WEBSITE_ENBALE_RSS', $website->use_rss, 1).'<br>';
//$doleditor = new DolEditor('WEBSITE_ENBALE_RSS', $manifestjsoncontent, '', '220', 'ace', 'In', true, false, 'ace', 0, '100%', '');
//print $doleditor->Create(1, '', true, $langs->trans("File").' manifest.json', 'text');
print '/wrapper.php?rss=1[&l=XX]';
print '/wrapper.php?rss=1[&l=XX][&limit=123]';
print '</td></tr>';
print '</table>';

View File

@ -13,6 +13,7 @@ $modulepart = GETPOST('modulepart', 'aZ09');
$entity = GETPOST('entity', 'int') ?GETPOST('entity', 'int') : $conf->entity;
$original_file = GETPOST("file", "alpha");
$l = GETPOST('l', 'aZ09');
$limit = GETPOST('limit', 'int');
// Parameters for RSS
$rss = GETPOST('rss', 'aZ09');
@ -103,7 +104,7 @@ if ($rss) {
$filters = array('type_container'=>'blogpost');
if ($l) $filters['lang'] = $l;
$MAXNEWS = 20;
$MAXNEWS = ($limit ? $limit : 20);
$arrayofblogs = $websitepage->fetchAll($website->id, 'DESC', 'date_creation', $MAXNEWS, 0, $filters);
$eventarray = array();
if (is_array($arrayofblogs)) {