From 46fcc40e92172ca8cba340c5c6cddfdbf9168b2a Mon Sep 17 00:00:00 2001 From: friendica Date: Wed, 13 Jun 2012 20:46:11 -0700 Subject: [PATCH] "No Timeline" addon --- notimeline.tgz | Bin 0 -> 1083 bytes notimeline/notimeline.css | 14 ++++++++ notimeline/notimeline.php | 66 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 80 insertions(+) create mode 100644 notimeline.tgz create mode 100644 notimeline/notimeline.css create mode 100644 notimeline/notimeline.php diff --git a/notimeline.tgz b/notimeline.tgz new file mode 100644 index 0000000000000000000000000000000000000000..74babcc4f211f97917b1e1b98122a1426251b93c GIT binary patch literal 1083 zcmV-B1jPFviwFR1UfE9o1MOFBZ`(Ey_E-B?+_a#wgT%5OzXVR~qCki3Lz50jurF;P z&=O@4kw}50oCItB`;L_6m)De=;5qM&rqF(&+V%`lF);j9x6G9pp+A3D8JMuw-(@_#^YO zYGu<#G(ux_g9a&Ud*sbN-@apK|}=bZax)d*ooxJQUPf)cyq$5s<{s6_r?z zuU`R8H|;(D&yN?E2RjiDRlZ0WhU#=$O_WgQl4H~+y7#j{@Q5wjyRHsgb&IT1*EsR7 zvD`i>Ti!1l-aTMkuSinG`m__v{n9a|V>}XV&~5izz-2WAYdVl;A<;DKx*h1kZy!J4 zio5Sup#28fzu8k|i$5S==jGvc3qugO1f_2is$zo*W4qAbF=1?8|yTQDGA*#(4B#MiV0qUq{+!$;6!G&sY=2Q<3+NR(Z`=+_kT8WgxAD3qz)-ux@+_`pY?~R`VL|1CN$7O?tX`iRO=iIzqRm;XSu!~eiNr^;q5!ePvh=X z2YV^W(bP9;U}JwnOw-!6m>$+fZz_y57z-v3_%coe!Luo8Hf6ZDC + * + * + */ + + +function notimeline_install() { + + register_hook('plugin_settings', 'addon/notimeline/notimeline.php', 'notimeline_settings'); + register_hook('plugin_settings_post', 'addon/notimeline/notimeline.php', 'notimeline_settings_post'); + +} + + +function notimeline_uninstall() { + unregister_hook('plugin_settings', 'addon/notimeline/notimeline.php', 'notimeline_settings'); + unregister_hook('plugin_settings_post', 'addon/notimeline/notimeline.php', 'notimeline_settings_post'); + +} + + +function notimeline_settings_post($a,$post) { + if(! local_user() || (! x($_POST,'notimeline-submit'))) + return; + + set_pconfig(local_user(),'system','no_wall_archive_widget',intval($_POST['notimeline'])); + info( t('No Timeline settings updated.') . EOL); +} + +function notimeline_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 */ + + $notimeline = get_pconfig(local_user(),'system','no_wall_archive_widget'); + if($notimeline === false) + $notimeline = false; + + $notimeline_checked = (($notimeline) ? ' checked="checked" ' : ''); + + + /* Add some HTML to the existing form */ + + $s .= '
'; + $s .= '

' . t('No Timeline Settings') . '

'; + $s .= '
'; + $s .= ''; + $s .= ''; + $s .= '
'; + + /* provide a submit button */ + + $s .= '
'; + +}