1 (edited by 2013-02-06 11:34:00)

Topic: RSS åäö old 1.4.7

Hi! The åäö stopped working a long time ago: http://nhlkollen.se/ny/admin/rss.php?category=1
I remember saving or changing something/some file, and haven't been able to fix it since that... I'm rebuilding the site with 1.5.2 but until that, I would like to fix this problem... Either by going to the root of the problem or by some workaround fix.

2 (edited by 2013-02-06 12:21:16)

Re: RSS åäö old 1.4.7

Hi! The åäö stopped working a long time ago: http://nhlkollen.se/ny/admin/rss.php?category=1
I remember saving or changing something/some file, and haven't been able to fix it since that... I'm rebuilding the site with 1.5.2 but until that, I would like to fix this problem... Either by going to the root of the problem or by some workaround fix.


Specially in case of correction of "åäö" there is a plugin that corrects the bug in RSS. The php file in zip file should be got to  ./cdata/plugins/

html_entity_rss.zip

Best regards,
CN Support team

3 (edited by 2013-02-06 12:35:03)

Re: RSS åäö old 1.4.7

Specially in case of correction of "åäö" there is a plugin that corrects the bug in RSS. The php file in zip file should be got to  ./cdata/plugins/

html_entity_rss.zip

Thanks, but that's for the new version of cutenews, right? I'm having the old CuteNews 1.4.7 on this site (working on a re-build with the new version...)

EDIT: Can also add, that it worked a long time ago, then I was mixing with some file in some folder, and it stopped worked. When I say workarorund I'm thinking maybe some string replacement somehow in rss.php? But I've no idea how to do it.

4 (edited by 2013-02-06 13:04:17)

Re: RSS åäö old 1.4.7

For this try to change in  ./inc/functions.inc.php the line

function replace_news($way, $sourse, $replce_n_to_br=TRUE, $use_html=TRUE){
    global $HTML_SPECIAL_CHARS, $config_allow_html_in_news, $config_allow_html_in_comments, $config_http_script_dir, $config_smilies;


to

function replace_news($way, $sourse, $replce_n_to_br=TRUE, $use_html=TRUE){
    global $HTML_SPECIAL_CHARS, $config_allow_html_in_news, $config_allow_html_in_comments, $config_http_script_dir, $config_smilies, $template;


where

$sourse  = preg_replace($find,$replace,$sourse);
           foreach ( $HTML_SPECIAL_CHARS as $key=>$value  ){
                     $sourse = str_replace($key,$value,$sourse);
           }


change to

$sourse  = preg_replace($find,$replace,$sourse);
           if ($template != 'rss') { foreach ( $HTML_SPECIAL_CHARS as $key=>$value  ){
                     $sourse = str_replace($key,$value,$sourse);
           } }
           else { $HTML_SPECIAL_CHARSRSS = Array
           (
              ...... (exact chars in zip file) ...
           );
               $sourse = str_replace(array_values($HTML_SPECIAL_CHARSRSS), array_keys($HTML_SPECIAL_CHARSRSS), $sourse);
           }


in same file

Best regards,
CN Support team

5 (edited by 2013-02-06 13:28:07)

Re: RSS åäö old 1.4.7

For this try to change in  ./inc/functions.inc.php the line

function replace_news($way, $sourse, $replce_n_to_br=TRUE, $use_html=TRUE){
    global $HTML_SPECIAL_CHARS, $config_allow_html_in_news, $config_allow_html_in_comments, $config_http_script_dir, $config_smilies;


to

function replace_news($way, $sourse, $replce_n_to_br=TRUE, $use_html=TRUE){
    global $HTML_SPECIAL_CHARS, $config_allow_html_in_news, $config_allow_html_in_comments, $config_http_script_dir, $config_smilies, $template;


where

$sourse  = preg_replace($find,$replace,$sourse);
           foreach ( $HTML_SPECIAL_CHARS as $key=>$value  ){
                     $sourse = str_replace($key,$value,$sourse);
           }


change to

$sourse  = preg_replace($find,$replace,$sourse);
           if ($template != 'rss') { foreach ( $HTML_SPECIAL_CHARS as $key=>$value  ){
                     $sourse = str_replace($key,$value,$sourse);
           } }
           else { $HTML_SPECIAL_CHARSRSS = Array
           (
              ...... (exact chars in zip file) ...
           );
               $sourse = str_replace(array_values($HTML_SPECIAL_CHARSRSS), array_keys($HTML_SPECIAL_CHARSRSS), $sourse);
           }


in same file

That made rss to stop work completely & made åäö stop working on the main page.

But I think I know where the problem is. It's the title. If you look here http://nhlkollen.se/ny/admin/rss.php?category=1 it's only missing åäö in the title. And when I did this solution you sent me, åäö stopped working in the titles on the site as well. I've no idea how this problem came to be tho!

Re: RSS åäö old 1.4.7

That made rss to stop work completely & made åäö stop working on the main page.

But I think I know where the problem is. It's the title. If you look here http://nhlkollen.se/ny/admin/rss.php?category=1 it's only missing åäö in the title. And when I did this solution you sent me, åäö stopped working in the titles on the site as well. I've no idea how this problem came to be tho!


You should have replaced the sequence  " ...... (exact chars in zip file) ..." with the symbols from the zip file we had sent you before, as the forum decodes these symbols back into characters.
So, please send functions.inc.php file to support@cutephp.com, and we'll take the necessary changes; or, alternatively, attach the file on the forum.

Best regards,
CN Support team

Re: RSS åäö old 1.4.7

You should have replaced the sequence  " ...... (exact chars in zip file) ..." with the symbols from the zip file we had sent you before, as the forum decodes these symbols back into characters.
So, please send functions.inc.php file to support@cutephp.com, and we'll take the necessary changes; or, alternatively, attach the file on the forum.

Yes, I did that with the symbols from the zip. Once I've done that, rss didn't work, and the title's on the main page was replaced with "?" marks with a black rectangle around them.