• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.
[XFA] Default Editor Format

[XFA] Default Editor Format [Paid] 1.1.0

No permission to buy (€7.00)
Ever wanted to set default format options ? Your dream is now reality !

XFA

Well-known member
#1
XFA submitted a new resource:

[XFA] Default Editor Format - Ever wanted to set default format options ? Your dream is now reality !

Description
Have you ever wanted to have a default set when you make your post to avoid changing each time the font and formatting options ?

This add-on solves this by providing you with configuration options in the usercp to set wether you want your text to be in bold, italic and/or underlined case, wether you want it blue, red, green,... and also which font it should be displayed with.

Working with every instance of the WYSIWYG editor...
Read more about this resource...
 

sadiq6210

Active member
#5
Moreover, I am receiving server errors (more than 40 errors in less than 5 minutes)

Code:
Error Info
ErrorException: Undefined index: xfa_dedf_params - library/XenForo/Visitor.php:678
Generated By: Unknown Account, 1 minute ago
Stack Trace
#0 /home/user/public_html/forum/library/XenForo/Visitor.php(678): XenForo_Application::handlePhpError(8, 'Undefined index...', '/home/user/...', 678, Array)
#1 /home/user/public_html/forum/library/XFA/DefaultEditorFormat/Template.php(18): XenForo_Visitor->offsetGet('xfa_dedf_params')
#2 [internal function]: XFA_DefaultEditorFormat_Template::templateCreate('editor', Array, Object(XenForo_Template_Public))
#3 /home/user/public_html/forum/library/XenForo/CodeEvent.php(58): call_user_func_array(Array, Array)
#4 /home/user/public_html/forum/library/XenForo/Template/Abstract.php(82): XenForo_CodeEvent::fire('template_create', Array, 'editor')
#5 /home/user/public_html/forum/library/XenForo/Dependencies/Public.php(239): XenForo_Template_Abstract->__construct('editor', Array)
#6 /home/user/public_html/forum/library/XenForo/ViewRenderer/Abstract.php(263): XenForo_Dependencies_Public->createTemplateObject('editor', Array)
#7 /home/user/public_html/forum/library/XenForo/View.php(116): XenForo_ViewRenderer_Abstract->createTemplateObject('editor', Array)
#8 /home/user/public_html/forum/library/XenForo/ViewPublic/Helper/Editor.php(150): XenForo_View->createTemplateObject('editor', Array)
#9 /home/user/public_html/forum/library/MobileRead/ProfileBbCode/ViewPublic/Member/View.php(21): XenForo_ViewPublic_Helper_Editor::getEditorTemplate(Object(MobileRead_ProfileBbCode_ViewPublic_Member_View), 'message', '', Array)
#10 /home/user/public_html/forum/library/XenForo/ViewRenderer/Abstract.php(227): MobileRead_ProfileBbCode_ViewPublic_Member_View->renderHtml()
#11 /home/user/public_html/forum/library/XenForo/ViewRenderer/HtmlPublic.php(71): XenForo_ViewRenderer_Abstract->renderViewObject('XenForo_ViewPub...', 'Html', Array, 'member_view')
#12 /home/user/public_html/forum/library/XenForo/FrontController.php(605): XenForo_ViewRenderer_HtmlPublic->renderView('XenForo_ViewPub...', Array, 'member_view', NULL)
#13 /home/user/public_html/forum/library/XenForo/FrontController.php(158): XenForo_FrontController->renderView(Object(XenForo_ControllerResponse_View), Object(XenForo_ViewRenderer_HtmlPublic), Array)
#14 /home/user/public_html/forum/index.php(13): XenForo_FrontController->run()
#15 {main}
Request State
array(3) {
  ["url"] => string(42) "http://www.mydomain.com/forum/members/13424/"
  ["_GET"] => array(0) {
  }
  ["_POST"] => array(0) {
  }
}
 
Last edited:

sadiq6210

Active member
#8
Thanks for update

I have few points:
- This button should clear all the format, but it is clearing only the (Bold / Underline / Italic), it is not clearing (color / font type) to the default format.



- I prefer if the button is showing in active mode if the user format is applied.

upload_2015-12-9_11-14-26.png


- I suggest to add an option here to choose the default format from usercp, if I want to clear my specific format and I don't know what is the default format to choose.

 
#12
Moreover, I am receiving server errors (more than 40 errors in less than 5 minutes)

Code:
Error Info
ErrorException: Undefined index: xfa_dedf_params - library/XenForo/Visitor.php:678
Generated By: Unknown Account, 1 minute ago
Stack Trace
#0 /home/user/public_html/forum/library/XenForo/Visitor.php(678): XenForo_Application::handlePhpError(8, 'Undefined index...', '/home/user/...', 678, Array)
#1 /home/user/public_html/forum/library/XFA/DefaultEditorFormat/Template.php(18): XenForo_Visitor->offsetGet('xfa_dedf_params')
#2 [internal function]: XFA_DefaultEditorFormat_Template::templateCreate('editor', Array, Object(XenForo_Template_Public))
#3 /home/user/public_html/forum/library/XenForo/CodeEvent.php(58): call_user_func_array(Array, Array)
#4 /home/user/public_html/forum/library/XenForo/Template/Abstract.php(82): XenForo_CodeEvent::fire('template_create', Array, 'editor')
#5 /home/user/public_html/forum/library/XenForo/Dependencies/Public.php(239): XenForo_Template_Abstract->__construct('editor', Array)
#6 /home/user/public_html/forum/library/XenForo/ViewRenderer/Abstract.php(263): XenForo_Dependencies_Public->createTemplateObject('editor', Array)
#7 /home/user/public_html/forum/library/XenForo/View.php(116): XenForo_ViewRenderer_Abstract->createTemplateObject('editor', Array)
#8 /home/user/public_html/forum/library/XenForo/ViewPublic/Helper/Editor.php(150): XenForo_View->createTemplateObject('editor', Array)
#9 /home/user/public_html/forum/library/MobileRead/ProfileBbCode/ViewPublic/Member/View.php(21): XenForo_ViewPublic_Helper_Editor::getEditorTemplate(Object(MobileRead_ProfileBbCode_ViewPublic_Member_View), 'message', '', Array)
#10 /home/user/public_html/forum/library/XenForo/ViewRenderer/Abstract.php(227): MobileRead_ProfileBbCode_ViewPublic_Member_View->renderHtml()
#11 /home/user/public_html/forum/library/XenForo/ViewRenderer/HtmlPublic.php(71): XenForo_ViewRenderer_Abstract->renderViewObject('XenForo_ViewPub...', 'Html', Array, 'member_view')
#12 /home/user/public_html/forum/library/XenForo/FrontController.php(605): XenForo_ViewRenderer_HtmlPublic->renderView('XenForo_ViewPub...', Array, 'member_view', NULL)
#13 /home/user/public_html/forum/library/XenForo/FrontController.php(158): XenForo_FrontController->renderView(Object(XenForo_ControllerResponse_View), Object(XenForo_ViewRenderer_HtmlPublic), Array)
#14 /home/user/public_html/forum/index.php(13): XenForo_FrontController->run()
#15 {main}
Request State
array(3) {
  ["url"] => string(42) "http://www.mydomain.com/forum/members/13424/"
  ["_GET"] => array(0) {
  }
  ["_POST"] => array(0) {
  }
}
@XFA
I am still receiving hundreds of this server error
I disabled the addon
 

MtoR

Well-known member
#13
Let's try something. In the library/XFA/DefaultEditorFormat/Template.php file, replace:
PHP:
            $params['xfa_dedf_conf']    = unserialize($visitor['xfa_dedf_params']);
By:
PHP:
            if (isset($visitor['xfa_dedf_params']))
            {
                $params['xfa_dedf_conf'] = unserialize($visitor['xfa_dedf_params']);
            }
            else
            {
                $params['xfa_dedf_conf'] = array();
            }
 

MtoR

Well-known member
#15
- This button should clear all the format, but it is clearing only the (Bold / Underline / Italic), it is not clearing (color / font type) to the default format.
Ah you mean if the user had selected it before ?
Issue is that there is no reset possible for font and colors if the user had selected no font.

- I prefer if the button is showing in active mode if the user format is applied.
Not possible as you could apply to just a part of a text.

- I suggest to add an option here to choose the default format from usercp, if I want to clear my specific format and I don't know what is the default format to choose.

You mean being able to select the format directly from the post creation or thread creation ?
 
#16
Ah you mean if the user had selected it before ?
Issue is that there is no reset possible for font and colors if the user had selected no font.
I mean if I select (red) as a default color for my posts
Then when I click on (clear format button) in editor, the "red" color will not reset to the default forum color


Not possible as you could apply to just a part of a text.
Yes I got your point
But (Bold) feature could be applied to just a part of the text and we can see if it is active or not
Just try to play with (Bold) button to know what I mean
It will be great if you can make it like the (Bold) button.

You mean being able to select the format directly from the post creation or thread creation ?
No
For example I select (Arial) as my font from usercp
Then I want to clear that format and return back to the default forum font type, how can I do that?
Maybe you can add an option in usercp to reset the format to forum default format


Let's try something. In the library/XFA/DefaultEditorFormat/Template.php file, replace:
PHP:
            $params['xfa_dedf_conf']    = unserialize($visitor['xfa_dedf_params']);
By:
PHP:
            if (isset($visitor['xfa_dedf_params']))
            {
                $params['xfa_dedf_conf'] = unserialize($visitor['xfa_dedf_params']);
            }
            else
            {
                $params['xfa_dedf_conf'] = array();
            }
It seems OK
I enabled it from 5 minutes and I didn't receive any error until now
Thanks
 
Last edited:

MtoR

Well-known member
#17
I mean if I select (red) as a default color for my posts
Then when I click on (clear format button) in editor, the "red" color will not reset to the default forum color
I think this is like that by default, the reset button only removes the formatting from the currently written text no ?

Yes I got your point
But (Bold) feature could be applied to just a part of the text and we can see if it is active or not
Just try to play with (Bold) button to know what I mean
It will be great if you can make it like the (Bold) button.
Bold is core of the editor javascript.
For additions it's not possible.

No
For example I select (Arial) as my font from usercp
Then I want to clear that format and return back to the default forum font type, how can I do that?
Maybe you can add an option in usercp to reset the format to forum default format
Same as the first answer of that message.

It seems OK
I enabled it from 5 minutes and I didn't receive any error until now
Ok should be releasing a fixed version with that then.
 
#18
Same as the first answer of that message.
About the original forum formatting options, I have 2 solutions for this:

Solution 1:
By adding an option to choose if you want to use the default forum formatting options or you want to specify your options.
upload_2015-12-23_10-42-24.png


Solution 2:
OR / Adding option in the list itself to choose the default font / size and color. for example:

upload_2015-12-23_10-46-58.png

upload_2015-12-23_10-53-52.png

upload_2015-12-23_10-56-18.png


Because my users are annoying from one thing, they cannot back to the "forum default editor formatting options"
For example I don't like the font that I specified and I want to back to the original forum font, there is no way to clear my options

I wish if you can apply one of the two solutions we suggested.
 

Nudaii

Well-known member
#19
howdy i purchased this today, but notice that it doesnt automatically apply to the editor box even on default theme? is this a known error?
 

MtoR

Well-known member
#20
About the original forum formatting options, I have 2 solutions for this:

Solution 1:
By adding an option to choose if you want to use the default forum formatting options or you want to specify your options.
View attachment 124567


Solution 2:
OR / Adding option in the list itself to choose the default font / size and color. for example:

View attachment 124568

View attachment 124569

View attachment 124570


Because my users are annoying from one thing, they cannot back to the "forum default editor formatting options"
For example I don't like the font that I specified and I want to back to the original forum font, there is no way to clear my options

I wish if you can apply one of the two solutions we suggested.
Ah ok you meant revert back your configuration to forum default ! Gotcha :)

Can you please post that suggestion in the suggestion forum on our website please ?

howdy i purchased this today, but notice that it doesnt automatically apply to the editor box even on default theme? is this a known error?
It should, was this on a post edit ? or new post ?

Will be away until the 30 so don't except further answer until then.