<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
<channel>
<title>Question2Answer Q&amp;A - Recent questions tagged qa_opt</title>
<link>https://www.question2answer.org/qa/tag/qa_opt</link>
<description>Powered by Question2Answer</description>
<item>
<title>Update new field in userpoints table.</title>
<link>https://www.question2answer.org/qa/87214/update-new-field-in-userpoints-table</link>
<description>Hello there. &lt;br /&gt;
&lt;br /&gt;
I'm coding a new plugin. I created a new field for users in the userpoints table on my q2a site. I have to update this area for each scoring, according to the score obtained. This field will work independently from the points field. Because I will reset this field as a result of a completed task and start scoring from scratch.&lt;br /&gt;
&lt;br /&gt;
How can I do that?&lt;br /&gt;
&lt;br /&gt;
(I used Google Translate for translation. Sorry for the spelling mistakes.)</description>
<category>Plugins</category>
<guid isPermaLink="true">https://www.question2answer.org/qa/87214/update-new-field-in-userpoints-table</guid>
<pubDate>Tue, 01 Sep 2020 18:55:14 +0000</pubDate>
</item>
<item>
<title>How to check for option without setting it with qa_opt()?</title>
<link>https://www.question2answer.org/qa/32082/how-to-check-for-option-without-setting-it-with-qa_opt</link>
<description>

&lt;p&gt;
	I'm using qa_opt() to check if a plugin *is enabled* or not. For instance:
&lt;br&gt;
	
&lt;br&gt;
	if( qa_opt('q2apro_pluginXX_enabled') ) { // do something }
&lt;br&gt;
	
&lt;br&gt;
	However, I realized that every time I call qa_opt() with a value that has not been set, q2a core sets it immediately in the database.
&lt;br&gt;
	
&lt;br&gt;
	For the example that means, value 'q2apro_pluginXX_enabled' would be written to the database, table &lt;em&gt;qa_options&lt;/em&gt;.
&lt;br&gt;
	
&lt;br&gt;
	&amp;nbsp;
&lt;br&gt;
	
&lt;br&gt;
	&lt;strong&gt;Questions:&lt;/strong&gt;
&lt;br&gt;
	
&lt;br&gt;
	1. Is this intended behaviour?
&lt;br&gt;
	
&lt;br&gt;
	2. If yes, what is the reason for this?
&lt;br&gt;
	
&lt;br&gt;
	&amp;nbsp;
&lt;br&gt;
	
&lt;br&gt;
	Thanks,
&lt;br&gt;
	Kai&lt;/p&gt;</description>
<category>Q2A Core</category>
<guid isPermaLink="true">https://www.question2answer.org/qa/32082/how-to-check-for-option-without-setting-it-with-qa_opt</guid>
<pubDate>Wed, 19 Feb 2014 13:36:56 +0000</pubDate>
</item>
<item>
<title>Bug calling qa_opt() on a not-existing option?</title>
<link>https://www.question2answer.org/qa/31681/bug-calling-qa_opt-on-a-not-existing-option</link>
<description>

&lt;p&gt;
	I just misspelled one of the options in one of my plugins:&lt;/p&gt;


&lt;p&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp; qa_opt('cache&lt;span style=&quot;color:#ff0000;&quot;&gt;&lt;strong&gt;d&lt;/strong&gt;&lt;/span&gt;_qcount');&lt;/p&gt;


&lt;p&gt;
	instead of correct version:&lt;/p&gt;


&lt;p&gt;
	&amp;nbsp;&amp;nbsp; qa_opt('cache_qcount');&lt;/p&gt;


&lt;p&gt;
	The result: In the database in table qa_opt I found a newly created entry:&lt;/p&gt;


&lt;p&gt;
	&quot;cache&lt;span style=&quot;color:#ff0000;&quot;&gt;&lt;strong&gt;d&lt;/strong&gt;&lt;/span&gt;_qcount&quot; with value &quot;&lt;strong&gt;1048576&lt;/strong&gt;&quot;&lt;/p&gt;


&lt;p&gt;
	&amp;nbsp;&lt;/p&gt;


&lt;p&gt;
	Can this be considered a bug?&lt;/p&gt;


&lt;p&gt;
	&amp;nbsp;&lt;/p&gt;


&lt;p&gt;
	PS: function qa_db_set_option($name, $value) can be found in qa-db-options.php&lt;/p&gt;</description>
<category>Q2A Core</category>
<guid isPermaLink="true">https://www.question2answer.org/qa/31681/bug-calling-qa_opt-on-a-not-existing-option</guid>
<pubDate>Mon, 10 Feb 2014 09:21:44 +0000</pubDate>
</item>
<item>
<title>qa_opt() in non-system php file</title>
<link>https://www.question2answer.org/qa/19508/qa_opt-in-non-system-php-file</link>
<description>

&lt;p&gt;
	Hello,&amp;nbsp;&lt;/p&gt;


&lt;p&gt;
	Is there any way to use &lt;span style=&quot;color:#b22222;&quot;&gt;&lt;strong&gt;qa_opt() &lt;/strong&gt;&lt;/span&gt;function in non-system php file in plugin folder? Means I am creating one plugin which has additional php file and doesn't have any q2a module class etc but just simple php file.&lt;/p&gt;</description>
<category>Plugins</category>
<guid isPermaLink="true">https://www.question2answer.org/qa/19508/qa_opt-in-non-system-php-file</guid>
<pubDate>Tue, 27 Nov 2012 13:24:53 +0000</pubDate>
</item>
</channel>
</rss>