Welcome to the Cumulus Support forum.

Latest Cumulus MX V4 release 4.4.2 (build 4085) - 12 March 2025

Latest Cumulus MX V3 release 3.28.6 (build 3283) - 21 March 2024

Legacy Cumulus 1 release 1.9.4 (build 1099) - 28 November 2014
(a patch is available for 1.9.4 build 1099 that extends the date range of drop-down menus to 2030)

Download the Software (Cumulus MX / Cumulus 1 and other related items) from the Wiki

If you are posting a new Topic about an error or if you need help PLEASE read this first viewtopic.php?p=164080#p164080

Removing space in ajax-gizmo.php

Discussion of Ken True's web site templates

Moderator: saratogaWX

Post Reply
User avatar
William Grimsley
Posts: 833
Joined: Thu 22 Sep 2011 5:22 pm
Weather Station: Davis Vantage Vue
Operating System: Windows 7 Home Premium 64-bit
Location: Latitude: 50.70189285 Longitude: -3.30849957
Contact:

Removing space in ajax-gizmo.php

Post by William Grimsley »

Hi Ken,

How do you remove the space between the °C and /hr in ajax-gizmo.php?

On my site it currently shows like this: +1.2c /hr

On my site I want it to show like this: +1.2c/hr

Please can you help?

Thanks

Will
User avatar
saratogaWX
Posts: 1238
Joined: Wed 06 May 2009 5:02 am
Weather Station: Davis Vantage Pro Plus
Operating System: Windows 10 Professional
Location: Saratoga, CA, USA
Contact:

Re: Removing space in ajax-gizmo.php

Post by saratogaWX »

williamwilbur wrote:Hi Ken,

How do you remove the space between the °C and /hr in ajax-gizmo.php?

On my site it currently shows like this: +1.2c /hr

On my site I want it to show like this: +1.2c/hr

Please can you help?

Thanks

Will
This does not seem to be a major problem (the space between the value and the /hr) as it is perfectly understandable either way.

But to humor you, change ajax-gizmo.php from

Code: Select all

			<span class="ajax" id="gizmotemprate"><?php 
			if(isset($tempchangehour)) {
				echo $tempchangehour; 
			} ?></span> 
			<?php 
			   if(isset($tempchangehour)) { 
			     echo langtransstr($uomPerHour); 
               } // $tempchangehour ?>
to

Code: Select all

			<span class="ajax" id="gizmotemprate"><?php 
			if(isset($tempchangehour)) {
				echo $tempchangehour; 
			} ?></span><?php 
			   if(isset($tempchangehour)) { 
			     echo langtransstr($uomPerHour); 
               } // $tempchangehour ?>
User avatar
William Grimsley
Posts: 833
Joined: Thu 22 Sep 2011 5:22 pm
Weather Station: Davis Vantage Vue
Operating System: Windows 7 Home Premium 64-bit
Location: Latitude: 50.70189285 Longitude: -3.30849957
Contact:

Re: Removing space in ajax-gizmo.php

Post by William Grimsley »

Hi Ken,

Thanks for such a quick post! That did the trick.

So, you only had to move the "<?php" back a space? :bash:

Code: Select all

  <span class="ajax" id="gizmotemprate"><?php 
         if(isset($tempchangehour)) {
            echo $tempchangehour; 
         } ?></span> 
         <?php
            if(isset($tempchangehour)) { 
              echo langtransstr($uomPerHour); 
               } // $tempchangehour ?>
I can't thank you anymore! You are a star Ken! :D

Will
User avatar
saratogaWX
Posts: 1238
Joined: Wed 06 May 2009 5:02 am
Weather Station: Davis Vantage Pro Plus
Operating System: Windows 10 Professional
Location: Saratoga, CA, USA
Contact:

Re: Removing space in ajax-gizmo.php

Post by saratogaWX »

Yes, spaces are created by tabs/spaces/etc in the open HTML code.

PHP replaces everything between <?php and ?> with 'null' (unless the code inside the area does a print/echo).
User avatar
William Grimsley
Posts: 833
Joined: Thu 22 Sep 2011 5:22 pm
Weather Station: Davis Vantage Vue
Operating System: Windows 7 Home Premium 64-bit
Location: Latitude: 50.70189285 Longitude: -3.30849957
Contact:

Re: Removing space in ajax-gizmo.php

Post by William Grimsley »

Hi Ken,

Interesting knowledge! :D

Thanks again! :D

Will
Post Reply