https://de.contaowiki.org/index.php?title=Button_Regeln&feed=atom&action=history
Button Regeln - Versionsgeschichte
2024-03-29T12:44:54Z
Versionsgeschichte dieser Seite in Contao Community Documentation
MediaWiki 1.22.6
https://de.contaowiki.org/index.php?title=Button_Regeln&diff=5744&oldid=prev
Netzmacht: /* Beispiele */
2012-12-20T14:26:47Z
<p><span dir="auto"><span class="autocomment">Beispiele</span></span></p>
<table class='diff diff-contentalign-left'>
<col class='diff-marker' />
<col class='diff-content' />
<col class='diff-marker' />
<col class='diff-content' />
<tr style='vertical-align: top;'>
<td colspan='2' style="background-color: white; color:black; text-align: center;">← Nächstältere Version</td>
<td colspan='2' style="background-color: white; color:black; text-align: center;">Version vom 20. Dezember 2012, 14:26 Uhr</td>
</tr><tr><td colspan="2" class="diff-lineno">Zeile 48:</td>
<td colspan="2" class="diff-lineno">Zeile 48:</td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>protected function buttonRuleNotOnSunday(&$strButton, &$strHref, &$strLabel, &$strTitle, &$strIcon, &$strAttributes, &$arrAttributes, $arrRow=null)</div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>protected function buttonRuleNotOnSunday(&$strButton, &$strHref, &$strLabel, &$strTitle, &$strIcon, &$strAttributes, &$arrAttributes, $arrRow=null)</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>{</div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>{</div></td></tr>
<tr><td class='diff-marker'>−</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>     return (date('N') <del class="diffchange diffchange-inline">=</del>= 7);</div></td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>     return (date('N') <ins class="diffchange diffchange-inline">!</ins>= 7);</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>}</div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>}</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"></td></tr>
<!-- diff cache key kunde29sql1:diff:version:1.11a:oldid:5742:newid:5744 -->
</table>
Netzmacht
https://de.contaowiki.org/index.php?title=Button_Regeln&diff=5742&oldid=prev
Netzmacht am 20. Dezember 2012 um 14:23 Uhr
2012-12-20T14:23:44Z
<p></p>
<table class='diff diff-contentalign-left'>
<col class='diff-marker' />
<col class='diff-content' />
<col class='diff-marker' />
<col class='diff-content' />
<tr style='vertical-align: top;'>
<td colspan='2' style="background-color: white; color:black; text-align: center;">← Nächstältere Version</td>
<td colspan='2' style="background-color: white; color:black; text-align: center;">Version vom 20. Dezember 2012, 14:23 Uhr</td>
</tr><tr><td colspan="2" class="diff-lineno">Zeile 1:</td>
<td colspan="2" class="diff-lineno">Zeile 1:</td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>[[Kategorie:Dcarules]]</div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>[[Kategorie:Dcarules]]</div></td></tr>
<tr><td class='diff-marker'>−</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div> </div></td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins class="diffchange diffchange-inline">{{stub}}</ins></div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>=Button Regeln verwenden=</div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>=Button Regeln verwenden=</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"></td></tr>
<tr><td colspan="2" class="diff-lineno">Zeile 52:</td>
<td colspan="2" class="diff-lineno">Zeile 52:</td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div></source></div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div></source></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;"></ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;">=Regel referer=</ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;">=Regel hasAccess=</ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;">=Regel isAdmin=</ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;">=Regel isAllowed=</ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;">=Regel toggleIcon=</ins></div></td></tr>
<!-- diff cache key kunde29sql1:diff:version:1.11a:oldid:5740:newid:5742 -->
</table>
Netzmacht
https://de.contaowiki.org/index.php?title=Button_Regeln&diff=5740&oldid=prev
Netzmacht: Die Seite wurde neu angelegt: „Kategorie:Dcarules =Button Regeln verwenden= Auf dieser Seite werden die Button Regeln von dca-rules beschrieben. Bei dca-rules handelt es sich um eine …“
2012-12-20T14:22:10Z
<p>Die Seite wurde neu angelegt: „<a href="/index.php?title=Kategorie:Dcarules&action=edit&redlink=1" class="new" title="Kategorie:Dcarules (Seite nicht vorhanden)">Kategorie:Dcarules</a> =Button Regeln verwenden= Auf dieser Seite werden die Button Regeln von <a href="/Dca-rules" title="Dca-rules">dca-rules</a> beschrieben. Bei dca-rules handelt es sich um eine …“</p>
<p><b>Neue Seite</b></p><div>[[Kategorie:Dcarules]]<br />
<br />
=Button Regeln verwenden=<br />
<br />
Auf dieser Seite werden die Button Regeln von [[dca-rules]] beschrieben. Bei dca-rules handelt es sich um eine Erweiterung, mit deren hilfe wiederkehrende Bedingungen für DataContainer innerhalb von DCA-Dateien angegeben werden können ohne extra Callbacks zu definieren. <br />
<br />
=Regel generate=<br />
<br />
Dient zur Ausgabe des Buttons. Solange keine andere Ausgaberoutine verwendet wird muss sie mit angegeben werden.<br />
<br />
==Mögliche Parameter==<br />
* '''plain''' ''bool'', optional <br />Verwendet nur das Href Attribut des Buttons als Link. Normalerweise wird dies mit addToHref() an den Link angefügt<br />
* '''disable''' ''bool'', optional<br />Gibt ein Icon als Bild und nicht als Link aus (nur bei normalen Operationen)<br />
* '''noTable''' ''bool'', optional<br />Ist plain nicht gesetzt, wird standardmäßig die Tabelle an den Link angehangen. Mit dieser Option wird es unterbunden<br />
* '''noId''' ''bool'', optional<br />Ist plain nicht gesetzt, wird standardmäßig die ID an den Link angehangen. Mit dieser Option wird es unterbunden<br />
<br />
==Beispiele==<br />
<br />
<source lang="php"><br />
// erstellt einen Button zu Google<br />
$GLOBALS['TL_DCA']['tl_feedback']['list']['operations']['google']['href'] = 'http://www.google.com';<br />
$GLOBALS['TL_DCA']['tl_feedback']['list']['operations']['google']['button_rules'] = array('generate:plain');<br />
<br />
// erzeugt einen Link zur Kindertabelle ohne die aktuelle Tabelle<br />
$GLOBALS['TL_DCA']['tl_feedback']['list']['operations']['ctable']['href'] = 'table=ctable';<br />
$GLOBALS['TL_DCA']['tl_feedback']['list']['operations']['ctable']['button_rules'] = array('generate:noTable');<br />
<br />
// ezeugt Link zum Modul files ohne Tabelle und ID<br />
$GLOBALS['TL_DCA']['tl_feedback']['list']['operations']['file']['href'] = 'do=files';<br />
$GLOBALS['TL_DCA']['tl_feedback']['list']['operations']['files']['button_rules'] = array('generate:noTable:noId');<br />
</source><br />
<br />
=Regel disableIcon=<br />
<br />
Mit dieser Regel ist es möglich einen Button mit einem deaktivierten Icon auszugeben. Dabei wird eine andere Regel angegeben, die bestimmt welcher Zustand angezeigt wird. Diese Regel wirkt sich nur auf normale Operationen aus.<br />
<br />
==Mögliche Parameter==<br />
* '''rule''' ''string'', <br />Name der Regel, die den Zustand bestimmt<br />
* '''icon''' ''string'', optional<br />Das Icon, das den inaktiven Zustand anzeigen soll. Standardmäßig wird der Wert des normalen Icons genommen und mit einem Unterstrich verlängert (edit.gif -> edit_.gif)<br />
<br />
==Beispiele==<br />
<br />
<source lang="php"><br />
// Zeigt anstelle von Button wakeup nur ein deaktiviertes Icon an<br />
$GLOBALS['TL_DCA']['tl_feedback']['operations']['wakeup']['button_rules'] = array('disableIcon:rule=notOnSunday:icon=snore.png', 'generate');<br />
<br />
// liefert falsch, damit der button deaktiviert wird<br />
protected function buttonRuleNotOnSunday(&$strButton, &$strHref, &$strLabel, &$strTitle, &$strIcon, &$strAttributes, &$arrAttributes, $arrRow=null)<br />
{<br />
return (date('N') == 7);<br />
}<br />
<br />
</source></div>
Netzmacht