<?php if (!$action){ echoheader('addnews', $echo['header']); ?> <div id="content_cnr"> <form method="post" name="addnews" action="<?=$PHP_SELF; ?>"> <div class="content-box column-left" style=" width:280px; float:left;"> <div class="content-box-header"><h3><?=$echo['options']; ?></h3></div> <div class="content-box-content"> <div class="tab-content default-tab"> <fieldset id="options"> <? echo run_actions('new-advanced-options'); ?> </fieldset> [b]<script type="text/javascript" src="ckeditor/ckeditor.js"></script>[/b] </div> <!-- End #tab3 --> </div> <!-- End .content-box-content --> <input type="hidden" name="mod" value="addnews" /> <input type="hidden" name="action" value="doaddnews" /> </div> <!-- End .content-box --> <div style="float:right; width:520px; margin-bottom:20px;"> <!-- Extra Div voor Rechter Kolom/Tab Content --> <div class="content-box"> <div class="content-box-header"><h3><?=$row['title']; ?></h3> <ul class="content-box-tabs"> <li><a href="#tab1" class="default-tab"><?=$echo['short']; ?></a></li> <li><a href="#tab2"><?=$echo['full']; ?></a></li> </ul> <div class="clear"></div> </div> <!-- Content Box Header --> <div class="content-box-content"> <div class="tab-content default-tab" id="tab1"> <fieldset id="title"> <h4><?=$echo['title']; ?></h4> <input class="input_groot" type="text" name="title" tabindex="1" /> </fieldset> <fieldset id="short"> <h4><?=$echo['short']; ?></h4> <? echo run_filters('new-advanced-options', 'short'); ?> [b] <textarea name="short_story" id="editor1" class="ckeditor" tabindex="4"></textarea> <script type="text/javascript"> CKEDITOR.replace( 'editor1' ); </script>[/b] </fieldset> </div> <!-- Tab 01 --> <div class="tab-content" id="tab2"> <fieldset id="full"> <h4><?=$echo['full']; ?></h4> <? echo run_filters('new-advanced-options', 'full'); ?> [b] <textarea name="full_story" id="editor2" class="ckeditor" tabindex="5"></textarea> <script type="text/javascript"> //<![CDATA[ CKEDITOR.replace( 'editor2', { toolbar : 'Media' }); //]]> </script>[/b] </fieldset> </div> <!-- Tab 02 --> </div> <!-- Content Box Content --> </div> <!-- Content Box --> <div class="content-box"><!-- Start Content Box --> <div class="content-box-header-blauw"> <h3>Opções Extras</h3> <ul class="content-box-tabs"> <li><a href="#tab4" class="default-tab">Extra's</a></li> <li><a href="#tab5">Data / Hora</a></li> <li><a href="#tab6">SEO Url</a></li> </ul> <div class="clear"></div> </div> <!-- End .content-box-header --> <div class="content-box-content"> <div class="tab-content default-tab" id="tab4"> <?php echo run_actions('new-xfields-options', 'admins_xfields', 2);?> </div> <!-- End #tab4 --> <div class="tab-content" id="tab5"> <h4><?=$echo['date']; ?><span>( dia : mes : ano )</span></h4> <? if ($config_use_avatar == 'yes'){ ?> <? } ?> <fieldset id="date"> <input class="input_klein" type="text" name="day" maxlength="2" value="<?=date('d'); ?>" title="<?=$echo['calendar']['day']; ?>" /> <select name="month" title="<?=$echo['calendar']['month']; ?>" id="Items"> <? foreach (array('jan', 'feb', 'mar', 'apr', 'may', 'jun', 'jul', 'aug', 'sep', 'oct', 'nov', 'dec') as $v){ echo '<option value="'.$v.'"'.($v == strtolower(date('M')) ? ' selected' : '').'>'.$echo['calendar'][$v].'</option>'; } ?> </select> <input class="input_klein" type="text" name="year" maxlength="4" value="<?=date('y'); ?>" title="<?=$echo['calendar']['year']; ?>" /> <div class="tussen_divje"></div> <h4><?=$echo['time']; ?><span>( hr : min : sec )</span></h4> <input class="input_klein" type="text" name="hour" maxlength="2" value="<?=date('H', (time() + $config_date_adjust * 60)); ?>" title="<?=$echo['calendar']['hour']; ?>" /> <span class="dubbel">:</span><input class="input_klein" type="text" name="minute" maxlength="2" value="<?=date('i', (time() + $config_date_adjust * 60)); ?>" title="<?=$echo['calendar']['minute']; ?>" /> <span class="dubbel">:</span><input class="input_klein" type="text" name="second" maxlength="2" value="<?=date('s', (time() + $config_date_adjust * 60)); ?>" title="<?=$echo['calendar']['second']; ?>" /> </fieldset> </div> <!-- End #tab5 --> <div class="tab-content" id="tab6"> <?php echo run_actions('new-url-options', 'rufus_AddEdit');?> </div> <!-- End #tab5 --> </div> <!-- End .content-box-content --> </div> <!-- End .content-box --> <fieldset id="actions"> <input class="button" type="submit" value="<?=$echo['add']; ?>" accesskey="s" /> <input class="button" type="button" onclick="preview('addnews');" value="<?=$echo['preview']; ?>" accesskey="p" /> </fieldset> </div> <!-- Extra Div voor Rechter Kolom/Tab content --> </form> </div> <!-- Content CNR --> <?php include("skins/scripts.php"); ?> <? echofooter(); } // ******************************************************************************** // Do add News to DB // ******************************************************************************** if ($action == 'doaddnews'){ if (($added_time = strtotime($day.' '.$month.' '.$year.' '.$hour.':'.$minute.':'.$second)) == -1){ $added_time = (time() + $config_date_adjust * 60); } if (!$title){ $title = substr($short_story, 0, 10).'...'; } $id = $sql->last_insert_id('news', '', 'id') + 1; run_actions('new-save-entry'); $sql->insert(array( 'table' => 'news', 'values' => array( 'date' => $added_time, 'author' => $member['username'], 'title' => replace_news('add', $title), 'short' => strlen(replace_news('add', $short_story)), 'full' => strlen(replace_news('add', $full_story)), 'avatar' => $avatar, 'category' => $category, 'url' => ($url ? namespace($url) : namespace(totranslit($title))), 'hidden' => (($config_approve_news == 'yes' and $member['level'] > 2) ? true : false) ) )); $sql->insert(array( 'table' => 'story', 'values' => array( 'post_id' => $id, 'short' => replace_news('add', $short_story), 'full' => replace_news('add', $full_story) ) )); run_actions('new-save-entry'); foreach($sql->select(array('table' => 'users')) as $row){ $sql->update(array( 'table' => 'users', 'where' => array("username = $member[username]"), 'values' => array('publications' => $row['publications'] + 1) )); } if ($config_send_mail_upon_new == 'yes' and $config_admin_mail){ cute_mail($config_admin_mail, 'New article on '.$config_home_title, langdate($config_timestamp_comment, $added_time). ' A new article was added by '.$member['username']."\n\n". $title."\n\n". replace_news('admin', $short_story)."\n\n". '--'."\n". $config_http_home_url.'?id='.$id ); } msg('info', $echo['headerAdded'], sprintf($echo['headerAddedComplete'], $title, $PHP_SELF.'?mod=editnews&id='.$id)); } ?>
Thu, 05/17/2012 - 02:26
#1
Re: ckeditor buttons not work
Re: ckeditor buttons not work
I used this code with the FCKeditor and it worked perfect.
Re: ckeditor buttons not work
Re: ckeditor buttons not work
/*function focus(){
document.forms[0].title.focus();
}*/