NAVIGATION
This shows you the differences between two versions of the page.
|
deutsch:ersetzer_rts:frontend_render:link-article-alias-id [2011/11/29 09:54] Knut Heermann (flip-flop) |
deutsch:ersetzer_rts:frontend_render:link-article-alias-id [2018/06/03 18:09] (current) |
||
|---|---|---|---|
| Line 3: | Line 3: | ||
| ====== Quick Artikellink mit ALIAS/ID ====== | ====== Quick Artikellink mit ALIAS/ID ====== | ||
| - | Ein einfacher TAG der einen Link aufgrund der/s Artikel-ID/Alias erzeugt, welcher automatisch den Titel des Artikels als Linktext verwendet. \\ | + | Ein einfacher TAG der einen Link aufgrund der/s Artikel-ID/Alias erzeugt, welcher automatisch den Titel des Artikels als Linktext verwendet. |
| ##**[QIDA|qIDA** Artikel-Alias oder Artikel-ID**]**## \\ | ##**[QIDA|qIDA** Artikel-Alias oder Artikel-ID**]**## \\ | ||
| Line 67: | Line 68: | ||
| if ( isset($match['1']) AND !empty($match['1']) ) { // if match found, replace | if ( isset($match['1']) AND !empty($match['1']) ) { // if match found, replace | ||
| + | // Separate IDs and articles TAGs | ||
| $id_i = ''; | $id_i = ''; | ||
| $id_a = ''; | $id_a = ''; | ||
| Line 73: | Line 75: | ||
| // ID or alias input?? // ID oder alias Eingabe???? | // ID or alias input?? // ID oder alias Eingabe???? | ||
| if ((int)$value == $value AND (int)$value != 0) | if ((int)$value == $value AND (int)$value != 0) | ||
| - | $id_i .= $value.','; | + | $id_i .= trim($value).','; |
| else | else | ||
| - | $id_a .= "'".$value."',"; | + | $id_a .= "'".strtolower(trim($value))."',"; |
| } | } | ||
| - | + | ||
| // Count all possible matches for a better db performance (LIMIT) | // Count all possible matches for a better db performance (LIMIT) | ||
| $count = substr_count($id_i, ','); | $count = substr_count($id_i, ','); | ||
| Line 125: | Line 127: | ||
| \\ | \\ | ||
| - | * In "$hidden_article" können Artikel-IDs eingetragen werden, die von der Selektion ausgenommen sind. //('23,56,74,12,...') Hochkommata am Anfang und Ende verwenden!// | + | * In "$hidden_article" können Artikel-IDs eingetragen werden, die von der Selektion ausgenommen sind. //%%('23,56,74,12,...')%% Hochkommata am Anfang und Ende verwenden!// |
| + | \\ | ||