WordPress.org

Ready to get started?Download WordPress

Forums

Floating Social Media Links
[resolved] Button Order and Email Button (4 posts)

  1. mosquitobug
    Member
    Posted 1 year ago #

    Love the plugin! Very nicely done!

    I am working on integrating the plugin into my site, and I cannot find a way to solve two problems.

    1. I would like to rearrange the displayed order of the buttons.

    2. I have used the custom button option to add an email icon, but when I add the email link (mailto:example@example.com?Subject=Example), it does not display properly because of the included http://

    Can I change this through the WP Editor? Where is the code located? I have limited coding skills.

    Website - etorba.treebanger.com

    THANK YOU!

    http://wordpress.org/extend/plugins/floating-social-media-links/

  2. Nick Halsey
    Member
    Plugin Author

    Posted 1 year ago #

    Well, to start off with the issue of link order, this is something I've always wanted to have, but I've decided to wait until I have the time to do it right, with a drag and drop interface which will likely require major reworking to implement. So for now, you would need to edit the code to change that, and it's pretty easy to do there.

    In terms of email links I will add something into the next update that automatically detects mailtos and removes the http://s. And in the mean time that's also an easy customization.

    A word of warning - any code edits you make will be lost when you update, and it is always strongly recommended to keep everything up to date. The best approach in these cases is to keep a close record of where the edits were made, and to re-apply them after updating. Of course, you may not want to update after each version is release, in which case I would offer that major version updates (1.2.0 to 1.3.0) are usually more significant than minor ones (1.2.0 to 1.2.1). And in your case specifically keep an eye out for these changes in the upgrade notices, as I am planning on implementing them at some point.

    I'm guessing you know how to get to the wordpress editor, in case not, go to plugins->editor and select the correct plugin using the dropdown at the top right. With the current structure, the main php file should come up first (floating-social-media-links.php). Scroll to the very bottom of the file to find the output section. The wordpress editor wraps the lines of code which make reordering a lot harder. If you use chrome, you can scroll way out, resize the editor window horizontally, then zoom partway back in to see each line of code on its own line in the editor. You're looking for the place where there are a bunch of lines that look something like this:
    if (fsml_897_getOption('enablefacebook') && $thefacebookurl_897) { echo ('<a href="http://facebook.com/' . $thefacebookurl_897 . '" target="_blank" ><img src="' . $fsmlbaseurl_897 . '/img/facebook.jpg" alt="Facebook" title="' . $thefacebookurltitle_897 . '" class="fsml_fflogo" /></a>'); }
    Each of these lines is equivalent to one link/icon of output. There are three shorter lines which represent the like, follow, and subscribe buttons. You should be able to safely switch the orders as long as you switch complete lines of code around. And the links themselves are partway into each line of code, so you should be able to easily remove the http:// part from the one you're using for a mail link (all the http://s will be gone after I update to detect mailtos.

    Feel free to let me know if you have any questions about this, it is relatively simple but if something goes terribly wrong you can always delete the plugin and re-download to revert the changes.

  3. mosquitobug
    Member
    Posted 1 year ago #

    Thank you very much for the help! These suggestions worked perfectly for me - I was able to change the order and adjust the email link to a "mailto".

    Appreciate the great support for a great plugin!

  4. Nick Halsey
    Member
    Plugin Author

    Posted 1 year ago #

    No problem, and thank you. This led me to add several important fixes and useful features to the to-do list for my next update release.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic