Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Try Vanilla Forums Cloud product

In this Discussion

Vanilla 2.6 is here! It includes security fixes and requires PHP 7.0. We have therefore ALSO released Vanilla 2.5.2 with security patches if you are still on PHP 5.6 to give you additional time to upgrade.

To add this to you buttonbar.

This discussion is related to the Pull Quote addon.
peregrineperegrine MVP
edited December 2013 in Tutorials

To add the pullquote insert to your buttonbar.

1 Add the icon below to your plugins/ButtonBar/design/images

and call it pullquote.png

2 Add this to your plugins/ButtonBar/design/buttonbar.css

.ButtonBar .ButtonBarPullquote { background-image: url('images/pullquote.png'); }

3 Add this to ButtonBar/views/buttonbar.php

echo '<span class="ButtonWrap"><span>pullquote </span></span>';

4 Add among this other case statement ButtonBar/js/buttonbar.js

   case 'pullquote':
           $(TextArea).insertRoundTag('pullquote',bbcodeOpts);
              break;  

I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

UnderDogvrijvlinderohgothgtonight

Comments

  • peregrineperegrine MVP
    edited April 2014

    you may need to change this as well in buttonbar.js to use a bbcode for the pullquote when your main formatting is set to Html.

    kluge...

    change in buttonbar.js

        PerformHtml: function(TextArea, Operation) {
        var htmlOpts = {
        opener: '<',
        closer: '>'
        }
    
    to
    
        PerformHtml: function(TextArea, Operation) {
        var htmlOpts = {
        opener: '<',
        closer: '>'
        }
        bbcodeOpts = {
        opener: '[',
        closer: ']'
        }
    

    if you use markdown as your main formatter.
    the same may be the case I haven't tested for markdown (to use the bbcode instead of markdown option for pullquote.

    PerformMarkdown: function(TextArea, Operation) {
             var markdownOpts = {
                opener: '',
                closer: '',
                closeslice: ''
             }
    
               bbcodeOpts = {
                opener: '[',
                closer: ']'
             }
    

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

    vrijvlinder
Sign In or Register to comment.