Page 1 of 1

CUtils website YADR update

Posted: Thu 02 Dec 2021 9:10 pm
by AndyKF650
I have spent some time updating my website to include Beteljuice's YADR as a direct inclusion rather than as a part of the default CMX site which is also linked in to my site.

Whilst I am very pleased with the current view of the YADR tables it would be good to be able to remove the background picture but I have been unable to find its source. Is any one able to point me in the right direction?

Edit By removing the <link href="css/mx-templates.css" rel="stylesheet"> from the yadr.php css list the background picture disappeared. Amazing what you can learn by trial and error.

Re: CUtils website YADR update

Posted: Sat 15 Oct 2022 6:50 am
by sutne
Andy,
I am using a modified version of Beteljuice’s YADR which uses MySql and has a summary of years for Rainfall. (http://www.rjoandveret.no/betel_datasummary.php?lang=en)

I would like to include this in CumulusUtils and I suppose if I read all the conversations between you and Hans in this forum and study it thorougly, I could figure it out.

But could you give me the short version on how to do it and maybe an example?

Re: CUtils website YADR update

Posted: Sat 15 Oct 2022 7:22 am
by HansR
AndyKF650 wrote: Thu 02 Dec 2021 9:10 pm Edit By removing the <link href="css/mx-templates.css" rel="stylesheet"> from the yadr.php css list the background picture disappeared. Amazing what you can learn by trial and error.
OK, I did not even know it had a background image. Never too old to learn ;)
Nice menu choice with great info. But maybe it would be nice to change the name of the beteljuice YADR to e.g. 'beteljuice YADR' to avoid confusion between YADR's?

Re: CUtils website YADR update

Posted: Sat 15 Oct 2022 7:29 am
by AndyKF650
Hi there @Sutne

I can see that you have the Beteljuice YADR file on your site so the issues just getting it to work have been sorted.

To get the YADR reader onto CUtils is fairly straight forward, firstly you need to add the link into the CUtils menu file as per the following example which you will see also includes the Rolling data links.

The Cutils menu file looks at an iFrame text file I have called basicYADR.txt, located in 'webfiles', which sets up the space for the YADR report on the CUtils web homepage.

The basicYADR.txt file then looks for the YADR.php file, located in 'web' which is the working file you have already set up for your site.

The last set up is to ensure that your dayfile.txt is sent to your website using the CMX extra webfiles on an end of day basis.

I hope this helps you out, please let me know if you need further information

Extract CUtils menu file

<li class='nav-item dropdown'>

<a class='nav-link dropdown-toggle' href='#' id='navbarDropdown' role='button' data-bs-toggle='dropdown' aria-haspopup='true' aria-expanded='false'> Dayfile data
</a>

<div class='dropdown-menu' aria-labelledby='navbarDropdown'>

<span class='nav-link' onclick="LoadUtilsReport('basicYadr.txt');">YADR</span>
<span class='nav-link' onclick="LoadUtilsReport('basicrollingdata.txt');">7 Day RollingData</span>
<span class='nav-link' onclick="LoadUtilsReport('basicrollingdata10Day.txt');">10 Day RollingData</span>

<div class='dropdown-divider'></div>

basic YADR.txt for iframe setup


<iframe src="https://lalouettegoreyweather.co.uk/yadr.php"
style="height:1000px;
width:1000px;
overflow:hidden;
border: 1px solid white;
background-color: transparent;
border-radius:16px"
scrolling="auto"></iframe>

Re: CUtils website YADR update

Posted: Sat 15 Oct 2022 7:37 am
by HansR
AndyKF650 wrote: Sat 15 Oct 2022 7:29 am basic YADR.txt for iframe setup

<iframe src="https://lalouettegoreyweather.co.uk/yadr.php"
style="height:1000px;
width:1000px;
overflow:hidden;
border: 1px solid white;
background-color: transparent;
border-radius:16px"
scrolling="auto"></iframe>
Hi Andy,

Thanks.

One remark: you have the overflow hidden but the php output does not fit into the frame. You could:
  1. stretch the height such that the yadr fits in, OR
  2. reduce the height such that you arrange the scrolling with the scrollbar.
Now it is kind of in between 'cannot choose'-thing

Re: CUtils website YADR update

Posted: Sat 15 Oct 2022 7:44 am
by AndyKF650
Hi Hans

Updated, try that and see if this works for you.

Re: CUtils website YADR update

Posted: Sat 15 Oct 2022 7:53 am
by HansR
And as a last point: your rolling data reports contain a '^' character in the upper left corner.
Where does that come from? Is that generated by CUtils? If so, could you indicate the process how?

Re: CUtils website YADR update

Posted: Sat 15 Oct 2022 7:54 am
by HansR
AndyKF650 wrote: Sat 15 Oct 2022 7:44 am Hi Hans

Updated, try that and see if this works for you.
Yes! To me looks much better. :clap:

Re: CUtils website YADR update

Posted: Sat 15 Oct 2022 7:59 am
by HansR
Oh... and beteljuice is without capital (his wish, see in memoriam by JennyLeez)

Re: CUtils website YADR update

Posted: Sat 15 Oct 2022 9:33 am
by meteo19
Hi
You can also download the latest version of beteljuice in Utils.
With a page that's going to look like this.
<!DOCTYPE HTML PUBLIC>
<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="weather data">
<meta name="keywords" content="Cumulus, weather, data, weather station">
<meta name="author" content="beteljuice">
<title>Data Summary</title>
<!-- jQuery library -->
<script src="lib/jquery/jquery-latest.min.js"></script>

<!-- Fonts System will default to a sans-serif font if no Internet connection -->
<link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css2?famil ... splay=swap" rel="stylesheet">
<link rel="stylesheet" type="text/css" media="screen" href="css/700betel_datasummary.css" /> <!-- Specific styles for THIS template. -->
<style>
/* over-rides required for this page */
td, th {
font-family: verdana;
font-size: 9pt;
}
li {
font-family: verdana;
}
p.table_title { /* no space or simply doesn't work ! */
font-size: 100%;
background-color: white;
}
#table_name .table_title {
font-family: verdana;
}
#tableData {
line-height: 1;
}

.mx-button {margin-bottom: 5px; border-radius: 4px; width: 100%;}
}
</style>

<div id="tableData">
<?php
include('betel_readDayfile.php');
?>
</head>
</body>
</html>
It works in Utils here:
http://www.meteosegur.fr/CU_MX/utils/betel-pws.php

Re: CUtils website YADR update

Posted: Sat 15 Oct 2022 3:44 pm
by sutne
Thank you, Andy.
And to Hans as well, who makes the platform!

This was very easy (when I managed to spell file-names correctly)!

Now I need some more adjustment with css etc.

Regards
Steinar

Re: CUtils website YADR update

Posted: Sun 23 Oct 2022 9:02 am
by AndyKF650
Hi Hans

A few days back you pointed out a problem ^ which was on my 7day rolling data reports, this is something that has been annoying me ever since I set this report up. No matter how hard I looked I could not trace the error.

By way of background the basic .php file worked well but needed a source of "Today" data on a cmxtags.php which @marpanz kindly supplied. As soon as I set this up as a source for my rolling data reports the ^ error popped up and I could not remove it. Today, on further investigation I reduced the extensive tags file to just those I needed and set up a new cmxtagsT.txt file which is read as an extra webfile in CMX.

As you can now see the ^ error is gone and the rolling data reports look OK :D

Re: CUtils website YADR update

Posted: Sun 23 Oct 2022 10:01 am
by HansR
Good. Another problem solved.
What file was that from Mapantz?