<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>eventuAlo.net » blog &#187; plugin</title>
	<atom:link href="http://www.eventualo.net/blog/tag/plugin/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.eventualo.net/blog</link>
	<description>un blog vario ed eventualo</description>
	<lastBuildDate>Mon, 06 Feb 2012 19:26:31 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Un plugin di WordPress contro la legge Bavaglio</title>
		<link>http://www.eventualo.net/blog/2010/08/un-plugin-di-wordpress-contro-la-legge-bavaglio/</link>
		<comments>http://www.eventualo.net/blog/2010/08/un-plugin-di-wordpress-contro-la-legge-bavaglio/#comments</comments>
		<pubDate>Tue, 03 Aug 2010 14:34:15 +0000</pubDate>
		<dc:creator>alo</dc:creator>
				<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[legge bavaglio]]></category>
		<category><![CDATA[plugin]]></category>

		<guid isPermaLink="false">http://www.eventualo.net/blog/?p=912</guid>
		<description><![CDATA[Ho appena pubblicato un mio plugin di WordPress contro la orribile legge Bavaglio. Le principali funzioni sono: mostrare un modulo laterale (widget) con la dichiarazione “questo blog è contro la legge bavaglio” e una serie di link a informazioni e petizioni; fornire al blogger uno strumento per una generazione “automatica” e una programmazione nel tempo [...]]]></description>
			<content:encoded><![CDATA[<p>Ho appena pubblicato un <a href="http://www.eventualo.net/blog/wordpress-plugin-against-gag-law/" title="Plugin per WordPress contro la Legge Bavaglio" >mio plugin di WordPress</a> contro la orribile <strong>legge Bavaglio</strong>.</p>
<p>Le principali funzioni sono:</p>
<ul>
<li>mostrare un modulo laterale (widget) con la dichiarazione “questo blog è contro la legge bavaglio” e una serie di link a informazioni e petizioni;</li>
<li>fornire al blogger uno strumento per una generazione “automatica” e una programmazione nel tempo delle rettifiche;</li>
<li>la possibilità per il visitatore del blog di nascondere tutte le rettifiche e avere una navigazione più agevole tra i soli articoli originali.</li>
</ul>
<p>Per saperne di più e soprattutto per scaricarlo e installarlo sul tuo blog vai alla <a href="http://www.eventualo.net/blog/wordpress-plugin-against-gag-law/" title="Plugin per WordPress contro la Legge Bavaglio" >pagina del plugin</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.eventualo.net/blog/2010/08/un-plugin-di-wordpress-contro-la-legge-bavaglio/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Alo ExportXls: plugin per WordPress per generare file XLS dal db</title>
		<link>http://www.eventualo.net/blog/2009/10/alo-exportxls-plugin-per-wordpress-per-generare-file-xls-dal-db/</link>
		<comments>http://www.eventualo.net/blog/2009/10/alo-exportxls-plugin-per-wordpress-per-generare-file-xls-dal-db/#comments</comments>
		<pubDate>Wed, 28 Oct 2009 19:56:44 +0000</pubDate>
		<dc:creator>alo</dc:creator>
				<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[exportxls]]></category>
		<category><![CDATA[plugin]]></category>

		<guid isPermaLink="false">http://www.eventualo.net/blog/?p=400</guid>
		<description><![CDATA[[english version] Pubblico un plugin per WordPress che serve per generare file XLS (MS Excel / OpenOffice Calc) a partire dal database del blog. Per maggiori informazioni vi rimando alla pagina sul sito Worpress.org. Attenzione! A causa di  altri impegni non ci sarà ulteriore sviluppo del plugin. Caratteristiche può scegliere quale tabella esportare (articoli, utenti, [...]]]></description>
			<content:encoded><![CDATA[<p><a title="Alo EasyMail: plugin per WordPress per inviare e-mail" href="http://www.eventualo.net/blog/?p=400#english">[english version]</a></p>
<p>Pubblico un plugin per WordPress che serve per generare file XLS (MS Excel / OpenOffice Calc) a partire dal database del blog.<br />
<span id="more-400"></span>Per maggiori informazioni vi rimando alla pagina sul sito Worpress.org.</p>
<p><em><strong><span style="color: #ff0000;">Attenzione! A causa di  altri impegni non ci sarà ulteriore sviluppo del plugin.</span><br />
</strong></em></p>
<p><strong>Caratteristiche</strong></p>
<ul>
<li>può scegliere quale tabella esportare (articoli, utenti, link, commenti)</li>
<li>nel caso di articoli e utenti può esportare anche i relativi meta</li>
</ul>
<p><strong>Screenshot</strong></p>
<p>» <a title="vedi" href="http://wordpress.org/extend/plugins/alo-exportxls/screenshots/" target="_blank">Schermata dell’amministrazione di ExportXls</a></p>
<p><strong>Download</strong></p>
<p>» <a title="scarica" href="http://wordpress.org/extend/plugins/alo-exportxls/" target="_blank">Scarica Alo ExportXls</a> (dal sito WordPress.org)</p>
<p><a name="english">-</a></p>
<p><span style="color: #333399;"><strong> </strong></span></p>
<p>This plugin for WordPress lets you to generate XLS files (MS Excel / OpenOffice Calc) from WP database&#8217;s tables. For more info please visit its page on WordPress.org.</p>
<p><span style="color: #ff0000;"><em><strong>Warning! Due to more relevant commitments this plugin will not be further developed.</strong></em></span></p>
<p><strong>Features</strong></p>
<ul>
<li>you can select the table to export (users, posts, comments, links)</li>
<li>&#8216;posts&#8217; and &#8216;users&#8217; choises can include meta data too</li>
</ul>
<p><strong>Screenshot</strong></p>
<p>» <a title="vedi" href="http://wordpress.org/extend/plugins/alo-exportxls/screenshots/" target="_blank">View of ExportXls&#8217;s administration</a></p>
<p><strong>Download</strong></p>
<p>» <a title="scarica" href="http://wordpress.org/extend/plugins/alo-exportxls/" target="_blank">Download Alo ExportXls</a> (from WordPress.org)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.eventualo.net/blog/2009/10/alo-exportxls-plugin-per-wordpress-per-generare-file-xls-dal-db/feed/</wfw:commentRss>
		<slash:comments>23</slash:comments>
		</item>
		<item>
		<title>Alo EasyMail Newsletter: plugin per WordPress per inviare newsletter</title>
		<link>http://www.eventualo.net/blog/2009/09/alo-easymail-plugin-per-wordpress-per-inviare-e-mail/</link>
		<comments>http://www.eventualo.net/blog/2009/09/alo-easymail-plugin-per-wordpress-per-inviare-e-mail/#comments</comments>
		<pubDate>Tue, 29 Sep 2009 12:58:35 +0000</pubDate>
		<dc:creator>alo</dc:creator>
				<category><![CDATA[Alo EasyMail Newsletter]]></category>
		<category><![CDATA[easymail]]></category>
		<category><![CDATA[newsletter]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://www.eventualo.net/blog/?p=365</guid>
		<description><![CDATA[This is the old pugin post with all comments. Here you can find a new section.]]></description>
			<content:encoded><![CDATA[<h3 style="text-align: center;">This is the old pugin post with all comments.</h3>
<h4 style="text-align: center;"><a href="http://www.eventualo.net/blog/wp-alo-easymail-newsletter/">Here</a> you can find a new section.</h4>
]]></content:encoded>
			<wfw:commentRss>http://www.eventualo.net/blog/2009/09/alo-easymail-plugin-per-wordpress-per-inviare-e-mail/feed/</wfw:commentRss>
		<slash:comments>125</slash:comments>
		</item>
		<item>
		<title>Modifica al plugin Surveys</title>
		<link>http://www.eventualo.net/blog/2009/09/modifica-al-plugin-surveys/</link>
		<comments>http://www.eventualo.net/blog/2009/09/modifica-al-plugin-surveys/#comments</comments>
		<pubDate>Tue, 29 Sep 2009 09:26:41 +0000</pubDate>
		<dc:creator>alo</dc:creator>
				<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[surveys]]></category>

		<guid isPermaLink="false">http://www.eventualo.net/blog/?p=337</guid>
		<description><![CDATA[Ho utilizzato il plugin Surveys per WordPress (indirizzo: www.bin-co.com/tools/wordpress/plugins/surveys/): per gestire questionari e relativi risultati. Davvero utile e ben fatto. Però avevo la necessità di un pulsante &#8220;clona questionario&#8221; in modo da duplicare rapidamente un questionario (e le relative domande) senza dover reinserirle nuovamente. La mia esigenza nasceva da una serie di sondaggi per la [...]]]></description>
			<content:encoded><![CDATA[<p>Ho utilizzato il plugin <strong>Surveys</strong> per WordPress (indirizzo: <a title="vai al sito" href="http://www.bin-co.com/blog/2008/11/surveys-wordpress-plugin/" target="_blank">www.bin-co.com/tools/wordpress/plugins/surveys/</a>): per gestire questionari e relativi risultati. Davvero utile e ben fatto.</p>
<p>Però avevo la necessità di un pulsante &#8220;clona questionario&#8221; in modo da duplicare rapidamente un questionario (e le relative domande) senza dover reinserirle nuovamente. La mia esigenza nasceva da una serie di sondaggi per la <em>customer satisfaction</em> tutti uguali.</p>
<p><span id="more-337"></span></p>
<p>Ecco il codice da aggiungere in due files. Sto utilizzando la versione 1.01.2, ma forse può andare anche per l&#8217;ultima versione (attualmente la 1.01.3).</p>
<p>In <strong>survey.php</strong>:</p>
<p>- prima della linea 9 (prima di: &#8220;if($_REQUEST['action'] == &#8216;delete&#8217;)&#8221;) aggiunto un messaggio di feedback:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>8
9
10
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_REQUEST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'message'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">==</span> <span style="color: #0000ff;">'cloned'</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	<span style="color: #b1b100;">print</span> <span style="color: #0000ff;">'&lt;div id=&quot;message&quot; class=&quot;updated fade&quot;&gt;&lt;p&gt;'</span> <span style="color: #339933;">.</span> t<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Survey cloned (ID &lt;strong&gt;'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span> <span style="color: #000088;">$_REQUEST</span><span style="color: #009900;">&#91;</span>survey<span style="color: #009900;">&#93;</span> <span style="color: #339933;">.</span> t<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'&lt;/strong&gt;). Maybe you have to rename it (action &lt;strong&gt;Edit&lt;/strong&gt;).'</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">.</span><span style="color: #0000ff;">'&lt;/p&gt;&lt;/div&gt;'</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p>- alla linea 37 modificato il <em>colspan</em> della cella (da 3 a 4):</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>37
</pre></td><td class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">th</span> <span style="color: #000066;">scope</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;col&quot;</span> <span style="color: #000066;">colspan</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;4&quot;</span>&gt;&lt;?php e<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'Action'</span><span style="color: #66cc66;">&#41;</span> ?&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">th</span>&gt;</span></pre></td></tr></table></div>

<p>- dopo la linea 63 (dopo il pulsante elimina) aggiunta una cella con il nuovo pulsante Clona:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>64
65
66
67
68
69
70
71
72
73
</pre></td><td class="code"><pre class="html4strict" style="font-family:monospace;">	<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">td</span>&gt;</span>
         <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">form</span> <span style="color: #000066;">action</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;&lt;?php echo $wpframe_plugin_folder?&gt;</span></span>/survey_action.php&quot; method=&quot;post&quot; style=&quot;display: inline;&quot;&gt;
            <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">span</span> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;submit&quot;</span>&gt;</span>
            <span style="color: #009900;">&lt;?php wp_nonce_field<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'surveys_create_edit_survey'</span><span style="color: #66cc66;">&#41;</span>; ?&gt;</span>
            <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">input</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;survey&quot;</span> <span style="color: #000066;">name</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;survey&quot;</span> <span style="color: #000066;">value</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;&lt;?php echo $survey-&gt;</span></span>ID?&gt;&quot; type=&quot;hidden&quot;&gt;
            <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">input</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;survey&quot;</span> <span style="color: #000066;">name</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;action&quot;</span> <span style="color: #000066;">value</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;clone&quot;</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;hidden&quot;</span>&gt;</span>
            <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">input</span> <span style="color: #000066;">name</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;submit&quot;</span> <span style="color: #000066;">value</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;Clone&quot;</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;submit&quot;</span>&gt;</span>
            <span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">span</span>&gt;</span>
            <span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">form</span>&gt;</span>
        <span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">td</span>&gt;</span></pre></td></tr></table></div>

<p>In <strong>survey_action.php</strong>:</p>
<p>- prima della linea 14 (prima di <em>else</em>) aggiunto un <em>else if</em> con il caso <em>clona</em>:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
</pre></td><td class="code"><pre class="php" style="font-family:monospace;">	<span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$_REQUEST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'action'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">==</span> <span style="color: #0000ff;">'clone'</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	    <span style="color: #666666; font-style: italic;">// original survey</span>
        <span style="color: #000088;">$template_id_survey</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$_REQUEST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'survey'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
&nbsp;
        <span style="color: #666666; font-style: italic;">// Cloning survey</span>
        <span style="color: #000088;">$wpdb</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">query</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$wpdb</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">prepare</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;INSERT INTO <span style="color: #006699; font-weight: bold;">{$wpdb-&gt;prefix}</span>surveys_survey (name, description, final_screen, status, added_on, type, max_attempts, min_rate)
        SELECT CONCAT('COPIA DI ', name, ' &quot;</span><span style="color: #339933;">.</span> <span style="color: #990000;">date</span><span style="color: #009900;">&#40;</span>His<span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;'), description, final_screen, status, NOW(), type, max_attempts, min_rate FROM <span style="color: #006699; font-weight: bold;">{$wpdb-&gt;prefix}</span>surveys_survey WHERE ID = <span style="color: #009933; font-weight: bold;">%d</span>&quot;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$template_id_survey</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #000088;">$clone_id_survey</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$wpdb</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">insert_id</span><span style="color: #339933;">;</span>
&nbsp;
        <span style="color: #666666; font-style: italic;">// Cloning questions</span>
        <span style="color: #000088;">$template_questions</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$wpdb</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">get_results</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$wpdb</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">prepare</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;SELECT ID FROM <span style="color: #006699; font-weight: bold;">{$wpdb-&gt;prefix}</span>surveys_question WHERE survey_id=<span style="color: #009933; font-weight: bold;">%d</span> ORDER BY ID ASC&quot;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$template_id_survey</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
        <span style="color: #b1b100;">foreach</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$template_questions</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$template_quest</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
            <span style="color: #000088;">$wpdb</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">query</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$wpdb</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">prepare</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;INSERT INTO <span style="color: #006699; font-weight: bold;">{$wpdb-&gt;prefix}</span>surveys_question (survey_ID, question, allow_user_answer, allow_multiple_answers)
        SELECT <span style="color: #006699; font-weight: bold;">$clone_id_survey</span>, question, allow_user_answer, allow_multiple_answers FROM <span style="color: #006699; font-weight: bold;">{$wpdb-&gt;prefix}</span>surveys_question WHERE ID = <span style="color: #009933; font-weight: bold;">%d</span>&quot;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$template_quest</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">ID</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            <span style="color: #000088;">$justclone_id_quest</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$wpdb</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">insert_id</span><span style="color: #339933;">;</span>
&nbsp;
            <span style="color: #666666; font-style: italic;">// Cloning answers</span>
            <span style="color: #000088;">$template_answers</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$wpdb</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">get_results</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$wpdb</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">prepare</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;SELECT ID FROM <span style="color: #006699; font-weight: bold;">{$wpdb-&gt;prefix}</span>surveys_answer WHERE question_ID =<span style="color: #009933; font-weight: bold;">%d</span> ORDER BY ID ASC&quot;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$template_quest</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">ID</span> <span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            <span style="color: #b1b100;">foreach</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$template_answers</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$template_answer</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
                <span style="color: #000088;">$wpdb</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">query</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$wpdb</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">prepare</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;INSERT INTO <span style="color: #006699; font-weight: bold;">{$wpdb-&gt;prefix}</span>surveys_answer (question_ID, answer, correct, sort_order)
        SELECT <span style="color: #009933; font-weight: bold;">%d</span>, answer, correct, sort_order FROM <span style="color: #006699; font-weight: bold;">{$wpdb-&gt;prefix}</span>surveys_answer WHERE ID = <span style="color: #009933; font-weight: bold;">%d</span>&quot;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$justclone_id_quest</span><span style="color: #339933;">,</span> <span style="color: #000088;">$template_answer</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">ID</span> <span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            <span style="color: #009900;">&#125;</span>
        <span style="color: #009900;">&#125;</span>
&nbsp;
        wp_redirect<span style="color: #009900;">&#40;</span><span style="color: #000088;">$wpframe_wordpress</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">'/wp-admin/edit.php?page=surveys/survey.php&amp;message=cloned&amp;survey='</span><span style="color: #339933;">.</span><span style="color: #000088;">$clone_id_survey</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>quindi l&#8217;enunciato verrebbe:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">isset</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_REQUEST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'submit'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_REQUEST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'action'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">==</span> <span style="color: #0000ff;">'edit'</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	    <span style="color: #666666; font-style: italic;">// ... original code ...</span>
	<span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$_REQUEST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'action'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">==</span> <span style="color: #0000ff;">'clone'</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	    <span style="color: #666666; font-style: italic;">// ... ADDED CODE</span>
	<span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #009900;">&#123;</span>
	    <span style="color: #666666; font-style: italic;">// ... original code ...</span>
	<span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>Ora nella pagina con l&#8217;elenco dei questionari è comparso un pulsante <strong>Clone</strong> che duplica il questionario selezionato e le relative domande e opzioni di risposta.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.eventualo.net/blog/2009/09/modifica-al-plugin-surveys/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

