MyBB Community Forums

Full Version: Integrate Editor WYSIWYG with MyBB
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5 6 7 8 9
@krewe

Plz change

require_once(MYBB_ROOT."admin/inc/functions_themes.php");

to

require_once(MYBB_ADMIN_DIR."inc/functions_themes.php");

Because i don´t use default admin folder

path error of smiley_path if use CDN

beta 4 not work for me too...
beta 2 work...

i check here why not work...
because need files in lang folder

Because my Brownser is pt-br...
Than editor load --> lang/pt-br.js

Get lang folder of beta 2 and put in beta 4... will work

@krewe

I need something to use in my forum

Change
[video=youtube][/video] to [youtube][/youtube]
[video=vimeo][/video] to [vimeo][/vimeo] etc...
and add nicovideo [nicovideo][/nicovideo]


change
[/align=center][/align] to [center][/center] etc...

How i can make this? what i need edit?

i need add spoiler tag...

something this below

insertSpoiler: function()
    {
        selectedText = this.getSelectedText($(this.textarea));
        title = prompt("Por favor digite a origem do spoiler.", "");

        if(title)
        {
             text = selectedText;
            if(title && text)
            {
                 this.performInsert("[spoiler]="+title+"]"+text+"[/spoiler]", "", true, false);
            }
			else
			{
			 this.performInsert("[spoiler]="+title+"]    [/spoiler]", "", true, false);
			 }
		}
		
        if(!title)
		{
             text = selectedText;
             if(text)			 
		    {
			     this.performInsert("[spoiler]"+text+"[/spoiler]", "", true, false);
			}
			else
			{
			     this.performInsert("[spoiler]    [/spoiler]", "", true, false);
			}
		}	

    },

thanks...
(2012-06-26, 05:58 PM)martec Wrote: [ -> ]@krewe

Plz change

require_once(MYBB_ROOT."admin/inc/functions_themes.php");

to

require_once(MYBB_ADMIN_DIR."inc/functions_themes.php");

Because i don´t use default admin folder
Fixed in BETA5.
Quote:path error of smiley_path if use CDN
CDN? Only thing I know of an acronym is Common Delivery Network.
Quote:i check here why not work...
because need files in lang folder

Because my Brownser is pt-br...
Than editor load --> lang/pt-br.js

Get lang folder of beta 2 and put in beta 4... will work
All lang files are back in to insure multi-language support. If anyone is absolutely sure that their user-base will only be a specific language, you can get rid of what you don't need. Having all of the lang files there does not affect bandwidth or performance. Only ONE is loaded at any give time for a user based on their language.
Quote:@krewe

I need something to use in my forum

Change
[video=youtube][/video] to [youtube][/youtube]
[video=vimeo][/video] to [vimeo][/vimeo] etc...
and add nicovideo [nicovideo][/nicovideo]


change
[/align=center][/align] to [center][/center] etc...

How i can make this? what i need edit?
All of those changes would require editing the mybb CKEditor plugin. It handles the translation between HTML and bbcode. The best thing to do is look at the source (since the delivered version is packed) available under MyBB_CKEditor/ckeditor/_source/plugins/mybb/plugin.js

I can take a look at modifying a version for you, but it's not something I would support since it doesn't match MyBB's syntax.
Quote:i need add spoiler tag...

something this below

insertSpoiler: function()
    {
        selectedText = this.getSelectedText($(this.textarea));
        title = prompt("Por favor digite a origem do spoiler.", "");

        if(title)
        {
             text = selectedText;
            if(title && text)
            {
                 this.performInsert("[spoiler]="+title+"]"+text+"[/spoiler]", "", true, false);
            }
			else
			{
			 this.performInsert("[spoiler]="+title+"]    [/spoiler]", "", true, false);
			 }
		}
		
        if(!title)
		{
             text = selectedText;
             if(text)			 
		    {
			     this.performInsert("[spoiler]"+text+"[/spoiler]", "", true, false);
			}
			else
			{
			     this.performInsert("[spoiler]    [/spoiler]", "", true, false);
			}
		}	

    },

thanks...
I was planning to create a spoiler plugin as we use a spoiler tag on our forum as well. The problem is whether to make it full WYSIWYG or not. There are so many implementations of spoiler tags out there. To just insert the tags themselves is very simple to do, and I can get an example uploaded to try out.
(2012-06-27, 02:27 AM)krewe Wrote: [ -> ]Fixed in BETA5.
thanks

(2012-06-27, 02:27 AM)krewe Wrote: [ -> ]CDN? Only thing I know of an acronym is Common Delivery Network.
something this
http://community.mybb.com/thread-94678.html

(2012-06-27, 02:27 AM)krewe Wrote: [ -> ]All of those changes would require editing the mybb CKEditor plugin. It handles the translation between HTML and bbcode. The best thing to do is look at the source (since the delivered version is packed) available under MyBB_CKEditor/ckeditor/_source/plugins/mybb/plugin.js
thanks...
i will check here...

(2012-06-27, 02:27 AM)krewe Wrote: [ -> ]I was planning to create a spoiler plugin as we use a spoiler tag on our forum as well. The problem is whether to make it full WYSIWYG or not. There are so many implementations of spoiler tags out there. To just insert the tags themselves is very simple to do, and I can get an example uploaded to try out.

ok i will wait...

thanks..
(2012-06-27, 02:37 AM)martec Wrote: [ -> ]
(2012-06-27, 02:27 AM)krewe Wrote: [ -> ]CDN? Only thing I know of an acronym is Common Delivery Network.
something this
http://community.mybb.com/thread-94678.html

In that case, I will have to add another Admin setting for a base URL to the images. You would only need to use it when your images are stored on another server such as the example above.
(2012-06-27, 02:47 AM)krewe Wrote: [ -> ]
(2012-06-27, 02:37 AM)martec Wrote: [ -> ]
(2012-06-27, 02:27 AM)krewe Wrote: [ -> ]CDN? Only thing I know of an acronym is Common Delivery Network.
something this
http://community.mybb.com/thread-94678.html

In that case, I will have to add another Admin setting for a base URL to the images. You would only need to use it when your images are stored on another server such as the example above.

thanks...
Rather than create a whole new package for this, you can try the attached files which adds a Smiley Base URL setting in the ACP to test if it works.

This should be the base path/URL to the point where your smiley images are defined.

For example:
If your smiley images have the default of images/smilies/<image name> defined, and your base URL to the forum is /forum/, then the Smiley Base URL should be "/forum/". If hosted on another server, you would enter the full URL such as "http://mysite.somecdn.com/forum/".

Place the ckeditor.php file in your inc/plugins folder.
Place the ckeditor.lang.php file in your inc/languages/english/admin folder.

Also, anyone interested in providing translations, let me know and I can give you the individual files for both MyBB and CKEditor (about 5 in total I think).
(2012-06-27, 05:19 AM)krewe Wrote: [ -> ]Rather than create a whole new package for this, you can try the attached files which adds a Smiley Base URL setting in the ACP to test if it works.

This should be the base path/URL to the point where your smiley images are defined.

For example:
If your smiley images have the default of images/smilies/<image name> defined, and your base URL to the forum is /forum/, then the Smiley Base URL should be "/forum/". If hosted on another server, you would enter the full URL such as "http://mysite.somecdn.com/forum/".

Place the ckeditor.php file in your inc/plugins folder.
Place the ckeditor.lang.php file in your inc/languages/english/admin folder.

Also, anyone interested in providing translations, let me know and I can give you the individual files for both MyBB and CKEditor (about 5 in total I think).

i tested here...
but not work correctly...

if i put

"http://mycdn.com/"

path of smilies: http://mycdn.com/http://mycdn.com/images...es/xxx.gif

if i put

"/"

path of smilies : http://localhost/http://mycdn.com/images...es/xxx.gif
(2012-06-27, 05:53 AM)martec Wrote: [ -> ]
(2012-06-27, 05:19 AM)krewe Wrote: [ -> ]Rather than create a whole new package for this, you can try the attached files which adds a Smiley Base URL setting in the ACP to test if it works.

This should be the base path/URL to the point where your smiley images are defined.

For example:
If your smiley images have the default of images/smilies/<image name> defined, and your base URL to the forum is /forum/, then the Smiley Base URL should be "/forum/". If hosted on another server, you would enter the full URL such as "http://mysite.somecdn.com/forum/".

Place the ckeditor.php file in your inc/plugins folder.
Place the ckeditor.lang.php file in your inc/languages/english/admin folder.

Also, anyone interested in providing translations, let me know and I can give you the individual files for both MyBB and CKEditor (about 5 in total I think).

i tested here...
but not work correctly...

if i put

"http://mycdn.com/"

path of smilies: http://mycdn.com/http://mycdn.com/images...es/xxx.gif

if i put

"/"

path of smilies : http://localhost/http://mycdn.com/images...es/xxx.gif
It looks like you are using the full URL to the smiley images. That won't work the way the plugin is configured currently. You'll need to update them to have relative paths. Unfortunately, that will also mean that you can't see the images in your ACP unless you also make them available on your local server.

I've tested on my end with local paths as well as a URL, and it works for me.

Each of my smilies have the default location of "images/smilies/<image>". When using a remote server, I still have copies on my local server so that they show up in ACP.

I'll have to see if the smiley_path config option in CKEditor is required. It defaults to '/' if not defined, which would still prevent the images from loading in your case.
(2012-06-27, 06:29 AM)krewe Wrote: [ -> ]
(2012-06-27, 05:53 AM)martec Wrote: [ -> ]
(2012-06-27, 05:19 AM)krewe Wrote: [ -> ]Rather than create a whole new package for this, you can try the attached files which adds a Smiley Base URL setting in the ACP to test if it works.

This should be the base path/URL to the point where your smiley images are defined.

For example:
If your smiley images have the default of images/smilies/<image name> defined, and your base URL to the forum is /forum/, then the Smiley Base URL should be "/forum/". If hosted on another server, you would enter the full URL such as "http://mysite.somecdn.com/forum/".

Place the ckeditor.php file in your inc/plugins folder.
Place the ckeditor.lang.php file in your inc/languages/english/admin folder.

Also, anyone interested in providing translations, let me know and I can give you the individual files for both MyBB and CKEditor (about 5 in total I think).

i tested here...
but not work correctly...

if i put

"http://mycdn.com/"

path of smilies: http://mycdn.com/http://mycdn.com/images...es/xxx.gif

if i put

"/"

path of smilies : http://localhost/http://mycdn.com/images...es/xxx.gif
It looks like you are using the full URL to the smiley images. That won't work the way the plugin is configured currently. You'll need to update them to have relative paths. Unfortunately, that will also mean that you can't see the images in your ACP unless you also make them available on your local server.

I've tested on my end with local paths as well as a URL, and it works for me.

Each of my smilies have the default location of "images/smilies/<image>". When using a remote server, I still have copies on my local server so that they show up in ACP.

ok...
i will change path...

thanks..
I just did a test by setting smiley_path to '' and it defaults to the smiley plugin path. So unfortunately you will have to use relative paths for each of your smilies, and then set the Smiley Base URL to the fill in the rest.
Pages: 1 2 3 4 5 6 7 8 9