[gist={IDENTIFIER}]{TEXT}[/gist]
<div class="github-gist">
<span class="github-gist-headline">
<img src="https://a248.e.akamai.net/assets.github.com/images/gravatars/gravatar-140.png" class="avatar" />| <?php | |
| /** | |
| * @author Atanas Vasilev | |
| * @link http://pastebin.com/dHbqjUNy | |
| * @see http://www.dotvoid.com/2010/04/detecting-utf-bom-byte-order-mark/ | |
| * @version 1.1 | |
| */ | |
| // SETTINGS |
| <?php | |
| /** | |
| * This file is part of oTranCe released under the GNU GPL 2 license | |
| * http://www.oTranCe.de | |
| * | |
| * @package oTranCe | |
| * @subpackage Importer | |
| * @version SVN: $ | |
| * @author $Author: $ | |
| */ |
| <?php | |
| // qry: get all cats & articles, label non-start-articles.. | |
| $qry = 'SELECT CONCAT (IF(`startpage`,`catname`, CONCAT(`name`, " :: Artikel ::")), " [", `id`, "]"), `id`, `id`, `re_id` | |
| FROM `rex_article` | |
| WHERE `clang`=0 | |
| ORDER BY `startpage` DESC, `catprior`, `prior`'; | |
| // rex_select ... | |
| $select->addOption('none',''); |
| <?php | |
| // wirkt bei "Block speichern" und "Block übernehmen", bevor in die DB gespeichert wird. | |
| // rexname serialisieren und in REX_VALUE[20] schreiben: | |
| $REX_ACTION['VALUE'][20] = urlencode (serialize (rex_request ("rexname", "array"))); | |
| ?> |
| <?php | |
| $nav = new advanced_rex_navigation(); | |
| $main_navigation = $nav->get(0,3,FALSE,TRUE,'main'); | |
| // 'main' ist der name des navigationstyps | |
| // bitte anpassen je nach einstellung im meta-info-addon | |
| /* weitere setter methoden: | |
| $nav->setClasses(array('menu_item')); | |
| $nav->setSeperator('/'); |
Settings werden nicht mehr wie gewohnt in der config.inc.php des Addons/Plugins gesaved, sondern – ala rex5 – in einem externen file. Die Trennung von eigentlichem Addon/Plugin Code und user settings birgt diverse Vorteile:
| localhost:~ admin$ python -V | |
| Python 2.7.8 | |
| localhost:~ admin$ wxPython -V | |
| -bash: wxPython: command not found | |
| localhost:~ admin$ brew install --python wxmac --devel | |
| ==> Downloading https://downloads.sourceforge.net/project/wxwindows/3.0.2/wxWidgets-3.0.2. | |
| ######################################################################## 100,0% |