turnermm / news Goto Github PK
View Code? Open in Web Editor NEWDokuwiki plugin for creating external newsfeeds for feed readers
Home Page: http://www.dokuwiki.org/plugin:news
Dokuwiki plugin for creating external newsfeeds for feed readers
Home Page: http://www.dokuwiki.org/plugin:news
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.
Line 36 in 556847f
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
Line 24 in 556847f
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...
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
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 !
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
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
See http://php-grinder.com/project/view/20300
In scripts/newsfeed.php is an XSS vulnerability. I could pass an attack vector to $_POST['feed_ref'];
I haven't check the other reported problems in detail.
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.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.