<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[FrontAccounting forum — Dashboard Theme / Module hooks issue]]></title>
		<link>https://frontaccounting.com/punbb/viewtopic.php?id=3973</link>
		<atom:link href="https://frontaccounting.com/punbb/extern.php?action=feed&amp;tid=3973&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in Dashboard Theme / Module hooks issue.]]></description>
		<lastBuildDate>Sun, 24 Mar 2013 11:11:00 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: Dashboard Theme / Module hooks issue]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=16154#p16154</link>
			<description><![CDATA[<p>The fixed dashboard module is available directly in FA extensions repo. No need to download and install the attached zip, unless you have no access to internet (but how you will download the zip in this case <img src="https://frontaccounting.com/punbb/img/smilies/smile.png" width="15" height="15" alt="smile" />).<br />Janusz</p>]]></description>
			<author><![CDATA[null@example.com (itronics)]]></author>
			<pubDate>Sun, 24 Mar 2013 11:11:00 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=16154#p16154</guid>
		</item>
		<item>
			<title><![CDATA[Re: Dashboard Theme / Module hooks issue]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=16140#p16140</link>
			<description><![CDATA[<p>Thanks Janusz. Dashboard r5 along with HG 3207-3210 sets right the issue natively without resort to the patches in this thread since the <strong>js</strong> inclusion has been moved back to the theme&#039;s <strong>renderer.php</strong> back again from the module&#039;s <strong>hooks.php</strong>.</p>]]></description>
			<author><![CDATA[null@example.com (apmuthu)]]></author>
			<pubDate>Sat, 23 Mar 2013 10:50:22 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=16140#p16140</guid>
		</item>
		<item>
			<title><![CDATA[Re: Dashboard Theme / Module hooks issue]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=16139#p16139</link>
			<description><![CDATA[<p>Since the $path_to_root variable is hardcoded as &quot;../../&quot; in the dashboard setup and other php scripts in the modules/dashboard folder, it is necessary to see that the correct path is used to make sure that the install_tabs() in the hooks.php file works correctly for submenu clicks. This is ensured by patching the <strong>includes/page/header.inc</strong> till a proper alternate solution is found.</p><p>Also the FA-dashboard-r4/<strong>modules/dashboard/sql/update.sql</strong> file can have the <strong>AUTO_INCREMENT=6</strong> phrase removed in both table creation statements. <br />Those who have already installed the dashboard can reset the AUTO_INCREMENT counter with:</p><div class="codebox"><pre><code>ALTER TABLE `0_dashboard_reminders` AUTO_INCREMENT=1;</code></pre></div><p>The id nos 4,5 and 8 are missing in the widgets table data.</p><p>Also the readme can list some means to populate the <strong>dashboard_setup.php</strong> and <strong>reminder_setup.php</strong> script links as a widget in the setup panel besides mentioning that the module must first be installed before the theme is installed and used.</p><p>The installed_extensions.php file in the company/# folder gets populated with &quot;active=&gt;false,&quot; instead of &quot;active=&gt;1,&quot; for the dashboard_theme v2.3.15-1 entry.</p>]]></description>
			<author><![CDATA[null@example.com (apmuthu)]]></author>
			<pubDate>Sat, 23 Mar 2013 09:37:55 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=16139#p16139</guid>
		</item>
		<item>
			<title><![CDATA[Dashboard Theme / Module hooks issue]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=16136#p16136</link>
			<description><![CDATA[<p>Managed to make the dashboard module/theme work as it should by hardcoding the inclusion of jquery-1.3.2.js file and investigated it&#039;s cause.</p><ul><li><p><strong>modules/dashboard/hooks.php</strong> declares function <strong>install_tabs().</strong></p></li><li><p>Function <strong>install_tabs()</strong> lists the <strong>js</strong> files to be included (array <strong>$js_userlib</strong>) by using the function <strong>add_js_ufile()</strong>.</p></li><li><p>Function <strong>add_js_ufile()</strong> (uses full URI / local path and filename) is defined in <strong>includes/main.inc</strong> along with another function <strong>add_js_file()</strong>.</p></li><li><p>Only the function <strong>add_js_file()</strong> (uses only filename) does a file exists check in the fixed webroot&#039;s<strong> js</strong> location as well, using the file include list in array <strong>$js_static</strong>.</p></li><li><p>Both add js functions make sure that each file/URI is included only once from their respective arrays.</p></li><li><p>The file <strong>includes/page/header.inc</strong> declares the function <strong>send_scripts() w</strong>hich includes the files in the <strong>$js_static</strong> array (from company/#/js_cache/*.js or js/*.js) first and then includes the files from the <strong>$js_userlib</strong> array with no checks (neither existence nor once only inclusion)</p></li><li><p>The <strong>renderer</strong> class is instantiated in both the <strong>page_header()</strong> and <strong>page_footer()</strong> functions with the same name <strong>$rend</strong>.</p></li></ul><p>Another function <strong>add_js_source()</strong> is also defined in<strong> includes/main.inc w</strong>here the<strong> js</strong> to be included is in <strong>$text</strong> variable sent as an argument but is used in the function <strong>page_footer()</strong> defined in <strong>includes/page/footer.inc</strong> and is not used here.</p><p><s>The way out here would be to include the jquery scripts int the main webroot<strong>js</strong>folder itself and switch the<strong>add_js_ufile()</strong>function to the<strong>add_js_file()</strong>function for the said files in the the<strong>modules/dashboard/hooks.php</strong>file.</s> The main menu click determines the $path_to_root as &quot;./&quot; but the submenu click sees it as &quot;../../&quot; though the global one is &quot;../&quot; for it, which confounds the js inclusion function.</p><p>It is possible that many extensions will use the jquery function and this will avoid duplicate files - versions of the jquery will however have to be taken into account for the specific extension concerned.</p>]]></description>
			<author><![CDATA[null@example.com (apmuthu)]]></author>
			<pubDate>Sat, 23 Mar 2013 05:25:59 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=16136#p16136</guid>
		</item>
	</channel>
</rss>
