Resource icon

vBulletin Editor Toolbar Tooltips 1.1

No permission to download
  • Thread starter
  • Moderator
  • #1

MarkFL

La Villa Strangiato
Joined
Jul 3, 2017
Messages
1,252
MarkFL submitted a new resource:

Editor Toolbar Tooltips - Allows you to provide more information in the mouseover tooltips of your editor toolbar buttons.

Overview:

This simple product allows you to provide more information in the mouseover tooltips of your editor toolbar buttons.

View attachment 47938

For each button you wish to give more information, enter a separate line in the provided setting containing the BBcode tag name (including the square brackets), a more descriptive name for the tag, and then any addition instructions you wish to include. These 3 data should be separated by the pipe symbol ("|")....
Read more about this resource...
 

IggyP

Aspirant
Joined
Jan 11, 2013
Messages
28
hello, ive noticed some type of regression/product conflict with this, which is preventing it from working on the advanced editor....quick editor they display properly...

thoughts?
thanks, iggy
 
  • Thread starter
  • Moderator
  • #3

MarkFL

La Villa Strangiato
Joined
Jul 3, 2017
Messages
1,252
When the advanced editor is loaded, do you find the javascript added by this product present in the DOM?
 

IggyP

Aspirant
Joined
Jan 11, 2013
Messages
28
hello, i tried looking at it a bit closer......i am finding the problem occurs somewhat sporadically...seems to not load in adv editor only "sometimes", not sure how to replicate it 100% tho hmm
 
  • Thread starter
  • Moderator
  • #5

MarkFL

La Villa Strangiato
Joined
Jul 3, 2017
Messages
1,252
Try replacing the code in this product's plugin hooked at "parse_templates" with the following:

PHP:
global $vbulletin;

if ($vbulletin->options['markfl_toolbartooltips_active'] AND $vbulletin->options['markfl_toolbartooltips_tags'] AND in_array(THIS_SCRIPT, array('editpost', 'newreply', 'newthread', 'showthread', 'private', 'usernote')))
{
   $tags = explode(PHP_EOL, $vbulletin->options['markfl_toolbartooltips_tags']);
   $tagnames = '';
   $tagdef = '';
   $taginstruct = '';

   foreach ($tags AS $tag)
   {
       $tagline = explode('|', $tag);
       $tagnames .= trim($tagline[0]) . '~';
       $tagdef .= trim($tagline[1]) . '~';
       $taginstruct .= trim($tagline[2]) . '~';
   }

   $tagnames = rtrim($tagnames, '~');
   $tagdef = rtrim($tagdef, '~');
   $taginstruct = rtrim($taginstruct, '~');

   $template_hook['footer_javascript'] .= '<script>
function toolTips(el)
{
   var tags = document.getElementsByClassName(el)[0].getElementsByClassName("cke_off"), tagtitle;
   var tagnameslist = "' . $tagnames . '";
   var tagdefslist = "' . $tagdef . '";
   var taginstructslist = "' . $taginstruct . '";
   var tagnames = tagnameslist.split("~");
   var tagdefs = tagdefslist.split("~");
   var taginstructs = taginstructslist.split("~");

   for (var n = 0; n < tags.length; n++)
   {
       tagtitle = tags[n].title.toLowerCase();
       for (var m = 0; m < tagnames.length; m++)
       {
           if (tagtitle.indexOf(tagnames[m]) != -1)
           {
               if (tags[n].title.indexOf(tagdefs[m]) == -1)
               {
                   tags[n].title += (".\n\nThis is our " + tagdefs[m] + " tag.\n\n" + taginstructs[m]);
                   break;
               }
           }
       }
   }

}

document.addEventListener("mouseover", function(){toolTips("texteditor")});
</script>';
}
 

IggyP

Aspirant
Joined
Jan 11, 2013
Messages
28
appears to have fixed it thank you :)

i will keep an eye on it some and let u know if i see any future issues....thanks for the great mods and support
 
Top