Version 1.2 ()
------------------------------------------------------------------------
+ * Make plugins be able to emit their own RSS-Feeds using
+ $eventData['template_file'] on the 'frontend_rss' event hook
+ (garvinhicking)
+
* Fix missing %username% permalink pattern in single entry view.
Patch by cress_cc
* Show current captcha look in the plugin configuration menu
(garvinhicking)
-
+
* Add new category property to hide blog postings made into sub-
categories from the frontend view, per category. Thanks to
netmorix from the forums! (garvinhicking)
$r = serendipity_db_query("SELECT categoryid FROM {$serendipity['dbPrefix']}category c
WHERE c.categoryid = ". (int)$parentid ."
AND c.category_left BETWEEN " . implode(' AND ', serendipity_fetchCategoryRange((int)$serendipity['GET']['cid'])));
- if ( is_array($r) ) {
+ if (is_array($r)) {
$r = serendipity_db_query("SELECT category_name FROM {$serendipity['dbPrefix']}category
WHERE categoryid = ". (int)$parentid);
echo sprintf(ALREADY_SUBCATEGORY, htmlspecialchars($r[0]['category_name']), htmlspecialchars($name));
} else {
- serendipity_updateCategory($serendipity['GET']['cid'], $name, $desc, $authorid, $icon, $parentid);
+ serendipity_updateCategory($serendipity['GET']['cid'], $name, $desc, $authorid, $icon, $parentid, $serendipity['POST']['cat']['sort_order'], $serendipity['POST']['cat']['hide_sub']);
serendipity_ACLGrant($serendipity['GET']['cid'], 'category', 'read', $serendipity['POST']['cat']['read_authors']);
serendipity_ACLGrant($serendipity['GET']['cid'], 'category', 'write', $serendipity['POST']['cat']['write_authors']);
echo '<div class="serendipityAdminMsgSuccess">'. CATEGORY_SAVED .'</div>';
</select>
</td>
</tr>
+
+ <tr>
+ <td><?php echo CATEGORY_HIDE_SUB ?><br /><em><?php echo CATEGORY_HIDE_SUB_DESC; ?></em></td>
+ <td valign="top">
+ <input type="radio" name="serendipity[cat][hide_sub]" value="0" <?php echo ($this_cat['hide_sub'] == 0 ? 'checked="checked"' : ''); ?> id="hide_sub_no" /> <label for="hide_sub_no"><?php echo NO; ?></label>
+ <input type="radio" name="serendipity[cat][hide_sub]" value="1" <?php echo ($this_cat['hide_sub'] == 1 ? 'checked="checked"' : ''); ?> id="hide_sub_yes" /> <label for="hide_sub_yes"><?php echo YES; ?></label>
+ </td>
+ </tr>
+
<?php serendipity_plugin_api::hook_event('backend_category_showForm', $cid, $this_cat); ?>
</table>
<div><input type="submit" name="SAVE" value="<?php echo $save; ?>" class="serendipityPrettyButton" /></div>
}
if (!empty($_SERVER['HTTP_USER_AGENT']) && stristr($_SERVER['HTTP_USER_AGENT'], 'feedburner')) {
- $_GET['nocache'] = true;
+ $_GET['nocache'] = true;
}
$serendipity['view'] = 'feed';
}
}
- if ($_GET['type'] == 'content' &&
- !isset($_GET['category']) &&
- !isset($serendipity['GET']['tag']) &&
- $plugin->get_config('show_feedburner') === 'force' &&
+ if ($_GET['type'] == 'content' &&
+ !isset($_GET['category']) &&
+ !isset($serendipity['GET']['tag']) &&
+ $plugin->get_config('show_feedburner') === 'force' &&
!preg_match('@FeedBurn@i', $_SERVER['HTTP_USER_AGENT']) &&
!(serendipity_userLoggedIn() && isset($_GET['forceLocal']))
) {
}
}
+$file_version = preg_replace('@[^0-9a-z\.-_]@i', '', $version);
+$metadata['template_file'] = serendipity_getTemplateFile('feed_' . $file_version . '.tpl', 'serendipityPath');
+
serendipity_smarty_init();
serendipity_plugin_api::hook_event('frontend_rss', $metadata);
+if (!$metadata['template_file'] || $metadata['template_file'] == 'feed_' . $file_version . '.tpl') {
+ die("Invalid RSS version specified or RSS-template file not found\n");
+}
+
$self_url = 'http://' . $_SERVER['HTTP_HOST'] . htmlspecialchars($_SERVER['REQUEST_URI']);
if (!is_array($entries)) {
$entries = array();
$gm_modified = gmdate('Y-m-d\TH:i:s\Z', serendipity_serverOffsetHour());
}
-$file_version = preg_replace('@[^0-9a-z\.-_]@i', '', $version);
-$template_file = serendipity_getTemplateFile('feed_' . $file_version . '.tpl', 'serendipityPath');
-if (!$template_file) {
- die("Invalid RSS version specified\n");
-}
-
serendipity_printEntries_rss($entries, $version, $comments, $metadata['fullFeed'], $metadata['showMail']);
$namespace_hook = 'frontend_display:unknown:namespace';
'self_url' => $self_url,
)
);
-$serendipity['smarty']->display($template_file);
+$serendipity['smarty']->display($metadata['template_file']);
/* vim: set sts=4 ts=4 expandtab : */