From 246d9f1571f8e1ca0856d6bc7a7e8340efa506af Mon Sep 17 00:00:00 2001 From: lechuck <l3chuck@autistici.org> Date: Sat, 14 Jul 2012 08:12:54 +0000 Subject: [PATCH] Upgrade wp statusnet to 1.4.2 --- wp-content/plugins/wp-statusnet/readme.txt | 35 +-- .../plugins/wp-statusnet/wp-status-net.php | 282 +++++------------- 2 files changed, 84 insertions(+), 233 deletions(-) diff --git a/wp-content/plugins/wp-statusnet/readme.txt b/wp-content/plugins/wp-statusnet/readme.txt index 49cb565b0..2751e015c 100644 --- a/wp-content/plugins/wp-statusnet/readme.txt +++ b/wp-content/plugins/wp-statusnet/readme.txt @@ -1,22 +1,19 @@ === WP-Status.net === Contributors: Xavier Media -Tags: Status.net, Identica, Twitter, status updates, Oauth, Facebook, Google Buzz, Ping.fm +Tags: Status.net, Identica, Twitter, status updates, oauth, Yourls.org Requires at least: 2.7.0 -Tested up to: 3.0.1 -Stable tag: 1.4.0 +Tested up to: 3.3.1 +Stable tag: 1.4.2 -Posts your blog posts to one or multiple Status.net servers and even to Twitter, Facebook, Google Buzz and Ping.fm +Posts your blog posts to one or multiple Status.net servers and even to Twitter == Description == -Every time you make a new blog post this plugin will post a status update to the Status.net servers, facebook, Ping.fm, -Google Buzz and Twitter accounts you have specified. You can set as many acounts on as many servers you like. You can -even have the plugin to post to different account on the same [Status.net](http://status.net) server. +Every time you make a new blog post this plugin will post a status update to the Status.net servers and Twitter accounts +you have specified. You can set as many acounts on as many servers you like. You can even have the plugin to post to +different account on the same [Status.net](http://status.net) server. -The plugin post to Facebook, Google Buzz and Ping.fm via SocialOomph, so an account with SocialOomph is required to -post to Facebook, Google Buzz and Ping.fm. - -The links to your blog can be shortened by one of seven different link shortener services like TinyURL.com and RT.nu. +The links to your blog can be shortened by one of seven different link shortener services like TinyURL.com. == Installation == @@ -47,24 +44,22 @@ Visit our support forum at http://www.xavierforum.com/php-&-cgi-scripts-f3.html == Changelog == -= 1.4.0 = -* SocialOomph support added -* Google Buzz support (via SocialOomph) -* Facebook support (via SocialOomph) -* Ping.fm support (via SocialOomph) -* RT.nu removed as link shortener service (since they don't provide this service any more) -* If an error mesage is received from a StatusNet server that will show up in the list of servers so you know what went wrong += 1.4.2 = +* Added support for Yourls.org on your own site + += 1.4.1 = +* Removed RT.nu since they are no longer in service = 1.3.1 = * Minor bug fix in Oauth for Twitter * Fixed problem with bit.ly links = 1.3 = -* Oauth is now available for Twitter servers. For StatusNet server that will be available in a later version +* Oauth is now available for Twitter servers. For Status.net server that will be available in a later version (hopefully 1.4) * Optional suffix possible for posts = 1.1 = -* Added possibility to have a unique prefix for each server when posting blog posts to a StatusNet server +* Added possibility to have a unique prefix for each server when posting blog posts to a Status.net server = 1.0 = * The first version diff --git a/wp-content/plugins/wp-statusnet/wp-status-net.php b/wp-content/plugins/wp-statusnet/wp-status-net.php index 90248ed0f..d4c5b4328 100644 --- a/wp-content/plugins/wp-statusnet/wp-status-net.php +++ b/wp-content/plugins/wp-statusnet/wp-status-net.php @@ -4,7 +4,7 @@ Plugin Name: WP Status.net Plugin URI: http://www.xaviermedia.com/wordpress/plugins/wp-status-net.php Description: Posts your blog posts to one or multiple Status.net servers Author: Xavier Media -Version: 1.4.0 +Version: 1.4.2 Author URI: http://www.xaviermedia.com/ */ @@ -425,7 +425,7 @@ class EpiTwitterJson } } -class CurlRequest +class CurlRequest2 { private $ch; /** @@ -446,10 +446,10 @@ class CurlRequest public function init($params) { $this->ch = curl_init(); - $user_agent = 'Mozilla/5.0 (Windows; U;Windows NT 5.1; en-us; rv:1.8.0.9) Gecko/20061206 Firefox/1.5.0.9'; + $user_agent = 'Mozilla/5.0 (Windows; U;Windows NT 5.1; ru; rv:1.8.0.9) Gecko/20061206 Firefox/1.5.0.9'; $header = array( "Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5", - "Accept-Language: en-us;q=0.7,en;q=0.3", + "Accept-Language: ru-ru,ru;q=0.7,en-us;q=0.5,en;q=0.3", "Accept-Charset: windows-1251,utf-8;q=0.7,*;q=0.7", "Keep-Alive: 300"); if (isset($params['host']) && $params['host']) $header[]="Host: ".$host; @@ -524,7 +524,18 @@ function wpstatusnet_poststatus($post_id) $link = get_permalink(); - if ($options[apitype] == "is.gd" || $options[apitype] == "rt.nu") + if ($options[apitype] == "yourls.org") + { + $jsonstring = file_get_contents('http://'. $options[apiid] .'/yourls-api.php?signature='. $options[apikey] .'&action=shorturl&format=json&url='. urlencode($link)); + + $json = json_decode($jsonstring,true); + + if ($json[status] == "success") + { + $link = $json[shorturl]; + } + } + else if ($options[apitype] == "is.gd") { $link = file_get_contents('http://is.gd/api.php?longurl='. urlencode($link)); } @@ -573,12 +584,12 @@ function wpstatusnet_poststatus($post_id) $title = get_the_title(); - $posting = new CurlRequest(); + $posting = new CurlRequest2(); $num = count($options[statusserver]); for ($i = 0; $i < $num; $i++) { - if ($options[statususer][$i] != "" && $options[statuserrormsg][$i] == "") + if ($options[statususer][$i] != "") { if ($options[statusprefix][$i] == "") @@ -630,26 +641,6 @@ function wpstatusnet_poststatus($post_id) $statusid = $OauthInfo->response['id']; } - else if ($options[statustype][$i] == "socialoomph") - { - $server = "http://socialoomphapi.com/tweets/add/json/"; - - $params = array('url' => $server, - 'host' => '', - 'header' => '', - 'method' => 'POST', // 'POST','HEAD' - 'referer' => '', - 'cookie' => '', - 'post_fields' => 'account='. $options[statususer][$i] .'&text='. $statuspost .'&apikey='. $options[socialoomphapi] .'&time='. date('Y-m-d H:i:s') .'Z', - 'login' => '', - 'password' => '', - 'timeout' => 20 - ); - - $posting->init($params); - - $postingstatus = $posting->exec(); - } else { if ($options[statuspath][$i] == "") @@ -671,21 +662,14 @@ function wpstatusnet_poststatus($post_id) 'login' => $options[statususer][$i], 'password' => $options[statuspwd][$i], 'timeout' => 20 - ); + ); + + // add_post_meta($post_id, $options[statusserver][$i], serialize($params)); + $posting->init($params); $postingstatus = $posting->exec(); - - $postingjson = json_decode($postingstatus[body],true); - - if ($postingjson[error] != "") - { - $options[statuserrormsg][$i] = $postingjson[error]; - } - - -// var_dump($postingstatus); } } @@ -693,10 +677,6 @@ function wpstatusnet_poststatus($post_id) add_post_meta($post_id, 'status_net', 'yes'); - - $opt = serialize($options); - update_option('wpstatusnetoptions', $opt); - } } } @@ -722,18 +702,11 @@ function wpstatusnet_options() if ( 'save' == $_REQUEST['action'] ) { - - $opt = get_option('wpstatusnetoptions'); - $optionsold = unserialize($opt); - - $options = array( "apitype" => $_REQUEST[apitype], "apiid" => $_REQUEST[apiid], "apikey" => $_REQUEST[apikey], "pluginlink" => $_REQUEST[pluginlink], - "socialoomphapi" => $_REQUEST[socialoomphapi], - "socialoomphaccounts" => array(), "statustype" => array(), "statusauthtype" => array(), "statusservers" => array(), @@ -741,52 +714,9 @@ function wpstatusnet_options() "statususer" => array(), "statuspwd" => array(), "statusprefix" => array(), - "statussuffix" => array(), - "statuserrormsg" => array() + "statussuffix" => array() ); - if ($_REQUEST[socialoomphreload] == "yes") - { - $getsocialoomphaccounts = new CurlRequest(); - - $params = array('url' => 'http://socialoomphapi.com/accounts/fetch/json/', - 'host' => '', - 'header' => '', - 'method' => 'POST', // 'POST','HEAD' - 'referer' => '', - 'cookie' => '', - 'post_fields' => 'apikey='. $options[socialoomphapi], - 'timeout' => 20 - ); - - $getsocialoomphaccounts->init($params); - - $getsocialoomphaccountsstatus = $getsocialoomphaccounts->exec(); - - $json_results = json_decode($getsocialoomphaccountsstatus[body],true); - - $num = count($json_results[accounts]); - for ($i = 0; $i < $num; $i++) - { - if ($json_results[accounts][$i][account][type] == "N") - { - $options[socialoompaccounts][$i] = $json_results[accounts][$i][account][id] ."|". str_replace('http://','',$json_results[accounts][$i][account][site_url]) ."/". $json_results[accounts][$i][account][name]; - } - else if ($json_results[accounts][$i][account][type] == "T") - { - $options[socialoompaccounts][$i] = $json_results[accounts][$i][account][id] ."|twitter.com/". $json_results[accounts][$i][account][name]; - } - else - { - $options[socialoompaccounts][$i] = $json_results[accounts][$i][account][id] ."|". $json_results[accounts][$i][account][name]; - } - } - } - else - { - $options[socialoompaccounts] = $optionsold[socialoompaccounts]; - } - $statustype = $_REQUEST[statustype]; $statusauthtype = $_REQUEST[statusauthtype]; $statusserver = $_REQUEST[statusserver]; @@ -797,7 +727,6 @@ function wpstatusnet_options() $statuspwd2 = $_REQUEST[statuspwd2]; $statusprefix = $_REQUEST[statusprefix]; $statussuffix = $_REQUEST[statussuffix]; - $statuserrormsg = $_REQUEST[statuserrormsg]; $num = count($statusserver); for ($i = 0; $i < $num; $i++) @@ -811,12 +740,6 @@ function wpstatusnet_options() $statuspath[$i] = ""; $statusauthtype[$i] = "oauth"; } - else if ($statustype[$i] == "socialoomph") - { - $statusserver[$i] = "socialoompapi.com"; - $statuspath[$i] = ""; - $statusauthtype[$i] = "basic"; - } $statusserver[$i] = str_replace("http://","",$statusserver[$i]); if (substr($statusserver[$i],-1,1) == "/") @@ -847,7 +770,6 @@ function wpstatusnet_options() $options[statuspwd2][] = $statuspwd2[$i]; $options[statusprefix][] = $statusprefix[$i]; $options[statussuffix][] = $statussuffix[$i]; - $options[statuserrormsg][] = $statuserrormsg[$i]; } } @@ -859,17 +781,6 @@ function wpstatusnet_options() $opt = get_option('wpstatusnetoptions'); $options = unserialize($opt); } - - - $num = count($options[socialoompaccounts]); - $socialoomphhtml = '<OPTION VALUE=""></OPTION>'; - for ($i = 0; $i < $num; $i++) - { - $temp = explode('|',$options[socialoompaccounts][$i]); - - $socialoomphhtml .= '<OPTION VALUE="'. $temp[0] .'">'. $temp[1] .'</OPTION>'; - } - ?> <STYLE> .hiddenfield @@ -886,14 +797,16 @@ function wpstatusnet_options() <form action="<?php echo $_SERVER['REQUEST_URI'] ?>" method="post" name=pf> <input type="hidden" name="action" value="save" /> - <h1>WP StatusNet Options</h2> + <h1>WP Status.net Options</h1> If you get stuck on any of these options, please have a look at the <a href="http://www.xaviermedia.com/wordpress/plugins/wp-status-net.php">WP Status.net plugin page</a> or visit the <a href="http://www.xavierforum.com/php-&-cgi-scripts-f3.html">support forum</a>. - <h2>Link Shortener</h3> + <h2>Link Shortener</h2> <p>Select the link shortener you would like to use.</p> <p> <INPUT TYPE=radio NAME=apitype VALUE="" <?php if ($options[apitype] == "") { echo ' CHECKED'; } ?> onClick="javascript:document.getElementById('apikeys').className = 'hiddenfield';"> <B>Don't</B> use any service to get short links<BR /> - <INPUT TYPE=radio NAME=apitype VALUE="is.gd" <?php if ($options[apitype] == "is.gd" || $options[apitype] == "rt.nu") { echo ' CHECKED'; } ?> onClick="javascript:document.getElementById('apikeys').className = 'hiddenfield';"> <A HREF="http://is.gd/" TARGET="_blank">is.gd</A><BR /> + <INPUT TYPE=radio NAME=apitype VALUE="yourls.org" <?php if ($options[apitype] == "yourls.org") { echo ' CHECKED'; } ?> onClick="javascript:alert('To use this service you need to read the instructions below!');document.getElementById('apikeys').className = 'nothiddenfield';document.getElementById('yourlssetup').className = 'nothiddenfield';"> <A HREF="http://yourls.org/" TARGET="_blank">Yourls.org on your own domain</A> *<BR /> + + <INPUT TYPE=radio NAME=apitype VALUE="is.gd" <?php if ($options[apitype] == "is.gd") { echo ' CHECKED'; } ?> onClick="javascript:document.getElementById('apikeys').className = 'hiddenfield';"> <A HREF="http://is.gd/" TARGET="_blank">is.gd</A><BR /> <INPUT TYPE=radio NAME=apitype VALUE="metamark.net" <?php if ($options[apitype] == "metamark.net") { echo ' CHECKED'; } ?> onClick="javascript:document.getElementById('apikeys').className = 'hiddenfield';"> <A HREF="http://metamark.net/" TARGET="_blank">metamark.net</A><BR /> @@ -907,105 +820,47 @@ function wpstatusnet_options() <BR /><B>*</B> = This link shortener service require an <B>API ID</B> and/or an <B>API Key</B> to work. Please see the documentation at the link shorteners web site. - <p id=apikeys class=<?php if($options[apitype] == "2ve.org" || $options[apitype] == "bit.ly") { echo 'nothiddenfield'; } else { echo 'hiddenfield'; } ?>> - <B>Link Shortener API ID and API Key:</B><BR /> + <DIV id=yourlssetup class=<?php if($options[apitype] == "yourls.org") { echo 'nothiddenfield'; } else { echo 'hiddenfield'; } ?>> + <H3>Yourls.org Setup Instructions:</H3> + To be able to use the Yourls.org option below on your own domain name you need to follow these instructions. If you're a newbie this option is not really for you. + <OL> + <LI> Download Yourls.org from <A HREF="http://www.yourls.org/" TARGET="_blank">www.yourls.org</A> and follow the setup instructions to install Yourls.org on your own domain name + <LI> Select the Yourls.org option above + <LI> Fill in your <B>API key</B>/signature in the <B>API key</B> field below. THe password and user name option will not work so you have to <a HREF="http://yourls.org/passwordlessapi" TARGET="_blank">setup Yourls.org to work with signatures</A>. + <LI> Fill in the <B>domain name</B> on which you've installed Yourls.org on in the API ID field. Do not include any http:// nor any / at the end of the domain name!<BR/> + For example if the Yourls.org script is installed at <i>http://www.sampleaddress.com/yourls-api.php</i>, then you <U>only</U> fill in <i>sampleaddress.com</i> in the API ID field. + </OL> + </DIV> + + <div id=apikeys class=<?php if($options[apitype] == "2ve.org" || $options[apitype] == "bit.ly" || $options[apitype] == "yourls.org") { echo 'nothiddenfield'; } else { echo 'hiddenfield'; } ?>> + <h3>Link Shortener API ID and API Key:</h3> Depending on what you selected above, some link shorteners require that you sign up at their web site to get an API ID (or API login) and/or an API key. For more information on what's required to use the link shortener you've selected, please see the documentation at the web site of the link shortener.<BR /> - API ID: <INPUT TYPE=text NAME=apiid VALUE="<?php echo $options[apiid]; ?>" SIZE=40> (this may sometimes be called "login")<BR /> + API ID: <INPUT TYPE=text NAME=apiid VALUE="<?php echo $options[apiid]; ?>" SIZE=40> (this may sometimes be called "login", and in the case of Yourls.org it's the domain name where you installed Yourls.org)<BR /> API Key: <INPUT TYPE=text NAME=apikey VALUE="<?php echo $options[apikey]; ?>" SIZE=40> (if just a key is required, leave the ID field blank)<BR /> - </p> + </div> - <h2>Link to Xavier Media®</h3> + <h2>Link to Xavier Media®</h2> <P>To support our work, please add a link to us in your blog. </P> <P><INPUT TYPE=checkbox VALUE="poweredby" NAME=pluginlink <?php if ($options[pluginlink] == "poweredby") { echo ' CHECKED'; } ?>> "Powered by WP-Status.net plugin"</P> - <h2>SocialOomph API key</h3> - <p><a href="http://www.socialoomph.com/93609.html" TARGET="_blank">SocialOomph</a> is a service that lets you post status updates to multiple accounts like Twitter, StatusNet servers, Facebook, Google Buzz and Ping.fm. Fill in the API key you get from SocialOomph and check the checkbox called "Load accounts from SocialOomph" to get your account information. The API key <a href="http://www.socialoomph.com/93609.html" TARGET="_blank">can be found</a> under "My S.O Account" > "View API Key".</p> + <h2>Status.net servers and user accounts</h2> - <p><b>SocialOomph API key:</b> <INPUT TYPE=text NAME=socialoomphapi VALUE="<?php echo $options[socialoomphapi]; ?>" SIZE=45 onChange="javascript:document.getElementById('socialoomphreload').checked=true;document.pf.submit();"> <INPUT TYPE=checkbox VALUE=yes NAME="socialoomphreload" ID="socialoomphreload" onClick="javascript:document.pf.submit();"> Load accounts from <a href="http://www.socialoomph.com/93609.html" TARGET="_blank">SocialOomph</a></p> - - <p>If you've added accounts to <a href="http://www.socialoomph.com/93609.html" TARGET="_blank">SocialOomph</a> that don't show up in the selection list below, then please check the checkbox above to re-load the account list from <a href="http://www.socialoomph.com/93609.html" TARGET="_blank">SocialOomph</a>.</p> - - <h2>StatusNet servers and user accounts</h3> - - <p>Fill in the StatusNet servers you would like to post status updates to. To post to for example <A HREF="http://identi.ca/" TARGET="_blank">identi.ca</A> just fill in <B>identi.ca</B> as server, <B>api</B> as path and your user name and password.</p> + <p>Fill in the Status.net servers you would like to post status updates to. To post to for example <A HREF="http://identi.ca/" TARGET="_blank">identi.ca</A> just fill in <B>identi.ca</B> as server, <B>api</B> as path and your user name and password.</p> <p>To turn off updates to a server, just remove the user name for that server and update options.</p> <p>Post prefix and post suffix are optional, but if you would like to post some text or perhaps a hash tag before/after all your posts you can specify a unique prefix/suffix for each server/account.</p> - <p id=howtousetwitter1> - <a href="#howtousetwitter" onClick="javascript:document.getElementById('howtousetwitter1').className='hiddenfield';document.getElementById('howtousetwitter2').className='nothiddenfield';">How to use Oauth with Twitter?</a> - </p> - - <p class=hiddenfield id=howtousetwitter2> - <a name="howtousetwitter"></a><b>How to use Oauth with Twitter?</b><br /> - 1. Register a new application at <a href="http://dev.twitter.com/apps/new" target="_blank">dev.twitter.com/apps/new</a><br /> - * Application Type must be set to Browser<br /> - * The Callback URL should be the URL of your blog<br /> - * Default Access type MUST be set to Read & Write<br /> - 2. Fill in the Consumer Key and Consumer Secret in the correct fields (will show up as soon as you select Server Type "Twitter" and "Oauth" in the server list (user name column))<br /> - 3. Click on the link called "My Access Tokens" at http://dev.twitter.com (right menu)<br /> - 4. Fill in your Access Token and the Access Token Secret in the correct fields (password column)<br /> - 5. Now you should be able to post to Twitter<br /> - </p> - -<script type='text/javascript'> -//<![CDATA[ -function verifyline(linenum) -{ - if (document.getElementById('statustype' + linenum).options[document.getElementById('statustype' + linenum).selectedIndex].value == 'twitter') - { - document.getElementById('statusauthtype' + linenum).className = 'nothiddenfield'; - document.getElementById('statusserver' + linenum).className = 'hiddenfield'; - document.getElementById('statuspath' + linenum).className = 'hiddenfield'; - document.getElementById('statususer' + linenum).className = 'nothiddenfield'; - document.getElementById('statuspwd' + linenum).className = 'nothiddenfield'; - document.getElementById('statussocialoomphuser' + linenum).className = 'hiddenfield'; - document.getElementById('statusauthtype' + linenum).selectedIndex = 1; - } - else if (document.getElementById('statustype' + linenum).options[document.getElementById('statustype' + linenum).selectedIndex].value == 'status') - { - document.getElementById('statusauthtype' + linenum).className = 'nothiddenfield'; - document.getElementById('statusserver' + linenum).className = 'nothiddenfield'; - document.getElementById('statuspath' + linenum).className = 'nothiddenfield'; - document.getElementById('statususer' + linenum).className = 'nothiddenfield'; - document.getElementById('statuspwd' + linenum).className = 'nothiddenfield'; - document.getElementById('statussocialoomphuser' + linenum).className = 'hiddenfield'; - document.getElementById('statusauthtype' + linenum).selectedIndex = 0; - } - else - { - document.getElementById('statusauthtype' + linenum).className = 'hiddenfield'; - document.getElementById('statusserver' + linenum).className = 'hiddenfield'; - document.getElementById('statuspath' + linenum).className = 'hiddenfield'; - document.getElementById('statususer' + linenum).className = 'hiddenfield'; - document.getElementById('statuspwd' + linenum).className = 'hiddenfield'; - document.getElementById('statussocialoomphuser' + linenum).className = 'nothiddenfield'; - document.getElementById('statusauthtype' + linenum).selectedIndex = 0; - } - - if (document.getElementById('statusauthtype' + linenum).options[document.getElementById('statusauthtype' + linenum).selectedIndex].value == 'oauth') - { - document.getElementById('oauthA' + linenum).className = 'nothiddenfield'; - document.getElementById('oauthB' + linenum).className = 'nothiddenfield'; - document.getElementById('oauthC' + linenum).className = 'nothiddenfield'; - document.getElementById('oauthD' + linenum).className = 'nothiddenfield'; - } - else - { - document.getElementById('oauthA' + linenum).className = 'hiddenfield'; - document.getElementById('oauthB' + linenum).className = 'hiddenfield'; - document.getElementById('oauthC' + linenum).className = 'hiddenfield'; - document.getElementById('oauthD' + linenum).className = 'hiddenfield'; - } -} -//]]> -</script> - - - - + <p><b>How to use Oauth with Twitter?</b><br /> +1. Register a new application at <a href="http://dev.twitter.com/apps/new" target="_blank">dev.twitter.com/apps/new</a><br /> + * Application Type must be set to Browser<br /> + * The Callback URL should be the URL of your blog<br /> + * Default Access type MUST be set to Read & Write<br /> +2. Fill in the Consumer Key and Consumer Secret in the correct fields (will show up as soon as you select Server Type "Twitter" and "Oauth" in the server list (user name column))<br /> +3. Click on the link called "My Access Tokens" at http://dev.twitter.com (right menu)<br /> +4. Fill in your Access Token and the Access Token Secret in the correct fields (password column)<br /> +5. Now you should be able to post to Twitter<br /></p> <table class="widefat post fixed" cellspacing="0"> @@ -1037,27 +892,28 @@ function verifyline(linenum) if ($num == 5) { $options[statustype][0] = "status"; - $options[statusserver][0] = "identi.ca"; + $options[statusserver][0] = "myxavier.com"; $options[statuspath][0] = "api"; + $options[statustype][1] = "status"; + $options[statusserver][1] = "identi.ca"; + $options[statuspath][1] = "api"; + $num = 5; } for ($i = 0; $i < $num; $i++) { ?> <tr> - <th id="type" class="<?php if($options[statuserrormsg][$i] != "") { echo 'error'; } else { echo 'manage-column column-title'; } ?>" style="" scope="col"><?php if($options[statuserrormsg][$i] == "") { echo '<INPUT TYPE=hidden NAME=statuserrormsg['. $i .'] VALUE="">'; } else { echo 'Error message: <BR /><SELECT NAME=statuserrormsg['. $i .']><OPTION VALUE="">Re-activate account</OPTION><OPTION VALUE="'. $options[statuserrormsg][$i] .'" style="background-color: 770000; width: 190px;" SELECTED>'. $options[statuserrormsg][$i] .'</OPTION></SELECT><BR />'; } ?> - - - <SELECT ID=statustype<?php echo $i ?> onChange="javascript:verifyline('<?php echo $i ?>');" NAME=statustype[<?php echo $i ?>]><OPTION VALUE="status" <?php if($options[statustype][$i] == "status") { echo ' SELECTED'; } ?>>Status.net</OPTION><OPTION VALUE="twitter" <?php if($options[statustype][$i] == "twitter") { echo ' SELECTED'; } ?>>Twitter</OPTION><OPTION VALUE="socialoomph" <?php if($options[statustype][$i] == "socialoomph") { echo ' SELECTED'; } ?>>SocialOomph</OPTION></SELECT> - <SELECT ID=statusauthtype<?php echo $i ?> NAME=statusauthtype[<?php echo $i ?>] <?php if ($options[statustype][$i] == "socialoomph") { echo 'CLASS=hiddenfield'; } ?> onChange="javascript:if(document.getElementById('statustype<?php echo $i ?>').options[document.getElementById('statustype<?php echo $i ?>').selectedIndex].value == 'twitter') { document.getElementById('statusauthtype<?php echo $i ?>').selectedIndex = 1; } else { document.getElementById('statusauthtype<?php echo $i ?>').selectedIndex = 0; }; if(document.getElementById('statusauthtype<?php echo $i ?>').options[document.getElementById('statusauthtype<?php echo $i ?>').selectedIndex].value == 'oauth') { document.getElementById('oauthA<?php echo $i ?>').className = 'nothiddenfield'; document.getElementById('oauthB<?php echo $i ?>').className = 'nothiddenfield'; document.getElementById('oauthC<?php echo $i ?>').className = 'nothiddenfield'; document.getElementById('oauthD<?php echo $i ?>').className = 'nothiddenfield';} else { document.getElementById('oauthA<?php echo $i ?>').className = 'hiddenfield'; document.getElementById('oauthB<?php echo $i ?>').className = 'hiddenfield'; document.getElementById('oauthC<?php echo $i ?>').className = 'hiddenfield'; document.getElementById('oauthD<?php echo $i ?>').className = 'hiddenfield'; }"><OPTION VALUE="basic" <?php if($options[statusauthtype][$i] == "basic") { echo ' SELECTED'; } ?>>Basic Auth</OPTION><OPTION VALUE="oauth" <?php if($options[statusauthtype][$i] == "oauth") { echo ' SELECTED'; } ?>>Oauth</OPTION></SELECT> + <th id="type" class="manage-column column-title" style="" scope="col"><SELECT ID=statustype<?php echo $i ?> onChange="javascript:if(document.getElementById('statustype<?php echo $i ?>').options[document.getElementById('statustype<?php echo $i ?>').selectedIndex].value == 'twitter') { document.getElementById('statusserver<?php echo $i ?>').className = 'hiddenfield'; document.getElementById('statuspath<?php echo $i ?>').className = 'hiddenfield'; document.getElementById('statusauthtype<?php echo $i ?>').selectedIndex = 1; } else { document.getElementById('statusauthtype<?php echo $i ?>').selectedIndex = 0; document.getElementById('statusserver<?php echo $i ?>').className = 'nothiddenfield'; document.getElementById('statuspath<?php echo $i ?>').className = 'nothiddenfield'; } if(document.getElementById('statusauthtype<?php echo $i ?>').options[document.getElementById('statusauthtype<?php echo $i ?>').selectedIndex].value == 'oauth') { document.getElementById('oauthA<?php echo $i ?>').className = 'nothiddenfield'; document.getElementById('oauthB<?php echo $i ?>').className = 'nothiddenfield'; document.getElementById('oauthC<?php echo $i ?>').className = 'nothiddenfield'; document.getElementById('oauthD<?php echo $i ?>').className = 'nothiddenfield';} else { document.getElementById('oauthA<?php echo $i ?>').className = 'hiddenfield'; document.getElementById('oauthB<?php echo $i ?>').className = 'hiddenfield'; document.getElementById('oauthC<?php echo $i ?>').className = 'hiddenfield'; document.getElementById('oauthD<?php echo $i ?>').className = 'hiddenfield'; }" NAME=statustype[<?php echo $i ?>]><OPTION VALUE="status" <?php if($options[statustype][$i] == "status") { echo ' SELECTED'; } ?>">Status.net</OPTION><OPTION VALUE="twitter" <?php if($options[statustype][$i] == "twitter") { echo ' SELECTED'; } ?>">Twitter</OPTION></SELECT> + <SELECT ID=statusauthtype<?php echo $i ?> NAME=statusauthtype[<?php echo $i ?>] onChange="javascript:if(document.getElementById('statustype<?php echo $i ?>').options[document.getElementById('statustype<?php echo $i ?>').selectedIndex].value == 'twitter') { document.getElementById('statusauthtype<?php echo $i ?>').selectedIndex = 1; } else { document.getElementById('statusauthtype<?php echo $i ?>').selectedIndex = 0; }; if(document.getElementById('statusauthtype<?php echo $i ?>').options[document.getElementById('statusauthtype<?php echo $i ?>').selectedIndex].value == 'oauth') { document.getElementById('oauthA<?php echo $i ?>').className = 'nothiddenfield'; document.getElementById('oauthB<?php echo $i ?>').className = 'nothiddenfield'; document.getElementById('oauthC<?php echo $i ?>').className = 'nothiddenfield'; document.getElementById('oauthD<?php echo $i ?>').className = 'nothiddenfield';} else { document.getElementById('oauthA<?php echo $i ?>').className = 'hiddenfield'; document.getElementById('oauthB<?php echo $i ?>').className = 'hiddenfield'; document.getElementById('oauthC<?php echo $i ?>').className = 'hiddenfield'; document.getElementById('oauthD<?php echo $i ?>').className = 'hiddenfield'; }"><OPTION VALUE="basic" <?php if($options[statusauthtype][$i] == "basic") { echo ' SELECTED'; } ?>">Basic Auth</OPTION><OPTION VALUE="oauth" <?php if($options[statusauthtype][$i] == "oauth") { echo ' SELECTED'; } ?>">Oauth</OPTION></SELECT> </th> - <th id="server" class="<?php if($options[statuserrormsg][$i] != "") { echo 'error'; } else { echo 'manage-column column-title'; } ?>" style="" scope="col"><INPUT TYPE=text ID=statusserver<?php echo $i ?> <?php if ($options[statustype][$i] == "twitter" || $options[statustype][$i] == "socialoomph") { echo 'CLASS=hiddenfield'; } ?> NAME=statusserver[<?php echo $i ?>] VALUE="<?php echo $options[statusserver][$i]; ?>" SIZE=20></th> - <th id="path" class="<?php if($options[statuserrormsg][$i] != "") { echo 'error'; } else { echo 'manage-column column-title'; } ?>" style="" scope="col"><INPUT TYPE=text ID=statuspath<?php echo $i ?> <?php if ($options[statustype][$i] == "twitter" || $options[statustype][$i] == "socialoomph") { echo 'CLASS=hiddenfield'; } ?> NAME=statuspath[<?php echo $i ?>] VALUE="<?php echo $options[statuspath][$i]; ?>" SIZE=20></th> - <th id="user" class="<?php if($options[statuserrormsg][$i] != "") { echo 'error'; } else { echo 'manage-column column-title'; } ?>" style="" scope="col"><SELECT NAME=statussocialoomphuser[<?php echo $i ?>] ID=statussocialoomphuser<?php echo $i ?> <?php if ($options[statustype][$i] == "socialoomph") { echo 'CLASS=nothiddenfield'; } else { echo 'CLASS=hiddenfield'; } ?> onChange="javascript:document.getElementById('statususer<?php echo $i ?>').value=document.getElementById('statussocialoomphuser<?php echo $i ?>').options[document.getElementById('statussocialoomphuser<?php echo $i ?>').selectedIndex].value;"><?php echo str_replace('VALUE="'. $options[statususer][$i] .'"','VALUE="'. $options[statususer][$i] .'" SELECTED',$socialoomphhtml); ?></SELECT><B ID=oauthA<?php echo $i ?> <?php if ($options[statusauthtype][$i] != "oauth") { echo 'CLASS=hiddenfield'; } ?>>Consumer key:</B><INPUT TYPE=text NAME=statususer[<?php echo $i ?>] <?php if ($options[statustype][$i] == "socialoomph") { echo 'CLASS=hiddenfield'; } ?> ID=statususer<?php echo $i ?> VALUE="<?php echo $options[statususer][$i]; ?>" SIZE=20><BR /><B ID=oauthC<?php echo $i ?> <?php if ($options[statusauthtype][$i] != "oauth") { echo 'CLASS=hiddenfield'; } ?>>Consumer Secret:<INPUT TYPE=text NAME=statususer2[<?php echo $i ?>] VALUE="<?php echo $options[statususer2][$i]; ?>" SIZE=20></B></th> - <th id="pwd" class="<?php if($options[statuserrormsg][$i] != "") { echo 'error'; } else { echo 'manage-column column-title'; } ?>" style="" scope="col"><B ID=oauthB<?php echo $i ?> <?php if ($options[statusauthtype][$i] != "oauth") { echo 'CLASS=hiddenfield'; } ?>>Access Token:</B><INPUT TYPE=password NAME=statuspwd[<?php echo $i ?>] ID=statuspwd<?php echo $i ?> <?php if ($options[statustype][$i] == "socialoomph") { echo 'CLASS=hiddenfield'; } ?> VALUE="<?php echo $options[statuspwd][$i]; ?>" SIZE=20><BR /><B ID=oauthD<?php echo $i ?> <?php if ($options[statusauthtype][$i] != "oauth") { echo 'CLASS=hiddenfield'; } ?>>Access Token Secret:<INPUT TYPE=text NAME=statuspwd2[<?php echo $i ?>] VALUE="<?php echo $options[statuspwd2][$i]; ?>" SIZE=20></B></th> - <th id="prefix" class="<?php if($options[statuserrormsg][$i] != "") { echo 'error'; } else { echo 'manage-column column-title'; } ?>" style="" scope="col"><INPUT TYPE=text NAME=statusprefix[<?php echo $i ?>] VALUE="<?php echo $options[statusprefix][$i]; ?>" SIZE=20></th> - <th id="suffix" class="<?php if($options[statuserrormsg][$i] != "") { echo 'error'; } else { echo 'manage-column column-title'; } ?>" style="" scope="col"><INPUT TYPE=text NAME=statussuffix[<?php echo $i ?>] VALUE="<?php echo $options[statussuffix][$i]; ?>" SIZE=20></th> + <th id="server" class="manage-column column-title" style="" scope="col"><INPUT TYPE=text ID=statusserver<?php echo $i ?> <?php if ($options[statustype][$i] == "twitter") { echo 'CLASS=hiddenfield'; } ?> NAME=statusserver[<?php echo $i ?>] VALUE="<?php echo $options[statusserver][$i]; ?>" SIZE=20></th> + <th id="path" class="manage-column column-title" style="" scope="col"><INPUT TYPE=text ID=statuspath<?php echo $i ?> <?php if ($options[statustype][$i] == "twitter") { echo 'CLASS=hiddenfield'; } ?> NAME=statuspath[<?php echo $i ?>] VALUE="<?php echo $options[statuspath][$i]; ?>" SIZE=20></th> + <th id="user" class="manage-column column-title" style="" scope="col"><B ID=oauthA<?php echo $i ?> <?php if ($options[statusauthtype][$i] != "oauth") { echo 'CLASS=hiddenfield'; } ?>>Consumer key:</B><INPUT TYPE=text NAME=statususer[<?php echo $i ?>] VALUE="<?php echo $options[statususer][$i]; ?>" SIZE=20><BR /><B ID=oauthC<?php echo $i ?> <?php if ($options[statusauthtype][$i] != "oauth") { echo 'CLASS=hiddenfield'; } ?>>Consumer Secret:<INPUT TYPE=text NAME=statususer2[<?php echo $i ?>] VALUE="<?php echo $options[statususer2][$i]; ?>" SIZE=20></B></th> + <th id="pwd" class="manage-column column-title" style="" scope="col"><B ID=oauthB<?php echo $i ?> <?php if ($options[statusauthtype][$i] != "oauth") { echo 'CLASS=hiddenfield'; } ?>>Access Token:</B><INPUT TYPE=password NAME=statuspwd[<?php echo $i ?>] VALUE="<?php echo $options[statuspwd][$i]; ?>" SIZE=20><BR /><B ID=oauthD<?php echo $i ?> <?php if ($options[statusauthtype][$i] != "oauth") { echo 'CLASS=hiddenfield'; } ?>>Access Token Secret:<INPUT TYPE=text NAME=statuspwd2[<?php echo $i ?>] VALUE="<?php echo $options[statuspwd2][$i]; ?>" SIZE=20></B></th> + <th id="prefix" class="manage-column column-title" style="" scope="col"><INPUT TYPE=text NAME=statusprefix[<?php echo $i ?>] VALUE="<?php echo $options[statusprefix][$i]; ?>" SIZE=20></th> + <th id="suffix" class="manage-column column-title" style="" scope="col"><INPUT TYPE=text NAME=statussuffix[<?php echo $i ?>] VALUE="<?php echo $options[statussuffix][$i]; ?>" SIZE=20></th> </tr> <?php } -- GitLab