Changeset 8481 for extensions


Ignore:
Timestamp:
Jan 6, 2011, 12:30:58 AM (14 years ago)
Author:
rub
Message:

Upload button: check extension and reduce window size

Location:
extensions/FacebookPlug/Plugin
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • extensions/FacebookPlug/Plugin/include/conf.inc.php

    r8440 r8481  
    2424}
    2525
    26 global $conf;
     26global $conf, $page;
    2727
    2828$conf['fbp'] = array_merge(
     
    121121  $conf['fbp']['social_plugin_like_box']);
    122122
    123 //~ print_r($conf['fbp']);
     123//From http://developers.facebook.com/docs/reference/rest/photos.upload/
     124// *GIF *JPG *PNG *PSD *TIFF *JP2 *IFF *WBMP *XBM
     125$page['fbp']['available_upload_ext'] = array('GIF', 'JPG', 'PNG', 'PSD', 'TIFF', 'JP2', 'IFF', 'WBMP', 'XBM');
    124126
    125127?>
  • extensions/FacebookPlug/Plugin/tpl/buttons.tpl

    r8440 r8481  
    1111{* method 2 *}
    1212{*
    13 <a href="http://www.facebook.com/sharer.php?u={$fbp_page.url|@urlencode}" title="{'Share on Facebook'|@translate}" rel="nofollow" onclick="window.open(this.href, 'Facebook','width=550,height=350,location=no,status=no,toolbar=no,scrollbars=no,menubar=no'); return false;"><img src="{$FBP_PATH|@cat:'/icon/share.png'}" class="button" alt="{'Share on Facebook'|@translate}"></a>
     13<a href="http://www.facebook.com/sharer.php?u={$fbp_page.url|@urlencode}" title="{'Share on Facebook'|@translate}" rel="nofollow" onclick="window.open(this.href, 'Facebook_Share','width=550,height=350,location=no,status=no,toolbar=no,scrollbars=no,menubar=no'); return false;"><img src="{$FBP_PATH|@cat:'/icon/share.png'}" class="button" alt="{'Share on Facebook'|@translate}"></a>
    1414*}
    1515{* method 3 *}
     
    2727{/if} {* $fbp.share_picture or $fbp.share_album *}
    2828{* --------------------------------------------------------------------------- *}
    29 {if $fbp.upload_picture and $FBP_SCRIPT_BASENAME == 'picture'}
    30 <a href="{$PIWIGO_FACEBOOK_UPLOAD_URL}?u={$fbp_page.url_image|@urlencode}&amp;pu={$fbp_page.url|@urlencode}&amp;pt={$PAGE_TITLE|@replace:'"':' '}&amp;gt={$GALLERY_TITLE|@replace:'"':' '}" title="{'Upload photo on Facebook'|@translate}" rel="nofollow" onclick="window.open(this.href, 'Facebook','width=550,height=350,location=no,status=no,toolbar=no,scrollbars=no,menubar=no'); return false;"><img src="{$FBP_PATH|@cat:'/icon/upload.png'}" class="button" alt="{'Share on Facebook'|@translate}"></a>
     29{if $fbp.upload_picture and $FBP_SCRIPT_BASENAME == 'picture' and in_array($fbp_page.url_image|get_extension|strtoupper, $fbp_page.available_upload_ext)}
     30<a href="{$PIWIGO_FACEBOOK_UPLOAD_URL}?u={$fbp_page.url_image|@urlencode}&amp;pu={$fbp_page.url|@urlencode}&amp;pt={$PAGE_TITLE|@replace:'"':' '}&amp;gt={$GALLERY_TITLE|@replace:'"':' '}" title="{'Upload photo on Facebook'|@translate}" rel="nofollow" onclick="window.open(this.href, 'Facebook_Upload','width=250,height=50,location=no,status=no,toolbar=no,scrollbars=no,menubar=no'); return false;"><img src="{$FBP_PATH|@cat:'/icon/upload.png'}" class="button" alt="{'Share on Facebook'|@translate}"></a>
    3131{/if} {* $fbp.upload_picture  and $FBP_SCRIPT_BASENAME == 'picture' *}
    3232{* --------------------------------------------------------------------------- *}
Note: See TracChangeset for help on using the changeset viewer.