<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
<channel>
<title>Question2Answer Q&amp;A - Recent questions tagged layer</title>
<link>https://www.question2answer.org/qa/tag/layer</link>
<description>Powered by Question2Answer</description>
<item>
<title>How to output javascript in event module?</title>
<link>https://www.question2answer.org/qa/83836/how-to-output-javascript-in-event-module</link>
<description>

&lt;p&gt;I want to add a javascript to the element which contains the comment (question,answer) text from event module like this:&lt;/p&gt;

&lt;p&gt;function process_event($event, $userid, $handle, $cookieid, $params) {&lt;/p&gt;

&lt;p&gt;if($event == 'c_post'){&lt;/p&gt;

&lt;p&gt;$this-&amp;gt;output('&amp;lt;script&amp;gt;&lt;/p&gt;

&lt;p&gt;//javascript code here:&lt;/p&gt;

&lt;p&gt;&amp;nbsp;var Dom = document.getElementById(&quot;id of this element&lt;span style=&quot;color:#34495e; font-family:&amp;quot;Courier New&amp;quot;,Courier,monospace,sans-serif&quot;&gt;&quot;&lt;/span&gt;);&lt;/p&gt;

&lt;p&gt;...&lt;/p&gt;

&lt;p&gt;&amp;lt;/script&amp;gt;')&lt;/p&gt;

&lt;p&gt;}&lt;/p&gt;

&lt;p&gt;}&lt;/p&gt;

&lt;p&gt;But this doesn't work. What kind of plugin should be used for this purpose? I don't know how to get the id of the element in a layer module.&lt;/p&gt;</description>
<category>Plugins</category>
<guid isPermaLink="true">https://www.question2answer.org/qa/83836/how-to-output-javascript-in-event-module</guid>
<pubDate>Wed, 13 May 2020 12:32:19 +0000</pubDate>
</item>
<item>
<title>I wanna build a plugin that only works when I have an extra character at the end of the url input in the browser</title>
<link>https://www.question2answer.org/qa/66099/wanna-build-plugin-only-works-extra-character-input-browser</link>
<description>I am buiding a plugin that modifies the html inputs for pages (layer) &amp;nbsp;when the user adds a specific extra character at the end of the page url on the browser &lt;br /&gt;
&lt;br /&gt;
example: &lt;a href=&quot;https://www.question2answer.org/qa/20321/best-way-to-override-qa_db_points_calculations-function/myspecificextrachar&quot; rel=&quot;nofollow&quot;&gt;https://www.question2answer.org/qa/20321/best-way-to-override-qa_db_points_calculations-function/myspecificextrachar&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;how can I add the control over the url input</description>
<category>Q2A Core</category>
<guid isPermaLink="true">https://www.question2answer.org/qa/66099/wanna-build-plugin-only-works-extra-character-input-browser</guid>
<pubDate>Fri, 10 Aug 2018 13:33:21 +0000</pubDate>
</item>
<item>
<title>Issue of mouseover-layer plugin</title>
<link>https://www.question2answer.org/qa/45666/issue-of-mouseover-layer-plugin</link>
<description>

&lt;p&gt;I found bug of&amp;nbsp;mouseover-layer plugin. Contents will be cut twice.&lt;/p&gt;

&lt;ol&gt;

&lt;li&gt;Contents will be&amp;nbsp;cut with SELECT query.&lt;/li&gt;

&lt;li&gt;Contents will be cut with qa_shorten_string_line function.&lt;/li&gt;&lt;/ol&gt;

&lt;div&gt;Also, if there is HTML code to the top of content, there is a further problem.&amp;nbsp;This plugin might need to be modified.&lt;/div&gt;</description>
<category>Q2A Core</category>
<guid isPermaLink="true">https://www.question2answer.org/qa/45666/issue-of-mouseover-layer-plugin</guid>
<pubDate>Thu, 04 Jun 2015 05:14:48 +0000</pubDate>
</item>
<item>
<title>How to add a simple div id into a plugin, layer or theme?</title>
<link>https://www.question2answer.org/qa/38032/how-to-add-a-simple-div-id-into-a-plugin-layer-or-theme</link>
<description>Trying to figure out how to add a simple div id into the extra field plugin or into any other plugin for that matter...&lt;br /&gt;
Is it a layer or a theme issue?&lt;br /&gt;
Please advise</description>
<category>Plugins</category>
<guid isPermaLink="true">https://www.question2answer.org/qa/38032/how-to-add-a-simple-div-id-into-a-plugin-layer-or-theme</guid>
<pubDate>Fri, 05 Sep 2014 19:30:48 +0000</pubDate>
</item>
<item>
<title>Plugin API: Layer - Possibility to add priority key for layer</title>
<link>https://www.question2answer.org/qa/22878/plugin-api-layer-possibility-to-add-priority-key-for-layer</link>
<description>

&lt;p&gt;
	As far as I know there is not such priority render system for layer ( just like WordPress hook ) where we can priotize function to override other plugin layer.
&lt;br&gt;
	
&lt;br&gt;
	Example:
&lt;br&gt;
	
&lt;br&gt;
	&lt;strong&gt;Plugin X1&lt;/strong&gt;
&lt;br&gt;
	&lt;span style=&quot;color:#b22222;&quot;&gt;function head_script()
&lt;br&gt;
	{
&lt;br&gt;
	qa_html_theme:base::head_script();&lt;/span&gt;
&lt;br&gt;
	&lt;span style=&quot;color:#696969;&quot;&gt;//plugin x1 script;&lt;/span&gt;
&lt;br&gt;
	&lt;span style=&quot;color:#b22222;&quot;&gt;}&amp;nbsp;&lt;/span&gt;&lt;/p&gt;


&lt;p&gt;
	
&lt;br&gt;
	&lt;strong&gt;Plugin X2&lt;/strong&gt;
&lt;br&gt;
	&lt;span style=&quot;color:#b22222;&quot;&gt;function head_script()
&lt;br&gt;
	{
&lt;br&gt;
	qa_html_theme:base::head_script();&lt;/span&gt;
&lt;br&gt;
	&lt;span style=&quot;color:#696969;&quot;&gt;//plugin x2 script;&lt;/span&gt;
&lt;br&gt;
	&lt;span style=&quot;color:#b22222;&quot;&gt;}&lt;/span&gt;
&lt;br&gt;
	
&lt;br&gt;
	So here how system will priotize the layer for each plugin? Is there any key to define? If yes how? If not than this is really important when there will be more plugin will start to add same layer for them functionality.&lt;/p&gt;


&lt;p&gt;
	&lt;strong&gt;EDIT:&lt;/strong&gt;&lt;/p&gt;


&lt;p&gt;
	I just encountered with this issue while creating another plugin and want to add layer which I have alreqdy been used for other plugin and now it is not allowing addition to that code.&lt;/p&gt;


&lt;p&gt;
	&lt;strong&gt;&lt;span style=&quot;color:#b22222;&quot;&gt;$this-&amp;gt;output('&amp;lt;DIV CLASS=&quot;qa-q-list-item '.&lt;/span&gt;&lt;span style=&quot;color:#696969;&quot;&gt;$this-&amp;gt;myclasshere&lt;/span&gt;&lt;span style=&quot;color:#b22222;&quot;&gt;.rtrim(' '.@$q_item['classes']).'&quot; '.@$q_item['tags'].'&amp;gt;');&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;


&lt;p&gt;
	Here I am trying to add another class from another plugin but it is not allowing to add and system neither override nor add.&lt;/p&gt;</description>
<category>Plugins</category>
<guid isPermaLink="true">https://www.question2answer.org/qa/22878/plugin-api-layer-possibility-to-add-priority-key-for-layer</guid>
<pubDate>Fri, 05 Apr 2013 10:21:44 +0000</pubDate>
</item>
<item>
<title>EDITED: Right way to add form extra element layer</title>
<link>https://www.question2answer.org/qa/20450/edited-right-way-to-add-form-extra-element-layer</link>
<description>

&lt;p&gt;
	I am trying to add form element to Ask a question page but getting trouble to add element by layer. I have tried to add by layer with three different function but with this not adding element into the form but outside the form.&lt;/p&gt;


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


&lt;div&gt;
	&lt;span style=&quot;color:#0000ff;&quot;&gt;function form($form)&lt;/span&gt;&lt;/div&gt;


&lt;div&gt;
	&lt;span style=&quot;color:#0000ff;&quot;&gt;{&lt;/span&gt;&lt;/div&gt;


&lt;div&gt;
	&lt;span style=&quot;color:#0000ff;&quot;&gt;qa_html_theme_base::form($form);&lt;/span&gt;&lt;/div&gt;


&lt;div&gt;
	&lt;span style=&quot;color:#0000ff;&quot;&gt;$this-&amp;gt;output('Here will be new input element');&lt;/span&gt;&lt;/div&gt;


&lt;div&gt;
	&lt;span style=&quot;color:#0000ff;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;


&lt;div&gt;
	&amp;nbsp;&lt;/div&gt;


&lt;div&gt;
	&lt;span style=&quot;color:#0000ff;&quot;&gt;function form_body($form)&lt;/span&gt;&lt;/div&gt;


&lt;div&gt;
	&lt;span style=&quot;color:#0000ff;&quot;&gt;{&lt;/span&gt;&lt;/div&gt;


&lt;div&gt;
	&lt;span style=&quot;color:#0000ff;&quot;&gt;qa_html_theme_base::form_body($form);&lt;/span&gt;&lt;/div&gt;


&lt;div&gt;
	&lt;span style=&quot;color:#0000ff;&quot;&gt;$this-&amp;gt;output('Here will be new input element');&lt;/span&gt;&lt;/div&gt;


&lt;div&gt;
	&lt;span style=&quot;color:#0000ff;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;


&lt;div&gt;
	&amp;nbsp;&lt;/div&gt;


&lt;div&gt;
	&lt;span style=&quot;color:#0000ff;&quot;&gt;function form_buttons($form, $columns)&lt;/span&gt;&lt;/div&gt;


&lt;div&gt;
	&lt;span style=&quot;color:#0000ff;&quot;&gt;{&lt;/span&gt;&lt;/div&gt;


&lt;div&gt;
	&lt;span style=&quot;color:#0000ff;&quot;&gt;qa_html_theme_base::&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255);&quot;&gt;form_buttons($form, $columns)&lt;/span&gt;&lt;span style=&quot;color:#0000ff;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;


&lt;div&gt;
	&lt;span style=&quot;color:#0000ff;&quot;&gt;$this-&amp;gt;output('Here will be new input element');&lt;/span&gt;&lt;/div&gt;


&lt;div&gt;
	&lt;span style=&quot;color:#0000ff;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;


&lt;div&gt;
	&amp;nbsp;&lt;/div&gt;


&lt;div&gt;
	I am also confuse should I have to use temple as below to get only for Ask page? ro there is any different way to do&lt;/div&gt;


&lt;div&gt;
	&amp;nbsp;&lt;/div&gt;


&lt;div&gt;
	&lt;span style=&quot;color:#0000ff;&quot;&gt;if ($this-&amp;gt;template == 'ask')&lt;/span&gt;&lt;/div&gt;


&lt;div&gt;
	&lt;span style=&quot;color:#0000ff;&quot;&gt;$this-&amp;gt;output('Here will be new input element');&lt;/span&gt;&lt;/div&gt;


&lt;div&gt;
	&amp;nbsp;&lt;/div&gt;


&lt;div&gt;
	I am sure some one must have solution for this.&lt;/div&gt;


&lt;p&gt;
	&lt;strong&gt;&lt;span style=&quot;font-size:16px;&quot;&gt;EDIT:-----------------------------------------------------------------------------------&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;


&lt;p&gt;
	At last got it work and store value to db but now have one trouble. I want this field only on Ask a question page and on edit question form but with $this-&amp;gt;template of course its adding all single question page forms.&lt;/p&gt;


&lt;p&gt;
	&lt;span style=&quot;font-size:14px;&quot;&gt;&lt;strong&gt;Need help here is the code&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;


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


&lt;div&gt;
	&lt;span style=&quot;color:#b22222;&quot;&gt;function form_buttons($form, $columns)&lt;/span&gt;&lt;/div&gt;


&lt;div&gt;
	&lt;span style=&quot;color:#b22222;&quot;&gt;{&lt;/span&gt;&lt;/div&gt;


&lt;div&gt;
	&amp;nbsp;&lt;/div&gt;


&lt;div&gt;
	&lt;span style=&quot;color:#b22222;&quot;&gt;if(($this-&amp;gt;template == 'ask' OR $this-&amp;gt;template == 'question') AND qa_get_logged_in_level() &amp;gt; QA_USER_LEVEL_ADMIN):&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;


&lt;div&gt;
	&amp;nbsp;&lt;/div&gt;


&lt;div&gt;
	&lt;span style=&quot;color:#b22222;&quot;&gt;$this-&amp;gt;my_check();&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt; &lt;/span&gt;// this is my custom checkbox input code&lt;/span&gt;&lt;/div&gt;


&lt;div&gt;
	&amp;nbsp;&lt;/div&gt;


&lt;div&gt;
	&lt;span style=&quot;color:#b22222;&quot;&gt;endif;&lt;/span&gt;&lt;/div&gt;


&lt;div&gt;
	&amp;nbsp;&lt;/div&gt;


&lt;div&gt;
	&lt;span style=&quot;color:#b22222;&quot;&gt;qa_html_theme_base::form_buttons($form, $columns);&lt;/span&gt;&lt;/div&gt;


&lt;div&gt;
	&amp;nbsp;&lt;/div&gt;


&lt;div&gt;
	&lt;span style=&quot;color:#b22222;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;</description>
<category>Q2A Core</category>
<guid isPermaLink="true">https://www.question2answer.org/qa/20450/edited-right-way-to-add-form-extra-element-layer</guid>
<pubDate>Mon, 07 Jan 2013 09:47:14 +0000</pubDate>
</item>
<item>
<title>Plugin Dev: Create Table possible from plugin layer?</title>
<link>https://www.question2answer.org/qa/19566/plugin-dev-create-table-possible-from-plugin-layer</link>
<description>

&lt;p&gt;
	I know I can create a table from a qa_register_plugin_module using:&amp;nbsp;&lt;/p&gt;


&lt;p&gt;
	&lt;span style=&quot;color:#0000ff;&quot;&gt;function init_queries($tableslc) {
&lt;br&gt;
	&amp;nbsp;&amp;nbsp; return 'CREATE TABLE ^mytable (....&lt;/span&gt;&lt;/p&gt;


&lt;p&gt;
	Now I have written a plugin that has only a qa_register_plugin_&lt;strong&gt;layer&lt;/strong&gt;.&lt;/p&gt;


&lt;p&gt;
	Do I need to register a plugin-module only for creating the database table or can I create the table from the layer as well? In other words, can I use init_queries for the layer? ... my feeling says no, I have to use a plugin-module, am I right?&lt;/p&gt;</description>
<category>Plugins</category>
<guid isPermaLink="true">https://www.question2answer.org/qa/19566/plugin-dev-create-table-possible-from-plugin-layer</guid>
<pubDate>Thu, 29 Nov 2012 10:56:24 +0000</pubDate>
</item>
<item>
<title>How to access question's TAGS from widget or layer? How to access Tags from Advanced Theme?</title>
<link>https://www.question2answer.org/qa/18928/access-questions-tags-from-widget-layer-access-advanced-theme</link>
<description>

&lt;p&gt;
	&lt;span style=&quot;color:#000000;&quot;&gt;I would like to now if I can access the TAGS of the question directly from a widget / layer.
&lt;br&gt;
	
&lt;br&gt;
	What is the code for getting the tags in an array?
&lt;br&gt;
	
&lt;br&gt;
	Can I get them without an extra database query?&lt;/span&gt;&lt;/p&gt;


&lt;p&gt;
	&lt;span style=&quot;color:#000000;&quot;&gt;--&lt;/span&gt;&lt;/p&gt;


&lt;p&gt;
	&lt;span style=&quot;color:#000000;&quot;&gt;Edit: I found function post_tag_list in qa-theme-base.php. There tags get output like that:&lt;/span&gt;&lt;/p&gt;


&lt;p&gt;
	&lt;span style=&quot;color:#000000;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; foreach ($post['q_tags'] as $tag)
&lt;br&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;$this-&amp;gt;post_tag_item($tag, $class);&lt;/span&gt;&lt;/p&gt;


&lt;p&gt;
	&lt;span style=&quot;color:#000000;&quot;&gt;Can I access &lt;strong&gt;$post['q_tags']&lt;/strong&gt; without any &quot;preparation&quot; from the widget?&lt;/span&gt;&lt;/p&gt;


&lt;p&gt;
	&lt;span style=&quot;color:#000000;&quot;&gt;--&lt;/span&gt;&lt;/p&gt;


&lt;p&gt;
	&lt;span style=&quot;color:#000000;&quot;&gt;2nd part of the question: &lt;/span&gt;&lt;strong&gt;How to access Tags from Advanced Theme?&lt;/strong&gt;&lt;/p&gt;


&lt;p&gt;
	&amp;nbsp;&lt;/p&gt;</description>
<category>Q2A Core</category>
<guid isPermaLink="true">https://www.question2answer.org/qa/18928/access-questions-tags-from-widget-layer-access-advanced-theme</guid>
<pubDate>Mon, 05 Nov 2012 09:27:56 +0000</pubDate>
</item>
<item>
<title>How about changing the implementation of question2answer view layer?</title>
<link>https://www.question2answer.org/qa/16432/about-changing-implementation-question2answer-view-layer</link>
<description>

&lt;p&gt;
	We all know that all the html code is written out by qa-theme-base.php. It is very difficult to modify the HTML code in this way. At the same time it is very difficult to understand the logic that transfer the $qa_content to pure HTML code.&lt;/p&gt;


&lt;p&gt;
	In this function:&lt;/p&gt;


&lt;p&gt;
	&lt;span style=&quot;color:#0000ff;&quot;&gt;function output_array($elements)&lt;/span&gt;&lt;/p&gt;


&lt;p&gt;
	I can get the HTML code of every page. I can create a new PHP file and paste these HTML code to this file. At the qa-page.php I didn't call &lt;span style=&quot;color:#0000ff;&quot;&gt;qa_output_content&lt;/span&gt;&amp;nbsp;function. Instead I used &lt;span style=&quot;color:#0000ff;&quot;&gt;require_once&lt;/span&gt; to include the new created file. The at the new file I can use &lt;span style=&quot;color:#0000ff;&quot;&gt;&amp;lt;?php echo $qa_content['...']; ?&amp;gt;&lt;/span&gt; to show the correct content. In my experience it worked well.&lt;/p&gt;


&lt;p&gt;
	I want to know the advantage and disadvantage of this method. And why question2answer didn't use this method too?&lt;/p&gt;</description>
<category>Q2A Core</category>
<guid isPermaLink="true">https://www.question2answer.org/qa/16432/about-changing-implementation-question2answer-view-layer</guid>
<pubDate>Tue, 10 Jul 2012 03:46:07 +0000</pubDate>
</item>
<item>
<title>How to add a subnavigation by using a plugin layer?</title>
<link>https://www.question2answer.org/qa/16428/how-to-add-a-subnavigation-by-using-a-plugin-layer</link>
<description>

&lt;p&gt;
	For the &lt;a href=&quot;http://www.question2answer.org/qa/16425/new-plugin-best-users-per-month-release-call-for-beta-users&quot; rel=&quot;nofollow&quot;&gt;new plugin (q2a-best-users-per-month)&lt;/a&gt; I was not able yet to add a &lt;strong&gt;subnavigation &lt;/strong&gt;(a &quot;tab&quot; for a &lt;strong&gt;plugin page&lt;/strong&gt;) by using a layer.php.&lt;/p&gt;


&lt;p&gt;
	This is what is needed:&lt;/p&gt;


&lt;p&gt;
	&lt;img alt=&quot;q2a subnavigation&quot; src=&quot;http://www.question2answer.org/qa/?qa=blob&amp;amp;qa_blobid=16777940586801478713&quot; style=&quot;width: 547px; height: 128px;&quot;&gt;&lt;/p&gt;


&lt;p&gt;
	I registered a layer.php with my plugin and tried (without success):&lt;/p&gt;


&lt;p&gt;
	&lt;span style=&quot;color:#000080;&quot;&gt;&lt;span style=&quot;font-size: 10px;&quot;&gt;&lt;span style=&quot;font-family: lucida sans unicode,lucida grande,sans-serif;&quot;&gt;&amp;lt;?php
&lt;br&gt;
	
&lt;br&gt;
	class qa_html_theme_layer extends qa_html_theme_base
&lt;br&gt;
	{
&lt;br&gt;
	
&lt;br&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;function doctype() {
&lt;br&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;//if($this-&amp;gt;template == 'users' &amp;amp;&amp;amp; (qa_get_logged_in_handle() === $this-&amp;gt;_user_handle() || qa_opt('user_act_list_show'))) {
&lt;br&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;if($this-&amp;gt;template == 'users' || $this-&amp;gt;template == 'bestusers' ) {
&lt;br&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;if(!isset($this-&amp;gt;content['navigation']['sub'])) {
&lt;br&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;$this-&amp;gt;content['navigation']['sub'] = array(
&lt;br&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;'profile' =&amp;gt; array(
&lt;br&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;'url' =&amp;gt; qa_path_html('user/'.$this-&amp;gt;_user_handle(), null, qa_opt('site_url')),
&lt;br&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;'label' =&amp;gt; $this-&amp;gt;_user_handle(),
&lt;br&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;'selected' =&amp;gt; !qa_get('tab')?true:false
&lt;br&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;),
&lt;br&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;'history' =&amp;gt; array(
&lt;br&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;'url' =&amp;gt; qa_path_html('user/'.$this-&amp;gt;_user_handle(), array('tab'=&amp;gt;'history'), qa_opt('site_url')),
&lt;br&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;'label' =&amp;gt; qa_opt('user_act_list_tab'),
&lt;br&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;'selected' =&amp;gt; qa_get('tab')=='history'?true:false
&lt;br&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;),
&lt;br&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;);
&lt;br&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;}
&lt;br&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;else {
&lt;br&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;$this-&amp;gt;content['navigation']['sub']['users$'] = array(
&lt;br&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;'url' =&amp;gt; qa_path_html('users'),
&lt;br&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;'label' =&amp;gt; qa_lang_html('main/highest_users'),
&lt;br&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;'selected' =&amp;gt; qa_get('tab')=='users$'?true:false
&lt;br&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;);
&lt;br&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;$this-&amp;gt;content['navigation']['sub']['bestusers'] = array(
&lt;br&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;'url' =&amp;gt; &quot;&lt;a href=&quot;http://www.gute-mathe-fragen.de/bestusers&quot;,//&quot; rel=&quot;nofollow&quot;&gt;http://www.gute-mathe-fragen.de/bestusers&quot;,//&lt;/a&gt; qa_path_html('users'),
&lt;br&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;'label' =&amp;gt; &quot;Monatsbeste&quot;,
&lt;br&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;'selected' =&amp;gt; qa_get('tab')=='bestusers'?true:false
&lt;br&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;);
&lt;br&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;}
&lt;br&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;}
&lt;br&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;qa_html_theme_base::doctype();
&lt;br&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;}
&lt;br&gt;
	
&lt;br&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;
&lt;br&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;// grab the handle of the profile you're looking at
&lt;br&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;function _user_handle()
&lt;br&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;{
&lt;br&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;$handle = preg_replace( '#^user/([^/]+)#', &quot;$1&quot;, $this-&amp;gt;request );
&lt;br&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;return $handle;
&lt;br&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;}
&lt;br&gt;
	
&lt;br&gt;
	}&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;br&gt;
	&amp;nbsp;&lt;/p&gt;


&lt;p&gt;
	This did not change anything.&lt;/p&gt;


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


&lt;p&gt;
	For now, I hacked the qa-include/&lt;strong&gt;qa-app-format.php&lt;/strong&gt; with:&lt;/p&gt;


&lt;p&gt;
	around line 1055:&lt;/p&gt;


&lt;p&gt;
	&lt;span style=&quot;color:#000080;&quot;&gt;&lt;span style=&quot;font-size: 10px;&quot;&gt;&lt;span style=&quot;font-family: lucida sans unicode,lucida grande,sans-serif;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; } else {
&lt;br&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;return array(
&lt;br&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;// show submenu best users and monthly best
&lt;br&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;'users$' =&amp;gt; array(
&lt;br&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;'url' =&amp;gt; qa_path_html('users'),
&lt;br&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;'label' =&amp;gt; qa_lang_html('main/highest_users'),
&lt;br&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;),
&lt;br&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;
&lt;br&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;// eetv: added link to monthly users
&lt;br&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;'users/bestusers' =&amp;gt; array(
&lt;br&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;'label' =&amp;gt; &quot;Monatsbeste&quot;,
&lt;br&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;'url' =&amp;gt; &quot;&lt;a href=&quot;http://www.gute-mathe-fragen.de/bestusers&quot;,&quot; rel=&quot;nofollow&quot;&gt;http://www.gute-mathe-fragen.de/bestusers&quot;,&lt;/a&gt;
&lt;br&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;),
&lt;br&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;// end
&lt;br&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;);
&lt;br&gt;
	
&lt;br&gt;
	&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;}&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;br&gt;
	&amp;nbsp;&lt;/p&gt;</description>
<category>Plugins</category>
<guid isPermaLink="true">https://www.question2answer.org/qa/16428/how-to-add-a-subnavigation-by-using-a-plugin-layer</guid>
<pubDate>Mon, 09 Jul 2012 11:53:39 +0000</pubDate>
</item>
<item>
<title>add country flag beside the question</title>
<link>https://www.question2answer.org/qa/13242/add-country-flag-beside-the-question</link>
<description>

&lt;p&gt;
	&lt;span class=&quot;hps&quot; style=&quot;color: rgb(51, 51, 51); font-family: arial, sans-serif; font-size: 16px; background-color: rgb(245, 245, 245);&quot;&gt;hello, how can I&lt;/span&gt;&lt;span style=&quot;color: rgb(51, 51, 51); font-family: arial, sans-serif; font-size: 16px; background-color: rgb(245, 245, 245);&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;hps&quot; style=&quot;color: rgb(51, 51, 51); font-family: arial, sans-serif; font-size: 16px; background-color: rgb(245, 245, 245);&quot;&gt;automatically&lt;/span&gt;&lt;span style=&quot;color: rgb(51, 51, 51); font-family: arial, sans-serif; font-size: 16px; background-color: rgb(245, 245, 245);&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;hps&quot; style=&quot;color: rgb(51, 51, 51); font-family: arial, sans-serif; font-size: 16px; background-color: rgb(245, 245, 245);&quot;&gt;add&lt;/span&gt;&lt;span style=&quot;color: rgb(51, 51, 51); font-family: arial, sans-serif; font-size: 16px; background-color: rgb(245, 245, 245);&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;hps&quot; style=&quot;color: rgb(51, 51, 51); font-family: arial, sans-serif; font-size: 16px; background-color: rgb(245, 245, 245);&quot;&gt;country flag&lt;/span&gt;&lt;span style=&quot;color: rgb(51, 51, 51); font-family: arial, sans-serif; font-size: 16px; background-color: rgb(245, 245, 245);&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;hps&quot; style=&quot;color: rgb(51, 51, 51); font-family: arial, sans-serif; font-size: 16px; background-color: rgb(245, 245, 245);&quot;&gt;from&lt;/span&gt;&lt;span style=&quot;color: rgb(51, 51, 51); font-family: arial, sans-serif; font-size: 16px; background-color: rgb(245, 245, 245);&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;hps&quot; style=&quot;color: rgb(51, 51, 51); font-family: arial, sans-serif; font-size: 16px; background-color: rgb(245, 245, 245);&quot;&gt;ip address&lt;/span&gt;&lt;span style=&quot;color: rgb(51, 51, 51); font-family: arial, sans-serif; font-size: 16px; background-color: rgb(245, 245, 245);&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;img alt=&quot;&quot; src=&quot;http://www.question2answer.org/qa/?qa=blob&amp;amp;qa_blobid=10151816453560641327&quot; style=&quot;width: 1035px; height: 673px;&quot;&gt;&lt;span class=&quot;hps&quot; style=&quot;color: rgb(51, 51, 51); font-family: arial, sans-serif; font-size: 16px; background-color: rgb(245, 245, 245);&quot;&gt; ?&lt;/span&gt;&lt;/p&gt;


&lt;p&gt;
	&lt;span class=&quot;hps&quot; style=&quot;color: rgb(51, 51, 51); font-family: arial, sans-serif; font-size: 16px; background-color: rgb(245, 245, 245);&quot;&gt;thanks.&lt;/span&gt;&lt;/p&gt;</description>
<category>Plugins</category>
<guid isPermaLink="true">https://www.question2answer.org/qa/13242/add-country-flag-beside-the-question</guid>
<pubDate>Mon, 05 Mar 2012 07:51:05 +0000</pubDate>
</item>
<item>
<title>Plugin to add custom html to page. Also adds js and css to head.</title>
<link>https://www.question2answer.org/qa/13109/plugin-to-add-custom-html-to-page-also-adds-js-and-css-to-head</link>
<description>

&lt;p&gt;
	I have created a simple layer plugin that demonstrates how to add custom html above the page title. The plugin also optionally injects javascript and css that might be required.&lt;/p&gt;


&lt;p&gt;
	I realize this is a very basic example, but it might be helpful for new implementers looking for a basic page layer example, or for anybody that just wants to add some basic html to Q2A pages.&lt;/p&gt;


&lt;p&gt;
	The html, javascript, and css are options under Admin &amp;gt; Plugins.&lt;/p&gt;


&lt;p&gt;
	You can edit the &lt;span style=&quot;font-family:courier new,courier,monospace;&quot;&gt;-layer.php&lt;/span&gt; file to alter where the custom html appears and on which page types.&lt;/p&gt;


&lt;p&gt;
	The package is hosted on Google Code which I have just used for the first time, so hopefully I got it right.&lt;/p&gt;


&lt;p&gt;
	Comments are welcome.&lt;/p&gt;


&lt;p&gt;
	Here is the &lt;a rel=&quot;nofollow&quot; href=&quot;http://code.google.com/p/q2a-merkus-addcontent/&quot;&gt;project url&lt;/a&gt;.&lt;/p&gt;</description>
<category>Plugins</category>
<guid isPermaLink="true">https://www.question2answer.org/qa/13109/plugin-to-add-custom-html-to-page-also-adds-js-and-css-to-head</guid>
<pubDate>Wed, 29 Feb 2012 09:47:05 +0000</pubDate>
</item>
<item>
<title>how to add one more variable in q_list_item function</title>
<link>https://www.question2answer.org/qa/12397/how-to-add-one-more-variable-in-q_list_item-function</link>
<description>

&lt;p&gt;
	currently function&amp;nbsp;q_list_item has only one variable but i want to add one more varialbe through layer in plugin&lt;/p&gt;


&lt;p&gt;
	I just change the function defination like this&amp;nbsp;&lt;/p&gt;


&lt;p&gt;
	q_list_item($q_item ,$var )&lt;/p&gt;


&lt;p&gt;
	{&lt;/p&gt;


&lt;p&gt;
	...&lt;/p&gt;


&lt;p&gt;
	..&lt;/p&gt;


&lt;p&gt;
	}&lt;/p&gt;


&lt;p&gt;
	It works perfectly but&lt;strong&gt; if i disable plugin&lt;/strong&gt; it creates error.&lt;/p&gt;


&lt;p&gt;
	Can anybody pls help me out!!!&lt;/p&gt;</description>
<category>Plugins</category>
<guid isPermaLink="true">https://www.question2answer.org/qa/12397/how-to-add-one-more-variable-in-q_list_item-function</guid>
<pubDate>Wed, 01 Feb 2012 00:49:06 +0000</pubDate>
</item>
</channel>
</rss>