vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4 Articles (https://vborg.vbsupport.ru/forumdisplay.php?f=242)
-   -   [HOW TO] Add WYSIWYG Editor to Your Modifications (https://vborg.vbsupport.ru/showthread.php?t=228693)

Mythotical 01-19-2012 03:54 AM

Quote:

Originally Posted by Cadellin (Post 2289513)
If you get it working I don't suppose you could write up an improved article? It would be great to be able to update my mods to use WYSIWYG once again.

Sure will, guaranteed. I'm about to test it now that I'm out of classes until Friday.

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

So far I have ran into a couple of issues. I will have things ironed out later today and then I'll update my article.

Cadellin 01-19-2012 05:13 PM

I can't tell you how happy that makes me :)

Cheeky I know but could you cover how to load contents into the editor at startup? I.e. Using it to edit something rather than create afresh.

It's something I never managed to find an explanation of how to do in vB-Editor and my own attempts ended in failure. - Thanks!

Hippy 01-19-2012 08:19 PM

thanks steve_m

Mythotical 01-19-2012 09:18 PM

Quote:

Originally Posted by Cadellin (Post 2289905)
I can't tell you how happy that makes me :)

Cheeky I know but could you cover how to load contents into the editor at startup? I.e. Using it to edit something rather than create afresh.

It's something I never managed to find an explanation of how to do in vB-Editor and my own attempts ended in failure. - Thanks!

I will try to include that.

Quote:

Originally Posted by Hippy (Post 2289969)
thanks steve_m

No problem

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

I have updated the article. I am now testing on the latest release of vBulletin.

Cadellin 01-21-2012 06:25 PM

Thanks Steve :)

[S]Could you clarify by what you mean by "Make sure you have this code in the area where your template containing the editor is to be called" as my editor isn't loading - the smilies etc.. are but there is just a blank space where the editor should be.

Thanks[/S]

EDIT: Fixed

Code:

// get special data templates from the datastore
$specialtemplates = array('smiliecache','bbcodecache'); 
// pre-cache templates used by all actions
$globaltemplates = array('yourtemplatename');
define('GET_EDIT_TEMPLATES', true); 
// pre-cache templates used by specific actions
$actiontemplates = array();

must be below

Code:

require_once('./includes/functions_user.php');
require_once('./includes/functions_editor.php');
require_once('./includes/functions_bigthree.php');

The example template I originally used to base all my files off has them the other way around so I suspect I won't be the only one.

EDIT2:

Steve could you also advise about parsing the output of the new WYSIWYG? The old one had a special function I seem to remember but I can't find it.

Mythotical 01-21-2012 07:53 PM

Quote:

Originally Posted by Cadellin (Post 2290652)
Thanks Steve :)

[s]Could you clarify by what you mean by "Make sure you have this code in the area where your template containing the editor is to be called" as my editor isn't loading - the smilies etc.. are but there is just a blank space where the editor should be.

Thanks[/s]

EDIT: Fixed

Code:

// get special data templates from the datastore
$specialtemplates = array('smiliecache','bbcodecache'); 
// pre-cache templates used by all actions
$globaltemplates = array('yourtemplatename');
define('GET_EDIT_TEMPLATES', true); 
// pre-cache templates used by specific actions
$actiontemplates = array();

must be below

Code:

require_once('./includes/functions_user.php');
require_once('./includes/functions_editor.php');
require_once('./includes/functions_bigthree.php');

The example template I originally used to base all my files off has them the other way around so I suspect I won't be the only one.

EDIT2:

Steve could you also advise about parsing the output of the new WYSIWYG? The old one had a special function I seem to remember but I can't find it.

Make sure you installed the provided plugin. Then you $messagearea where you want it to appear.

If nothing else zip up your files and templates in a file and I'll have a look at it.

Cadellin 01-21-2012 08:01 PM

Thanks Steve - switching around the special templates and includes fixed the issue. My issue now is cleaning up the output from the editor for MYSQL and then parsing it again for display.

Mythotical 01-21-2012 08:37 PM

Quote:

Originally Posted by Cadellin (Post 2290687)
Thanks Steve - switching around the special templates and includes fixed the issue. My issue now is cleaning up the output from the editor for MYSQL and then parsing it again for display.

Like I said, I'm willing to look over your code for you if you wish. Just let me know.

Cadellin 01-21-2012 11:28 PM

Thanks for the offer Steve but I've now got everything working satisfactorily including editing which is a bonus.

Mythotical 01-21-2012 11:33 PM

Quote:

Originally Posted by Cadellin (Post 2290759)
Thanks for the offer Steve but I've now got everything working satisfactorily including editing which is a bonus.

Great to hear. Good luck.

Ziki 02-06-2012 05:14 PM

Hm, I can't seem to get it working. Your previous code worked fine after the upgrade, then the editor didn't show up, so I applied the changes bananalive posted, now it shows up but the editor toolbar is not showing up :-/ Any idea what I might be missing?

http://www.kxdesign.com/a/editor.PNG

Ziki 03-06-2012 09:58 AM

Anybody got this working on 4.1.11?

Cadellin 05-06-2012 11:12 AM

Mine isn't working earlier on 4.1.11. Haven't tried 4.1.12 yet.

Altari 07-02-2012 11:08 AM

I had to add
PHP Code:

$phrasegroups = array(
    
'posting',
); 

to make it works. Before this, it only displayed a broken basic text area with smileys.

wolfe 06-23-2013 12:31 PM

how do i use this as a inline reply or how do i use the inline edit ? any ideas thanks

veryfunny 07-26-2014 10:30 PM

I've followed the instructions, but all i can manage to get is the box that is missing all the font / formatting controls...

Can anyone shed any light on what is missing?

I can set the default text value in the box + include smilies etc, but it is coming up with a textarea only.

Thanks in advance

A link to what i'm getting is

http://www.ae86drivingclub.com.au/on...es/upload2.php

veryfunny 08-08-2014 11:17 PM

does anyone follow these forums anymore?

sodagod 12-04-2015 03:12 AM

I can't seem to get this to post with bbcode, it seems to render html when ever I save the data to the database.

I am using $db->escape_string($message) before saving to the database.

I am also using $bbcode_parser on the display page.

I have $ishtml set to 0 also.

hmmm


All times are GMT. The time now is 03: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.07066 seconds
  • Memory Usage 1,764KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (4)bbcode_code_printable
  • (1)bbcode_php_printable
  • (6)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (18)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete