<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[FrontAccounting forum — User Theme]]></title>
	<link rel="self" href="https://frontaccounting.com/punbb/extern.php?action=feed&amp;tid=6631&amp;type=atom" />
	<updated>2017-01-04T04:23:35Z</updated>
	<generator>PunBB</generator>
	<id>https://frontaccounting.com/punbb/viewtopic.php?id=6631</id>
		<entry>
			<title type="html"><![CDATA[Re: User Theme]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=27325#p27325" />
			<content type="html"><![CDATA[<p>You can use either a hard coded approach (Quick and Dirty) or change the encoding of all the php files to be in the utf-8 character set.</p>]]></content>
			<author>
				<name><![CDATA[apmuthu]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=364</uri>
			</author>
			<updated>2017-01-04T04:23:35Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=27325#p27325</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: User Theme]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=27314#p27314" />
			<content type="html"><![CDATA[<p>Thanks&nbsp; @APMuthu.</p><p>I actually added it to lang/installed_languages.inc to lang/installed_languages.inc as follows.&nbsp; But it does not work since the language is used before a user is logged in, therefore the user_theme() does not work here. The reason of using the user_theme() is when dashboard theme is used and the encoding is utf-8, some of the wordings (legends, headers) on the charts or tables disappeared.&nbsp; The missing wordings will show up when the encoding is set to &quot;iso-8859-1&quot;.&nbsp; Would you suggest any other work around where I could use utf-8 to handle my chinese character inputs and it does not affect the dashboard charts...&nbsp; Thank you.</p><p><span style="color: blue"><br />include_once($path_to_root . &quot;/includes/current_user.inc&quot;);</span></p><br /><p><span style="color: blue">//$themename=user_theme();<br />$themename=&quot;dashboard&quot;;</span></p><p><span style="color: blue">if ($themename==&#039;dashboard&#039;)<br />{<br />$encoding_0=&quot;iso-8859-1&quot;;<br />//$encoding_0=&quot;utf-8&quot;;<br />}<br />else<br />{<br />$encoding_0=&quot;utf-8&quot;;<br />//$encoding_0=&quot;iso-8859-1&quot;;<br />} </span></p><br /><p><span style="color: blue">$installed_languages = array (<br />&nbsp; 0 =&gt; <br />&nbsp; array (<br />&nbsp; &nbsp; &#039;code&#039; =&gt; &#039;C&#039;,<br />&nbsp; &nbsp; &#039;name&#039; =&gt; &#039;English&#039;,<br />&nbsp; &nbsp; &#039;encoding&#039; =&gt; $encoding_0,&nbsp; &nbsp; </span></p><p><span style="color: blue">&nbsp; ), </span></p>]]></content>
			<author>
				<name><![CDATA[mark0300]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=20216</uri>
			</author>
			<updated>2017-01-02T05:37:11Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=27314#p27314</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: User Theme]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=27305#p27305" />
			<content type="html"><![CDATA[<p>You need to be logged in as the said user before it can get it.</p><p>The said function is defined in lines 489-493 of <strong>includes/current_user.inc</strong><br /></p><div class="codebox"><pre><code>function user_theme()
{
    return isset($_SESSION[&quot;wa_current_user&quot;]) ?
        $_SESSION[&quot;wa_current_user&quot;]-&gt;prefs-&gt;get_theme() : &#039;default&#039;;
}</code></pre></div>]]></content>
			<author>
				<name><![CDATA[apmuthu]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=364</uri>
			</author>
			<updated>2017-01-01T17:43:29Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=27305#p27305</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[User Theme]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=27289#p27289" />
			<content type="html"><![CDATA[<p>Hi,</p><p>Is there a function that I could use to retrieve the current user&#039;s theme?</p><p>I have found user_theme(), but the value retrieve does not seem to be correct.</p><p>Here is the code:<br /><em><span style="color: blue"><br />include_once($path_to_root . &quot;/includes/current_user.inc&quot;);</span></em></p><p><span style="color: blue"><em>$themename=user_theme();</em></span></p><p><span style="color: blue"><em>if ($themename==&#039;dashboard&#039;)<br />{</p><p>echo &quot;this is dashboard&quot;;</p><p>}<br />else<br />{<br />echo &quot;this is not dashboard&quot;;<br />} <br /></em></span></p><br /><p>Could someone advise?</p><p>Thank you.</p><p>/Mark</p>]]></content>
			<author>
				<name><![CDATA[mark0300]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=20216</uri>
			</author>
			<updated>2016-12-30T11:43:13Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=27289#p27289</id>
		</entry>
</feed>
