Author Topic: Help removing rss diplay box from my homepage  (Read 940 times)

0 Members and 1 Guest are viewing this topic.

Offline Ian.

  • Forecaster
  • *****
  • Posts: 476
    • Chatteris Weather
Help removing rss diplay box from my homepage
« on: December 07, 2024, 06:48:22 AM »
On my homepage is a yellow box https://www.chatteris.biz/ which used to display a met office weather warning rss feed -https://www.metoffice.gov.uk/public/data/PWSCache/WarningsRSS/Region/ee, unfortunately,  the rss used scripts from DynamicDrive and Simplepie both of which are no longer around and the log indicates a fatal error.

My problem is that is I comment out the script on index.php, the saratoga template fails to load, I've tried lots of permutations but I'm stuck:

<!-- Begin of Weather Alert Feed Announcement script -->
<div class="advisoryBox">
<script type="text/javascript">
var showmet1=new rssdisplaybox("met1", "met1id", "someclass")
showmet1.set_items_shown (10) //show 10 entries from feed
showmet1.start() //Required: start script
</script>
<!-- End of Weather Alert Feed Announcement script -->

Any one show some Christmas cheer and help me out please



 [ You are not allowed to view attachments ]
CWOP - DW3371
PWS - ICAMBRID16
https://www.chatteris.biz

Offline hcorrin

  • Senior Contributor
  • ****
  • Posts: 197
    • Ballaugh Weather
Re: Help removing rss diplay box from my homepage
« Reply #1 on: December 07, 2024, 05:04:27 PM »
if you were using meteoalarm i would have said change settings.php around line 250 usemeteoalarm from true to false but as your index file has a lot of added code but do notice the original meteoalarm section has been removed not just commented out
all i can suggest is to put this

Code: [Select]
<?php 
if(isset(
$SITE[&#39;useMeteoalarm&#39;]) and $SITE[&#39;useMeteoalarm&#39;]
   and file_exists(&#39;get-meteoalarm-warning-inc.php&#39;)) {
    
include_once("get-meteoalarm-warning-inc.php"); // Use the EU Meteoalarm warning
if(file_exists($warn_summary)) {
readfile($warn_summary);
}
}
?>

in between the two meteoalarm lines and change settings to false

Offline Ian.

  • Forecaster
  • *****
  • Posts: 476
    • Chatteris Weather
Re: Help removing rss diplay box from my homepage
« Reply #2 on: December 08, 2024, 05:48:19 AM »
if you were using meteoalarm i would have said change settings.php around line 250 usemeteoalarm from true to false but as your index file has a lot of added code but do notice the original meteoalarm section has been removed not just commented out
all i can suggest is to put this

Code: [Select]
<?php 
if(isset(
$SITE[&#39;useMeteoalarm&#39;]) and $SITE[&#39;useMeteoalarm&#39;]
   and file_exists(&#39;get-meteoalarm-warning-inc.php&#39;)) {
    
include_once("get-meteoalarm-warning-inc.php"); // Use the EU Meteoalarm warning
if(file_exists($warn_summary)) {
readfile($warn_summary);
}
}
?>

in between the two meteoalarm lines and change settings to false


Hi, I deleted the meteoalarm from the index.php a while ago but left its placeholder (not sure why!), anyway, the yellow box I'm trying to get rid off is caused by something other than meteoalarm, I think its the rss display as if I change the rss folder name, the yellow box expands to display a 'not found' message.

I did however try the code you kindly posted, but my site wouldn't then open.
CWOP - DW3371
PWS - ICAMBRID16
https://www.chatteris.biz