diff --git a/mod/install.php b/mod/install.php index 33502938a9..003d81c6ab 100755 --- a/mod/install.php +++ b/mod/install.php @@ -186,8 +186,8 @@ function install_content(&$a) { check_keys($checks); - if(x($_POST,'phppath')) - $phpath = notags(trim($_POST['phppath'])); + if(x($_POST,'phpath')) + $phpath = notags(trim($_POST['phpath'])); check_php($phpath, $checks); @@ -221,7 +221,7 @@ function install_content(&$a) { $dbuser = notags(trim($_POST['dbuser'])); $dbpass = notags(trim($_POST['dbpass'])); $dbdata = notags(trim($_POST['dbdata'])); - $phpath = notags(trim($_POST['phppath'])); + $phpath = notags(trim($_POST['phpath'])); $tpl = get_markup_template('install_db.tpl'); @@ -259,7 +259,7 @@ function install_content(&$a) { $dbuser = notags(trim($_POST['dbuser'])); $dbpass = notags(trim($_POST['dbpass'])); $dbdata = notags(trim($_POST['dbdata'])); - $phpath = notags(trim($_POST['phppath'])); + $phpath = notags(trim($_POST['phpath'])); $adminmail = notags(trim($_POST['adminmail'])); $timezone = ((x($_POST,'timezone')) ? ($_POST['timezone']) : 'America/Los_Angeles'); @@ -323,7 +323,7 @@ function check_php(&$phpath, &$checks) { $help .= t('Could not find a command line version of PHP in the web server PATH.'). EOL; $tpl = get_markup_template('field_input.tpl'); $help .= replace_macros($tpl, array( - '$field' => array('phppath', t('PHP executable path'), $phpath, t('Enter full path to php executable')), + '$field' => array('phpath', t('PHP executable path'), $phpath, t('Enter full path to php executable')), )); $phpath=""; } diff --git a/util/fpostit/README b/util/fpostit/README new file mode 100644 index 0000000000..39b7c57613 --- /dev/null +++ b/util/fpostit/README @@ -0,0 +1,8 @@ +fpostit + +original author: Devlon Duthied + +see his blog posting: +http://blog.duthied.com/2011/09/13/node-agnostic-friendika-bookmarklet/ + +original published at github https://github.com/duthied/Friendika-Bookmarklet diff --git a/util/fpostit/fpostit.js b/util/fpostit/fpostit.js new file mode 100644 index 0000000000..a6c75aba8f --- /dev/null +++ b/util/fpostit/fpostit.js @@ -0,0 +1,11 @@ +javascript: (function() { + the_url = 'http://testbubble.com/fpostit.php?url=' + encodeURIComponent(window.location.href) + '&title=' + encodeURIComponent(document.title) + '&text=' + encodeURIComponent('' (window.getSelection ? window.getSelection() : document.getSelection ? document.getSelection() : document.selection.createRange().text)); + a_funct = function() { + if (!window.open(the_url, 'fpostit', 'location=yes,links=no,scrollbars=no,toolbar=no,width=600,height=300')) location.href = the_url; + }; + if (/Firefox/.test(navigator.userAgent)) { + setTimeout(a_funct, 0) + } else { + a_funct() + } +})() \ No newline at end of file diff --git a/util/fpostit/fpostit.php b/util/fpostit/fpostit.php new file mode 100644 index 0000000000..491d81f6d6 --- /dev/null +++ b/util/fpostit/fpostit.php @@ -0,0 +1,129 @@ + + + + + + + + $content); + + // echo "posting to: $url
"; + + $c = curl_init(); + curl_setopt($c, CURLOPT_URL, $url); + curl_setopt($c, CURLOPT_USERPWD, "$username:$password"); + curl_setopt($c, CURLOPT_POSTFIELDS, $data); + curl_setopt($c, CURLOPT_RETURNTRANSFER, true); + curl_setopt($c, CURLOPT_FOLLOWLOCATION, true); + $c_result = curl_exec($c); + if(curl_errno($c)){ + $error = curl_error($c); + showForm($error, $content); + } + + curl_close($c); + if (!isset($error)) { + echo ''; + } + + } else { + $error = "Missing account name and/or password...try again please"; + showForm($error, $content); + } + +} else { + showForm(null, $content); +} + +function showForm($error, $content) { + $username_cookie = $_COOKIE['username']; + $password_cookie = $_COOKIE['password']; + + echo << +

+ Friendika Bookmarklet

+ + +
+
+ Enter the email address of the Friendika Account that you want to cross-post to:(example: user@friendika.org)

+ Account ID:
+ Password:
+
+   $error +
+

+
+EOF; + +} +?> + + + \ No newline at end of file diff --git a/util/fpostit/friendika-32.png b/util/fpostit/friendika-32.png new file mode 100644 index 0000000000..61764bf20a Binary files /dev/null and b/util/fpostit/friendika-32.png differ