Code Monkey home page Code Monkey logo

news's People

Contributors

rneej avatar samo079 avatar schplurtz avatar splitbrain avatar turnermm avatar wildtruc avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

news's Issues

"Error: Call to a member function has_permission() on null" when using php8

The package was working mostly fine for us until we updated our php version to php8. Since then it seems that the helpers do not get loaded properly.

$perm = $this->helper->has_permission();

throws the error "Error: Call to a member function has_permission() on null".

--EDIT:

On the Backward Incompatible Changes page for PHP80, they mention

Methods with the same name as the class are no longer interpreted as constructors. The __construct() method should be used instead.

So I think that replacing

function action_plugin_news() {

by public function __construct(){ should solve it.

I do not program in PHP so I would like someone with a bit more experience in the language to check it before making a merge pull request...

PHP error in Non-multi user mode

Hi,
I have just tested the news plugin 2014-05-28 with the DokuWiki Release 2014-05-05a "Ponder Stibbons". I could generate a feed under multi user mode with ~~NEWSFEED:department_1~~. However, most simple trial with ~~NEWSFEED~~ was failed to generate any feed. There is a PHP error found:

[16-Sep-2014 20:31:20 Asia/Tokyo] PHP Warning:  array_shift() expects parameter 1 
to be array, null given in /path/to/dokuwiki/lib/plugins/news/scripts/feedData.php 
on line 158

I appreciate it if you could fix the error.
Satoshi

[fix]media and link did not render.

Feed in client wont return correct URL for links and media.
I found the issue in feedData.php in regex preg_replace, in :
line 61:

function description() {
  $this->currentDataArray['item'] =
            // previous regex
            //  preg_replace('#(href|src)\s*=\s*([\'\"])/.*?/#ms', "$1=$2" . $this->news_feed_url(), $this->currentDataArray['item']);
            // new regex
            preg_replace('#(href|src)\s*=\s*([\'\"])/#ms', "$1=$2" . $this->news_feed_url(), $this->currentDataArray['item']);
            return $this->currentDataArray['item'];
    }

This way, dokuwiki media and links return properly. Maybe there better regex to do, but I'm really not a php pro.

Have a good day !

News feed are empty

Hello,
i have installed the news plugin and configure it.
Then i create a page xxx and take the refresh button.
Now i find the ubuntu_news.xml in my top level directory xxx.
If i open it in a browser instance, i see the channel information, but nothing else. The page is not shown on the feed.
Did you have any idea how to fix the problem?
Sorry about my bad english and thank you.
Greetings Polarwelt

Read the news feed internally by Dokuwiki

I am having an issue reading an internally generated RSS Feed

I have used the news to generate an rss feed of a Dokuwiki page. For generating the feed I used Method 1 - "place newsfeed.php in your top level dokuwiki directory and point your news reader to that script."

This seems to work in that if i manually type the URL: https://itwiki.domain.co.uk/dokuwiki/newsfeed.php it shows the feed generated from the page correctly.

I want to now view the feed on the DokuWiki Start page. I have used the syntax: {{rss>https://itwiki.domain.co.uk/dokuwiki/newsfeed.php 5}}

But I get the error: An error occurred while fetching this feed: https://itwiki.domain.co.uk/dokuwiki/newsfeed.php

I have another rss feed on the start page that works fine to an external site:
{{rss>https://blog.knowbe4.com/rss.xml 5}}

What I am trying to achieve is a type of internal rolling news feed for my users.

Any assistance would be greatly appreciated

Mime Type

Hello,
I dont' know if I m writing the right place...
I recently installed news plugin for dokuwiki and noticed that when getting newfeed.php, Chromium Web Browser was printing garbage (whereas Firefox was not). I think Chomium does not guess the content type of the file. I just added the header line in newsfeed.php :
$filetime = 0;
$curent_time = time();
$xml_file = DOKU_INC . 'news_feed.xml';
header('Content-type: application/xml'); <= Line added
if(isset($conf['plugin']['news'])) {...

Then chromium prints a... :) beautiful tree structure instead of garbage.
Note that the plugin works well. It's just more confortable to see the tree structure when getting the newfeed.php file with Chromium.

May be you could include this line in future releases ?

Have a nice day.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.