Keyword

Google Alerts RSS Feed not displaying correctly

  • Cauê de Mattos
  • Cauê de Mattos's Avatar Topic Author
  • Offline
  • New Member
More
9 years 8 months ago #56046 by Cauê de Mattos
Google Alerts RSS Feed not displaying correctly was created by Cauê de Mattos
Hello everyone!

First of all I'd like to thank the developers of the module Simple RSS Feed, it seems to be the best free solution for a Joomla RSS Feed. Though I'm having a little problem:

I'm creating a website (still in a local server), I'm graphic designer and I don't know much of coding (actually I don't even like it, hehe). I'm running a Joomla 3.2 Version.

I'm trying to use this module for Google Alerts RSS Feed and it isn't displaying correctly the special characters (Portuguese, such as: é, ñ) and also the "bold" style is ignored. Unfortunately at the moment I don't have an on-line sample, but I'll show some screen shots:

How it's displayed in Google:

File Attachment:


File Attachment:



And how it's displayed in my website:

File Attachment:



So I wonder if the problem is with the language, but even so there is the problem with the "bold" style.



Thanks for the attention

Cauê
....

Please Log in or Create an account to join the conversation.

More
9 years 8 months ago #56054 by Lefteris
Hi. Try to edit file /modules/mod_jw_srfr/helper.php and remove completely line 75 which reads:
	$feedItem->itemTitle = trim(htmlentities($feedItem->itemTitle, ENT_QUOTES, 'utf-8'));

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.

  • Cauê de Mattos
  • Cauê de Mattos's Avatar Topic Author
  • Offline
  • New Member
More
9 years 8 months ago #56057 by Cauê de Mattos
Replied by Cauê de Mattos on topic Google Alerts RSS Feed not displaying correctly
Lefteris,

Thank you very much for replying! I did just like you suggested, it eased the problem but didn't solve completely, here are the screen shots:


Before your suggestion:

File Attachment:




After:

File Attachment:




How it displays in Google:

File Attachment:



As you can see there are still problem with the special characters, but at least it doesn't show code breaks. About the "bold" problem this time I can't know if there's a difference because the today's alerts doesn't have the tag in the headline. Any other suggestion?



Thanks

Cauê
....

Please Log in or Create an account to join the conversation.

More
9 years 8 months ago #56060 by Lefteris
Maybe the web font you are using does not include these characters. Look at the page source to see the actual output of the module.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.

  • Cauê de Mattos
  • Cauê de Mattos's Avatar Topic Author
  • Offline
  • New Member
More
9 years 8 months ago #56064 by Cauê de Mattos
Replied by Cauê de Mattos on topic Google Alerts RSS Feed not displaying correctly
Lefteris,

I've checked the font and it has special characters, actually today's feed includes the tag in the headline and now I know this it's been solved with that change in the code, thanks!! Here's the screen shot of today:

File Attachment:



I added a Sport Feed from another website and the special characters seem to be working, you can see it in the line that says something about Ferrari e McLaren... So the problem seems to be specifically with Google Alerts feed... Any ideas?



Thanks

Cauê
....

Please Log in or Create an account to join the conversation.

More
9 years 8 months ago #56068 by Lefteris
I am afraid that i cannot help you more without a link to your site. The link to the feed would also be helpful.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.

  • Cauê de Mattos
  • Cauê de Mattos's Avatar Topic Author
  • Offline
  • New Member
More
9 years 8 months ago #56113 by Cauê de Mattos
Replied by Cauê de Mattos on topic Google Alerts RSS Feed not displaying correctly
Lefteris,

Sorry for the late reply, the feeds were empty these last days so I couldn't make more tests. Today it's full, so let's go:


I've put it online for you in a template, here it goes (just go to the "services" section)

caue.byethost31.com/acrostia2/


Here is the link of the Google Alert Feed:

www.google.com/alerts/feeds/13158100820977432019/15705311827188094650?redirect=

Please Log in or Create an account to join the conversation.

  • Cauê de Mattos
  • Cauê de Mattos's Avatar Topic Author
  • Offline
  • New Member
More
9 years 8 months ago #56114 by Cauê de Mattos
Replied by Cauê de Mattos on topic Google Alerts RSS Feed not displaying correctly
Just in case it changes by then, follows the screen shot of the day:


How it is in the Google feed
File Attachment:



How it displays in the website:
File Attachment:




Thanks

Cauê
....

Please Log in or Create an account to join the conversation.

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
9 years 8 months ago #56120 by Krikor Boghossian
Replied by Krikor Boghossian on topic Google Alerts RSS Feed not displaying correctly
The bold part is included in Google's feed you sent us.
If you have the required knowledge you can override the template (check the docs about this one) and use PHP's strip_tags function.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.

  • Cauê de Mattos
  • Cauê de Mattos's Avatar Topic Author
  • Offline
  • New Member
More
9 years 8 months ago #56151 by Cauê de Mattos
Replied by Cauê de Mattos on topic Google Alerts RSS Feed not displaying correctly
Folks,

I' guess I've found the solution, some people are having the same problem with Google Alerts RSS, but I have no idea how to work this out in our great Simple Reader. Here's the solution found these days in this forum: stackoverflow.com/questions/25147511/corrupted-utf-8-encoding-when-reading-google-feed-alerts

Follows below the message:


Sorry, you are absolutely correct - there is something untoward happening! Though it is not what you would first suspect... For reference, given that:

echo mb_detect_encoding($feed); // prints: ASCII
The unicode data is lost before it is even sent by the remote server - it appears that Google is looking at the user-agent string in the request header - which is non-existent using file_get_contents by default without a stream-context.

Because it cannot identify the client making the request it defaults to and forces ASCII encoding. This is presumably a necessary fallback in the event of some kind of cataclysmic cock-up. [citation needed...]

It's not simply enough to name your application however, you need to include a known vendor. I 'm unsure of the full extent of this but I believe most folks include "Mozilla [version]" to work around the issue, for example:

$url = 'www.google.com/...';

$feed = file_get_contents($url, false, stream_context_create([
'http' => [
'method' => 'GET',
'header' => 'Accept-Charset: UTF-8' ."\r\n"
.'User-Agent: (Mozilla/5.0 compatible) MyFeedReader/1.0'
]
]));

file_put_contents('test.txt', $feed); // should now work as expected

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum