You are not logged in.

#1 2005-08-26 14:55:54

Afraithe
Administrator
From: Skellefteċ, Sweden
Registered: 2005-01-03
Posts: 1976
Website

PunBB gets TinyMCE'd

We have tried implementing TinyMCE in PunBB, just to see how it works. Its avalible to toggle on when you post a new thread or full reply (not quick reply).

It was a bit more work than we thought, but it seems to function quite nicely. The step from PunBB code to PHPBB code isn't big, a regex for the list style elements that you can make in PHPBB (dosn't exist in PunBB) and you come a long way.

If you wan't to know how we have done it, for now youll have to read the source, there is really no specific backend changes.

Quick run down of the things done:

* Include the tinymce script source file as well as the MCImageManager javascript.
* Setup TinyMCE initilization config options.
* Included the functions for converting BBCode to TinyMCE and vice versa.
* Edit the HTML and inserting the toggle link.
* Patched the <form> tags in post.php to run submitForm(this) before running the PunBB process_form function.
* Put the code.gif and tinymce.css in /punbb/style/ folder.

Thats about it.

Please be adviced that this is just a test implementation, its by no means perfect or bug free, just something to do on a boring afternoon smile

Good luck!


Afraithe
TinyMCE Developer
Moxiecode Systems

Offline

 

#2 2005-10-04 21:07:28

Azakur4
Member
Registered: 2005-10-04
Posts: 3

Re: PunBB gets TinyMCE'd

nice work is very nice

Offline

 

#3 2005-10-04 23:17:42

Afraithe
Administrator
From: Skellefteċ, Sweden
Registered: 2005-01-03
Posts: 1976
Website

Re: PunBB gets TinyMCE'd

Thank you, I did some modifications to it today, ive put the functions into an external JS file and fixed some of the regex patterns.

Code:

<script language="Javascript" src="/tinymce/jscripts/tiny_mce/tiny_mce.js"></script>
<script language="Javascript" src="/punbb/include/tinymce_integration.js"></script>

Its still not perfect, I know some stuff that needs to be fixed with the regexps.


Afraithe
TinyMCE Developer
Moxiecode Systems

Offline

 

#4 2005-10-05 08:14:36

Azakur4
Member
Registered: 2005-10-04
Posts: 3

Re: PunBB gets TinyMCE'd

hey man you can make a tuto for install the tinyMCE in punbb only with files necessary, please
i try but my problem was in the parser sad

Last edited by Azakur4 (2005-10-05 18:27:31)

Offline

 

#5 2005-10-07 07:05:44

Azakur4
Member
Registered: 2005-10-04
Posts: 3

Re: PunBB gets TinyMCE'd

hey man you can please i wait your reply

Offline

 

#6 2005-10-07 09:43:23

Afraithe
Administrator
From: Skellefteċ, Sweden
Registered: 2005-01-03
Posts: 1976
Website

Re: PunBB gets TinyMCE'd

Don't have any time to make a tutorial for that, view the source and follow what ive wrote in punbb forum and here. It's not that much you need to do.


Afraithe
TinyMCE Developer
Moxiecode Systems

Offline

 

#7 2005-10-10 22:48:01

Kim Steinhaug
TWG Member
From: Kristiansand, Norway
Registered: 2005-10-04
Posts: 56

Re: PunBB gets TinyMCE'd

Nice work!

I've seen more and more of this PunBB forum lately, and it seems almost every open source project are running one so I'm kinda getting used to it now. And now that TinyMCE is comming as an option for easy integration this might just make me switch from phpBB to PunBB. You make it very temting, big_smile

Mvh,
Kim Steinhaug
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
www.steinhaug.no - www.easywebshop.no - www.easycms.no

Offline

 

#8 2005-11-04 18:29:47

zhiin
Member
Registered: 2005-11-03
Posts: 2

Re: PunBB gets TinyMCE'd

http://tinymce.moxiecode.com/imagemanager/images/moreimages/dogleft.jpg

Offline

 

#9 2005-11-04 18:32:44

zhiin
Member
Registered: 2005-11-03
Posts: 2

Re: PunBB gets TinyMCE'd

Write your message and submit smile

Offline

 

#10 2005-11-28 21:42:48

thbz
Member
Registered: 2005-10-20
Posts: 1

Re: PunBB gets TinyMCE'd

Many thanks Afraithe for implementing TinyMCE in punBB! Here is how I did it (starting of course from your guidelines). Hope this can help other people.

- install TinyMCE.

- install PunBB (e.g in /punbb/).

- copy tinymce_integration.js (http://tinymce.moxiecode.com/punbb/incl … gration.js) into /punbb/include/tinymce_integration.js. You may also try my version of tinymce_integration.js (I added a few regexps for a better code translation).

- copy code.gif (from http://tinymce.moxiecode.com/punbb/style/code.gif) and tinymce.css (from http://tinymce.moxiecode.com/punbb/style/tinymce.css) into /punbb/style.

- in /punbb/include/template/main.tpl, add the following lines just after <pun_head>:

Code:

<!-- tinymce -->
<script language="Javascript" src="/tinymce/jscripts/tiny_mce/tiny_mce.js"></script>
<script language="javascript" type="text/javascript" src="/punbb/include/tinymce_integration.js"></script>
<!-- /tinymce -->

- in /punbb/view_topic.php and /punbb/edit.php, search for the string "process_form(this)" and replace it with "submitForm(this)" (note: submitForm() is defined in tinymce_integration.js).

In the same file, add the following line in the <ul class="bblinks"> block:

Code:

<li><a href="javascript: toggleTinyMCE();">Toggle TinyMCE</a> (Experimental)</li>

- in /punbb/post.php, search for the <form> tags and, before both calls to process_form(this), add a call to submitForm(this). Example:

Code:

onsubmit="submitForm(this); return process_form(this)"

Bugs still to be fixed:
- in Mozilla, after posting, you are not automatically redirected.

I hope I forgot nothing important...

Offline

 

#11 2005-11-28 23:08:23

Afraithe
Administrator
From: Skellefteċ, Sweden
Registered: 2005-01-03
Posts: 1976
Website

Re: PunBB gets TinyMCE'd

Thank thbz, good tutorial.

I know there are still some issues regarding the regexps, ill take a look at it someday.

Regarding the Mozilla not getting redirected bug, its a known browser bug, you could use a javascript redirect instead.


Afraithe
TinyMCE Developer
Moxiecode Systems

Offline

 

#12 2005-11-30 22:58:15

Brother Erryn
Member
Registered: 2005-11-30
Posts: 1

Re: PunBB gets TinyMCE'd

Thanks a bunch for this...it's fitting in nicely to my site redesign. Shame the formatting buttons don't work, though the hotkeys do.

At least it does the same thing here as it does on mine, so it's not something I've done. smile

Offline

 

#13 2005-12-13 01:19:17

Xmion
Member
Registered: 2005-08-31
Posts: 7

Re: PunBB gets TinyMCE'd

Nice tuto

Offline

 

#14 2006-01-03 00:00:49

firehydra2k
Member
Registered: 2006-01-02
Posts: 3

Re: PunBB gets TinyMCE'd

Nice mod.  With a little bit of hacking anyone can get this into any forum.

However, the toggle function is kinda weird for Opera.  It's asks for some function I haven't seen before in the bbcode script:

Code:

TinyMCE_advanced_getEditorTemplate

That's the error message it shoots out (just a little word of warning).

I integrated it nicely into my phpbb forum.  Thanks!

Offline

 

#15 2006-01-03 00:08:49

Afraithe
Administrator
From: Skellefteċ, Sweden
Registered: 2005-01-03
Posts: 1976
Website

Re: PunBB gets TinyMCE'd

In what Opera version?


Afraithe
TinyMCE Developer
Moxiecode Systems

Offline

 

#16 2006-01-03 19:35:52

firehydra2k
Member
Registered: 2006-01-02
Posts: 3

Re: PunBB gets TinyMCE'd

The latest one (8.5).  But I must apologize for not looking at the compatibility chart.  Says it only worked on 9 (preview).  Scratch that...

I am working on a version of this code that works on phpbb.  The only things that needs to be added is the lists and the font sizes (and possibly a graphic button for the toggle button) and some of the smileys (although that's gonna be tricky seeing as how the administrators can change them at any time.

You can see it in action here:

http://www.shockcannon.com/skmun/forum/ … c&f=13

Offline

 

#17 2006-02-09 11:00:18

hari_seldon
Member
Registered: 2006-02-09
Posts: 1

Re: PunBB gets TinyMCE'd

interesting

Offline

 

#18 2006-02-09 22:05:34

Fabier
Member
Registered: 2006-01-31
Posts: 13
Website

Re: PunBB gets TinyMCE'd

Its interesting cause I wrote the RegExps in PHP instead of in Javascript.  I need to make a second pass on my mod based on this and convert everything to run client-side. That would save the server a LOT of work.

In order to combat most of the problems with adding in font size changes, etc. I forced TinyMCE to spill everything out in span tags and then enabled those in PHPBB. That allows TinyMCE a lot more breathing room, and makes the output look a lot better.

God Bless,
-Dan

Offline

 

#19 2006-03-21 21:36:41

nitrouk
Member
From: Manchester, UK
Registered: 2006-03-12
Posts: 11
Website

Re: PunBB gets TinyMCE'd

Offline

 

#20 2006-03-24 05:16:49

rapha...
Member
Registered: 2006-02-21
Posts: 1

Re: PunBB gets TinyMCE'd

Many thanks Afraithe for implementing TinyMCE in punBB! Here is how I did it (starting of course from your guidelines). Hope this can help other people.

- install TinyMCE.

- install PunBB (e.g in /punbb/).

- copy tinymce_integration.js (http://tinymce.moxiecode.com/punbb/incl … gration.js) into /punbb/include/tinymce_integration.js. You may also try my version of tinymce_integration.js (I added a few regexps for a better code translation).

- copy code.gif (from http://tinymce.moxiecode.com/punbb/style/code.gif) and tinymce.css (from http://tinymce.moxiecode.com/punbb/style/tinymce.css) into /punbb/style.

- in /punbb/include/template/main.tpl, add the following lines just after <pun_head>:

Code:

<!-- tinymce -->
<script language="Javascript" xsrc="/tinymce/jscripts/tiny_mce/tiny_mce.js"></script>
<script language="javascript" type="text/javascript" xsrc="/punbb/include/tinymce_integration.js"></script>
<!-- /tinymce -->

- in /punbb/view_topic.php and /punbb/edit.php, search for the string "process_form(this)" and replace it with "submitForm(this)" (note: submitForm() is defined in tinymce_integration.js).

In the same file, add the following line in the <ul class="bblinks"> block:

Code:

<li><a xhref="javascript: toggleTinyMCE();">Toggle TinyMCE</a> (Experimental)</li>

- in /punbb/post.php, search for the <form> tags and, before both calls to process_form(this), add a call to submitForm(this). Example:

Code:

onsubmit="submitForm(this); return process_form(this)"

Bugs still to be fixed:
- in Mozilla, after posting, you are not automatically redirected.

I hope I forgot nothing important...

Thanks for this explanation of getting PunBB "TinyMCE'd", but i don't understand this part:

- in /punbb/post.php, search for the <form> tags and, before both calls to process_form(this), add a call to submitForm(this). Example:

Code:

onsubmit="submitForm(this); return process_form(this)"

My comprehension for PHP language is poor, and i think you should post the complete code.

Could you do this, please?

Offline

 

#21 2006-03-24 11:40:28

boughtonp
Member
From: South Croydon, UK
Registered: 2005-11-21
Posts: 41
Website

Re: PunBB gets TinyMCE'd

That's not PHP, but here's a step-by-step guide...
1. Create a backup of post.php (ie: copy and paste it to another folder)
2. Open post.php in Notepad. (or whatever editor you prefer)
3. Press Ctrl-F. Type "<form". Click Find Next.
4. Look for something similar to onsubmit="return process_form(this)"
5. Change it to onsubmit="submitForm(this); return process_form(this)"
6. Goto step 2 until no more forms are found.
7. Save the file, and upload if necessary.


- Peter Boughton -

Offline

 

#22 2006-06-18 16:26:46

stevew
Member
Registered: 2006-06-18
Posts: 1

Re: PunBB gets TinyMCE'd

I'm trying to intergrate tinymce into punbb following the above instructions but the link   http://tinymce.moxiecode.com/punbb/style/code.gif  shows a webpage with just the word "code:" 

Does anyone know where and how to obtain this file?

Thanks in advanced for any help.

SteveW

Offline

 

#23 2006-06-20 14:09:26

vorapoap
Member
Registered: 2005-04-28
Posts: 32

Re: PunBB gets TinyMCE'd

I like this TinyMCE theme for PunBB, how could I obtain it?

Offline

 

#24 2006-08-30 17:41:20

JJfutbol
Member
From: Washington D.C.
Registered: 2006-02-15
Posts: 13
Website

Re: PunBB gets TinyMCE'd

@Stevew
Mate thats an image file. It's not a web page. Although when you click that link in your browser it will display that code.gif image. You should notice that the word code is not selectable thus its an image. Obtaining it is simply a matter of right clicking on it and you will get a save option.

@vorapop

Simply follow the instructions set out to set it up for PunBB. Most developers simply just do a view source but for this you are better off following the great tutorial in one of the earlier pages that a member wrote up. If you follow that you won't have any trouble.

@Afraithe
Just wanted to know if there was any new progress on this TinyMCE PunBB implementation?? I know you mentioned about a few bugs that you found. Just wanted to see if you ever got around to fixing them. A great implementation though for a great piece of forum software so keep it up! TinyMCE is simply the best. I was checking out the full example for TinyMCE and didn't see a code/pre option. Is there an option where you can have it enter a pre or code tag?? Thanks for all your great work.

Last edited by JJfutbol (2006-08-30 17:41:49)

Offline

 

#25 2006-08-30 20:30:19

Afraithe
Administrator
From: Skellefteċ, Sweden
Registered: 2005-01-03
Posts: 1976
Website

Re: PunBB gets TinyMCE'd

No I haven't got around to fix any bugs, I know there are some issues with the regex conversion between HTML and BBCODE.

The code and quote are just custom styles in the TinyMCE config, matching the style in PUNBB.
theme_advanced_styles : "Code=codeStyle;Quote=quoteStyle",


Afraithe
TinyMCE Developer
Moxiecode Systems

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2008 PunBB