<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[FrontAccounting forum — tab dissapears when enter a link]]></title>
	<link rel="self" href="https://frontaccounting.com/punbb/extern.php?action=feed&amp;tid=1889&amp;type=atom" />
	<updated>2011-02-11T16:47:46Z</updated>
	<generator>PunBB</generator>
	<id>https://frontaccounting.com/punbb/viewtopic.php?id=1889</id>
		<entry>
			<title type="html"><![CDATA[Re: tab dissapears when enter a link]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=8314#p8314" />
			<content type="html"><![CDATA[<p>Oh, that must be !!! I&#039;m using a customized theme, maybe my render file is not working properly according to the new version, I&#039;ll trace this issue in this way. Thanks a lo Janusz!</p>]]></content>
			<author>
				<name><![CDATA[eclipxe]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=1024</uri>
			</author>
			<updated>2011-02-11T16:47:46Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=8314#p8314</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: tab dissapears when enter a link]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=8313#p8313" />
			<content type="html"><![CDATA[<p>I&#039;m not sure where the problem arise on your installation, but extension tabs mechanism works properly without patch suggested. When you look into renderer.php code found in any theme folder you will see that tabs are retrieved from $_SESSION[&#039;App&#039;] object&nbsp; created during main index.php request.</p><p>Janusz</p>]]></content>
			<author>
				<name><![CDATA[itronics]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=89</uri>
			</author>
			<updated>2011-02-11T15:30:57Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=8313#p8313</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: tab dissapears when enter a link]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=8295#p8295" />
			<content type="html"><![CDATA[<p>I already did it. And I had found this behavior.<br />I had put error_log() calls in my hooks.php file and this is how I notice that the init funtion was not called when you enter a link inside a tab (it does when you click on a tab).</p><p>Do you have this behavior also or this does not happend to you ?<br />Are you using 2.3.1 ?</p>]]></content>
			<author>
				<name><![CDATA[eclipxe]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=1024</uri>
			</author>
			<updated>2011-02-09T09:00:25Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=8295#p8295</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: tab dissapears when enter a link]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=8294#p8294" />
			<content type="html"><![CDATA[<p>I have been working with new extension/add-on on FA for few weeks now. Takes me a while since I&#039;m not that good with PHP. I&#039;m still learning.</p><p>I can see that you have added new lines into sessions.php which is not something that should be done in the first place. For me, I&#039;m trying not to touch/modified anything in core script especially session.php file.</p><p>1. Create new directory in modules directory. Give it a name of course.<br />2. Create hooks.php file in that new directory. This file will be the bridge that connect your extension with FA core script. So, it&#039;s an important file that must be created.<br />3. In this file :<br />&nbsp; &nbsp; If you want to add new tab --&gt; add install_tabs function into this file.<br />&nbsp; &nbsp; If you want to add new access level --&gt; add install_access function into this file.<br />&nbsp; &nbsp; ... and so on.</p><p>Go and take a look on hooks.inc file for more information.</p>]]></content>
			<author>
				<name><![CDATA[evilive]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=3549</uri>
			</author>
			<updated>2011-02-09T08:50:51Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=8294#p8294</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: tab dissapears when enter a link]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=8292#p8292" />
			<content type="html"><![CDATA[<p>Oh, please dismiss the spanish translation, this is not a problem about languages or locales.</p>]]></content>
			<author>
				<name><![CDATA[eclipxe]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=1024</uri>
			</author>
			<updated>2011-02-09T04:36:25Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=8292#p8292</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[tab dissapears when enter a link]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=8289#p8289" />
			<content type="html"><![CDATA[<p>Hi there! I&#039;m working with FA 2.3.1 and I have found a strange behavior with extensions.</p><p>When I enter to one tab or login my created tab is visible without a problem.<br />If I enter to a link (Setup/Company Setup) then the tab dissapears (there is no text) and links to nothing, like this:</p><div class="codebox"><pre><code>&lt;li &gt;&lt;a href=&#039;./index.php?application=orders&#039;&gt;&lt;b&gt;Ventas&lt;/b&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li &gt;&lt;a href=&#039;./index.php?application=AP&#039;&gt;&lt;b&gt;Compras&lt;/b&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li &gt;&lt;a href=&#039;./index.php?application=stock&#039;&gt;&lt;b&gt;Productos e Inventarios&lt;/b&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li &gt;&lt;a href=&#039;./index.php?application=manuf&#039;&gt;&lt;b&gt;Manufactura&lt;/b&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li &gt;&lt;a href=&#039;./index.php?application=GL&#039;&gt;&lt;b&gt;Contabilidad y Bancos&lt;/b&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li &gt;&lt;a href=&#039;./index.php?application=&#039;&gt;&lt;b&gt;&lt;/b&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li class=&#039;active&#039;&gt;&lt;a href=&#039;./index.php?application=system&#039;&gt;&lt;b&gt;Configuración&lt;/b&gt;&lt;/a&gt;&lt;/li&gt;</code></pre></div><p>I had review the code and I can see that when you enter a tab install_tabs is called,<br />on the other hand, If you enter a link install_tabs is not called even the hook object is created.</p><p>To solve this issue I have to add these lines to the file session.inc line 300</p><div class="codebox"><pre><code>    if (!isset($_SESSION[&#039;App&#039;])) {
        $_SESSION[&#039;App&#039;] = new front_accounting();
        $_SESSION[&#039;App&#039;]-&gt;init();
    } else { // line added
        $_SESSION[&#039;App&#039;]-&gt;init(); // line added
    }</code></pre></div><p>In this way the method install_tabs of my hook is called when I enter a link and when I enter a tab.</p><p>I hope this could help others.</p>]]></content>
			<author>
				<name><![CDATA[eclipxe]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=1024</uri>
			</author>
			<updated>2011-02-09T04:21:11Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=8289#p8289</id>
		</entry>
</feed>
