• 17-08-2010, 19:28:17
    #10
    Hyperion sorunu başka türlü çözmek üzereyim ufak bir kaç detay kaldı.Javascript konusunda yardımın gerekiyor.


    şuan çalışan kod:
    <textarea rows="8" cols="40" name="<?php echo $result->field_name; ?>" id="description" class="<?php if($result->field_req) echo 'required' ?>"><?php if(isset($_POST[$result->field_name])) echo $_POST[$result->field_name]; ?></textarea>
    
                <div class="clr"></div>
    					
    	<script type="text/javascript">
    			<script type="text/javascript">
    		//<![CDATA[
    		function _deans_fckeditor_load(){
    			CKEDITOR.replace('comment',
    				{
    				height : '120px',
    skin : 'kama',
    extraPlugins : 'wpmore',
    disableNativeSpellChecker : false,
    //colorButton_enableMore : true,
    toolbar_MyToolBar :
    [
    	['Styles', 'Font','FontSize'],
    ['Bold','Italic','Strike'],['TextColor','BGColor']],
    toolbar : 'MyToolBar'
    				});
    
    		CKEDITOR.on( 'instanceReady', function( ev )
    		{
    			var dtd = CKEDITOR.dtd;
    			for ( var e in CKEDITOR.tools.extend( {}, dtd.$block, dtd.$listItem, dtd.$tableContent ) )
    			{
    				ev.editor.dataProcessor.writer.setRules( e,
    					{
    						indent : true,
    						breakBeforeOpen : true,
    						breakAfterOpen : false,
    						breakBeforeClose : false,//!dtd[ e ][ '#' ],
    						breakAfterClose : true					});
    			}
    			ev.editor.dataProcessor.writer.setRules( 'br',
    				{
    					breakAfterOpen : true
    				});
    			ev.editor.dataProcessor.writer.setRules( 'pre',
    				{
    				  indent: false
    				});
    		});
    		}
    		_deans_fckeditor_load();
    		//]]>
    		</script>
    			<script type="text/javascript">
    		//<![CDATA[
    		function _ckeditor_updateelement()
    		{
    			CKEDITOR.instances.comment.updateElement();
    		}
    		var submitbtn = document.getElementById('submit');
    		if (submitbtn)
    		{
    			submitbtn.onclick = _ckeditor_updateelement;
    		}
    					var container = document.getElementById('comment').parentNode;
    			if (container)
    			{
    				var insert = document.createElement('div');
    				insert.id = 'promote_ckeditor';
    				insert.innerHTML = 'This visual editor brought to you by <a href="http://www.deanlee.cn/wordpress/fckeditor-for-wordpress-plugin/" target="_blank">fckeditor for wordpress plugin</a>';
    				container.appendChild(insert);
    			}
    			//]]>
    	</script>
            <?php 
            break; 
    
            } 
            ?>
    Yeni bir editor yükledim istediğim sayfaya değil ama sitemin başka sayfasında otomatik olarak geldi.Oradaki javascript kodlarını alıp istediğim yere yapıştırdım
    editor geldi yanlız benim aldığım sayfa yorum gönder sayfası oraya göre dizayn edilmiş editör gözüküyor ama yazılanları text alanına almıyor sanırım gönder butonuna bastığımda şöyle bir hata alıyorum.

    Parse error: syntax error, unexpected T_GLOBAL in /home/public_html/wp-content/themes/classipress/includes/form/step3.php on line 1
    javascript kodlarını aşağıdaki satıra göre düzenlemem gerekiyor.

    <textarea rows="8" cols="40" name="<?php echo $result->field_name; ?>" id="description" class="<?php if($result->field_req) echo 'required' ?>"><?php if(isset($_POST[$result->field_name])) echo $_POST[$result->field_name]; ?></textarea>
    
                <div class="clr"></div>
  • 17-08-2010, 20:05:37
    #11
    Üyeliği durduruldu
    CKEDITOR.replace('comment', 
                    { 
                    height : '120px',
    kısmını

    CKEDITOR.replace('description', 
                    { 
                    height : '120px',
    yap...
    var container = document.getElementById('comment').parentNode; kısmını da

    var container = document.getElementById('description').parentNode; yap...

    olmazsa pm den teamwiever id - pw at team dan yapmaya çalışayım
  • 18-08-2010, 13:52:08
    #12
    Hyperion adlı üyeden alıntı: mesajı görüntüle
    olmazsa pm den teamwiever id - pw at team dan yapmaya çalışayım
    Kardeş çok saol sorunu çözdüm.Olmamasının sebebi post ettiği dosya bozulmuş o yüzden hata veriyormuş.Şuan çalıştı sorun yok.Yardımların için tekrar saol.İyi çalışmalar.