]> git.mxchange.org Git - friendica-addons.git/commitdiff
Merge remote-tracking branch 'old/master' into mergeto
authorFabio Comuni <fabrix.xm@gmail.com>
Thu, 9 Feb 2012 19:13:36 +0000 (20:13 +0100)
committerFabio Comuni <fabrix.xm@gmail.com>
Thu, 9 Feb 2012 19:13:36 +0000 (20:13 +0100)
203 files changed:
Makefile [changed mode: 0644->0755]
blackout.tgz [new file with mode: 0644]
blackout/README [new file with mode: 0644]
blackout/admin.tpl [new file with mode: 0644]
blackout/blackout.php [new file with mode: 0644]
blockem.tgz [new file with mode: 0755]
blockem/blockem.css [new file with mode: 0755]
blockem/blockem.php [new file with mode: 0755]
buglink.tgz [changed mode: 0644->0755]
buglink/bug-x.gif [changed mode: 0644->0755]
buglink/buglink.php [changed mode: 0644->0755]
calc.tgz [changed mode: 0644->0755]
calc/calc.php [changed mode: 0644->0755]
communityhome.tgz [changed mode: 0644->0755]
communityhome/README.md [changed mode: 0644->0755]
communityhome/communityhome.css [changed mode: 0644->0755]
communityhome/communityhome.php [changed mode: 0644->0755]
communityhome/communityhome.tpl [changed mode: 0644->0755]
communityhome/directory_item.tpl [changed mode: 0644->0755]
convert.tgz [changed mode: 0644->0755]
convert/UnitConvertor.php [changed mode: 0644->0755]
convert/convert.php [changed mode: 0644->0755]
editplain.tgz [new file with mode: 0644]
editplain/editplain.css [new file with mode: 0755]
editplain/editplain.php [new file with mode: 0755]
extcron.tgz [new file with mode: 0755]
extcron/extcron.php [new file with mode: 0755]
facebook.tgz [changed mode: 0644->0755]
facebook/README [changed mode: 0644->0755]
facebook/facebook.css [changed mode: 0644->0755]
facebook/facebook.php [changed mode: 0644->0755]
fortunate.tgz [changed mode: 0644->0755]
fortunate/fortunate.css [changed mode: 0644->0755]
fortunate/fortunate.php [changed mode: 0644->0755]
geonames.tgz [new file with mode: 0644]
geonames/geonames.css [new file with mode: 0755]
geonames/geonames.php [new file with mode: 0755]
impressum.tgz [changed mode: 0644->0755]
impressum/README [changed mode: 0644->0755]
impressum/admin.tpl [changed mode: 0644->0755]
impressum/impressum.php [changed mode: 0644->0755]
js_upload.tgz [changed mode: 0644->0755]
js_upload/file-uploader/client/demo.htm [changed mode: 0644->0755]
js_upload/file-uploader/client/do-nothing.htm [changed mode: 0644->0755]
js_upload/file-uploader/client/fileuploader.css [changed mode: 0644->0755]
js_upload/file-uploader/client/fileuploader.js [changed mode: 0644->0755]
js_upload/file-uploader/client/loading.gif [changed mode: 0644->0755]
js_upload/file-uploader/gpl-2.0.txt [changed mode: 0644->0755]
js_upload/file-uploader/license.txt [changed mode: 0644->0755]
js_upload/file-uploader/readme.md [changed mode: 0644->0755]
js_upload/file-uploader/server/OctetStreamReader.java [changed mode: 0644->0755]
js_upload/file-uploader/server/coldfusion/coldfusion.cfc [changed mode: 0644->0755]
js_upload/file-uploader/server/coldfusion/demo.cfm [changed mode: 0644->0755]
js_upload/file-uploader/server/coldfusion/readme.txt [changed mode: 0644->0755]
js_upload/file-uploader/server/perl.cgi [changed mode: 0644->0755]
js_upload/file-uploader/server/php.php [changed mode: 0644->0755]
js_upload/file-uploader/server/readme.txt [changed mode: 0644->0755]
js_upload/file-uploader/server/uploads/.gitignore [changed mode: 0644->0755]
js_upload/file-uploader/tests/action-acceptance.php [changed mode: 0644->0755]
js_upload/file-uploader/tests/action-handler-queue-test.php [changed mode: 0644->0755]
js_upload/file-uploader/tests/action-handler-test.php [changed mode: 0644->0755]
js_upload/file-uploader/tests/action-slow-response.php [changed mode: 0644->0755]
js_upload/file-uploader/tests/browser-bugs/safari-bug1.htm [changed mode: 0644->0755]
js_upload/file-uploader/tests/browser-bugs/safari-bug2.htm [changed mode: 0644->0755]
js_upload/file-uploader/tests/iframe-content-tests/application-javascript.php [changed mode: 0644->0755]
js_upload/file-uploader/tests/iframe-content-tests/application-json.php [changed mode: 0644->0755]
js_upload/file-uploader/tests/iframe-content-tests/header-404.php [changed mode: 0644->0755]
js_upload/file-uploader/tests/iframe-content-tests/somepage.php [changed mode: 0644->0755]
js_upload/file-uploader/tests/iframe-content-tests/text-html-large.php [changed mode: 0644->0755]
js_upload/file-uploader/tests/iframe-content-tests/text-html.php [changed mode: 0644->0755]
js_upload/file-uploader/tests/iframe-content-tests/text-javascript.php [changed mode: 0644->0755]
js_upload/file-uploader/tests/iframe-content-tests/text-plain.php [changed mode: 0644->0755]
js_upload/file-uploader/tests/jquery-1.4.2.min.js [changed mode: 0644->0755]
js_upload/file-uploader/tests/jquery-ui/jquery-ui-1.8.4.custom.min.js [changed mode: 0644->0755]
js_upload/file-uploader/tests/jquery-ui/ui-lightness/images/ui-bg_diagonals-thick_18_b81900_40x40.png [changed mode: 0644->0755]
js_upload/file-uploader/tests/jquery-ui/ui-lightness/images/ui-bg_diagonals-thick_20_666666_40x40.png [changed mode: 0644->0755]
js_upload/file-uploader/tests/jquery-ui/ui-lightness/images/ui-bg_flat_10_000000_40x100.png [changed mode: 0644->0755]
js_upload/file-uploader/tests/jquery-ui/ui-lightness/images/ui-bg_glass_100_f6f6f6_1x400.png [changed mode: 0644->0755]
js_upload/file-uploader/tests/jquery-ui/ui-lightness/images/ui-bg_glass_100_fdf5ce_1x400.png [changed mode: 0644->0755]
js_upload/file-uploader/tests/jquery-ui/ui-lightness/images/ui-bg_glass_65_ffffff_1x400.png [changed mode: 0644->0755]
js_upload/file-uploader/tests/jquery-ui/ui-lightness/images/ui-bg_gloss-wave_35_f6a828_500x100.png [changed mode: 0644->0755]
js_upload/file-uploader/tests/jquery-ui/ui-lightness/images/ui-bg_highlight-soft_100_eeeeee_1x100.png [changed mode: 0644->0755]
js_upload/file-uploader/tests/jquery-ui/ui-lightness/images/ui-bg_highlight-soft_75_ffe45c_1x100.png [changed mode: 0644->0755]
js_upload/file-uploader/tests/jquery-ui/ui-lightness/images/ui-icons_222222_256x240.png [changed mode: 0644->0755]
js_upload/file-uploader/tests/jquery-ui/ui-lightness/images/ui-icons_228ef1_256x240.png [changed mode: 0644->0755]
js_upload/file-uploader/tests/jquery-ui/ui-lightness/images/ui-icons_ef8c08_256x240.png [changed mode: 0644->0755]
js_upload/file-uploader/tests/jquery-ui/ui-lightness/images/ui-icons_ffd27a_256x240.png [changed mode: 0644->0755]
js_upload/file-uploader/tests/jquery-ui/ui-lightness/images/ui-icons_ffffff_256x240.png [changed mode: 0644->0755]
js_upload/file-uploader/tests/jquery-ui/ui-lightness/jquery-ui-1.8.4.custom.css [changed mode: 0644->0755]
js_upload/file-uploader/tests/qunit/package.json [changed mode: 0644->0755]
js_upload/file-uploader/tests/qunit/qunit/qunit.css [changed mode: 0644->0755]
js_upload/file-uploader/tests/qunit/qunit/qunit.js [changed mode: 0644->0755]
js_upload/file-uploader/tests/qunit/test/index.html [changed mode: 0644->0755]
js_upload/file-uploader/tests/qunit/test/same.js [changed mode: 0644->0755]
js_upload/file-uploader/tests/qunit/test/test.js [changed mode: 0644->0755]
js_upload/file-uploader/tests/sample-files/1imagelonglonglonglonglonglongname.gif [changed mode: 0644->0755]
js_upload/file-uploader/tests/sample-files/2larger.txt [changed mode: 0644->0755]
js_upload/file-uploader/tests/sample-files/3empty.txt [changed mode: 0644->0755]
js_upload/file-uploader/tests/sample-files/4text.txt [changed mode: 0644->0755]
js_upload/file-uploader/tests/sample-files/5text.txt [changed mode: 0644->0755]
js_upload/file-uploader/tests/sample-files/6text.txt [changed mode: 0644->0755]
js_upload/file-uploader/tests/sample-files/7small.txt [changed mode: 0644->0755]
js_upload/file-uploader/tests/sample-files/8text.txt [changed mode: 0644->0755]
js_upload/file-uploader/tests/separate-file-list.htm [changed mode: 0644->0755]
js_upload/file-uploader/tests/test-acceptance.htm [changed mode: 0644->0755]
js_upload/file-uploader/tests/test-drop-zone.htm [changed mode: 0644->0755]
js_upload/file-uploader/tests/test-handler-queue.htm [changed mode: 0644->0755]
js_upload/file-uploader/tests/test-upload-handlers.htm [changed mode: 0644->0755]
js_upload/js_upload.php [changed mode: 0644->0755]
ldapauth.tgz [changed mode: 0644->0755]
ldapauth/README [changed mode: 0644->0755]
ldapauth/ldapauth.php [changed mode: 0644->0755]
membersince.tgz [changed mode: 0644->0755]
membersince/membersince.php [changed mode: 0644->0755]
nsfw.tgz [changed mode: 0644->0755]
nsfw/README [changed mode: 0644->0755]
nsfw/nsfw.css [changed mode: 0644->0755]
nsfw/nsfw.php [changed mode: 0644->0755]
oembed.tgz [changed mode: 0644->0755]
oembed/oembed.js [changed mode: 0644->0755]
oembed/oembed.php [changed mode: 0644->0755]
oembed/oembed.png [changed mode: 0644->0755]
oembed/settings.tpl [changed mode: 0644->0755]
pageheader.tgz [new file with mode: 0755]
pageheader/README [new file with mode: 0755]
pageheader/pageheader.css [new file with mode: 0755]
pageheader/pageheader.php [new file with mode: 0755]
piwik.tgz [changed mode: 0644->0755]
piwik/README [changed mode: 0644->0755]
piwik/admin.tpl [changed mode: 0644->0755]
piwik/piwik.css [changed mode: 0644->0755]
piwik/piwik.php [changed mode: 0644->0755]
poormancron.tgz [changed mode: 0644->0755]
poormancron/poormancron.php [changed mode: 0644->0755]
posterous.tgz [changed mode: 0644->0755]
posterous/posterous-api.php [changed mode: 0644->0755]
posterous/posterous.css [changed mode: 0644->0755]
posterous/posterous.php [changed mode: 0644->0755]
randplace.tgz [changed mode: 0644->0755]
randplace/randplace.css [changed mode: 0644->0755]
randplace/randplace.php [changed mode: 0644->0755]
sniper.tgz [changed mode: 0644->0755]
sniper/100x100.gif [changed mode: 0644->0755]
sniper/100x100.jpg [changed mode: 0644->0755]
sniper/100x75.jpg [changed mode: 0644->0755]
sniper/100x80.jpg [changed mode: 0644->0755]
sniper/120x90hotshotsniper.jpg [changed mode: 0644->0755]
sniper/125x125.jpg [changed mode: 0644->0755]
sniper/140x90.jpg [changed mode: 0644->0755]
sniper/150x150.jpg [changed mode: 0644->0755]
sniper/160x86.gif [changed mode: 0644->0755]
sniper/180x135.jpg [changed mode: 0644->0755]
sniper/250x180.jpg [changed mode: 0644->0755]
sniper/300x200.jpg [changed mode: 0644->0755]
sniper/300x300.jpg [changed mode: 0644->0755]
sniper/32x32.jpg [changed mode: 0644->0755]
sniper/335x185.jpg [changed mode: 0644->0755]
sniper/60x60.jpg [changed mode: 0644->0755]
sniper/64x64.gif [changed mode: 0644->0755]
sniper/70x45.jpg [changed mode: 0644->0755]
sniper/70x60.jpg [changed mode: 0644->0755]
sniper/73x80.jpg [changed mode: 0644->0755]
sniper/75x57.jpg [changed mode: 0644->0755]
sniper/80x60.jpg [changed mode: 0644->0755]
sniper/80x70.jpg [changed mode: 0644->0755]
sniper/80x80hotshotsniper.jpg [changed mode: 0644->0755]
sniper/81x67.jpg [changed mode: 0644->0755]
sniper/description_etc.txt [changed mode: 0644->0755]
sniper/hotshotsniper.html [changed mode: 0644->0755]
sniper/hotshotsniper.swf [changed mode: 0644->0755]
sniper/sniper.php [changed mode: 0644->0755]
statusnet.tgz [changed mode: 0644->0755]
statusnet/README [changed mode: 0644->0755]
statusnet/admin.tpl [changed mode: 0644->0755]
statusnet/signinwithstatusnet.png [changed mode: 0644->0755]
statusnet/statusnet.css [changed mode: 0644->0755]
statusnet/statusnet.php [changed mode: 0644->0755]
tictac.tgz [changed mode: 0644->0755]
tictac/tictac.php [changed mode: 0644->0755]
tumblr.tgz [changed mode: 0644->0755]
tumblr/tumblr.css [changed mode: 0644->0755]
tumblr/tumblr.php [changed mode: 0644->0755]
twitter.tgz [changed mode: 0644->0755]
twitter/README [changed mode: 0644->0755]
twitter/admin.tpl [changed mode: 0644->0755]
twitter/lighter.png [changed mode: 0644->0755]
twitter/twitter.css [changed mode: 0644->0755]
twitter/twitter.php [changed mode: 0644->0755]
uhremotestorage.tgz [changed mode: 0644->0755]
uhremotestorage/settings.tpl [changed mode: 0644->0755]
uhremotestorage/uhremotestorage.php [changed mode: 0644->0755]
viewsrc.tgz [new file with mode: 0644]
viewsrc/viewsrc.php [new file with mode: 0644]
widgets.tgz [changed mode: 0644->0755]
widgets/settings.tpl [changed mode: 0644->0755]
widgets/widget_friends.php [changed mode: 0644->0755]
widgets/widget_like.php [changed mode: 0644->0755]
widgets/widget_like.tpl [changed mode: 0644->0755]
widgets/widgets.js [changed mode: 0644->0755]
widgets/widgets.php [changed mode: 0644->0755]
wppost.tgz [changed mode: 0644->0755]
wppost/wppost.css [changed mode: 0644->0755]
wppost/wppost.php [changed mode: 0644->0755]

old mode 100644 (file)
new mode 100755 (executable)
diff --git a/blackout.tgz b/blackout.tgz
new file mode 100644 (file)
index 0000000..2c0f6cf
Binary files /dev/null and b/blackout.tgz differ
diff --git a/blackout/README b/blackout/README
new file mode 100644 (file)
index 0000000..0580d52
--- /dev/null
@@ -0,0 +1,48 @@
+Name: blackout
+Description: Blackout your ~friendica node during a given period
+License: MIT
+Version: 1.0
+Author: Tobias Diekershoff <https://diekershoff.homeunix.net/friendika/~tobias>
+
+About
+=====
+
+This plugin will allow you to enter a date/time period during which
+all your ~friendica visitors from the web will be redirected to a page
+you can configure in the admin panel as well.
+
+Calls to the API and the communication with other ~friendica nodes is
+not effected from this plugin.
+
+If you enter a period the current date would be affected none of the
+currently logged in users will be effected as well. But if they log
+out they can't login again. That way you dear admin can double check
+the entered time periode and fix typos without having to hack the
+database directly.
+
+Requirements
+============
+
+THIS ADDON REQUIRES PHP VERSION 5.3 OR HIGHER.
+
+License
+=======
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
+
diff --git a/blackout/admin.tpl b/blackout/admin.tpl
new file mode 100644 (file)
index 0000000..2592219
--- /dev/null
@@ -0,0 +1,11 @@
+{{ 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>
diff --git a/blackout/blackout.php b/blackout/blackout.php
new file mode 100644 (file)
index 0000000..ffd59dc
--- /dev/null
@@ -0,0 +1,115 @@
+<?php
+/**
+ * Name: blackout
+ * Description: Blackout your ~friendica node during a given period
+ * License: MIT
+ * Version: 1.0
+ * Author: Tobias Diekershoff <https://diekershoff.homeunix.net/friendika/~tobias>
+ *
+ * About
+ * =====
+ *
+ * This plugin will allow you to enter a date/time period during which
+ * all your ~friendica visitors from the web will be redirected to a page
+ * you can configure in the admin panel as well.
+ *
+ * Calls to the API and the communication with other ~friendica nodes is
+ * not effected from this plugin.
+ *
+ * If you enter a period the current date would be affected none of the
+ * currently logged in users will be effected as well. But if they log
+ * out they can't login again. That way you dear admin can double check
+ * the entered time periode and fix typos without having to hack the
+ * database directly.
+ *
+ * Requirements
+ * ============
+ *
+ * THIS ADDON REQUIRES PHP VERSION 5.3 OR HIGHER.
+ *
+ * License
+ * =======
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ * 
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ * 
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ */
+
+
+function blackout_install() {
+    register_hook('page_header', 'addon/blackout/blackout.php', 'blackout_redirect');
+}
+
+function blackout_uninstall() {
+    unregister_hook('page_header', 'addon/blackout/blackout.php', 'blackout_redirect');
+}
+function blackout_redirect ($a, $b) {
+    // if we have a logged in user, don't throw her out
+    if (local_user()) {
+        return true;
+    }
+    // else...
+    $mystart = get_config('blackout','begindate');
+    $myend   = get_config('blackout','enddate');
+    $myurl   = get_config('blackout','url');
+    $now = time();
+    $date1 = DateTime::createFromFormat('Y-m-d G:i', $mystart);
+    $date2 = DateTime::createFromFormat('Y-m-d G:i', $myend);
+    if ( $date1 && $date2 ) {
+        $date1 = DateTime::createFromFormat('Y-m-d G:i', $mystart)->format('U');
+        $date2 = DateTime::createFromFormat('Y-m-d G:i', $myend)->format('U');
+    } else {
+           $date1 = 0;
+           $date2 = 0;
+    }
+    if (( $date1 <= $now ) && ( $now <= $date2 )) {
+        logger('redirecting user to blackout page');
+        goaway($myurl);
+    }
+}
+
+function blackout_plugin_admin(&$a, &$o) {
+    $mystart = get_config('blackout','begindate');
+    if (! is_string($mystart)) { $mystart = "YYYY-MM-DD:hhmm"; }
+    $myend   = get_config('blackout','enddate');
+    if (! is_string($myend)) { $myend = "YYYY-MM-DD:hhmm"; }
+    $myurl   = get_config('blackout','url');
+    if (! is_string($myurl)) { $myurl = "http://www.example.com"; }
+    $t = file_get_contents( dirname(__file__)."/admin.tpl" );
+    $o = replace_macros($t, array(
+        '$submit' => t('Submit'),
+        '$rurl' => array("rurl", "Redirect URL", $myurl, "all your visitors from the web will be redirected to this URL"),
+        '$startdate' => array("startdate", "Begin of the Blackout<br />(YYYY-MM-DD hh:mm)", $mystart, "format is <em>YYYY</em> year, <em>MM</em> month, <em>DD</em> day, <em>hh</em> hour and <em>mm</em> minute"),
+        '$enddate' => array("enddate", "End of the Blackout<br />(YYYY-MM-DD hh:mm)", $myend, ""),
+
+    ));
+    $date1 = DateTime::createFromFormat('Y-m-d G:i', $mystart);
+    $date2 = DateTime::createFromFormat('Y-m-d G:i', $myend);
+    if ($date2 < $date1) {
+        $o = "<div style='border: 2px solid #f00; bakckground: #b00; text-align: center; padding: 10px; margin: 30px;'>The end-date is prior to the start-date of the blackout, you should fix this.</div>" . $o;
+    } else {
+        $o = '<p>Please double check that the current settings for the blackout. Begin will be <strong>'.$mystart.'</strong> and it will end <strong>'.$myend.'</strong>.</p>' . $o;
+    }
+}
+function blackout_plugin_admin_post (&$a) {
+    $begindate = trim($_POST['startdate']);
+    $enddate = trim($_POST['enddate']);
+    $url = trim($_POST['rurl']);
+    set_config('blackout','begindate',$begindate);
+    set_config('blackout','enddate',$enddate);
+    set_config('blackout','url',$url);
+}
diff --git a/blockem.tgz b/blockem.tgz
new file mode 100755 (executable)
index 0000000..129a006
Binary files /dev/null and b/blockem.tgz differ
diff --git a/blockem/blockem.css b/blockem/blockem.css
new file mode 100755 (executable)
index 0000000..265b6ba
--- /dev/null
@@ -0,0 +1,18 @@
+
+#blockem-label {
+       float: left;
+       width: 300px;
+       margin-top: 10px;
+}
+
+#blockem-words {
+       float: left;
+       margin-top: 10px;
+       width: 400px;
+       height: 150px;
+}
+
+#blockem-submit {
+       margin-top: 15px;
+}
+
diff --git a/blockem/blockem.php b/blockem/blockem.php
new file mode 100755 (executable)
index 0000000..43f3455
--- /dev/null
@@ -0,0 +1,196 @@
+<?php
+
+
+/**
+ * Name: blockem
+ * Description: block people
+ * Version: 1.0
+ * Author: Mike Macgirvin <http://macgirvin.com/profile/mike>
+ * 
+ */
+
+function blockem_install() {
+       register_hook('prepare_body', 'addon/blockem/blockem.php', 'blockem_prepare_body');
+       register_hook('display_item', 'addon/blockem/blockem.php', 'blockem_display_item');
+       register_hook('plugin_settings', 'addon/blockem/blockem.php', 'blockem_addon_settings');
+       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('item_photo_menu', 'addon/blockem/blockem.php', 'blockem_item_photo_menu');
+}
+
+
+function blockem_uninstall() {
+       unregister_hook('prepare_body', 'addon/blockem/blockem.php', 'blockem_prepare_body');
+       unregister_hook('display_item', 'addon/blockem/blockem.php', 'blockem_display_item');
+       unregister_hook('plugin_settings', 'addon/blockem/blockem.php', 'blockem_addon_settings');
+       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('item_photo_menu', 'addon/blockem/blockem.php', 'blockem_item_photo_menu');
+
+}
+
+
+
+
+
+function blockem_addon_settings(&$a,&$s) {
+
+       if(! local_user())
+               return;
+
+    /* Add our stylesheet to the page so we can make our settings look nice */
+
+    $a->page['htmlhead'] .= '<link rel="stylesheet"  type="text/css" href="' . $a->get_baseurl() . '/addon/blockem/blockem.css' . '" media="all" />' . "\r\n";
+
+
+       $words = get_pconfig(local_user(),'blockem','words');
+       if(! $words)
+               $words = '';
+
+    $s .= '<div class="settings-block">';
+    $s .= '<h3>' . t('"Blockem" Settings') . '</h3>';
+    $s .= '<div id="blockem-wrapper">';
+    $s .= '<label id="blockem-label" for="blockem-words">' . t('Comma separated profile URLS to block') . ' </label>';
+    $s .= '<textarea id="blockem-words" type="text" name="blockem-words" >' . htmlspecialchars($words) . '</textarea>';
+    $s .= '</div><div class="clear"></div>';
+
+    $s .= '<div class="settings-submit-wrapper" ><input type="submit" id="blockem-submit" name="blockem-submit" class="settings-submit" value="' . t('Submit') . '" /></div></div>';
+
+       return;
+
+}
+
+function blockem_addon_settings_post(&$a,&$b) {
+
+       if(! local_user())
+               return;
+
+       if($_POST['blockem-submit']) {
+               set_pconfig(local_user(),'blockem','words',trim($_POST['blockem-words']));
+               info( t('BLOCKEM Settings saved.') . EOL);
+       }
+}
+
+function blockem_prepare_body(&$a,&$b) {
+
+       if(! local_user())
+               return;
+
+       $words = null;
+       if(local_user()) {
+               $words = get_pconfig(local_user(),'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['item']['author-link'],$word)) {
+                               $found = true;
+                               break;
+                       }
+               }
+       }
+       if($found) {
+               $rnd = random_string(8);        
+               $b['html'] = '<div id="blockem-wrap-' . $rnd . '" class="fakelink" onclick=openClose(\'blockem-' . $rnd . '\'); >' . sprintf( t('Blocked %s - Click to open/close'),$word ) . '</div><div id="blockem-' . $rnd . '" style="display: none; " >' . $b['html'] . '</div>';  
+       }
+}
+
+
+function blockem_display_item(&$a,&$b) {
+       if(strstr($b['output'],'id="blockem-wrap-'))
+               $b['output'] = preg_replace('/\<img(.*?)src=\"(.*?)\" class=\"wall\-item\-photo(.*?)\>/','<img$1src="' . $a->get_baseurl() . "/images/default-profile-sm.jpg" . '" class="wall-item-photo$3>',$b['output']);
+}
+
+
+function blockem_conversation_start(&$a,&$b) {
+
+       if(! local_user())
+               return;
+
+       $words = get_pconfig(local_user(),'blockem','words');
+       if($words) {
+               $a->data['blockem'] = explode(',',$words);
+       }
+       $a->page['htmlhead'] .= <<< EOT
+
+<script>
+function blockemBlock(author) {
+       $.get('blockem?block=' +author, function(data) {
+               location.reload(true);
+       });
+}
+function blockemUnblock(author) {
+       $.get('blockem?unblock=' +author, function(data) {
+               location.reload(true);
+       });
+}
+</script>
+
+EOT;
+
+}
+
+function blockem_item_photo_menu(&$a,&$b) {
+
+       if((! local_user()) || ($b['item']['self']))
+               return;
+
+       $blocked = false;
+       $author = $b['item']['author-link'];
+       if(is_array($a->data['blockem'])) {
+               foreach($a->data['blockem'] as $bloke) {
+                       if(link_compare($bloke,$author)) {
+                               $blocked = true;
+                               break;
+                       }
+               }
+       }
+       if($blocked)
+               $b['menu'][ t('Unblock Author')] = 'javascript:blockemUnblock("' . $author . '");';
+       else
+               $b['menu'][ t('Block Author')] = 'javascript:blockemBlock("' . $author . '");';
+}
+
+function blockem_module() {}
+
+
+function blockem_init(&$a) {
+
+       if(! local_user())
+               return;
+
+       $words = get_pconfig(local_user(),'blockem','words');
+
+       if(array_key_exists('block',$_GET) && $_GET['block']) {
+               if(strlen($words))
+                       $words .= ',';
+               $words .= trim($_GET['block']);
+       }
+       if(array_key_exists('unblock',$_GET) && $_GET['unblock']) {
+               $arr = explode(',',$words);
+               $newarr = array();
+
+               if(count($arr)) {
+                       foreach($arr as $x) {
+                               if(! link_compare(trim($x),trim($_GET['unblock'])))
+                                       $newarr[] = $x;
+                       }
+               }
+               $words = implode(',',$newarr);
+       }
+
+       set_pconfig(local_user(),'blockem','words',$words);
+       info( t('blockem settings updated') . EOL );
+       killme();
+}
\ No newline at end of file
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
diff --git a/editplain.tgz b/editplain.tgz
new file mode 100644 (file)
index 0000000..51b57d0
Binary files /dev/null and b/editplain.tgz differ
diff --git a/editplain/editplain.css b/editplain/editplain.css
new file mode 100755 (executable)
index 0000000..697f653
--- /dev/null
@@ -0,0 +1,14 @@
+
+
+
+#editplain-enable-label {
+       float: left;
+       width: 200px;
+       margin-bottom: 25px;
+}
+
+#editplain-checkbox {
+       float: left;
+}
+
+
diff --git a/editplain/editplain.php b/editplain/editplain.php
new file mode 100755 (executable)
index 0000000..61273ed
--- /dev/null
@@ -0,0 +1,87 @@
+<?php
+/**
+ * Name: Editplain
+ * Description: Disable richtext (TinyMCE) editor for status posting
+ * Version: 1.0
+ * Author: Mike Macgirvin <http://macgirvin.com/profile/mike>
+ * 
+ *
+ */
+
+
+function editplain_install() {
+
+       register_hook('plugin_settings', 'addon/editplain/editplain.php', 'editplain_settings');
+       register_hook('plugin_settings_post', 'addon/editplain/editplain.php', 'editplain_settings_post');
+
+       logger("installed editplain");
+}
+
+
+function editplain_uninstall() {
+
+       unregister_hook('post_local',    'addon/editplain/editplain.php', 'editplain_post_hook');
+       unregister_hook('plugin_settings', 'addon/editplain/editplain.php', 'editplain_settings');
+       unregister_hook('plugin_settings_post', 'addon/editplain/editplain.php', 'editplain_settings_post');
+
+
+       logger("removed editplain");
+}
+
+
+
+/**
+ *
+ * Callback from the settings post function.
+ * $post contains the $_POST array.
+ * We will make sure we've got a valid user account
+ * and if so set our configuration setting for this person.
+ *
+ */
+
+function editplain_settings_post($a,$post) {
+       if(! local_user() || (! x($_POST,'editplain-submit')))
+               return;
+       set_pconfig(local_user(),'system','plaintext',intval($_POST['editplain']));
+
+       info( t('Editplain settings updated.') . EOL);
+}
+
+
+/**
+ *
+ * Called from the Plugin Setting form. 
+ * Add our own settings info to the page.
+ *
+ */
+
+
+
+function editplain_settings(&$a,&$s) {
+
+       if(! local_user())
+               return;
+
+       /* Add our stylesheet to the page so we can make our settings look nice */
+
+       $a->page['htmlhead'] .= '<link rel="stylesheet"  type="text/css" href="' . $a->get_baseurl() . '/addon/editplain/editplain.css' . '" media="all" />' . "\r\n";
+
+       /* Get the current state of our config variable */
+
+       $enabled = get_pconfig(local_user(),'system','plaintext');
+       $checked = (($enabled) ? ' checked="checked" ' : '');
+
+       /* Add some HTML to the existing form */
+
+       $s .= '<div class="settings-block">';
+       $s .= '<h3>' . t('Editplain Settings') . '</h3>';
+       $s .= '<div id="editplain-enable-wrapper">';
+       $s .= '<label id="editplain-enable-label" for="editplain-checkbox">' . t('Disable richtext status editor') . '</label>';
+       $s .= '<input id="editplain-checkbox" type="checkbox" name="editplain" value="1" ' . $checked . '/>';
+       $s .= '</div><div class="clear"></div>';
+
+       /* provide a submit button */
+
+       $s .= '<div class="settings-submit-wrapper" ><input type="submit" name="editplain-submit" class="settings-submit" value="' . t('Submit') . '" /></div></div>';
+
+}
diff --git a/extcron.tgz b/extcron.tgz
new file mode 100755 (executable)
index 0000000..30c0f7e
Binary files /dev/null and b/extcron.tgz differ
diff --git a/extcron/extcron.php b/extcron/extcron.php
new file mode 100755 (executable)
index 0000000..e3c2120
--- /dev/null
@@ -0,0 +1,22 @@
+<?php
+
+
+/**
+ * Name: external cron
+ * Description: Use external server or service to run poller regularly
+ * Version: 1.0
+ * Author: Mike Macgirvin <http://macgirvin.com/profile/mike>
+ * 
+ * Notes: External service needs to make a web request to http(s)://yoursite/extcron
+ */
+
+function extcron_install() {}
+
+function extcron_uninstall() {}
+
+function extcron_module() {}
+
+function extcron_init(&$a) {
+       proc_run('php','include/poller.php');
+       killme();
+}
old mode 100644 (file)
new mode 100755 (executable)
index 062cb5e..e049d2b
Binary files a/facebook.tgz and b/facebook.tgz differ
old mode 100644 (file)
new mode 100755 (executable)
index 325f18d..ee7e489
@@ -1,15 +1,15 @@
-Installing the Friendika/Facebook connector
+Installing the Friendica/Facebook connector
 
 1. register an API key for your site from developer.facebook.com
-  a. We'd be very happy if you include "Friendika" in the application name
-     to increase name recognition. The Friendika icons are also present
+  a. We'd be very happy if you include "Friendica" in the application name
+     to increase name recognition. The Friendica icons are also present
      in the images directory and may be uploaded as a Facebook app icon.
-     Use images/friendika-16.jpg for the Icon and images/friendika-128.jpg for the Logo.
+     Use images/friendica-16.jpg for the Icon and images/friendica-128.jpg for the Logo.
   b. The url should be your site URL with a trailing slash.
      You may use http://portal.friendika.com/privacy as the privacy policy
      URL unless your site has different requirements, and 
      http://portal.friendika.com as the Terms of Service URL unless
-     you have different requirements. (Friendika is a software application
+     you have different requirements. (Friendica is a software application
      and does not require Terms of Service, though your installation of it might).
   c. Set the following values in your .htconfig.php file
         $a->config['facebook']['appid'] = 'xxxxxxxxxxx';
@@ -34,6 +34,6 @@ Facebook contacts will not be able to view private photos, as they are not able
 authenticate to your site to establish identity. We will address this 
 in a future release.
 
-Info: please make sure that you understand all aspects due to Friendika's 
-default licence which is: Creative Commons Attribution 3.0 (further info:
-http://creativecommons.org/licenses/by/3.0/ )
+Info: please make sure that you understand all aspects due to Friendica's 
+default licence which is: MIT License (further info:
+https://github.com/friendica/friendica/blob/master/LICENSE)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
index 00f7c4b..f155d39
@@ -6,19 +6,17 @@
  */
 
 /**
- * Installing the Friendika/Facebook connector
+ * Installing the Friendica/Facebook connector
  *
  * 1. register an API key for your site from developer.facebook.com
- *   a. We'd be very happy if you include "Friendika" in the application name
- *      to increase name recognition. The Friendika icons are also present
+ *   a. We'd be very happy if you include "Friendica" in the application name
+ *      to increase name recognition. The Friendica icons are also present
  *      in the images directory and may be uploaded as a Facebook app icon.
- *      Use images/friendika-16.jpg for the Icon and images/friendika-128.jpg for the Logo.
+ *      Use images/friendica-16.jpg for the Icon and images/friendica-128.jpg for the Logo.
  *   b. The url should be your site URL with a trailing slash.
- *      You may use http://portal.friendika.com/privacy as the privacy policy
- *      URL unless your site has different requirements, and 
- *      http://portal.friendika.com as the Terms of Service URL unless
- *      you have different requirements. (Friendika is a software application
- *      and does not require Terms of Service, though your installation of it might).
+ *      Friendica is a software application and does not require a Privacy Policy 
+ *      or Terms of Service, though your installation of it might. Facebook may require
+ *      that you provide a Privacy Policy, which we find ironic.  
  *   c. Set the following values in your .htconfig.php file
  *         $a->config['facebook']['appid'] = 'xxxxxxxxxxx';
  *         $a->config['facebook']['appsecret'] = 'xxxxxxxxxxxxxxx';
@@ -513,23 +511,37 @@ function facebook_post_hook(&$a,&$b) {
 
        $toplevel = (($b['id'] == $b['parent']) ? true : false);
 
-       if(strstr($b['postopts'],'facebook')) {
 
-               $linking = ((get_pconfig($b['uid'],'facebook','no_linking')) ? 0 : 1);
+       $linking = ((get_pconfig($b['uid'],'facebook','no_linking')) ? 0 : 1);
 
-               if((! $toplevel) && ($linking)) {
-                       $r = q("SELECT * FROM `item` WHERE `id` = %d AND `uid` = %d LIMIT 1",
-                               intval($b['parent']),
-                               intval($b['uid'])
-                       );
-                       if(count($r) && substr($r[0]['uri'],0,4) === 'fb::')
-                               $reply = substr($r[0]['uri'],4);
-                       elseif(count($r) && substr($r[0]['extid'],0,4) === 'fb::')
-                               $reply = substr($r[0]['extid'],4);
-                       else
-                               return;
-                       logger('facebook reply id=' . $reply);
-               }
+       if((! $toplevel) && ($linking)) {
+               $r = q("SELECT * FROM `item` WHERE `id` = %d AND `uid` = %d LIMIT 1",
+                       intval($b['parent']),
+                       intval($b['uid'])
+               );
+               if(count($r) && substr($r[0]['uri'],0,4) === 'fb::')
+                       $reply = substr($r[0]['uri'],4);
+               elseif(count($r) && substr($r[0]['extid'],0,4) === 'fb::')
+                       $reply = substr($r[0]['extid'],4);
+               else
+                       return;
+
+               $u = q("SELECT * FROM user where uid = %d limit 1",
+                       intval($b['uid'])
+               );
+               if(! count($u))
+                       return;
+
+               // only accept comments from the item owner. Other contacts are unknown to FB.
+               if(! link_compare($b['author-link'], $a->get_baseurl() . '/profile/' . $u[0]['nickname']))
+                       return;
+               
+
+               logger('facebook reply id=' . $reply);
+       }
+
+       if(strstr($b['postopts'],'facebook') || ($b['private']) || ($reply)) {
 
                if($b['private'] && $reply === false) {
                        $allow_people = expand_acl($b['allow_cid']);
@@ -624,6 +636,12 @@ function facebook_post_hook(&$a,&$b) {
                                        }
                                }
 
+                               // strip tag links to avoid link clutter, this really should be 
+                               // configurable because we're losing information
+
+                               $msg = preg_replace("/\#\[url=(.*?)\](.*?)\[\/url\]/is",'#$2',$msg);
+
+                               // provide the link separately for normal links
                                $msg = preg_replace("/\[url=(.*?)\](.*?)\[\/url\]/is",'$2 $1',$msg);
 
                                if(preg_match("/\[img\](.*?)\[\/img\]/is",$msg,$matches))
@@ -632,7 +650,7 @@ function facebook_post_hook(&$a,&$b) {
                                $msg = preg_replace("/\[img\](.*?)\[\/img\]/is", t('Image: ') . '$1', $msg);
 
                                if((strpos($link,z_root()) !== false) && (! $image))
-                                       $image = $a->get_baseurl() . '/images/friendika-64.jpg';
+                                       $image = $a->get_baseurl() . '/images/friendica-64.jpg';
 
                                $msg = trim(strip_tags(bbcode($msg)));
                                $msg = html_entity_decode($msg,ENT_QUOTES,'UTF-8');
@@ -656,7 +674,8 @@ function facebook_post_hook(&$a,&$b) {
                                        $shortlink = "";
                                        require_once('library/slinky.php');
 
-                                       $display_url = $a->get_baseurl() . '/display/' . $a->user['nickname'] . '/' . $b['id'];
+                                       $display_url = $b['plink'];
+
                                        $slinky = new Slinky( $display_url );
                                        // setup a cascade of shortening services
                                        // try to get a short link from these services
@@ -689,7 +708,7 @@ function facebook_post_hook(&$a,&$b) {
                                                $postvars['name'] = $linkname;
                                }
 
-                               if(($b['private']) && (! $b['parent'])) {
+                               if(($b['private']) && ($toplevel)) {
                                        $postvars['privacy'] = '{"value": "CUSTOM", "friends": "SOME_FRIENDS"';
                                        if(count($allow_arr))
                                                $postvars['privacy'] .= ',"allow": "' . implode(',',$allow_arr) . '"';
@@ -705,7 +724,7 @@ function facebook_post_hook(&$a,&$b) {
                                else { 
                                        $url = 'https://graph.facebook.com/me/feed';
                                        if($b['plink'])
-                                               $postvars['actions'] = '{"name": "' . t('View on Friendika') . '", "link": "' .  $b['plink'] . '"}';
+                                               $postvars['actions'] = '{"name": "' . t('View on Friendica') . '", "link": "' .  $b['plink'] . '"}';
                                }
 
                                logger('facebook: post to ' . $url);
@@ -851,6 +870,21 @@ function fb_consume_all($uid) {
 
 }
 
+function fb_get_photo($uid,$link) {
+       $access_token = get_pconfig($uid,'facebook','access_token');
+       if(! $access_token || (! stristr($link,'facebook.com/photo.php')))
+               return "\n" . '[url=' . $link . ']' . t('link') . '[/url]';
+       $ret = preg_match('/fbid=([0-9]*)/',$link,$match);
+       if($ret)
+               $photo_id = $match[1];
+       $x = fetch_url('https://graph.facebook.com/' . $photo_id . '?access_token=' . $access_token);
+       $j = json_decode($x);
+       if($j->picture)
+               return "\n\n" . '[url=' . $link . '][img]' . $j->picture . '[/img][/url]';
+       else
+               return "\n" . '[url=' . $link . ']' . t('link') . '[/url]';
+}
+
 function fb_consume_stream($uid,$j,$wall = false) {
 
        $a = get_app();
@@ -961,8 +995,9 @@ function fb_consume_stream($uid,$j,$wall = false) {
                        else {
                                if($entry->picture)
                                        $datarray['body'] .= "\n\n" . '[img]' . $entry->picture . '[/img]';
+                               // if just a link, it may be a wall photo - check
                                if($entry->link)
-                                       $datarray['body'] .= "\n" . '[url=' . $entry->link . ']' . t('link') . '[/url]';
+                                       $datarray['body'] .= fb_get_photo($uid,$entry->link);
                        }
                        if($entry->name)
                                $datarray['body'] .= "\n" . $entry->name;
old mode 100644 (file)
new mode 100755 (executable)
index 5c9ce16..e9c2041
Binary files a/fortunate.tgz and b/fortunate.tgz differ
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
index 5a6302e..f434d48
@@ -16,7 +16,7 @@ function fortunate_uninstall() {
 }
 
 
-function fortunate_fetch($a,&$b) {
+function fortunate_fetch(&$a,&$b) {
 
        $a->page['htmlhead'] .= '<link rel="stylesheet" type="text/css" href="' 
                . $a->get_baseurl() . '/addon/fortunate/fortunate.css' . '" media="all" />' . "\r\n";
diff --git a/geonames.tgz b/geonames.tgz
new file mode 100644 (file)
index 0000000..9055f5b
Binary files /dev/null and b/geonames.tgz differ
diff --git a/geonames/geonames.css b/geonames/geonames.css
new file mode 100755 (executable)
index 0000000..0c67e7f
--- /dev/null
@@ -0,0 +1,14 @@
+
+
+
+#geonames-enable-label {
+       float: left;
+       width: 200px;
+       margin-bottom: 25px;
+}
+
+#geonames-checkbox {
+       float: left;
+}
+
+
diff --git a/geonames/geonames.php b/geonames/geonames.php
new file mode 100755 (executable)
index 0000000..8226fc0
--- /dev/null
@@ -0,0 +1,189 @@
+<?php
+/**
+ * Name: Geonames
+ * Description: Use Geonames service to resolve nearest populated location for given latitude, longitude
+ * Version: 1.0
+ * Author: Mike Macgirvin <http://macgirvin.com/profile/mike>
+ * 
+ * 
+ * Pre-requisite: Register a username at geonames.org
+ * and set in .htconfig.php
+ *
+ * $a->config['geonames']['username'] = 'your_username';
+ * Also visit http://geonames.org/manageaccount and enable access to the free web services
+ *
+ * When plugin is installed, the system calls the plugin
+ * name_install() function, located in 'addon/name/name.php',
+ * where 'name' is the name of the addon.
+ * If the addon is removed from the configuration list, the 
+ * system will call the name_uninstall() function.
+ *
+ */
+
+
+function geonames_install() {
+
+       /**
+        * 
+        * Our plugin will attach in three places.
+        * The first is just prior to storing a local post.
+        *
+        */
+
+       register_hook('post_local', 'addon/geonames/geonames.php', 'geonames_post_hook');
+
+       /**
+        *
+        * Then we'll attach into the plugin settings page, and also the 
+        * settings post hook so that we can create and update
+        * user preferences.
+        *
+        */
+
+       register_hook('plugin_settings', 'addon/geonames/geonames.php', 'geonames_settings');
+       register_hook('plugin_settings_post', 'addon/geonames/geonames.php', 'geonames_settings_post');
+
+       logger("installed geonames");
+}
+
+
+function geonames_uninstall() {
+
+       /**
+        *
+        * uninstall unregisters any hooks created with register_hook
+        * during install. It may also delete configuration settings
+        * and any other cleanup.
+        *
+        */
+
+       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_post', 'addon/geonames/geonames.php', 'geonames_settings_post');
+
+
+       logger("removed geonames");
+}
+
+
+
+function geonames_post_hook($a, &$item) {
+
+       /**
+        *
+        * An item was posted on the local system.
+        * We are going to look for specific items:
+        *      - A status post by a profile owner
+        *      - The profile owner must have allowed our plugin
+        *
+        */
+
+       logger('geonames invoked');
+
+       if(! local_user())   /* non-zero if this is a logged in user of this system */
+               return;
+
+       if(local_user() != $item['uid'])    /* Does this person own the post? */
+               return;
+
+       if($item['parent'])   /* If the item has a parent, this is a comment or something else, not a status post. */
+               return;
+
+       /* Retrieve our personal config setting */
+
+       $geo_account = get_config('geonames', 'username');
+       $active = get_pconfig(local_user(), 'geonames', 'enable');
+
+       if((! $geo_account) || (! $active))
+               return;
+
+       if((! $item['coord']) || ($item['location']))
+               return;
+
+       $coords = explode(' ',$item['coord']);
+
+       /**
+        *
+        * OK, we're allowed to do our stuff.
+        *
+        */
+
+       $s = fetch_url('http://api.geonames.org/findNearbyPlaceName?lat=' . $coords[0] . '&lng=' . $coords[1] . '&username=' . $geo_account);
+
+       if(! $s)
+               return;
+
+       $xml = parse_xml_string($s);
+
+       if($xml->geoname->name && $xml->geoname->countryName)
+               $item['location'] = $xml->geoname->name . ', ' . $xml->geoname->countryName;
+
+
+//     logger('geonames : ' . print_r($xml,true), LOGGER_DATA);
+       return;
+}
+
+
+
+
+/**
+ *
+ * Callback from the settings post function.
+ * $post contains the $_POST array.
+ * We will make sure we've got a valid user account
+ * and if so set our configuration setting for this person.
+ *
+ */
+
+function geonames_settings_post($a,$post) {
+       if(! local_user() || (! x($_POST,'geonames-submit')))
+               return;
+       set_pconfig(local_user(),'geonames','enable',intval($_POST['geonames']));
+
+       info( t('Geonames settings updated.') . EOL);
+}
+
+
+/**
+ *
+ * Called from the Plugin Setting form. 
+ * Add our own settings info to the page.
+ *
+ */
+
+
+
+function geonames_settings(&$a,&$s) {
+
+       if(! local_user())
+               return;
+
+       $geo_account = get_config('geonames', 'username');
+
+       if(! $geo_account)
+               return;
+
+       /* Add our stylesheet to the page so we can make our settings look nice */
+
+       $a->page['htmlhead'] .= '<link rel="stylesheet"  type="text/css" href="' . $a->get_baseurl() . '/addon/geonames/geonames.css' . '" media="all" />' . "\r\n";
+
+       /* Get the current state of our config variable */
+
+       $enabled = get_pconfig(local_user(),'geonames','enable');
+
+       $checked = (($enabled) ? ' checked="checked" ' : '');
+
+       /* Add some HTML to the existing form */
+
+       $s .= '<div class="settings-block">';
+       $s .= '<h3>' . t('Geonames Settings') . '</h3>';
+       $s .= '<div id="geonames-enable-wrapper">';
+       $s .= '<label id="geonames-enable-label" for="geonames-checkbox">' . t('Enable Geonames Plugin') . '</label>';
+       $s .= '<input id="geonames-checkbox" type="checkbox" name="geonames" value="1" ' . $checked . '/>';
+       $s .= '</div><div class="clear"></div>';
+
+       /* provide a submit button */
+
+       $s .= '<div class="settings-submit-wrapper" ><input type="submit" name="geonames-submit" class="settings-submit" value="' . t('Submit') . '" /></div></div>';
+
+}
old mode 100644 (file)
new mode 100755 (executable)
index 901114e..a8ea7ee
Binary files a/impressum.tgz and b/impressum.tgz differ
old mode 100644 (file)
new mode 100755 (executable)
index 8e4255b..3f183fb
@@ -1,12 +1,12 @@
-Impressum Plugin for Friendika
+Impressum Plugin for Friendica
 
 Author: Tobias Diekershoff
         tobias.diekershoff@gmx.net
 
-License: 3-clause BSD license (same as Friendika)
+License: 3-clause BSD license (same as Friendica)
 
 About
-  This plugin adds an Impressum block to the /friendika page with informations
+  This plugin adds an Impressum block to the /friendica page with informations
   about the page operator/owner and how to contact you in case of any questions.
 
   In the notes and postal fields you can use HTML tags for formatting.
@@ -14,7 +14,7 @@ About
 Configuration:
   For configuration you can set the following variables in the .htconfig file
    * $a->config['impressum']['owner']           this is the Name of the Operator
-   * $a->config['impressum']['ownerprofile']    this is an optional Friendika account
+   * $a->config['impressum']['ownerprofile']    this is an optional Friendica account
                                                 where the above owner name will link to
    * $a->config['impressum']['email']           a contact email address (optional)
                                                 will be displayed slightly obfuscated
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
index b760c7e..ce9790b
@@ -1,7 +1,7 @@
 <?php
 /**
  * Name: Impressum
- * Description: Plugin to add contact information to the about page (/friendika)
+ * Description: Plugin to add contact information to the about page (/friendica)
  * Version: 1.0
  * Author: Tobias Diekershoff <https://diekershoff.homeunix.net/friendika/profile/tobias>
  * License: 3-clause BSD license
old mode 100644 (file)
new mode 100755 (executable)
index 96afb12..1140117
Binary files a/js_upload.tgz and b/js_upload.tgz differ
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
index 300a27b..28bbed6
Binary files a/ldapauth.tgz and b/ldapauth.tgz differ
old mode 100644 (file)
new mode 100755 (executable)
index cf28ef1..90ee259
@@ -4,8 +4,8 @@ to maintain a single password across the organisation.
 
 Optionally authenticates only if a member of a given group in the directory.
 
-The person must have registered with Friendika using the normal registration 
-procedures in order to have a Friendika user record, contact, and profile.
+The person must have registered with Friendica using the normal registration 
+procedures in order to have a Friendica user record, contact, and profile.
 
 Note when using with Windows Active Directory: you may need to set TLS_CACERT in your site
 ldap.conf file to the signing cert for your LDAP server. 
old mode 100644 (file)
new mode 100755 (executable)
index 7230302..b87f669
@@ -7,7 +7,7 @@
  */
  
 /**
- * Friendika addon
+ * Friendica addon
  * 
  * Module: LDAP Authenticate
  *
@@ -17,8 +17,8 @@
  *
  * Optionally authenticates only if a member of a given group in the directory.
  *
- * The person must have registered with Friendika using the normal registration 
- * procedures in order to have a Friendika user record, contact, and profile.
+ * The person must have registered with Friendica using the normal registration 
+ * procedures in order to have a Friendica user record, contact, and profile.
  *
  * Note when using with Windows Active Directory: you may need to set TLS_CACERT in your site
  * ldap.conf file to the signing cert for your LDAP server. 
old mode 100644 (file)
new mode 100755 (executable)
index fb44b00..f1310f4
Binary files a/membersince.tgz and b/membersince.tgz differ
old mode 100644 (file)
new mode 100755 (executable)
index 25d1207..c995c54
@@ -14,4 +14,7 @@ function membersince_install(){ register_hook('profile_advanced','addon/membersi
 
 function membersince_uninstall(){ unregister_hook('profile_advanced','addon/membersince/membersince.php','membersince_display'); }
 
-function membersince_display(&$a,&$b) { $b = str_replace('</div>' . "\n" . '<div id="advanced-profile-name-end"></div>',sprintf( t(' - Member since: %s') . EOL, datetime_convert('UTC',date_default_timezone_get(),$a->profile['register_date'])) . '</div>' . "\n" . '<div id="advanced-profile-name-end"></div>',$b); }
\ No newline at end of file
+function membersince_display(&$a,&$b) { 
+$b = preg_replace('/<\/dl>/',"</dl>\n\n\n<dl id=\"aprofile-membersince\" class=\"aprofile\">\n<dt>" . t('Member since:') . "</dt>\n<dd>" . datetime_convert('UTC',date_default_timezone_get(),$a->profile['register_date']) . "</dd>\n</dl>" ,$b, 1); 
+//$b = str_replace('</div>' . "\n" . '<div id="advanced-profile-name-end"></div>',sprintf( t(' - Member since: %s') . EOL, datetime_convert('UTC',date_default_timezone_get(),$a->profile['register_date'])) . '</div>' . "\n" . '<div id="advanced-profile-name-end"></div>',$b); 
+}
\ No newline at end of file
old mode 100644 (file)
new mode 100755 (executable)
index f90d2d1..8a1e3a3
Binary files a/nsfw.tgz and b/nsfw.tgz differ
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
index 548b63a..a8c1bfe
@@ -1,11 +1,11 @@
 
-#nsfw-label {
+#nsfw-label, #nsfw-enable-label {
        float: left;
        width: 300px;
        margin-top: 10px;
 }
 
-#nsfw-words {
+#nsfw-words, #nsfw-enable {
        float: left;
        margin-top: 10px;
 }
@@ -14,3 +14,6 @@
        margin-top: 15px;
 }
 
+.nsfw-desc {
+       margin-top: 10px;
+}
\ No newline at end of file
old mode 100644 (file)
new mode 100755 (executable)
index 7188049..a5b3ede
@@ -38,7 +38,7 @@ function nsfw_addon_settings(&$a,&$s) {
 
     $a->page['htmlhead'] .= '<link rel="stylesheet"  type="text/css" href="' . $a->get_baseurl() . '/addon/nsfw/nsfw.css' . '" media="all" />' . "\r\n";
 
-
+       $enable_checked = (intval(get_pconfig(local_user(),'nsfw','disable')) ? '' : ' checked="checked" ');
        $words = get_pconfig(local_user(),'nsfw','words');
        if(! $words)
                $words = 'nsfw,';
@@ -46,11 +46,16 @@ function nsfw_addon_settings(&$a,&$s) {
     $s .= '<div class="settings-block">';
     $s .= '<h3>' . t('"Not Safe For Work" Settings') . '</h3>';
     $s .= '<div id="nsfw-wrapper">';
+       
+    $s .= '<label id="nsfw-enable-label" for="nsfw-enable">' . t('Enable NSFW filter') . ' </label>';
+    $s .= '<input id="nsfw-enable" type="checkbox" name="nsfw-enable" value="1"' . $enable_checked . ' />';
+       $s .= '<div class="clear"></div>';
     $s .= '<label id="nsfw-label" for="nsfw-words">' . t('Comma separated words to treat as NSFW') . ' </label>';
     $s .= '<input id="nsfw-words" type="text" name="nsfw-words" value="' . $words .'" />';
     $s .= '</div><div class="clear"></div>';
 
-    $s .= '<div class="settings-submit-wrapper" ><input type="submit" id="nsfw-submit" name="nsfw-submit" class="settings-submit" value="' . t('Submit') . '" /></div></div>';
+    $s .= '<div class="settings-submit-wrapper" ><input type="submit" id="nsfw-submit" name="nsfw-submit" class="settings-submit" value="' . t('Submit') . '" /></div>';
+       $s .= '<div class="nsfw-desc">' . t('Use /expression/ to provide regular expressions') . '</div></div>';
 
        return;
 
@@ -63,6 +68,9 @@ function nsfw_addon_settings_post(&$a,&$b) {
 
        if($_POST['nsfw-submit']) {
                set_pconfig(local_user(),'nsfw','words',trim($_POST['nsfw-words']));
+               $enable = ((x($_POST,'nsfw-enable')) ? intval($_POST['nsfw-enable']) : 0);
+               $disable = 1-$enable;
+               set_pconfig(local_user(),'nsfw','disable', $disable);
                info( t('NSFW Settings saved.') . EOL);
        }
 }
@@ -70,6 +78,9 @@ function nsfw_addon_settings_post(&$a,&$b) {
 function nsfw_prepare_body(&$a,&$b) {
 
        $words = null;
+       if(get_pconfig(local_user(),'nsfw','disable'))
+               return;
+
        if(local_user()) {
                $words = get_pconfig(local_user(),'nsfw','words');
        }
@@ -86,14 +97,21 @@ function nsfw_prepare_body(&$a,&$b) {
                        if(! strlen(trim($word))) {
                                continue;
                        }
-
-                       if(stristr($b['html'],$word)) {
-                               $found = true;
-                               break;
+                       if(strpos($word,'/') === 0) {
+                               if(preg_match($word,$b['html'])) {
+                                       $found = true;
+                                       break;
+                               }
                        }
-                       if(stristr($b['item']['tag'], ']' . $word . '[' )) {
-                               $found = true;
-                               break;
+                       else {
+                               if(stristr($b['html'],$word)) {
+                                       $found = true;
+                                       break;
+                               }
+                               if(stristr($b['item']['tag'], ']' . $word . '[' )) {
+                                       $found = true;
+                                       break;
+                               }
                        } 
                }
        }
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
diff --git a/pageheader.tgz b/pageheader.tgz
new file mode 100755 (executable)
index 0000000..2dfa678
Binary files /dev/null and b/pageheader.tgz differ
diff --git a/pageheader/README b/pageheader/README
new file mode 100755 (executable)
index 0000000..f9b1752
--- /dev/null
@@ -0,0 +1,5 @@
+Page Header
+
+For server admins only.
+Displays a text message for system announcements'
+The message is entered in the admin account at settings, Plugin settings.
diff --git a/pageheader/pageheader.css b/pageheader/pageheader.css
new file mode 100755 (executable)
index 0000000..49232cf
--- /dev/null
@@ -0,0 +1,21 @@
+#pageheader-label {
+       float: left;
+       width: 300px;
+       margin-top: 10px;
+}
+
+#pageheader-words {
+       float: left;
+       margin-top: 10px;
+}
+
+#pageheader-submit {
+       margin-top: 15px;
+}
+
+.pageheader {
+    text-align: center;
+       width 100%;
+       margin-top: 25px;
+       font-size: 20px;
+}
diff --git a/pageheader/pageheader.php b/pageheader/pageheader.php
new file mode 100755 (executable)
index 0000000..d9b187d
--- /dev/null
@@ -0,0 +1,78 @@
+<?php
+
+
+/**
+ * Name: Page Header
+ * Description: Inserts a page header
+ * Version: 1.0
+ * Author: Keith Fernie <http://friendika.me4.it/profile/keith>
+ * 
+ */
+
+function pageheader_install() {
+    register_hook('page_header', 'addon/pageheader/pageheader.php', 'pageheader_fetch');
+       register_hook('plugin_settings', 'addon/pageheader/pageheader.php', 'pageheader_addon_settings');
+       register_hook('plugin_settings_post', 'addon/pageheader/pageheader.php', 'pageheader_addon_settings_post');
+
+}
+
+
+function pageheader_uninstall() {
+    unregister_hook('page_header', 'addon/pageheader/pageheader.php', 'pageheader_fetch');
+       unregister_hook('plugin_settings', 'addon/pageheader/pageheader.php', 'pageheader_addon_settings');
+       unregister_hook('plugin_settings_post', 'addon/pageheader/pageheader.php', 'pageheader_addon_settings_post');
+
+}
+
+
+
+
+
+function pageheader_addon_settings(&$a,&$s) {
+
+
+       if(! is_site_admin())
+               return;
+
+    /* Add our stylesheet to the page so we can make our settings look nice */
+
+    $a->page['htmlhead'] .= '<link rel="stylesheet"  type="text/css" href="' . $a->get_baseurl() . '/addon/pageheader/pageheader.css' . '" media="all" />' . "\r\n";
+
+
+       $words = get_config('pageheader','text');
+       if(! $words)
+               $words = 'pageheader,';
+
+    $s .= '<div class="settings-block">';
+    $s .= '<h3>' . t('"pageheader" Settings') . '</h3>';
+    $s .= '<div id="pageheader-wrapper">';
+    $s .= '<input id="pageheader-words" type="text" size="80" name="pageheader-words" value="' . $words .'" />';
+    $s .= '</div><div class="clear"></div>';
+
+    $s .= '<div class="settings-submit-wrapper" ><input type="submit" id="pageheader-submit" name="pageheader-submit" class="settings-submit" value="' . t('Submit') . '" /></div></div>';
+
+       return;
+
+}
+
+function pageheader_addon_settings_post(&$a,&$b) {
+
+       if(! is_site_admin())
+               return;
+
+       if($_POST['pageheader-submit']) {
+               set_config('pageheader','text',trim(strip_tags($_POST['pageheader-words'])));
+               info( t('pageheader Settings saved.') . EOL);
+       }
+}
+
+function pageheader_fetch($a,&$b) {
+
+    $a->page['htmlhead'] .= '<link rel="stylesheet" type="text/css" href="'
+        . $a->get_baseurl() . '/addon/pageheader/pageheader.css' . '" media="all" />' . "\r\n";
+    $s = get_config('pageheader','text');
+    if(! $s)
+        $s = '';
+    if ($s != '')
+       $b .= '<div class="pageheader">' . $s . '</div>';
+}
old mode 100644 (file)
new mode 100755 (executable)
index 1b2a482..54752c6
Binary files a/piwik.tgz and b/piwik.tgz differ
old mode 100644 (file)
new mode 100755 (executable)
index 20b78b5..d5060d0
@@ -3,7 +3,7 @@ by Tobias Diekershoff
    tobias.diekershoff(at)gmx.net
 
 This addon allows you to embed the code necessary for the FLOSS webanalytics
-tool piwik into the Friendika pages.
+tool piwik into the Friendica pages.
 
 Online version of this Document: http://ur1.ca/35m2x
 
@@ -13,7 +13,7 @@ To use this plugin you need a "piwik":http://piwik.org installation.
 
 ___ Where to find ___
 
-In the Friendika git repository @/addon/piwik/piwik.php@ and a CSS file for
+In the Friendica git repository @/addon/piwik/piwik.php@ and a CSS file for
 styling the opt-out notice.
 
 ___ Configuration ___
@@ -29,9 +29,9 @@ $a->config['piwik']['optout'] = true;
 The *baseurl* points to your piwik installation. Use the absolute path,
 remember trailing slashes but ignore the protocol (http/s) part of the URL.
 Change the *sideid* parameter to whatever ID you want to use for tracking your
-Friendika installation. The *optout* parameter (true|false) defines whether or
+Friendica installation. The *optout* parameter (true|false) defines whether or
 not a short notice about the utilization of piwik will be displayed on every
-page of your Friendika site (at the bottom of the page with some spacing to the
+page of your Friendica site (at the bottom of the page with some spacing to the
 other content). Part of the note is a link that allows the visitor to set an
 _opt-out_ cookie which will prevent visits from that user be tracked by piwik.
 
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
index bb43b67..e5e95bb
@@ -2,6 +2,8 @@
        padding: 100px 50px;
        text-align: justify;
        font-size: 0.85em;
+        margin-top:10px;
+        clear: both;
 }
 #piwik-code-block {
        display: none;
old mode 100644 (file)
new mode 100755 (executable)
index 890309d..5a46cdb
@@ -1,13 +1,13 @@
 <?php
 /**
  * Name: Piwik Analytics
- * Description: Piwik Analytics Plugin for Friendika
+ * Description: Piwik Analytics Plugin for Friendica
  * Version: 1.0
  * Author: Tobias Diekershoff <https://diekershoff.homeunix.net/friendika/profile/tobias>
  */
  
 
-/*   Piwik Analytics Plugin for Friendika
+/*   Piwik Analytics Plugin for Friendica
  *
  *   Author: Tobias Diekershoff
  *           tobias.diekershoff@gmx.net
@@ -21,7 +21,7 @@
  *     $a->config['piwik']['siteid'] = '1';
  *     $a->config['piwik']['optout'] = true;  // set to false to disable
  *
- *     Change the siteid to the ID that the Piwik tracker for your Friendika
+ *     Change the siteid to the ID that the Piwik tracker for your Friendica
  *     installation has. Alter the baseurl to fit your needs, don't care
  *     about http/https but beware to put the trailing / at the end of your
  *     setting.
@@ -45,7 +45,7 @@ function piwik_analytics($a,&$b) {
 
        /*
         *   styling of every HTML block added by this plugin is done in the
-        *   associated CSS file. We just have to tell Friendika to get it
+        *   associated CSS file. We just have to tell Friendica to get it
         *   into the page header.
         */
        $a->page['htmlhead'] .= '<link rel="stylesheet"  type="text/css" href="' . $a->get_baseurl() . '/addon/piwik/piwik.css' . '" media="all" />' . "\r\n";
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
index cbb5c24..3dcc536
Binary files a/posterous.tgz and b/posterous.tgz differ
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
index 639042b..5ecf0c2
@@ -2,6 +2,7 @@
 
 /**
  * Name: Posterous Post Connector
+ * Description: Post to Posterous accounts
  * Version: 1.0
  * Author: Mike Macgirvin <http://macgirvin.com/profile/mike>
  */
old mode 100644 (file)
new mode 100755 (executable)
index c5faeb4..937c02d
Binary files a/randplace.tgz and b/randplace.tgz differ
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
index bae8e7c..3550385
@@ -1,7 +1,7 @@
 <?php
 /**
  * Name: Random place
- * Description: Sample Friendika plugin/addon. Set a random place when posting.
+ * Description: Sample Friendica plugin/addon. Set a random place when posting.
  * Version: 1.0
  * Author: Mike Macgirvin <http://macgirvin.com/profile/mike>
  * 
old mode 100644 (file)
new mode 100755 (executable)
index a6917c2..369fcf6
Binary files a/sniper.tgz and b/sniper.tgz differ
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
index cdb5c50..59812cb
@@ -1,8 +1,13 @@
 <?php
 
 /**
- * Demo plugin for adding various types of Flash games to Friendika.
+ * Demo plugin for adding various types of Flash games to Friendica.
  * In this case we're using "Hot Shot Sniper" by FlashGames247
+ *
+ * Name: Sniper
+ * Description: Basic demonstration of flash game addons for Friendica
+ * Version: 1.0
+ * Author: Mike Macgirvin <http://macgirvin.com/profile/mike>
  */
 
 
@@ -34,4 +39,4 @@ $o .= <<< EOT
 EOT;
 
 return $o;
-}
\ No newline at end of file
+}
old mode 100644 (file)
new mode 100755 (executable)
index 93ae0e5..4067e68
Binary files a/statusnet.tgz and b/statusnet.tgz differ
old mode 100644 (file)
new mode 100755 (executable)
index 6ace482..48f620a
@@ -7,7 +7,7 @@ by Tobias Diekershoff
 !! with it, please contact the Author.                                      !!
 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
 
-With this addon to Friendika 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 any StatusNet instance (like identi.ca for example). 
 The messages will be strapped their rich context and shortened to to the character
 limit of the StatusNet instance in question if necessary. If shortening of the
@@ -30,7 +30,7 @@ was longer than the maximal allowed notice length requires it, that you have
 PHP5+ and curl on your server.
 Where to find
 
-In the Friendika git repository /addon/statusnet/, this directory contains all
+In the Friendica git repository /addon/statusnet/, this directory contains all
 required PHP files (including the Twitter OAuth library [1] by Abraham Williams,
 MIT licensed and the Slinky library [2] by Beau Lebens, BSD license), a CSS file
 for styling of the user configuration and an image to Sign in with StatusNet.
@@ -54,8 +54,8 @@ connect to the StatusNet account of choice.
    https://identi.ca/api/
  * OAuth Consumer key & secret
 
-To get the OAuth Consumer key pair the user has to (a) ask her Friendika admin
-if a pair already exists or (b) has to register the Friendika server as a
+To get the OAuth Consumer key pair the user has to (a) ask her Friendica admin
+if a pair already exists or (b) has to register the Friendica server as a
 client application on the StatusNet server. This can be done from the account
 settings under "Connect -> Connections -> Register an OAuth client application
 -> Register a new application".
@@ -64,12 +64,12 @@ During the registration of the OAuth client remember the following:
  * there is no callback url
  * register a desktop client
  * with read & write access
- * the Source URL should be the URL of your Friendika server
+ * the Source URL should be the URL of your Friendica server
 
 After the required credentials for the application are stored in the
-configuration you have to actually connect your Friendika account with
+configuration you have to actually connect your Friendica account with
 StatusNet. To do so follow the Sign in with StatusNet button, allow the access
-and copy the security code into the plugin configuration. Friendika will then
+and copy the security code into the plugin configuration. Friendica will then
 try to acquire the final OAuth credentials from the API, if successful the
 plugin settings will allow you to select to post your public messages to your
 StatusNet account.
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
index c29ea2e..7e9226a
@@ -5,7 +5,7 @@
  * Author: Tobias Diekershoff <https://diekershoff.homeunix.net/friendika/profile/tobias>
  */
  
-/*   StatusNet Plugin for Friendika
+/*   StatusNet Plugin for Friendica
  *
  *   Author: Tobias Diekershoff
  *           tobias.diekershoff@gmx.net
@@ -56,14 +56,13 @@ class StatusNetOAuth extends TwitterOAuth {
    *
    * @return API results
    *
-   * Copied here from the twitteroauth library and complemented by applying the proxy settings of friendika
+   * Copied here from the twitteroauth library and complemented by applying the proxy settings of friendica
    */
   function http($url, $method, $postfields = NULL) {
     $this->http_info = array();
     $ci = curl_init();
     /* Curl settings */
     $prx = get_config('system','proxy');
-    logger('Proxy SN: '.$prx);
     if(strlen($prx)) {
         curl_setopt($ci, CURLOPT_HTTPPROXYTUNNEL, 1);
         curl_setopt($ci, CURLOPT_PROXY, $prx);
@@ -215,7 +214,6 @@ function statusnet_settings_post ($a,$post) {
             } else {
                if (isset($_POST['statusnet-pin'])) {
                        //  if the user supplied us with a PIN from Twitter, let the magic of OAuth happen
-                       logger('got a StatusNet security code');
                     $api     = get_pconfig(local_user(), 'statusnet', 'baseapi');
                                        $ckey    = get_pconfig(local_user(), 'statusnet', 'consumerkey'  );
                                        $csecret = get_pconfig(local_user(), 'statusnet', 'consumersecret' );
@@ -282,7 +280,7 @@ function statusnet_settings(&$a,&$s) {
                 $s .= '<div class="settings-submit-wrapper" ><input type="submit" name="statusnet-submit" class="settings-submit" value="' . t('Submit') . '" /></div>';
             }
             $s .= '<h4>' . t('Provide your own OAuth Credentials') . '</h4>';
-            $s .= '<p>'. t('No consumer key pair for StatusNet found. Register your Friendika Account as an desktop client on your StatusNet account, copy the consumer key pair here and enter the API base root.<br />Before you register your own OAuth key pair ask the administrator if there is already a key pair for this Friendika installation at your favorited StatusNet installation.') .'</p>';
+            $s .= '<p>'. t('No consumer key pair for StatusNet found. Register your Friendica Account as an desktop client on your StatusNet account, copy the consumer key pair here and enter the API base root.<br />Before you register your own OAuth key pair ask the administrator if there is already a key pair for this Friendica installation at your favorited StatusNet installation.') .'</p>';
             $s .= '<div id="statusnet-consumer-wrapper">';
             $s .= '<label id="statusnet-consumerkey-label" for="statusnet-consumerkey">'. t('OAuth Consumer Key') .'</label>';
             $s .= '<input id="statusnet-consumerkey" type="text" name="statusnet-consumerkey" size="35" /><br />';
@@ -389,9 +387,6 @@ function statusnet_post_hook(&$a,&$b) {
        if(! strstr($b['postopts'],'statusnet'))
                return;
 
-       logger('StatusNet post invoked');
-
-
        load_pconfig($b['uid'], 'statusnet');
             
        $api     = get_pconfig($b['uid'], 'statusnet', 'baseapi');
@@ -408,7 +403,7 @@ function statusnet_post_hook(&$a,&$b) {
                $msg = strip_tags(bbcode($b['body']));
                // quotes not working - let's try this
                $msg = html_entity_decode($msg);
-               if ( strlen($msg) > $max_char) {
+               if (( strlen($msg) > $max_char) && $max_char > 0) {
                        $shortlink = "";
                        require_once('library/slinky.php');
                        $slinky = new Slinky( $b['plink'] );
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
index 961a25d..a0c2e61
Binary files a/tumblr.tgz and b/tumblr.tgz differ
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
index b4de0f3..3102184
@@ -2,6 +2,7 @@
 
 /**
  * Name: Tumblr Post Connector
+ * Description: Post to Tumblr
  * Version: 1.0
  * Author: Mike Macgirvin <http://macgirvin.com/profile/mike>
  */
@@ -171,7 +172,7 @@ function tumblr_send(&$a,&$b) {
                $params = array(
                        'email' => $tmbl_username,
                        'password' => $tmbl_password,
-                       'title' => (($b['title']) ? $b['title'] : t('Post from Friendica')),
+                       'title' => $b['title'],
                        'type' => 'regular',
                        'format' => 'html',
                        'generator' => 'Friendica',
old mode 100644 (file)
new mode 100755 (executable)
index 6fbea73..740e3c8
Binary files a/twitter.tgz and b/twitter.tgz differ
old mode 100644 (file)
new mode 100755 (executable)
index e6d5f12..99edf0d
@@ -7,7 +7,7 @@ By Tobias Diekershoff
 !!   with it, please contact the Author.                                    !!
 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
 
-With this addon to Friendika 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
 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
@@ -20,7 +20,7 @@ Online version of this document: http://ur1.ca/35mml
 
 ___ Requirements ___
 
-To use this plugin you have to register your Friendika instance as an
+To use this plugin you have to register your Friendica instance as an
 _client application_ for Twitter with _read and write_ access, we do not intend
 to use Twitter for login. The registration can be done at twitter.com/apps
 and you need to have a Twitter account to do so.
@@ -34,7 +34,7 @@ message was longer than 140 characters requires it, that you have *PHP5+* and
 
 ___ Where to find ___
 
-In the Friendika git repository /addon/twitter/, this directory contains
+In the Friendica git repository /addon/twitter/, this directory contains
 all required PHP files (including the Twitter OAuth library [1] by Abraham
 Williams, MIT licensed and the Slinky library [2] by Beau Lebens, BSD license),
 a CSS file for styling of the user configuration and an image to _Sign in with
@@ -68,7 +68,7 @@ connect to Twitter. To do so one has to follow the _Sign in with Twitter_
 button (the page will be opened in a new browser window/tab) and get a PIN from
 Twitter. This PIN has to be entered on the settings page. After submitting the
 PIN the plugin will get OAuth credentials identifying this user from the
-Friendika account.
+Friendica account.
 
 If this first step was successful the Twitter configuration will be changed
 on the "Plugin Settings" page displaying two check boxes. One to enable/disable
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
index 6f13a44..a6f73c8
@@ -6,7 +6,7 @@
  */
 
 
-/*   Twitter Plugin for Friendika
+/*   Twitter Plugin for Friendica
  *
  *   Author: Tobias Diekershoff
  *           tobias.diekershoff@gmx.net
  *     To use this plugin you need a OAuth Consumer key pair (key & secret)
  *     you can get it from Twitter at https://twitter.com/apps
  *
- *     Register your Friendika site as "Client" application with "Read & Write" access
+ *     Register your Friendica site as "Client" application with "Read & Write" access
  *     we do not need "Twitter as login". When you've registered the app you get the
  *     OAuth Consumer key and secret pair for your application/site.
  *
- *     Add this key pair to your global .htconfig.php
+ *     Add this key pair to your global .htconfig.php or use the admin panel.
  *
  *     $a->config['twitter']['consumerkey'] = 'your consumer_key here';
  *     $a->config['twitter']['consumersecret'] = 'your consumer_secret here';
@@ -91,10 +91,11 @@ function twitter_settings_post ($a,$post) {
                /***
                 * if the twitter-disconnect checkbox is set, clear the OAuth key/secret pair
                 * from the user configuration
-                * TODO can we revoke the access tokens at Twitter and do we need to do so?
                 */
                del_pconfig( local_user(), 'twitter', 'consumerkey'  );
                del_pconfig( local_user(), 'twitter', 'consumersecret' );
+                del_pconfig( local_user(), 'twitter', 'oauthtoken'  );  
+                del_pconfig( local_user(), 'twitter', 'oauthsecret'  );  
                 del_pconfig( local_user(), 'twitter', 'post' );
                 del_pconfig( local_user(), 'twitter', 'post_by_default' );
        } else {
@@ -168,7 +169,7 @@ function twitter_settings(&$a,&$s) {
                        /***
                         *  make some nice form
                         */
-                       $s .= '<p>'. t('At this Friendika instance the Twitter plugin was enabled but you have not yet connected your account to your Twitter account. To do so click the button below to get a PIN from Twitter which you have to copy into the input box below and submit the form. Only your <strong>public</strong> posts will be posted to Twitter.') .'</p>';
+                       $s .= '<p>'. t('At this Friendica instance the Twitter plugin was enabled but you have not yet connected your account to your Twitter account. To do so click the button below to get a PIN from Twitter which you have to copy into the input box below and submit the form. Only your <strong>public</strong> posts will be posted to Twitter.') .'</p>';
                        $s .= '<a href="'.$connection->getAuthorizeURL($token).'" target="_twitter"><img src="addon/twitter/lighter.png" alt="'.t('Log in with Twitter').'"></a>';
                        $s .= '<div id="twitter-pin-wrapper">';
                        $s .= '<label id="twitter-pin-label" for="twitter-pin">'. t('Copy the PIN from Twitter here') .'</label>';
old mode 100644 (file)
new mode 100755 (executable)
index 5515aea..055fa76
Binary files a/uhremotestorage.tgz and b/uhremotestorage.tgz differ
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
index 3b8ab34..a2a8cc3
@@ -2,7 +2,7 @@
 /**
  * Name: unhosted remote storage
  * Description: Expose in user XRD the link to external user's unhosted-enabled storage
- * Version: 1.2
+ * Version: 1.0
  * Author: Fabio Comuni <http://kirgroup.com/profile/fabrixxm>
  */
  
@@ -81,7 +81,7 @@ function uhremotestorage_settings($a, &$s){
        $tpl = file_get_contents(dirname(__file__)."/settings.tpl");
        $s .= replace_macros($tpl, array(
                '$title' => 'Unhosted remote storage',
-               '$desc' => sprintf( t('Allow to use your friendika id (%s) to connecto to external unhosted-enabled storage (like ownCloud). See <a href="http://www.w3.org/community/unhosted/wiki/RemoteStorage#WebFinger">RemoteStorage WebFinger</a>'), $uid ),
+               '$desc' => sprintf( t('Allow to use your friendica id (%s) to connecto to external unhosted-enabled storage (like ownCloud). See <a href="http://www.w3.org/community/unhosted/wiki/RemoteStorage#WebFinger">RemoteStorage WebFinger</a>'), $uid ),
                '$url'  => array( 'unhoestedurl', t('Template URL (with {category})'), $url, 'If your are using ownCloud, your unhosted url will be like <tt>http://<i>HOST</i>/apps/remoteStorage/WebDAV.php/<i>USER</i>/remoteStorage/{category}</tt>'),
                '$auth' => array( 'unhoestedauth', t('OAuth end-point'), $auth, 'If your are using ownCloud, your OAuth endpoint will be like <tt>http://<i>HOST</i>/apps/remoteStorage/auth.php/<i>USER</i></tt>'),
                '$api'  => array( 'unhoestedapi', t('Api'), $api, 'If your are using ownCloud, your api will be <tt>WebDAV</tt>', $arr_api),
diff --git a/viewsrc.tgz b/viewsrc.tgz
new file mode 100644 (file)
index 0000000..2aa7d0f
Binary files /dev/null and b/viewsrc.tgz differ
diff --git a/viewsrc/viewsrc.php b/viewsrc/viewsrc.php
new file mode 100644 (file)
index 0000000..e39fe8a
--- /dev/null
@@ -0,0 +1,27 @@
+<?php
+
+
+/**
+ * Name: viewsrc
+ * Description: Add "View Source" link to item context
+ * Version: 1.0
+ * Author: Mike Macgirvin <http://macgirvin.com/profile/mike>
+ * 
+ */
+
+function viewsrc_install() {
+       register_hook('item_photo_menu', 'addon/viewsrc/viewsrc.php', 'viewsrc_item_photo_menu');
+}
+
+
+function viewsrc_uninstall() {
+       unregister_hook('item_photo_menu', 'addon/viewsrc/viewsrc.php', 'viewsrc_item_photo_menu');
+}
+
+
+function viewsrc_item_photo_menu(&$a,&$b) {
+       if(! local_user())
+               return;
+       $b['menu'] = array_merge( array( t('View Source') => $a->get_baseurl() . '/viewsrc/'. $b['item']['id']), $b['menu']);
+
+}
old mode 100644 (file)
new mode 100755 (executable)
index 4f46fd4..416f08c
Binary files a/widgets.tgz and b/widgets.tgz differ
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
index 6b1cf18..195667e
@@ -37,6 +37,6 @@ function friends_widget_content(&$a, $conf){
                
        </style>";
        $o .= _abs_url(contact_block());
-       $o .= "<a href='".$a->get_baseurl().'/profile/'.$a->profile['nickname']."'>". t('Connect on Friendika!') ."</a>";
+       $o .= "<a href='".$a->get_baseurl().'/profile/'.$a->profile['nickname']."'>". t('Connect on Friendica!') ."</a>";
        return $o;
 }
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
index 226a34c..27cabfd
@@ -1,7 +1,7 @@
 <?php
 /**
  * Name: Widgets
- * Description: Allow to embed info from friendika into another site
+ * Description: Allow to embed info from friendica into another site
  * Version: 1.0
  * Author: Fabio Comuni <http://kirgroup.com/profile/fabrix/>
  */
old mode 100644 (file)
new mode 100755 (executable)
index 2e8fc4f..3485886
Binary files a/wppost.tgz and b/wppost.tgz differ
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
index f87d32b..6db0d94
@@ -2,6 +2,7 @@
 
 /**
  * Name: WordPress Post Connector
+ * Description: Post to WordPress (or anything else which uses blogger XMLRPC API)
  * Version: 1.0
  * Author: Mike Macgirvin <http://macgirvin.com/profile/mike>
  */