$g['wrap'][] = '</div>'; } $content['cptab'][$CNT_TAB] = implode(LF, $g['wrap']); } unset($g); } } } if (empty($template_default["article"]["div_spacer"])) { $content["main"] = str_replace("</table>\n<br />", "</table>\n", $content["main"]); $content["main"] = str_replace("</table><br />", "</table>", $content["main"]); $content["main"] = str_replace("</div><br />", "</div>", $content["main"]); } if (!defined('PHPWCMS_ALIAS') && $content['article_alias']) { define('PHPWCMS_ALIAS', $content['article_alias']); } // set canonical <link> in page <head> section to avoid lower SEO ranking // see: http://googlewebmastercentral.blogspot.com/2009/02/specify-your-canonical.html if ($content['overwrite_canonical']) { $content['set_canonical'] = false; } elseif (empty($phpwcms['canonical_off'])) { $_tempAlias = PHPWCMS_ALIAS ? PHPWCMS_ALIAS : 'aid=' . $content['article_id']; if ($content['set_canonical'] && empty($phpwcms['force301_2struct'])) { // check against page or set canonical only for single article in this category $content['set_canonical'] = $content['aId_CpPage'] ? 'aid=' . $content['article_id'] . '-' . $content['aId_CpPage'] : get_structurelevel_single_article_alias($content['cat_id']); $content['set_canonical'] = abs_url(array(), true, $content['set_canonical'] ? $content['set_canonical'] : $_tempAlias, 'rawurlencode'); } else { $content['set_canonical'] = abs_url(array(), true, $_tempAlias, 'rawurlencode'); } $block['custom_htmlhead']['canonical'] = ' <link rel="canonical" href="' . $content['set_canonical'] . '"' . HTML_TAG_CLOSE; }
if (empty($content['alink']['alink_wordlimit']) && !empty($row['article_image']['list_maxwords'])) { $content['alink']['alink_wordlimit'] = $row['article_image']['list_maxwords']; } $row['article_summary'] = empty($content['alink']['alink_allowedtags']) ? strip_tags($row['article_summary']) : strip_tags($row['article_summary'], $content['alink']['alink_allowedtags']); if (!empty($content['alink']['alink_wordlimit'])) { $row['article_summary'] = getCleanSubString($row['article_summary'], abs($content['alink']['alink_wordlimit']), $template_default['ellipse_sign'], $content['alink']['alink_wordlimit'] < 0 ? 'char' : 'word'); } } else { $row['article_summary'] = ''; } $content['alink']['tr'][$key] = render_cnt_template($content['alink']['tr'][$key], 'SUMMARY', $row['article_summary']); } // $content['struct'][ $row['article_cid'] ]['acat_articlecount'] // count the articles per category and decide where to link on that basis // store it if used once if ($content['alink']['alink_categoryalias'] && ($row['article_structalias'] = get_structurelevel_single_article_alias($row['article_cid']))) { $row['article_alias'] = $row['article_structalias']; } // link to article detail $content['alink']['tr'][$key] = render_cnt_template($content['alink']['tr'][$key], 'ARTICLELINK', $row['article_morelink'] ? 'index.php?' . setGetArticleAid($row) : ''); // article category $content['alink']['tr'][$key] = render_cnt_template($content['alink']['tr'][$key], 'CATEGORY', html_specialchars($content['struct'][$row['article_cid']]['acat_name'])); // Image Caption, Alt, Title $content['alink']['tr'][$key] = render_cnt_template($content['alink']['tr'][$key], 'CAPTION', $row['article_image']['list_caption']); $content['alink']['tr'][$key] = render_cnt_template($content['alink']['tr'][$key], 'CAPTION_ALT', $content['alink']['caption'][1]); $content['alink']['tr'][$key] = render_cnt_template($content['alink']['tr'][$key], 'CAPTION_TITLE', $content['alink']['caption'][3]); // article class based on keyword *CSS-classname* $row['article_class'] = get_css_keywords($row['article_keyword']); $row['article_class'] = count($row['article_class']) ? implode(' ', $row['article_class']) : ''; $content['alink']['tr'][$key] = render_cnt_template($content['alink']['tr'][$key], 'CLASS', $row['article_class']); break;