[fgX] Feeder Extended [Deleted]

Thanks, just purchased :)
Can anyone please help me with formatting the replacement pattern to change:
12023289-thumb.jpg" width="90" height="60" />
to
12023289.jpg" />

Hi @otfordnet

It would be helpful to know what is preceding the pattern that you like to replace.

EDIT:

Try this:
Code:
"/-thumb\.jpg.*\/>/iU", ".jpg\" />"
 
Last edited:
If you add a max number of words incoming to the add on I am in. That's something I really need. Thank you for responding (y)

I've released an update now that contains the requested features. Please read the update entry...

Wow that is huge. Please let me know once there has been an updated version and I will buy it. We want to feed from English site and translate to indonesia. Pf course we will need to manually do some revision

Thank you for this great idea!

Please note that if you use the auto translation feature of this add-on, Google charges a small fee. At the moment of writing this, translating a RSS entry of 300-400 characters would cost you $0.006 – $0.008. Google offers a free trial (Sign up for a free trial and you'll get $300 in credit and 60 days to explore Google Cloud Platform) go to https://console.cloud.google.com/freetrial

:)
 
Hi @otfordnet

It would be helpful to know what is preceding the pattern that you like to replace.

EDIT:

Try this:
Code:
"/-thumb\.jpg.*\/>/iU", ".jpg\" />"

Thanks very much,I'll try that (need to wait for RSS feed update)
Example lines in question are:
Code:
<media:thumbnail url="http://www.abc.com/images/3982-thumb.jpg" width="90" height="60" />
<media:content type="image/jpg" url="http://www.abc.com/images/3982-thumb.jpg" />
to give:
Code:
<media:thumbnail url="http://www.abc.com/images/3982.jpg" />
<media:content type="image/jpg" url="http://www.abc.com/images/3982.jpg" />
 
Bough t it and the max feed you installed doesn't work...returns the following error:

Mysqli statement execute error : Out of range value for column 'max_length' at row 1
Zend_Db_Statement_Mysqli->_execute() in Zend/Db/Statement.php at line 297
Zend_Db_Statement->execute() in Zend/Db/Adapter/Abstract.php at line 479
Zend_Db_Adapter_Abstract->query() in Zend/Db/Adapter/Abstract.php at line 632
Zend_Db_Adapter_Abstract->update() in XenForo/DataWriter.php at line 1654
XenForo_DataWriter->_update() in XenForo/DataWriter.php at line 1623
XenForo_DataWriter->_save() in XenForo/DataWriter.php at line 1419
XenForo_DataWriter->save() in XenForo/ControllerAdmin/Feed.php at line 127
XenForo_ControllerAdmin_Feed->actionSave() in XenForo/FrontController.php at line 351
XenForo_FrontController->dispatch() in XenForo/FrontController.php at line 134
XenForo_FrontController->run() in /home2/wisconsi/public_html/admin.php at line 13
 
Bough t it and the max feed you installed doesn't work...returns the following error:

Mysqli statement execute error : Out of range value for column 'max_length' at row 1

Hi @Mark87 :)

What value are You trying to set the maximum Feed item message character count to?

If you don't want to limit the maximum Feed item message character count, just leave it at 0.

This morning, I've been able to reproduce the same error message only if I set the max value to 32768 which is the highest value that the admin page allows. (If I write a higher number (e.g 999999999) the GUI changes that to 32768)

However the highest allowed value should be 32767, not 32768. I'll post an update that corrects that, but there is no reason to update the add-on just for that.

Did that solve the problem @Mark87 ?
 
farang updated [fgX] Feeder Extended with a new update entry:

Version 1.3.1 released

If You are already on version 1.3.0 there is no need to upgrade.

Fixed:

Corrected an issue where setting Feed item message character count (Max) value to 32768 (or trying to set it higher) generated an error message.

If You are already on version 1.3.0 there is no need to upgrade. Just let the Max Value at 0 if you don't want to truncate messages. If You wish to truncate messages, enter a value between 1 and 32767.

Read the rest of this update entry...
 
Last edited:
Farang, there seems to be a problem when stripping out images.

When I try to use
Code:
"/<img[^>]+\>/iU", ""
to get rid of the images while importing, in case of this RSS-feed
Code:
                    <item>
                <title>Title of article</title>
        <link>http://www.sitelink.com/sport/url_to_article_16558887.htm</link>
        <description>Message / text of article</description>
        <category>Xyz</category>
        <pubDate>Mon, 18 Jan 2016 01:00:00 +0100</pubDate>
        <guid>http://www.sitelink.com/sport/url_to_article_16558887.htm</guid>
        <content:encoded><![CDATA[
                <img src="http://www.sitelink.com/af/819/thumbnails/144558231.jpg.28091390.jpg" align="left" hspace="5" border="0" alt="Alternate image description. Foto: ap" title="New Coach. Image:ap" />
                        ]]></content:encoded>
                <enclosure type="image/jpeg" url="http://www.sitelink.com/af/819/thumbnails/144558231.jpg.28091390.jpg" length="0"/>
                </item>
                        <item>
the images have been removed succesful - but there is no text in the post, only the title and the link. Could you please have a look into this?
 
Thanks very much,I'll try that (need to wait for RSS feed update)
Example lines in question are:
Code:
<media:thumbnail url="http://www.abc.com/images/3982-thumb.jpg" width="90" height="60" />
<media:content type="image/jpg" url="http://www.abc.com/images/3982-thumb.jpg" />
to give:
Code:
<media:thumbnail url="http://www.abc.com/images/3982.jpg" />
<media:content type="image/jpg" url="http://www.abc.com/images/3982.jpg" />

Thanks! With the full code, I think the following might be more safe to use

Code:
"/(.*<media:.*[0-9])(-thumb\.jpg.*)( \/>)/iU", "$1.jpg\"$3"

On the following source text:

Code:
Some text here <media:thumbnail url="http://www.abc.com/images/3982-thumb.jpg" width="90" height="60" /> and some more text
<media:content type="image/jpg" url="http://www.abc.com/images/3982-thumb.jpg" /> finally additional text.

The result will be:
Code:
Some text here <media:thumbnail url="http://www.abc.com/images/3982.jpg" /> and some more text <media:content type="image/jpg" url="http://www.abc.com/images/3982.jpg" /> finally additional text.
 
the images have been removed succesful - but there is no text in the post, only the title and the link. Could you please have a look into this?

Thanks for your feedback @Sperber. Sometimes there's no text, only an image in an RSS Feed item. There is no readable text in the sample rss feed source (in <content:encoded>-tag) that you provided.

I've tested the expression
Code:
"/<img[^>]+\>/iU", ""
again and it seems to work.

You may PM me the RSS URL if You want me to test it further.

To avoid empty feed items when importing and removing images, it might be a good idea to set the minimum Feed item message character count to something higher than 0, maybe around 20 is a good value. ;)
 
Last edited:
Thanks for your feedback @Sperber. Sometimes there's no text, only an image in an RSS Feed item. There is no readable text in the sample rss feed source (in <content:encoded>-tag) that you provided.
I know, but that´s not the case here. The message goes along in the <description> tags. At least thats what´s been used as message without the expression.

You may PM me the RSS URL if You want me to test it further. To avoid empty feed items when importing and removing images, it might be a good idea to set the minimum Feed item message character count to something higher than 0, maybe around 20 is a good value. ;)
I setup the feeder with message count from day 1 - but that was when I was experiencing that problem first. Instead i swapped to
Code:
"/<img[^>]+\>/iU", ""
but that didn´t changed the way it behaves.

PM with RSS-feed is inbound.
 
PM with RSS-feed is inbound.

Thanks @Sperber

If You disable [fgX] Feeder Extended, (Using vanilla XF) you will notice that there is no difference. The text won't show. I check that by doing a preview of the feed entry.

The Feed is placing the item text in the <description> tag. That's very common. What I haven't seen before is that besides from that, this feed also uses the <content> tag for images. It seems like the XenForo Feeder skips what is in the <description> if there also is a <content> tag. At least without looking further into it, that's what I believe now.

I have some things that I have to do first but I will have a look into that later today. I want to know the cause.

Meanwhile, please try to disable the [fgX] Feeder Extended plugin temporary. Then check your imported feed item again. You will probably notice that the text will not show. (Use the preview button).

It looks right now, this might be a XenForo issue. But please let me check the XF source code before that becomes a fact.
 
Meanwhile, please try to disable the [fgX] Feeder Extended plugin temporary. Then check your imported feed item again. You will probably notice that the text will not show. (Use the preview button).
WILCO. I´ll report back the result when another feed is incoming as you can´t import the same post twice.
 
Meanwhile, please try to disable the [fgX] Feeder Extended plugin temporary. Then check your imported feed item again. You will probably notice that the text will not show. (Use the preview button).
You were right, @farang , and I can confirm that. This seems to be a XF problem.

@Brogan , @Kier or @Mike - could you help us out with that issue or should I open a ticket for that:
The Feed is placing the item text in the <description> tag. That's very common. What I haven't seen before is that besides from that, this feed also uses the <content> tag for images. It seems like the XenForo Feeder skips what is in the <description> if there also is a <content> tag. At least without looking further into it, that's what I believe now.

Regards,
Sperber.
 
All RSS feeds use these tags differently. Maybe it's done that way to avoid duplicate texts. If so. maybe I can add an option per feed basis to concatenate the two fields. I'll check it later today.
 
Hi @Mark87 :)

What value are You trying to set the maximum Feed item message character count to?

If you don't want to limit the maximum Feed item message character count, just leave it at 0.

This morning, I've been able to reproduce the same error message only if I set the max value to 32768 which is the highest value that the admin page allows. (If I write a higher number (e.g 999999999) the GUI changes that to 32768)

However the highest allowed value should be 32767, not 32768. I'll post an update that corrects that, but there is no reason to update the add-on just for that.

Did that solve the problem @Mark87 ?

Only set the max to 200 and get the same error ?
 
You were right, @farang , and I can confirm that. This seems to be a XF problem.

The default behavior of XenForo Feeder is to check for the feed item text in a tag named <content>, if that tag doesn't exist or is empty the text in the <description> tag is used instead. The feed that you are importing is putting an image in the <content> tag and the text in the <description> tag. It's nothing wrong with that as far as I can tell but XenForo won't handle that situation.

Some other feeds may duplicate the <description> tag contents into the <content> tag (possibly also HTML-encoded). That's probably why XenForo discards the description> tag if there is a <content> tag. Just to avoid duplicate text.

I've added a new feature to this add-on so that you can choose to get the feed item text from both the <description> tag and the <content> tag. I think it will be perfect for the specific feed you are importing. I know there are more feeds working in the same way. Check it out and let me know the results.

I know there's been many releases of this add-on recently but most of them are introducing new features. Please read Updates before installing a new version. Normally there's no reason to upgrade if you are not going to use the new features introduced. Thanks everybody ;)
 
Top Bottom