Links shortcode
[resolved] Added Facebook Color Scheme Choices. (4 posts)

  1. ELsMystERy
    Posted 4 years ago #

    I edited links-shortcode.php to make the plugin have an option for choosing a dark, or light Facebook button color scheme. It works great!

    Let me know if you would like for me to send you the code to include it in an update.

    This is it in use. The links are at the top with the fb buttons.


  2. Maarten Swemmer
    Plugin Author

    Posted 4 years ago #

    Hi ELsMystERy!
    Sounds like a good addition, could you post the code changes here?
    Best regards,

  3. ELsMystERy
    Posted 4 years ago #

    This is everything, except the actual [shortcode] to change the link colors, which I didn't do. You might need to modify my additions some to do that.

    In links-shortcode.php...

    Under $facebook = get_option('linkssc_facebook', 'like'); on line 50 add this on a new line (51): $fbcolors = get_option('linkssc_fbcolors', 'light');

    Under 'fbrecommend' => $fbrecommend, on line 60 add: 'fbcolors' => $fbcolors, on a new line (61).

    Change colorscheme=light to colorscheme='.$fbcolors.' in the link on line 132 ($linkinfo['fb_button']). The link doesn't show right when I post it.

    Under $facebook = get_option('linkssc_facebook', 'like'); on line 232 add $fbcolors = get_option('linkssc_fbcolors', 'light'); to a new line (233).

    After the </tr> on line 271 (under the row with the options to show the fb button), add this code:

    `<!-- Change fb color sceme -->
    <tr valign="top">
    <th scope="row"><?php _e('What facebook color scheme?','links-shortcode'); ?></th>
    <td><input type="radio" name="linkssc_fbcolors" value="light" <?php if ($fbcolors == 'light') echo 'CHECKED'; ?> /><?php _e('Light','links-shortcode'); ?><br />
    <input type="radio" name="linkssc_fbcolors" value="dark" <?php if ($fbcolors == 'dark') echo 'CHECKED'; ?> /><?php _e('Dark','links-shortcode'); ?><br />
    <!-- End change fb color sceme -->`

    That should be lines 272 - 279.

  4. Maarten Swemmer
    Plugin Author

    Posted 4 years ago #

    Hi ELsMystERy,
    Your request has been implemented in version 1.3, which has just been released. For details see the release notes.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Links shortcode
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic