Index: tweet-like-plusone.php
===================================================================
--- tweet-like-plusone.php	(revision 738211)
+++ tweet-like-plusone.php	(working copy)
@@ -315,6 +315,98 @@
 	$ord=implode(",",$ordarr);
 return $ord;
 }
+function social4i_install() {
+	add_option('s4pabovepost');
+	add_option('s4pbelowpost');
+	add_option('s4pgabovepost');
+	add_option('s4pgbelowpost');
+	add_option('s4habovepost');
+	add_option('s4hbelowpost');
+	add_option('s4aabovepost');
+	add_option('s4abelowpost');
+	add_option('s4_twitter');
+	add_option('s4_fblike');
+	add_option('s4_plusone');
+	add_option('s4_fbshare');
+	add_option('s4onpost');
+	add_option('s4onpage');
+	add_option('s4onhome');
+	add_option('s4onarchi');
+	add_option('s4iconsize');
+	add_option('s4iconalign');
+	add_option('s4excludeid');
+	add_option('s4_fbsend');
+	add_option('s4optimize');
+	add_option('s4twtvia');
+	add_option('s4excludecat');
+	add_option('s4defthumb');
+	add_option('s4onexcer');
+	add_option('s4fblikelang');
+	add_option('s4ccss');
+	add_option('s4_linkedin');
+	add_option('s4scripthead');
+	add_option('s4allscripts');
+	add_option('s4dmob');
+	add_option('s4cblarge');
+	add_option('s4cbsmall');
+	add_option('s4_cbtn');
+	add_option('s4dispord');
+	add_option('s4onexcererr');
+	add_option('s4nofbjava');
+	add_option('s4nometa');
+	add_option('s4analytics');
+	add_option('s4vbhide');
+	add_option('s4dispvb');
+	add_option('s4vbmargin');
+	add_option('s4vremove');
+}
+register_activation_hook(__FILE__,'social4i_install');
+function social4i_admin_init() {
+	register_setting('social4i', 's4pabovepost');
+	register_setting('social4i', 's4pbelowpost');
+	register_setting('social4i', 's4pgabovepost');
+	register_setting('social4i', 's4pgbelowpost');
+	register_setting('social4i', 's4habovepost');
+	register_setting('social4i', 's4hbelowpost');
+	register_setting('social4i', 's4aabovepost');
+	register_setting('social4i', 's4abelowpost');
+	register_setting('social4i', 's4_twitter');
+	register_setting('social4i', 's4_fblike');
+	register_setting('social4i', 's4_plusone');
+	register_setting('social4i', 's4_fbshare');
+	register_setting('social4i', 's4onpost');
+	register_setting('social4i', 's4onpage');
+	register_setting('social4i', 's4onhome');
+	register_setting('social4i', 's4onarchi');
+	register_setting('social4i', 's4iconsize');
+	register_setting('social4i', 's4iconalign');
+	register_setting('social4i', 's4excludeid');
+	register_setting('social4i', 's4_fbsend');
+	register_setting('social4i', 's4optimize');
+	register_setting('social4i', 's4twtvia');
+	register_setting('social4i', 's4excludecat');
+	register_setting('social4i', 's4defthumb');
+	register_setting('social4i', 's4onexcer');
+	register_setting('social4i', 's4fblikelang');
+	register_setting('social4i', 's4ccss');
+	register_setting('social4i', 's4_linkedin');
+	register_setting('social4i', 's4scripthead');
+	register_setting('social4i', 's4allscripts');
+	register_setting('social4i', 's4dmob');
+	register_setting('social4i', 's4cblarge');
+	register_setting('social4i', 's4cbsmall');
+	register_setting('social4i', 's4_cbtn');
+	register_setting('social4i', 's4dispord');
+	register_setting('social4i', 's4onexcererr');
+	register_setting('social4i', 's4nofbjava');
+	register_setting('social4i', 's4nometa');
+	register_setting('social4i', 's4analytics');
+	register_setting('social4i', 's4vbhide');
+	register_setting('social4i', 's4dispvb');
+	register_setting('social4i', 's4vbmargin');
+	register_setting('social4i', 's4vremove');
+}
+add_action('admin_init', 'social4i_admin_init');
 function social4ioptions(){
 ?>
 <h2>Tweet, Like, Share and Google +1 Option Page</h2>
@@ -459,9 +551,7 @@
     z-index: 9999;
 }
 </style>
-<?php wp_nonce_field('update-options'); ?>
-<input type="hidden" name="page_options" value="s4pabovepost,s4pbelowpost,s4pgabovepost,s4pgbelowpost,s4habovepost,s4hbelowpost,s4aabovepost,s4abelowpost,s4_twitter,s4_fblike,s4_plusone,s4_fbshare,s4onpost,s4onpage,s4onhome,s4onarchi,s4iconsize,s4iconalign,s4excludeid,s4_fbsend,s4optimize,s4twtvia,s4excludecat,s4defthumb,s4onexcer,s4fblikelang,s4ccss,s4_linkedin,s4scripthead,s4allscripts,s4dmob,s4cblarge,s4cbsmall,s4_cbtn,s4dispord,s4onexcererr,s4nofbjava,s4nometa,s4analytics,s4vbhide,s4dispvb,s4vbmargin,s4vremove">
-<input type="hidden" name="action" value="update" />
+<?php settings_fields('social4i'); ?>
 </form>
 </td><td width="2%">&nbsp;</td><td width="20%"><b>Follow us on</b><br/><a href="http://twitter.com/techxt" target="_blank"><img src="http://a0.twimg.com/a/1303316982/images/twitter_logo_header.png" /></a><br/><a href="http://facebook.com/techxt" target="_blank"><img src="https://secure-media-sf2p.facebook.com/ads3/creative/pressroom/jpg/b_1234209334_facebook_logo.jpg" height="38px" width="118px"/></a><p></p><b>Feeds and News</b><br /><?php get_feeds_s4() ?>
 <p></p>
@@ -839,4 +929,4 @@
 }
 return $ismob;
 }
-?>
\ No newline at end of file
+?>
