<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[FrontAccounting forum — New method for application class re-ordering the application tabs]]></title>
		<link>https://frontaccounting.com/punbb/viewtopic.php?id=7056</link>
		<atom:link href="https://frontaccounting.com/punbb/extern.php?action=feed&amp;tid=7056&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in New method for application class re-ordering the application tabs.]]></description>
		<lastBuildDate>Sat, 21 Oct 2017 10:36:15 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[New method for application class re-ordering the application tabs]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=29127#p29127</link>
			<description><![CDATA[<p>Whenever a new tabbed application is added to FrontAccounting, it appears in a tab just before the Setup tab as coded in the <strong>front_accounting</strong> class method <strong>init()</strong> and invoked at the end of the <strong>includes/session.inc</strong> file.</p><p>Any new extension developer would want to position their application&#039;s tab (if it is an application predominantly residing in a separate tab) at some specific place and not just before the Setup one.</p><p>To alleviate this situation without having to code inconsistently/redundantly in each extension, it would be better to have a method in the application class (in <strong>applications/application.php</strong>) on the following lines contemplated to be in my <strong>hello_world</strong> extension for now:</p><div class="codebox"><pre><code>// Change tab order
        $i = 4; // set this extension on the 4th tab
        $x = $app-&gt;applications;
        $y = array_pop($app-&gt;applications); // this application was added last just now
        $app-&gt;applications = Array();
        $app-&gt;applications = array_merge(array_slice($x, 0, $i-1), array(&#039;hello&#039; =&gt; $y), array_slice($x, $i-1));
        unset($x,$y,$i);</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (apmuthu)]]></author>
			<pubDate>Sat, 21 Oct 2017 10:36:15 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=29127#p29127</guid>
		</item>
	</channel>
</rss>
