? Success

User tests: Successful: Unsuccessful:

avatar chrisdavenport
chrisdavenport
18 Feb 2016

In feeds from WordPress blogs, the Dublin Core creator tag is used instead of the author tag. This PR uses the Dublin Core creator tag as a fallback when the author tag is not present in a feed item.

To test, put something like the following code into a template override for the mod_feed module and point the module at a WordPress feed.

foreach ($feed as $item)
{
echo $item->author->name;
}

You should get a string comprising all the authors of the blog posts in the feed. You might need to check the raw feed data to see what is actually being sent by WordPress.

avatar chrisdavenport chrisdavenport - open - 18 Feb 2016
avatar chrisdavenport chrisdavenport - change - 18 Feb 2016
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 18 Feb 2016
Labels Added: ?
avatar brianteeman
brianteeman - comment - 19 Feb 2016

For testing you can use the feed from https://twodropletsblog.wordpress.com/ which uses dc:creator instead of author


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/9152.

avatar brianteeman
brianteeman - comment - 19 Feb 2016

@chrisdavenport sorry for being thick - where in the module should I put that snippet. Tried a few places but no joy in displaying the author and we dont have anywhere in core (that I can find) that does


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/9152.

avatar chrisdavenport
chrisdavenport - comment - 19 Feb 2016

Either modules/mod_feed/tmpl/default.php
Or copy that file to templates/[template]/html/mod_feed/default.php and put it there.

avatar brianteeman
brianteeman - comment - 19 Feb 2016

Yes I know the file - but where in the file - wherever I have tried
produced no output

On 19 February 2016 at 11:59, Chris Davenport notifications@github.com
wrote:

Either modules/mod_feed/tmpl/default.php
Or copy that file to templates/[template]/html/mod_feed/default.php and
put it there.


Reply to this email directly or view it on GitHub
#9152 (comment).

Brian Teeman
Co-founder Joomla! and OpenSourceMatters Inc.
http://brian.teeman.net/

avatar chrisdavenport
chrisdavenport - comment - 19 Feb 2016

Shouldn't make much difference where you put it. Try removing everything from the file and just have the snippet. Does that show anything?

Also, try this blog: http://blogs.ncvo.org.uk/feed

avatar brianteeman
brianteeman - comment - 19 Feb 2016

I replaced the entire module code with

defined('_JEXEC') or die;
foreach ($feed as $item)
{
echo $item->author->name;
}
echo "brian";
?>

and all that was output in the module was brian
`

avatar chrisdavenport
chrisdavenport - comment - 19 Feb 2016

Hmmm, okay, it looks like you can't foreach over the feed entries any more. That might be another bug.

Anyway, try this code in your override:

<?php
for ($i = 0; $i < $params->get('rssitems', 5); $i++)
{
    if (!$feed->offsetExists($i))
    {
        break;
    }

    echo $feed[$i]->author->name;
}
echo "brian";

You should get twodropletsblogbrian

avatar brianteeman
brianteeman - comment - 19 Feb 2016

No that doesnt work either - sorry not wasting my time on this any more - i
will leave it to others

On 19 February 2016 at 17:00, Chris Davenport notifications@github.com
wrote:

Hmmm, okay, it looks like you can't foreach over the feed entries any
more. That might be another bug.

Anyway, try this code in your override:

<?phpfor ($i = 0; $i < $params->get('rssitems', 5); $i++){ if (!$feed->offsetExists($i)) { break; } echo $feed[$i]->author->name;}echo "brian";

You should get twodropletsblogbrian


Reply to this email directly or view it on GitHub
#9152 (comment).

Brian Teeman
Co-founder Joomla! and OpenSourceMatters Inc.
http://brian.teeman.net/

avatar brianteeman brianteeman - change - 27 Feb 2016
Status Pending Information Required
avatar brianteeman brianteeman - change - 30 Mar 2016
Category Libraries
avatar chrisdavenport
chrisdavenport - comment - 31 Mar 2016

I'm closing this for now as further work has revealed that the rabbit hole goes much deeper than I thought and this is not the correct way to fix the problem anyway. I'll submit another PR when I have a more complete solution. Thanks for trying to test. :-)

avatar chrisdavenport chrisdavenport - change - 31 Mar 2016
Status Information Required Closed
Closed_Date 0000-00-00 00:00:00 2016-03-31 18:26:07
Closed_By chrisdavenport
avatar chrisdavenport chrisdavenport - close - 31 Mar 2016

Add a Comment

Login with GitHub to post a comment