<?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=3552&amp;type=rss" rel="self" type="application/rss+xml" />
		<title><![CDATA[Informationen für CMS/made simple / [GELÖST] section image]]></title>
		<link>http://www.cmsmadesimple.de/forum/viewtopic.php?id=3552</link>
		<description><![CDATA[Die aktuellsten Beiträge in [GELÖST] section image.]]></description>
		<lastBuildDate>Mon, 04 Nov 2013 09:18:17 +0000</lastBuildDate>
		<generator>FluxBB</generator>
		<item>
			<title><![CDATA[Re: [GELÖST] section image]]></title>
			<link>http://www.cmsmadesimple.de/forum/viewtopic.php?pid=28403#p28403</link>
			<description><![CDATA[<div class="quotebox"><cite>rednose schrieb:</cite><blockquote><div><p>Habe es sogar etwas anpassen können, so dass ich ein Bild ausgebe, statt ein background.</p></div></blockquote></div><p>url=true hätte auch gereicht ...</p><p>BTW, sehe grade dass das ne quick&amp;dirty Version ist ... mit kleinen Änderungen kann man ja ein beliebiges Element angeben, dessen Hintergrund dann ausgetauscht wird ... zb. h2 etc. etc.</p><p>Servus,<br />Alex</p>]]></description>
			<author><![CDATA[dummy@example.com (faglork)]]></author>
			<pubDate>Mon, 04 Nov 2013 09:18:17 +0000</pubDate>
			<guid>http://www.cmsmadesimple.de/forum/viewtopic.php?pid=28403#p28403</guid>
		</item>
		<item>
			<title><![CDATA[Re: [GELÖST] section image]]></title>
			<link>http://www.cmsmadesimple.de/forum/viewtopic.php?pid=28401#p28401</link>
			<description><![CDATA[<p>Vielen Dank Alex, dass ich deine Code haben durfte. Es funktioniert wunderbar.<br />Vor allem mit viele Unterseiten, ist das wirklich ein praktisches plugin.</p><p>Habe es sogar etwas anpassen können, so dass ich ein Bild ausgebe, statt ein background.</p><p>Tolle Wochenstart&#160; &#160;<img src="http://www.cmsmadesimple.de/forum/plugins/ezbbc/style/smilies/smile.png" alt="smile" /></p><p>Grüesli<br />Gabrielle</p>]]></description>
			<author><![CDATA[dummy@example.com (rednose)]]></author>
			<pubDate>Mon, 04 Nov 2013 08:26:39 +0000</pubDate>
			<guid>http://www.cmsmadesimple.de/forum/viewtopic.php?pid=28401#p28401</guid>
		</item>
		<item>
			<title><![CDATA[Re: [GELÖST] section image]]></title>
			<link>http://www.cmsmadesimple.de/forum/viewtopic.php?pid=28400#p28400</link>
			<description><![CDATA[<p>Moinsen,</p><p>meine Kunden haben das irgendwie nicht verstanden und deswegen habe ich das so gelöst. <img src="http://www.cmsmadesimple.de/forum/plugins/ezbbc/style/smilies/wink.png" alt="wink" /></p>]]></description>
			<author><![CDATA[dummy@example.com (RafaelCzernek)]]></author>
			<pubDate>Mon, 04 Nov 2013 07:46:16 +0000</pubDate>
			<guid>http://www.cmsmadesimple.de/forum/viewtopic.php?pid=28400#p28400</guid>
		</item>
		<item>
			<title><![CDATA[Re: [GELÖST] section image]]></title>
			<link>http://www.cmsmadesimple.de/forum/viewtopic.php?pid=28367#p28367</link>
			<description><![CDATA[<div class="quotebox"><cite>RafaelCzernek schrieb:</cite><blockquote><div><p>Mal eine andere Idee!? Das ist doch viel zu kompliziert für den Kunden.</p></div></blockquote></div><p>Na, wieviel einfacher solls denn noch werden? Er braucht doch nur ein Bild mit dem Alias der Seite als Dateinamen in ein Verzeichnis hochladen. Und ein default Bild gibts auch.</p><p>Das haben bei mir bisher *alle* Kunden kapiert, ohne Ausnahme ...</p><p>Servus,<br />Alex</p>]]></description>
			<author><![CDATA[dummy@example.com (faglork)]]></author>
			<pubDate>Thu, 31 Oct 2013 20:35:19 +0000</pubDate>
			<guid>http://www.cmsmadesimple.de/forum/viewtopic.php?pid=28367#p28367</guid>
		</item>
		<item>
			<title><![CDATA[Re: [GELÖST] section image]]></title>
			<link>http://www.cmsmadesimple.de/forum/viewtopic.php?pid=28366#p28366</link>
			<description><![CDATA[<p>Moinsen!</p><p>Hab grad leider keine Zeit deinen Code zu analysieren, aber ich kann dir meinen geben, der funzt mit 1.11.9:</p><div class="codebox"><pre class="vscroll"><code>[== php ==]
function smarty_cms_function_sectionimage2($params, &amp;$smarty)
{
global $gCms;
$depth = isset($params[&quot;depth&quot;]) ? $params[&quot;depth&quot;] : 3 ;
$url = isset($params[&quot;url&quot;]) ? $params[&quot;url&quot;] : false ;
$divid = isset($params[&quot;divid&quot;]) ? $params[&quot;divid&quot;] : &#039;header&#039; ;
$dir = isset($params[&quot;dir&quot;]) ? $params[&quot;dir&quot;] : &#039;/uploads/images/design/bg/&#039; ;
$filename = $dir.&#039;default.jpg&#039;;
$servpath = $gCms-&gt;config[&#039;root_path&#039;];
$classes = array();
$manager =&amp; cmsms()-&gt;GetHierarchyManager();
$thisPage = cmsms()-&gt;variables[&#039;content_id&#039;];
$currentNode = &amp;$manager-&gt;sureGetNodeById($thisPage);
while( isset($currentNode) &amp;&amp; $currentNode-&gt;getLevel() &gt;= 0 )
  {
    $currentContent =&amp; $currentNode-&gt;getContent();
    array_unshift($classes, $currentContent-&gt;Alias());
    $currentNode =&amp; $currentNode-&gt;getParentNode();
  }
for ($i = $depth; $i &gt;= 0; $i--) {
if ($classes[$i]){
   if (file_exists($servpath.$dir.$classes[$i].&#039;.jpg&#039;)) {
        $filename = $dir.$classes[$i].&#039;.jpg&#039;;
   break;
   }
 }
}
if (!$url) {
echo &quot;&lt;style type=&#039;text/css&#039;&gt;div#$divid {background-image: url($filename);}&lt;/style&gt;&quot;;
}
else
 {
 	echo $filename;
 	}
}</code></pre></div><p>Ich hab das etwas umgebaut - gibt auf wunsch das .jpg aus, ansonsten einen style den man per parameter an ein div binden kann.<br />_______________________________________<br />What does this plugin do?</p><p>It lets you change background images per page/level.<br />How do you use it?</p><p>Put following code into a template/gcb/page: {sectionimage2}<br />Optional Parameters</p><p>&#160; &#160; (otional) dir - This is the directory where the images are located. default is /uploads/images/design/bg/<br />&#160; &#160; (optional) depth - how many levels should be included. default is 3<br />&#160; &#160; (optional) url - output only the image URL<br />&#160; &#160; (optional) divid - the div ID where to change the background. default is &quot;header&quot;<br />___________________________________________________________</p><p>Aber das sollte für deine Fehlersuche unerheblich sein ...</p><p>hth,<br />Alex</p>]]></description>
			<author><![CDATA[dummy@example.com (faglork)]]></author>
			<pubDate>Thu, 31 Oct 2013 20:24:38 +0000</pubDate>
			<guid>http://www.cmsmadesimple.de/forum/viewtopic.php?pid=28366#p28366</guid>
		</item>
		<item>
			<title><![CDATA[Re: [GELÖST] section image]]></title>
			<link>http://www.cmsmadesimple.de/forum/viewtopic.php?pid=28362#p28362</link>
			<description><![CDATA[<p>Leider habe ich gerade keine Zeit eine schlaue Demo zu machen. Mit GBFilepicker und ToolBox müsste sich sowas sehr gut umsetzen lassen. So kann auch das Bild einfach gewählt werden.</p>]]></description>
			<author><![CDATA[dummy@example.com (nockenfell)]]></author>
			<pubDate>Thu, 31 Oct 2013 13:23:48 +0000</pubDate>
			<guid>http://www.cmsmadesimple.de/forum/viewtopic.php?pid=28362#p28362</guid>
		</item>
		<item>
			<title><![CDATA[Re: [GELÖST] section image]]></title>
			<link>http://www.cmsmadesimple.de/forum/viewtopic.php?pid=28360#p28360</link>
			<description><![CDATA[<p>ich habe mich leider nicht genug klar ausgedruckt. Es geht nicht um ein Bild im menu selber. Aber alle siblings sollen das gleiche headerbild haben wie der parent.</p><p>Nun finde ich aber der Ansazt mit der smarty und toolbox sehr sympatisch und habe schon angefangen damit weiter zu arbeiten.</p><p>ich hadere allerdings noch ein wenig mit der Syntax:</p><br /><p> {content_image block=&quot;menu-parent&quot; label=&quot;Bild Menü Aktiv&quot; dir=&#039;images/layout&#039; assign=&quot;bild&quot;}<br />{$bild} <br />{tbtools::getParentAlias(&quot;&quot;,&quot;getParent&quot;)}<br />{if !empty($getParent)}{tbtools::getPageContent(&#039;{$getParent}&#039;,&#039;menu-parent&#039;,&#039;bild2&#039;)}{$bild2}{/if}</p><p>teil 1 ist ja io, der parent zeigt ein Bild<br />Teil 2, wäre mein Idee, wenn ich ein Parent habe, dann hole mir der inhalt von block menu-parent.<br />Meine Syntax funktioniert noch nicht, ich vermute es hat mir der $alias zu tun {$getParent}?</p>]]></description>
			<author><![CDATA[dummy@example.com (rednose)]]></author>
			<pubDate>Thu, 31 Oct 2013 13:05:41 +0000</pubDate>
			<guid>http://www.cmsmadesimple.de/forum/viewtopic.php?pid=28360#p28360</guid>
		</item>
		<item>
			<title><![CDATA[Re: [GELÖST] section image]]></title>
			<link>http://www.cmsmadesimple.de/forum/viewtopic.php?pid=28359#p28359</link>
			<description><![CDATA[<p>Mal eine andere Idee!? Das ist doch viel zu kompliziert für den Kunden.</p><p>So wie ich das verstehe, willst du im Menü, sofern diese &quot;parent&quot; ist ein Bild ausgeben, richtig? Dazu habe ich folgenden Ansatz für dich. Erstell doch einfach in deinem Template einen neuen Inhalts-Block: {content_image block=&quot;menu-parent&quot; label=&quot;Menü Aktiv&quot; urlonly=&quot;true&quot; [...]}. Wenn du das dann noch mit dem Modul GBFilePicker machst, ist das noch einfacher für den Kunden mit dem hochladen.</p><p>Dann holst du dir noch das Modul ToolBox und gibst folgendes in deinem Menü-Template ein z. B.:</p><p>[...]<br />{elseif $node-&gt;children_exist == true and $node-&gt;depth &lt; $number_of_levels and $node-&gt;type != &#039;sectionheader&#039; and $node-&gt;type != &#039;separator&#039;}</p><p>&lt;li class=&quot;parent&quot;&gt;</p><p>&lt;a class=&quot;parent&quot; href=&quot;{$node-&gt;url}&quot;&gt;<br />&lt;img src=&quot;{tbtools::getPageContent(&#039;{$node-&gt;alias}&#039;,&#039;menu-parent&#039;,&#039;bild&#039;)}{eval var=$bild}&quot; /&gt;<br />{$node-&gt;menutext}</p><p>&lt;/a&gt;<br />[...]</p><p>Ich hoffe das ist soweit verständlich, ansonsten Helfe ich dir gerne innerhalb deines System.</p><p>Gruß Rafi</p>]]></description>
			<author><![CDATA[dummy@example.com (RafaelCzernek)]]></author>
			<pubDate>Thu, 31 Oct 2013 11:36:02 +0000</pubDate>
			<guid>http://www.cmsmadesimple.de/forum/viewtopic.php?pid=28359#p28359</guid>
		</item>
		<item>
			<title><![CDATA[[GELÖST] section image]]></title>
			<link>http://www.cmsmadesimple.de/forum/viewtopic.php?pid=28356#p28356</link>
			<description><![CDATA[<p>ich brauche für eine Seite bei jeder Parent im menu ein eigenes Bild, welche die zugehörige Unterseiten dann auch automatisch haben.<br />Ich weiss, ich kann dass auch in ein global block erreichen mit eine if abfrage. ( wäre mein notfall lösung)<br />Einfacher für der Kunde wäre allerdings das gebrauch vom plugin sectionimage, wo mann nur ein Bild in ein Verzeichnis muss hochladen, mit der gleiche Name als der alias vom Parent.</p><p>Nun bekomme ich das plugin aber leider nicht ganz zum laufen. Es steht allerdings bei der letzte Version, es war für 1.10.x optimiert und ich habe 1.11.9</p><p>hier folgt erst mal der code vom plugin</p><div class="codebox"><pre class="vscroll"><code>function smarty_cms_function_sectionimage($params, &amp;$smarty)
{
	$db = cmsms()-&gt;GetDb();
	
	$levels = 			isset($params[&quot;levels&quot;]) ? $params[&quot;levels&quot;] : 1 ;
	$imgpath = 			isset($params[&quot;image_path&quot;]) ? $params[&quot;image_path&quot;] : &#039;/uploads/images&#039; ;
	$extension = 		isset($params[&quot;extension&quot;]) ? $params[&quot;extension&quot;] : &#039;jpg&#039; ;
	$byname = 			isset($params[&quot;byname&quot;]) ? $params[&quot;byname&quot;] : 1 ;
	$lowercase = 		isset($params[&quot;lowercase&quot;]) ? $params[&quot;lowercase&quot;] : 1 ;
	$getdim = 			isset($params[&quot;get_dimensions&quot;]) ? $params[&quot;get_dimensions&quot;] : 0 ;
	$default_image = 	isset($params[&quot;default_image&quot;]) ? $params[&quot;default_image&quot;] : &#039;&#039; ;
	$url_only = 		isset($params[&quot;url_only&quot;]) ? true : false ;
			
	// figure out the details of the current page and where it fits in
	// the content hierarchy
	$curHierarchy = cmsms()-&gt;variables[&#039;pageinfo&#039;]-&gt;content_hierarchy.&#039;.&#039;;
	$theLevels = explode (&quot;.&quot;,$curHierarchy);
	$imSpec = $imgpath . &quot;/&quot;;
	$depth = substr_count($curHierarchy,&#039;.&#039;);

	if ($levels &lt; $depth) {
	
		$depth = $levels;
	}
	
	if ($byname) {
	
		$hierCode = &quot;&quot;;
		for ($j=0;$j&lt;$depth;$j++) {
		
			$hierCode .= substr(&quot;00000&quot;,0,5-strlen($theLevels[$j])) . $theLevels[$j] . &quot;.&quot;;
		}
		
		$hierCode = rtrim($hierCode,&quot;.&quot;);
		
		$query = &quot;SELECT content_alias, content_name FROM &quot; . cms_db_prefix(). &quot;content WHERE hierarchy=?&quot;;
		$row = $db-&gt;GetRow($query, array($hierCode));
		
		if ($row) {
		
			if ($lowercase) {
			
				$imSpec .= strtolower($row[&quot;content_alias&quot;]). &quot;.&quot;;
			} else {
			
				$imSpec .= $row[&quot;content_alias&quot;]. &quot;.&quot;;
				$imText = $row[&quot;content_name&quot;];
			}
		}
		
	} else {
	
		for ($j=0;$j&lt;$depth;$j++) {
		
			$imSpec .= $theLevels[$j] . &quot;.&quot;;
		}
	}
	
	if(!file_exists($imSpec.$extension)) {
		
		$default_image = explode(&#039;.&#039;,$default_image);
		$imSpec = $imgpath . &quot;/&quot; . $default_image[0] . &quot;.&quot;;
	}

		
	if($getdim) {
	
		list($imWidth,$imHeight) = getimagesize($imSpec.$extension);
		$imDimensions = &quot; width=\&quot;$imWidth\&quot; height=\&quot;$imHeight\&quot;&quot;;
	}

	if($url_only) {
	
		return $imSpec.$extension;
	}
		
    return &quot;&lt;img src=\&quot;${imSpec}${extension}\&quot; alt=\&quot;${imText}\&quot; title=\&quot;${imText}\&quot;${imDimensions} /&gt;&quot;;
}</code></pre></div><p>Im Template: {sectionimage default_image=&quot;header.jpg&quot; image_path=&quot;/uploads/images/layout&quot;} <br />Mein default image stellt er da, aber ein image im gleichen Verzeichnis mit genau der name als ein alias funktioniert nicht.</p><br /><p>Meine leise Hoffung ist, dass einer vielleicht auf Anhieb sieht, wieso der Code hieroben vielleicht nicht mehr ganz wirkt.</p><p>es liabes gruesli aus der schweiz</p>]]></description>
			<author><![CDATA[dummy@example.com (rednose)]]></author>
			<pubDate>Thu, 31 Oct 2013 10:50:41 +0000</pubDate>
			<guid>http://www.cmsmadesimple.de/forum/viewtopic.php?pid=28356#p28356</guid>
		</item>
	</channel>
</rss>
