Version 5.0.0 beta 4
This commit is contained in:
1 parent
e86153356a
commit
2f24f9de48
276 files changed
+8614
-6044
No files matched your search
@@ -85,7 +85,7 @@
|
||||
</header>
|
||||
|
||||
{{if $database->can('add') or \IPS\Member::loggedIn()->member_id}}
|
||||
<ul class="ipsButtons ipsButtons--main ipsButtons--margin">
|
||||
<ul class="ipsButtons ipsButtons--main i-margin-block_block">
|
||||
{{if $database->can('add')}}
|
||||
<li>
|
||||
<a class="ipsButton ipsButton--primary" {{if $database->use_categories}}data-ipsDialog="1" data-ipsDialog-size="narrow" data-ipsDialog-title="{lang="cms_select_category"}"{{endif}} href="{$url->setQueryString( array( 'do' => 'form', 'd' => \IPS\cms\Databases\Dispatcher::i()->databaseId ) )}">{lang="cms_add_new_record_button" sprintf="$database->recordWord( 1 )"}</a>
|
||||
@@ -196,7 +196,7 @@
|
||||
</header>
|
||||
|
||||
{{if $database->can('add') or \IPS\Member::loggedIn()->member_id}}
|
||||
<ul class="ipsButtons ipsButtons--main ipsButtons--margin">
|
||||
<ul class="ipsButtons ipsButtons--main i-margin-block_block">
|
||||
{{if $database->can('add')}}
|
||||
<li>
|
||||
<a class="ipsButton ipsButton--primary" {{if $database->use_categories}}data-ipsDialog="1" data-ipsDialog-size="narrow" data-ipsDialog-title="{lang="cms_select_category"}"{{endif}} href="{$url->setQueryString( array( 'do' => 'form', 'd' => \IPS\cms\Databases\Dispatcher::i()->databaseId ) )}">{lang="cms_add_new_record_button" sprintf="$database->recordWord( 1 )"}</a>
|
||||
@@ -300,7 +300,7 @@
|
||||
</header>
|
||||
|
||||
{{if $database->can('add') or \IPS\Member::loggedIn()->member_id}}
|
||||
<ul class="ipsButtons ipsButtons--main ipsButtons--margin">
|
||||
<ul class="ipsButtons ipsButtons--main i-margin-block_block">
|
||||
{{if $database->can('add')}}
|
||||
<li>
|
||||
<a class="ipsButton ipsButton--primary" {{if $database->use_categories}}data-ipsDialog="1" data-ipsDialog-size="narrow" data-ipsDialog-title="{lang="cms_select_category"}"{{endif}} href="{$url->setQueryString( array( 'do' => 'form', 'd' => \IPS\cms\Databases\Dispatcher::i()->databaseId ) )}">{lang="cms_add_new_record_button" sprintf="$database->recordWord( 1 )"}</a>
|
||||
@@ -408,7 +408,7 @@
|
||||
</header>
|
||||
|
||||
{{if $database->can('add') or \IPS\Member::loggedIn()->member_id}}
|
||||
<ul class="ipsButtons ipsButtons--main ipsButtons--margin">
|
||||
<ul class="ipsButtons ipsButtons--main i-margin-block_block">
|
||||
{{if $database->can('add')}}
|
||||
<li>
|
||||
<a class="ipsButton ipsButton--primary" {{if $database->use_categories}}data-ipsDialog="1" data-ipsDialog-size="narrow" data-ipsDialog-title="{lang="cms_select_category"}"{{endif}} href="{$url->setQueryString( array( 'do' => 'form', 'd' => \IPS\cms\Databases\Dispatcher::i()->databaseId ) )}">{lang="cms_add_new_record_button" sprintf="$database->recordWord( 1 )"}</a>
|
||||
@@ -520,7 +520,7 @@
|
||||
</header>
|
||||
|
||||
{{if $database->can('add') or \IPS\Member::loggedIn()->member_id}}
|
||||
<ul class="ipsButtons ipsButtons--main ipsButtons--margin">
|
||||
<ul class="ipsButtons ipsButtons--main i-margin-block_block">
|
||||
{{if $database->can('add')}}
|
||||
<li>
|
||||
<a class="ipsButton ipsButton--primary" {{if $database->use_categories}}data-ipsDialog="1" data-ipsDialog-size="narrow" data-ipsDialog-title="{lang="cms_select_category"}"{{endif}} href="{$url->setQueryString( array( 'do' => 'form', 'd' => \IPS\cms\Databases\Dispatcher::i()->databaseId ) )}">{lang="cms_add_new_record_button" sprintf="$database->recordWord( 1 )"}</a>
|
||||
@@ -681,7 +681,7 @@ data-view-tracking-data="{expression="base64_encode(json_encode( $comment->getVi
|
||||
{{endif}}
|
||||
</div>
|
||||
<div class='ipsPhotoPanel__secondary'>
|
||||
<a href='{$comment->url()}'>{$comment->dateLine()|raw}</a>
|
||||
{{if ! \IPS\Output::i()->reduceLinks()}}<a href='{$comment->shareableUrl()}'>{{endif}}{$comment->dateLine()|raw}{{if ! \IPS\Output::i()->reduceLinks()}}</a>{{endif}}
|
||||
{{if $comment->editLine()}}
|
||||
({lang="edited_lc"})
|
||||
{{endif}}
|
||||
@@ -791,7 +791,9 @@ data-view-tracking-data="{expression="base64_encode(json_encode( $comment->getVi
|
||||
{{endif}}
|
||||
</div>
|
||||
{{endif}}
|
||||
{template="sharemenu" group="global" app="core" params="$comment"}
|
||||
{{if ! \IPS\Output::i()->reduceLinks()}}
|
||||
{template="sharemenu" group="global" app="core" params="$comment"}
|
||||
{{endif}}
|
||||
</div>]]></template>
|
||||
<template template_key="database_display_commentContainer" template_title="commentContainer" template_desc="" template_location="database" template_group="display" template_params="$item, $comment, $votes=array(), $otherClasses=''" template_app="" template_type="template"><![CDATA[{{$idField = $comment::$databaseColumnId;}}
|
||||
{{$itemClassSafe = str_replace( '\\', '_', mb_substr( $comment::$itemClass, 4 ) );}}
|
||||
@@ -808,6 +810,7 @@ data-view-tracking-data="{expression="base64_encode(json_encode( $comment->getVi
|
||||
{{endif}}
|
||||
|
||||
<a id='comment-{$comment->$idField}'></a>
|
||||
<a id='findComment-{$comment->$idField}'></a>
|
||||
<article id='elComment_{$comment->$idField}' class="ipsEntry js-ipsEntry ipsEntry--simple {{if $otherClasses}}{$otherClasses}{{endif}} {{if (\IPS\IPS::classUsesTrait( $comment, 'IPS\Content\Reactable' ) and $comment->isHighlighted()) or $comment->isFeatured()}}ipsEntry--popular{{endif}} {{if $comment->author()->hasHighlightedReplies()}}ipsEntry--highlighted{{endif}} {{if $comment->isIgnored()}}ipsHide{{endif}} {{if $comment->hidden() OR $item->hidden() == -2}}ipsModerated{{endif}}" {{if $comment->author()->hasHighlightedReplies()}}data-memberGroup="{$comment->author()->member_group_id}"{{endif}}>
|
||||
{template="comment" group="display" location="database" app="cms" params="$item, $comment, $item::$formLangPrefix . 'comment', $item::$application, $item::$module, $itemClassSafe"}
|
||||
</article>]]></template>
|
||||
@@ -897,7 +900,7 @@ data-view-tracking-data="{expression="base64_encode(json_encode( $comment->getVi
|
||||
<div class="ipsBadges">{{foreach $record->badges() as $badge}}{$badge|raw}{{endforeach}}</div>
|
||||
</div>
|
||||
{{if $record::database()->options['reviews']}}
|
||||
<div class="ipsPageHeader__rating">{template="rating" group="global" location="front" app="core" params="'', $record->averageReviewRating(), \IPS\Settings::i()->reviews_rating_out_of, $record->memberReviewRating()"} <span class='i-color_soft'>({lang="num_reviews" pluralize="$record->reviews"})</span></div>
|
||||
<div class="ipsPageHeader__rating">{template="rating" group="global" location="front" app="core" params="'', $record->averageReviewRating(), \IPS\Settings::i()->reviews_rating_out_of, $record->memberReviewRating()"} <span class='i-color_soft'>({lang="num_reviews" pluralize="$record->record_reviews"})</span></div>
|
||||
{{elseif $record->container()->allow_rating}}
|
||||
<div class="ipsPageHeader__rating">{$record->rating()|raw}</div>
|
||||
{{endif}}
|
||||
@@ -1105,10 +1108,11 @@ data-view-tracking-data="{expression="base64_encode(json_encode( $review->getVie
|
||||
<a href='{$review->url('report')}' {{if member.member_id or \IPS\Helpers\Form\Captcha::supportsModal()}}data-ipsDialog data-ipsDialog-remoteSubmit data-ipsDialog-size='medium' data-ipsDialog-flashMessage='{lang="report_submit_success"}' data-ipsDialog-title="{lang="report"}"{{endif}} data-action='reportComment' title='{lang="report"}'>{lang="report"}</a>
|
||||
</li>
|
||||
{{endif}}
|
||||
{{if ! \IPS\Output::i()->reduceLinks()}}
|
||||
<li class='ipsMenu_item'>
|
||||
<a href='{$review->item()->url()->setQueryString( array( 'do' => 'findReview', 'review' => $review->id ) )}' title='{lang="share_this_review"}' data-ipsDialog data-ipsDialog-size='narrow' data-ipsDialog-content='#elShareReview_{$review->id}_menu' data-ipsDialog-title="{lang="share_this_review"}" id='elShareReview_{$review->id}' data-role='shareComment'>{lang="share_this_review"}</a>
|
||||
<a href='{$review->shareableUrl('review')}' title='{lang="share_this_review"}' data-ipsDialog data-ipsDialog-size='narrow' data-ipsDialog-content='#elShareReview_{$review->id}_menu' data-ipsDialog-title="{lang="share_this_review"}" id='elShareReview_{$review->id}' data-role='shareComment'>{lang="share_this_review"}</a>
|
||||
</li>
|
||||
|
||||
{{endif}}
|
||||
{{if $review->canEdit() || ( $review->hidden() == -2 AND \IPS\Member::loggedIn()->modPermission('can_manage_deleted_content') ) || ( \IPS\IPS::classUsesTrait( $review, 'IPS\Content\Hideable' ) && ( ( !$review->hidden() and $review->canHide() ) || ( $review->hidden() and $review->canUnhide() ) ) ) || $review->canDelete()}}
|
||||
<li class='ipsMenu_sep'><hr></li>
|
||||
{{endif}}
|
||||
@@ -1249,7 +1253,9 @@ data-view-tracking-data="{expression="base64_encode(json_encode( $review->getVie
|
||||
{{endif}}
|
||||
</div>
|
||||
{{endif}}
|
||||
{{if ! \IPS\Output::i()->reduceLinks()}}
|
||||
{template="sharemenu" group="global" app="core" params="$review"}
|
||||
{{endif}}
|
||||
</div>]]></template>
|
||||
<template template_key="database_display_reviewContainer" template_title="reviewContainer" template_desc="" template_location="database" template_group="display" template_params="$item, $review" template_app="" template_type="template"><![CDATA[{{if $review->isIgnored()}}
|
||||
<div class='ipsEntry ipsEntry--ignored'>
|
||||
@@ -1257,6 +1263,7 @@ data-view-tracking-data="{expression="base64_encode(json_encode( $review->getVie
|
||||
</div>
|
||||
{{else}}
|
||||
<a id="review-{$review->id}"></a>
|
||||
<a id="findReview-{$review->id}"></a>
|
||||
<article id="review-{$review->id}" class="ipsEntry js-ipsEntry ipsEntry--simple ipsEntry--review {{if $review->hidden() OR $item->hidden() == -2}}ipsModerated{{endif}}">
|
||||
{template="review" location="database" group="display" app="cms" params="$item, $review, $item::$formLangPrefix . 'review', $item::$application, $item::$module"}
|
||||
</article>
|
||||
@@ -1644,7 +1651,7 @@ data-view-tracking-data="{expression="base64_encode(json_encode( $review->getVie
|
||||
</div>]]></template>
|
||||
<template template_key="database_listing_categoryFooter" template_title="categoryFooter" template_desc="" template_location="database" template_group="listing" template_params="$category, $table, $activeFilters" template_app="" template_type="template"><![CDATA[
|
||||
{{if ! \IPS\Request::i()->isAjax() AND ! isset( \IPS\Request::i()->advancedSearchForm ) AND $category->show_records}}
|
||||
<ul class="ipsButtons ipsButtons--main ipsButtons--margin">
|
||||
<ul class="ipsButtons ipsButtons--main i-margin-block_block">
|
||||
{{if \IPS\Member::loggedIn()->member_id}}
|
||||
<li>
|
||||
<a class="ipsButton ipsButton--text" href="{$category->url()->setQueryString( 'do', 'markRead' )->csrf()}"><i class="fa-solid fa-check"></i> {lang="cms_mark_read"}</a>
|
||||
@@ -1907,6 +1914,9 @@ data-view-tracking-data="{expression="base64_encode(json_encode( $review->getVie
|
||||
{template="assignmentBadge" app="core" group="global" params="$row, ''"}
|
||||
{{foreach $row->badges() as $badge}}{$badge|raw}{{endforeach}}
|
||||
</div>
|
||||
{{if $row->prefix()}}
|
||||
{template="prefix" group="global" app="core" params="$row->prefix( TRUE ), $row->prefix()"}
|
||||
{{endif}}
|
||||
<h4>
|
||||
{{if member.member_id}}
|
||||
{{if $row->unread()}}
|
||||
@@ -1926,15 +1936,9 @@ data-view-tracking-data="{expression="base64_encode(json_encode( $review->getVie
|
||||
<div class='ipsData__meta'>
|
||||
<span>{lang="byline_name_date" htmlsprintf="$row->author()->link( $row->warningRef(), NULL, $row->isAnonymous() ), \IPS\DateTime::ts( $row->mapped('date') )->html(FALSE)"}</span>
|
||||
</div>
|
||||
{{if isset( $table->extra['layout'] ) and \in_array( $table->extra['layout'], array("table", "featured", "grid"))}}
|
||||
<div class='ipsData__desc'>{$row->truncated(TRUE)|raw}</div>
|
||||
{{if \count( $row->tags() )}}
|
||||
{template="tagsWithPrefix" group="global" app="core" params="$row->tags(), $row->prefix(), true"}
|
||||
{{endif}}
|
||||
{{else}}
|
||||
{{if $row->prefix()}}
|
||||
{template="prefix" group="global" app="core" params="$row->prefix( TRUE ), $row->prefix()"}
|
||||
{{endif}}
|
||||
<div class='ipsData__desc'>{$row->truncated(TRUE)|raw}</div>
|
||||
{{if \count( $row->tags() )}}
|
||||
{template="tags" group="global" app="core" params="$row->tags(), true"}
|
||||
{{endif}}
|
||||
{{if \count( $row->customFieldsForDisplay('listing') )}}
|
||||
<ul class='ipsData__fields'>
|
||||
@@ -1946,87 +1950,83 @@ data-view-tracking-data="{expression="base64_encode(json_encode( $review->getVie
|
||||
</ul>
|
||||
{{endif}}
|
||||
</div>
|
||||
{{if isset( $table->extra['layout'] ) and !\in_array( $table->extra['layout'], array("minimal"))}}
|
||||
{{if $row->groupsPosted}}
|
||||
{template="groupPostedBadges" group="global" app="core" location="front" params="$row->groupsPosted, 'topic_posted_in_groups', 'ipsResponsive_hidePhone'"}
|
||||
{{endif}}
|
||||
{{if $row::database()->options['reviews'] and $row->averageReviewRating() > 0}}
|
||||
<ul class='ipsRating ipsRating_small'>
|
||||
{{foreach range( 1, \IPS\Settings::i()->reviews_rating_out_of ) as $i}}
|
||||
<li class='{{if $row->averageReviewRating() >= $i}}ipsRating_on{{else}}ipsRating_off{{endif}}'>
|
||||
<i class='fa-solid fa-star'></i>
|
||||
</li>
|
||||
{{endforeach}}
|
||||
</ul>
|
||||
{{elseif $row->container()->allow_rating and $row->rating_value > 0}}
|
||||
{template="rating" group="global" location="front" app="core" params="'small', $row->rating_value, \IPS\Settings::i()->reviews_rating_out_of"}
|
||||
{{endif}}
|
||||
<div class="ipsData__extra">
|
||||
<ul class='ipsData__stats'>
|
||||
{{foreach $row->stats(TRUE) as $k => $v}}
|
||||
<li {{if \in_array( $k, $row->hotStats )}}class="ipsData__stats-hot" data-text='{lang="hot_item"}' data-ipsTooltip title='{lang="hot_item_desc"}'{{endif}} data-statType='{$k}' data-v="{$v}">
|
||||
<span class='ipsData__stats-icon' data-stat-value='{number="$v"}' aria-hidden="true" data-ipstooltip title='{number="$v" format="short"} {lang="{$k}" pluralize="$v" format="short"}'></span>
|
||||
<span class='ipsData__stats-label'>{number="$v"} {lang="content_records_stat_{$k}" pluralize="$v"}</span>
|
||||
</li>
|
||||
{{endforeach}}
|
||||
</ul>
|
||||
<div class="ipsData__last">
|
||||
{{if ($row::database()->options['comments'] or $row::database()->options['reviews']) and isset( $table->extra['layout'] ) and \in_array( $table->extra['layout'], array("table", "featured"))}}
|
||||
{{if $row->mapped('num_comments')}}
|
||||
{template="userPhoto" app="core" group="global" params="$row->lastCommenter(), 'tiny'"}
|
||||
{{else}}
|
||||
{template="userPhoto" app="core" group="global" params="$row->author(), 'tiny'"}
|
||||
{{endif}}
|
||||
<div class='ipsData__last-text'>
|
||||
<div class='ipsData__last-primary'>
|
||||
{{if $row->database()->_comment_bump & \IPS\cms\Databases::BUMP_ON_COMMENT}}
|
||||
{{if $row->mapped('num_comments')}}
|
||||
{{if $row->mapped('last_comment_anon')}}
|
||||
{template="userLink" app="core" group="global" params="$row->author(), NULL, NULL, TRUE"}
|
||||
{{else}}
|
||||
{lang="cms_row_commented_by" htmlsprintf="$row->lastCommenter()->link()"}
|
||||
{{endif}}
|
||||
{{else}}
|
||||
{lang="cms_row_added_by" htmlsprintf="$row->author()->link( NULL, NULL, $row->isAnonymous() )"}
|
||||
{{endif}}
|
||||
{{elseif $row->database()->_comment_bump & \IPS\cms\Databases::BUMP_ON_EDIT}}
|
||||
{{if $row->record_edit_time > 0}}
|
||||
{lang="cms_row_updated_by" htmlsprintf="\IPS\Member::load( $row->record_edit_member_id )->link()"}
|
||||
{{else}}
|
||||
{lang="cms_row_added_by" htmlsprintf="$row->author()->link( NULL, NULL, $row->isAnonymous() )"}
|
||||
{{endif}}
|
||||
{{else}}
|
||||
{{if $row->record_edit_time > 0}}
|
||||
{lang="cms_row_updated_by" htmlsprintf="$row->lastCommenter()->link()"}
|
||||
{{else}}
|
||||
{lang="cms_row_added_by" htmlsprintf="$row->author()->link( NULL, NULL, $row->isAnonymous() )"}
|
||||
{{endif}}
|
||||
{{endif}}
|
||||
</div>
|
||||
<div class='ipsData__last-secondary'>
|
||||
<a href='{$row->url( 'getLastComment' )}' title='{lang="get_last_post"}'>
|
||||
{{if $row->database()->_comment_bump & \IPS\cms\Databases::BUMP_ON_COMMENT}}
|
||||
{{if $row->mapped('num_comments')}}{datetime="$row->mapped('last_comment')"}{{else}}{datetime="$row->mapped('date')"}{{endif}}
|
||||
{{else}}
|
||||
{{if $row->record_edit_time > 0}}{datetime="$row->record_edit_time"}{{else}}{datetime="$row->mapped('date')"}{{endif}}
|
||||
{{endif}}
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
{{else}}
|
||||
{template="userPhoto" app="core" group="global" params="$row->author(), 'tiny'"}
|
||||
<div class='ipsData__last-text'>
|
||||
<div class='ipsData__last-primary'>{$row->author()->link()|raw}</div>
|
||||
<div class='ipsData__last-secondary'>
|
||||
<a href='{$row->url( "getPrefComment" )}'>
|
||||
{datetime="$row->mapped('date')"}
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
{{endif}}
|
||||
|
||||
{{if $row->groupsPosted}}
|
||||
{template="groupPostedBadges" group="global" app="core" location="front" params="$row->groupsPosted, 'topic_posted_in_groups'"}
|
||||
{{endif}}
|
||||
{{if $row::database()->options['reviews'] and $row->averageReviewRating() > 0}}
|
||||
<ul class='ipsRating ipsRating_small'>
|
||||
{{foreach range( 1, \IPS\Settings::i()->reviews_rating_out_of ) as $i}}
|
||||
<li class='{{if $row->averageReviewRating() >= $i}}ipsRating_on{{else}}ipsRating_off{{endif}}'>
|
||||
<i class='fa-solid fa-star'></i>
|
||||
</li>
|
||||
{{endforeach}}
|
||||
</ul>
|
||||
{{elseif $row->container()->allow_rating and $row->rating_value > 0}}
|
||||
{template="rating" group="global" location="front" app="core" params="'small', $row->rating_value, \IPS\Settings::i()->reviews_rating_out_of"}
|
||||
{{endif}}
|
||||
<div class="ipsData__extra">
|
||||
<div class="ipsData__last ipsData__last--author">
|
||||
{template="userPhoto" app="core" group="global" params="$row->author(), 'tiny'"}
|
||||
<div class='ipsData__last-text'>
|
||||
<div class='ipsData__last-primary'>{$row->author()->link( NULL, NULL, $row->isAnonymous() )|raw}</div>
|
||||
<div class='ipsData__last-secondary'>{datetime="$row->mapped('date')"}</div>
|
||||
</div>
|
||||
</div>
|
||||
{{endif}}
|
||||
{{if ($row::database()->options['comments'] or $row::database()->options['reviews'])}}
|
||||
<div class="ipsData__last">
|
||||
{{if $row->mapped('num_comments')}}
|
||||
{template="userPhoto" app="core" group="global" params="$row->lastCommenter(), 'tiny'"}
|
||||
{{else}}
|
||||
{template="userPhoto" app="core" group="global" params="$row->author(), 'tiny'"}
|
||||
{{endif}}
|
||||
<div class='ipsData__last-text'>
|
||||
<div class='ipsData__last-primary'>
|
||||
{{if $row->database()->_comment_bump & \IPS\cms\Databases::BUMP_ON_COMMENT}}
|
||||
{{if $row->mapped('num_comments')}}
|
||||
{{if $row->mapped('last_comment_anon')}}
|
||||
{template="userLink" app="core" group="global" params="$row->author(), NULL, NULL, TRUE"}
|
||||
{{else}}
|
||||
{$row->lastCommenter()->link()|raw}
|
||||
{{endif}}
|
||||
{{else}}
|
||||
{$row->author()->link( NULL, NULL, $row->isAnonymous() )|raw}
|
||||
{{endif}}
|
||||
{{elseif $row->database()->_comment_bump & \IPS\cms\Databases::BUMP_ON_EDIT}}
|
||||
{{if $row->record_edit_time > 0}}
|
||||
{lang="cms_row_updated_by" htmlsprintf="\IPS\Member::load( $row->record_edit_member_id )->link()"}
|
||||
{{else}}
|
||||
{lang="cms_row_added_by" htmlsprintf="$row->author()->link( NULL, NULL, $row->isAnonymous() )"}
|
||||
{{endif}}
|
||||
{{else}}
|
||||
{{if $row->record_edit_time > 0}}
|
||||
{lang="cms_row_updated_by" htmlsprintf="$row->lastCommenter()->link()"}
|
||||
{{else}}
|
||||
{lang="cms_row_added_by" htmlsprintf="$row->author()->link( NULL, NULL, $row->isAnonymous() )"}
|
||||
{{endif}}
|
||||
{{endif}}
|
||||
</div>
|
||||
<div class='ipsData__last-secondary'>
|
||||
<a href='{$row->url( 'getLastComment' )}' title='{lang="get_last_post"}'>
|
||||
{{if $row->database()->_comment_bump & \IPS\cms\Databases::BUMP_ON_COMMENT}}
|
||||
{{if $row->mapped('num_comments')}}{datetime="$row->mapped('last_comment')"}{{else}}{datetime="$row->mapped('date')"}{{endif}}
|
||||
{{else}}
|
||||
{{if $row->record_edit_time > 0}}{datetime="$row->record_edit_time"}{{else}}{datetime="$row->mapped('date')"}{{endif}}
|
||||
{{endif}}
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{endif}}
|
||||
<ul class='ipsData__stats'>
|
||||
{{foreach $row->stats(TRUE) as $k => $v}}
|
||||
<li {{if \in_array( $k, $row->hotStats )}}class="ipsData__stats-hot" data-text='{lang="hot_item"}' data-ipsTooltip title='{lang="hot_item_desc"}'{{endif}} data-statType='{$k}' data-v="{$v}">
|
||||
<span class='ipsData__stats-icon' data-stat-value='{number="$v"}' aria-hidden="true" data-ipstooltip title='{number="$v" format="short"} {lang="{$k}" pluralize="$v" format="short"}'></span>
|
||||
<span class='ipsData__stats-label'>{number="$v"} {lang="content_records_stat_{$k}" pluralize="$v"}</span>
|
||||
</li>
|
||||
{{endforeach}}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
{{if $table and $table->canModerate()}}
|
||||
<div class='ipsData__mod'>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<javascript app="cms">
|
||||
<file javascript_app="cms" javascript_location="admin" javascript_path="controllers/blocks" javascript_name="ips.blocks.form.js" javascript_type="controller" javascript_version="5000029" javascript_position="1000100"><![CDATA[/**
|
||||
<file javascript_app="cms" javascript_location="admin" javascript_path="controllers/blocks" javascript_name="ips.blocks.form.js" javascript_type="controller" javascript_version="5000030" javascript_position="1000100"><![CDATA[/**
|
||||
* Invision Community
|
||||
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
|
||||
*
|
||||
@@ -67,15 +67,14 @@
|
||||
}
|
||||
});
|
||||
}(jQuery, _));]]></file>
|
||||
<file javascript_app="cms" javascript_location="front" javascript_path="controllers/blocks" javascript_name="ips.blocks.navigation.js" javascript_type="controller" javascript_version="5000029" javascript_position="1000050"><![CDATA[/*
|
||||
+--------------------------------------------------------------------------
|
||||
|
|
||||
| =============================================
|
||||
| by Esther Eisner
|
||||
| 1/3/2024 3:35 PM
|
||||
| esther@headstandconsulting.com
|
||||
+--------------------------------------------------------------------------
|
||||
*/
|
||||
<file javascript_app="cms" javascript_location="front" javascript_path="controllers/blocks" javascript_name="ips.blocks.navigation.js" javascript_type="controller" javascript_version="5000030" javascript_position="1000050"><![CDATA[/**
|
||||
* Invision Community
|
||||
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
|
||||
*
|
||||
* ips.blocks.navigation.js
|
||||
*
|
||||
* Author: Esther Eisner
|
||||
*/
|
||||
|
||||
;(function ($, _, undefined) {
|
||||
|
||||
@@ -112,7 +111,7 @@
|
||||
|
||||
});
|
||||
}(jQuery, _));]]></file>
|
||||
<file javascript_app="cms" javascript_location="admin" javascript_path="controllers/databases" javascript_name="ips.databases.download.js" javascript_type="controller" javascript_version="5000029" javascript_position="1000150">/**
|
||||
<file javascript_app="cms" javascript_location="admin" javascript_path="controllers/databases" javascript_name="ips.databases.download.js" javascript_type="controller" javascript_version="5000030" javascript_position="1000150">/**
|
||||
* Invision Community
|
||||
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
|
||||
*
|
||||
@@ -157,7 +156,7 @@
|
||||
}
|
||||
});
|
||||
}(jQuery, _));</file>
|
||||
<file javascript_app="cms" javascript_location="admin" javascript_path="controllers/databases" javascript_name="ips.databases.form.js" javascript_type="controller" javascript_version="5000029" javascript_position="1000150"><![CDATA[/**
|
||||
<file javascript_app="cms" javascript_location="admin" javascript_path="controllers/databases" javascript_name="ips.databases.form.js" javascript_type="controller" javascript_version="5000030" javascript_position="1000150"><![CDATA[/**
|
||||
* Invision Community
|
||||
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
|
||||
*
|
||||
@@ -233,7 +232,7 @@
|
||||
}
|
||||
});
|
||||
}(jQuery, _));]]></file>
|
||||
<file javascript_app="cms" javascript_location="front" javascript_path="controllers/external" javascript_name="ips.external.communication.js" javascript_type="controller" javascript_version="5000029" javascript_position="1000150"><![CDATA[/**
|
||||
<file javascript_app="cms" javascript_location="front" javascript_path="controllers/external" javascript_name="ips.external.communication.js" javascript_type="controller" javascript_version="5000030" javascript_position="1000150"><![CDATA[/**
|
||||
* Invision Community
|
||||
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
|
||||
*
|
||||
@@ -368,7 +367,7 @@
|
||||
}
|
||||
});
|
||||
}(jQuery, _));]]></file>
|
||||
<file javascript_app="cms" javascript_location="admin" javascript_path="controllers/fields" javascript_name="ips.fields.form.js" javascript_type="controller" javascript_version="5000029" javascript_position="1000200"><![CDATA[/**
|
||||
<file javascript_app="cms" javascript_location="admin" javascript_path="controllers/fields" javascript_name="ips.fields.form.js" javascript_type="controller" javascript_version="5000030" javascript_position="1000200"><![CDATA[/**
|
||||
* Invision Community
|
||||
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
|
||||
*
|
||||
@@ -395,11 +394,38 @@
|
||||
if (!(form instanceof HTMLFormElement)) {
|
||||
return;
|
||||
}
|
||||
const showMapActive = !!form.querySelector('select[name="field_type"] option[value="Address"]')?.selected;
|
||||
const typeSelector = form.querySelector('select[name="field_type"]');
|
||||
const showMapActive = typeSelector?.value?.toLowerCase() === 'address';
|
||||
const mapEl = form.querySelectorAll('#field_show_map_listing,#field_show_map_display');
|
||||
if (mapEl && !showMapActive) {
|
||||
mapEl.forEach(el => e.detail.togglesOff.add(el));
|
||||
}
|
||||
|
||||
// for these, several of the listing/display format options don't apply
|
||||
if (typeSelector?.value?.match(/^(youtube|spotify|soundcloud)$/i)) {
|
||||
form
|
||||
.querySelectorAll("#field_display_listing_json_badge, #field_display_listing_badge_bgcolor, #field_display_listing_badge_color, #field_display_display_json_badge, #field_display_display_badge_bgcolor, #field_display_display_badge_color, #field_display_display_json_where")
|
||||
.forEach(el => {
|
||||
e.detail.togglesOff.add(el);
|
||||
e.detail.togglesOn.delete(el);
|
||||
});
|
||||
} else {
|
||||
form
|
||||
.querySelectorAll("#media_display_listing_method, #media_display_display_method")
|
||||
.forEach(el => {
|
||||
e.detail.togglesOff.add(el);
|
||||
e.detail.togglesOn.delete(el);
|
||||
});
|
||||
}
|
||||
|
||||
// field_truncate is an exception where there are two togglers; in this case we just target the "Show in listing template" one
|
||||
const fieldTruncate = form.querySelector('#field_truncate');
|
||||
if (fieldTruncate) {
|
||||
if (form.querySelector('#check_field_display_listing') && !form.querySelector('#check_field_display_listing').checked) {
|
||||
e.detail.togglesOff.add(fieldTruncate);
|
||||
e.detail.togglesOn.delete(fieldTruncate);
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
@@ -431,7 +457,7 @@
|
||||
}
|
||||
});
|
||||
}(jQuery, _));]]></file>
|
||||
<file javascript_app="cms" javascript_location="admin" javascript_path="controllers/media" javascript_name="ips.media.main.js" javascript_type="controller" javascript_version="5000029" javascript_position="1000300"><![CDATA[/**
|
||||
<file javascript_app="cms" javascript_location="admin" javascript_path="controllers/media" javascript_name="ips.media.main.js" javascript_type="controller" javascript_version="5000030" javascript_position="1000300"><![CDATA[/**
|
||||
* Invision Community
|
||||
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
|
||||
*
|
||||
@@ -1071,7 +1097,7 @@
|
||||
}
|
||||
});
|
||||
}(jQuery, _));]]></file>
|
||||
<file javascript_app="cms" javascript_location="admin" javascript_path="controllers/pages" javascript_name="ips.pages.embed.js" javascript_type="controller" javascript_version="5000029" javascript_position="1000250"><![CDATA[/**
|
||||
<file javascript_app="cms" javascript_location="admin" javascript_path="controllers/pages" javascript_name="ips.pages.embed.js" javascript_type="controller" javascript_version="5000030" javascript_position="1000250"><![CDATA[/**
|
||||
* Invision Community
|
||||
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
|
||||
*
|
||||
@@ -1106,7 +1132,7 @@
|
||||
}
|
||||
});
|
||||
}(jQuery, _));]]></file>
|
||||
<file javascript_app="cms" javascript_location="admin" javascript_path="controllers/pages" javascript_name="ips.pages.form.js" javascript_type="controller" javascript_version="5000029" javascript_position="1000250"><![CDATA[/**
|
||||
<file javascript_app="cms" javascript_location="admin" javascript_path="controllers/pages" javascript_name="ips.pages.form.js" javascript_type="controller" javascript_version="5000030" javascript_position="1000250"><![CDATA[/**
|
||||
* Invision Community
|
||||
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
|
||||
*
|
||||
@@ -1228,7 +1254,7 @@
|
||||
}
|
||||
});
|
||||
}(jQuery, _));]]></file>
|
||||
<file javascript_app="cms" javascript_location="front" javascript_path="controllers/records" javascript_name="ips.records.form.js" javascript_type="controller" javascript_version="5000029" javascript_position="1000100"><![CDATA[/**
|
||||
<file javascript_app="cms" javascript_location="front" javascript_path="controllers/records" javascript_name="ips.records.form.js" javascript_type="controller" javascript_version="5000030" javascript_position="1000100"><![CDATA[/**
|
||||
* Invision Community
|
||||
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
|
||||
*
|
||||
@@ -1340,7 +1366,7 @@
|
||||
}
|
||||
});
|
||||
}(jQuery, _));]]></file>
|
||||
<file javascript_app="cms" javascript_location="front" javascript_path="controllers/records" javascript_name="ips.records.revisions.js" javascript_type="controller" javascript_version="5000029" javascript_position="1000100">/**
|
||||
<file javascript_app="cms" javascript_location="front" javascript_path="controllers/records" javascript_name="ips.records.revisions.js" javascript_type="controller" javascript_version="5000030" javascript_position="1000100">/**
|
||||
* Invision Community
|
||||
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
|
||||
*
|
||||
@@ -1395,7 +1421,7 @@
|
||||
}
|
||||
});
|
||||
}(jQuery, _));</file>
|
||||
<file javascript_app="cms" javascript_location="admin" javascript_path="controllers/templates" javascript_name="ips.templates.addForm.js" javascript_type="controller" javascript_version="5000029" javascript_position="1000050">/**
|
||||
<file javascript_app="cms" javascript_location="admin" javascript_path="controllers/templates" javascript_name="ips.templates.addForm.js" javascript_type="controller" javascript_version="5000030" javascript_position="1000050">/**
|
||||
* Invision Community
|
||||
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
|
||||
*
|
||||
@@ -1445,7 +1471,7 @@
|
||||
}
|
||||
});
|
||||
}(jQuery, _));</file>
|
||||
<file javascript_app="cms" javascript_location="admin" javascript_path="controllers/templates" javascript_name="ips.templates.conflict.js" javascript_type="controller" javascript_version="5000029" javascript_position="1000050">/**
|
||||
<file javascript_app="cms" javascript_location="admin" javascript_path="controllers/templates" javascript_name="ips.templates.conflict.js" javascript_type="controller" javascript_version="5000030" javascript_position="1000050">/**
|
||||
* Invision Community
|
||||
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
|
||||
*
|
||||
@@ -1517,7 +1543,7 @@
|
||||
}
|
||||
});
|
||||
}(jQuery, _));</file>
|
||||
<file javascript_app="cms" javascript_location="admin" javascript_path="controllers/templates" javascript_name="ips.templates.fileEditor.js" javascript_type="controller" javascript_version="5000029" javascript_position="1000050"><![CDATA[/**
|
||||
<file javascript_app="cms" javascript_location="admin" javascript_path="controllers/templates" javascript_name="ips.templates.fileEditor.js" javascript_type="controller" javascript_version="5000030" javascript_position="1000050"><![CDATA[/**
|
||||
* Invision Community
|
||||
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
|
||||
*
|
||||
@@ -2478,7 +2504,7 @@
|
||||
}
|
||||
});
|
||||
}(jQuery, _));]]></file>
|
||||
<file javascript_app="cms" javascript_location="admin" javascript_path="controllers/templates" javascript_name="ips.templates.fileList.js" javascript_type="controller" javascript_version="5000029" javascript_position="1000050"><![CDATA[/**
|
||||
<file javascript_app="cms" javascript_location="admin" javascript_path="controllers/templates" javascript_name="ips.templates.fileList.js" javascript_type="controller" javascript_version="5000030" javascript_position="1000050"><![CDATA[/**
|
||||
* Invision Community
|
||||
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
|
||||
*
|
||||
@@ -2770,7 +2796,7 @@
|
||||
}
|
||||
});
|
||||
}(jQuery, _));]]></file>
|
||||
<file javascript_app="cms" javascript_location="admin" javascript_path="controllers/templates" javascript_name="ips.templates.main.js" javascript_type="controller" javascript_version="5000029" javascript_position="1000050"><![CDATA[/**
|
||||
<file javascript_app="cms" javascript_location="admin" javascript_path="controllers/templates" javascript_name="ips.templates.main.js" javascript_type="controller" javascript_version="5000030" javascript_position="1000050"><![CDATA[/**
|
||||
* Invision Community
|
||||
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
|
||||
*
|
||||
@@ -2939,7 +2965,7 @@
|
||||
|
||||
});
|
||||
}(jQuery, _));]]></file>
|
||||
<file javascript_app="cms" javascript_location="admin" javascript_path="controllers/templates" javascript_name="ips.templates.variablesDialog.js" javascript_type="controller" javascript_version="5000029" javascript_position="1000050">/**
|
||||
<file javascript_app="cms" javascript_location="admin" javascript_path="controllers/templates" javascript_name="ips.templates.variablesDialog.js" javascript_type="controller" javascript_version="5000030" javascript_position="1000050">/**
|
||||
* Invision Community
|
||||
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
|
||||
*
|
||||
@@ -2984,7 +3010,7 @@
|
||||
}
|
||||
});
|
||||
}(jQuery, _));</file>
|
||||
<file javascript_app="cms" javascript_location="admin" javascript_path="templates" javascript_name="ips.templates.media.js" javascript_type="template" javascript_version="5000029" javascript_position="1000050"><![CDATA[ips.templates.set( 'templates.media.grid', "\
|
||||
<file javascript_app="cms" javascript_location="admin" javascript_path="templates" javascript_name="ips.templates.media.js" javascript_type="template" javascript_version="5000030" javascript_position="1000050"><![CDATA[ips.templates.set( 'templates.media.grid', "\
|
||||
<ul class='ipsGrid ipsGrid--pages-media'>\
|
||||
{{{contents}}}\
|
||||
</ul>\
|
||||
@@ -3001,7 +3027,7 @@ ips.templates.set( 'templates.media.noSearchResults', "\
|
||||
{{#lang}}mediaNoResults{{/lang}}\
|
||||
</div>\
|
||||
");]]></file>
|
||||
<file javascript_app="cms" javascript_location="admin" javascript_path="templates" javascript_name="ips.templates.templates.js" javascript_type="template" javascript_version="5000029" javascript_position="1000050"><![CDATA[/* TEMPLATE EDITOR TEMPLATES */
|
||||
<file javascript_app="cms" javascript_location="admin" javascript_path="templates" javascript_name="ips.templates.templates.js" javascript_type="template" javascript_version="5000030" javascript_position="1000050"><![CDATA[/* TEMPLATE EDITOR TEMPLATES */
|
||||
/* TEMPLATECEPTION */
|
||||
ips.templates.set('templates.editor.newTab', " \
|
||||
<li data-fileid='{{fileid}}' data-location='{{location}}'>\
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<language>
|
||||
<app key="cms" version="5000029">
|
||||
<app key="cms" version="5000030">
|
||||
<word key="__app_cms" js="0">Pages</word>
|
||||
<word key="menutab__cms" js="0">Pages</word>
|
||||
<word key="menutab__cms_icon" js="0">file</word>
|
||||
@@ -229,8 +229,8 @@
|
||||
<word key="block_template_theme_import" js="0">Theme set</word>
|
||||
<word key="template_database_group" js="0">Type</word>
|
||||
<word key="cms_new_db_template_group_listing" js="0">Record Listing (Shown when clicking a category)</word>
|
||||
<word key="cms_new_db_template_group_index" js="0">Featured Records (First page when viewing a database set to show featured articles)</word>
|
||||
<word key="cms_new_db_template_group_categories" js="0">Category List (First page when viewing a database)</word>
|
||||
<word key="cms_new_db_template_group_index" js="0">Index (First page when viewing a database)</word>
|
||||
<word key="cms_new_db_template_group_categories" js="0">Category List (Shows all available database categories)</word>
|
||||
<word key="cms_new_db_template_group_display" js="0">Record (Displays the record and comments)</word>
|
||||
<word key="cms_new_db_template_group_form" js="0">Record Form (Used when adding/editing a record)</word>
|
||||
<word key="database_template_type" js="0">Template Type</word>
|
||||
|
||||
@@ -596,5 +596,6 @@
|
||||
"5000026": "5.0.0 Beta 1",
|
||||
"5000027": "5.0.0 Beta 2",
|
||||
"5000028": "5.0.0 Beta 2",
|
||||
"5000029": "5.0.0 Beta 3"
|
||||
"5000029": "5.0.0 Beta 3",
|
||||
"5000030": "5.0.0 Beta 4"
|
||||
}
|
||||
@@ -127,8 +127,19 @@ class Widgets extends EditorLocationsAbstract
|
||||
$pageId = NULL;
|
||||
foreach( Db::i()->select( '*', 'cms_page_widget_areas' ) as $item )
|
||||
{
|
||||
$areaData = json_decode( $item['area_tree'], TRUE );
|
||||
$area = new Area( $areaData, $item['area_area'] );
|
||||
if( $item['area_tree'] )
|
||||
{
|
||||
$area = new Area( json_decode( $item['area_tree'], true ), $item['area_area'] );
|
||||
}
|
||||
elseif( $item['area_widgets'] )
|
||||
{
|
||||
$area = Area::create( $item['area_area'], json_decode( $item['area_widgets'], true ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
foreach( $area->getAllWidgets() as $widget )
|
||||
{
|
||||
if ( $widget['unique'] == $uniqueId )
|
||||
@@ -154,7 +165,7 @@ class Widgets extends EditorLocationsAbstract
|
||||
{
|
||||
if( $row['tree'] )
|
||||
{
|
||||
$area = new Area( json_decode( $row['area_tree'], true ), $row['area'] );
|
||||
$area = new Area( json_decode( $row['tree'], true ), $row['area'] );
|
||||
}
|
||||
elseif( $row['widgets'] )
|
||||
{
|
||||
|
||||
@@ -35,7 +35,7 @@ if ( isset( Request::i()->file ) )
|
||||
}
|
||||
|
||||
$file = file_get_contents( \IPS\ROOT_PATH . '/themes/' . Request::i()->file );
|
||||
|
||||
Output::i()->pageCaching = FALSE;
|
||||
|
||||
Output::setCacheTime( false );
|
||||
Output::i()->sendOutput( preg_replace( '#<ips:template.+?\n#', '', $file ), 200, ( mb_substr( Request::i()->file, -4 ) === '.css' ) ? 'text/css' : 'text/javascript' );
|
||||
}
|
||||
+1
-1
@@ -50,7 +50,7 @@ catch(OutOfRangeException $ex ){}
|
||||
|
||||
if( !$cache OR !Settings::i()->widget_cache_ttl )
|
||||
{
|
||||
Output::i()->pageCaching = FALSE;
|
||||
Output::setCacheTime( false );
|
||||
$headers = array();
|
||||
}
|
||||
else
|
||||
|
||||
@@ -13,6 +13,7 @@ namespace IPS\cms\modules\admin\databases;
|
||||
|
||||
/* To prevent PHP errors (extending class does not exist) revealing path */
|
||||
|
||||
use Cassandra\Set;
|
||||
use Exception;
|
||||
use InvalidArgumentException;
|
||||
use IPS\Application;
|
||||
@@ -764,7 +765,25 @@ class databases extends Controller
|
||||
/* Perms */
|
||||
$existingPerms = $category->permissions();
|
||||
|
||||
Db::i()->update( 'core_permission_index', array_merge( $perms, array( 'perm_id' => $existingPerms['perm_id'], 'perm_type_id' => $category->id ) ), array( 'perm_id=?', $existingPerms['perm_id'] ) );
|
||||
/* Make sure these are at least visible */
|
||||
if( $category->has_perms )
|
||||
{
|
||||
if( !isset( $perms['perm_view'] ) or empty( $perms['perm_view'] ) )
|
||||
{
|
||||
$perms['perm_view'] = '*';
|
||||
}
|
||||
if( !isset( $perms['perm_2'] ) or empty( $perms['perm_2'] ) )
|
||||
{
|
||||
$perms['perm_2'] = Settings::i()->admin_group;
|
||||
}
|
||||
if( !isset( $perms['perm_3'] ) or empty( $perms['perm_3'] ) )
|
||||
{
|
||||
$perms['perm_3'] = Settings::i()->admin_group;
|
||||
}
|
||||
|
||||
Db::i()->update( 'core_permission_index', array_merge( $perms, array( 'perm_id' => $existingPerms['perm_id'], 'perm_type_id' => $category->id ) ), array( 'perm_id=?', $existingPerms['perm_id'] ) );
|
||||
}
|
||||
|
||||
$next = 'template';
|
||||
$doneSomething = true;
|
||||
break;
|
||||
@@ -1030,7 +1049,7 @@ class databases extends Controller
|
||||
|
||||
/* Custom fields */
|
||||
$textFields = array( 'field_extra', 'field_default_value', 'field_name', 'field_description', 'field_display_json', 'field_validator_error' );
|
||||
$removeFields = array( 'field_database_id' );
|
||||
$removeFields = array( 'field_database_id', 'perm_id', 'perm_type', 'perm_type_id' );
|
||||
$fieldSchema = $schema['cms_database_fields'];
|
||||
foreach ( Db::i()->select( 'f.*, w.word_custom as field_name, w2.word_custom as field_description, w3.word_custom as field_validator_error, p.*', array('cms_database_fields', 'f'), array( 'field_database_id=?', $database->id ) )
|
||||
->join( array( 'core_sys_lang_words', 'w' ), "w.word_key=CONCAT( 'content_field_', f.field_id ) and w.lang_id=" . Lang::defaultLanguage() )
|
||||
@@ -1044,7 +1063,7 @@ class databases extends Controller
|
||||
|
||||
foreach( $row as $k => $v )
|
||||
{
|
||||
if ( array_key_exists( $k, $fieldSchema['columns'] ) AND ! in_array( $k, $removeFields ) AND ! in_array( $k, $textFields ) )
|
||||
if ( !in_array( $k, $removeFields ) AND !in_array( $k, $textFields ) and ( mb_substr( $k, 0, 5 ) == 'perm_' or array_key_exists( $k, $fieldSchema['columns'] ) ) )
|
||||
{
|
||||
$xml->startAttribute( $k );
|
||||
$xml->text( $v ?? '' );
|
||||
@@ -1078,7 +1097,7 @@ class databases extends Controller
|
||||
$textFields = array( 'category_name', 'category_description', 'category_meta_keywords', 'category_meta_description', 'category_page_title' );
|
||||
$removeFields = array( 'category_database_id', 'category_last_record_id', 'category_last_record_date', 'category_last_record_member', 'category_last_record_name', 'category_last_record_seo_name', 'category_records', 'category_record_comments',
|
||||
'category_record_comments_queued', 'category_rss_cache', 'category_rss_cached', 'category_rss_exclude', 'category_forum_override', 'category_forum_record', 'category_forum_comments', 'category_forum_delete', 'category_forum_suffix', 'category_forum_prefix',
|
||||
'category_forum_forum', 'category_full_path', 'category_last_title', 'category_last_seo_title');
|
||||
'category_forum_forum', 'category_full_path', 'category_last_title', 'category_last_seo_title', 'perm_id', 'perm_type_id', 'perm_type' );
|
||||
$categorySchema = $schema['cms_database_categories'];
|
||||
foreach ( Db::i()->select( 'c.*, w.word_custom as category_name, w2.word_custom as category_description, p.*', array('cms_database_categories', 'c'), array( 'category_database_id=?', $database->id ) )
|
||||
->join( array( 'core_sys_lang_words', 'w' ), "w.word_key=CONCAT( 'content_cat_name_', c.category_id ) and w.lang_id=" . Lang::defaultLanguage() )
|
||||
@@ -1091,7 +1110,8 @@ class databases extends Controller
|
||||
|
||||
foreach( $row as $k => $v )
|
||||
{
|
||||
if ( array_key_exists( $k, $categorySchema['columns'] ) AND ! in_array( $k, $removeFields ) AND ! in_array( $k, $textFields ) )
|
||||
|
||||
if ( !in_array( $k, $removeFields ) AND !in_array( $k, $textFields ) and ( mb_substr( $k, 0, 5 ) == 'perm_' or array_key_exists( $k, $categorySchema['columns'] ) ) )
|
||||
{
|
||||
$xml->startAttribute( $k );
|
||||
$xml->text( $v ?? '' );
|
||||
@@ -1655,7 +1675,7 @@ class databases extends Controller
|
||||
0 => 'database_use_categories_no'
|
||||
),
|
||||
'toggles' => array(
|
||||
1 => array( 'database_allow_club_categories' ),
|
||||
1 => array( 'database_categories_layout' ),
|
||||
0 => array( 'category_allow_rating', 'category_can_view_others' )
|
||||
),
|
||||
'disabled' => $disabled
|
||||
@@ -1675,7 +1695,7 @@ class databases extends Controller
|
||||
1 => 'database_allow_club_categories_yes',
|
||||
),
|
||||
'disabled' => ( $current?->allow_club_categories and $current->numberOfClubCategories() ),
|
||||
) ) );
|
||||
), null, null, null, 'database_allow_club_categories' ) );
|
||||
}
|
||||
|
||||
Member::loggedIn()->language()->words['category_can_view_others_desc'] = Member::loggedIn()->language()->addToStack('category_can_view_others_database_desc');
|
||||
@@ -1813,7 +1833,7 @@ class databases extends Controller
|
||||
'options' => ( count( $templatesCat ) ? array_merge( $layouts, $custom ) : $layouts ),
|
||||
'toggles' => [ 'custom' => [ 'database_template_categories' ] ],
|
||||
'disabled' => ( count( $templatesCat ) ? null : [ 'custom' ] )
|
||||
] ) );
|
||||
], null, null, null, 'database_categories_layout' ) );
|
||||
if( count( $templatesCat ) )
|
||||
{
|
||||
$form->add( new Select( 'database_template_categories', ( ! empty( $current ) and $current->display_settings['categories']['layout'] == 'custom' ) ? $current->display_settings['categories']['template'] : NULL, null, array( 'options' => $templatesCat ), NULL, NULL, Theme::i()->getTemplate( 'databases', 'cms' )->templateGoButton('database_template_categories'), 'database_template_categories' ) );
|
||||
|
||||
@@ -160,7 +160,7 @@ class ajax extends Controller
|
||||
'template_key' => $template->key,
|
||||
'template_title' => $template->title,
|
||||
'template_desc' => $template->desc,
|
||||
'template_content' => ( isset( Request::i()->noencode ) AND Request::i()->noencode ) ? $template->content : htmlentities( $template->content, ENT_DISALLOWED, 'UTF-8' ),
|
||||
'template_content' => ( isset( Request::i()->noencode ) AND Request::i()->noencode ) ? ( $template->content ?? '' ) : htmlentities( ( $template->content ?? '' ), ENT_DISALLOWED, 'UTF-8' ),
|
||||
'template_location' => $template->location,
|
||||
'template_group' => $template->group,
|
||||
'template_container' => $template->container,
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"id": 5000030,
|
||||
"name": "5.0.0 Beta 4",
|
||||
"steps": {
|
||||
"queries": false,
|
||||
"lang": true,
|
||||
"theme": false,
|
||||
"themeeditor": false,
|
||||
"javascript": true,
|
||||
"emailTemplates": false,
|
||||
"acpSearchKeywords": false,
|
||||
"settings": false,
|
||||
"tasks": false,
|
||||
"modules": false,
|
||||
"widgets": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"files": {
|
||||
"added": [],
|
||||
"edited": [
|
||||
"cms\/front\/controllers\/blocks\/ips.blocks.navigation.js",
|
||||
"cms\/admin\/controllers\/fields\/ips.fields.form.js"
|
||||
],
|
||||
"removed": []
|
||||
},
|
||||
"orders": {
|
||||
"added": [],
|
||||
"edited": [],
|
||||
"removed": []
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"normal": {
|
||||
"added": [],
|
||||
"edited": [
|
||||
"cms_new_db_template_group_index",
|
||||
"cms_new_db_template_group_categories"
|
||||
],
|
||||
"removed": []
|
||||
},
|
||||
"js": {
|
||||
"added": [],
|
||||
"edited": [],
|
||||
"removed": []
|
||||
}
|
||||
}
|
||||
@@ -463,6 +463,26 @@ class Categories extends Model implements Permissions
|
||||
|
||||
return parent::roots( $permissionCheck, $member, $where, $limit );
|
||||
}
|
||||
|
||||
/**
|
||||
* Fetch All Root Nodes
|
||||
*
|
||||
* @param string|null $permissionCheck The permission key to check for or NULl to not check permissions
|
||||
* @param Member|null $member The member to check permissions for or NULL for the currently logged in member
|
||||
* @param mixed $where Additional WHERE clause
|
||||
* @param string|null $order ORDER BY clause
|
||||
* @param array|null $limit Limit/offset to use, or NULL for no limit (default)
|
||||
* @return array
|
||||
*/
|
||||
protected static function nodesWithPermission( ?string $permissionCheck, ?Member $member, mixed $where=array(), string $order=NULL, array $limit=NULL ): array
|
||||
{
|
||||
if( static::$customDatabaseId !== null )
|
||||
{
|
||||
$where[] = array( 'category_database_id=?', static::$customDatabaseId );
|
||||
}
|
||||
|
||||
return parent::nodesWithPermission( $permissionCheck, $member, $where, $order, $limit );
|
||||
}
|
||||
|
||||
/**
|
||||
* [Node] Fetch Child Nodes
|
||||
|
||||
@@ -186,12 +186,16 @@ class Dispatcher extends SystemDispatcher
|
||||
Output::i()->error( 'page_doesnt_exist', '2T251/2', 404 );
|
||||
}
|
||||
|
||||
$path = trim( preg_replace( '#' . Page::$currentPage->full_path . '#', '', Request::i()->path, 1 ), '/' );
|
||||
|
||||
/* If we visited the default page in a folder, the full_path will be like folder/page but the request path will just be folder */
|
||||
if( Request::i()->path . '/' . Page::$currentPage->seo_name == Page::$currentPage->full_path )
|
||||
$path = '';
|
||||
if( isset( Request::i()->path ) )
|
||||
{
|
||||
$path = '';
|
||||
$path = trim( preg_replace( '#' . Page::$currentPage->full_path . '#', '', Request::i()->path, 1 ), '/' );
|
||||
|
||||
/* If we visited the default page in a folder, the full_path will be like folder/page but the request path will just be folder */
|
||||
if( Request::i()->path . '/' . Page::$currentPage->seo_name == Page::$currentPage->full_path )
|
||||
{
|
||||
$path = '';
|
||||
}
|
||||
}
|
||||
|
||||
list( $path, $pageNumber ) = Page::getStrippedPagePath( $path );
|
||||
|
||||
@@ -969,16 +969,38 @@ class Fields extends CustomField implements Permissions
|
||||
{
|
||||
foreach( $value as $idx => $val )
|
||||
{
|
||||
if ( $val instanceof FileSystem )
|
||||
if ( $val instanceof File )
|
||||
{
|
||||
$value[ $idx ] = (string) $val->url;
|
||||
$fileKey = Encrypt::fromPlaintext( (string) $val )->tag();
|
||||
$downloadUrl = Url::internal( 'applications/core/interface/file/cfield.php', 'none' )->setqueryString( array(
|
||||
'storage' => $val->storageExtension,
|
||||
'path' => $val->originalFilename,
|
||||
'fileKey' => $fileKey
|
||||
) );
|
||||
|
||||
$value[ $idx ] = Theme::i()->getTemplate( 'global', 'cms', 'front' )->uploadDisplay( File::get( static::$uploadStorageExtension, $val ), $record, $downloadUrl, $fileKey );
|
||||
}
|
||||
}
|
||||
}
|
||||
else if ( $value instanceof FileSystem )
|
||||
else if ( $value instanceof File )
|
||||
{
|
||||
$value = (string) $value->url;
|
||||
$fileKey = Encrypt::fromPlaintext( (string) $value )->tag();
|
||||
$downloadUrl = Url::internal( 'applications/core/interface/file/cfield.php', 'none' )->setqueryString( array(
|
||||
'storage' => $value->storageExtension,
|
||||
'path' => $value->originalFilename,
|
||||
'fileKey' => $fileKey
|
||||
) );
|
||||
|
||||
$value = Theme::i()->getTemplate( 'global', 'cms', 'front' )->uploadDisplay( File::get( static::$uploadStorageExtension, $value ), $record, $downloadUrl, $fileKey );
|
||||
}
|
||||
|
||||
/* Restructure formValue so that it has the full URL */
|
||||
$updatedFormValue = [];
|
||||
foreach( explode( ",", $formValue ) as $val )
|
||||
{
|
||||
$updatedFormValue[] = File::get( static::$uploadStorageExtension, $val )->url;
|
||||
}
|
||||
$formValue = implode( ",", $updatedFormValue );
|
||||
}
|
||||
if ( ! isset( Store::i()->$functionName ) )
|
||||
{
|
||||
@@ -2235,7 +2257,7 @@ class Fields extends CustomField implements Permissions
|
||||
if ( ! $isTitleOrContent )
|
||||
{
|
||||
$form->add( new YesNo( 'field_display_listing', $this->id ? $this->display_listing : 1, FALSE, array(
|
||||
'togglesOn' => array('field_truncate', 'field_display_listing_json_badge', 'field_show_map_listing' )
|
||||
'togglesOn' => array('field_display_listing_json_badge', 'field_show_map_listing', 'media_display_listing_method' )
|
||||
), NULL, NULL, NULL, 'field_display_listing' ) );
|
||||
}
|
||||
|
||||
@@ -2277,7 +2299,7 @@ class Fields extends CustomField implements Permissions
|
||||
if ( ! $isTitleOrContent )
|
||||
{
|
||||
$form->add( new YesNo( 'field_display_display', $this->id ? $this->display_display : 1, FALSE, array(
|
||||
'togglesOn' => array( 'field_display_display_json_badge', 'field_show_map_display', 'field_display_display_json_where' )
|
||||
'togglesOn' => array( 'field_display_display_json_badge', 'field_show_map_display', 'field_display_display_json_where', 'media_display_display_method' )
|
||||
), NULL, NULL, NULL, 'field_display_display' ) );
|
||||
}
|
||||
|
||||
|
||||
@@ -182,13 +182,14 @@ class CommentTopicSync extends Comment
|
||||
/**
|
||||
* Report
|
||||
*
|
||||
* @param string $reportContent Report content message from member
|
||||
* @param int $reportType Report type (see constants in \IPS\core\Reports\Report
|
||||
* @param Member|null $member Member making the report (or NULL for loggedIn())
|
||||
* @return Report
|
||||
* @throws UnexpectedValueException If there is a permission error - you should only call this method after checking canReport
|
||||
* @param string $reportContent Report content message from member
|
||||
* @param int $reportType Report type (see constants in \IPS\core\Reports\Report)
|
||||
* @param \IPS\Member|NULL $member Member making the report (or NULL for loggedIn())
|
||||
* @param array $guestDetails Details for a guest report
|
||||
* @return \IPS\core\Reports\Report
|
||||
* @throws UnexpectedValueException If there is a permission error - you should only call this method after checking canReport
|
||||
*/
|
||||
public function report( string $reportContent, int $reportType=1, Member|null $member=null ): Report
|
||||
public function report( string $reportContent, int $reportType=1, Member|null $member=null, array $guestDetails=array() ): Report
|
||||
{
|
||||
$comment = Post::load( $this->pid );
|
||||
return $comment->report( $reportContent, $reportType, $member );
|
||||
|
||||
@@ -56,6 +56,11 @@ class Database extends Widget
|
||||
* @brief Set to true if this widget must be the only one in its area
|
||||
*/
|
||||
public bool $soloWidget = true;
|
||||
|
||||
/**
|
||||
* @brief If a widget should not be dropped into a particular area (e.g. a database widget in the header), list those areas here
|
||||
*/
|
||||
public static array $disallowedAreas = [ 'header', 'footer', 'sidebar', 'globalfooter' ];
|
||||
|
||||
/**
|
||||
* Specify widget configuration
|
||||
|
||||
Reference in new issue
Block a user