Example #1
0
    if (count($custom_includes = get_tmpl_files(PHPWCMS_TEMPLATE . 'inc_script/frontend_render', 'php'))) {
        foreach ($custom_includes as $value) {
            include_once PHPWCMS_TEMPLATE . 'inc_script/frontend_render/' . $value;
        }
    }
}
if (count($phpwcms['modules_fe_render'])) {
    foreach ($phpwcms['modules_fe_render'] as $value) {
        include_once $value;
    }
}
// Final Render Device
$content['all'] = render_device($content['all']);
// And again check against possible {PHP needs to be rendered
if (strpos($content['all'], 'PHP') !== false) {
    $content['all'] = render_PHPcode($content["all"]);
}
// render frontend edit related content and JavaScript
if (FE_EDIT_LINK) {
    init_frontend_edit_js();
    $content['all'] .= LF . '<div id="fe-link" class="disabled"></div>' . LF;
}
// insert description meta tag if not definied
if (empty($block['custom_htmlhead']['meta.description']) && !empty($content["struct"][$aktion[0]]["acat_info"]) && !stristr($block["htmlhead"], '"description"')) {
    $content['opengraph']['description'] = $content["struct"][$aktion[0]]["acat_info"];
    set_meta('description', $content["struct"][$aktion[0]]["acat_info"]);
}
// add structure level keywords
if (!empty($content['struct'][$content["cat_id"]]['acat_keywords'])) {
    $content['all_keywords'] .= ', ' . $content['struct'][$content["cat_id"]]['acat_keywords'];
}
Example #2
0
function clean_replacement_tags($text = '', $allowed_tags = '<a><b><i><strong>')
{
    // strip out special replacement tags
    $text = render_PHPcode($text);
    $text = str_replace('<td>', '<td> ', $text);
    $text = strip_tags($text, $allowed_tags);
    $text = str_replace('|', ' ', $text);
    $search = array('/\\{.*?\\}/si', '/\\[ID.*?\\/ID\\]/si', '/(\\s+)/i', '/\\[img=(\\d+)(.*?){0,1}\\](.*?)\\[\\/img\\]/i', '/\\[img=(\\d+)(.*?){0,1}\\]/i', '/\\[download=(.*?)\\/\\]/i', '/\\[download=(.*?)\\](.*?)\\[\\/download\\]/is');
    $replace = array('', '', ' ', '$3', '', '', '$2');
    $text = preg_replace($search, $replace, $text);
    return trim($text);
}