Not logged in. · Lost password · Register

All posts by futanari.org (6)

topic: Delivering RSS feed as application/rss  in the forum: General Help and Support Features and Functionality
Avatar
futanari.org #1
Member since May 2014 · 6 posts
Group memberships: Members
Show profile · Link to this post
Wordpress > Appearance > Widgets
Default RSS Widget
Settings:
RSS Feed=http://futanari.org/wiki/feed.php
Title=Recent Wiki Updates
Display How Many Items?=10
Other options are Unchecked

Again this is default Wordpress Widget, listing raw code for the widget below.

/**
 * Process RSS feed widget data and optionally retrieve feed items.
 *
 * The feed widget can not have more than 20 items or it will reset back to the
 * default, which is 10.
 *
 * The resulting array has the feed title, feed url, feed link (from channel),
 * feed items, error (if any), and whether to show summary, author, and date.
 * All respectively in the order of the array elements.
 *
 * @since 2.5.0
 *
 * @param array $widget_rss RSS widget feed data. Expects unescaped data.
 * @param bool $check_feed Optional, default is true. Whether to check feed for errors.
 * @return array
 */
function wp_widget_rss_process( $widget_rss, $check_feed = true ) {
    $items = (int) $widget_rss['items'];
    if ( $items < 1 || 20 < $items )
        $items = 10;
    $url           = esc_url_raw( strip_tags( $widget_rss['url'] ) );
    $title         = isset( $widget_rss['title'] ) ? trim( strip_tags( $widget_rss['title'] ) ) : '';
    $show_summary  = isset( $widget_rss['show_summary'] ) ? (int) $widget_rss['show_summary'] : 0;
    $show_author   = isset( $widget_rss['show_author'] ) ? (int) $widget_rss['show_author'] :0;
    $show_date     = isset( $widget_rss['show_date'] ) ? (int) $widget_rss['show_date'] : 0;

    if ( $check_feed ) {
        $rss = fetch_feed($url);
        $error = false;
        $link = '';
        if ( is_wp_error($rss) ) {
            $error = $rss->get_error_message();
        } else {
            $link = esc_url(strip_tags($rss->get_permalink()));
            while ( stristr($link, 'http') != $link )
                $link = substr($link, 1);

            $rss->__destruct();
            unset($rss);
        }
    }

    return compact( 'title', 'url', 'link', 'items', 'error', 'show_summary', 'show_author', 'show_date' );
}
topic: Delivering RSS feed as application/rss  in the forum: General Help and Support Features and Functionality
Avatar
futanari.org #2
Member since May 2014 · 6 posts
Group memberships: Members
Show profile · Link to this post
In reply to post ID 45704
I don't know what information is not being accepted by SimplePie because the debug is not displaying any information other than previously quoted.

Looking at the github code, RSS 1.0 should render application/xml...

I just determined something that can be used as a stopgap.
Dokuwiki's RSS feed is permanently redirected to feedburner for some reason, well I did the same for my RSS feed, and now SimplePie is rendering it fine.

Doesn't this mean something is screwing up in the feed.php?
topic: Delivering RSS feed as application/rss  in the forum: General Help and Support Features and Functionality
Avatar
futanari.org #3
Member since May 2014 · 6 posts
Group memberships: Members
Show profile · Link to this post
In reply to post ID 45653
bump
topic: Delivering RSS feed as application/rss  in the forum: General Help and Support Features and Functionality
Avatar
futanari.org #4
Member since May 2014 · 6 posts
Group memberships: Members
Show profile · Link to this post
Subject: Delivering RSS feed as application/rss
OK, so this is an interesting interaction that maybe should be addressed in a future release.

I have a Wordpress site running 4.0 now (futanari.org) and up until August, the RSS feed widget was able to display the previous 10 changes from my dokuwiki hosted at futanari.org/wiki. However starting in Septermber, the widget displayed the error below:

RSS Error: A feed could not be found at http://futanari.org/wiki/feed.php. A feed with an invalid mime type may fall victim to this error, or SimplePie was unable to auto-discover it.. Use force_feed() if you are certain this URL is a real feed.

Now this is curious, because the RSS feed has validated perfectly fine, but searching for information about this error, it seems that since DokuWiki renders the feed as text/css that SimplePie is no longer accepting the feed as valid.

<?xml-stylesheet href="http://futanari.org/wiki/lib/exe/css.php?s=feed" type="text/css"?>

Now then, is there any way to change the RSS delivery to application/rss from text/css?
topic: How to repopulate/"touch" recent changes list  in the forum: General Help and Support Features and Functionality
Avatar
futanari.org #5
Member since May 2014 · 6 posts
Group memberships: Members
Show profile · Link to this post
In reply to post ID 43968
Quote by Michitux:
Quote by andi:
The changelog gets trimmed automatically to recent_days. Changelogs for individual pages are kept forever. So it should be possible to reconstruct the changelog from the individual change logs but I know of no script or plugin to do so.

Actually there is a very simple script at tips:recreate_wiki_change_log but unfortunately it requires shell access on the server. Rewriting the same in PHP should be possible.

Yea, that script is what I've seen before, I just thought there was a PHP method to do it.
I don't even realize how the changelist got broken anyway.
topic: How to repopulate/"touch" recent changes list  in the forum: General Help and Support Features and Functionality
Avatar
futanari.org #6
Member since May 2014 · 6 posts
Group memberships: Members
Show profile · Link to this post
Subject: How to repopulate/"touch" recent changes list
I have been managing a dokuwiki for about 5 years now, and recently during an update to the software I came across a problem with the recent changes listing. The do=recent only lists the past 3 page changes, and past 7 file changes, EVEN THOUGH there are more recent changes.

I don't have shell access, so if there is a php script that could be run to repopulate/refresh the list to display last 6 months of changes please forward me to do so.

Wiki in question (NSFW):
http://futanari.org/wiki/start?do=recent
Close Smaller – Larger + Reply to this post:
Special characters:
Special queries
Go to forum
Imprint
This board is powered by the Unclassified NewsBoard software, 20150713-dev, © 2003-2015 by Yves Goergen
Current time: 2019-12-06, 08:49:19 (UTC +01:00)