Cellphone / Mobile / iPhone Weather Script

Ww! I just came upon this script and would love to use this. I tried using code that was available in the early part of the thread but I get numerious “langtransstr” function errors… states is undefined. Is the “all inclusive” package close to being complete? This wil be a priority installed as soon as it is ready.

Love this template Meerkat.
I do have the same wrong lay-out, but I’ll wait for the easier install version that uses the clientraw files.

Bump…
For an update/progress?

For the chaps/chapesses who are having a problem getting this to look right! yes I had this problem also, page spread all over the screen

Have you been on page two of this thread and downloaded cell.html and cell_top.php?? its the only way I got this page too work,still took some tweaking to work with Linux but it works :slight_smile:

look here : http://www.sunburyweather.co.uk/cell.html

Regards

Steve

Hi Steve
I have uploaded the two files (cell_html and cell_top.php) still have something wrong though can you shed any light?
http://www.weybourneweather.co.uk/cell.html
http://www.weybourneweather.co.uk/cell_ajax-dashboard.php

Phil

I can’t even get past this: Fatal error: Call to undefined function langtransstr() in /home/harpersf/public_html/cell_ajax-dashboard.php on line 249

I’ve tried all kinds of things with no luck.

John

I can't even get past this: Fatal error: Call to undefined function langtransstr() in /home/harpersf/public_html/cell_ajax-dashboard.php on line 249

Try putting this at the end of your cell-ajax-dashboard script.

function langtransstr($word) {
   return $word;
}

function langtrans($word) {
   echo $word;
}

Jack

Thanks but no luck.

tstorm

Yes that fix did not work for me either so go to line 241 in cell-ajax-dashboard and enter this instead

//$monthname = langtransstr($monthname);
//$dayname = langtransstr(substr($dayname,0,3));
if (!function_exists("langtransstr")) {
   function langtransstr($word) {
      return $word;
   }
}
if (!function_exists("langtrans")) {
   function langtrans($word) {
      echo $word;
   }
}

This just takes out the two line containing monthname and dayname with a couple of // and inserts the code instead

Magical46

What you are seeing is the last couple of lines of the cell.html script …maybe copy the script again from page two and try again

Steve

Steve
tried copying the html file again, same result, also tried another copy of it and uploaded it without changeing anything i.e it still has the Brinberg weather titles and links etc again same result, I called that version cel.html (only one “l” in cel) the cell-demo.php at least looks better laid out but shows no info.
If you look at the cell.html page and view source it all appears to be ok. I don’t know anything about coding, and I’m struggleing with this.
Phil

Hi

Can you email me a copy for me to look at?

Did you just use notepad when you created the script page or did you use something else.?

Steve

Steve
Here is a txt copy of the html file. I only used notepad to create the html file
Phil


cell.txt (4.35 KB)

Hi

Works fine for me …its got my data but there is nothing wrong with this part of the script

http://www.sunburyweather.co.uk/cell2.html?skip=1

What about the top script?

Steve

Here is the cell_top.php


cell_top.txt (1.72 KB)

ok its the keymatch giving your server a problem so remove the following lines from the cell.html script

at the top of the page

$isBot = keyMatch(‘Googlebot,msnbot,Yahoo! Slurp,Mediapartners-Google,AnanziSpider,ia_archiver,FreshCrawler’,$_SERVER[‘HTTP_USER_AGENT’],true);

$isSearch = keyMatch(‘google,bing,yahoo,ananzi’,$_SERVER[‘HTTP_REFERER’],true);

$isMobile = keyMatch(‘MIDP,iPhone,Google Wireless Transcoder,Windows CE’,$_SERVER[‘HTTP_USER_AGENT’],true);

at the bottom of the page

<?php ############################################################################ # End of HTML Page ############################################################################ function keyMatch($needles,$haystack,$first=false) { // if "first" then break after 1st find if ($needles == '') return 100; $stac = ' '.$haystack; $nArray=explode(",",$needles); $found=0; $best=count($nArray); for($i=0;$i-1) { $found++; if ($first) break; } } // echo('find #'.$found.'/'.$best.' '); $pct=($found*100)/$best; return round($pct); } ?>

I have the same issue as Phil and I made the changes you recommended but still have the same problem of no data. Attached is the fixed code.

http://www.harpersferry-weather.com/cell.html?skip=1


cell.html.txt (3.48 KB)

Hello again
Done as you said but still not working right.
http://www.weybourneweather.co.uk/cell.html
Phil

running out of ideas as a grasp at straw try changing cell.html to cell.php

Steve

works for tstorm :slight_smile:

this is a server setting your server does not parse html as php files

you can set this up in apache in the .htaccess file by using the following line AddType application/x-httpd-php .html

in a windies iis server i dunno :frowning:

Steve