<?xml version='1.0' encoding='UTF-8'?>
<rss version='2.0'>
	<channel>
		<title>cotonti.com : PFS-модификации</title>
		<link>https://www.cotonti.com</link>
		<description>Останні повідомлення в темі</description>
		<generator>Cotonti</generator>
		<language>en</language>
		<pubDate>Tue, 07 Apr 2026 15:36:52 -0000</pubDate>

		<item>
			<title>Boss</title>
			<description><![CDATA[Для возможности полноценной модификации PFS на мой взгляд не хватает одного хука. Речь о файле pfs.inc.php. Если посмотреть его код в конце, то можно увидеть условие:<br />
<div class="highlight"><pre class="php">if ($standalone)
{
	if($c1 == 'newpage' &amp;&amp; $c2 == 'newpageurl' || $c1 == 'update' &amp;&amp; $c2 == 'rpageurl')
	{
		$addthumb = &quot;'&quot;.$cfg&#091;'th_dir_user'&#093;.&quot;' + gfile&quot;;
		$addpix = 'gfile';
		$addfile = &quot;'&quot;.$cfg&#091;'pfs_dir_user'&#093;.&quot;' + gfile&quot;;
	}
	else
	{
		$addthumb = &quot;'&#091;img=&quot;.$cfg&#091;'pfs_dir_user'&#093;.&quot;'+gfile+'&#093;&quot;.$cfg&#091;'th_dir_user'&#093;.&quot;'+gfile+'&#091;/img&#093;'&quot;;
		$addpix = &quot;'&#091;img&#093;'+gfile+'&#091;/img&#093;'&quot;;
		$addfile = &quot;'&#091;url=&quot;.$cfg&#091;'pfs_dir_user'&#093;.&quot;'+gfile+'&#093;'+gfile+'&#091;/url&#093;'&quot;;
	}
	$pfs_header1 = $cfg&#091;'doctype'&#093;.&quot;&lt;html&gt;&lt;head&gt;
&lt;title&gt;&quot;.$cfg&#091;'maintitle'&#093;.&quot;&lt;/title&gt;&quot;.sed_htmlmetas().sed_javascript().&quot;
&lt;script type=\&quot;text/javascript\&quot;&gt;
//&lt;!&#091;CDATA&#091;
function help(rcode,c1,c2) {
	window.open('plug.php?h='+rcode+'&amp;amp;c1='+c1+'&amp;amp;c2='+c2,'Help','toolbar=0,location=0,directories=0,menuBar=0,resizable=0,scrollbars=yes,width=480,height=512,left=512,top=16');
}
function addthumb(gfile,c1,c2) {
	insertText(opener.document, '$c1', '$c2', $addthumb);
	window.close();
}
function addpix(gfile,c1,c2) {
	insertText(opener.document, '$c1', '$c2', $addpix);
	window.close();
}
function addfile(gfile,c1,c2) {
	insertText(opener.document, '$c1', '$c2', $addfile);
	window.close();
}
function picture(url,sx,sy) {
	window.open('pfs.php?m=view&amp;amp;id='+url,'Picture','toolbar=0,location=0,directories=0,menuBar=0,resizable=1,scrollbars=yes,width='+sx+',height='+sy+',left=0,top=0');
}
//&#093;&#093;&gt;
&lt;/script&gt;
&quot;;

	$pfs_header2 = &quot;&lt;/head&gt;&lt;body&gt;&quot;;
	$pfs_footer = &quot;&lt;/body&gt;&lt;/html&gt;&quot;;

	sed_sendheaders();

	$mskin = sed_skinfile(array('pfs', 'standalone'));
	$t = new XTemplate($mskin);

	$t-&gt;assign(array(
		&quot;PFS_STANDALONE_HEADER1&quot; =&gt; $pfs_header1,
		&quot;PFS_STANDALONE_HEADER2&quot; =&gt; $pfs_header2,
		&quot;PFS_STANDALONE_FOOTER&quot; =&gt; $pfs_footer,
	));

	$t-&gt;parse(&quot;MAIN.STANDALONE_HEADER&quot;);
	$t-&gt;parse(&quot;MAIN.STANDALONE_FOOTER&quot;);

	$t-&gt; assign(array(
		&quot;PFS_TITLE&quot; =&gt; $title,
		&quot;PFS_BODY&quot; =&gt; $body
	));

	$t-&gt;parse(&quot;MAIN&quot;);
	$t-&gt;out(&quot;MAIN&quot;);
}
else
{
	require_once $cfg&#091;'system_dir'&#093; . '/header.php';

	$t = new XTemplate(sed_skinfile('pfs'));

	$t-&gt; assign(array(
		&quot;PFS_TITLE&quot; =&gt; $title,
		&quot;PFS_BODY&quot; =&gt; $body
	));

	/* === Hook === */
	$extp = sed_getextplugins('pfs.tags');
	if (is_array($extp))
	{ foreach($extp as $k =&gt; $pl) { include_once($cfg&#091;'plugins_dir'&#093;.'/'.$pl&#091;'pl_code'&#093;.'/'.$pl&#091;'pl_file'&#093;.'.php'); } }
	/* ===== */

	$t-&gt;parse(&quot;MAIN&quot;);
	$t-&gt;out(&quot;MAIN&quot;);

	require_once $cfg&#091;'system_dir'&#093; . '/footer.php';
}
</pre></div>
<br />
В зависимости от вызова осуществляется формирование интерфейса или в общем скине сайта, или в отдельном окне. Однако, как можно заметить, хук присутствует лишь для полноценного вывода в скине сайта. А как же оконный режим? Здесь тоже нужен свой хук!<br />
<br />
А вообще, чтобы облегчить жизнь, лучше сразу еще разнести в разные скины.<br />
Пусть в первом случае это будет:<br />
	$t = new XTemplate(&quot;skins/&quot;.$skin.&quot;/pfs.small.tpl&quot;);<br />
а во втором:<br />
	$t = new XTemplate(&quot;skins/&quot;.$skin.&quot;/pfs.tpl&quot;);]]></description>
			<pubDate>Пн, 22 Чер 2009 13:50:12 -0000</pubDate>
			<link><![CDATA[https://www.cotonti.com/ua/forums?m=posts&q=2881&d=0#post13375]]></link>
		</item>
	</channel>
</rss>