<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[FrontAccounting forum — The Header option from module itself]]></title>
		<link>https://frontaccounting.com/punbb/viewtopic.php?id=8695</link>
		<atom:link href="https://frontaccounting.com/punbb/extern.php?action=feed&amp;tid=8695&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in The Header option from module itself.]]></description>
		<lastBuildDate>Sun, 16 Oct 2022 18:34:12 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: The Header option from module itself]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=41578#p41578</link>
			<description><![CDATA[<p>Just find this function&nbsp; and compare my code. You can update the change in it.</p>]]></description>
			<author><![CDATA[null@example.com (kvvaradha)]]></author>
			<pubDate>Sun, 16 Oct 2022 18:34:12 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=41578#p41578</guid>
		</item>
		<item>
			<title><![CDATA[Re: The Header option from module itself]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=41577#p41577</link>
			<description><![CDATA[<div class="quotebox"><cite>kvvaradha wrote:</cite><blockquote><p>There is a small change in the core of pdf_report.inc will&nbsp; give us a good way to add template form from the module itself. </p><p>from the <strong>reporting/includes/pdf_report.inc</strong>:</p><div class="codebox"><pre><code>function NewPage() 
    {
        global $installed_extensions, $path_to_root;
    
    
        if ($this-&gt;pageNumber==0)
        {
            // check if there is pdf header template for this report
            // and set if it is found
            $tmpl_pdf = find_custom_file(&quot;/reporting/forms/&quot;.$this-&gt;headerTmpl.&quot;.pdf&quot;);
            if ($tmpl_pdf) {
                $this-&gt;tmplSize = $this-&gt;setSourceFile($tmpl_pdf);
            } else {
                // include reports installed inside extension modules
                if (count($installed_extensions) &gt; 0)
                {
                    $extensions = $installed_extensions;
                    foreach ($extensions as $ext)
                        if (($ext[&#039;active&#039;] &amp;&amp; $ext[&#039;type&#039;] == &#039;extension&#039;)) {
                            $tmpl_pdf = find_custom_file($path_to_root.&#039;/&#039;.$ext[&#039;path&#039;].&quot;/reporting/forms/&quot;.$this-&gt;headerTmpl.&quot;.pdf&quot;);
                            if ($tmpl_pdf) {
                                $this-&gt;tmplSize = $this-&gt;setSourceFile($tmpl_pdf);
                            }
                        }
                }
            }
        }

        $this-&gt;pageNumber++;
        parent::newPage();

        if ($this-&gt;tmplSize) {
            $this-&gt;row = $this-&gt;pageHeight - $this-&gt;topMargin; // reset row
            $id = $this-&gt;importPage(min($this-&gt;pageNumber, $this-&gt;tmplSize));
            $this-&gt;useTemplate($id);
        }

        // include related php file if any
        $tmpl_php = find_custom_file(&quot;/reporting/forms/&quot;.$this-&gt;headerTmpl.&quot;.php&quot;);
        if ($tmpl_php) {
            include($tmpl_php);
        }  else {
                // include reports installed inside extension modules
                if (count($installed_extensions) &gt; 0)
                {
                    $extensions = $installed_extensions;
                    foreach ($extensions as $ext)
                        if (($ext[&#039;active&#039;] &amp;&amp; $ext[&#039;type&#039;] == &#039;extension&#039;)) {
                            $tmpl_php = find_custom_file($path_to_root.&#039;/&#039;.$ext[&#039;path&#039;].&quot;/reporting/forms/&quot;.$this-&gt;headerTmpl.&quot;.php&quot;);
                            if ($tmpl_php) {
                                $this-&gt;tmplSize = $this-&gt;setSourceFile($tmpl_php);
                            }
                        }
                }
            }

        if (method_exists($this, $this-&gt;headerTmpl))    // draw predefined page layout if any
            $this-&gt;{$this-&gt;headerTmpl}();
    }</code></pre></div><p>This would help us to hook from the modules template to work on.</p></blockquote></div><p>howto use this header template ?</p>]]></description>
			<author><![CDATA[null@example.com (tukang.computer)]]></author>
			<pubDate>Sat, 15 Oct 2022 18:13:10 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=41577#p41577</guid>
		</item>
		<item>
			<title><![CDATA[Re: The Header option from module itself]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=37194#p37194</link>
			<description><![CDATA[<p>@kvvaradha.<br />Sure, I also thought about a global config.php flag if the login was from theme, however for safety I think it is better going from existing login.php where all the tests code is executed here and only the layout would be called from theme if a login.inc file exists.</p><p>Joe</p>]]></description>
			<author><![CDATA[null@example.com (joe)]]></author>
			<pubDate>Wed, 25 Mar 2020 15:43:09 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=37194#p37194</guid>
		</item>
		<item>
			<title><![CDATA[Re: The Header option from module itself]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=37193#p37193</link>
			<description><![CDATA[<p>@Joe I tired in another way. From config.php we will save the default theme in a constant&nbsp; and then from sessions.inc we will check whether the theme login.php exist or not. If it exist, we can require that file. Otherwise it will require the access/login.php. it&#039;s good alternative i feel. And you can try yourself whether it works or not.</p>]]></description>
			<author><![CDATA[null@example.com (kvvaradha)]]></author>
			<pubDate>Wed, 25 Mar 2020 15:35:52 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=37193#p37193</guid>
		</item>
		<item>
			<title><![CDATA[Re: The Header option from module itself]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=37192#p37192</link>
			<description><![CDATA[<p>@kvvaradha<br />Actually I was doing some trial on login.inc file from the themes. The normal login.php checks if there is a login.inc file in the theme directory and if, this is called instead of the default login. It is prepared, but I thought it could wait to 2.5. To implement it in 2.5, I am waiting for some changing that Janusz want to do before we start implementing the 2.5 things. Unfortunately he is very occupied with his normal work at present.<br />In the example I did, I changed the login.php, and all the other helpers timeout etc. so it was easier to implement a theme login.<br />The trials works perfectly and it is safe.<br />The custom fields is also interesting for at least 2.5. And more.</p><p>/Joe</p>]]></description>
			<author><![CDATA[null@example.com (joe)]]></author>
			<pubDate>Wed, 25 Mar 2020 14:55:33 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=37192#p37192</guid>
		</item>
		<item>
			<title><![CDATA[Re: The Header option from module itself]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=37191#p37191</link>
			<description><![CDATA[<p>There is no need to create new functionality for handling functions from modules. The existing program already checks the modules directory like this </p><p>/modules/module_name/reporting/repXXX.php and if anything is there and it was linked in reports_custom.php. that will be replacing with existing core reports. </p><p>With that it&#039;s good to change the rep files.&nbsp; And regarding the headers also it&#039;s connecting from modules directory and works properly.<br />Hope nothing to research more about it. </p><p>Actually I was trying to make few things. </p><p>*login files from themes directory<br />*hooks for custom fields in different area<br />*smtp for emails<br />* nicedit for textareas with on and off option<br />* bring salesman column in sales orders and debtor trans tables and alter queries to work on<br />* my batch functionality which I have done already. </p><br /><p>And I will make an unofficial version for users to get it.</p>]]></description>
			<author><![CDATA[null@example.com (kvvaradha)]]></author>
			<pubDate>Wed, 25 Mar 2020 14:45:00 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=37191#p37191</guid>
		</item>
		<item>
			<title><![CDATA[Re: The Header option from module itself]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=37190#p37190</link>
			<description><![CDATA[<p>No, I don&#039;t have any suggestions at present. Please continue experimenting. Maybe some good ideas will show up.</p><p>Joe</p>]]></description>
			<author><![CDATA[null@example.com (joe)]]></author>
			<pubDate>Wed, 25 Mar 2020 12:09:25 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=37190#p37190</guid>
		</item>
		<item>
			<title><![CDATA[Re: The Header option from module itself]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=37188#p37188</link>
			<description><![CDATA[<p>The changed <em>rep###.php</em> files can be placed in the <strong>company/#/reporting</strong> folder to substitute the standard ones in the core <strong>reporting</strong> folder.</p><p>@joe: any hooks for replacement header files?</p>]]></description>
			<author><![CDATA[null@example.com (apmuthu)]]></author>
			<pubDate>Wed, 25 Mar 2020 09:14:31 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=37188#p37188</guid>
		</item>
		<item>
			<title><![CDATA[Re: The Header option from module itself]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=37186#p37186</link>
			<description><![CDATA[<p>@apmuthu, we created separate header file for each templates and made some changes inside the rep107, rep111, rep109 as well. and also all of these files we put it inside our module to take up here. Nothing touched in the core.</p>]]></description>
			<author><![CDATA[null@example.com (kvvaradha)]]></author>
			<pubDate>Wed, 25 Mar 2020 02:33:21 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=37186#p37186</guid>
		</item>
		<item>
			<title><![CDATA[Re: The Header option from module itself]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=37181#p37181</link>
			<description><![CDATA[<p>Wonder how dark backgrounds would go with printing. Pre-printed stationery may do it well too. They look good though! Did you have to <br />1, create a new header file itself or <br />2. just a PDF template like you described earlier or<br />3. make an extension with specific settings much like themes?</p>]]></description>
			<author><![CDATA[null@example.com (apmuthu)]]></author>
			<pubDate>Tue, 24 Mar 2020 18:11:33 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=37181#p37181</guid>
		</item>
		<item>
			<title><![CDATA[Re: The Header option from module itself]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=37172#p37172</link>
			<description><![CDATA[<p>Here I have added the details of my templates to test it as well as change the templates. We have 4 templates now. And still we are adding 3 more soon.</p><p>https://www.kvcodes.com/module/premium-pdf-templates-frontaccounting/</p>]]></description>
			<author><![CDATA[null@example.com (kvvaradha)]]></author>
			<pubDate>Mon, 23 Mar 2020 03:16:17 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=37172#p37172</guid>
		</item>
		<item>
			<title><![CDATA[Re: The Header option from module itself]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=37170#p37170</link>
			<description><![CDATA[<p>can u provide a sample template to test?</p>]]></description>
			<author><![CDATA[null@example.com (boxygen)]]></author>
			<pubDate>Sun, 22 Mar 2020 10:46:16 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=37170#p37170</guid>
		</item>
		<item>
			<title><![CDATA[Re: The Header option from module itself]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=37080#p37080</link>
			<description><![CDATA[<p>Then it should be okay if the sysadmin trusts the module&#039;s author.</p>]]></description>
			<author><![CDATA[null@example.com (apmuthu)]]></author>
			<pubDate>Sun, 01 Mar 2020 09:52:03 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=37080#p37080</guid>
		</item>
		<item>
			<title><![CDATA[Re: The Header option from module itself]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=37073#p37073</link>
			<description><![CDATA[<p>No. My suggestion is to get the file from module. Not allowing end users to input into it. Or upload into the system.&nbsp; </p><p>And also I just figured out. The find_custom_file function get the module files too. So we can ignore the&nbsp; changes what I suggested.</p>]]></description>
			<author><![CDATA[null@example.com (kvvaradha)]]></author>
			<pubDate>Fri, 28 Feb 2020 12:51:29 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=37073#p37073</guid>
		</item>
		<item>
			<title><![CDATA[Re: The Header option from module itself]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=37052#p37052</link>
			<description><![CDATA[<p>The pdf forms folder is okay and so is @kvvaradha&#039;s suggestion as long as the sysadmin allows it to be uploaded after vetting. Only that it should not be uploadable by the end user into the FA system especially through a normal web interface or user input form..</p>]]></description>
			<author><![CDATA[null@example.com (apmuthu)]]></author>
			<pubDate>Thu, 27 Feb 2020 15:46:17 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=37052#p37052</guid>
		</item>
	</channel>
</rss>
