NAVIGATION
This shows you the differences between two versions of the page.
|
deutsch:ersetzer_rts:frontend_render:article-menu-archiv:article-menu-archive-img-template [2009/09/30 09:33] Knut Heermann (flip-flop) created |
deutsch:ersetzer_rts:frontend_render:article-menu-archiv:article-menu-archive-img-template [2018/06/03 18:09] (current) |
||
|---|---|---|---|
| Line 2: | Line 2: | ||
| - | ====== Artikelmenü erweitert ====== | + | ====== Artikelmenü erweitert V1.4 ====== |
| FIXME translate (kh) | FIXME translate (kh) | ||
| Line 16: | Line 16: | ||
| * Zufällige (random) Sortierung der Artikelausgabe //(TAG)// | * Zufällige (random) Sortierung der Artikelausgabe //(TAG)// | ||
| * Ausgabe archivierter Artikel // (TAG)// | * Ausgabe archivierter Artikel // (TAG)// | ||
| + | * BBcode in Titel und Untertitel möglich | ||
| \\ | \\ | ||
| Line 44: | Line 45: | ||
| **Syntax Beispiele:** | **Syntax Beispiele:** | ||
| * **{ARTICLE_MENU_ARCHIVE: -1, 0,}** //Aktuelle Kategorie, alle verfügbaren Artikel werden ausgegeben,// | * **{ARTICLE_MENU_ARCHIVE: -1, 0,}** //Aktuelle Kategorie, alle verfügbaren Artikel werden ausgegeben,// | ||
| - | * **{ARTICLE_MENU_ARCHIVE: 23, 5, 2}** //Artikel in Kategorie 23(ID), zeige die ersten fünf Artikel wenn verfügbar, die ersten zwei Artikel werden dabei überspungen (skipped)// | + | * **{ARTICLE_MENU_ARCHIVE: 23, 5, s2}** //Artikel in Kategorie 23(ID), zeige die ersten fünf Artikel wenn verfügbar, die ersten zwei Artikel werden dabei überspungen (skipped)// |
| - | * **{ARTICLE_MENU_ARCHIVE: 23, 5, 2, 100x80x0x90}** //Artikel in Kategorie 23(ID), zeige die ersten fünf Artikel wenn verfügbar, die ersten zwei Artikel werden dabei überspungen (skipped), Artikelbild-Ausgabe 100px x 80px kein "cropping" jpg-Qualität 90// | + | * **{ARTICLE_MENU_ARCHIVE: 23, 5, s2, 100x80x0x90}** //Artikel in Kategorie 23(ID), zeige die ersten fünf Artikel wenn verfügbar, die ersten zwei Artikel werden dabei überspungen (skipped), Artikelbild-Ausgabe 100px x 80px kein "cropping" jpg-Qualität 90// |
| - | * **{ARTICLE_MENU_ARCHIVE: 23, 5, 0, 50x50x1}** //Artikel in Kategorie 23(ID), zeige die ersten fünf Artikel wenn verfügbar, kein Artikel wird überspungen, Artikelbild-Ausgabe 50px x 50px "cropped"// | + | * **{ARTICLE_MENU_ARCHIVE: 23, 5, s0, 50x50x1}** //Artikel in Kategorie 23(ID), zeige die ersten fünf Artikel wenn verfügbar, kein Artikel wird überspungen, Artikelbild-Ausgabe 50px x 50px "cropped"// |
| - | * **{ARTICLE_MENU_ARCHIVE: 23, 5, 0, 50x50x1, t2}** //Die selbe Ausgabe wie zuvor, jedoch wird dazu Tdas emplate Nr. 2 verwendet // | + | * **{ARTICLE_MENU_ARCHIVE: 23, 5, s0, 50x50x1, t2}** //Die selbe Ausgabe wie zuvor, jedoch wird dazu das Template Nr. 2 verwendet // |
| * **{ARTICLE_MENU_ARCHIVE: 23, 5, s0, 50x50x1, t21, r1, w25, a3}** | * **{ARTICLE_MENU_ARCHIVE: 23, 5, s0, 50x50x1, t21, r1, w25, a3}** | ||
| Line 87: | Line 88: | ||
| Update: 05.09.09 KH: + counter for "How many articles are to be shown" (0 = all) | Update: 05.09.09 KH: + counter for "How many articles are to be shown" (0 = all) | ||
| Update: 16.08.09 KH: + counter for "How many of the first articles are to be hidden" (0 = nothing hidden) | Update: 16.08.09 KH: + counter for "How many of the first articles are to be hidden" (0 = nothing hidden) | ||
| + | Update: 10.12.09 KH: + BBCode in title and subtitle possible | ||
| </code> | </code> | ||
| Line 93: | Line 95: | ||
| Basierend auf dem CP Artikelmenü. | Basierend auf dem CP Artikelmenü. | ||
| - | TAG: **{ARTICLE_MENU_ARCHIVE: category-ID, count-article, count-hide, WxHxCxQ, tXX, rX, wXXX, aX}** \\ | + | TAG: **{ARTICLE_MENU_ARCHIVE: category-ID, count-article, sXX, WxHxCxQ, tXX, rX, wXXX, aX}** \\ |
| - | or **{ARTICLE_MENU_ARCHIVE: -1, count-article, count-hide}** //für die aktuelle Kategorie// \\ | + | or **{ARTICLE_MENU_ARCHIVE: -1, count-article, sXX}** //für die aktuelle Kategorie// \\ |
| Minimalster Aufruf: **{ARTICLE_MENU_ARCHIVE: category-ID, count-article,}** //(mit einem Komma endent !!)// | Minimalster Aufruf: **{ARTICLE_MENU_ARCHIVE: category-ID, count-article,}** //(mit einem Komma endent !!)// | ||
| Line 111: | Line 113: | ||
| ---- | ---- | ||
| - | \\ | + | ~~UP~~ |
| ===== Innere Parameter ===== | ===== Innere Parameter ===== | ||
| Line 122: | Line 124: | ||
| <file> | <file> | ||
| - | // Sorting the output: all|archived|not archived | + | // Sortierung der Ausgabe: alle|archivierte|nicht archivierte |
| // ------------------------------------------ | // ------------------------------------------ | ||
| - | // 0: all articles | + | // 0: alle Artikel |
| - | // 1: archive_status=1 AND article_begin<NOW() AND article_end<NOW() | + | // 1: Archiv-Status=1 UND Artikel-Beginn < HEUTE UND Artikel-Ende < HEUTE |
| - | // 2: archive_status=1 AND article_begin<NOW() AND article_end>NOW() | + | // 2: Archiv-Status=1 UND Artikel-Beginn < HEUTE UND Artikel-Ende > HEUTE |
| - | // 3: archive_status=1 AND article_begin>NOW() AND article_end>NOW() | + | // 3: Archiv-Status=1 UND Artikel-Beginn > HEUTE UND Artikel-Ende > HEUTE |
| - | // 4: archive_status=0 AND article_begin<NOW() AND article_end<NOW() | + | // 4: Archiv-Status=0 UND Artikel-Beginn < HEUTE UND Artikel-Ende < HEUTE |
| - | // 5: archive_status=0 AND article_begin<NOW() AND article_end>NOW() | + | // 5: Archiv-Status=0 UND Artikel-Beginn < HEUTE UND Artikel-Ende > HEUTE |
| - | // 6: archive_status=0 AND article_begin>NOW() AND article_end>NOW() | + | // 6: Archiv-Status=0 UND Artikel-Beginn > HEUTE UND Artikel-Ende > HEUTE |
| - | // Insert one of the previous number | + | // Verwende eine der oben gezeigten Nummern |
| - | $alinkmenu['article_archive_status_set'] = 2; // E.g. Show entries with activated archive status? | + | $alinkmenu['article_archive_status_set'] = 2; // E.g. Zeigt Einträge mit aktiviertem Archiv-Status |
| // ------------------------------------------ | // ------------------------------------------ | ||
| - | // Image parameters: list|detail ------------ | + | // Bildparameter: Artikel-Liste|Artikel-Detail ------------ |
| - | $alinkmenu['is_image'] = 3; // 0 = off | 1 = list image | 2 = detail image | + | $alinkmenu['is_image'] = 3; // 0 = off | 1 = Listen-Bild | 2 = Detail-Bild |
| - | // 3 = list image + link | 4 = detail image + link | + | // 3 = Listen-Bild + link | 4 = Detail-Bild + link |
| - | // Content part parameters ------------------ | + | // Content-Part Parameter ------------------ |
| - | $alinkmenu['subtitle_on'] = 1; // Article sub title text output [0|1] | + | $alinkmenu['subtitle_on'] = 1; // Artikel Untertitel-Ausgabe [0|1] |
| - | $alinkmenu['headertext'] = 1; // summary text [0|1] | + | $alinkmenu['headertext'] = 1; // Schlagtext (summary) anzeigen [0|1] |
| - | $alinkmenu['ul'] = 3; // 1: render as unordered list / 2: render as div / | + | $alinkmenu['ul'] = 3; // 1: Rendern als unsortierte liste / 2: Rendere als div / |
| - | // 3: render template / 4: render as table | + | // 3: Rendere Template / 4: Render als Tabelle |
| - | $alinkmenu['class'] = ''; // wrapped class | + | $alinkmenu['class'] = ''; // Umschließende (wrapped) class |
| - | $alinkmenu['more'] = ' »'; // more link text | + | $alinkmenu['more'] = ' »'; // mehr-Link Text |
| - | $alinkmenu['moretextsum'] = ' …'; // more text in summary | + | $alinkmenu['moretextsum'] = ' …'; // mehr Text im Schlagtext (summary) |
| - | $alinkmenu['hideactive'] = 0; // hide active article in article menu [0 = no article hide] | + | $alinkmenu['hideactive'] = 0; // unterdrücke die Anzeige des gerade aktiven Artikels im Artikelmenü [0 = nicht unterdrücken] |
| - | $alinkmenu['wordlimit'] = 5; // maxwords summary [0-999 / 0 = no words / -1 = all words] | + | $alinkmenu['wordlimit'] = 5; // Max. Anzahl Worte im Schlagtext (summary) [0-999 / 0 = keine Ausgabe / -1 = alle Worte] |
| - | $alinkmenu['allowedtags'] = '<b><i><u><s><strong>'; // allowed tags in summary | + | $alinkmenu['allowedtags'] = '<b><i><u><s><strong>'; // erlaubte Tags im Schlagtext (summary) |
| - | $alinkmenu['leading_article_hide'] = 0; // No Artikle skiped | + | $alinkmenu['leading_article_hide'] = 0; // Wieviele Artikel überspringen. (Default: Kein Artikel) |
| - | $alinkmenu['WxHxCxQ'] = ''; // No image parameter set e.g. set 100x80x0 | + | $alinkmenu['WxHxCxQ'] = ''; // Bild-Parameter setzen. (Default: Keine Parameter) z.B. 100x80x0 |
| - | $alinkmenu['template_no'] = 0; // default template = 0 | + | $alinkmenu['template_no'] = 0; // Default Template-Nr. = 0 |
| - | $alinkmenu['random'] = 0; // random sort order for article [0|1] | + | $alinkmenu['random'] = 0; // Zufällige Sortierung (random) der Artikel [0|1] |
| </file> | </file> | ||
| - | \\ | + | ~~UP~~ |
| Line 259: | Line 261: | ||
| ===== Code v1.4 ===== | ===== Code v1.4 ===== | ||
| + | **Datei:** template/inc_script/frontend_render/article_menu_archive.php | ||
| <code |h article menu archive v1.4 |h> | <code |h article menu archive v1.4 |h> | ||
| Line 291: | Line 294: | ||
| 16.08.09 KH Update: + counter for "How many of the first articles are to be hidden" | 16.08.09 KH Update: + counter for "How many of the first articles are to be hidden" | ||
| {ARTICLE_MENU_ARCHIVE:category-ID, count-hide} | {ARTICLE_MENU_ARCHIVE:category-ID, count-hide} | ||
| - | E.g.:{ARTICLE_MENU_ARCHIVE:-1,0} (Both parameters must be set) | + | E.g.:{ARTICLE_MENU_ARCHIVE:-1,0,} (Both parameters must be set) |
| 05.09.09 KH Update: + count_article for "How many of articles are to be shown" (if available) | 05.09.09 KH Update: + count_article for "How many of articles are to be shown" (if available) | ||
| Line 337: | Line 340: | ||
| wordlimit = 25, | wordlimit = 25, | ||
| output archived articles (article_begin > NOW AND article_end > NOW) | output archived articles (article_begin > NOW AND article_end > NOW) | ||
| + | |||
| + | 10.12.09 KH Update: + BBCode in titel and subtitel possible | ||
| + | E.g.: [i]Title[/i] [b]Subtitle[/b] ...... | ||
| V1.4 | V1.4 | ||
| *************************************************************************************/ | *************************************************************************************/ | ||
| - | + | ||
| - | + | //article menu enhanced | |
| - | // ---------------------------------------------------------------- | + | |
| - | // obligate check for phpwcms constants | + | // {ARTICLE_MENU_ARCHIVE: category-ID, count-article, sXX, WxHxC, tXX, rX, wXXX, aX } |
| - | if (!defined('PHPWCMS_ROOT')) { | + | |
| - | die("You Cannot Access This Script Directly, Have a Nice Day."); } | + | |
| - | // ---------------------------------------------------------------- | + | |
| - | + | ||
| - | + | ||
| - | //article menu enhanced | + | |
| // $catid: the category ID where the articles are (-1 = current category)) | // $catid: the category ID where the articles are (-1 = current category)) | ||
| // sXX-paramter: $leading_article_hide: How many of the first articles are to be skipped | // sXX-paramter: $leading_article_hide: How many of the first articles are to be skipped | ||
| Line 357: | Line 358: | ||
| // rX -parameter: [0|1] random article sort order | // rX -parameter: [0|1] random article sort order | ||
| // wXXX-parameter: No. 0-999 max. words: [-1]=all words, [0]= no words | // wXXX-parameter: No. 0-999 max. words: [-1]=all words, [0]= no words | ||
| + | |||
| + | |||
| + | |||
| + | // ---------------------------------------------------------------- | ||
| + | // obligate check for phpwcms constants | ||
| + | if (!defined('PHPWCMS_ROOT')) { | ||
| + | die("You Cannot Access This Script Directly, Have a Nice Day."); } | ||
| + | // ---------------------------------------------------------------- | ||
| + | |||
| function my_article_menu_archive ($catid = 0, $count_article, $article_skip_WxHxCxQ_template = '', $CNT_TMP = '') { | function my_article_menu_archive ($catid = 0, $count_article, $article_skip_WxHxCxQ_template = '', $CNT_TMP = '') { | ||
| Line 794: | Line 804: | ||
| // ArticleTitle ------------------ | // ArticleTitle ------------------ | ||
| - | $alinkmenu['title'] = html_specialchars($value['article_title']); | + | $alinkmenu['title'] = render_bbcode_basics(html_specialchars($value['article_title'])); |
| // SubTitle ---------------------- | // SubTitle ---------------------- | ||
| $alinkmenu['subtitle'] = (!empty($value['article_subtitle']) AND !empty($alinkmenu['subtitle_on'])) ? | $alinkmenu['subtitle'] = (!empty($value['article_subtitle']) AND !empty($alinkmenu['subtitle_on'])) ? | ||
| - | html_specialchars($value['article_subtitle']) : ''; | + | render_bbcode_basics(html_specialchars($value['article_subtitle'])) : ''; |