Merge remote-tracking branch 'upstream/master'

This commit is contained in:
Michael Vogel 2013-05-17 00:01:02 +02:00
commit f75ef0c59e
155 changed files with 1648 additions and 307 deletions

Binary file not shown.

View file

@ -1,3 +0,0 @@
{{ inc field_radio.tpl with $field=$global }}{{ endinc }}
{{ inc field_radio.tpl with $field=$individual }}{{ endinc }}
<div class="submit"><input type="submit" name="page_site" value="$submit" /></div>

View file

@ -1,3 +0,0 @@
{{ inc field_radio.tpl with $field=$global }}{{ endinc }}
{{ inc field_radio.tpl with $field=$individual }}{{ endinc }}
<div class="submit"><input type="submit" name="page_site" value="$submit" /></div>

Binary file not shown.

View file

@ -1,11 +0,0 @@
{{ inc field_input.tpl with $field=$startdate }}{{ endinc }}
{{ inc field_input.tpl with $field=$enddate }}{{ endinc }}
{{ inc field_input.tpl with $field=$rurl }}{{ endinc }}
<div style="border: 2px solid #f00; padding: 10px; margin:
10px;font-size: 1.2em;"><strong>Note</strong>: The redirect will be active from the moment you
press the submit button. Users currently logged in will <strong>not</strong> be
thrown out but can't login again after logging out should the blackout is
still in place.</div>
<div class="submit"><input type="submit" name="page_site" value="$submit" /></div>

Binary file not shown.

View file

@ -16,6 +16,7 @@ function blockem_install() {
register_hook('plugin_settings_post', 'addon/blockem/blockem.php', 'blockem_addon_settings_post'); register_hook('plugin_settings_post', 'addon/blockem/blockem.php', 'blockem_addon_settings_post');
register_hook('conversation_start', 'addon/blockem/blockem.php', 'blockem_conversation_start'); register_hook('conversation_start', 'addon/blockem/blockem.php', 'blockem_conversation_start');
register_hook('item_photo_menu', 'addon/blockem/blockem.php', 'blockem_item_photo_menu'); register_hook('item_photo_menu', 'addon/blockem/blockem.php', 'blockem_item_photo_menu');
register_hook('enotify_store', 'addon/blockem/blockem.php', 'blockem_enotify_store' );
} }
@ -26,6 +27,7 @@ function blockem_uninstall() {
unregister_hook('plugin_settings_post', 'addon/blockem/blockem.php', 'blockem_addon_settings_post'); unregister_hook('plugin_settings_post', 'addon/blockem/blockem.php', 'blockem_addon_settings_post');
unregister_hook('conversation_start', 'addon/blockem/blockem.php', 'blockem_conversation_start'); unregister_hook('conversation_start', 'addon/blockem/blockem.php', 'blockem_conversation_start');
unregister_hook('item_photo_menu', 'addon/blockem/blockem.php', 'blockem_item_photo_menu'); unregister_hook('item_photo_menu', 'addon/blockem/blockem.php', 'blockem_item_photo_menu');
unregister_hook('enotify_store', 'addon/blockem/blockem.php', 'blockem_enotify_store' );
} }
@ -71,6 +73,35 @@ function blockem_addon_settings_post(&$a,&$b) {
} }
} }
function blockem_enotify_store(&$a,&$b) {
$words = get_pconfig($b['uid'],'blockem','words');
if($words) {
$arr = explode(',',$words);
}
else {
return;
}
$found = false;
if(count($arr)) {
foreach($arr as $word) {
if(! strlen(trim($word))) {
continue;
}
if(link_compare($b['url'],$word)) {
$found = true;
break;
}
}
}
if($found) {
$b['abort'] = true;
}
}
function blockem_prepare_body(&$a,&$b) { function blockem_prepare_body(&$a,&$b) {
if(! local_user()) if(! local_user())

Binary file not shown.

Binary file not shown.

BIN
calc.tgz

Binary file not shown.

Binary file not shown.

View file

@ -1,70 +0,0 @@
<script>
$(function(){
$("#tab_1 a").click(function(e){
$("#login_standard").show();
$("#login_openid").hide();
$("#tab_1").addClass("active");
$("#tab_2").removeClass("active");
e.preventDefault();
return false;
});
$("#tab_2 a").click(function(e){
$("#login_openid").show();
$("#login_standard").hide();
$("#tab_2").addClass("active");
$("#tab_1").removeClass("active");
e.preventDefault();
return false;
});
});
</script>
{{ if $noOid }}
<h3>$login_title</h3>
{{ else }}
<ul class="tabs">
<li id="tab_1" class="tab button active"><a href="#">$tab_1</a></li>
<li id="tab_2" class="tab button"><a href="#">$tab_2</a></li>
</ul>
{{ endif }}
$login_form
{{ if $lastusers_title }}
<h3>$lastusers_title</h3>
<div class='items-wrapper'>
{{ for $lastusers_items as $i }}
$i
{{ endfor }}
</div>
{{ endif }}
{{ if $activeusers_title }}
<h3>$activeusers_title</h3>
<div class='items-wrapper'>
{{ for $activeusers_items as $i }}
$i
{{ endfor }}
</div>
{{ endif }}
{{ if $photos_title }}
<h3>$photos_title</h3>
<div class='items-wrapper'>
{{ for $photos_items as $i }}
$i
{{ endfor }}
</div>
{{ endif }}
{{ if $like_title }}
<h3>$like_title</h3>
<ul id='likes'>
{{ for $like_items as $i }}
<li>$i</li>
{{ endfor }}
</ul>
{{ endif }}

View file

@ -1,10 +0,0 @@
<div class="directory-item" id="directory-item-$id" >
<div class="directory-photo-wrapper" id="directory-photo-wrapper-$id" >
<div class="directory-photo" id="directory-photo-$id" >
<a href="$profile_link" class="directory-profile-link" id="directory-profile-link-$id" >
<img class="directory-photo-img" src="$photo" alt="$alt_text" title="$alt_text" />
</a>
</div>
</div>
</div>

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
dav.tgz

Binary file not shown.

Binary file not shown.

View file

@ -1,9 +0,0 @@
<input type='hidden' name='form_security_token' value='$form_security_token'>
{{ for $features as $f }}
<h3 class="settings-heading">$f.0</h3>
{{ for $f.1 as $fcat }}
{{ inc field_yesno.tpl with $field=$fcat }}{{endinc}}
{{ endfor }}
{{ endfor }}
<div class="submit"><input type="submit" name="defaultfeatures-submit" value="$submit" /></div>

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View file

@ -1,42 +0,0 @@
<div class="forumdirectory-item" id="forumdirectory-item-$id" >
<div class="forumdirectory-photo-wrapper" id="forumdirectory-photo-wrapper-$id" >
<div class="forumdirectory-photo" id="forumdirectory-photo-$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" />
</a>
</div>
</div>
<div class="forumdirectory-profile-wrapper" id="forumdirectory-profile-wrapper-$id" >
<div class="contact-name" id="forumdirectory-name-$id">$name</div>
<div class="page-type">$page_type</div>
{{ if $pdesc }}<div class="forumdirectory-profile-title">$profile.pdesc</div>{{ endif }}
<div class="forumdirectory-detailcolumns-wrapper" id="forumdirectory-detailcolumns-wrapper-$id">
<div class="forumdirectory-detailscolumn-wrapper" id="forumdirectory-detailscolumn1-wrapper-$id">
{{ if $location }}
<dl class="location"><dt class="location-label">$location</dt>
<dd class="adr">
{{ if $profile.address }}<div class="street-address">$profile.address</div>{{ endif }}
<span class="city-state-zip">
<span class="locality">$profile.locality</span>{{ if $profile.locality }}, {{ endif }}
<span class="region">$profile.region</span>
<span class="postal-code">$profile.postal-code</span>
</span>
{{ if $profile.country-name }}<span class="country-name">$profile.country-name</span>{{ endif }}
</dd>
</dl>
{{ endif }}
{{ if $gender }}<dl class="mf"><dt class="gender-label">$gender</dt> <dd class="x-gender">$profile.gender</dd></dl>{{ endif }}
</div>
<div class="forumdirectory-detailscolumn-wrapper" id="forumdirectory-detailscolumn2-wrapper-$id">
{{ if $marital }}<dl class="marital"><dt class="marital-label"><span class="heart">&hearts;</span>$marital</dt><dd class="marital-text">$profile.marital</dd></dl>{{ endif }}
{{ if $homepage }}<dl class="homepage"><dt class="homepage-label">$homepage</dt><dd class="homepage-url"><a href="$profile.homepage" target="external-link">$profile.homepage</a></dd></dl>{{ endif }}
</div>
</div>
<div class="forumdirectory-copy-wrapper" id="forumdirectory-copy-wrapper-$id" >
{{ if $about }}<dl class="forumdirectory-copy"><dt class="forumdirectory-copy-label">$about</dt><dd class="forumdirectory-copy-data">$profile.about</dd></dl>{{ endif }}
</div>
</div>
</div>

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
gnot.tgz

Binary file not shown.

Binary file not shown.

Binary file not shown.

View file

@ -1,3 +0,0 @@
{{ inc field_select.tpl with $field=$default_avatar}}{{ endinc }}
{{ inc field_select.tpl with $field=$rating }}{{ endinc }}
<div class="submit"><input type="submit" value="$submit" /></div>

Binary file not shown.

Binary file not shown.

Binary file not shown.

View file

@ -1,7 +0,0 @@
{{ inc field_input.tpl with $field=$owner }}{{ endinc }}
{{ inc field_input.tpl with $field=$ownerprofile }}{{ endinc }}
{{ inc field_textarea.tpl with $field=$postal }}{{ endinc }}
{{ inc field_textarea.tpl with $field=$notes }}{{ endinc }}
{{ inc field_input.tpl with $field=$email }}{{ endinc }}
{{ inc field_textarea.tpl with $field=$footer_text }}{{ endinc }}
<div class="submit"><input type="submit" name="page_site" value="$submit" /></div>

Binary file not shown.

BIN
irc.tgz

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View file

@ -1,2 +0,0 @@
{{ inc field_select.tpl with $field=$default_avatar}}{{ endinc }}
<div class="submit"><input type="submit" value="$submit" /></div>

Binary file not shown.

Binary file not shown.

View file

@ -4,10 +4,10 @@ CREATE TABLE IF NOT EXISTS `mailstream_item` (
`contact-id` int(11) NOT NULL, `contact-id` int(11) NOT NULL,
`uri` char(255) NOT NULL, `uri` char(255) NOT NULL,
`message-id` char(255) NOT NULL, `message-id` char(255) NOT NULL,
`created` timestamp NOT NULL DEFAULT now()', `created` timestamp NOT NULL DEFAULT now(),
`completed` timestamp NULL DEFAULT NULL, `completed` timestamp NULL DEFAULT NULL,
PRIMARY KEY (`id`), PRIMARY KEY (`id`),
KEY `message-id` (`message-id`), KEY `message-id` (`message-id`),
KEY `created` (`created`), KEY `created` (`created`),
KEY `completed` (`completed`) KEY `completed` (`completed`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATION=utf8_bin; ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

View file

@ -2,7 +2,7 @@
/** /**
* Name: Mail Stream * Name: Mail Stream
* Description: Mail all items coming into your network feed to an email address * Description: Mail all items coming into your network feed to an email address
* Version: 0.1 * Version: 0.2
* Author: Matthew Exon <http://mat.exon.name> * Author: Matthew Exon <http://mat.exon.name>
*/ */
@ -74,8 +74,19 @@ function mailstream_generate_id($a, $uri) {
} }
function mailstream_post_remote_hook(&$a, &$item) { function mailstream_post_remote_hook(&$a, &$item) {
if (get_pconfig($item['uid'], 'mailstream', 'enabled') === 'on') { if (!get_pconfig($item['uid'], 'mailstream', 'enabled')) {
if ($item['uid'] && $item['contact-id'] && $item['uri']) { return;
}
if (!$item['uid']) {
return;
}
if (!$item['contact-id']) {
return;
}
if (!$item['uri']) {
return;
}
q("INSERT INTO `mailstream_item` (`uid`, `contact-id`, `uri`, `message-id`) " . q("INSERT INTO `mailstream_item` (`uid`, `contact-id`, `uri`, `message-id`) " .
"VALUES (%d, '%s', '%s', '%s')", intval($item['uid']), "VALUES (%d, '%s', '%s', '%s')", intval($item['uid']),
intval($item['contact-id']), dbesc($item['uri']), dbesc(mailstream_generate_id($a, $item['uri']))); intval($item['contact-id']), dbesc($item['uri']), dbesc(mailstream_generate_id($a, $item['uri'])));
@ -88,15 +99,21 @@ function mailstream_post_remote_hook(&$a, &$item) {
logger('mailstream_post_remote_hook: created mailstream_item ' logger('mailstream_post_remote_hook: created mailstream_item '
. $ms_item['id'] . ' for item ' . $item['uri'] . ' ' . $ms_item['id'] . ' for item ' . $item['uri'] . ' '
. $item['uid'] . ' ' . $item['contact-id'], LOGGER_DATA); . $item['uid'] . ' ' . $item['contact-id'], LOGGER_DATA);
$r = q('SELECT * FROM `user` WHERE `uid` = %d', intval($item['uid'])); $user = mailstream_get_user($item['uid']);
if (!$user) {
logger('mailstream_post_remote_hook: no user ' . $item['uid'], LOGGER_NORMAL);
return;
}
mailstream_send($a, $ms_item, $item, $user);
}
function mailstream_get_user($uid) {
$r = q('SELECT * FROM `user` WHERE `uid` = %d', intval($uid));
if (count($r) != 1) { if (count($r) != 1) {
logger('mailstream_post_remote_hook: Unexpected number of users returned', LOGGER_NORMAL); logger('mailstream_post_remote_hook: Unexpected number of users returned', LOGGER_NORMAL);
return; return;
} }
$user = $r[0]; return $r[0];
mailstream_send($a, $ms_item, $item, $user);
}
}
} }
function mailstream_do_images($a, &$item, &$attachments) { function mailstream_do_images($a, &$item, &$attachments) {
@ -183,12 +200,15 @@ function mailstream_send($a, $ms_item, $item, $user) {
if ($frommail == "") { if ($frommail == "") {
$frommail = 'friendica@localhost.local'; $frommail = 'friendica@localhost.local';
} }
$email = get_pconfig($item['uid'], 'mailstream', 'address'); $address = get_pconfig($item['uid'], 'mailstream', 'address');
if (!$address) {
$address = $user['email'];
}
$mail = new PHPmailer; $mail = new PHPmailer;
try { try {
$mail->XMailer = 'Friendica Mailstream Plugin'; $mail->XMailer = 'Friendica Mailstream Plugin';
$mail->SetFrom($frommail, $item['author-name']); $mail->SetFrom($frommail, $item['author-name']);
$mail->AddAddress($email, $user['username']); $mail->AddAddress($address, $user['username']);
$mail->MessageID = $ms_item['message-id']; $mail->MessageID = $ms_item['message-id'];
$mail->Subject = mailstream_subject($item); $mail->Subject = mailstream_subject($item);
if ($item['thr-parent'] != $item['uri']) { if ($item['thr-parent'] != $item['uri']) {
@ -246,24 +266,31 @@ function mailstream_cron($a, $b) {
function mailstream_plugin_settings(&$a,&$s) { function mailstream_plugin_settings(&$a,&$s) {
$enabled = get_pconfig(local_user(), 'mailstream', 'enabled'); $enabled = get_pconfig(local_user(), 'mailstream', 'enabled');
$enabled_mu = ($enabled === 'on') ? ' checked="true"' : '';
$address = get_pconfig(local_user(), 'mailstream', 'address'); $address = get_pconfig(local_user(), 'mailstream', 'address');
$address_mu = $address ? (' value="' . $address . '"') : '';
$template = get_markup_template('settings.tpl', 'addon/mailstream/'); $template = get_markup_template('settings.tpl', 'addon/mailstream/');
$s .= replace_macros($template, array( $s .= replace_macros($template, array(
'$submit' => t('Submit'), '$address' => array(
'$address' => $address_mu, 'mailstream_address',
'$address_caption' => t('Address:'), t('Email Address'),
'$enabled' => $enabled_mu, $address,
'$enabled_caption' => t('Enabled:'))); t("Leave blank to use your account email address")),
'$enabled' => array(
'mailstream_enabled',
t('Enabled'),
$enabled),
'$title' => t('Mail Stream Settings'),
'$submit' => t('Submit')));
} }
function mailstream_plugin_settings_post($a,$post) { function mailstream_plugin_settings_post($a,$post) {
if ($_POST['address'] != "") { if ($_POST['mailstream_address'] != "") {
set_pconfig(local_user(), 'mailstream', 'address', $_POST['address']); set_pconfig(local_user(), 'mailstream', 'address', $_POST['mailstream_address']);
} }
if ($_POST['enabled']) { else {
set_pconfig(local_user(), 'mailstream', 'enabled', $_POST['enabled']); del_pconfig(local_user(), 'mailstream', 'address');
}
if ($_POST['mailstream_enabled']) {
set_pconfig(local_user(), 'mailstream', 'enabled', $_POST['mailstream_enabled']);
} }
else { else {
del_pconfig(local_user(), 'mailstream', 'enabled'); del_pconfig(local_user(), 'mailstream', 'enabled');

View file

@ -0,0 +1,11 @@
{{*
* AUTOMATICALLY GENERATED TEMPLATE
* DO NOT EDIT THIS FILE, CHANGES WILL BE OVERWRITTEN
*
*}}
<div class="settings-block">
<h3>{{$title}}</h3>
{{include file="field_input.tpl" field=$address}}
{{include file="field_checkbox.tpl" field=$enabled}}
<input type="submit" value="{{$submit}}">
</div>

View file

@ -1,3 +0,0 @@
{{ inc field_input.tpl with $field=$frommail }}{{ endinc }}
<div class="submit"><input type="submit" name="page_site" value="$submit"></div>

View file

@ -1,5 +0,0 @@
<div class="mailstream-item-body">$item.body</div>
{{ if $item.plink }}
<div>$upstream: <a class="mailstream-item-plink" href="$item.plink">$item.plink</a><div>
<div>$local: <a class="mailstream-item-url" href="$item.url">$item.url</a></div>
{{ endif }}

View file

@ -1,18 +0,0 @@
<div class="settings-block">
<h3>Mail Stream Settings</h3>
<table>
<tbody>
<tr>
<td>$enabled_caption</td>
<td><input class="checkbox" type="checkbox" name="enabled" $enabled></td>
</tr>
<tr>
<td>$address_caption</td>
<td><input class="input" size="70" name="address"$address></td>
</tr>
<tr>
<td colspan="2"><input type="submit" value="$submit"></td>
</tr>
</tbody>
</table>
</div>

Binary file not shown.

View file

@ -1,2 +0,0 @@
{{ inc field_input.tpl with $field=$baseurl }}{{endinc }}
<div class="submit"><input type="submit" name="page_site" value="$submit" /></div>

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
nsfw.tgz

Binary file not shown.

Binary file not shown.

Binary file not shown.

View file

@ -1,3 +0,0 @@
{{ inc field_input.tpl with $field=$tmsserver }}{{ endinc }}
{{ inc field_input.tpl with $field=$zoom }}{{ endinc }}
<div class="submit"><input type="submit" name="page_site" value="$submit" /></div>

BIN
page.tgz

Binary file not shown.

BIN
piwik.tgz

Binary file not shown.

View file

@ -1,5 +0,0 @@
{{ inc field_input.tpl with $field=$baseurl }}{{ endinc }}
{{ inc field_input.tpl with $field=$siteid }}{{ endinc }}
{{ inc field_checkbox.tpl with $field=$optout }}{{ endinc }}
{{ inc field_checkbox.tpl with $field=$async }}{{ endinc }}
<div class="submit"><input type="submit" name="page_site" value="$submit" /></div>

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View file

@ -1,3 +0,0 @@
{{ inc field_radio.tpl with $field=$global }}{{ endinc }}
{{ inc field_radio.tpl with $field=$individual }}{{ endinc }}
<div class="submit"><input type="submit" name="page_site" value="$submit" /></div>

View file

@ -1,8 +0,0 @@
<div class="settings-block">
<h3>$remote_perms_title</h3>
<div id="remote-perms-wrapper">
<label id="remote-perms-label" for="remote-perms">$remote_perms_label</label>
<input id="remote-perms-input" type="checkbox" name="remote-perms" value="1" $checked />
</div><div class="clear"></div>
<div class="settings-submit-wrapper" ><input type="submit" name="remote-perms-submit" class="settings-submit" value="$submit" /></div></div>

Binary file not shown.

BIN
retriever.tgz Normal file

Binary file not shown.

35
retriever/database.sql Normal file
View file

@ -0,0 +1,35 @@
CREATE TABLE IF NOT EXISTS `retriever_rule` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`uid` int(11) NOT NULL,
`contact-id` int(11) NOT NULL,
`data` mediumtext NOT NULL,
PRIMARY KEY (`id`),
KEY `uid` (`uid`),
KEY `contact-id` (`contact-id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
CREATE TABLE IF NOT EXISTS `retriever_item` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`item-uri` varchar(800) CHARACTER SET ascii COLLATE ascii_bin NOT NULL,
`item-uid` int(10) unsigned NOT NULL DEFAULT '0',
`contact-id` int(10) unsigned NOT NULL DEFAULT '0',
`resource` int(11) NOT NULL,
`parent` int(11) NOT NULL,
`finished` tinyint(1) unsigned NOT NULL DEFAULT '0',
KEY `resource` (`resource`),
KEY `all` (`item-uri`, `item-uid`, `contact-id`),
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
CREATE TABLE IF NOT EXISTS `retriever_resource` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`type` char(255) NOT NULL,
`binary` int(1) NOT NULL DEFAULT 0,
`url` varchar(800) CHARACTER SET ascii COLLATE ascii_bin NOT NULL,
`created` timestamp NOT NULL DEFAULT now(),
`completed` timestamp NULL DEFAULT NULL,
`last-try` timestamp NULL DEFAULT NULL,
`num-tries` int(11) NOT NULL DEFAULT 0,
`data` mediumtext NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin

Some files were not shown because too many files have changed in this diff Show more