Merge remote-tracking branch 'upstream/master'
This commit is contained in:
commit
9f6b64a8fd
24 changed files with 166 additions and 62 deletions
BIN
extcron.tgz
BIN
extcron.tgz
Binary file not shown.
|
@ -5,7 +5,7 @@
|
||||||
* Name: external cron
|
* Name: external cron
|
||||||
* Description: Use external server or service to run poller regularly
|
* Description: Use external server or service to run poller regularly
|
||||||
* Version: 1.0
|
* Version: 1.0
|
||||||
* Author: Mike Macgirvin <http://macgirvin.com/profile/mike>
|
* Author: Mike Macgirvin <https://macgirvin.com/profile/mike>
|
||||||
*
|
*
|
||||||
* Notes: External service needs to make a web request to http(s)://yoursite/extcron
|
* Notes: External service needs to make a web request to http(s)://yoursite/extcron
|
||||||
*/
|
*/
|
||||||
|
|
BIN
facebook.tgz
BIN
facebook.tgz
Binary file not shown.
|
@ -383,6 +383,7 @@ function fb_get_friends_sync_full($uid, $access_token, $persons) {
|
||||||
if($s) {
|
if($s) {
|
||||||
$results = json_decode($s);
|
$results = json_decode($s);
|
||||||
logger('fb_get_friends: info: ' . print_r($results,true), LOGGER_DATA);
|
logger('fb_get_friends: info: ' . print_r($results,true), LOGGER_DATA);
|
||||||
|
if(count($results)) {
|
||||||
foreach ($results as $contact) {
|
foreach ($results as $contact) {
|
||||||
if ($contact->code != 200) logger('fb_get_friends: not found: ' . print_r($contact,true), LOGGER_DEBUG);
|
if ($contact->code != 200) logger('fb_get_friends: not found: ' . print_r($contact,true), LOGGER_DEBUG);
|
||||||
else fb_get_friends_sync_parsecontact($uid, json_decode($contact->body));
|
else fb_get_friends_sync_parsecontact($uid, json_decode($contact->body));
|
||||||
|
@ -390,6 +391,7 @@ function fb_get_friends_sync_full($uid, $access_token, $persons) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
BIN
fbpost.tgz
BIN
fbpost.tgz
Binary file not shown.
Binary file not shown.
|
@ -168,12 +168,12 @@ function forumdirectory_content(&$a) {
|
||||||
|
|
||||||
$entry = replace_macros($tpl,array(
|
$entry = replace_macros($tpl,array(
|
||||||
'$id' => $rr['id'],
|
'$id' => $rr['id'],
|
||||||
'$profile-link' => $profile_link,
|
'$profile_link' => $profile_link,
|
||||||
'$photo' => $a->get_cached_avatar_image($rr[$photo]),
|
'$photo' => $a->get_cached_avatar_image($rr[$photo]),
|
||||||
'$alt-text' => $rr['name'],
|
'$alt_text' => $rr['name'],
|
||||||
'$name' => $rr['name'],
|
'$name' => $rr['name'],
|
||||||
'$details' => $pdesc . $details,
|
'$details' => $pdesc . $details,
|
||||||
'$page-type' => $page_type,
|
'$page_type' => $page_type,
|
||||||
'$profile' => $profile,
|
'$profile' => $profile,
|
||||||
'$location' => template_escape($location),
|
'$location' => template_escape($location),
|
||||||
'$gender' => $gender,
|
'$gender' => $gender,
|
||||||
|
|
|
@ -2,14 +2,14 @@
|
||||||
<div class="forumdirectory-item" id="forumdirectory-item-$id" >
|
<div class="forumdirectory-item" id="forumdirectory-item-$id" >
|
||||||
<div class="forumdirectory-photo-wrapper" id="forumdirectory-photo-wrapper-$id" >
|
<div class="forumdirectory-photo-wrapper" id="forumdirectory-photo-wrapper-$id" >
|
||||||
<div class="forumdirectory-photo" id="forumdirectory-photo-$id" >
|
<div class="forumdirectory-photo" id="forumdirectory-photo-$id" >
|
||||||
<a href="$profile-link" class="forumdirectory-profile-link" id="forumdirectory-profile-link-$id" >
|
<a href="$profile_link" class="forumdirectory-profile-link" id="forumdirectory-profile-link-$id" >
|
||||||
<img class="forumdirectory-photo-img photo" src="$photo" alt="$alt-text" title="$alt-text" />
|
<img class="forumdirectory-photo-img photo" src="$photo" alt="$alt_text" title="$alt_text" />
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="forumdirectory-profile-wrapper" id="forumdirectory-profile-wrapper-$id" >
|
<div class="forumdirectory-profile-wrapper" id="forumdirectory-profile-wrapper-$id" >
|
||||||
<div class="contact-name" id="forumdirectory-name-$id">$name</div>
|
<div class="contact-name" id="forumdirectory-name-$id">$name</div>
|
||||||
<div class="page-type">$page-type</div>
|
<div class="page-type">$page_type</div>
|
||||||
{{ if $pdesc }}<div class="forumdirectory-profile-title">$profile.pdesc</div>{{ endif }}
|
{{ if $pdesc }}<div class="forumdirectory-profile-title">$profile.pdesc</div>{{ endif }}
|
||||||
<div class="forumdirectory-detailcolumns-wrapper" id="forumdirectory-detailcolumns-wrapper-$id">
|
<div class="forumdirectory-detailcolumns-wrapper" id="forumdirectory-detailcolumns-wrapper-$id">
|
||||||
<div class="forumdirectory-detailscolumn-wrapper" id="forumdirectory-detailscolumn1-wrapper-$id">
|
<div class="forumdirectory-detailscolumn-wrapper" id="forumdirectory-detailscolumn1-wrapper-$id">
|
||||||
|
|
|
@ -2,14 +2,14 @@
|
||||||
<div class="forumdirectory-item" id="forumdirectory-item-{{$id}}" >
|
<div class="forumdirectory-item" id="forumdirectory-item-{{$id}}" >
|
||||||
<div class="forumdirectory-photo-wrapper" id="forumdirectory-photo-wrapper-{{$id}}" >
|
<div class="forumdirectory-photo-wrapper" id="forumdirectory-photo-wrapper-{{$id}}" >
|
||||||
<div class="forumdirectory-photo" id="forumdirectory-photo-{{$id}}" >
|
<div class="forumdirectory-photo" id="forumdirectory-photo-{{$id}}" >
|
||||||
<a href="{{$profile}}-link" class="forumdirectory-profile-link" id="forumdirectory-profile-link-{{$id}}" >
|
<a href="{{$profile_link}}" class="forumdirectory-profile-link" id="forumdirectory-profile-link-{{$id}}" >
|
||||||
<img class="forumdirectory-photo-img photo" src="{{$photo}}" alt="{{$alt}}-text" title="{{$alt}}-text" />
|
<img class="forumdirectory-photo-img photo" src="{{$photo}}" alt="{{$alt_text}}" title="{{$alt_text}}" />
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="forumdirectory-profile-wrapper" id="forumdirectory-profile-wrapper-{{$id}}" >
|
<div class="forumdirectory-profile-wrapper" id="forumdirectory-profile-wrapper-{{$id}}" >
|
||||||
<div class="contact-name" id="forumdirectory-name-{{$id}}">{{$name}}</div>
|
<div class="contact-name" id="forumdirectory-name-{{$id}}">{{$name}}</div>
|
||||||
<div class="page-type">{{$page}}-type</div>
|
<div class="page-type">{{$page_type}}</div>
|
||||||
{{if $pdesc}}<div class="forumdirectory-profile-title">{{$profile.pdesc}}</div>{{/if}}
|
{{if $pdesc}}<div class="forumdirectory-profile-title">{{$profile.pdesc}}</div>{{/if}}
|
||||||
<div class="forumdirectory-detailcolumns-wrapper" id="forumdirectory-detailcolumns-wrapper-{{$id}}">
|
<div class="forumdirectory-detailcolumns-wrapper" id="forumdirectory-detailcolumns-wrapper-{{$id}}">
|
||||||
<div class="forumdirectory-detailscolumn-wrapper" id="forumdirectory-detailscolumn1-wrapper-{{$id}}">
|
<div class="forumdirectory-detailscolumn-wrapper" id="forumdirectory-detailscolumn1-wrapper-{{$id}}">
|
||||||
|
|
BIN
forumlist.tgz
BIN
forumlist.tgz
Binary file not shown.
|
@ -40,8 +40,8 @@ function geonames_install() {
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
register_hook('plugin_settings', 'addon/geonames/geonames.php', 'geonames_settings');
|
register_hook('plugin_settings', 'addon/geonames/geonames.php', 'geonames_plugin_admin');
|
||||||
register_hook('plugin_settings_post', 'addon/geonames/geonames.php', 'geonames_settings_post');
|
register_hook('plugin_settings_post', 'addon/geonames/geonames.php', 'geonames_plugin_admin_post');
|
||||||
|
|
||||||
logger("installed geonames");
|
logger("installed geonames");
|
||||||
}
|
}
|
||||||
|
@ -58,8 +58,8 @@ function geonames_uninstall() {
|
||||||
*/
|
*/
|
||||||
|
|
||||||
unregister_hook('post_local', 'addon/geonames/geonames.php', 'geonames_post_hook');
|
unregister_hook('post_local', 'addon/geonames/geonames.php', 'geonames_post_hook');
|
||||||
unregister_hook('plugin_settings', 'addon/geonames/geonames.php', 'geonames_settings');
|
unregister_hook('plugin_settings', 'addon/geonames/geonames.php', 'geonames_plugin_admin');
|
||||||
unregister_hook('plugin_settings_post', 'addon/geonames/geonames.php', 'geonames_settings_post');
|
unregister_hook('plugin_settings_post', 'addon/geonames/geonames.php', 'geonames_plugin_admin_post');
|
||||||
|
|
||||||
|
|
||||||
logger("removed geonames");
|
logger("removed geonames");
|
||||||
|
@ -135,7 +135,7 @@ function geonames_post_hook($a, &$item) {
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function geonames_settings_post($a,$post) {
|
function geonames_plugin_admin_post($a,$post) {
|
||||||
if(! local_user() || (! x($_POST,'geonames-submit')))
|
if(! local_user() || (! x($_POST,'geonames-submit')))
|
||||||
return;
|
return;
|
||||||
set_pconfig(local_user(),'geonames','enable',intval($_POST['geonames']));
|
set_pconfig(local_user(),'geonames','enable',intval($_POST['geonames']));
|
||||||
|
@ -153,7 +153,7 @@ function geonames_settings_post($a,$post) {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function geonames_settings(&$a,&$s) {
|
function geonames_plugin_admin(&$a,&$s) {
|
||||||
|
|
||||||
if(! local_user())
|
if(! local_user())
|
||||||
return;
|
return;
|
||||||
|
|
41
openstreetmap/openstreetmap.js
Normal file
41
openstreetmap/openstreetmap.js
Normal file
|
@ -0,0 +1,41 @@
|
||||||
|
var toolserver = 'http://toolserver.org/~kolossos/openlayers/kml-on-ol.php';
|
||||||
|
var startTag = '<iframe class="osmFrame" style="width: 100%; height: 350px; clear: both;" src="'+ toolserver + '?lang=de&uselang=de&params=';
|
||||||
|
var endTag = '"></iframe>';
|
||||||
|
|
||||||
|
jQuery(document).ready(function($) {
|
||||||
|
|
||||||
|
$('.wall-item-content-wrapper').each(function(index) {
|
||||||
|
var link = $(this).find('.wall-item-location .OSMMapLink');
|
||||||
|
link.toggle(addIframe, removeIframe);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
function addIframe(ev) {
|
||||||
|
var coordinate = $(ev.target).attr('title');
|
||||||
|
|
||||||
|
var newTag = startTag + convertCoordinateString(coordinate) + endTag;
|
||||||
|
$(ev.target).parents('.wall-item-content-wrapper').append(newTag);
|
||||||
|
}
|
||||||
|
|
||||||
|
function removeIframe(ev) {
|
||||||
|
$(ev.target).parents('.wall-item-content-wrapper').find('iframe').remove();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function convertCoordinateString(coordinate) {
|
||||||
|
var locstring = coordinate.split(' ');
|
||||||
|
var northSouth;
|
||||||
|
var westEast;
|
||||||
|
|
||||||
|
if (locstring[0] < 0) {
|
||||||
|
northSouth = '_S_';
|
||||||
|
}else{
|
||||||
|
northSouth = '_N_';
|
||||||
|
}
|
||||||
|
if (locstring[1] < 0) {
|
||||||
|
westEast = '_W';
|
||||||
|
}else{
|
||||||
|
westEast = '_E';
|
||||||
|
}
|
||||||
|
return Math.abs(locstring[0]) + northSouth + Math.abs(locstring[1]) + westEast;
|
||||||
|
}
|
|
@ -10,18 +10,27 @@
|
||||||
|
|
||||||
function openstreetmap_install() {
|
function openstreetmap_install() {
|
||||||
register_hook('render_location', 'addon/openstreetmap/openstreetmap.php', 'openstreetmap_location');
|
register_hook('render_location', 'addon/openstreetmap/openstreetmap.php', 'openstreetmap_location');
|
||||||
|
register_hook('page_header', 'addon/openstreetmap/openstreetmap.php', 'openstreetmap_alterheader');
|
||||||
|
|
||||||
logger("installed openstreetmap");
|
logger("installed openstreetmap");
|
||||||
}
|
}
|
||||||
|
|
||||||
function openstreetmap_uninstall() {
|
function openstreetmap_uninstall() {
|
||||||
unregister_hook('render_location', 'addon/openstreetmap/openstreetmap.php', 'openstreetmap_location');
|
unregister_hook('render_location', 'addon/openstreetmap/openstreetmap.php', 'openstreetmap_location');
|
||||||
|
unregister_hook('page_header', 'addon/openstreetmap/openstreetmap.php', 'openstreetmap_alterheader');
|
||||||
|
|
||||||
logger("removed openstreetmap");
|
logger("removed openstreetmap");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function openstreetmap_alterheader($a, &$navHtml) {
|
||||||
|
$addScriptTag='<script type="text/javascript" src="' . $a->get_baseurl() . '/addon/openstreetmap/openstreetmap.js' . '"></script>' . "\r\n";
|
||||||
|
$a->page['htmlhead'] .= $addScriptTag;
|
||||||
|
}
|
||||||
|
|
||||||
function openstreetmap_location($a, &$item) {
|
function openstreetmap_location($a, &$item) {
|
||||||
|
|
||||||
|
//
|
||||||
|
|
||||||
if(! (strlen($item['location']) || strlen($item['coord'])))
|
if(! (strlen($item['location']) || strlen($item['coord'])))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@ -38,12 +47,27 @@ function openstreetmap_location($a, &$item) {
|
||||||
$location = '';
|
$location = '';
|
||||||
$coord = '';
|
$coord = '';
|
||||||
|
|
||||||
|
|
||||||
|
if($item['location'] && !$item['coord'] && true){ //if only a location is given, find the lat-lon
|
||||||
|
$geo_account='demo';
|
||||||
|
|
||||||
|
$s = fetch_url('http://api.geonames.org/search?maxRows=1&fuzzy=0.8&q=' . $item['location'] . '&username=' . $geo_account);
|
||||||
|
|
||||||
|
if($s){
|
||||||
|
$xml = parse_xml_string($s);
|
||||||
|
|
||||||
|
if($xml->geoname->lat && $xml->geoname->lng){
|
||||||
|
$item['coord'] = $xml->geoname->lat . ' ' . $xml->geoname->lng;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$location = (($item['location']) ? '<a target="map" title="' . $item['location'] . '" href="'.$tmsserver.'?q=' . urlencode($item['location']) . '">' . $item['location'] . '</a>' : '');
|
$location = (($item['location']) ? '<a target="map" title="' . $item['location'] . '" href="'.$tmsserver.'?q=' . urlencode($item['location']) . '">' . $item['location'] . '</a>' : '');
|
||||||
|
|
||||||
if($item['coord']) {
|
if($item['coord']) {
|
||||||
$coords = explode(' ', $item['coord']);
|
$coords = explode(' ', $item['coord']);
|
||||||
if(count($coords) > 1) {
|
if(count($coords) > 1) {
|
||||||
$coord = '<a target="map" title="' . $item['coord'] . '" href="'.$tmsserver.'?lat=' . urlencode($coords[0]) . '&lon=' . urlencode($coords[1]) . '&zoom='.$zoom.'">' . $item['coord'] . '</a>' ;
|
$coord = '<a target="map" class="OSMMapLink" title="' . $item['coord'] . '" href="'.$tmsserver.'?lat=' . urlencode($coords[0]) . '&lon=' . urlencode($coords[1]) . '&zoom='.$zoom.'"> Map </a>' ;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(strlen($coord)) {
|
if(strlen($coord)) {
|
||||||
|
|
Binary file not shown.
BIN
procrunner.tgz
Normal file
BIN
procrunner.tgz
Normal file
Binary file not shown.
53
procrunner/procrunner.php
Executable file
53
procrunner/procrunner.php
Executable file
|
@ -0,0 +1,53 @@
|
||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* Name: Proc Runner
|
||||||
|
* Description: Derivative of poormancron when proc_open() and exec() are disabled
|
||||||
|
* Version: 1.0
|
||||||
|
* Author: Fabio Comuni <http://kirgroup.com/profile/fabrix>
|
||||||
|
* Author: Mike Macgirvin
|
||||||
|
*/
|
||||||
|
|
||||||
|
function procrunner_install() {
|
||||||
|
|
||||||
|
$addons = get_config('system','addon');
|
||||||
|
if(strstr('poormancron',$addons)) {
|
||||||
|
logger('procrunner incompatible with poormancron. Not installing procrunner.');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// check for command line php
|
||||||
|
$a = get_app();
|
||||||
|
$ex = Array();
|
||||||
|
$ex[0] = ((x($a->config,'php_path')) && (strlen($a->config['php_path'])) ? $a->config['php_path'] : 'php');
|
||||||
|
$ex[1] = dirname(dirname(dirname(__file__)))."/testargs.php";
|
||||||
|
$ex[2] = "test";
|
||||||
|
$out = exec(implode(" ", $ex));
|
||||||
|
if ($out==="test") {
|
||||||
|
logger('procrunner not required on this system. Not installing.');
|
||||||
|
return;
|
||||||
|
} else {
|
||||||
|
register_hook('proc_run', 'addon/procrunner/procrunner.php','procrunner_procrun');
|
||||||
|
logger("installed procrunner");
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function procrunner_uninstall() {
|
||||||
|
unregister_hook('proc_run', 'addon/procrunner/procrunner.php','procrunner_procrun');
|
||||||
|
logger("removed procrunner");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
function procrunner_procrun(&$a, &$arr) {
|
||||||
|
|
||||||
|
$argv = $arr['args'];
|
||||||
|
$arr['run_cmd'] = false;
|
||||||
|
logger("procrunner procrun ".implode(", ",$argv));
|
||||||
|
array_shift($argv);
|
||||||
|
$argc = count($argv);
|
||||||
|
logger("procrunner procrun require_once ".basename($argv[0]));
|
||||||
|
require_once(basename($argv[0]));
|
||||||
|
$funcname=str_replace(".php", "", basename($argv[0]))."_run";
|
||||||
|
$funcname($argv, $argc);
|
||||||
|
}
|
BIN
statusnet.tgz
BIN
statusnet.tgz
Binary file not shown.
|
@ -15,19 +15,15 @@
|
||||||
width: 250px;
|
width: 250px;
|
||||||
margin-bottom: 25px;
|
margin-bottom: 25px;
|
||||||
}
|
}
|
||||||
#statusnet-default-label {
|
|
||||||
float: left;
|
|
||||||
width: 250px;
|
|
||||||
}
|
|
||||||
#statusnet-sendtaglinks-label {
|
|
||||||
float: left;
|
|
||||||
width: 250px;
|
|
||||||
margin-bottom: 25px;
|
|
||||||
}
|
|
||||||
#statusnet-disconnect {
|
#statusnet-disconnect {
|
||||||
float: left;
|
float: left;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#statusnet-default-label,
|
||||||
|
#statusnet-sendtaglinks-label,
|
||||||
|
#statusnet-shortening-label,
|
||||||
|
#statusnet-mirror-label,
|
||||||
|
#statusnet-pin-label,
|
||||||
#statusnet-enable-label {
|
#statusnet-enable-label {
|
||||||
float: left;
|
float: left;
|
||||||
width: 250px;
|
width: 250px;
|
||||||
|
@ -38,11 +34,6 @@
|
||||||
float: left;
|
float: left;
|
||||||
}
|
}
|
||||||
|
|
||||||
#statusnet-pin-label {
|
|
||||||
float: left;
|
|
||||||
width: 250px;
|
|
||||||
margin-bottom: 25px;
|
|
||||||
}
|
|
||||||
#statusnet-pin {
|
#statusnet-pin {
|
||||||
float: left;
|
float: left;
|
||||||
}
|
}
|
||||||
|
|
BIN
twitter.tgz
BIN
twitter.tgz
Binary file not shown.
|
@ -3,17 +3,14 @@ By Tobias Diekershoff
|
||||||
http://diekershoff.homeunix.net/friendika/profile/tobias
|
http://diekershoff.homeunix.net/friendika/profile/tobias
|
||||||
tobias.diekershoff(at)gmx.net
|
tobias.diekershoff(at)gmx.net
|
||||||
|
|
||||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
||||||
!! This addon is currently under development. If you have any problem !!
|
|
||||||
!! with it, please contact the Author. !!
|
|
||||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
||||||
|
|
||||||
With this addon to Friendica you can give your user the possibility to post
|
With this addon to Friendica you can give your user the possibility to post
|
||||||
their *public* messages to Twitter. The messages will be strapped their rich
|
their *public* messages to Twitter. The messages will be strapped their rich
|
||||||
context and shortened to 140 characters length if necessary. If shortening of
|
context and shortened to 140 characters length if necessary. If shortening of
|
||||||
the message was performed a link will be added to the Tweet pointing to the
|
the message was performed a link will be added to the Tweet pointing to the
|
||||||
original message on your server.
|
original message on your server.
|
||||||
|
|
||||||
|
The addon can also mirror a users Tweets into the ~friendica wall.
|
||||||
|
|
||||||
There is a similar addon for forwarding public messages to
|
There is a similar addon for forwarding public messages to
|
||||||
"StatusNet":http://status.net [[StatusNet Plugin]].
|
"StatusNet":http://status.net [[StatusNet Plugin]].
|
||||||
|
|
||||||
|
|
|
@ -19,29 +19,20 @@
|
||||||
#twitter-disconnect {
|
#twitter-disconnect {
|
||||||
float: left;
|
float: left;
|
||||||
}
|
}
|
||||||
#twitter-enable-label {
|
#twitter-default-label,
|
||||||
|
#twitter-sendtaglinks-label,
|
||||||
|
#twitter-enable-label,
|
||||||
|
#twitter-shortening-label,
|
||||||
|
#twitter-mirror-label,
|
||||||
|
#twitter-pin-label {
|
||||||
float: left;
|
float: left;
|
||||||
width: 250px;
|
width: 250px;
|
||||||
margin-bottom: 5px;
|
margin-bottom: 10px;
|
||||||
}
|
|
||||||
#twitter-default-label {
|
|
||||||
float: left;
|
|
||||||
width: 250px;
|
|
||||||
}
|
|
||||||
#twitter-sendtaglinks-label {
|
|
||||||
float: left;
|
|
||||||
width: 250px;
|
|
||||||
margin-bottom: 25px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#twitter-checkbox {
|
#twitter-checkbox {
|
||||||
float: left;
|
float: left;
|
||||||
}
|
}
|
||||||
#twitter-pin-label {
|
|
||||||
float: left;
|
|
||||||
width: 250px;
|
|
||||||
margin-bottom: 25px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#twitter-pin {
|
#twitter-pin {
|
||||||
float: left;
|
float: left;
|
||||||
|
|
|
@ -543,8 +543,10 @@ function twitter_post_hook(&$a,&$b) {
|
||||||
function twitter_plugin_admin_post(&$a){
|
function twitter_plugin_admin_post(&$a){
|
||||||
$consumerkey = ((x($_POST,'consumerkey')) ? notags(trim($_POST['consumerkey'])) : '');
|
$consumerkey = ((x($_POST,'consumerkey')) ? notags(trim($_POST['consumerkey'])) : '');
|
||||||
$consumersecret = ((x($_POST,'consumersecret')) ? notags(trim($_POST['consumersecret'])): '');
|
$consumersecret = ((x($_POST,'consumersecret')) ? notags(trim($_POST['consumersecret'])): '');
|
||||||
|
$applicationname = ((x($_POST, 'applicationname')) ? notags(trim($_POST['applicationname'])):'');
|
||||||
set_config('twitter','consumerkey',$consumerkey);
|
set_config('twitter','consumerkey',$consumerkey);
|
||||||
set_config('twitter','consumersecret',$consumersecret);
|
set_config('twitter','consumersecret',$consumersecret);
|
||||||
|
set_config('twitter','application_name',$applicationname);
|
||||||
info( t('Settings updated.'). EOL );
|
info( t('Settings updated.'). EOL );
|
||||||
}
|
}
|
||||||
function twitter_plugin_admin(&$a, &$o){
|
function twitter_plugin_admin(&$a, &$o){
|
||||||
|
@ -554,7 +556,8 @@ function twitter_plugin_admin(&$a, &$o){
|
||||||
'$submit' => t('Submit'),
|
'$submit' => t('Submit'),
|
||||||
// name, label, value, help, [extra values]
|
// name, label, value, help, [extra values]
|
||||||
'$consumerkey' => array('consumerkey', t('Consumer key'), get_config('twitter', 'consumerkey' ), ''),
|
'$consumerkey' => array('consumerkey', t('Consumer key'), get_config('twitter', 'consumerkey' ), ''),
|
||||||
'$consumersecret' => array('consumersecret', t('Consumer secret'), get_config('twitter', 'consumersecret' ), '')
|
'$consumersecret' => array('consumersecret', t('Consumer secret'), get_config('twitter', 'consumersecret' ), ''),
|
||||||
|
'$applicationname' => array('applicationname', t('Name of the Twitter Application'), get_config('twitter','application_name'),t('set this to avoid mirroring postings from ~friendica back to ~friendica'))
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
{{ inc field_input.tpl with $field=$consumerkey }}{{ endinc }}
|
{{ inc field_input.tpl with $field=$consumerkey }}{{ endinc }}
|
||||||
{{ inc field_input.tpl with $field=$consumersecret }}{{ endinc }}
|
{{ inc field_input.tpl with $field=$consumersecret }}{{ endinc }}
|
||||||
|
{{ inc field_input.tpl with $field=$applicationname }}{{ endinc }}
|
||||||
<div class="submit"><input type="submit" name="page_site" value="$submit" /></div>
|
<div class="submit"><input type="submit" name="page_site" value="$submit" /></div>
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
{{include file="field_input.tpl" field=$consumerkey}}
|
{{include file="field_input.tpl" field=$consumerkey}}
|
||||||
{{include file="field_input.tpl" field=$consumersecret}}
|
{{include file="field_input.tpl" field=$consumersecret}}
|
||||||
|
{{include file="field_input.tpl" field=$applicationname}}
|
||||||
<div class="submit"><input type="submit" name="page_site" value="{{$submit}}" /></div>
|
<div class="submit"><input type="submit" name="page_site" value="{{$submit}}" /></div>
|
||||||
|
|
Loading…
Reference in a new issue