<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<atom:link href="http://fbb.just4test.de/extern.php?action=feed&amp;tid=3781&amp;type=rss" rel="self" type="application/rss+xml" />
		<title><![CDATA[Informationen für CMS/made simple / Dropdown Extrafeld in CGBlog]]></title>
		<link>http://www.cmsmadesimple.de/forum/viewtopic.php?id=3781</link>
		<description><![CDATA[Die aktuellsten Beiträge in Dropdown Extrafeld in CGBlog.]]></description>
		<lastBuildDate>Wed, 05 Mar 2014 14:59:33 +0000</lastBuildDate>
		<generator>FluxBB</generator>
		<item>
			<title><![CDATA[Re: Dropdown Extrafeld in CGBlog]]></title>
			<link>http://www.cmsmadesimple.de/forum/viewtopic.php?pid=30003#p30003</link>
			<description><![CDATA[<p>Wenn das Dropdown fix ist, kannst du das wie folgt machen:</p><p>Erstelle im Ordner &quot;module_custom/News/templates&quot; die Datei editarticle.tpl (kopiere das Original)</p><p>Am Ort deines Dropdown fügst du folgendes ein:</p><div class="codebox"><pre><code>{btReplaceAsDropdown field=$field-&gt;field dropdown=&quot;wert:Auswahltext,wert2:Auswahltext2&quot;}</code></pre></div><p>Erstelle ein Plugin mit dem Namen &quot;function.btReplaceAsDropdown.php&quot; und folgendem Inhalt und lade dies in den ./plugins Ordner</p><div class="codebox"><pre class="vscroll"><code>&lt;?php
#CMS - CMS Made Simple
#(c)2004 by Ted Kulp (wishy@users.sf.net)
#This project&#039;s homepage is: http://www.cmsmadesimple.org
#
#This program is free software; you can redistribute it and/or modify
#it under the terms of the GNU General Public License as published by
#the Free Software Foundation; either version 2 of the License, or
#(at your option) any later version.
#
#This program is distributed in the hope that it will be useful,
#but WITHOUT ANY WARRANTY; without even the implied warranty of
#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#GNU General Public License for more details.
#You should have received a copy of the GNU General Public License
#along with this program; if not, write to the Free Software
#Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA

function smarty_function_btReplaceAsDropdown($params, &amp;$template)
{
  $smarty = $template-&gt;smarty;
	$gCms = cmsms();
	global $id;
	
	$data = array();
	foreach (explode(&quot;,&quot;, $params[&quot;dropdown&quot;]) as $cLine) {
	    list ($cKey, $cValue) = explode(&#039;:&#039;, $cLine, 2);
	    $data[$cKey] = $cValue;
	}
	
  preg_match_all(&#039;/\s+([^=]+)=&quot;([^&quot;]*)&quot;/&#039;, $params[&#039;field&#039;], $matches);
  if ($matches) {
    foreach ($matches[1] as $key =&gt; $value) {
      $field_params[$value] = $matches[2][$key];
    }
    if ($field_params) {
			$text = &#039;&lt;select class=&quot;cms_dropdown&quot; name=&quot;&#039;.$field_params[&#039;name&#039;].&#039;&quot;&#039;;
			$text .= &#039;&gt;&#039;;
			$count = 0;
			if (is_array($data) &amp;&amp; count($data) &gt; 0)
			{
				foreach ($data as $key=&gt;$value)
				{
				  //		  $value = cms_htmlentities($value);
				$text .= &#039;&lt;option value=&quot;&#039;.$key.&#039;&quot;&#039;;
					if ($field_params[&#039;value&#039;] == $key)
					{
						$text .= &#039; &#039; . &#039;selected=&quot;selected&quot;&#039;;
					}
					$text .= &#039;&gt;&#039;;
					$text .= $value;
					$text .= &#039;&lt;/option&gt;&#039;;
					$count++;
				}
			}
			$text .= &#039;&lt;/select&gt;&#039;.&quot;\n&quot;;
    }
	}
	
	echo $text;	
	
}

?&gt;</code></pre></div>]]></description>
			<author><![CDATA[dummy@example.com (nockenfell)]]></author>
			<pubDate>Wed, 05 Mar 2014 14:59:33 +0000</pubDate>
			<guid>http://www.cmsmadesimple.de/forum/viewtopic.php?pid=30003#p30003</guid>
		</item>
		<item>
			<title><![CDATA[Re: Dropdown Extrafeld in CGBlog]]></title>
			<link>http://www.cmsmadesimple.de/forum/viewtopic.php?pid=30002#p30002</link>
			<description><![CDATA[<p>An welcher/en Datei/en müsste man schrauben?<br />Ich könnte ziemlich statisch bleiben, da ich nur ein einziges Dropdown-Auswahlfeld brauche und die Werte alle feststehen. Es muss auch niemand welche hinzufügen. Ganz naiv gedacht könnte doch in die editarticle.tpl ein halbwegs statisches Dropdownfeld rein. Allerdings muss ja der je ausgewählte Wert auch verarbeitet werden. Da steh ich dann mal wieder auf dem Schlauch...</p>]]></description>
			<author><![CDATA[dummy@example.com (COR9)]]></author>
			<pubDate>Wed, 05 Mar 2014 14:52:36 +0000</pubDate>
			<guid>http://www.cmsmadesimple.de/forum/viewtopic.php?pid=30002#p30002</guid>
		</item>
		<item>
			<title><![CDATA[Re: Dropdown Extrafeld in CGBlog]]></title>
			<link>http://www.cmsmadesimple.de/forum/viewtopic.php?pid=29961#p29961</link>
			<description><![CDATA[<p>CGBlog hat aktuell leider tatsächlich noch kein Dropdown-Feld.<br />Das kam beim News-Modul auch erst später hinzu.<br />CGBlog ist da ungefähr auf dem Stand von News 2.6.</p>]]></description>
			<author><![CDATA[dummy@example.com (NaN)]]></author>
			<pubDate>Tue, 04 Mar 2014 07:52:31 +0000</pubDate>
			<guid>http://www.cmsmadesimple.de/forum/viewtopic.php?pid=29961#p29961</guid>
		</item>
		<item>
			<title><![CDATA[Dropdown Extrafeld in CGBlog]]></title>
			<link>http://www.cmsmadesimple.de/forum/viewtopic.php?pid=29960#p29960</link>
			<description><![CDATA[<p>Im Newsmodul gibt es die Möglichkeit, ein Extrafeld als Dropdown-Auswahl fester Begriffe anzulegen. In CGBlog finde ich die Möglichkeit nicht. Wo muss ich schrauben, um die Funktion auch in CGBlog zu bekommen?<br />Müsste doch irgendwie gehen, da das eine Modul aus dem anderen hervorgegangen ist.<br />Eine statische Auswahl sollte vollkommen genügen, Mehrfachauswahl brauche ich auch nicht.</p><p>Ich habe jeweils die aktuellen Versionen von Core und Modulen installiert.</p>]]></description>
			<author><![CDATA[dummy@example.com (COR9)]]></author>
			<pubDate>Mon, 03 Mar 2014 21:22:04 +0000</pubDate>
			<guid>http://www.cmsmadesimple.de/forum/viewtopic.php?pid=29960#p29960</guid>
		</item>
	</channel>
</rss>
