Go Back   vb.org Archive > vBulletin 4 Discussion > vB4 Programming Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 06-16-2011, 01:56 PM
Meestor_X Meestor_X is offline
 
Join Date: Apr 2006
Posts: 94
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Adding Full CKEditor to CMS Static Page editor

So, tried this in 4.1.3 and it worked fine except that the CKEditor CSS was quite messed up with vb's CSS. I figured once vb had integrated CKEditor they probably would fix all the CSS issues. I was right.

Under 4.1.3, I had only uploaded CKEditor to a forum sub-folder, and done 2 simple changes to the vbcms_content_staticpage_inline template.

First was, changing, at the top of the template:
PHP Code:
<div class="fullwidth">
        {
vb:raw editbar}
    </
div
to:
PHP Code:
<div class="fullwidth">
        {
vb:raw editbar}
                <
script type="text/javascript" src="/testvb/ckeditor/ckeditor.js"></script>
    </
div
and changing:
PHP Code:
<div class="blockrow">
                    <
label class="quarter" for="pagetext">{vb:rawphrase content}: </label>
                    <
div class="threequarters"><textarea  name="pagetext" cols="80" rows="20">{vb:raw  pagetext}</textarea>
                    </
div>
                </
div
to:
PHP Code:
<div class="blockrow">
                    <
label class="quarter" for="pagetext">{vb:rawphrase content}: </label>
                    <
div class="threequarters"><textarea  class="ckeditor" name="pagetext" cols="80" rows="20">{vb:raw  pagetext}</textarea>
                    </
div>
                </
div
So today I upgraded my test site to 4.1.4 to see what would happen.

CSS is fixed, but toolbar icons are missing. Toolbar functions all work, but are missing the proper icon.

Any suggestions on what to do to fix this?


Thanks!

-Andy.
Reply With Quote
  #2  
Old 06-16-2011, 03:07 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

It looks like you are trying to add all the other buttons, but do you have the images for them? If you look at the sprint.png file here, I don't think it has the images you need - https://www.vbulletin.com/forum/imag...tor/sprite.png That is the default that comes with vbulletin. I think you will need to get another sprite file that has the additional images.

Actually, I tried this. The problem is all the buttons are using this CSS as default:
HTML Code:
.cke_skin_kama span:not(.cke_browser_ie) .cke_button .cke_icon {    background: url("images/editor/sprite.png") no-repeat scroll left top transparent;}
And it is overriding this (which I think is incorrect also):
HTML Code:
.cke_skin_kama .cke_button .cke_icon {    background-image: url("icons.png");    background-position: 100px 50%;    background-repeat: no-repeat;    cursor: default;
... }
To fix, you need to edit the clientscript/ckeditor/skins/kama/editor.css file to not exclude the icons.css file. Then you need to edit the icons.css file and do a find replace of ".cke_skin_kama" and replace with ".cke_skin_kama span:not(.cke_browser_ie)" and also add a background image for all the icons of "background-image: url("icons.png");". Save. Upload. That will also replace all the images that vb had made for the editor, but I didn't feel like going through the icons.css file and finding the vb made ones and deleting them from the file.
Reply With Quote
  #3  
Old 06-16-2011, 07:42 PM
Meestor_X Meestor_X is offline
 
Join Date: Apr 2006
Posts: 94
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks, Lynne for your fast answer.

Where do I add "background-image: url("icons.png");" ? Can't I just change that in editor.css from "sprite.png" to "icons.png" (after copying icons.png to the appropriate folder) on the line you quoted?
Reply With Quote
  #4  
Old 06-16-2011, 08:21 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I made the changes in the file icons.css since I was in there anyway. But, you can do it however you want. I was just doing a quick test to see how to get it to work. I don't know if it was the best way - I just know I found *a* way to get it to work.
Reply With Quote
  #5  
Old 06-19-2011, 06:10 AM
Meestor_X Meestor_X is offline
 
Join Date: Apr 2006
Posts: 94
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks, Lynne.

I must have misunderstood a step, as I have not got it working from your instructions. I think I still am missing where to put "background-image: url("icons.png");" You are saying that you put it in icons.css and it worked. Where exactly?
Reply With Quote
  #6  
Old 06-19-2011, 04:07 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I entered it for each definition.

HTML Code:
.cke_skin_kama span:not(.cke_browser_ie) .cke_button_source .cke_icon
{
    background-position: 0 0;
    background-image: url("icons.png");
}
Reply With Quote
  #7  
Old 06-23-2011, 12:53 PM
HouseAddict HouseAddict is offline
 
Join Date: Jul 2008
Posts: 31
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

How do I, instead of this full blown editor:

http://img706.imageshack.us/img706/3...reen000319.jpg

include the regular, customized one with minimal options (that shows up everywhere else in cms/forum):

http://img863.imageshack.us/img863/211/screen000320.jpg

--------------- Added [DATE]1308838536[/DATE] at [TIME]1308838536[/TIME] ---------------

Quote:
Originally Posted by Lynne View Post
It looks like you are trying to add all the other buttons, but do you have the images for them? If you look at the sprint.png file here, I don't think it has the images you need - https://www.vbulletin.com/forum/imag...tor/sprite.png That is the default that comes with vbulletin. I think you will need to get another sprite file that has the additional images.

Actually, I tried this. The problem is all the buttons are using this CSS as default:
HTML Code:
.cke_skin_kama span:not(.cke_browser_ie) .cke_button .cke_icon {    background: url("images/editor/sprite.png") no-repeat scroll left top transparent;}
And it is overriding this (which I think is incorrect also):
HTML Code:
.cke_skin_kama .cke_button .cke_icon {    background-image: url("icons.png");    background-position: 100px 50%;    background-repeat: no-repeat;    cursor: default;
... }
To fix, you need to edit the clientscript/ckeditor/skins/kama/editor.css file to not exclude the icons.css file. Then you need to edit the icons.css file and do a find replace of ".cke_skin_kama" and replace with ".cke_skin_kama span:not(.cke_browser_ie)" and also add a background image for all the icons of "background-image: url("icons.png");". Save. Upload. That will also replace all the images that vb had made for the editor, but I didn't feel like going through the icons.css file and finding the vb made ones and deleting them from the file.

And that didn't work for me either... I still have those missing icons showing up.
Reply With Quote
  #8  
Old 07-05-2011, 12:22 AM
HouseAddict HouseAddict is offline
 
Join Date: Jul 2008
Posts: 31
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Even created a request for that, but no luck so far:

http://tracker.vbulletin.com/browse/VBIV-12549
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 11:14 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04053 seconds
  • Memory Usage 2,250KB
  • Queries Executed 13 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (5)bbcode_html
  • (4)bbcode_php
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (8)post_thanks_box
  • (8)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (8)post_thanks_postbit_info
  • (8)postbit
  • (8)postbit_onlinestatus
  • (8)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete