diff options
author | zotlabs <mike@macgirvin.com> | 2018-01-17 18:27:45 -0800 |
---|---|---|
committer | zotlabs <mike@macgirvin.com> | 2018-01-17 18:27:45 -0800 |
commit | 62e3083f23283d59c8e76c1bd8ccb2a07403551c (patch) | |
tree | 937a6a1f488e618d239ac4d05f1141debd0141a9 | |
parent | 05f9f0a393d7e414481f3e33e651d33f341e59b0 (diff) | |
parent | 647a9b2740f8b51c99909c7c059cad315b4661ba (diff) | |
download | volse-hubzilla-62e3083f23283d59c8e76c1bd8ccb2a07403551c.tar.gz volse-hubzilla-62e3083f23283d59c8e76c1bd8ccb2a07403551c.tar.bz2 volse-hubzilla-62e3083f23283d59c8e76c1bd8ccb2a07403551c.zip |
Merge branch 'dev' of https://github.com/redmatrix/hubzilla into dev_merge
-rw-r--r-- | Zotlabs/Lib/Apps.php | 1 | ||||
-rw-r--r-- | Zotlabs/Module/Articles.php | 3 | ||||
-rw-r--r-- | app/articles.apd | 2 | ||||
-rw-r--r-- | include/bbcode.php | 15 | ||||
-rw-r--r-- | include/features.php | 4 | ||||
-rwxr-xr-x | view/tpl/register.tpl | 4 |
6 files changed, 24 insertions, 5 deletions
diff --git a/Zotlabs/Lib/Apps.php b/Zotlabs/Lib/Apps.php index 457b85b62..d2a307fd5 100644 --- a/Zotlabs/Lib/Apps.php +++ b/Zotlabs/Lib/Apps.php @@ -221,6 +221,7 @@ class Apps { static public function translate_system_apps(&$arr) { $apps = array( 'Apps' => t('Apps'), + 'Articles' => t('Articles'), 'Cards' => t('Cards'), 'Admin' => t('Site Admin'), 'Report Bug' => t('Report Bug'), diff --git a/Zotlabs/Module/Articles.php b/Zotlabs/Module/Articles.php index 25daca81d..e2e0fed5d 100644 --- a/Zotlabs/Module/Articles.php +++ b/Zotlabs/Module/Articles.php @@ -35,7 +35,7 @@ class Articles extends \Zotlabs\Web\Controller { return; } - nav_set_selected(t('Cards')); + nav_set_selected(t('Articles')); head_add_link([ 'rel' => 'alternate', @@ -102,6 +102,7 @@ class Articles extends \Zotlabs\Web\Controller { 'permissions' => $channel_acl, 'showacl' => (($is_owner) ? true : false), 'visitor' => true, + 'body' => '[summary][/summary]', 'hide_location' => false, 'hide_voting' => false, 'profile_uid' => intval($owner), diff --git a/app/articles.apd b/app/articles.apd index 74e86415b..5a9f17e0f 100644 --- a/app/articles.apd +++ b/app/articles.apd @@ -1,4 +1,4 @@ -version: 1.1 +version: 1.2 url: $baseurl/articles/$nick name: Articles requires: local_channel, articles diff --git a/include/bbcode.php b/include/bbcode.php index 775a91f9a..de32bd57a 100644 --- a/include/bbcode.php +++ b/include/bbcode.php @@ -428,6 +428,16 @@ function bb_spoilertag($match) { return '<div onclick="openClose(\'opendiv-' . $rnd . '\'); return false;" class="fakelink">' . $openclose . '</div><blockquote id="opendiv-' . $rnd . '" style="display: none;">' . $text . '</blockquote>'; } +function bb_summary($match) { + $rnd1 = mt_rand(); + $rnd2 = mt_rand(); + $rnd3 = mt_rand(); + $rnd4 = mt_rand(); + + return $match[1] . '<div style="display: block;" id="opendiv-' . $rnd2 . '">' . $match[2] . '</div><div style="display: block;" id="opendiv-' . $rnd3 . '" onclick="openClose(\'opendiv-' . $rnd1 . '\'); openClose(\'opendiv-' . $rnd2 . '\'); openClose(\'opendiv-' . $rnd3 . '\'); openClose(\'opendiv-' . $rnd4 . '\'); return false;" class="fakelink">' . t('View article') . '</div><div style="display: none;" id="opendiv-' . $rnd4 . '" onclick="openClose(\'opendiv-' . $rnd1 . '\'); openClose(\'opendiv-' . $rnd2 . '\'); openClose(\'opendiv-' . $rnd3 . '\'); openClose(\'opendiv-' . $rnd4 . '\'); return false;" class="fakelink">' . t('View summary') . '</div><div id="opendiv-' . $rnd1 . '" style="display: none;">' . $match[3] . '</div>'; +} + + function bb_definitionList($match) { // $match[1] is the markup styles for the "terms" in the definition list. // $match[2] is the content between the [dl]...[/dl] tags @@ -1062,6 +1072,11 @@ function bbcode($Text, $options = []) { $Text = preg_replace_callback("/\[code(.*?)\](.*?)\[\/code\]/ism", 'bb_code_options', $Text); } + + if(strpos($Text,'[/summary]') !== false) { + $Text = preg_replace_callback("/^(.*?)\[summary\](.*?)\[\/summary\](.*?)$/ism", 'bb_summary', $Text); + } + // Check for [spoiler] text $endlessloop = 0; while ((strpos($Text, "[/spoiler]")!== false) and (strpos($Text, "[spoiler]") !== false) and (++$endlessloop < 20)) { diff --git a/include/features.php b/include/features.php index 69eeed3e8..36eb74a9d 100644 --- a/include/features.php +++ b/include/features.php @@ -126,7 +126,7 @@ function get_features($filtered = true) { feature_level('cards',1), ], -/* reserved, work in progress + [ 'articles', t('Articles'), @@ -135,7 +135,7 @@ function get_features($filtered = true) { get_config('feature_lock','articles'), feature_level('articles',1), ], -*/ + [ 'nav_channel_select', t('Navigation Channel Select'), diff --git a/view/tpl/register.tpl b/view/tpl/register.tpl index 493dba4c8..335d5f979 100755 --- a/view/tpl/register.tpl +++ b/view/tpl/register.tpl @@ -12,7 +12,9 @@ {{/if}} {{if $registertext}} - <div id="register-text" class="descriptive-paragraph">{{$registertext}}</div> + <div class="section-content-info-wrapper"> + <div id="register-text" class="descriptive-paragraph">{{$registertext}}</div> + </div> {{/if}} {{if $invitations}} |