aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2012-01-09 18:52:49 -0800
committerfriendica <info@friendica.com>2012-01-09 18:52:49 -0800
commita13156c0f31bebd11569edcf587c678a89cd4175 (patch)
tree2c4239a925bbd2c38a69d1a9a5807b23027201ba
parent3bdcb5247105f41a1b436cd00727148cda2f90b9 (diff)
downloadvolse-hubzilla-a13156c0f31bebd11569edcf587c678a89cd4175.tar.gz
volse-hubzilla-a13156c0f31bebd11569edcf587c678a89cd4175.tar.bz2
volse-hubzilla-a13156c0f31bebd11569edcf587c678a89cd4175.zip
bypass D* markdown bug for now
-rw-r--r--boot.php2
-rw-r--r--include/bb2diaspora.php8
-rw-r--r--js/main.js19
-rw-r--r--mod/item.php2
-rw-r--r--view/theme/duepuntozero/jot.tpl3
5 files changed, 31 insertions, 3 deletions
diff --git a/boot.php b/boot.php
index 2bbe3fd04..1ad3249c1 100644
--- a/boot.php
+++ b/boot.php
@@ -9,7 +9,7 @@ require_once('include/nav.php');
require_once('include/cache.php');
define ( 'FRIENDICA_PLATFORM', 'Friendica');
-define ( 'FRIENDICA_VERSION', '2.3.1220' );
+define ( 'FRIENDICA_VERSION', '2.3.1221' );
define ( 'DFRN_PROTOCOL_VERSION', '2.22' );
define ( 'DB_UPDATE_VERSION', 1115 );
diff --git a/include/bb2diaspora.php b/include/bb2diaspora.php
index 38f5c6735..e819976a7 100644
--- a/include/bb2diaspora.php
+++ b/include/bb2diaspora.php
@@ -94,8 +94,12 @@ function bb2diaspora($Text,$preserve_nl = false) {
// [img]pathtoimage[/img]
-// $Text = preg_replace("/\[url\=([$URLSearchString]*)\]\[img\](.*?)\[\/img\]\[\/url\]/ism",
-// '![' . t('image/photo') . '](' . '$2' . ')' . "\n" . '[' . t('link') . '](' . '$1' . ')', $Text);
+ // the following was added on 10-January-2012 due to an inability of Diaspora's
+ // new javascript markdown processor to handle links with images as the link "text"
+ // It is not optimal and may be removed if this ability is restored in the future
+
+ $Text = preg_replace("/\[url\=([$URLSearchString]*)\]\[img\](.*?)\[\/img\]\[\/url\]/ism",
+ '![' . t('image/photo') . '](' . '$2' . ')' . "\n" . '[' . t('link') . '](' . '$1' . ')', $Text);
$Text = preg_replace("/\[bookmark\]([$URLSearchString]*)\[\/bookmark\]/ism", '[$1]($1)', $Text);
$Text = preg_replace("/\[bookmark\=([$URLSearchString]*)\](.*?)\[\/bookmark\]/ism", '[$2]($1)', $Text);
diff --git a/js/main.js b/js/main.js
index 009fb55bb..be6b5dbae 100644
--- a/js/main.js
+++ b/js/main.js
@@ -433,6 +433,25 @@
+ function preview_post() {
+ $("#jot-preview").val("1");
+ $("#jot-preview-content").show();
+ tinyMCE.triggerSave();
+ $.post(
+ "item",
+ $("#profile-jot-form").serialize(),
+ function(data) {
+ if(data.preview) {
+ $("#jot-preview-content").html(data.preview);
+ $("#jot-preview-content" + " a").removeAttr('href');
+ }
+ },
+ "json"
+ );
+ $("#jot-preview").val("1");
+ return true;
+ }
+
function unpause() {
// unpause auto reloads if they are currently stopped
diff --git a/mod/item.php b/mod/item.php
index 6b294b93e..a5fb81263 100644
--- a/mod/item.php
+++ b/mod/item.php
@@ -38,6 +38,8 @@ function item_post(&$a) {
call_hooks('post_local_start', $_POST);
+ logger('postvars' . print_r($_POST,true));
+
$api_source = ((x($_POST,'api_source') && $_POST['api_source']) ? true : false);
$return_path = ((x($_POST,'return')) ? $_POST['return'] : '');
diff --git a/view/theme/duepuntozero/jot.tpl b/view/theme/duepuntozero/jot.tpl
index 6a105e1da..1a3cc92e7 100644
--- a/view/theme/duepuntozero/jot.tpl
+++ b/view/theme/duepuntozero/jot.tpl
@@ -68,6 +68,9 @@
</div>
</div>
+ <span onclick="preview_post();" id="jot-preview-link" class="fakelink">$preview</span>
+ <div id="jot-preview-content" style="display:none;"></div>
+
</div>
<div id="profile-jot-end"></div>