<?xml version='1.0' encoding='UTF-8'?>
<rss version='2.0'>
	<channel>
		<title>cotonti.com : set metas from standalone plugin</title>
		<link>https://www.cotonti.com</link>
		<description>Last topic posts</description>
		<generator>Cotonti</generator>
		<language>en</language>
		<pubDate>Sun, 12 Apr 2026 18:38:45 -0000</pubDate>

		<item>
			<title>Trustmaster</title>
			<description><![CDATA[<blockquote><a href="https://www.cotonti.com/forums.php?m=posts&amp;p=9027#9027">#</a> <strong>Kilandor :</strong>
Here is a idea of how the new Advanced hooking will be improved.<br />
<ul>
<li>Hooks to be allow to be only included on specific areas.</li>
<li>Ex, a header hook only included on user.details, or a plugin header hook, only included on plug.php?e=myplugin</li>
<li>Timed Hooks, hook is only included on its page, when the time has passed, sorta like a cron.<li>
<li>Multi-Hooking, hooking a single php file into multiple area's.</li>
</ul>
<br />
And maybe more features.<br />
</blockquote>
It makes me think that we should really try callbacks instead of includes. Pre-include problem most probably has some smart logical solution. But what we need to solve in first place is the scope limitations, otherwise old plugins will become incompatible.<br />
<br />
<blockquote><a href="https://www.cotonti.com/forums.php?m=posts&amp;p=9027#9027">#</a> <strong>Kilandor :</strong>
So it comes down to, do we know any plugins, or possible reasons if we move the header. That could cause problems? <br />
<br />
My thoughts are, it may cause problems with whoisonline.<br />
It changes the logical flow of things (sorta).<br />
</blockquote>
No, whosonline is mostly done in common.php. The plugin is just used to display data from sed_online table.]]></description>
			<pubDate>Sat, 28 Feb 2009 14:15:08 -0000</pubDate>
			<link><![CDATA[https://www.cotonti.com/forums?m=posts&q=2214&d=0#post9029]]></link>
		</item>
		<item>
			<title>Kilandor</title>
			<description><![CDATA[Well I see what your doing dervan, its a interesting idea, it would save a header hook everywhere, but as i've said that will be change in the future. But it goes back to exactly what trust was saying, for some people it might cause double processing.<br />
<br />
Maybe we should hold off till then, none of this will be included untill 0.1.0 anyways.<br />
<br />
Here is a idea of how the new Advanced hooking will be improved.<br />
<ul>
<li>Hooks to be allow to be only included on specific areas.</li>
<li>Ex, a header hook only included on user.details, or a plugin header hook, only included on plug.php?e=myplugin</li>
<li>Timed Hooks, hook is only included on its page, when the time has passed, sorta like a cron.<li>
<li>Multi-Hooking, hooking a single php file into multiple area's.</li>
</ul>
<br />
And maybe more features.<br />
<br />
So it comes down to, do we know any plugins, or possible reasons if we move the header. That could cause problems? <br />
<br />
My thoughts are, it may cause problems with whoisonline.<br />
It changes the logical flow of things (sorta).<br />
<br />
My only other thought is that, anywhere else outside of standalone, the header.main hook would have to be used anyways. So it would just keep it the same for anything needed.]]></description>
			<pubDate>Sat, 28 Feb 2009 12:33:28 -0000</pubDate>
			<link><![CDATA[https://www.cotonti.com/forums?m=posts&q=2214&d=0#post9027]]></link>
		</item>
		<item>
			<title>dervan</title>
			<description><![CDATA[<blockquote><a href="https://www.cotonti.com/forums.php?m=posts&amp;p=8871#8871">#</a> <strong>Orkan :</strong>
no offence, fella<br />
</blockquote>
no dust, guy :)<br />
<br />
<br />
<blockquote><a href="https://www.cotonti.com/forums.php?m=posts&amp;p=8871#8871">#</a> <strong>Orkan :</strong>
Im only talking about possible programming solution, ...<br />
</blockquote>
bla bla bla, i see<br />
<br />
<br />
=======<br />
<br />
<br />
<blockquote><a href="https://www.cotonti.com/forums.php?m=posts&amp;p=8815#8815">#</a> <strong>Kilandor :</strong>
The only way that moving where header is included would be if a plugin used any data generated by header, which is possible. Then it would completely break it, I truthfully don't know any off hand like this, but it may break future things like a more updated Whoisonline tracking method.<br />
<br />
I can see the reason for moving it, but it doesn't solve all the problems. Also do remember this, we will be getting more advanced hooking methods, so that a hook is only loaded on certain pages/area's. By moving the header all it does is save that hook, and in some cases yes maybe extra processing.<br />
</blockquote>
<br />
well<br />
<br />
solution:<br />
add new hook - standapart<br />
<br />
will change metas from standapart plugin only<br />
standalone plugin will work as before<br />
<br />
<br />
modified code in <em>system/core/plug/plug.inc.php</em>:<br />
<div class="highlight"><pre class="php">
	if (is_array($sed_plugins))
	{
		foreach($sed_plugins as $i =&gt; $k)
		{
			if (($k&#091;'pl_hook'&#093;=='standapart' || $k&#091;'pl_hook'&#093;=='standalone') &amp;&amp; $k&#091;'pl_code'&#093;==$e)
			{ $out&#091;'subtitle'&#093; = $k&#091;'pl_title'&#093;; }
		}
	}

	$out&#091;'subtitle'&#093; = (empty($L&#091;'plu_title'&#093;)) ? $out&#091;'subtitle'&#093; : $L&#091;'plu_title'&#093;;
	$sys&#091;'sublocation'&#093; = $out&#091;'subtitle'&#093;;

	/* ============= */

	$extp0 = array();
	$extp1 = array();

	if (is_array($sed_plugins))
	{
		foreach($sed_plugins as $i =&gt; $k)
		{
			if ($k&#091;'pl_code'&#093;==$e)
			{
				if ($k&#091;'pl_hook'&#093;=='standapart')
				{ $extp0&#091;$i&#093; = $k; }
				if ($k&#091;'pl_hook'&#093;=='standalone')
				{ $extp1&#091;$i&#093; = $k; }
			}
		}
	}

	if (count($extp0)==0 &amp;&amp; count($extp1)==0)
	{
		header(&quot;Location: &quot; . SED_ABSOLUTE_URL . sed_url('message', &quot;msg=907&quot;, '', true));
		exit;
	}

	$t_plug = new XTemplate($path_skin);

	if (count($extp0)&gt;0)
	{
		$extp1 = array(); // disallow standalone hook
		$t = $t_plug;
		foreach($extp0 as $k =&gt; $pl) { include_once($cfg&#091;'plugins_dir'&#093;.'/'.$pl&#091;'pl_code'&#093;.'/'.$pl&#091;'pl_file'&#093;.'.php'); }
		unset($t);
	}

	require_once $cfg&#091;'system_dir'&#093; . '/header.php';

	unset($t);
	$t = $t_plug;

	if (count($extp1)&gt;0)
	{ foreach($extp1 as $k =&gt; $pl) { include_once($cfg&#091;'plugins_dir'&#093;.'/'.$pl&#091;'pl_code'&#093;.'/'.$pl&#091;'pl_file'&#093;.'.php'); } }

	if ($autoassigntags)
	{
		$plugin_title = (empty($plugin_title)) ? $L&#091;'plu_title'&#093; : $plugin_title;

		if($cfg&#091;'homebreadcrumb'&#093;)
		{
			$bhome = '&lt;a href=https://www.cotonti.com/&quot;'.$cfg&#091;'mainurl'&#093;.'&quot;&gt;'.sed_cc($cfg&#091;'maintitle'&#093;).'&lt;/a&gt; '.$cfg&#091;'separator'&#093;.' ';
		}
		else
		{
			$bhome = '';
		}

		$t-&gt; assign(array(
			&quot;PLUGIN_TITLE&quot; =&gt; $bhome . '&lt;a href=https://www.cotonti.com/&quot;'.sed_url('plug', &quot;e=$e&quot;).'&quot;&gt;'.$plugin_title.&quot;&lt;/a&gt;&quot;,
			&quot;PLUGIN_SUBTITLE&quot; =&gt; $plugin_subtitle,
			&quot;PLUGIN_BODY&quot; =&gt; $plugin_body
		));
	}

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

	require_once $cfg&#091;'system_dir'&#093; . '/footer.php';
</pre></div>
<br />
<br />
in <em>system/core/admin/admin.plug.inc.php</em>: replace this string<br />
<div class="highlight"><pre class="php">
		$sql3 = sed_sql_query(&quot;SELECT pl_code FROM $db_plugins WHERE pl_hook='standalone'&quot;);
</pre></div>
with<br />
<div class="highlight"><pre class="php">
		$sql3 = sed_sql_query(&quot;SELECT pl_code FROM $db_plugins WHERE pl_hook='standapart' OR pl_hook='standalone'&quot;);
</pre></div>
<br />
<br />
this code is tested and works]]></description>
			<pubDate>Thu, 26 Feb 2009 04:56:05 -0000</pubDate>
			<link><![CDATA[https://www.cotonti.com/forums?m=posts&q=2214&d=0#post8889]]></link>
		</item>
		<item>
			<title>Trustmaster</title>
			<description><![CDATA[There are several practical solutions known but the drawbacks of choosing callbacks over hooks are already know quite well too:<br />
[list=1]<br />
<li>Callbacks are functions. It means that they cannot use variables from global scope implicitly. Which in turn means that plugins need to be changed to use GLOBALS or import the variables they use. Or some other trick if you know it.</li>
<li>Callbacks must have been processed by PHP before they are called. It means that mass-loading needs to be performed before the actual request handling is started. It needs to be quite smart not to include files that the current request processing does not require.</li>
</ul>]]></description>
			<pubDate>Thu, 26 Feb 2009 02:04:26 -0000</pubDate>
			<link><![CDATA[https://www.cotonti.com/forums?m=posts&q=2214&d=0#post8875]]></link>
		</item>
		<item>
			<title>Orkan</title>
			<description><![CDATA[Awesome!<br />
I always wonder how to replace the standard plugin-&gt;hook system, and this sounds like a million-dollar idea!<br />
If you have more concrete suggestion then go ahead and start a new topic. Im interested!]]></description>
			<pubDate>Thu, 26 Feb 2009 01:53:40 -0000</pubDate>
			<link><![CDATA[https://www.cotonti.com/forums?m=posts&q=2214&d=0#post8874]]></link>
		</item>
		<item>
			<title>Trustmaster</title>
			<description><![CDATA[The callback concept is somewhat interesting on its own, further considering the concept of user-defined functions (like sed_parser_custom(), sed_pagination_custom(), etc.). Investigating it even further, you may come up to registering custom handlers, using callbacks instead of hooks and switching to event-driven model. How do you like it?]]></description>
			<pubDate>Thu, 26 Feb 2009 01:13:47 -0000</pubDate>
			<link><![CDATA[https://www.cotonti.com/forums?m=posts&q=2214&d=0#post8872]]></link>
		</item>
		<item>
			<title>Orkan</title>
			<description><![CDATA[<strong>dervan:</strong><br />
no offence, fella<br />
Im only talking about possible programming solution, all the cons and pros <span style="text-decoration:underline">and nothing more</span>.<br />
All ideas are welcome!]]></description>
			<pubDate>Thu, 26 Feb 2009 01:12:20 -0000</pubDate>
			<link><![CDATA[https://www.cotonti.com/forums?m=posts&q=2214&d=0#post8871]]></link>
		</item>
		<item>
			<title>dervan</title>
			<description><![CDATA[<blockquote><a href="https://www.cotonti.com/forums.php?m=posts&amp;p=8864#8864">#</a> <strong>Orkan :</strong>
Well, for me programming is like a piece of art, but with <strong>dervan's</strong> solution you're painting someone's portrait a'la Picasso  <img class="aux smiley" src="https://www.cotonti.com/./images/smilies/wink.gif" alt=";-)" /><br />
</blockquote>
well at least not Matejko :)<br />
<br />
will be other proposals?<br />
need to solve this problem, but not heard of other solutions]]></description>
			<pubDate>Thu, 26 Feb 2009 00:41:14 -0000</pubDate>
			<link><![CDATA[https://www.cotonti.com/forums?m=posts&q=2214&d=0#post8869]]></link>
		</item>
		<item>
			<title>Orkan</title>
			<description><![CDATA[Maybe its not the best approach, however much better than disturbing the normal code flow, IMO.<br />
Also, the performance wont hurt that much, since preg_replace() will skip after first match.<br />
<br />
Well, for me programming is like a piece of art, but with <strong>dervan's</strong> solution you're painting someone's portrait a'la Picasso  <img class="aux smiley" src="https://www.cotonti.com/./images/smilies/wink.gif" alt=";-)" />]]></description>
			<pubDate>Thu, 26 Feb 2009 00:00:26 -0000</pubDate>
			<link><![CDATA[https://www.cotonti.com/forums?m=posts&q=2214&d=0#post8864]]></link>
		</item>
		<item>
			<title>Trustmaster</title>
			<description><![CDATA[<blockquote><a href="https://www.cotonti.com/forums.php?m=posts&amp;p=8772#8772">#</a> <strong>Orkan :</strong>
<div class="highlight"><pre class="php">$output = preg_replace(
'/&lt;meta(.+)name=&quot;keywords&quot;(&#091;^&gt;&#093;+)&gt;/i', 
'&lt;meta name=&quot;keywords&quot; content=&quot;'.$my_plugin&#091;'meta_keywords'&#093;.'&quot; /&gt;', 
$output, 1);</pre></div>
</blockquote>
This. It's not really a good design to have post-factum overwriting callbacks with regular expressions. It should be avoided if there is a way of assigning data straight into its place.]]></description>
			<pubDate>Wed, 25 Feb 2009 22:39:09 -0000</pubDate>
			<link><![CDATA[https://www.cotonti.com/forums?m=posts&q=2214&d=0#post8853]]></link>
		</item>
		<item>
			<title>Orkan</title>
			<description><![CDATA[what do you mean by &quot;it is fulltext parsing&quot; ?<br />
<br />
each callback will process only a part of &quot;fulltext&quot;, ie. callback_header($header) will only process parsed header.tpl output]]></description>
			<pubDate>Wed, 25 Feb 2009 22:23:11 -0000</pubDate>
			<link><![CDATA[https://www.cotonti.com/forums?m=posts&q=2214&d=0#post8850]]></link>
		</item>
		<item>
			<title>Trustmaster</title>
			<description><![CDATA[What I don't like about parsing the output buffer is that it is fulltext parsing. Well, Seditio's advanced rewrite acted this way, and it added about 10% to render time. I know this one won't go so complex. But it doesn't look like strong design.]]></description>
			<pubDate>Wed, 25 Feb 2009 21:25:11 -0000</pubDate>
			<link><![CDATA[https://www.cotonti.com/forums?m=posts&q=2214&d=0#post8848]]></link>
		</item>
		<item>
			<title>Orkan</title>
			<description><![CDATA[<blockquote><a href="https://www.cotonti.com/forums.php?m=posts&amp;p=8824#8824">#</a> <strong>dervan :</strong>
<br />
no no no, not like goto :)<br />
it's any little trick with $t object that used by header.php and plug.inc.php both<br />
</blockquote>
<br />
sorry, I didnt make myself clear enough. I mentioned GOTO as an example only. I understood your solution. however, you must admit that it only makes the code more difficult to read, right?<br />
<br />
<blockquote><a href="https://www.cotonti.com/forums.php?m=posts&amp;p=8824#8824">#</a> <strong>dervan :</strong>
i'm awaiting for your solution of problem on this carcass<br />
</blockquote>
<br />
this method is rather simple..<br />
Basically each &quot;main module&quot;, for example <strong>system/core/plug/plug.inc.php</strong>, should start with <strong>ob_start('name_of_callback_function')</strong> including <strong>header.ph</strong>p and <strong>footer.php</strong> as well.<br />
<br />
just a note:<br />
<br />
<strong>common.php</strong><br />
<div class="highlight"><pre class="php">if ($cfg&#091;'gzip'&#093;)
	{ @ob_start('ob_gzhandler'); }
else
	{ ob_start(); }

ob_start('sed_outputfilters');</pre></div>
<br />
I would replace <strong>ob_start('sed_outputfilters')</strong> with just <strong>ob_start()</strong> to catch some warning messages, etc.. they will be discarded anyway at the end of common.php by simple <strong>@ob_end_clean();</strong> - or even completely remove this buffer?<br />
<br />
I can implement it, just want to hear from Kilandor, Trustmaster what they think?]]></description>
			<pubDate>Wed, 25 Feb 2009 20:18:59 -0000</pubDate>
			<link><![CDATA[https://www.cotonti.com/forums?m=posts&q=2214&d=0#post8838]]></link>
		</item>
		<item>
			<title>dervan</title>
			<description><![CDATA[<blockquote><a href="https://www.cotonti.com/forums.php?m=posts&amp;p=8819#8819">#</a> <strong>Orkan :</strong>
It should be avoided, like GOTO command in C++, it only makes the code more difficult to read.<br />
</blockquote>
no no no, not like goto :)<br />
it's any little trick with $t object that used by header.php and plug.inc.php both<br />
<br />
<br />
<blockquote><a href="https://www.cotonti.com/forums.php?m=posts&amp;p=8819#8819">#</a> <strong>Orkan :</strong>
I really like the output buffering feature implemented in PHP - it seems to be perfect solution here IMO. <br />
</blockquote>
ol korekt :)<br />
i'm awaiting for your solution of problem on this carcass]]></description>
			<pubDate>Wed, 25 Feb 2009 18:35:50 -0000</pubDate>
			<link><![CDATA[https://www.cotonti.com/forums?m=posts&q=2214&d=0#post8824]]></link>
		</item>
		<item>
			<title>Orkan</title>
			<description><![CDATA[<blockquote><a href="https://www.cotonti.com/forums.php?m=posts&amp;p=8784#8784">#</a> <strong>dervan :</strong>
<strong>Orkan</strong>, what is wrong in the use of pointers?<br />
</blockquote>
<br />
Well, all Im saying - it is not a procedural approach.<br />
It should be avoided, like GOTO command in C++, it only makes the code more difficult to read.<br />
<br />
From the other hand, what if I wanna use footer hook to set metas? see, its not perfect anyway...<br />
<br />
I really like the output buffering feature implemented in PHP - it seems to be perfect solution here IMO. <br />
You can have nesting buffers for all three parts: header, body and footer.. and hook them separately.<br />
<br />
<div class="highlight"><pre class="php">&lt;?PHP
$counter = 0;

function callback_header($header)
{	
	global $counter;
	return (++$counter).' - callback_header(), content: '.$header.'&lt;br&gt;';
}
function callback_body($body)
{	
	global $counter;
	return (++$counter).' - callback_body(), content: '.$body.'&lt;br&gt;';
}
function callback_footer($footer)
{	
	global $counter;
	return (++$counter).' - callback_footer(), content: '.$footer.'&lt;br&gt;';
}


ob_start('callback_header');
echo 'echo_1_header&lt;br&gt;';

ob_start('callback_body');
echo 'echo_2_body&lt;br&gt;';

ob_start('callback_footer');
echo 'echo_3_footer&lt;br&gt;';

while(@ob_end_flush());


?&gt;</pre></div>
<br />
<br />
and this will output:<br />
<pre class="code">3 - callback_header(), content: echo_1_header
2 - callback_body(), content: echo_2_body
1 - callback_footer(), content: echo_3_footer</pre>
<br />
see? the <strong>callback_header()</strong> is processed by <strong>ob_end_flush()</strong> last, but it is sent to the browser as first  <img class="aux smiley" src="https://www.cotonti.com/./images/smilies/smile.gif" alt=":-)" /> <br />
<br />
<br />
Also, to get rid of additional hook include()'s - which is a waste, one can define (in the core) three global arrays for preg_replace() to use in these callbacks accordingly.]]></description>
			<pubDate>Wed, 25 Feb 2009 15:58:13 -0000</pubDate>
			<link><![CDATA[https://www.cotonti.com/forums?m=posts&q=2214&d=0#post8819]]></link>
		</item>
		<item>
			<title>Kilandor</title>
			<description><![CDATA[Actually using output hook in that method would be alot worse and more difficult orkan. Since all the keywords and such can be hooked into by header.main anyways.<br />
<br />
The only way that moving where header is included would be if a plugin used any data generated by header, which is possible. Then it would completely break it, I truthfully don't know any off hand like this, but it may break future things like a more updated Whoisonline tracking method.<br />
<br />
I can see the reason for moving it, but it doesn't solve all the problems. Also do remember this, we will be getting more advanced hooking methods, so that a hook is only loaded on certain pages/area's. By moving the header all it does is save that hook, and in some cases yes maybe extra processing.<br />
<br />
The handling of $t won't be hard, i've already thought of how it can be done, because yes you have to store the $t from the plugin, and hold it till header parsed, then let main use the $t from the plugin.]]></description>
			<pubDate>Wed, 25 Feb 2009 11:09:11 -0000</pubDate>
			<link><![CDATA[https://www.cotonti.com/forums?m=posts&q=2214&d=0#post8815]]></link>
		</item>
		<item>
			<title>dervan</title>
			<description><![CDATA[<strong>Trustmaster</strong>, thanks]]></description>
			<pubDate>Wed, 25 Feb 2009 05:19:09 -0000</pubDate>
			<link><![CDATA[https://www.cotonti.com/forums?m=posts&q=2214&d=0#post8794]]></link>
		</item>
		<item>
			<title>Trustmaster</title>
			<description><![CDATA[It is deprecated in PHP5, because in PHP5 objects are passed by reference by default.]]></description>
			<pubDate>Wed, 25 Feb 2009 04:44:04 -0000</pubDate>
			<link><![CDATA[https://www.cotonti.com/forums?m=posts&q=2214&d=0#post8790]]></link>
		</item>
		<item>
			<title>dervan</title>
			<description><![CDATA[<strong>Orkan</strong>, what is wrong in the use of pointers?]]></description>
			<pubDate>Wed, 25 Feb 2009 04:29:50 -0000</pubDate>
			<link><![CDATA[https://www.cotonti.com/forums?m=posts&q=2214&d=0#post8784]]></link>
		</item>
		<item>
			<title>Orkan</title>
			<description><![CDATA[anyway, it doesn't look too professional, isnt?<br />
<br />
<div class="highlight"><pre class="php">$t_plug = new XTemplate($path_skin);
$t =&amp; $t_plug;</pre></div>
<br />
 <img class="aux smiley" src="https://www.cotonti.com/./images/smilies/tongue.gif" alt=":-P" />]]></description>
			<pubDate>Wed, 25 Feb 2009 03:42:44 -0000</pubDate>
			<link><![CDATA[https://www.cotonti.com/forums?m=posts&q=2214&d=0#post8777]]></link>
		</item>
		<item>
			<title>Trustmaster</title>
			<description><![CDATA[What we need to find out is what exactly those specialized plugins are.]]></description>
			<pubDate>Wed, 25 Feb 2009 03:20:38 -0000</pubDate>
			<link><![CDATA[https://www.cotonti.com/forums?m=posts&q=2214&d=0#post8774]]></link>
		</item>
		<item>
			<title>Orkan</title>
			<description><![CDATA[I dunno why, but something tells me it isn't a good idea..<br />
<br />
Some more specialized plugins may not work after this change.<br />
And this will require at least 2 hooks, so why dont use hook:<strong>output</strong> for that?<br />
<br />
<div class="highlight"><pre class="php">$output = preg_replace(
'/&lt;meta(.+)name=&quot;keywords&quot;(&#091;^&gt;&#093;+)&gt;/i', 
'&lt;meta name=&quot;keywords&quot; content=&quot;'.$my_plugin&#091;'meta_keywords'&#093;.'&quot; /&gt;', 
$output, 1);</pre></div>]]></description>
			<pubDate>Wed, 25 Feb 2009 03:16:29 -0000</pubDate>
			<link><![CDATA[https://www.cotonti.com/forums?m=posts&q=2214&d=0#post8772]]></link>
		</item>
		<item>
			<title>Trustmaster</title>
			<description><![CDATA[Disagreed with Kilandor. Mostly standalone plugs would like to put the results of some processing into keywords/title. If you do that with a special header plugin part, that means that you have to do the processing twice, which is a waste. So if dervan's suggestion does not have any negative consequences, I would prefer it.]]></description>
			<pubDate>Tue, 24 Feb 2009 20:32:31 -0000</pubDate>
			<link><![CDATA[https://www.cotonti.com/forums?m=posts&q=2214&d=0#post8748]]></link>
		</item>
		<item>
			<title>Kilandor</title>
			<description><![CDATA[There is no need for this, actually you can modify things in the &lt;head&gt; section. Because we no longer use sed_htmlmetas() except for in pfs and thats only till its re-written.<br />
<br />
$out['head_head'] may be used to input any needed data into &lt;head&gt;&lt;/head&gt; it outputs to {HEADER_HEAD} and is a default tag.<br />
<br />
Actually all of the below can easily be modified. by hooking into header.main<br />
<br />
<div class="highlight"><pre class="php">$t-&gt;assign(array (
	&quot;HEADER_TITLE&quot; =&gt; $plug_title.$out&#091;'fulltitle'&#093;,
	&quot;HEADER_DOCTYPE&quot; =&gt; $cfg&#091;'doctype'&#093;,
	&quot;HEADER_CSS&quot; =&gt; $cfg&#091;'css'&#093;,
	&quot;HEADER_COMPOPUP&quot; =&gt; $out&#091;'compopup'&#093;,
	&quot;HEADER_LOGSTATUS&quot; =&gt; $out&#091;'logstatus'&#093;,
	&quot;HEADER_WHOSONLINE&quot; =&gt; $out&#091;'whosonline'&#093;,
	&quot;HEADER_TOPLINE&quot; =&gt; $cfg&#091;'topline'&#093;,
	&quot;HEADER_BANNER&quot; =&gt; $cfg&#091;'banner'&#093;,
	&quot;HEADER_GMTTIME&quot; =&gt; $usr&#091;'gmttime'&#093;,
	&quot;HEADER_USERLIST&quot; =&gt; $out&#091;'userlist'&#093;,
	&quot;HEADER_NOTICES&quot; =&gt; $out&#091;'notices'&#093;,
	&quot;HEADER_BASEHREF&quot; =&gt; $out&#091;'basehref'&#093;,
	&quot;HEADER_META_CONTENTTYPE&quot; =&gt; $out&#091;'meta_contenttype'&#093;,
	&quot;HEADER_META_CHARSET&quot; =&gt; $out&#091;'meta_charset'&#093;,
	&quot;HEADER_META_DESCRIPTION&quot; =&gt; $out&#091;'meta_desc'&#093;,
	&quot;HEADER_META_KEYWORDS&quot; =&gt; $out&#091;'meta_keywords'&#093;,
	&quot;HEADER_META_LASTMODIFIED&quot; =&gt; $out&#091;'meta_lastmod'&#093;,
	&quot;HEADER_HEAD&quot; =&gt; $out&#091;'head_head'&#093;,
));</pre></div>]]></description>
			<pubDate>Tue, 24 Feb 2009 20:26:41 -0000</pubDate>
			<link><![CDATA[https://www.cotonti.com/forums?m=posts&q=2214&d=0#post8747]]></link>
		</item>
		<item>
			<title>dervan</title>
			<description><![CDATA[known problem:<br />
impossible to set metas from standalone plugin<br />
<br />
the cause of problem:<br />
header is included and parsed before launching of standalone plugin<br />
<br />
possible solution:<br />
header may be included (with pointers technique) after launching of standalone plugin<br />
<br />
this solution works without problems in Seditio 121<br />
<a href="http://neocrome.ru/forums.php?m=posts&amp;p=21256#21256" rel="nofollow">link</a> (in russian)<br />
<br />
<br />
code from current <a href="http://trac.cotonti.com/browser/trunk/system/core/plug/plug.inc.php">system/core/plug/plug.inc.php in trac</a>:<br />
<div class="highlight"><pre class="php">
	/* ============= */

	require_once $cfg&#091;'system_dir'&#093; . '/header.php';

	$t = new XTemplate($path_skin);

	$extp = array();

	if (is_array($sed_plugins))
	{
		foreach($sed_plugins as $i =&gt; $k)
		{
			if ($k&#091;'pl_hook'&#093;=='standalone' &amp;&amp; $k&#091;'pl_code'&#093;==$e)
			{ $extp&#091;$i&#093; = $k; }
		}
	}

	if (count($extp)==0)
	{
		header(&quot;Location: &quot; . SED_ABSOLUTE_URL . sed_url('message', &quot;msg=907&quot;, '', true));
		exit;
	}

	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'); } }

	if ($autoassigntags)
	{
		$plugin_title = (empty($plugin_title)) ? $L&#091;'plu_title'&#093; : $plugin_title;

		if($cfg&#091;'homebreadcrumb'&#093;)
		{
			$bhome = '&lt;a href=https://www.cotonti.com/&quot;'.$cfg&#091;'mainurl'&#093;.'&quot;&gt;'.sed_cc($cfg&#091;'maintitle'&#093;).'&lt;/a&gt; '.$cfg&#091;'separator'&#093;.' ';
		}
		else
		{
			$bhome = '';
		}

		$t-&gt; assign(array(
			&quot;PLUGIN_TITLE&quot; =&gt; $bhome . '&lt;a href=https://www.cotonti.com/&quot;'.sed_url('plug', &quot;e=$e&quot;).'&quot;&gt;'.$plugin_title.&quot;&lt;/a&gt;&quot;,
			&quot;PLUGIN_SUBTITLE&quot; =&gt; $plugin_subtitle,
			&quot;PLUGIN_BODY&quot; =&gt; $plugin_body
		));
	}

	$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 />
modified code with this solution:<br />
<div class="highlight"><pre class="php">
	/* ============= */

	$t_plug = new XTemplate($path_skin);
	$t =&amp; $t_plug;

	$extp = array();

	if (is_array($sed_plugins))
	{
		foreach($sed_plugins as $i =&gt; $k)
		{
			if ($k&#091;'pl_hook'&#093;=='standalone' &amp;&amp; $k&#091;'pl_code'&#093;==$e)
			{ $extp&#091;$i&#093; = $k; }
		}
	}

	if (count($extp)==0)
	{
		header(&quot;Location: &quot; . SED_ABSOLUTE_URL . sed_url('message', &quot;msg=907&quot;, '', true));
		exit;
	}

	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'); } }

	unset($t);
	require_once $cfg&#091;'system_dir'&#093; . '/header.php';
	unset($t);
	$t =&amp; $t_plug;

	if ($autoassigntags)
	{
		$plugin_title = (empty($plugin_title)) ? $L&#091;'plu_title'&#093; : $plugin_title;

		if($cfg&#091;'homebreadcrumb'&#093;)
		{
			$bhome = '&lt;a href=https://www.cotonti.com/&quot;'.$cfg&#091;'mainurl'&#093;.'&quot;&gt;'.sed_cc($cfg&#091;'maintitle'&#093;).'&lt;/a&gt; '.$cfg&#091;'separator'&#093;.' ';
		}
		else
		{
			$bhome = '';
		}

		$t-&gt; assign(array(
			&quot;PLUGIN_TITLE&quot; =&gt; $bhome . '&lt;a href=https://www.cotonti.com/&quot;'.sed_url('plug', &quot;e=$e&quot;).'&quot;&gt;'.$plugin_title.&quot;&lt;/a&gt;&quot;,
			&quot;PLUGIN_SUBTITLE&quot; =&gt; $plugin_subtitle,
			&quot;PLUGIN_BODY&quot; =&gt; $plugin_body
		));
	}

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

	require_once $cfg&#091;'system_dir'&#093; . '/footer.php';
</pre></div>]]></description>
			<pubDate>Tue, 24 Feb 2009 20:18:08 -0000</pubDate>
			<link><![CDATA[https://www.cotonti.com/forums?m=posts&q=2214&d=0#post8745]]></link>
		</item>
	</channel>
</rss>