PHP programming
-
- Observer
- Posts: 27
- Joined: Fri Nov 23, 2018 12:24 pm
- Station model: WH-3080
- Software: Cumulus
PHP programming
Can someone tell me how I can represent the "bold" made different colored posts?
$ valuecbiwd = array ();
$ valuecbiwd [0] = lang("very low risk", "c");
$ valuecbiwd [1] = lang("low risk", "c");
$ valuecbiwd [2] = lang("medium danger", "c");
$ valuecbiwd [3] = lang("high risk", "c");
$ valuecbiwd [4] = lang("Very high danger", "c");
Thanks in advance
greeting
Harry
$ valuecbiwd = array ();
$ valuecbiwd [0] = lang("very low risk", "c");
$ valuecbiwd [1] = lang("low risk", "c");
$ valuecbiwd [2] = lang("medium danger", "c");
$ valuecbiwd [3] = lang("high risk", "c");
$ valuecbiwd [4] = lang("Very high danger", "c");
Thanks in advance
greeting
Harry
-
- Professional
- Posts: 431
- Joined: Tue Feb 27, 2018 10:56 pm
- Location: OKLAHOMA, USA
- Station model: Ecowitt WS90
- Software: Meteobridge/GW2000B
- Contact:
Re: PHP programming
Hello!LeShark1205 wrote: ↑Tue Dec 18, 2018 12:10 pm Can someone tell me how I can represent the "bold" made different colored posts?
$ valuecbiwd = array ();
$ valuecbiwd [0] = lang("very low risk", "c");
$ valuecbiwd [1] = lang("low risk", "c");
$ valuecbiwd [2] = lang("medium danger", "c");
$ valuecbiwd [3] = lang("high risk", "c");
$ valuecbiwd [4] = lang("Very high danger", "c");
Thanks in advance
greeting
Harry
I'm not sure if this script will accept html code but you could try:
Code: Select all
$ valuecbiwd [0] = lang("color="#00ff00">[b]very low risk<[/b]", "c");
$ valuecbiwd [0] = lang("color="#00ff0">very low risk<", "c");
If it works you can google "html code or css code" for color, font etc.
Andy
Last edited by andyk1 on Fri Dec 21, 2018 11:49 am, edited 1 time in total.
-
- Observer
- Posts: 27
- Joined: Fri Nov 23, 2018 12:24 pm
- Station model: WH-3080
- Software: Cumulus
Re: PHP programming
Sorry, that does not work! Then get this error message:andyk1 wrote: ↑Fri Dec 21, 2018 11:11 amHello!LeShark1205 wrote: ↑Tue Dec 18, 2018 12:10 pm Can someone tell me how I can represent the "bold" made different colored posts?
$ valuecbiwd = array ();
$ valuecbiwd [0] = lang("very low risk", "c");
$ valuecbiwd [1] = lang("low risk", "c");
$ valuecbiwd [2] = lang("medium danger", "c");
$ valuecbiwd [3] = lang("high risk", "c");
$ valuecbiwd [4] = lang("Very high danger", "c");
Thanks in advance
greeting
Harry
I'm not sure if this script will accept html code but you could try:
#00ff00 is green by the way.Code: Select all
$ valuecbiwd [0] = lang("color="#00ff00>[b]very low risk<[/b]", "c");
If it works you can google "html code or css code" for color, font etc.
Andy
Parse error: syntax error, unexpected 'valuecbiwd' (T_STRING), expecting variable (T_VARIABLE) or '$' in /var/www/vhosts/euro-picture.de/httpdocs/hiltenfingen/template/plugins/fireDanger/fireDanger.php on line 116
-
- Observer
- Posts: 27
- Joined: Fri Nov 23, 2018 12:24 pm
- Station model: WH-3080
- Software: Cumulus
-
- Professional
- Posts: 431
- Joined: Tue Feb 27, 2018 10:56 pm
- Location: OKLAHOMA, USA
- Station model: Ecowitt WS90
- Software: Meteobridge/GW2000B
- Contact:
Re: PHP programming
Parse error: syntax error, unexpected 'valuecbiwd'
means the format is incorrect. look up html code for the correct color format you need. There are different formats to entry the color codes you need.
means the format is incorrect. look up html code for the correct color format you need. There are different formats to entry the color codes you need.
-
- Professional
- Posts: 431
- Joined: Tue Feb 27, 2018 10:56 pm
- Location: OKLAHOMA, USA
- Station model: Ecowitt WS90
- Software: Meteobridge/GW2000B
- Contact:
Re: PHP programming
or look through some of his PHP files to find how he entered the color format in them and copy his format method.
-
- Observer
- Posts: 27
- Joined: Fri Nov 23, 2018 12:24 pm
- Station model: WH-3080
- Software: Cumulus
Re: PHP programming
I'll do it, now come the holidays, there's certainly some time! Wish you and your family a Merry Christmas
best regards
Harry
best regards
Harry
-
- Professional
- Posts: 431
- Joined: Tue Feb 27, 2018 10:56 pm
- Location: OKLAHOMA, USA
- Station model: Ecowitt WS90
- Software: Meteobridge/GW2000B
- Contact:
Re: PHP programming
I see what you are doing and it's a good idea. Different colors for different warning levels. I'll try and find how he did it but I see now he did it in a sophisticated way by which you chose your colors i.e. light, dark backrounds which he is using CSS code so the best way would be ask him. I'd like to see if it works. Let me know as I may try it also. Again... good idea.
Andy
Andy
-
- Professional
- Posts: 431
- Joined: Tue Feb 27, 2018 10:56 pm
- Location: OKLAHOMA, USA
- Station model: Ecowitt WS90
- Software: Meteobridge/GW2000B
- Contact:
Re: PHP programming
Back at you. Wish you the best.LeShark1205 wrote: ↑Fri Dec 21, 2018 12:04 pm I'll do it, now come the holidays, there's certainly some time! Wish you and your family a Merry Christmas
best regards
Harry
Andy
-
- Observer
- Posts: 27
- Joined: Fri Nov 23, 2018 12:24 pm
- Station model: WH-3080
- Software: Cumulus
Re: PHP programming
You are welcome to sign up in my guestbook, have not set it free in vain
http://wetter-hiltenfingen.euro-picture.de
http://wetter-hiltenfingen.euro-picture.de
-
- Professional
- Posts: 431
- Joined: Tue Feb 27, 2018 10:56 pm
- Location: OKLAHOMA, USA
- Station model: Ecowitt WS90
- Software: Meteobridge/GW2000B
- Contact:
Re: PHP programming
Am at your site and changed it to English as I do not speak German and can not find Guestbook. Your site looks Awesome by the way.LeShark1205 wrote: ↑Fri Dec 21, 2018 12:14 pm You are welcome to sign up in my guestbook, have not set it free in vain
http://wetter-hiltenfingen.euro-picture.de
Can you tell me what block or plugin you are trying to change the colors in so I can look at the php code please...
-
- Observer
- Posts: 27
- Joined: Fri Nov 23, 2018 12:24 pm
- Station model: WH-3080
- Software: Cumulus
Re: PHP programming
The guestbook is under "info / Gästebuch"
The code is in the plugin folder "fireDanger" (fireDanger.php)
The code is in the plugin folder "fireDanger" (fireDanger.php)
-
- Professional
- Posts: 431
- Joined: Tue Feb 27, 2018 10:56 pm
- Location: OKLAHOMA, USA
- Station model: Ecowitt WS90
- Software: Meteobridge/GW2000B
- Contact:
Re: PHP programming
Got it. I sent a message to your contacts block but not sure it worked since I couldn't click on the "I am not a robot" I sent it anyway so you can check if it worked.
-
- Observer
- Posts: 27
- Joined: Fri Nov 23, 2018 12:24 pm
- Station model: WH-3080
- Software: Cumulus
-
- Professional
- Posts: 431
- Joined: Tue Feb 27, 2018 10:56 pm
- Location: OKLAHOMA, USA
- Station model: Ecowitt WS90
- Software: Meteobridge/GW2000B
- Contact:
Re: PHP programming
Ok I see now what you are trying to do. In fireDangerBlock.php The colors are in the code.
$severityBg = "#d82d2d"; = the background color is a specific shade of red.
$severityColor = "white"; = the Text color white.
Find the html color codes and you should have what your looking for. Try at:
https://www.computerhope.com/cgi-bin/ht ... l?c=D82D2D
Or google html color code to find a site easier to use.
Andy
Code: Select all
if($CBI<50){
$severity = 0;
$severityText = lang('low','c');
$severityBg = "#ffe8e8";
$severityColor = "black";
}
else if($CBI>=50 && $CBI<75){
$severity = 1;
$severityText = lang('moderate','c');
$severityBg = "#ffb5b5";
$severityColor = "black";
}
else if($CBI>=75 && $CBI<90){
$severity = 2;
$severityText = lang('high','c');
$severityBg = "#ff7c7c";
$severityColor = "black";
}
else if($CBI>=90 && $CBI<97.5){
$severity = 3;
$severityText = lang('very high','c');
$severityBg = "#d82d2d";
$severityColor = "white";
}
else{
$severity = 4;
$severityText = lang('extreme','c');
$severityBg = "#a00606";
$severityColor = "white";
}
$CBI = round($CBI);
$color1 = $theme=="dark" ? "white" : "black";
$severityColor = "white"; = the Text color white.
Find the html color codes and you should have what your looking for. Try at:
https://www.computerhope.com/cgi-bin/ht ... l?c=D82D2D
Or google html color code to find a site easier to use.
Andy
-
- Observer
- Posts: 27
- Joined: Fri Nov 23, 2018 12:24 pm
- Station model: WH-3080
- Software: Cumulus
Re: PHP programming
Have the code changed, let's see what happens when the fire danger in spring rises, if then what changes! Have you sent a message regarding your FlagCounter!
-
- Professional
- Posts: 431
- Joined: Tue Feb 27, 2018 10:56 pm
- Location: OKLAHOMA, USA
- Station model: Ecowitt WS90
- Software: Meteobridge/GW2000B
- Contact:
Re: PHP programming
OK I posted a message in your guest book and it went through as far as I could tell. A message sent to your contact me block did not seem to work.LeShark1205 wrote: ↑Fri Dec 21, 2018 12:53 pmI did not receive a file! Send by mail to the mail-adress in your guestbook
- captainjackfan10
- Observer
- Posts: 32
- Joined: Fri May 31, 2019 5:33 pm
- Location: Napoleon, Ohio USA
- Station model: Acurite Atlas
- Software: WU
- Contact:
Re: PHP programming
How about making some new blocks I have one I think would be great! Well a couple to be honest with you! 1st one I have a Netgear Arlo Cam and I would love to use the blocks for webcam and timelapse but have no idea how to get arlo web came by Netmaster to transfer live feed or even snap shots from my cam. I heard there was a script from my IP CAM Arlo a user said on WxForum suppose to be Python? I have no clue he said it was for WU. I can use that to to put up on my WU station site. But I could use both. There has to be a way to get these feed on my website and WU.
Ok and another idea for a block script or meteotemplate main setup area add on is this site right here they allow a free API you can get to share forecasts and other weather data.
https://openweathermap.org/
Ok and another idea for a block script or meteotemplate main setup area add on is this site right here they allow a free API you can get to share forecasts and other weather data.
https://openweathermap.org/
Douglas E. Cobb
Come Join My Facebook Weather Group!
https://www.facebook.com/groups/6008536 ... =bookmarks
Come Join My Facebook Weather Group!
https://www.facebook.com/groups/6008536 ... =bookmarks