NAVIGATION
This shows you the differences between two versions of the page.
|
deutsch:ersetzer_rts:frontend_render:article-menu-archiv:article-menu-archiv-counter [2010/03/10 07:34] Knut Heermann (flip-flop) |
deutsch:ersetzer_rts:frontend_render:article-menu-archiv:article-menu-archiv-counter [2018/06/03 18:09] (current) |
||
|---|---|---|---|
| Line 475: | Line 475: | ||
| **Mögliche Varianten:** Sind keine Parameter gesetzt wird folgendes angenommen: \\ | **Mögliche Varianten:** Sind keine Parameter gesetzt wird folgendes angenommen: \\ | ||
| - | - **{ARTICLE_MENU_ARCHIVE:,,,}** -> Fallback für die einzelnen Parameter: **{ARTICLE_MENU_ARCHIVE:0,0,100,2}** | + | - **{ARTICLE_MENU_ARCHIVE:,,,}** -> Fallback für die einzelnen Parameter: **{ARTICLE_MENU_ARCHIVE:0,0,100,2}** \\ //(Einstellbar unter "%% ===== CUSTOM INPUT === %%")//. |
| ---- | ---- | ||
| Line 495: | Line 495: | ||
| ==== Code V1.2 ==== | ==== Code V1.2 ==== | ||
| - | Letzte Änderung: 10.03.2010 07:35 KH | + | **Letzte Änderung:** KH 10.03.2010-07:35: \\ |
| + | Parameterübergabe angepasst, nun auch einfaches {ARTICLE_MENU_ARCHIVE:category-ID} möglich. Die fehlenden Einstellungen werden dann im Script unter "%% ===== CUSTOM INPUT === %%" festgelegt. | ||
| <code php |h article menu archive V1.2 |h > | <code php |h article menu archive V1.2 |h > | ||
| Line 565: | Line 566: | ||
| function my_article_menu_archive ($parameter='', $CNT_TMP = '') { | function my_article_menu_archive ($parameter='', $CNT_TMP = '') { | ||
| - | $parameter = explode(',', $parameter); | + | $parameter = explode(',', $parameter); |
| - | $catid = empty($parameter[0]) ? 0 : intval($parameter[0]); | ||
| - | $leading_article_hide = empty($parameter[1]) ? 0 : intval($parameter[1]); | ||
| - | $count_article = empty($parameter[2]) ? 100 : intval($parameter[2]); | ||
| - | $article_archive_status = empty($parameter[3]) ? 2 : intval($parameter[3]); | ||
| + | // ============================================================================ | ||
| + | // ===== CUSTOM INPUT ========================================================= | ||
| + | |||
| + | // Fallback parameter ----------------------- | ||
| + | |||
| + | $catid = 0; // Category-ID // Kategorie-ID | ||
| + | $leading_article_hide = 0; // No. scriped articles // Anz. uebersprung. Artikel | ||
| + | $count_article = 100; // Max count articles // Anz. auszugebender Artikel | ||
| + | $article_archive_status = 2; // What article to be displayed // Welche Artikel anzeigen | ||
| - | global $aktion; | ||
| - | |||
| // ===== Simulated CP paramter ================================================ | // ===== Simulated CP paramter ================================================ | ||
| - | + | ||
| + | // What article to be displayed // Welche Artikel anzeigen ---------------- | ||
| // 0: all articles | // 0: all articles | ||
| // 1: article_archive_status=1 AND article_begin<NOW() AND article_end<NOW() | // 1: article_archive_status=1 AND article_begin<NOW() AND article_end<NOW() | ||
| Line 600: | Line 605: | ||
| $alinkmenu['wrap_all'] = array('<div class="vlist">','</div>'); // Wrap around all | $alinkmenu['wrap_all'] = array('<div class="vlist">','</div>'); // Wrap around all | ||
| $alinkmenu['wrap_data'] = array('',''); // Data wrap begin, end | $alinkmenu['wrap_data'] = array('',''); // Data wrap begin, end | ||
| - | $alinkmenu['wrap_title'] = array('',''); // Title wrap around all begin, end | + | $alinkmenu['wrap_title'] = array('<h3>','</h3>'); // Title wrap around all begin, end |
| - | $alinkmenu['wrap_subtitle'] = array('',''); // SubTitle wrap begin, end | + | $alinkmenu['wrap_subtitle'] = array('<h4>','</h4>'); // SubTitle wrap begin, end |
| $alinkmenu['wrap_summary'] = array('',''); // Wrap around summary begin, end | $alinkmenu['wrap_summary'] = array('',''); // Wrap around summary begin, end | ||
| $alinkmenu['class_active_link'] = 'active_link'; // Active link class | $alinkmenu['class_active_link'] = 'active_link'; // Active link class | ||
| Line 611: | Line 616: | ||
| /* | /* | ||
| - | // CSS classes and IDs ---------------------- | + | // CSS classes and IDs example/Beispiel ---------------------- |
| $alinkmenu['wrap_all'] = array('<div class="teaser_right">','</div>'); // Wrap around all | $alinkmenu['wrap_all'] = array('<div class="teaser_right">','</div>'); // Wrap around all | ||
| $alinkmenu['wrap_data'] = array('',''); // Data wrap begin, end | $alinkmenu['wrap_data'] = array('',''); // Data wrap begin, end | ||
| - | $alinkmenu['wrap_title'] = array('<div style="padding-bottom:2px; "><h6>','</h6></div>'); // Title wrap around all begin, end | + | $alinkmenu['wrap_title'] = array('<div style="padding-bottom:2px; "><h3>','</h3></div>'); // Title wrap around all begin, end |
| $alinkmenu['wrap_subtitle'] = array('<p style="font-size: 0.8em; ">','</p>'); // SubTitle wrap begin, end | $alinkmenu['wrap_subtitle'] = array('<p style="font-size: 0.8em; ">','</p>'); // SubTitle wrap begin, end | ||
| $alinkmenu['wrap_summary'] = array('',''); // Wrap around summary begin, end | $alinkmenu['wrap_summary'] = array('',''); // Wrap around summary begin, end | ||
| Line 664: | Line 669: | ||
| // Sorting order ---------------------------- | // Sorting order ---------------------------- | ||
| - | $ao['2'] = ' article_priorize DESC,'; // Don´t change | + | $ao['2'] = ' article_priorize DESC,'; // Don´t change // Nicht aendern!! |
| - | $ao['2'] .= ' article_sort ASC'; // second entry | + | $ao['2'] .= ' article_sort ASC'; // second entry // Zweiter Eintrag |
| // ===== END defination ======================================================= | // ===== END defination ======================================================= | ||
| + | // ============================================================================ | ||
| + | |||
| + | |||
| + | |||
| + | // Tag input parameter | ||
| + | if (!empty($parameter[0])) $catid = intval($parameter[0]); // Tag input: Category-ID | ||
| + | if (!empty($parameter[1])) $leading_article_hide = intval($parameter[1]); // Tag input: No. scriped articles | ||
| + | if (!empty($parameter[2])) $count_article = intval($parameter[2]); // Tag input: Max count articles | ||
| + | if (!empty($parameter[3])) { | ||
| + | $article_archive_status = intval($parameter[3]); // Tag input: [0-6] | ||
| + | if ($article_archive_status < 0 AND | ||
| + | $article_archive_status > 6) // Fallback if out of range range | ||
| + | $article_archive_status = 2; | ||
| + | } | ||
| + | |||
| + | |||
| + | global $aktion; | ||
| // catid = -1: The current category is selected | // catid = -1: The current category is selected | ||
| Line 900: | Line 922: | ||
| } | } | ||
| - | |||
| $content["all"] = preg_replace('/{ARTICLE_MENU_ARCHIVE:(.*?)}/e', 'my_article_menu_archive("$1")', $content["all"]); | $content["all"] = preg_replace('/{ARTICLE_MENU_ARCHIVE:(.*?)}/e', 'my_article_menu_archive("$1")', $content["all"]); | ||
| ?> | ?> | ||
| </code> | </code> | ||