Results 1 to 4 of 4

Thread: add locale to the facebook widget

  1. #1
    Marketplace Seller roidayan's Avatar
    Join Date
    Apr 2014
    Location
    Israel
    Posts
    1,196
    Thanks
    34
    Thanked 157 Times in 144 Posts

    add locale to the facebook widget

    edit includes/widgets.php

    find:
    PHP Code:
    class AppThemes_Widget_Facebook extends WP_Widget {
    .
    .
            
    $connections $instance['connections'];
            
    $width $instance['width'];
            
    $height $instance['height']; 
    add:
    PHP Code:
                    $locale $instance['locale'];
                    if (empty(
    $locale))
                            
    $locale 'en_US'
    change the iframe line to this:
    PHP Code:
            <iframe src="http://www.facebook.com/plugins/likebox.php?locale=<?php echo urlencode($locale); ?>&id=<?php echo urlencode($fid); ?>&amp;connections=<?php echo urlencode($connections); ?>&amp;stream=false&amp;header=true&amp;width=<?php echo urlencode($width); ?>&amp;height=<?php echo $height?>" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:<?php echo esc_attr($width); ?>px; height:<?php echo esc_attr($height); ?>px;" allowTransparency="true"></iframe>
    In:
    PHP Code:
        function update($new_instance$old_instance) { 
    add this:
    PHP Code:
            $instance['locale'] = strip_tags($new_instance['locale']); 
    In:
    PHP Code:
         function form($instance) { 
    add near the end:
    PHP Code:
            <p style="text-align:left;">
                <input type="text" class="widefat" id="<?php echo $this->get_field_id('locale'); ?>" name="<?php echo $this->get_field_name('locale'); ?>" value="<?php echo $instance['locale']; ?>" style="width:50px;" />
                <label for="<?php echo $this->get_field_id('locale'); ?>"><?php _e'Locale'APP_TD ); ?></label>
            </p>

  2. #2
    talent's Avatar
    Join Date
    Jul 2011
    Location
    London UK
    Posts
    3,497
    Thanks
    75
    Thanked 553 Times in 502 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!
    $function ('CUSTOMIZATION'); } else { .DESIGN { display: awesome; }
    If you require any additional functionality or design customization, just ask. Afterall... anything is possible! However, I may not know how to implement your particular request, but if you don't ask, you don't get

    If you build it, they will come...


  3. #3
    Marketplace Seller roidayan's Avatar
    Join Date
    Apr 2014
    Location
    Israel
    Posts
    1,196
    Thanks
    34
    Thanked 157 Times in 144 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!

  4. #4
    talent's Avatar
    Join Date
    Jul 2011
    Location
    London UK
    Posts
    3,497
    Thanks
    75
    Thanked 553 Times in 502 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!
    $function ('CUSTOMIZATION'); } else { .DESIGN { display: awesome; }
    If you require any additional functionality or design customization, just ask. Afterall... anything is possible! However, I may not know how to implement your particular request, but if you don't ask, you don't get

    If you build it, they will come...


Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. CP Facebook Like Box widget not working? 3.1.9
    By rarriola in forum Report ClassiPress Bugs
    Replies: 8
    Last Post: October 26th, 2014, 07:37 AM
  2. Samcy I Like Facebook Widget not work
    By grupo_aras in forum Report ClassiPress Bugs
    Replies: 2
    Last Post: March 6th, 2013, 01:35 AM
  3. Facebook ID not show in the Widget
    By TheSyndicate in forum Report Clipper Bugs
    Replies: 6
    Last Post: January 12th, 2012, 09:35 AM
  4. facebook widget not working well
    By itsme in forum Report ClassiPress Bugs
    Replies: 2
    Last Post: August 7th, 2011, 05:53 PM
  5. Facebook widget
    By luishorta in forum Help Using ClassiPress
    Replies: 8
    Last Post: January 3rd, 2011, 01:44 PM