1 (edited by 2012-04-02 19:16:56)

Topic: No åäö on addnews and editnews anymore?

$matches[1]
$matches[1]

$matches[1]
Hi! I was playing around in the addnews and editnews files and maybe some more. Anyway... Now, I don't have åäö in the titles anymore in addnews and editnews. Åäö is shown when the news get posted.

Check here:
http://www.nhlkollen.se

$matches[1]
If you go into an article like this one which contains åäö in the title:
http://nhlkollen.se/index.php?subaction=sh...amp;ucat=3&

you will see that åäö isnt in the browser title anymore. Im using javascript to chance the title.

What can I have made wrong?
Sorry for a maybe confusing post but I'm in a hurry right now.

Re: No åäö on addnews and editnews anymore?

Dear User!

Please try adding the "åäö" symbols, not the replacing functions directly to the title.

Best regards,
CN Support team

3 (edited by 2012-04-03 09:21:00)

Re: No åäö on addnews and editnews anymore?

Dear User!

Please try adding the "åäö" symbols, not the replacing functions directly to the title.

EDIT: Ok, so I fixed åäö problem on the admin-section now, and on the index... But I still the title still gets wrong.
Here how I do it...

In my template, I go to full story and in full story I do this:
<script language="javascript">
document.title = "NHLKOLLEN.SE - {title}";
</script>

But If the title includes åäö it's get wrong. Any idea?

4 (edited by 2012-04-03 19:27:31)

Re: No åäö on addnews and editnews anymore?

You could try the php version, see if it works

https://cutephp.com/forum/index.php?showtopic=31743

Re: No åäö on addnews and editnews anymore?

You could try the php version, see if it works

https://cutephp.com/forum/index.php?showtopic=31743

Thanks, but that didn't help. It made the website alot slower for some reason and åäö still didn't work.

6 (edited by 2012-04-05 01:18:27)

Re: No åäö on addnews and editnews anymore?

Well, in javascript, å ä ö would be \u00E5 \u00E4 \u00F6

http://rishida.net/tools/conversion/

Perhaps something like this would work:

<script type="text/javascript">
var title="{title}";
title.replace("Ã¥", "\u00E5");
title.replace("ä", "\u00E4");
title.replace("ö", "\u00F6");
document.title = title;
</script>

been some time since I last coded javascript, so there might be some errors... And I'm not sure how the chars (åäö) are in the {title}, or if it works at all ".handle_img_tag($matches[1].$matches[3], false)."

7 (edited by 2012-04-05 08:05:54)

Re: No åäö on addnews and editnews anymore?

Well, in javascript, å ä ö would be u00E5 u00E4 u00F6

http://rishida.net/tools/conversion/

Perhaps something like this would work:

<script type="text/javascript">
var title="{title}";
title.replace("Ã¥", "u00E5");
title.replace("ä", "u00E4");
title.replace("ö", "u00F6");
document.title = title;
</script>

been some time since I last coded javascript, so there might be some errors... And I'm not sure how the chars (åäö) are in the {title}, or if it works at all ".handle_img_tag($matches[1].$matches[3], false)."

Thanks, but didn't work either hmm
It says &aring instead of å for example.

8 (edited by 2012-10-10 06:55:52)

Re: No åäö on addnews and editnews anymore?

help me with that if i create for You admin account to english version of my site? I'm too dumb... Thanks if you agree to help me.

Re: No åäö on addnews and editnews anymore?

EDIT: Ok, so I fixed åäö problem on the admin-section now, and on the index... But I still the title still gets wrong.
Here how I do it...

In my template, I go to full story and in full story I do this:
<script language="javascript">
document.title = "NHLKOLLEN.SE - {title}";
</script>

But If the title includes åäö it's get wrong. Any idea?



No, I don't have any idea regarding this. But one of my friend is a developer and he told me that this problem is quite common.

Re: No åäö on addnews and editnews anymore?

To solve the problem with UTF8 symbols  you need to change the code in the following files
./core/init.php https://raw.github.com/CuteNews/cute-news-r...s/core/init.php
inc/options.php https://raw.github.com/CuteNews/cute-news-r...inc/options.php

It's better to download the latest build from github https://github.com/CuteNews/cute-news-repo/downloads

Best regards,
CN Support team