Extend openstreetmap description since quite a few people have installed it and been...
authorThomas Willingham <founder@kakste.com>
Fri, 27 Jul 2012 23:26:14 +0000 (00:26 +0100)
committerThomas Willingham <founder@kakste.com>
Fri, 27 Jul 2012 23:26:14 +0000 (00:26 +0100)
Update my URL in infiniteimprobabilitydrive so people can shout at the right person.

Remove pokes from morechoice, and put them in their own addon.  We'll leave the really "out there" ones away from the git.

Group text, created by user request.  Sets the group editor to text mode.  This is possibly too 'special interest' for the git, but I'll let somebody else decide.

group_text/group_text.php [new file with mode: 0755]
infiniteimprobabilitydrive/infiniteimprobabilitydrive.php
morechoice/morechoice.php
morepokes/morepokes.php [new file with mode: 0644]
openstreetmap/openstreetmap.php

diff --git a/group_text/group_text.php b/group_text/group_text.php
new file mode 100755 (executable)
index 0000000..151ff0a
--- /dev/null
@@ -0,0 +1,86 @@
+<?php
+/**
+ * Name: Group Text
+ * Description: Disable images in group edit menu
+ * Version: 1.0
+ * Author: Thomas Willingham <https://kakste.com/profile/beardyunixer>
+ * 
+ *
+ */
+
+
+function group_text_install() {
+
+       register_hook('plugin_settings', 'addon/group_text/group_text.php', 'group_text_settings');
+       register_hook('plugin_settings_post', 'addon/group_text/group_text.php', 'group_text_settings_post');
+
+       logger("installed group_text");
+}
+
+
+function group_text_uninstall() {
+
+       unregister_hook('plugin_settings', 'addon/group_text/group_text.php', 'group_text_settings');
+       unregister_hook('plugin_settings_post', 'addon/group_text/group_text.php', 'group_text_settings_post');
+
+
+       logger("removed group_text");
+}
+
+
+
+/**
+ *
+ * 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 group_text_settings_post($a,$post) {
+       if(! local_user() || (! x($_POST,'group_text-submit')))
+               return;
+       set_pconfig(local_user(),'system','groupedit_image_limit',intval($_POST['group_text']));
+
+       info( t('Editplain settings updated.') . EOL);
+}
+
+
+/**
+ *
+ * Called from the Plugin Setting form. 
+ * Add our own settings info to the page.
+ *
+ */
+
+
+
+function group_text_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/group_text/group_text.css' . '" media="all" />' . "\r\n";
+
+       /* Get the current state of our config variable */
+
+       $enabled = get_pconfig(local_user(),'system','groupedit_image_limit');
+       $checked = (($enabled) ? ' checked="checked" ' : '');
+
+       /* Add some HTML to the existing form */
+
+       $s .= '<div class="settings-block">';
+       $s .= '<h3>' . t('Group Text') . '</h3>';
+       $s .= '<div id="group_text-enable-wrapper">';
+       $s .= '<label id="group_text-enable-label" for="group_text-checkbox">' . t('Use a text only (non-image) group selector in the "group edit" menu') . '</label>';
+       $s .= '<input id="group_text-checkbox" type="checkbox" name="group_text" value="1" ' . $checked . '/>';
+       $s .= '</div><div class="clear"></div>';
+
+       /* provide a submit button */
+
+       $s .= '<div class="settings-submit-wrapper" ><input type="submit" name="group_text-submit" class="settings-submit" value="' . t('Submit') . '" /></div></div>';
+
+}
index dce36924580f9bc539ac96d58149f1fe6e9439ba..5e46b3b7b6837b5df906896dbc208738ba932097 100644 (file)
@@ -3,7 +3,7 @@
 * Name: Infinite Improbability Drive
 * Description: Infinitely Improbably Find A Random User
 * Version: 1.0
-* Author: Thomas Willingham
+* Author: Thomas Willingham <https://kakste.com/profile/beardyunixer>
 */
 
 function infiniteimprobabilitydrive_install() {
index bf97b76bc834a64b99ee83170a4f18a9b6c3afc2..d22ec3aaf1dbfe3ab7e8e7c629e3d4303d996fb9 100644 (file)
@@ -14,8 +14,6 @@ function morechoice_install() {
        register_hook('gender_selector', 'addon/morechoice/morechoice.php', 'morechoice_gender_selector');
        register_hook('sexpref_selector', 'addon/morechoice/morechoice.php', 'morechoice_sexpref_selector');
        register_hook('marital_selector', 'addon/morechoice/morechoice.php', 'morechoice_marital_selector');
-       register_hook('poke_verbs', 'addon/morechoice/morechoice.php', 'morechoice_poke_verbs');
-
 }
 
 
@@ -24,6 +22,8 @@ function morechoice_uninstall() {
        unregister_hook('gender_selector', 'addon/morechoice/morechoice.php', 'morechoice_gender_selector');
        unregister_hook('sexpref_selector', 'addon/morechoice/morechoice.php', 'morechoice_sexpref_selector');
        unregister_hook('marital_selector', 'addon/morechoice/morechoice.php', 'morechoice_marital_selector');
+
+// We need to leave this here for a while, because we now have a situation where people can end up with an orphaned hook.
        unregister_hook('poke_verbs', 'addon/morechoice/morechoice.php', 'morechoice_poke_verbs');
 
 }
@@ -123,11 +123,4 @@ function morechoice_marital_selector($a,&$b) {
                $b[] = 'Hurt in the past';
                $b[] = 'Wallowing in self-pity';
        }
-}
-
-function morechoice_poke_verbs($a,&$b) {
-       $b['bitchslap'] = array('bitchslapped', t('bitchslap'), t('bitchslapped'));
-       $b['shag'] = array('shag', t('shag'), t('shagged'));
-
-
 }
\ No newline at end of file
diff --git a/morepokes/morepokes.php b/morepokes/morepokes.php
new file mode 100644 (file)
index 0000000..5d1153e
--- /dev/null
@@ -0,0 +1,38 @@
+<?php
+/**
+ * Name: More Pokes
+ * Description: Additional poke options
+ * Version: 1.0
+ * Author: Thomas Willingham <https://kakste.com/profile/beardyunixer>
+ *
+ */
+
+function morepokes_install() {
+         register_hook('poke_verbs', 'addon/morepokes/morepokes.php', 'morepokes_poke_verbs');
+}
+
+function morepokes_uninstall() {
+         unregister_hook('poke_verbs', 'addon/morepokes/morepokes.php', 'morepokes_poke_verbs');
+}
+
+function morepokes_poke_verbs($a,&$b) {
+       $b['bitchslap'] = array('bitchslapped', t('bitchslap'), t('bitchslapped'));
+       $b['shag'] = array('shag', t('shag'), t('shagged'));
+       $b['somethingobscenelybiological'] = array('something obscenely biological', t('do something obscenely biological to'), t('did something obscenely biological to'));
+       $b['newpokefeature'] = array('pointed out the new poke feature to', t('point out the new poke feature to'), t('pointed out the new poke feature to'));
+       $b['declareundyinglove'] = array('declared undying love for', t('declare undying love for'), t('declared undying love for'));
+       $b['setfireto'] = array('set fire to', t('set fire to'), t('set fire to'));
+       $b['patent'] = array('patented', t('patent'), t('patented'));
+       $b['strokebeard'] = array('stroked their beard at', t('stroke beard'), t('stroked their beard at'));
+       $b['bemoan'] = array('bemoaned the declining standards of modern secondary and tertiary education to', t('bemoaned the declining standards of modern secondary and tertiary education to'), t('bemoans the declining standards of modern secondary and tertiary education to'));
+       $b['hugs'] = array('hugged', t('hug'), t('hugged'));
+       $b['kiss'] = array('kissed', t('kiss'), t('kissed'));
+       $b['raiseeyebrows'] = array('raised their eyebrows at', t('raise eyebrows at'), t('raised their eyebrows at'));
+       $b['insult'] = array('insulted', t('insult'), t('insulted'));
+       $b['praise'] = array('praised', t('praise'), t('praised'));
+       $b['bedubiousof'] = array('was dubious of', t('be dubious of'), t('was dubious of'));
+       $b['eat'] = array('ate', t('eat'), t('ate'));
+       $b['giggleandfawn'] = array('giggled and fawned at', t('giggle and fawn at'), t('giggled and fawned at'));
+       $b['doubt'] = array('doubted', t('doubt'), t('doubted'));
+       $b['glare'] = array('glared at', t('glare'), t('glared at'));
+;}
\ No newline at end of file
index 415e448d7d2ed7893863ddee613b88fbbb730b4e..fda29905d411821fb145ce80aae1c01767731ced 100755 (executable)
@@ -1,7 +1,7 @@
 <?php
 /**
  * Name: OpenStreetMap
- * Description: Use OpenStreetMap for displaying locations.
+ * Description: Use OpenStreetMap for displaying locations.  After activation the post location just beneath your avatar in your posts will link to openstreetmap.
  * Version: 1.1
  * Author: Mike Macgirvin <http://macgirvin.com/profile/mike>
  * Author: Klaus Weidenbach