[RC3] eMosbat TinyMCE Integration (WYSIWYG editor)

A place for MOD Authors to post and receive feedback on MODs still in development. No MODs within this forum should be used within a live environment!
Anti-Spam Guide
User avatar
emosbat
Registered User
Posts: 564
Joined: Sat Jan 28, 2012 1:25 pm

Re: [BETA] eMosbat's TinyMCE Integration

Post by emosbat »

keith10456 wrote:On your demo board, I'm having a problem left-aligning an inserted image with text (so the text is wraps around the image).

I'm attempting align the image via the Insert options (upon clicking the image icon).

When I preview, sometime I get a server error, and sometime it just goes back to the default setting.

I'm not sure if it actually posts correctly or not because posts must be approved by the admin before they are displayed.

Otherwise, it's looks pretty good ;)
I think you send your post just in same time I uploaded new version :lol:
you may try testing again and should be able to post without approvement, let me know ;)
alignment is not possible using tinymce's image dialogbox because phpBB have not alignment bbcodes by default. for this case you should define a bbcode to align contents and use it in editor.
elazard
Registered User
Posts: 73
Joined: Sat Jan 19, 2008 5:00 pm

Re: [BETA] eMosbat's TinyMCE Integration

Post by elazard »

emosbat wrote:
elazard wrote:Hi i use a custom template inherited from subsilver 2 i have no posting_editor.html for both of them.
Could you please help me?

Thanks for your help and for your work :D


edit anyway i tried to make the changes in posting_body.html it's now not showing any buttons after installation (no new or old bbcodes buttons) and i cant check config because of an error when clicking the acp tab

Code: Select all

[phpBB Debug] PHP Warning: in file [ROOT]/includes/acp/acp_emotinymce.php on line 159: Invalid argument supplied for foreach()
thanks again for your help
Hello my friend
this mod is not compatible with subsilver template yet, but it will be available very soon (hope in next minor reversion).
edit: subsilver2 support added in new version ;)
/

regarding error message, did you run `emotinymce_install.php` installation proccess? and what is your phpbb version? do you use any other language rather than english? and did you copied language files (in case of manual installation)?
Hi thanks for your answer i made the changes to posting_body.html but it's still not showing any buttons neither the old ones (default) or the new ones. I sent the language files in my french language directory so now i'm able to use the acp tab and it says it's activated but still no luck

My version of phpbb is 3.0.10, language french and i ve run the installation file
User avatar
keith10456
Registered User
Posts: 2315
Joined: Thu Feb 24, 2005 6:55 pm

Re: [BETA] eMosbat's TinyMCE Integration

Post by keith10456 »

The admin approval thingy is now fixed. However, inserted images still cannot be aligned (wrapped around text). As before, it displays correctly at first but if you preview or make a post it goes back to the default (no alignment).
User avatar
emosbat
Registered User
Posts: 564
Joined: Sat Jan 28, 2012 1:25 pm

Re: [BETA] eMosbat's TinyMCE Integration

Post by emosbat »

elazard wrote: Hi thanks for your answer i made the changes to posting_body.html but it's still not showing any buttons neither the old ones (default) or the new ones. I sent the language files in my french language directory so now i'm able to use the acp tab and it says it's activated but still no luck

My version of phpbb is 3.0.10, language french and i ve run the installation file
I think you didn't copied tiny_mce folder, emo_tinymce.js and emotinymce_editor.html in custom theme folder. first copy original post_body theme from your backup then download latest version and try applying subsilver2 changes to your theme again. do not forget to copy files from subsilver2 folder to your theme folder. finaly refresh your theme from acp. hope this help :roll:
Last edited by emosbat on Thu Aug 09, 2012 6:01 pm, edited 1 time in total.
User avatar
emosbat
Registered User
Posts: 564
Joined: Sat Jan 28, 2012 1:25 pm

Re: [BETA] eMosbat's TinyMCE Integration

Post by emosbat »

keith10456 wrote:The admin approval thingy is now fixed. However, inserted images still cannot be aligned (wrapped around text). As before, it displays correctly at first but if you preview or make a post it goes back to the default (no alignment).
in phpBB we need custom bbcodes to align texts/images. there is no default bbcode for alignment in a clean installation. as I said (end-user) should add custom alignment bbcode to make it possible ;)
actually I could remove alignment option in that dialogbox :?
User avatar
keith10456
Registered User
Posts: 2315
Joined: Thu Feb 24, 2005 6:55 pm

Re: [BETA] eMosbat's TinyMCE Integration

Post by keith10456 »

emosbat wrote:
keith10456 wrote:The admin approval thingy is now fixed. However, inserted images still cannot be aligned (wrapped around text). As before, it displays correctly at first but if you preview or make a post it goes back to the default (no alignment).
in phpBB we need custom bbcodes to align texts/images. there is no default bbcode for alignment in a clean installation. as I said (end-user) should add custom alignment bbcode to make it possible ;)
actually I could remove alignment option in that dialogbox :?
On my site I currently have custom bbcode from alignment... No biggie there.

As you stated though, I think you should remove the alignment options from the dialog box. Otherwise, members will think they can use them when they can't.
elazard
Registered User
Posts: 73
Joined: Sat Jan 19, 2008 5:00 pm

Re: [BETA] eMosbat's TinyMCE Integration

Post by elazard »

ok working i had to deactivate and reactivate the mod in acp as strange as it sounds :) thanks again for the time you spent helping me and for that mod :)
User avatar
emosbat
Registered User
Posts: 564
Joined: Sat Jan 28, 2012 1:25 pm

Re: [BETA] eMosbat's TinyMCE Integration

Post by emosbat »

keith10456 wrote: On my site I currently have custom bbcode from alignment... No biggie there.

As you stated though, I think you should remove the alignment options from the dialog box. Otherwise, members will think they can use them when they can't.
yes I should remove them :?
elazard wrote:ok working i had to deactivate and reactivate the mod in acp as strange as it sounds :) thanks again for the time you spent helping me and for that mod :)
great :) hope you like it.
misiek90
Registered User
Posts: 12
Joined: Wed Aug 08, 2012 11:37 pm

Re: [BETA] eMosbat's TinyMCE Integration

Post by misiek90 »

@emosbat In the future, plans to add options to choose fonts?
User avatar
emosbat
Registered User
Posts: 564
Joined: Sat Jan 28, 2012 1:25 pm

Re: [BETA] eMosbat's TinyMCE Integration

Post by emosbat »

misiek90 wrote:@emosbat In the future, plans to add options to choose fonts?
there is no default BBCode for fonts in clean phpBB installation so we can not add it by default. but if you add a custom font bbcode, will automatically show on toolbar
User avatar
emosbat
Registered User
Posts: 564
Joined: Sat Jan 28, 2012 1:25 pm

Re: [BETA] eMosbat's TinyMCE Integration

Post by emosbat »

quick quote feature added and I think current features are enough for a release version.
will change it to RC after some more testing.
misiek90
Registered User
Posts: 12
Joined: Wed Aug 08, 2012 11:37 pm

Re: [BETA] eMosbat's TinyMCE Integration

Post by misiek90 »

emosbat wrote:
misiek90 wrote:@emosbat In the future, plans to add options to choose fonts?
there is no default BBCode for fonts in clean phpBB installation so we can not add it by default. but if you add a custom font bbcode, will automatically show on toolbar
It's a shame: (A could be done, the allowance of an additional instruction? In commercial scripts is therefore available for phpBB3 would be nice :)
User avatar
emosbat
Registered User
Posts: 564
Joined: Sat Jan 28, 2012 1:25 pm

Re: [BETA] eMosbat's TinyMCE Integration

Post by emosbat »

misiek90 wrote:
emosbat wrote:
misiek90 wrote:@emosbat In the future, plans to add options to choose fonts?
there is no default BBCode for fonts in clean phpBB installation so we can not add it by default. but if you add a custom font bbcode, will automatically show on toolbar
It's a shame: (A could be done, the allowance of an additional instruction? In commercial scripts is therefore available for phpBB3 would be nice :)
if phpbb include it in next version I can easily add it to MOD :D
User avatar
EXreaction
Former Team Member
Posts: 5666
Joined: Sun Aug 21, 2005 9:31 pm
Location: Wisconsin, U.S.
Name: Nathan

Re: [BETA] eMosbat's TinyMCE Integration

Post by EXreaction »

emosbat wrote:
EXreaction wrote: posting_editor.html

Code: Select all

rg = new RegExp(escapeReg("{smiley.A_SMILEY_CODE}"),"g");
replace with

Code: Select all

rg = new RegExp("^"+escapeReg("{smiley.A_SMILEY_CODE}")+"$","g");
oh I forgot to add this fix.
this just occured on this smiley ( :oops: ) for me.
I just added your fix, thanks!
/
edit:
seems not working well :?
your suggestion process whole string for match and this will cause problem in previewing/resubmiting posts. this will not process smilies/custom bbcodes when clicking preview button :( because then we send whole entered text to regex for match and replacement. hope find a better solution for this problem.
Did you ever figure out a solution? Could you show me an example of where this caused issues? I dont have my computer setup right now because I am in the middle of moving, but I can maybe get this figured out with you.

You also mentioned custom bbcodes, I cant remember if I asked you, but are the custom bbcodes parsed or just displayed as bbcode?
User avatar
emosbat
Registered User
Posts: 564
Joined: Sat Jan 28, 2012 1:25 pm

Re: [BETA] eMosbat's TinyMCE Integration

Post by emosbat »

EXreaction wrote:
Did you ever figure out a solution? Could you show me an example of where this caused issues? I dont have my computer setup right now because I am in the middle of moving, but I can maybe get this figured out with you.

You also mentioned custom bbcodes, I cant remember if I asked you, but are the custom bbcodes parsed or just displayed as bbcode?
hi Exreaction,
yes I fixed that. it was a mistake that I trimed out strings before replacement so regex didn't works correctly because we have two spaces around smiley codes! here is new code:

Code: Select all

function custom_phpbb_bbcode2html(s)
{
		s = (s[0]!=' ' || s==''?' ':'')+s+(s[s.length-1]!=' ' || s==''?' ':'');

		<!-- BEGIN smiley -->
		s = build_bbcode_regex(s,escapeReg(" {smiley.A_SMILEY_CODE} ")," <img src=\"{smiley.SMILEY_IMG}\" /> ");
		<!-- END smiley	-->

		return s; 
}
regarding custom bbcodes:
display them. can not parse them without exta code.
acually we then need an AI to do this to understand
how should parse a custom bbcode without exta code :mrgreen:
but it is easy to add customized parsing for a bbcode using custom_phpbb_bbcode2html and custom_phpbb_html2bbcode functions.

Return to “[3.0.x] MODs in Development”