<?xml version='1.0' encoding='UTF-8'?>
<rss version='2.0'>
	<channel>
		<title>cotonti.com : cot_extrafield_add radio</title>
		<link>https://www.cotonti.com</link>
		<description>Last topic posts</description>
		<generator>Cotonti</generator>
		<language>en</language>
		<pubDate>Sat, 11 Apr 2026 04:47:30 -0000</pubDate>

		<item>
			<title>esclkm</title>
			<description><![CDATA[<p>
	/**<br />
	 * Add extra field for pages<br />
	 *<br />
	 * @param string $location Table for adding extrafield<br />
	 * @param string $name Field name (unique)<br />
	 * @param string $type Field type (input, textarea etc)<br />
	 * @param string $html HTML Resource string<br />
	 * @param string $variants Variants of values (for radiobuttons, selectors etc)<br />
	 * @param string $default Default value<br />
	 * @param bool $required Required field<br />
	 * @param string $parse Parsing Type (HTML, BBCodes)<br />
	 * @param string $description Description of field (optional, for admin)<br />
	 * @param string $params Params (for radiobuttons, selectors etc)<br />
	 * @param string $enabled Enable field<br />
	 * @param bool $noalter Do not ALTER the table, just register the extra field<br />
	 * @param string $customtype Modify sql type, size, default<br />
	 * @return bool<br />
	 *<br />
	 * @global CotDB $db<br />
	 */<br />
	function cot_extrafield_add($location, $name, $type, $html='', $variants='', $default='', $required=false, $parse='HTML', $description='', $params = '', $enabled = 1, $noalter = false, $customtype = '')<br />
	 </p>
<p>
	See please extrafields api.</p>
<p>
	Also for params you can use langfiles</p>
<p>
	$L['subs_1'];</p>
]]></description>
			<pubDate>Fri, 28 Dec 2012 07:04:27 -0000</pubDate>
			<link><![CDATA[https://www.cotonti.com/forums?m=posts&q=7280&d=0#post36634]]></link>
		</item>
		<item>
			<title>Twiebie</title>
			<description><![CDATA[<p>
	I'm trying to add an extrafield for a radio button with option 0 and 1. However I want the options named No, Yes, but 0,1 in the DB respectively.</p>
<p>
	I gave it a go with the following code, but I think I've missed something:</p>
<pre class="brush:php;">
if ($db-&gt;query("SHOW COLUMNS FROM `$db_users` WHERE `Field` = 'user_subs'")-&gt;rowCount() == 0)
{
    cot_extrafield_add($db_users, 'subs', 'radio', '&lt;label&gt;&lt;input type="radio" name="{$name}" value="{$value}"{$checked} /&gt; {$title}&lt;/label&gt;', '0,1', '0',
        false, '', 'Subscribe', 'No,Yes');
}</pre>
<p>
	It adds the extrafield without problems, but the values are not correct.</p>
]]></description>
			<pubDate>Thu, 27 Dec 2012 19:30:49 -0000</pubDate>
			<link><![CDATA[https://www.cotonti.com/forums?m=posts&q=7280&d=0#post36632]]></link>
		</item>
	</channel>
</rss>