Fiji Web Design
Welcome, Guest
Please Login or Register.    Lost Password?
Re:Big trouble with a Norwegian weather php script (1 viewing) (1) Guest
Go to bottom Post Reply Favoured: 0
TOPIC: Re:Big trouble with a Norwegian weather php script
#407
fjellfinn (User)
Fresh Boarder
Posts: 4
graphgraph
User Offline Click here to see the profile of this user
Big trouble with a Norwegian weather php script 3 Years, 2 Months ago Karma: 0  
Hello,

I use the Norwegian weather forecast from www.yr.no on my homepage, as a html version.

I should like to use the more accurate php script, a yr.php which can be downloaded from their website.

I get three big problems which I am unable to solve:

a) the yr.php "leaves" my Joomla main content module, and opens in a new, blank window.

( I have teste your php module with other test scripts, they open "inside" Joomla main content)

b) the yr.php will not "parse" Norwegian characters, if I put this link:

http://www.yr.no/sted/Norge/Sør-Trøndelag/Rennebu/Nerskogen~2291328/

-- the yr.php will fail

if I remove the Norw char, and write
http://www.yr.no/sted/Norge/Sor-Trondelag/Rennebu/Nerskogen~2291328/

the script also fails

If I test with a city with no spec. chars., like : http://www.yr.no/sted/Norge/Nordland/Fauske/

The script shows the weather data I want!

c) the yr.php dont display norw charcters

Thanks!
 
Report to moderator   Logged Logged  
 
Last Edit: 2008/12/03 03:30 By fjellfinn. Reason: added yr.php
  The administrator has disabled public write access.
#410
admin (Admin)
Admin
Posts: 475
graph
User Online Now Click here to see the profile of this user
Re:Big trouble with a Norwegian weather php script 3 Years, 2 Months ago Karma: 10  
Hi,

Can you post the PHP script you are using?

I think the problems are specific to that PHP script and the character encoding of your site. If you could post the URL of your site, that would also help.

 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#412
fjellfinn (User)
Fresh Boarder
Posts: 4
graphgraph
User Offline Click here to see the profile of this user
Re:Big trouble with a Norwegian weather php script 3 Years, 2 Months ago Karma: 0  
The script looks this on a live website:
http://kvas.no/ver/

The script is found here:
http://www.yr.no/place/Norway/S%c3%b8r-Tr%c3%b8ndelag/Rennebu/Nerskogen~198786/data.html
File Attachment:
File Name: 1.zip
File Size: 9673


I have a UTF - 8 website.



Thanks
http://www.itrollheimen.net/
File Attachment:
File Name: 1.zip
File Size: 9673
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#414
admin (Admin)
Admin
Posts: 475
graph
User Online Now Click here to see the profile of this user
Re:Big trouble with a Norwegian weather php script 3 Years, 2 Months ago Karma: 10  
Is your database set to store as UTF-8?
The PHP you paste into mod_php will be stored in the database as module parameters, so it will have to be stored as UTF-8 to handle the UTF-8 characters.

What you using to open your PHP code, your editor will have to be UTF-8 compatible.

I think it would be easiest to try and paste the PHP code into just a plain PHP file first, and see if it works.

You can also try the PHP component, it does not store in the database, but writes directly to file. http://www.fijiwebdesign.com/products/joomla-php-pages.html
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#428
fjellfinn (User)
Fresh Boarder
Posts: 4
graphgraph
User Offline Click here to see the profile of this user
Re:Big trouble with a Norwegian weather php script 3 Years, 2 Months ago Karma: 0  
I have tried also that one -- no luck.
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#431
admin (Admin)
Admin
Posts: 475
graph
User Online Now Click here to see the profile of this user
Re:Big trouble with a Norwegian weather php script 3 Years, 2 Months ago Karma: 10  
Inside mod PHP, and also the PHP component, you will find the line:

$php = str_replace('<br />', '', $php);

Try removing that line, see if it helps. I don't think str_replace() is multibyte aware, so it may be mangling the UTF-8 encoding. I'll update the two extensions if that is the case.
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
Go to top Post Reply
Powered by FireBoardget the latest posts directly to your desktop

Joomla Downloads

DownloadsDownload our free Joomla! Components, Modules and Plugins.