Page 21 of 54

Re: Now available: AJAX/PHP multilingual website templates

Posted: Wed 30 Mar 2011 12:06 pm
by JESUS HEREDERO
Hi Ray
In everything you mention and as agreed, and installed and I checked out the image data of Cumulus-realtime.txt, but before that I had to cancel the Metar by prioritizing the Metar data realtime.
If you imagine that you put the code of scr=........ already had done. I looked for other files to compare and fell where he had to <span> scr=...........</span>. but I hope that the data coming out in the tests I also go to my on one side of the image left or right is irrelevant. Although these data are a little above. but the picture is very alone in the center
I will look into other files and testing ire

My English is not good, it's TRANSLATION of Google, I hope you understand

see http://meteoestremera.es/tiempo/index.php

Thanks for your time

Jesús

Re: Now available: AJAX/PHP multilingual website templates

Posted: Wed 30 Mar 2011 12:20 pm
by gemini06720
Find attached an updated 'cloudbase.php' script (minor additions, corrections, and modifications).

This ZIP file DOES NOT contain the required graphic files - this ZIP file only contains the updated PHP script and readme text file.

Re: Now available: AJAX/PHP multilingual website templates

Posted: Wed 30 Mar 2011 12:51 pm
by gemini06720
kinder wrote:i tried to modify this cloudbase script so it can work on another webserver than the one i have template and realtime.txt.
As it is designed, the 'cloudbase.php' script can only read the 'realtime.txt' file on the same server (relative paths).

Many changes to the code would be required to be able to read the data file from a URL ... and I do not think I am ready to get myself involved with such a major rewrite - there are still a few bugs to remove from the present code...

Re: Now available: AJAX/PHP multilingual website templates

Posted: Wed 30 Mar 2011 1:15 pm
by gemini06720
JESUS HEREDERO wrote:...but before that I had to cancel the Metar by prioritizing the Metar data realtime.
Jesús, the use of the METAR is optional (meaning it can be switched off) or the METAR can be used at night only (to get the cloud information).

Jesús, I am not too sure about the rest of your message - I think it might have to deal/do with how to place the image into the 'ajax-dashboard.php' script so it displays properly... Have a look at my <link removed> main page to see how I incorporated the 'cloudbase' script into that page...

Re: Now available: AJAX/PHP multilingual website templates

Posted: Wed 30 Mar 2011 6:36 pm
by JESUS HEREDERO
Thanks Ray, and is working well

Jesús

Re: Now available: AJAX/PHP multilingual website templates

Posted: Wed 30 Mar 2011 7:12 pm
by actioman
actioman wrote:...Hummm I have tried, but did not I liked the end result...
... First because it refers to Davis and my station is a PCE and there is also confused in the middle of the forecast wu...
Easy change. Replace in ajax-dashboard.php

Code: Select all

		      print '		   	   <b>Davis VP+ ' . langtransstr('forecast') . ':</b> <span style="color: green; font-size:9pt">' . ucfirst($vpforecasttext) . "</span>"; 
with

Code: Select all

		      print '		   	   <b>Cumulus ' . langtransstr('forecast') . ':</b> <span style="font-size:9pt">' . ucfirst($vpforecasttext) . "</span>"; 
and it should work for you.

Best regards,
Ken[/quote]

Ok Ken, I've made that change. It was easier than I thought :o , but continues to be the file that I'm more afraid of change. It has lots of information and placements... ;)

I found a problem in the translation, in english the correct sentence is: "Cumulus forecast" but in portuguese or spanish the words appear reversed: In portuguese "Previsão do Cumulus"; in spanish "Previsión del Cumulus".
So to fix it I did the following change:

Code: Select all

  print '               <b>Cumulus ' . langtransstr('forecast') . ':</b> <span style="font-size:9pt">' . ucfirst($vpforecasttext) . "</span>";
			} ?></td>

Code: Select all

print '               <b> ' . langtransstr('Cumulus forecast') . ':</b> <span style="font-size:9pt">' . ucfirst($vpforecasttext) . "</span>";
			} ?></td
Then I added this line to the "language-xx.txt" files:

Code: Select all

langlookup|Cumulus forecast|Previsão do Cumulus|
(example for the portuguese file)

However what I asked to Ken is if you could put this forecast elsewhere. In an independent local from WU forecast. ;)

gemini06720 wrote:OK, here is what I hope a fully multilingual cloud base script - I have tried the script with the three template sets and the results appeared correct (well, at least for english and french languages) - I tried with other languages but they only displayed in english as the proper translations had not been entered into the 'language-LL.txt' language templates. I have not yet translated the Cumulus forecasts - would any of you have the 27 Cumulus forecast strings translated to french?

The multilingual cloud base script should produce an image with, not only Cumulus, but also Weather Display, VWS (Virtual Weather Station) and WUHU (Heavy Weather) - I have tested the code only with the Cumulus and the Weather Display data files - I have not tried the script with the other software.

This is the image the cloud base script should produce - not all options have been activated:
Image

Ensure that you keep the proper directory path for the graphic files.

If you encounter any problems, I would like to hear about them. If you have suggestions, I would like to hear about them (but, please, do not ask me to completely rewrite the script for you personal needs :roll: ). If you produce a translation to another languages, I would really appreciate if you send me a copy - eventually, I would like to include translations.

First off all, thank you very much Ray for your amazing script!! :o I will try it!
Now we have the chance to use the cloud base of Cumulus!

And as I see Jesús already done what was missing: how to place the image into the 'ajax-dashboard.php' script so it displays properly

:clap:

Great teen you are anda great teachers for me!

Thank you very much, muchas gracias!

Re: Now available: AJAX/PHP multilingual website templates

Posted: Wed 30 Mar 2011 7:14 pm
by nitrx
Just uploaded the cloudbasescript works fine only have to do the translation and ofcourse to know where to put the image..
Well Ray what about the colorfull thermometer/gauge Image 8-)

Re: Now available: AJAX/PHP multilingual website templates

Posted: Thu 31 Mar 2011 12:47 am
by gemini06720
actioman wrote: ...I found a problem in the translation, in english the correct sentence is: "Cumulus forecast" but in portuguese or spanish the words appear reversed: In portuguese "Previsão do Cumulus"; in spanish "Previsión del Cumulus".
Manuel, this is what I was arguing in a previous message that, to cut corners, repeated words (such as forecast) were translated by themselves without ensuring that the grammar for any other languages (other than english) was correct (remember, I have been quoted as "having a strong disdain for grammatically-incorrect language usage" - yes, that is me... :roll: ). It would have been no more difficult to translate the complete expressions rather than just the individual words... :(

For example, the 'language-LL.txt' could have contained the following expressions (phrases/texts/words):

Code: Select all

langlookup|Cumulus Forecast|Cumulus Forecast|
langlookup|Weather Display Forecast|Weather Display Forecast|
langlookup|VWS Forecast|VWS Forecast|
langlookup|WeatherLink Forecast|WeatherLink Forecast|
langlookup|WXSIM Forecast|WXSIM Forecast|
This way, a grammatically-correct translation of the above expressions (phrases/texts/words) would have been possible, such as (for french):

Code: Select all

langlookup|Cumulus Forecast|Prévisions météo de Cumulus|
langlookup|Weather Display Forecast|Prévisions météo de Weather Display|
langlookup|VWS Forecast|Prévisions météo de VWS|
langlookup|WeatherLink Forecast|Prévisions météo de WeatherLink|
langlookup|WXSIM Forecast|Prévisions météo de WXSIM|
It is a good thing that I have at my disposal one of the most complete 'language-fr.txt' file which contains the grammatically-correct translations of ALL the scripts for the past two years... :mrgreen:
actioman wrote: However what I asked to Ken is if you could put this forecast elsewhere. In an independent local from WU forecast. ;)
Manuel, it is up to you to move things around - I could send you my highly commented and modified 'ajax-dashboard.php' template, the one used to create this <link removed> page or this <link removed> page so you can look at the code and how I moved things around, but I must warn you that those templates cannot be used instead of the one being released with the 'AJAX/PHP Multilingual Website Templates' sets (please note that those two pages are produced with data obtained from Weather Display).
actioman wrote: First off all, thank you very much Ray for your amazing script!! I will try it!
Manuel, how dare you write that the 'cloudbase' script is amazing if you have not tried it yet...
actioman wrote: Now we have the chance to use the cloud base of Cumulus!
I had adapted the 'cloudbase' script to the Cumulus data information about a year ago. What I have recently done thought was to clean the code and add new variable to better control the location of the different files needed to use the script. I still have to include the code needed to use the data from the WeatherLink software... :(
actioman wrote: And as I see Jesús already done what was missing: how to place the image into the 'ajax-dashboard.php' script so it displays properly
What Jesús did was to simply to add a table 'container' into which the the code for 'cloudbase' script was included - but it 'breaks' the 'normal' display of the page. As I suggested to Jesús, have a look at my <link removed> page so you can see hoe the cloudbase-produced image can be integrated into a page.

Re: Now available: AJAX/PHP multilingual website templates

Posted: Thu 31 Mar 2011 1:01 am
by gemini06720
nitrx wrote:...only have to do the translation...
Ron, I am expecting an excellent dutch translation from you so I can include the dutch language into the script for the 'self-standing' format of the script - meaning the 'cloudbase' script is being used by itself and relies solely on the data file (such as 'realtime.txt') and none of the other templates/settings.
nitrx wrote:...and of course to know where to put the image...
I could tell you where to put the 'cloudbase' script ... but then, I would be permanently banned from the forums... :mrgreen:
nitrx wrote:...Well Ray what about the colorfull thermometer/gauge 8-)
Where?? Certainly not inside the 'cloudbase' script... :? Or do you mean a colourful thermometer to be used on the main page - have you seen the one I use on my <link removed> ... I had to dust off the spider webs and shrink it's size before I could add it to the main page... :twisted:

Re: Now available: AJAX/PHP multilingual website templates

Posted: Thu 31 Mar 2011 1:32 am
by PaulMy
Ray,
Thank you for the graph and I will move things around later in the week.

Code: Select all

Or better yet, which political party will you be supporting... 
Ray, in a previous life I would have been able to tell you ;) , but now I am obliged to remain :| and independent.

Paul

Re: Now available: AJAX/PHP multilingual website templates

Posted: Thu 31 Mar 2011 1:35 am
by n9mfk
Hi Ken,
i was editing some code i moved is this code correct

Code: Select all

list($date_year,$date_month,$date_day,$time_hour,$time_minute,$monthname,$dayname)
  = CU_setDateTimes($date,$time,$SITE['WDdateMDY']);

thanks Beau

Re: Now available: AJAX/PHP multilingual website templates

Posted: Thu 31 Mar 2011 2:06 am
by gemini06720
n9mfk wrote:i was editing some code i moved is this code correct
Beau, if you would explain a little bit what you are trying to do, where you are moving the code to, anything, it would be easier for anyone to help you - remember the advice any one of us can give you is directly proportional to the amount of information you provide... :roll:

The code you quoted is the exact code that can be found in the 'CU-defs.php' script (lines 108-109)...

Re: Now available: AJAX/PHP multilingual website templates

Posted: Thu 31 Mar 2011 2:38 am
by n9mfk
hi Ray i was adding some tags when i saw

Code: Select all

  = CU_setDateTimes($date,$time,$SITE['WDdateMDY']);
i thought i had moved it
beau

Re: Now available: AJAX/PHP multilingual website templates

Posted: Thu 31 Mar 2011 10:38 am
by gemini06720
n9mfk wrote:hi Ray i was adding some tags...
Beau, as Ken wrote in a previous message, you do not need to modify (to add or remove) anything in the 'CU-defs.php' script...

If you need a tag and that tag cannot be found in the 'CU-defs.php' script (meaning there was no reasons to convert the tag into a variable) and that tag name can be found in the 'CUtags.php' template, then you need to use the $WX['webtagname'] variable directly into the web page.

For example, let say I would like to display the type of station used for the weather information - that would be the <#stationtype> Cumulus webtag. If I look into the 'CUtags-comments.php' template, I find the following:

Code: Select all

stationtype|Davis Vantage Pro2 Plus|// The type of station in use:|:
So, to put the station information on my web page, all I have to do is to add the following:

Code: Select all

Station Type: <?php echo $WX['stationtype']; ?>
You see, there is/was no need for me to add an additional variable into the 'CU-defs.php' script - all the Cumulus webtags are available through the $WX['webtagname'] variable.

The reason why some of the webtags have been converted to variables (those you see in the 'CU-defs.php' script) is because those variables are (or should be) available from all four weather software for which the 'AJAX/PHP Multilingual Website Templates' have been created.

Re: Now available: AJAX/PHP multilingual website templates

Posted: Thu 31 Mar 2011 1:18 pm
by nitrx
gemini06720 wrote:
nitrx wrote:...only have to do the translation...
Ron, I am expecting an excellent dutch translation from you so I can include the dutch language into the script for the 'self-standing' format of the script - meaning the 'cloudbase' script is being used by itself and relies solely on the data file (such as 'realtime.txt') and none of the other templates/settings.
nitrx wrote:...and of course to know where to put the image...
I could tell you where to put the 'cloudbase' script ... but then, I would be permanently banned from the forums... :mrgreen:
nitrx wrote:...Well Ray what about the colorfull thermometer/gauge 8-)
Where?? Certainly not inside the 'cloudbase' script... :? Or do you mean a colourful thermometer to be used on the main page - have you seen the one I use on my main page ... I had to dust off the spider webs and shrink it's size before I could add it to the main page... :twisted:
I'm not sure what you mean about the translation I did'nt translate nothing in the php-script I made the additions to the language-??.txt.
a zip is attached, these textstrings should be appendended to language-nl.txt I think I'm the only one using the php script in The Netherlands for Cumulus.
cloudbasedutchlanguage.zip
I could put the cloudscript there but that has no sense for my visitors :geek: BTW i had to change the altitude in the php script.

About the thermometer it's this one http://tzweather.org/wxweather/thermometer.php?uom=C the same picture I included in my post :D