aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/api_zot.php8
-rw-r--r--include/bbcode.php10
-rwxr-xr-xinclude/items.php1
-rwxr-xr-xinclude/oembed.php2
4 files changed, 12 insertions, 9 deletions
diff --git a/include/api_zot.php b/include/api_zot.php
index 2bbae244c..256339bad 100644
--- a/include/api_zot.php
+++ b/include/api_zot.php
@@ -28,8 +28,8 @@
api_register_func('api/z/1.0/group','api_group', true);
api_register_func('api/red/xchan','api_red_xchan',true);
api_register_func('api/z/1.0/xchan','api_red_xchan',true);
- api_register_func('api/red/item/store','red_item_store', true);
- api_register_func('api/z/1.0/item/store','red_item_store', true);
+ api_register_func('api/red/item/update','zot_item_update', true);
+ api_register_func('api/z/1.0/item/update','zot_item_update', true);
api_register_func('api/red/item/full','red_item', true);
api_register_func('api/z/1.0/item/full','red_item', true);
@@ -266,7 +266,7 @@
require_once('include/hubloc.php');
if($_SERVER['REQUEST_METHOD'] === 'POST') {
- $r = xchan_store($_REQUEST);
+ // $r = xchan_store($_REQUEST);
}
$r = xchan_fetch($_REQUEST);
json_return_and_die($r);
@@ -341,7 +341,7 @@
}
- function red_item_store($type) {
+ function zot_item_update($type) {
if (api_user() === false) {
logger('api_red_item_store: no user');
diff --git a/include/bbcode.php b/include/bbcode.php
index 6794fca96..396cbcb29 100644
--- a/include/bbcode.php
+++ b/include/bbcode.php
@@ -824,12 +824,14 @@ function bbcode($Text, $preserve_nl = false, $tryoembed = true, $cache = false)
$Text = preg_replace("(\[h6\](.*?)\[\/h6\])ism",'<h6>$1</h6>',$Text);
}
// Check for table of content without params
- if (strpos($Text,'[toc]') !== false) {
- $Text = preg_replace("/\[toc\]/ism",'<ul id="toc"></ul>',$Text);
+ while(strpos($Text,'[toc]') !== false) {
+ $toc_id = 'toc-' . random_string(10);
+ $Text = preg_replace("/\[toc\]/ism", '<strong>' . t('Contents:') . '</strong><ul id="' . $toc_id . '" class="toc" data-toc=".section-content-wrapper"></ul><script>$("#' . $toc_id . '").toc();</script>', $Text, 1);
}
// Check for table of content with params
- if (strpos($Text,'[toc') !== false) {
- $Text = preg_replace("/\[toc([^\]]+?)\]/ism",'<ul$1></ul>',$Text);
+ while(strpos($Text,'[toc') !== false) {
+ $toc_id = 'toc-' . random_string(10);
+ $Text = preg_replace("/\[toc([^\]]+?)\]/ism", '<strong>' . t('Contents:') . '</strong><ul id="' . $toc_id . '" class="toc"$1></ul><script>$("#' . $toc_id . '").toc();</script>', $Text, 1);
}
// Check for centered text
if (strpos($Text,'[/center]') !== false) {
diff --git a/include/items.php b/include/items.php
index e20c41d29..215f70031 100755
--- a/include/items.php
+++ b/include/items.php
@@ -1813,6 +1813,7 @@ function item_store($arr, $allow_exec = false, $deliver = true) {
$x = q("update item set parent = id where id = %d",
intval($r[0]['id'])
);
+ $arr['parent'] = $r[0]['id'];
}
diff --git a/include/oembed.php b/include/oembed.php
index 52fb04058..eb7b76437 100755
--- a/include/oembed.php
+++ b/include/oembed.php
@@ -338,7 +338,7 @@ function oembed_iframe($src,$width,$height) {
// Make sure any children are sandboxed within their own iframe.
- return '<iframe ' . $scroll . 'height="' . $height . '" width="' . $width . '" src="' . $s . '" frameborder="no" >'
+ return '<iframe ' . $scroll . 'height="' . $height . '" width="' . $width . '" src="' . $s . '" allowfullscreen frameborder="no" >'
. t('Embedded content') . '</iframe>';
}