diff --git a/buildtgz b/buildtgz index dec535dd6..61dd5d71c 100755 --- a/buildtgz +++ b/buildtgz @@ -3,7 +3,7 @@ # without providing a Makefile in each one. # So we will just manually find any source # directories which contain any files that -# are newer than are .tgz file and rebuild +# are newer than our .tgz file and rebuild # it if any are found SUBDIRS=`ls -d [a-z]*/ | tr -d /` @@ -11,11 +11,13 @@ for a in $SUBDIRS; do TGZ=$a.tgz if [[ ! -f $TGZ ]]; then echo "Building: " $TGZ +# git log $a > $a/$a.log tar zcvf $TGZ $a else TOUCHED=`find $a -cnewer $TGZ` if [[ -n $TOUCHED ]]; then echo "Building: " $TGZ +# git log $a > $a/$a.log tar zcvf $TGZ $a fi fi diff --git a/editplain.tgz b/editplain.tgz index 51b57d0d1..c99c7f63b 100644 Binary files a/editplain.tgz and b/editplain.tgz differ diff --git a/editplain/editplain.php b/editplain/editplain.php index 61273edf2..7d91c2952 100755 --- a/editplain/editplain.php +++ b/editplain/editplain.php @@ -20,7 +20,6 @@ function editplain_install() { 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'); diff --git a/numfriends.tgz b/numfriends.tgz new file mode 100644 index 000000000..df4725803 Binary files /dev/null and b/numfriends.tgz differ diff --git a/numfriends/numfriends.css b/numfriends/numfriends.css new file mode 100755 index 000000000..c92ef8dce --- /dev/null +++ b/numfriends/numfriends.css @@ -0,0 +1,14 @@ + + + +#numfriends-label { + float: left; + width: 200px; + margin-bottom: 25px; +} + +#numfriends { + float: left; +} + + diff --git a/numfriends/numfriends.php b/numfriends/numfriends.php new file mode 100755 index 000000000..6ca7b3951 --- /dev/null +++ b/numfriends/numfriends.php @@ -0,0 +1,87 @@ + + * + * + */ + + +function numfriends_install() { + + register_hook('plugin_settings', 'addon/numfriends/numfriends.php', 'numfriends_settings'); + register_hook('plugin_settings_post', 'addon/numfriends/numfriends.php', 'numfriends_settings_post'); + + logger("installed numfriends"); +} + + +function numfriends_uninstall() { + + unregister_hook('plugin_settings', 'addon/numfriends/numfriends.php', 'numfriends_settings'); + unregister_hook('plugin_settings_post', 'addon/numfriends/numfriends.php', 'numfriends_settings_post'); + + + logger("removed numfriends"); +} + + + +/** + * + * 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 numfriends_settings_post($a,$post) { + if(! local_user() || (! x($_POST,'numfriends-submit'))) + return; + + set_pconfig(local_user(),'system','display_friend_count',intval($_POST['numfriends'])); + info( t('Numfriends settings updated.') . EOL); +} + + +/** + * + * Called from the Plugin Setting form. + * Add our own settings info to the page. + * + */ + + + +function numfriends_settings(&$a,&$s) { + + if(! local_user()) + return; + + /* Add our stylesheet to the page so we can make our settings look nice */ + + $a->page['htmlhead'] .= '' . "\r\n"; + + /* Get the current state of our config variable */ + + $numfriends = get_pconfig(local_user(),'system','display_friend_count'); + if($numfriends === false) + $numfriends = 24; + + /* Add some HTML to the existing form */ + + $s .= '
'; + $s .= '

' . t('Numfriends Settings') . '

'; + $s .= '
'; + $s .= ''; + $s .= ''; + $s .= '
'; + + /* provide a submit button */ + + $s .= '
'; + +} diff --git a/oembed.tgz b/oembed.tgz deleted file mode 100755 index 733588cdc..000000000 Binary files a/oembed.tgz and /dev/null differ diff --git a/oembed/oembed.js b/oembed/oembed.js deleted file mode 100755 index f8e957413..000000000 --- a/oembed/oembed.js +++ /dev/null @@ -1,6 +0,0 @@ -function oembed(){ - var reply = prompt("$oembed_message:"); - if(reply && reply.length) { - tinyMCE.execCommand('mceInsertRawHTML',false, "[embed]"+reply+"[/embed]" ); - } -} diff --git a/oembed/oembed.php b/oembed/oembed.php deleted file mode 100755 index 880e4992f..000000000 --- a/oembed/oembed.php +++ /dev/null @@ -1,89 +0,0 @@ - - */ - -require_once('include/oembed.php'); - -function oembed_install() { - register_hook('jot_tool', 'addon/oembed/oembed.php', 'oembed_hook_jot_tool'); - register_hook('page_header', 'addon/oembed/oembed.php', 'oembed_hook_page_header'); - register_hook('plugin_settings', 'addon/oembed/oembed.php', 'oembed_settings'); - register_hook('plugin_settings_post', 'addon/oembed/oembed.php', 'oembed_settings_post'); -} - -function oembed_uninstall() { - unregister_hook('jot_tool', 'addon/oembed/oembed.php', 'oembed_hook_jot_tool'); - unregister_hook('page_header', 'addon/oembed/oembed.php', 'oembed_hook_page_header'); - unregister_hook('plugin_settings', 'addon/oembed/oembed.php', 'oembed_settings'); - unregister_hook('plugin_settings_post', 'addon/oembed/oembed.php', 'oembed_settings_post'); -} - -function oembed_settings_post($a,$b){ - if(! local_user()) - return; - if (x($_POST,'oembed-submit')){ - set_pconfig(local_user(), 'oembed', 'use_for_youtube', (x($_POST,'oembed_use_for_youtube')? intval($_POST['oembed_use_for_youtube']):0)); - info( t('OEmbed settings updated') . EOL); - } -} - -function oembed_settings(&$a,&$o) { - if(! local_user()) - return; - $uofy = intval(get_pconfig(local_user(), 'oembed', 'use_for_youtube' )); - - $t = file_get_contents( dirname(__file__). "/settings.tpl" ); - $o .= replace_macros($t, array( - '$submit' => t('Submit'), - '$title' => "OEmbed", - '$useoembed' => array('oembed_use_for_youtube', t('Use OEmbed for YouTube videos'), $uofy, ""), - )); - -} - - -function oembed_hook_page_header($a, &$b){ - $a->page['htmlhead'] .= sprintf('', $a->get_baseurl()); -} - - -function oembed_hook_jot_tool($a, &$b) { - $b .= ' -
- Embed -
- '; -} - - -function oembed_module() { - return; -} - -function oembed_init(&$a) { - if ($a->argv[1]=='oembed.js'){ - $tpl = file_get_contents('addon/oembed/oembed.js'); - echo replace_macros($tpl, array( - '$oembed_message' => t('URL to embed:'), - )); - } - - if ($a->argv[1]=='b2h'){ - $url = array( "", trim(hex2bin($_GET['url']))); - echo oembed_replacecb($url); - } - - if ($a->argv[1]=='h2b'){ - $text = trim(hex2bin($_GET['text'])); - echo oembed_html2bbcode($text); - } - - killme(); - -} - -?> diff --git a/oembed/oembed.png b/oembed/oembed.png deleted file mode 100755 index 6fc3794bb..000000000 Binary files a/oembed/oembed.png and /dev/null differ diff --git a/oembed/settings.tpl b/oembed/settings.tpl deleted file mode 100755 index 5a65ef8e5..000000000 --- a/oembed/settings.tpl +++ /dev/null @@ -1,7 +0,0 @@ -
-

$title

- {{ inc field_checkbox.tpl with $field=$useoembed }}{{ endinc }} -
- -
-
diff --git a/openstreetmap.tgz b/openstreetmap.tgz index 979623526..93dc874b6 100644 Binary files a/openstreetmap.tgz and b/openstreetmap.tgz differ