<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[FrontAccounting forum — How to customize the shortcut menus]]></title>
	<link rel="self" href="https://frontaccounting.com/punbb/extern.php?action=feed&amp;tid=6399&amp;type=atom" />
	<updated>2016-08-28T19:39:58Z</updated>
	<generator>PunBB</generator>
	<id>https://frontaccounting.com/punbb/viewtopic.php?id=6399</id>
		<entry>
			<title type="html"><![CDATA[Re: How to customize the shortcut menus]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=26185#p26185" />
			<content type="html"><![CDATA[<p>Thanks. I got it working with the instructions from Cambell.</p>]]></content>
			<author>
				<name><![CDATA[abatonime]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=20893</uri>
			</author>
			<updated>2016-08-28T19:39:58Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=26185#p26185</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: How to customize the shortcut menus]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=26184#p26184" />
			<content type="html"><![CDATA[<p>The <strong>category</strong> is the last parameter (4th parameter) in the <strong>app_function</strong> class&#039;s <em>get_icon()</em> method. For the default standard theme, place the icon file <em>$category.png</em> in the theme&#039;s <strong>images</strong> folder.</p><p>Attached image referred to in 4th post here.</p>]]></content>
			<author>
				<name><![CDATA[apmuthu]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=364</uri>
			</author>
			<updated>2016-08-28T18:23:55Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=26184#p26184</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: How to customize the shortcut menus]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=26181#p26181" />
			<content type="html"><![CDATA[<p>Thank you for your answer.</p><p>My theme (elegant) has hardcoded the icons based on the offset of the module.</p><div class="codebox"><pre><code> $imgs2 = array(&quot;folder.gif&quot;, &quot;report.png&quot;, &quot;page_edit.png&quot;, &quot;money.png&quot;, &quot;folder.gif&quot;); </code></pre></div><p>I guess I&#039;ll have to modify the theme then.</p><p>Thanks again for your help.</p>]]></content>
			<author>
				<name><![CDATA[abatonime]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=20893</uri>
			</author>
			<updated>2016-08-28T08:38:50Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=26181#p26181</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: How to customize the shortcut menus]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=26178#p26178" />
			<content type="html"><![CDATA[<p>To modify the menus in your extension you need to implement the &#039;install_options&#039; hook.&nbsp; Here&#039;s <a href="https://github.com/saygoweb/frontaccounting-module-sgw_sales/blob/master/hooks.php#L20">an example</a> from one of my extensions.</p><p>To see all the hooks that are available have a look in includes/hooks.inc in the core.</p><p>To modify the icon that you see relating to any menu item you need to do 2 things:</p><p>1. Specify the category when creating the menu item.&nbsp; Each menu item is an instance of the app_function class.&nbsp; Its constructor takes a $category.</p><p>2. The renderer class in the theme has a function that maps category to icon.&nbsp; function get_icon($category).&nbsp; You can then use this to map to the icon you want.</p><p>The icon image should be within the theme folder.</p>]]></content>
			<author>
				<name><![CDATA[cambell]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=19447</uri>
			</author>
			<updated>2016-08-28T03:21:44Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=26178#p26178</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: How to customize the shortcut menus]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=26177#p26177" />
			<content type="html"><![CDATA[<p>Hi,</p><p>I managed to make a simple extension. However I have a question.</p><p>How can I customize this icon? https://www.dropbox.com/s/caa6xjk7v6h7bzs/FA%20modules%20icons.png?dl=0</p><p>It&#039;s probably related to the $icon parameter of the module constructor but I can&#039;t find any example.</p>]]></content>
			<author>
				<name><![CDATA[abatonime]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=20893</uri>
			</author>
			<updated>2016-08-27T20:47:52Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=26177#p26177</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: How to customize the shortcut menus]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=26176#p26176" />
			<content type="html"><![CDATA[<p>Thanks. What I wanted to modify is part of the theme actually.</p><p>If I want to modify the regular menu instead, I guess the best would be to write an Extensions, right?<br />Can you recommand a good guide for writing an extension? I only find bits and pieces of information here and there.</p>]]></content>
			<author>
				<name><![CDATA[abatonime]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=20893</uri>
			</author>
			<updated>2016-08-27T14:44:23Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=26176#p26176</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: How to customize the shortcut menus]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=25950#p25950" />
			<content type="html"><![CDATA[<p>Whilst the look and feel are definitely part of the theme, the shortcuts are part of the string it shows for example in <strong>applications/customers.php</strong> which is the sales / order application tab:<br /></p><div class="codebox"><pre><code>class customers_app extends application 
{
    function customers_app() 
    {
        $this-&gt;application(&quot;orders&quot;, _($this-&gt;help_context = &quot;&amp;Sales&quot;));
    
        $this-&gt;add_module(_(&quot;Transactions&quot;));
        $this-&gt;add_lapp_function(0, _(&quot;Sales &amp;Quotation Entry&quot;),
            &quot;sales/sales_order_entry.php?NewQuotation=Yes&quot;, &#039;SA_SALESQUOTE&#039;, MENU_TRANSACTION);
        $this-&gt;add_lapp_function(0, _(&quot;Sales &amp;Order Entry&quot;),
..
..</code></pre></div><p>The character that succeeds &quot;&amp;&quot; character in the strings above are the shortcuts. If the same character is there more than once in a page, it will cycle thru them on each choice.</p><p>Attached your file here.</p>]]></content>
			<author>
				<name><![CDATA[apmuthu]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=364</uri>
			</author>
			<updated>2016-08-04T10:56:52Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=25950#p25950</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[How to customize the shortcut menus]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=25944#p25944" />
			<content type="html"><![CDATA[<p>How can I modify the items in the shortcuts menus?</p><p>This is the menu I am talking about:<br /><a href="https://www.dropbox.com/s/lt217my4siu8w20/FA%20shortcuts%20menu.PNG?dl=0">https://www.dropbox.com/s/lt217my4siu8w … u.PNG?dl=0</a></p><p>Is that somehow part of the theme?</p>]]></content>
			<author>
				<name><![CDATA[abatonime]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=20893</uri>
			</author>
			<updated>2016-08-04T09:20:10Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=25944#p25944</id>
		</entry>
</feed>
