<?xml version='1.0' encoding='UTF-8'?>
<rss version='2.0'>
	<channel>
		<title>cotonti.com : Доработка плагина погоды</title>
		<link>https://www.cotonti.com</link>
		<description>Last topic posts</description>
		<generator>Cotonti</generator>
		<language>en</language>
		<pubDate>Sat, 11 Apr 2026 14:34:48 -0000</pubDate>

		<item>
			<title>Clever</title>
			<description><![CDATA[Да, пустой...<br />
Изменилось содержание выводимое яваскриптом плагина... нужно доработать плагин что бы вырезать лишнюю информацию.]]></description>
			<pubDate>Thu, 13 Aug 2009 01:42:37 -0000</pubDate>
			<link><![CDATA[https://www.cotonti.com/forums?m=posts&q=3162&d=0#post15848]]></link>
		</item>
		<item>
			<title>Dayver</title>
			<description><![CDATA[файл кеша пустой? (plugins/pogoda/pogodacashe.txt) если нет чистил?]]></description>
			<pubDate>Wed, 12 Aug 2009 03:49:37 -0000</pubDate>
			<link><![CDATA[https://www.cotonti.com/forums?m=posts&q=3162&d=0#post15813]]></link>
		</item>
		<item>
			<title>Clever</title>
			<description><![CDATA[Гисметео включил информеры, а значит снова запахал плагин погоды. Однако он начал выводить лишнюю информаци (пример на сайте на главной). Как ее убрать? Если кому нужен то выложу целиком.<br />
<div style="margin:4px 0px 4px 0px"><input type="button" value="код плагина" onclick="if(this.parentNode.getElementsByTagName('div')[0].style.display != '') { this.parentNode.getElementsByTagName('div')[0].style.display = ''; } else { this.parentNode.getElementsByTagName('div')[0].style.display = 'none'; }" /><div style="display:none" class="spoiler">&lt;?php<br />
/* ====================<br />
Seditio - Website engine<br />
Copyright Neocrome<br />
<a href="http://www.neocrome.net" rel="nofollow">http://www.neocrome.net</a><br />
<br />
[BEGIN_SED]<br />
File=plugins/pogoda/pogoda.index.php<br />
Version=100<br />
Updated=2006-mar-30<br />
Type=Plugin<br />
Author=Amro<br />
Description=Pogoda<br />
[END_SED]<br />
<br />
[BEGIN_SED_EXTPLUGIN]<br />
Code=pogoda<br />
Part=main<br />
File=pogoda.index<br />
Hooks=index.tags<br />
Tags= index.tpl:{POGODA},{POGODA_TOWN}<br />
Order=10<br />
[END_SED_EXTPLUGIN]<br />
==================== */<br />
<br />
if (!defined('SED_CODE')) { die('Wrong URL.'); }<br />
<br />
$pogodacash = &quot;plugins/pogoda/pogodacashe.txt&quot;;<br />
$valutacash = &quot;plugins/pogoda/valutacashe.txt&quot;;<br />
<br />
$town = $cfg['plugin']['pogoda']['town'];<br />
$timeupdate = $cfg['plugin']['pogoda']['timeupdate'];<br />
$pogstring = $cfg['plugin']['pogoda']['pogstring'];<br />
<br />
$timeupdate = $timeupdate*3600;<br />
<br />
$towncode = substr($town,0,5); //код города в системе гисметео<br />
$townname = substr($town,5); //название города<br />
<br />
function file_get_contentz ($link) {<br />
  $url_parts = @parse_url( $link );<br />
  $documentpath = $url_parts[&quot;path&quot;];<br />
  $documentpath .= &quot;?&quot; . $url_parts[&quot;query&quot;];<br />
  $host = $url_parts[&quot;host&quot;];<br />
  $port = $url_parts[&quot;port&quot;];<br />
  $fp = @fsockopen( $host, 80, $errno, $errstr, 5 );<br />
  if(!$fp) return false;<br />
  fwrite ($fp, &quot;GET &quot;.$documentpath.&quot; HTTP/1.0\r\nHost: $host\r\n\r\n&quot;);<br />
  while(!feof($fp)) $fcon.=fgets($fp, 1024);<br />
  fclose($fp);<br />
  $fcon2=explode(&quot;\r\n\r\n&quot;,$fcon,2);<br />
  return $fcon2[1];<br />
}<br />
<br />
<br />
if (file_exists($pogodacash))<br />
{<br />
	$c = file_get_contents($pogodacash);<br />
	$arr=explode('#pr#',$c); <br />
	if (time()-$arr[0]&gt;$timeupdate) <br />
	 {<br />
      $adr=&quot;http://informer.gismeteo.ru/html/informer.php?codepg=UTF-8&amp;index=&quot;.$towncode.&quot;&amp;par=&quot;.$pogstring.&quot;&amp;lang=&amp;vieinf=sm&quot;;<br />
      $n = file_get_contentz($adr); <br />
     if ($n)<br />
        { <br />
           $n = str_replace('document.write(&quot;','',$n);<br />
	         $n = str_replace('&quot;);','',$n);<br />
	         $n = str_replace('\&quot;','&quot;',$n);<br />
	         $n = preg_replace('/ +/', ' ', $n);<br />
	         $n = str_replace('&lt;/td&gt;&lt;tr&gt;','&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;',$n);<br />
	         $n = preg_replace(&quot;'id=(.*?) 'si&quot;,&quot;&quot;,$n);<br />
	         $n = preg_replace(&quot;' class=(.*?)'si&quot;,&quot;&quot;,$n);$n = preg_replace('/&quot;&quot;/', '', $n);<br />
	         $n = str_replace('&lt;td width=&quot;20%&quot; align=&quot;center&quot;&gt;','&lt;/td&gt;&lt;td width=&quot;20%&quot; align=&quot;center&quot;&gt;',$n);<br />
           $n = str_replace('http://informer.gismeteo.ru/html/images/sm/','plugins/pogoda/img/',$n);<br />
           $n = preg_replace(&quot;'&lt;tr&gt;&lt;td colspan=\&quot;3\&quot; align=\&quot;center\&quot;&gt;(.*?)&lt;td heigth=\&quot;5\&quot; colspan=\&quot;3\&quot;&gt;&lt;/td&gt;&lt;/tr&gt;'si&quot;,&quot;&quot;,$n);<br />
           $n = preg_replace(&quot;'&lt;tr&gt;&lt;td colspan=\&quot;3\&quot; width=\&quot;100%\&quot;&gt;&lt;b&gt;(.*?)&lt;/b&gt;&lt;/td&gt;&lt;/tr&gt;'si&quot;,&quot;&quot;,$n);<br />
           <br />
           $fp=fopen($pogodacash,'w');<br />
           fwrite($fp,time().'#pr#'.$n);   <br />
           fclose($fp); <br />
           $arr[1]=$n;   <br />
        }<br />
    else {$arr[1] = &quot;Данные недоступны&quot;;}<br />
   }<br />
 $plugin_pogoda =  $arr[1];<br />
}            <br />
else<br />
{<br />
	$plugin_pogoda = 'Данные недоступны';             <br />
}<br />
<br />
$t-&gt; assign(array(<br />
<br />
		&quot;POGODA&quot; =&gt; $plugin_pogoda,<br />
		&quot;POGODA_TOWN&quot; =&gt; $townname<br />
));<br />
<br />
?&gt;<br />
</div></div>]]></description>
			<pubDate>Wed, 12 Aug 2009 03:04:47 -0000</pubDate>
			<link><![CDATA[https://www.cotonti.com/forums?m=posts&q=3162&d=0#post15807]]></link>
		</item>
	</channel>
</rss>