[cbb Blockgets 1.0.2] Language problem in RSS feeds


no_avatar
mladiucitelj
 
Posts: 153
Joined: Sun Sep 02, 2012 11:40 pm
Location: Slovenia, Europe
 Sat Oct 27, 2012 3:41 pm • via Web
I have a language problem in my RSS block. My language contains characters like č š and ž, but when it comes to them, rss stops reading further words.

Example:

If my topic has subject PLAČILO it would only show PLA

Can someone help me with that?

Thanks in advance.
User avatar
IvanPF
Administrator
 
Posts: 2010
Joined: Fri Jun 17, 2011 12:15 am
Location: España (Spain)
 Tue Oct 30, 2012 1:38 pm • via Web
Hi,

I test the word "PLAČILO" in a custom rss file and it appears correctly.
Can you tell me the rss source file that you use in your block to test directly with it?
no_avatar
mladiucitelj
 
Posts: 153
Joined: Sun Sep 02, 2012 11:40 pm
Location: Slovenia, Europe
 Tue Oct 30, 2012 2:07 pm • via Web
It's not working for my RSS for Blog mod. Here's the feed: http://forum.mladiucitelj.si/blog.php?m ... ed=RSS_2.0

But it's working for my rss source from my Joomla site.
User avatar
IvanPF
Administrator
 
Posts: 2010
Joined: Fri Jun 17, 2011 12:15 am
Location: España (Spain)
 Tue Oct 30, 2012 2:47 pm • via Web
mladiucitelj wrote:It's not working for my RSS for Blog mod. Here's the feed: http://forum.mladiucitelj.si/blog.php?m ... ed=RSS_2.0

But it's working for my rss source from my Joomla site.

This RSS file is invalid.
Missing header at the beginning of the file:
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>


In the absence of that line, the block causes some errors. To fix follow these instructions:
1. Open /blockgets/block/rss_block.php
2. Find:
Code: Select all
         // Get Encoding
         if(preg_match('#encoding=[\'\"]+([\w\d\-\_]+)[\'\"]+#', $file_text, $out))
         {
            $this->rss_data['encoding'] = $out[1];
         }

3. Replace with:
Code: Select all
         // Get Encoding
         $this->rss_data['encoding'] = $this->data['encoding'];

         if(preg_match('#encoding=[\'\"]+([\w\d\-\_]+)[\'\"]+#', $file_text, $out))
         {
            $this->rss_data['encoding'] = $out[1];
         }

4. Find:
Code: Select all
if($out[2])

5. Replace with:
Code: Select all
if(!empty($out[2]))
no_avatar
mladiucitelj
 
Posts: 153
Joined: Sun Sep 02, 2012 11:40 pm
Location: Slovenia, Europe
 Tue Oct 30, 2012 2:54 pm • via Web
Ok, then I'll remove the RSS block for my Blog mod. This source id from my blog, ¸don't have another one... No problem. I hope you'll add support for Blog Mod too as I can see here: viewtopic.php?lang=en&f=23&t=72#p236
no_avatar
mladiucitelj
 
Posts: 153
Joined: Sun Sep 02, 2012 11:40 pm
Location: Slovenia, Europe
 Wed Oct 31, 2012 10:59 pm • via Web
Hi!

I've chaged the codes you gave and my RSS for Blog is working ok now!

Who is online

Users browsing this forum: No registered users and 0 guests