The MU forums have moved to WordPress.org

problems with buttonsnap (16 posts)

  1. quenting
    Member
    Posted 17 years ago #

    I have recently discovered the buttonsnap library and way pleased with the easyness for adding new buttons to the toolbar.
    That was until when, I realized that many of my users don't have the buttons showing up.
    This seems somewhat random, some see them, some don't, others see them then not anymore... I'm banging my head on the wall trying to understand what's going on.
    Has anyone faced similar issue / solved them ?

  2. drmike
    Member
    Posted 17 years ago #

    Here's the link in case anyone else besides me was wondering what quenting is talking about. :)

    My guess would be a cache issue. Folks need to clear out their browser cache to see the new buttons. Happens all the time over at WP.com when they do an upgrade on TinyMCE.

  3. quenting
    Member
    Posted 17 years ago #

    yeah i've seen this a couple of times... but i thought there was a version number for the tinymce plugin in the js URL. Anyway I'll tell them to hard refresh and see what happens.

  4. zeug
    Member
    Posted 17 years ago #

    Hi quenting,

    how'd you go with buttonsnap on Mu? Does it require much of an edit to get working in mu-plugins? I changed a couple of references to the plugins directory but no luck yet and would appreciate any suggestions you might have.

  5. suleiman
    Member
    Posted 17 years ago #

    I can't get anything using buttonsnap to work either. It's really frustrating since some of the best plugins work via buttonsnap.

  6. zeug
    Member
    Posted 17 years ago #

    I'm pretty sure it's because WP tinymce is several versions behind Mu which has the latest 2.0.6 tinymce. There might also be some addressing issues to take care of as well. But a few of us are talking to owen at red alt about an update to test on WP 2.1 which also has the latest tinymce. Will keep you updated.

  7. zeug
    Member
    Posted 17 years ago #

    Actually, just got buttonsnap working on my mu server.... mostly it seems. Separators aren't working yet but my javascript buttons just appeared and are functional.

    First up I was fiddling around with Advanced WYSIWYG Editor from labnotes.org which is working on my install, but it's a few weeks old.

    Then in the call to buttonsnap I had to replace all the references to buttonsnap_dirname(__FILE__) that were sending the full server path. I replaced them with a static variable = get_settings('siteurl').'/wp-content/plugins/anarchy_media'

    Buttonsnap.php wasn't edited. I've used it to add some gui buttons for Anarchy Media Player.

  8. suleiman
    Member
    Posted 17 years ago #

    zeug, in which file did you edit the references to buttonsnap_dirname_(__FILE__)?

    I should also point out, when I signed up for a test blog on your site and tried using the text editor, then the options for Bold, Italics, and Underline were all missing.

  9. zeug
    Member
    Posted 17 years ago #

    Yes, they're broken on that install, with or without the plugin, I guess they've come back for most since the early August build? I'd hope so anyways as I'm about to do another upgrade and will see.

    The reference to dirname_(__FILE__) is in the editbuttontemplate example that comes with buttonsnap.

    // Set up some unique button image URLs for the new buttons from the plugin directory
    $button_image_url1 = buttonsnap_dirname(__FILE__) . '/brick.gif';

    It returns the full directory path appended to the site url for some reason I'm not sure about but it kills the image links. I just swapped the call for one that goes straight to the plugin directory and it started up.

  10. zeug
    Member
    Posted 17 years ago #

    Actually, just had a look and while the bold button code is in the wp editor the image URL is:

    /wp-includes/js/tinymce/themes/advanced/images/bold.giffoo

    Obviously the foo reference is killing the image and I'd thought this was just flotsam from that particular build of Mu. Has this been fixed since? I guess I'll just have to update and see.

  11. zeug
    Member
    Posted 17 years ago #

    Update on the missing buttons - doesn't seem to be anything to do with the WYSIWYG plugin or buttonsnap but more with the tinymce build used in Mu. See post here.

  12. zeug
    Member
    Posted 17 years ago #

    Just uploaded an Anarchy Media Player Mu Update 1.5.3 which includes a standalone buttonsnap.php that should work on WPMu if anyone wishes to use it in their own web apps.

    It's a hack which uses an mce_buttons call at top that for some reason I know not why allows buttonsnap to hook into the first row of rich editor buttons (any thoughts?). I've also changed a number of the siteurl calls that were returning absolute paths rather than url's.

    So buttonsnap on Mu currently adds default tinyMCE buttons to the rich editor and you can change the buttons in the top section of buttonsnap.php, even add a third row with tablecontrols and whatever other tinyMCE plugins you might add to the standard WPMu tinyMCE.

    This also means if you use another plugin that calls mce_buttons to mess with the rich editor buttons you'll get a server error ... and you can only call the one instance of buttonsnap cos it does the same... upshot of that is to get multiple buttonsnap plugins working with this hack the mce_buttons Advanced WYSIWYG Editor hack at top of buttonsnap.php needs to be deleted on all but one of the files.

    It also won't work with DrkWrz tinyMCE upgrade to 2.0.8 until someone adds the WP hooks back in to the tinyMCE.init in tiny_mce_gzip.php.

  13. quenting
    Member
    Posted 17 years ago #

    Just a heads up, personally I quit using buttonsnap at all. The fact that it loads after the rest of the toolbar is confusing for users, it lacks some flexibility in interaction with tinymce, and sometimes it even prevented the toolbar from loading at all. Creating a tinymce plugin isn't that difficult that it was worth the trouble to use something else, and I'd encourage anyone to look into this option.

  14. zeug
    Member
    Posted 17 years ago #

    Yes this is just for anyone using buttonsnap.php and I guess we know who we are. I've had none of the problems you mention using buttonsnap, neither loading confusion, inflexibility nor tinyMCE hangs. I did have a few problems during initial bug testing and dev but the hack seems more than stable enough now.

    For me it's either buttonsnap or making people install tinyMCE plugins or at worst altering the WPMu core files. I went that route on chenPress followed by editorMonkey then cutom tinyMCe installs. I want upload and activate functionality for the plugin cos I've got too many sites to maintain and it seems to work fine across WP and WPMu including my Mu subdirectories install.

  15. quenting
    Member
    Posted 17 years ago #

    I was just posting a FYI since I was the thread starter. Also FYI, as far as I and most my users were concerned, things seemed pretty stable as well. Thing is, problems only occurred for a few users, and after some investigations I discovered it was the ones with the slower bandwidths. Thing is buttonsnapped button aren't loaded at the same time as tinymce. Due to the asynchronous character of the load and of the large file size of tinymce, sometimes the buttonsnapped buttons don't show at all, sometimes they just prevent the toolbar from showing somehow. These problems never occur when you have good bandwidth.
    Anyway, you don't have to follow my advice, go on but remember what i wrote the day some users complain about the toolbar not showing on random occurences, and remember that tinymce plugins aren't much more complicated to make than use buttonsnap. Also I don't know what you're talking about when writing you need to "make people install" whatever or altering core files. Tinymce plugins are plugins, just like MU's, you just drop them in a folder and you're done. Anyway, good luck with buttonsnap.

  16. zeug
    Member
    Posted 17 years ago #

    Yeh, FYI is cool, and thanks for the tip on buttonsnap re low bandwidth users although I've had no problems as yet. I've even tested on a 300mhz Pentium 2 and 56k modem connect which was way slow loading the whole javascript heavy WP admin but everything was functional.

    The 'make people install' thing is more for the WordPress sites I maintain but also WPMu admins like myself, I'm running 4 Mu's at the moment and prefer the plugin path for customisation rather than keeping track of custom Mu's through the constant Mu updates I've been running over the last year. Drag and drop into mu-plugins folder on a vanilla Mu, activate and forget.

    Still, some tinyMCE plugins could be good for Mu so long as it doesn't involve custom tinyMCE configs. Last time I looked you could invoke them from an mce_buttons call in the plugin, same as I do with buttonsnap at the moment. Might put it on my todo list which as usual is never ending. How do you call yours up into the rich editor?

About this Topic