{{indexmenu_n>10}} (Einfache Version) ====== Artikelmenü (+Zähler +Archiv) ====== **Ein RT wie CP Artikelmenü, erweitert um auch archivierte Artikel anzeigen zu können und zwei Zähler: 1) Artikel ausblenden, 2) Anzahl der darzustellenden Artikel.** **rt_article_menu_archive** V1.0 23.03.09 \\ **rt_article_menu_archive** V1.1 05.09.09 **Update: 16.08.09 KH:** + Zähler für "Wie viele der ersten Artikel werden ausgeblendet" //(0 = nichts ausblenden)// \\ **Update: 05.09.09 KH:** + Zähler für "Wie viele Artikel werden angezeigt" //(0 = alle)// \\ **Update: 10.12.09 KH:** + BBCode in Titel und Subtitel möglich \\ **Update: 09.03.10 KH:** + Artikel-Status über den Tag einstellbar [0-6] **V1.2** **Syntax:** {ARTICLE_MENU_ARCHIVE:category-ID, count-hide} //(Beide Parameter müssen gesetzt sein)// \\ **V1.1** \\ **Syntax:** {ARTICLE_MENU_ARCHIVE:category-ID, count-hide, count-article} //(Alle drei Parameter müssen gesetzt sein)// Bsp.: {ARTICLE_MENU_ARCHIVE:-1,0,0} //Aktuelle Kategorie, kein führender Artikel ausgeblendet, alle Artikel anzeigen// \\ Bsp.: {ARTICLE_MENU_ARCHIVE:23,2,5} //Artikel in der Kategorie mit der ID 23, die beiden ersten Artikel werden nicht angezeigt, von den restlichen die ersten fünf anzeigen// \\ Der Artikel-Status [0-6] wird im Script in (%%===== Simulated CP paramter ====%%) eingestellt. \\ **V1.2** \\ **Syntax:** {ARTICLE_MENU_ARCHIVE:category-ID, count-hide, count-article, article-status} //(Alle vier Parameter müssen gesetzt sein)// Bsp.: {ARTICLE_MENU_ARCHIVE:-1,0,0,0} //Aktuelle Kategorie, kein führender Artikel ausgeblendet, alle Artikel anzeigen, auch wenn (archivieren) gesetzt ist und das Artikelenddatum in der Vergangenheit liegt // \\ Bsp.: {ARTICLE_MENU_ARCHIVE:23,2,5,1} //Artikel in der Kategorie mit der ID 23, die beiden ersten Artikel werden nicht angezeigt, von den restlichen die ersten fünf anzeigen, es werden nur die abgelaufenen Artikel angezeigt bei denen (archivieren) gesetzt ist// \\ ---- Docu: -- \\ Forum: -- **Autor:** K.Heermann (flip-flop) http://planmatrix.de \\ **CMS Version:** >= 1.4 \\ **Version:** V1.1/2 \\ Basierend auf dem CP Artikelmenü. Dateiname: **rt_article_menu_archive.php** Ort: ** template/inc_script/frontend_render/ ** **Bedingung:** -> [[http://www.phpwcms-docu.de/config_dateien.phtml|/config/phpwcms/conf.inc.php]] \\ * ##$phpwcms['allow_ext_render'] = 1;## ---- ---- \\ ===== V1.1 ==== Tag: **{ARTICLE_MENU_ARCHIVE:category-ID, count-hide, count-article}** oder **{ARTICLE_MENU_ARCHIVE:-1, count-hide, count-article}** für aktuelle Kategorie \\ ==== Code V1.1 ==== '; echo ' ERROR: Wrong integer parameter in {ARTICLE_MENU_ARCHIVE:...
'; echo '============================================
'; return false; } global $aktion; // ===== Simulated CP paramter ================================================ // 0: all articles // 1: article_archive_status=1 AND article_beginNOW() // 3: article_archive_status=1 AND article_begin>NOW() AND article_end>NOW() // 4: article_archive_status=0 AND article_beginNOW() // 6: article_archive_status=0 AND article_begin>NOW() AND article_end>NOW() $article_archive_status = 2; // Show entries with activated archive status? // How many of the first articles are to be hidden (hardcoded) ---------------------- // $leading_article_hide = 1; // default: 0 (now article hide) // CSS classes and IDs ---------------------- $alinkmenu['wrap_all'] = array('
','
'); // Wrap around all $alinkmenu['wrap_data'] = array('',''); // Data wrap begin, end $alinkmenu['wrap_title'] = array('',''); // Title wrap around all begin, end $alinkmenu['wrap_subtitle'] = array('',''); // SubTitle wrap begin, end $alinkmenu['wrap_summary'] = array('',''); // Wrap around summary begin, end $alinkmenu['class_active_link'] = 'active_link'; // Active link class $alinkmenu["style_before"] = ''; // Format before every data set. $alinkmenu["style_behind"] = ''; // Format behind every data set. /* // CSS classes and IDs ---------------------- $alinkmenu['wrap_all'] = array('
','
'); // Wrap around all $alinkmenu['wrap_data'] = array('',''); // Data wrap begin, end $alinkmenu['wrap_title'] = array('
','
'); // Title wrap around all begin, end $alinkmenu['wrap_subtitle'] = array('

','

'); // SubTitle wrap begin, end $alinkmenu['wrap_summary'] = array('',''); // Wrap around summary begin, end $alinkmenu['class_active_link'] = 'active_link'; // Active link class $alinkmenu["style_before"] = ''; // Format before every data set. // Format behind every data set. $alinkmenu["style_behind"] = '
'; */ // Insert title/subtitle name and css for the virtual content part $virt_article_title = ''; //

MyTitle

$virt_article_subtitle = ''; //

MySubTitle

$alinkmenu['subtitle_on'] = 0; // Article sub title text output [0|1] // Content part parameters ------------------ $alinkmenu['headertext'] = 0; // summary text [0|1] $alinkmenu['ul'] = 2; // 1: render as unordered list / 2: render as div / 3: render as table $alinkmenu['class'] = ''; // wrapped class $alinkmenu['maxchar'] = 0; // maxchars summary $alinkmenu['morelink'] = ' »'; // more link text $alinkmenu['hideactive'] = 0; // hide active article in article menu /* Sorting order for "second entry" ------------------------------ $ao[2] = ' article_sort ASC'; $ao[2] = ' article_sort DESC'; $ao[2] = ' article_created ASC'; $ao[2] = ' article_created DESC'; $ao[2] = ' article_tstamp ASC'; $ao[2] = ' article_tstamp DESC'; $ao[2] = ' article_begin ASC'; $ao[2] = ' article_begin DESC'; $ao[2] = ' article_title ASC'; $ao[2] = ' article_title DESC'; $ao[2] = ' article_end ASC'; $ao[2] = ' article_end DESC'; $ao[2] = ' article_priorize DESC,'.$ao[2]; ------------------------------ */ // Sorting order ---------------------------- $ao['2'] = ' article_priorize DESC,'; // Don´t change $ao['2'] .= ' article_sort ASC'; // second entry // ===== END defination ======================================================= // catid = -1: The current category is selected $alinkmenu["catid"] = ($catid < 0) ? $GLOBALS['content']['cat_id'] : $catid; // Article category-ID $alinkmenu['link'] = ''; // reserved, don´t change switch($article_archive_status) { case 0: // article_archive_status ist not set $alinkmenu['article_archive_status'] = ' '; break; case 1: $alinkmenu['article_archive_status'] = 'AND article_archive_status=1 AND article_begin All articles output ) ($count_article <= 0) ? $count_art == -1000 : $count_art = 0; foreach($result as $value) { if( $count >= $leading_article_hide ) { // Hide first articles? if( $count_article > $count_art ) { // Max article shown $tempRowSpan = ''; $value['article_summary'] = preg_replace('/]*?>$/i', '', $value['article_summary']); // article_summary if($alinkmenu['headertext'] && !empty($value['article_summary'])) { $alinkmenu['sum'] = $value['article_summary']; if(!empty($alinkmenu['maxchar'])) { $alinkmenu['sum'] = clean_replacement_tags($alinkmenu['sum']); $alinkmenu['sum'] = remove_unsecure_rptags($alinkmenu['sum']); $alinkmenu['sum'] = preg_replace('/\s/i', ' ', $alinkmenu['sum']); $alinkmenu['sum'] = preg_replace('/\s{2,}/i', ' ', $alinkmenu['sum']); $alinkmenu['sum'] = trim(decode_entities($alinkmenu['sum'])); $alinkmenu['sum'] = wordwrap($alinkmenu['sum'], $alinkmenu['maxchar'], "\n"); list($alinkmenu['sum']) = explode("\n", $alinkmenu['sum']); $alinkmenu['sum'] = trim($alinkmenu['sum']); $alinkmenu['sum'] = html_specialchars($alinkmenu['sum']); if(!empty($alinkmenu['morelink'])) { $alinkmenu['sum'] .= ''; $alinkmenu['sum'] .= $alinkmenu['morelink']; $alinkmenu['sum'] .= ''; } // Set css wrapper $alinkmenu['sum'] = LF.$alinkmenu['wrap_summary'][0].LF.$alinkmenu['sum'].LF.$alinkmenu['wrap_summary'][1]; } } else { $alinkmenu['sum'] = false; } // SubTitle ---------------------- $alinkmenu['subtitle'] = (!empty($value['article_subtitle']) AND !empty($alinkmenu['subtitle_on'])) ? $alinkmenu['wrap_subtitle'][0].render_bbcode_basics(html_specialchars($value['article_subtitle'])).$alinkmenu['wrap_subtitle'][1] : ''; // Format before every data set. $alinkmenu['link'] .= LF.$alinkmenu["style_before"].LF; // set link or link with active link class -------------------- $alinkmenu['link_wrap'] = ''; if (empty($alinkmenu['hideactive']) AND ($value['article_id'] == $aktion[1])) { $alinkmenu['link_wrap'] = ''; } switch($alinkmenu['ul']) { case 1: // render as unordered list $alinkmenu['link'] .= '
  • '.$alinkmenu['wrap_data'][0].$alinkmenu['wrap_title'][0]; // $alinkmenu['link'] .= ''; $alinkmenu['link'] .= $alinkmenu['link_wrap']; $alinkmenu['link'] .= render_bbcode_basics(html_specialchars($value['article_title'])); $alinkmenu['link'] .= $alinkmenu['morelink'].''.$alinkmenu['wrap_title'][1]; $alinkmenu['link'] .= $alinkmenu['subtitle']; if($alinkmenu['sum'] !== false) { $alinkmenu['link'] .= "\n".$alinkmenu['sum']; } $alinkmenu['link'] .= $alinkmenu['wrap_data'][1]."
  • \n"; break; case 2: // render as div $alinkmenu['link'] .= '
    '.$alinkmenu['wrap_data'][0].$alinkmenu['wrap_title'][0]; // $alinkmenu['link'] .= ''; $alinkmenu['link'] .= $alinkmenu['link_wrap']; $alinkmenu['link'] .= render_bbcode_basics(html_specialchars($value['article_title'])); $alinkmenu['link'] .= $alinkmenu['morelink'].''.$alinkmenu['wrap_title'][1]; $alinkmenu['link'] .= $alinkmenu['subtitle']; if($alinkmenu['sum'] !== false) { $alinkmenu['link'] .= "\n".$alinkmenu['sum']; } $alinkmenu['link'] .= $alinkmenu['wrap_data'][1]."
    \n"; break; default: // render as table // SubTitle ------------ if ($alinkmenu['subtitle'] !== '' AND !empty($alinkmenu['subtitle_on'])) { $tempRowSpan = ' rowspan="2"'; $alinkmenu['subtitle'] = "\n\t" .$alinkmenu['subtitle']. "\n\n"; } if($alinkmenu['sum'] !== false) { $tempRowSpan = ' rowspan="2"'; $alinkmenu['sum'] = "\n\t" . $alinkmenu['sum'] . "\n\n"; } $alinkmenu['link'] .= "\n\t".$template_default["article"]["link_article_sign"]."\n\t"; // $alinkmenu['link'] .= ''.$alinkmenu['wrap_title'][0].'"; $alinkmenu['link'] .= render_bbcode_basics(html_specialchars($value['article_title'])).$alinkmenu['morelink'].''.$alinkmenu['wrap_title'][1]."\n\n"; $alinkmenu['link'] .= $alinkmenu['subtitle']; $alinkmenu['link'] .= $alinkmenu['sum']; } // Format behind every data set. $alinkmenu['link'] .= $alinkmenu["style_behind"]; } // END if $count_art .... $count_art++; } // END if $count .... $count++; } // END foreach // mysql_free_result($result); } if($alinkmenu['link']) { switch($alinkmenu['ul']) { case 1: // render as unordered list $alinkmenu['link'] = "
      \n" . $alinkmenu['link'] . "
    \n"; break; case 2: // render as div break; default: // render as table $alinkmenu['link'] = ''."\n" . $alinkmenu['link'] . "
    \n"; } // now check if class name is given // if so wrap article menu in div if(!empty($alinkmenu['class'])) { $alinkmenu['link'] = '
    \n" . $alinkmenu['link'] . "
    \n"; } $CNT_TMP .= $alinkmenu['wrap_all'][0].LF.$virt_article_title . $virt_article_subtitle . $alinkmenu['link'].LF.$alinkmenu['wrap_all'][1].LF; } unset($alinkmenu); return $CNT_TMP; } // $content['all'] = str_replace('{ARTICLE_MENU_ARCHIVE}', my_article_menu_archive() ,$content['all']); $content["all"] = preg_replace('/{ARTICLE_MENU_ARCHIVE:(.*?),(.*?),(.*?)}/e', 'my_article_menu_archive("$1","$2","$3")', $content["all"]); ?>
    \\ ===== V1.2 ===== **Version:** V1.2 \\ Update 09.03.2010: Artikelstatus nun über den Tag einstellbar. Tag: **{ARTICLE_MENU_ARCHIVE:category-ID, count-hide, count-article, article-status}** oder **{ARTICLE_MENU_ARCHIVE:-1, count-hide, count-article, article-status}** für aktuelle Kategorie **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}** \\ //(Einstellbar unter "%% ===== CUSTOM INPUT === %%")//. ---- ==== Artikel-Staus: ==== {ARTICLE_MENU_ARCHIVE:category-ID, count-hide, count-article, **article-status**} 0: alle Artikel anzeigen 1: (archivieren) gesetzt UND Artikel-Begin < JETZT UND Artikel-Ende < JETZT 2: (archivieren) gesetzt UND Artikel-Begin < JETZT UND Artikel-Ende > JETZT 3: (archivieren) gesetzt UND Artikel-Begin > JETZT UND Artikel-Ende > JETZT 4: (archivieren) nicht gesetzt UND Artikel-Begin < JETZT UND Artikel-Ende < JETZT 5: (archivieren) nicht gesetzt UND Artikel-Begin < JETZT UND Artikel-Ende > JETZT 6: (archivieren) nicht gesetzt UND Artikel-Begin > JETZT UND Artikel-Ende > JETZT ==== Code V1.2 ==== **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. NOW() // 3: article_archive_status=1 AND article_begin>NOW() AND article_end>NOW() // 4: article_archive_status=0 AND article_beginNOW() // 6: article_archive_status=0 AND article_begin>NOW() AND article_end>NOW() //$article_archive_status = 2; // Show entries with activated archive status? // How many of the first articles are to be hidden (hardcoded) ---------------------- // $leading_article_hide = 1; // default: 0 (now article hide) // CSS classes and IDs ---------------------- $alinkmenu['wrap_all'] = array('
    ','
    '); // Wrap around all $alinkmenu['wrap_data'] = array('',''); // Data wrap begin, end $alinkmenu['wrap_title'] = array('

    ','

    '); // Title wrap around all begin, end $alinkmenu['wrap_subtitle'] = array('

    ','

    '); // SubTitle wrap begin, end $alinkmenu['wrap_summary'] = array('',''); // Wrap around summary begin, end $alinkmenu['class_active_link'] = 'active_link'; // Active link class $alinkmenu["style_before"] = ''; // Format before every data set. $alinkmenu["style_behind"] = ''; // Format behind every data set. /* // CSS classes and IDs example/Beispiel ---------------------- $alinkmenu['wrap_all'] = array('
    ','
    '); // Wrap around all $alinkmenu['wrap_data'] = array('',''); // Data wrap begin, end $alinkmenu['wrap_title'] = array('

    ','

    '); // Title wrap around all begin, end $alinkmenu['wrap_subtitle'] = array('

    ','

    '); // SubTitle wrap begin, end $alinkmenu['wrap_summary'] = array('',''); // Wrap around summary begin, end $alinkmenu['class_active_link'] = 'active_link'; // Active link class $alinkmenu["style_before"] = ''; // Format before every data set. // Format behind every data set. $alinkmenu["style_behind"] = '
    '; */ // Insert title/subtitle name and css for the virtual content part $virt_article_title = ''; //

    MyTitle

    $virt_article_subtitle = ''; //

    MySubTitle

    $alinkmenu['subtitle_on'] = 0; // Article sub title text output [0|1] // Content part parameters ------------------ $alinkmenu['headertext'] = 1; // summary text [0|1] $alinkmenu['ul'] = 2; // 1: render as unordered list / 2: render as div / 3: render as table $alinkmenu['class'] = ''; // wrapped class $alinkmenu['maxchar'] = 100; // maxchars summary $alinkmenu['morelink'] = ' …'; // more link text $alinkmenu['morelink_title'] = ' »'; // more link text for title $alinkmenu['hideactive'] = 0; // hide active article in article menu /* Sorting order for "second entry" ------------------------------ $ao[2] = ' article_sort ASC'; $ao[2] = ' article_sort DESC'; $ao[2] = ' article_created ASC'; $ao[2] = ' article_created DESC'; $ao[2] = ' article_tstamp ASC'; $ao[2] = ' article_tstamp DESC'; $ao[2] = ' article_begin ASC'; $ao[2] = ' article_begin DESC'; $ao[2] = ' article_title ASC'; $ao[2] = ' article_title DESC'; $ao[2] = ' article_end ASC'; $ao[2] = ' article_end DESC'; $ao[2] = ' article_priorize DESC,'.$ao[2]; ------------------------------ */ // Sorting order ---------------------------- $ao['2'] = ' article_priorize DESC,'; // Don´t change // Nicht aendern!! $ao['2'] .= ' article_sort ASC'; // second entry // Zweiter Eintrag // ===== 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 $alinkmenu["catid"] = ($catid < 0) ? $GLOBALS['content']['cat_id'] : $catid; // Article category-ID $alinkmenu['link'] = ''; // reserved, don´t change switch($article_archive_status) { case 0: // article_archive_status ist not set $alinkmenu['article_archive_status'] = ' '; break; case 1: $alinkmenu['article_archive_status'] = 'AND article_archive_status=1 AND article_begin All articles output ) ($count_article <= 0) ? $count_art == -1000 : $count_art = 0; foreach($result as $value) { if( $count >= $leading_article_hide ) { // Hide first articles? if( $count_article > $count_art ) { // Max article shown $tempRowSpan = ''; $value['article_summary'] = preg_replace('/]*?>$/i', '', $value['article_summary']); // article_summary if($alinkmenu['headertext'] && !empty($value['article_summary'])) { $alinkmenu['sum'] = $value['article_summary']; if(!empty($alinkmenu['maxchar'])) { $alinkmenu['sum'] = clean_replacement_tags($alinkmenu['sum']); $alinkmenu['sum'] = remove_unsecure_rptags($alinkmenu['sum']); $alinkmenu['sum'] = preg_replace('/\s/i', ' ', $alinkmenu['sum']); $alinkmenu['sum'] = preg_replace('/\s{2,}/i', ' ', $alinkmenu['sum']); $alinkmenu['sum'] = trim(decode_entities($alinkmenu['sum'])); $alinkmenu['sum'] = wordwrap($alinkmenu['sum'], $alinkmenu['maxchar'], "\n"); list($alinkmenu['sum']) = explode("\n", $alinkmenu['sum']); $alinkmenu['sum'] = trim($alinkmenu['sum']); $alinkmenu['sum'] = html_specialchars($alinkmenu['sum']); if(!empty($alinkmenu['morelink'])) { $alinkmenu['sum'] .= ''; $alinkmenu['sum'] .= $alinkmenu['morelink']; $alinkmenu['sum'] .= ''; } // Set css wrapper $alinkmenu['sum'] = LF.$alinkmenu['wrap_summary'][0].LF.$alinkmenu['sum'].LF.$alinkmenu['wrap_summary'][1]; } } else { $alinkmenu['sum'] = false; } // SubTitle ---------------------- $alinkmenu['subtitle'] = (!empty($value['article_subtitle']) AND !empty($alinkmenu['subtitle_on'])) ? $alinkmenu['wrap_subtitle'][0].render_bbcode_basics(html_specialchars($value['article_subtitle'])).$alinkmenu['wrap_subtitle'][1] : ''; // Format before every data set. $alinkmenu['link'] .= LF.$alinkmenu["style_before"].LF; // set link or link with active link class -------------------- // Title link --------------- $alinkmenu['link_wrap'] = ''; if (empty($alinkmenu['hideactive']) AND ($value['article_id'] == $aktion[1])) { $alinkmenu['link_wrap'] = ''; } switch($alinkmenu['ul']) { case 1: // render as unordered list $alinkmenu['link'] .= '
  • '.$alinkmenu['wrap_data'][0].$alinkmenu['wrap_title'][0]; // $alinkmenu['link'] .= ''; $alinkmenu['link'] .= $alinkmenu['link_wrap']; $alinkmenu['link'] .= render_bbcode_basics(html_specialchars($value['article_title'])); $alinkmenu['link'] .= $alinkmenu['morelink_title'].''.$alinkmenu['wrap_title'][1]; $alinkmenu['link'] .= $alinkmenu['subtitle']; if($alinkmenu['sum'] !== false) { $alinkmenu['link'] .= "\n".$alinkmenu['sum']; } $alinkmenu['link'] .= $alinkmenu['wrap_data'][1]."
  • \n"; break; case 2: // render as div $alinkmenu['link'] .= '
    '.$alinkmenu['wrap_data'][0].$alinkmenu['wrap_title'][0]; // $alinkmenu['link'] .= ''; $alinkmenu['link'] .= $alinkmenu['link_wrap']; $alinkmenu['link'] .= render_bbcode_basics(html_specialchars($value['article_title'])); $alinkmenu['link'] .= $alinkmenu['morelink_title'].''.$alinkmenu['wrap_title'][1]; $alinkmenu['link'] .= $alinkmenu['subtitle']; if($alinkmenu['sum'] !== false) { $alinkmenu['link'] .= "\n".$alinkmenu['sum']; } $alinkmenu['link'] .= $alinkmenu['wrap_data'][1]."
    \n"; break; default: // render as table // SubTitle ------------ if ($alinkmenu['subtitle'] !== '' AND !empty($alinkmenu['subtitle_on'])) { $tempRowSpan = ' rowspan="2"'; $alinkmenu['subtitle'] = "\n\t" .$alinkmenu['subtitle']. "\n\n"; } if($alinkmenu['sum'] !== false) { $tempRowSpan = ' rowspan="2"'; $alinkmenu['sum'] = "\n\t" . $alinkmenu['sum'] . "\n\n"; } $alinkmenu['link'] .= "\n\t".$template_default["article"]["link_article_sign"]."\n\t"; // $alinkmenu['link'] .= ''.$alinkmenu['wrap_title'][0].'"; $alinkmenu['link'] .= render_bbcode_basics(html_specialchars($value['article_title'])).$alinkmenu['morelink_title'].''.$alinkmenu['wrap_title'][1]."\n\n"; $alinkmenu['link'] .= $alinkmenu['subtitle']; $alinkmenu['link'] .= $alinkmenu['sum']; } // Format behind every data set. $alinkmenu['link'] .= $alinkmenu["style_behind"]; } // END if $count_art .... $count_art++; } // END if $count .... $count++; } // END foreach // mysql_free_result($result); } if($alinkmenu['link']) { switch($alinkmenu['ul']) { case 1: // render as unordered list $alinkmenu['link'] = "
      \n" . $alinkmenu['link'] . "
    \n"; break; case 2: // render as div break; default: // render as table $alinkmenu['link'] = ''."\n" . $alinkmenu['link'] . "
    \n"; } // now check if class name is given // if so wrap article menu in div if(!empty($alinkmenu['class'])) { $alinkmenu['link'] = '
    \n" . $alinkmenu['link'] . "
    \n"; } $CNT_TMP .= $alinkmenu['wrap_all'][0].LF.$virt_article_title . $virt_article_subtitle . $alinkmenu['link'].LF.$alinkmenu['wrap_all'][1].LF; } unset($alinkmenu); return $CNT_TMP; } $content["all"] = preg_replace('/{ARTICLE_MENU_ARCHIVE:(.*?)}/e', 'my_article_menu_archive("$1")', $content["all"]); ?>