Example #1
0
    $f_status = '1';
    $f_page_type = '1';
    $f_cat = array();
    $f_password = '';
    $f_comment_allow = '1';
    $f_ping_allow = '0';
    $page_menu_order = '0';
    $f_feed_allow = '1';
    $f_page_parent = '';
    $f_user_id = $MSO->data['session']['users_id'];
}
// получим все опции редактора
$editor_options = mso_get_option('editor_options', 'admin', array());
echo '<h1 class="content">' . t('Создать страницу') . '</h1>';
$f_header = mso_text_to_html($f_header);
$f_tags = mso_text_to_html($f_tags);
$f_all_tags = '';
// все метки
if (function_exists('tagclouds_widget_custom')) {
    $f_all_tags = '
		<script>
			function addTag(t)
			{
				var elem = document.getElementById("f_tags");
				e = elem.value;
				if ( e != "" ) { elem.value = e + ", " + t; }
				else { elem.value = t; };
			}
			function shtags(sh)
			{
				var elem1 = document.getElementById("f_all_tags_max_num");
Example #2
0
     // если нужно задать свое начально форматирование, задайте хук content_replace_chr10_br
     $f_content = mso_hook('content_replace_chr10_br', $f_content);
 } else {
     $f_content = trim($f_content);
     $f_content = str_replace(chr(10), "<br>", $f_content);
     $f_content = str_replace(chr(13), "", $f_content);
 }
 // pr($f_content, true);
 // глюк FireFox исправлем замену абсолютного пути src на абсолютный
 $f_content = str_replace('src="../../', 'src="' . $MSO->config['site_url'], $f_content);
 $f_content = str_replace('src="../', 'src="' . $MSO->config['site_url'], $f_content);
 // замены из-за мусора FireFox
 $f_content = str_replace('-moz-background-clip: -moz-initial;', '', $f_content);
 $f_content = str_replace('-moz-background-origin: -moz-initial;', '', $f_content);
 $f_content = str_replace('-moz-background-inline-policy: -moz-initial;', '', $f_content);
 $f_header = mso_text_to_html($post['f_header']);
 if (isset($post['f_tags']) and $post['f_tags']) {
     $f_tags = $post['f_tags'];
 } else {
     $f_tags = '';
 }
 if (isset($post['f_menu_order'])) {
     $page_menu_order = (int) $post['f_menu_order'];
 } else {
     $page_menu_order = '';
 }
 if (isset($post['f_slug']) and $post['f_slug']) {
     $f_slug = $post['f_slug'];
 } else {
     $f_slug = mso_slug($f_header);
 }