Version 4.1.2
This commit is contained in:
1 parent
3ba79295ee
commit
28bd025b35
1131 files changed
+63658
-20579
No files matched your search
@@ -49,6 +49,6 @@ class _Application extends \IPS\Application
|
||||
*/
|
||||
protected function get__icon()
|
||||
{
|
||||
return 'file-text-o';
|
||||
return 'file-text';
|
||||
}
|
||||
}
|
||||
@@ -1,16 +1,16 @@
|
||||
{
|
||||
"blogs": {
|
||||
"blogs": {
|
||||
"tab": "community",
|
||||
"controller": "blogs",
|
||||
"do": "",
|
||||
"restriction": "blogs_manage"
|
||||
},
|
||||
"settings": {
|
||||
"tab": "community",
|
||||
"controller": "settings",
|
||||
"do": "",
|
||||
"restriction": "settings_manage"
|
||||
},
|
||||
"blogs": {
|
||||
"tab": "community",
|
||||
"controller": "blogs",
|
||||
"do": "",
|
||||
"restriction": "blogs_manage"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,9 +1,9 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<emails><template><template_app>blog</template_app><template_name>digests__item</template_name><template_content_html><![CDATA[<tr style='border-bottom: 1px solid #eeeeee'>
|
||||
<td width='40' align='center' valign='top' class=' '>
|
||||
<td dir='{dir}' width='40' align='center' valign='top' class=' '>
|
||||
<img src='{$entry->author()->photo}' width='32' height='32' style='border: 1px solid #000; vertical-align: middle;'>
|
||||
</td>
|
||||
<td align='left'>
|
||||
<td dir='{dir}' align='left'>
|
||||
<p style='font-family: "Helvetica Neue", helvetica, sans-serif; margin: 0; font-size: 13px; font-weight: bold'>
|
||||
{$email->language->addToStack("x_created_entry_in", FALSE, array( 'sprintf' => array( $entry->author()->name, $entry->container()->_title ) ) )}
|
||||
</p>
|
||||
@@ -27,10 +27,10 @@
|
||||
</td>
|
||||
</tr>]]></template_content_html><template_data>$entry, $email</template_data><template_content_plaintext><![CDATA[{$email->language->addToStack("x_created_entry_in", FALSE, array( 'sprintf' => array( $entry->author()->name, $entry->container()->_title ) ) )}: {$entry->title} ({$entry->url()})
|
||||
]]></template_content_plaintext></template><template><template_app>blog</template_app><template_name>digests__comment</template_name><template_content_html><![CDATA[<tr style='border-bottom: 1px solid #eeeeee'>
|
||||
<td width='40' align='center' valign='top' class=' '>
|
||||
<td dir='{dir}' width='40' align='center' valign='top' class=' '>
|
||||
<img src='{$comment->author()->photo}' width='32' height='32' style='border: 1px solid #000; vertical-align: middle;'>
|
||||
</td>
|
||||
<td align='left'>
|
||||
<td dir='{dir}' align='left'>
|
||||
<p style='font-family: "Helvetica Neue", helvetica, sans-serif; margin: 0; font-size: 13px; font-weight: bold'>
|
||||
{$email->language->addToStack("x_commented_entry", FALSE, array( 'sprintf' => array( $comment->author()->name ) ) )}
|
||||
</p>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<javascript app="blog">
|
||||
<file javascript_app="blog" javascript_location="front" javascript_path="controllers/browse" javascript_name="ips.browse.list.js" javascript_type="controller" javascript_version="100045" javascript_position="1000050">/**
|
||||
<file javascript_app="blog" javascript_location="front" javascript_path="controllers/browse" javascript_name="ips.browse.list.js" javascript_type="controller" javascript_version="101012" javascript_position="1000050">/**
|
||||
* IPS Social Suite 4
|
||||
* (c) 2013 Invision Power Services - http://www.invisionpower.com
|
||||
*
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<language>
|
||||
<app key="blog" version="100045">
|
||||
<app key="blog" version="101012">
|
||||
<word key="__app_blog" js="0">Blogs</word>
|
||||
<word key="frontnavigation_blogs" js="0">Blogs</word>
|
||||
<word key="__indefart_blog_entry_comment" js="0">a comment on a blog entry</word>
|
||||
<word key="__indefart_blog_entry" js="0">a blog entry</word>
|
||||
<word key="blog_entry_container" js="0">blog</word>
|
||||
<word key="module__blog_blogs" js="0">Blogs</word>
|
||||
<word key="menu__blog_blogs" js="0">Blogs</word>
|
||||
<word key="menu__blog_blogs_settings" js="0">Settings</word>
|
||||
@@ -112,8 +113,8 @@
|
||||
<word key="unpublished" js="0">Unpublished</word>
|
||||
<word key="blog_entry_locked_can_comment" js="0">This blog entry is locked, but your permissions allow you to add new comments.</word>
|
||||
<word key="blog_entry_locked_cannot_comment" js="0">This blog entry is now closed to further comments.</word>
|
||||
<word key="entry_posted" js="0">Entry posted</word>
|
||||
<word key="entry_future_posted" js="0">Entry publishes on</word>
|
||||
<word key="entry_posted" js="0">Entry posted by %s</word>
|
||||
<word key="entry_future_posted" js="0">Entry by %s publishes on</word>
|
||||
<word key="entry_images" js="0">Images</word>
|
||||
<word key="blog_comments" js="0">{!#[1:comment][?:comments]}</word>
|
||||
<word key="blog_entries" js="0">{!#[1:entry][?:entries]}</word>
|
||||
@@ -124,7 +125,6 @@
|
||||
<word key="my_blogs" js="0">My Blogs</word>
|
||||
<word key="blogs_with_content" js="0">Blogs With Entries</word>
|
||||
<word key="sort_last_edate" js="0">Last Entry</word>
|
||||
<word key="sort_num_views" js="0">Views</word>
|
||||
<word key="sort_rating_total" js="0">Rating</word>
|
||||
<word key="from_the_blog" js="0">From the blog</word>
|
||||
<word key="see_more_entries" js="0">See more entries from %s</word>
|
||||
@@ -211,5 +211,13 @@
|
||||
<word key="g_blog_allowownmod" js="0">Can moderate own blog entries?</word>
|
||||
<word key="g_blog_allowownmod_desc" js="0">The user will be able to: edit comments and entries, delete comments and entries, and lock entries from further comments.</word>
|
||||
<word key="g_blog_allowdelete" js="0">Can delete own blogs?</word>
|
||||
<word key="block_blogCommentFeed" js="0">Blog Comments</word>
|
||||
<word key="block_blogCommentFeed_desc" js="0">Display comments from blogs.</word>
|
||||
<word key="block_blogs" js="0">Blogs</word>
|
||||
<word key="block_blogs_desc" js="0">Display a list of blogs.</word>
|
||||
<word key="widget_blog_last_date" js="0">Last entry posted</word>
|
||||
<word key="widget__blog_edate" js="0">Last entry date</word>
|
||||
<word key="widget__blog_count_entries" js="0">Number of entries</word>
|
||||
<word key="widget__blog_count_comments" js="0">Number of comments</word>
|
||||
</app>
|
||||
</language>
|
||||
@@ -142,20 +142,6 @@
|
||||
"values": [],
|
||||
"zerofill": false
|
||||
},
|
||||
"blog_view_level": {
|
||||
"allow_null": false,
|
||||
"auto_increment": false,
|
||||
"binary": false,
|
||||
"comment": "",
|
||||
"decimals": null,
|
||||
"default": "",
|
||||
"length": 12,
|
||||
"name": "blog_view_level",
|
||||
"type": "VARCHAR",
|
||||
"unsigned": false,
|
||||
"values": [],
|
||||
"zerofill": false
|
||||
},
|
||||
"blog_seo_name": {
|
||||
"allow_null": true,
|
||||
"auto_increment": false,
|
||||
@@ -255,130 +241,130 @@
|
||||
"zerofill": false
|
||||
},
|
||||
"blog_count_entries": {
|
||||
"allow_null": false,
|
||||
"auto_increment": false,
|
||||
"binary": false,
|
||||
"comment": "",
|
||||
"decimals": null,
|
||||
"default": "0",
|
||||
"length": 11,
|
||||
"name": "blog_count_entries",
|
||||
"type": "INT",
|
||||
"length": 11,
|
||||
"decimals": null,
|
||||
"values": [],
|
||||
"allow_null": false,
|
||||
"default": "0",
|
||||
"comment": "",
|
||||
"unsigned": true,
|
||||
"zerofill": false,
|
||||
"auto_increment": false,
|
||||
"binary": false
|
||||
"values": [],
|
||||
"zerofill": false
|
||||
},
|
||||
"blog_count_comments": {
|
||||
"allow_null": false,
|
||||
"auto_increment": false,
|
||||
"binary": false,
|
||||
"comment": "",
|
||||
"decimals": null,
|
||||
"default": "0",
|
||||
"length": 11,
|
||||
"name": "blog_count_comments",
|
||||
"type": "INT",
|
||||
"length": 11,
|
||||
"decimals": null,
|
||||
"values": [],
|
||||
"allow_null": false,
|
||||
"default": "0",
|
||||
"comment": "",
|
||||
"unsigned": true,
|
||||
"zerofill": false,
|
||||
"auto_increment": false,
|
||||
"binary": false
|
||||
"values": [],
|
||||
"zerofill": false
|
||||
},
|
||||
"blog_count_entries_hidden": {
|
||||
"allow_null": false,
|
||||
"auto_increment": false,
|
||||
"binary": false,
|
||||
"comment": "",
|
||||
"decimals": null,
|
||||
"default": "0",
|
||||
"length": 11,
|
||||
"name": "blog_count_entries_hidden",
|
||||
"type": "INT",
|
||||
"length": 11,
|
||||
"decimals": null,
|
||||
"values": [],
|
||||
"allow_null": false,
|
||||
"default": "0",
|
||||
"comment": "",
|
||||
"unsigned": true,
|
||||
"zerofill": false,
|
||||
"auto_increment": false,
|
||||
"binary": false
|
||||
"values": [],
|
||||
"zerofill": false
|
||||
},
|
||||
"blog_count_comments_hidden": {
|
||||
"allow_null": false,
|
||||
"auto_increment": false,
|
||||
"binary": false,
|
||||
"comment": "",
|
||||
"decimals": null,
|
||||
"default": "0",
|
||||
"length": 11,
|
||||
"name": "blog_count_comments_hidden",
|
||||
"type": "INT",
|
||||
"length": 11,
|
||||
"decimals": null,
|
||||
"values": [],
|
||||
"allow_null": false,
|
||||
"default": "0",
|
||||
"comment": "",
|
||||
"unsigned": true,
|
||||
"zerofill": false,
|
||||
"auto_increment": false,
|
||||
"binary": false
|
||||
"values": [],
|
||||
"zerofill": false
|
||||
},
|
||||
"blog_rating_average": {
|
||||
"allow_null": false,
|
||||
"auto_increment": false,
|
||||
"binary": false,
|
||||
"comment": "",
|
||||
"decimals": null,
|
||||
"default": "0",
|
||||
"length": 11,
|
||||
"name": "blog_rating_average",
|
||||
"type": "INT",
|
||||
"length": 11,
|
||||
"decimals": null,
|
||||
"values": [],
|
||||
"allow_null": false,
|
||||
"default": "0",
|
||||
"comment": "",
|
||||
"unsigned": true,
|
||||
"zerofill": false,
|
||||
"auto_increment": false,
|
||||
"binary": false
|
||||
"values": [],
|
||||
"zerofill": false
|
||||
},
|
||||
"blog_cover_photo": {
|
||||
"allow_null": true,
|
||||
"auto_increment": false,
|
||||
"binary": false,
|
||||
"comment": "",
|
||||
"decimals": null,
|
||||
"default": null,
|
||||
"length": 0,
|
||||
"name": "blog_cover_photo",
|
||||
"type": "TEXT",
|
||||
"length": null,
|
||||
"decimals": null,
|
||||
"values": [],
|
||||
"allow_null": true,
|
||||
"default": null,
|
||||
"comment": "",
|
||||
"unsigned": false,
|
||||
"zerofill": false,
|
||||
"auto_increment": false,
|
||||
"binary": false
|
||||
"values": [],
|
||||
"zerofill": false
|
||||
},
|
||||
"blog_cover_photo_offset": {
|
||||
"allow_null": true,
|
||||
"auto_increment": false,
|
||||
"binary": false,
|
||||
"comment": "",
|
||||
"decimals": null,
|
||||
"default": null,
|
||||
"length": 10,
|
||||
"name": "blog_cover_photo_offset",
|
||||
"type": "INT",
|
||||
"length": 10,
|
||||
"decimals": null,
|
||||
"values": [],
|
||||
"allow_null": true,
|
||||
"default": null,
|
||||
"comment": "",
|
||||
"unsigned": false,
|
||||
"zerofill": false,
|
||||
"auto_increment": false,
|
||||
"binary": false
|
||||
"values": [],
|
||||
"zerofill": false
|
||||
},
|
||||
"blog_social_group": {
|
||||
"allow_null": true,
|
||||
"auto_increment": false,
|
||||
"binary": false,
|
||||
"comment": "The social group ID, is this is a private blog",
|
||||
"decimals": null,
|
||||
"default": null,
|
||||
"length": 10,
|
||||
"name": "blog_social_group",
|
||||
"type": "INT",
|
||||
"length": 10,
|
||||
"decimals": null,
|
||||
"values": [],
|
||||
"allow_null": true,
|
||||
"default": null,
|
||||
"comment": "The social group ID, is this is a private blog",
|
||||
"unsigned": true,
|
||||
"zerofill": false,
|
||||
"auto_increment": false,
|
||||
"binary": false
|
||||
"values": [],
|
||||
"zerofill": false
|
||||
},
|
||||
"blog_count_entries_future": {
|
||||
"allow_null": false,
|
||||
"auto_increment": false,
|
||||
"binary": false,
|
||||
"comment": "",
|
||||
"decimals": null,
|
||||
"default": "0",
|
||||
"length": 10,
|
||||
"name": "blog_count_entries_future",
|
||||
"type": "INT",
|
||||
"length": 10,
|
||||
"decimals": null,
|
||||
"values": [],
|
||||
"allow_null": false,
|
||||
"default": "0",
|
||||
"comment": "",
|
||||
"unsigned": true,
|
||||
"zerofill": false,
|
||||
"auto_increment": false,
|
||||
"binary": false
|
||||
"values": [],
|
||||
"zerofill": false
|
||||
}
|
||||
},
|
||||
"indexes": {
|
||||
@@ -406,22 +392,10 @@
|
||||
"type": "key",
|
||||
"name": "blog_grabber",
|
||||
"length": [
|
||||
null,
|
||||
null
|
||||
],
|
||||
"columns": [
|
||||
"blog_disabled",
|
||||
"blog_view_level"
|
||||
]
|
||||
},
|
||||
"blog_view_level": {
|
||||
"type": "key",
|
||||
"name": "blog_view_level",
|
||||
"length": [
|
||||
null
|
||||
],
|
||||
"columns": [
|
||||
"blog_view_level"
|
||||
"blog_disabled"
|
||||
]
|
||||
},
|
||||
"blog_pinned": {
|
||||
@@ -459,7 +433,7 @@
|
||||
"name": "auth_user",
|
||||
"length": [
|
||||
null,
|
||||
253
|
||||
190
|
||||
],
|
||||
"columns": [
|
||||
"blog_owner_only",
|
||||
@@ -482,7 +456,9 @@
|
||||
"blog_last_edate"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"collation": "utf8mb4_unicode_ci",
|
||||
"engine": "InnoDB"
|
||||
},
|
||||
"blog_entries": {
|
||||
"name": "blog_entries",
|
||||
|
||||
+254
-116
@@ -149,12 +149,6 @@
|
||||
<div>
|
||||
<strong class='ipsType_minorHeading'>{lang="latest_entry"}</strong><br>
|
||||
<h3 class='ipsType_reset ipsType_sectionHead ipsType_blendLinks'>
|
||||
<a href='{$blog->latestEntry()->url()}' title='{lang="view_this_entry" sprintf="$blog->latestEntry()->name"}'>
|
||||
{{if $blog->latestEntry()->unread()}}
|
||||
<span class='ipsItemStatus' data-ipsTooltip title="{lang="unread_blog"}"><i class="fa fa-circle"></i></span>
|
||||
{{endif}}
|
||||
{wordbreak="$blog->latestEntry()->name"}
|
||||
</a>
|
||||
{{if $blog->latestEntry()->locked()}}<i class='fa fa-lock'></i> {{endif}}{$blog->latestEntry()->caption}
|
||||
{{if $blog->latestEntry()->isFutureDate() || $blog->latestEntry()->mapped('pinned') || $blog->latestEntry()->mapped('featured') || $blog->latestEntry()->hidden() === -1 || $blog->latestEntry()->hidden() === 1 || $blog->latestEntry()->status === 'draft'}}
|
||||
{{if $blog->latestEntry()->isFutureDate()}}
|
||||
@@ -174,13 +168,20 @@
|
||||
<span class="ipsBadge ipsBadge_icon ipsBadge_positive" data-ipsTooltip title='{lang="featured"}'><i class='fa fa-star'></i></span>
|
||||
{{endif}}
|
||||
{{endif}}
|
||||
|
||||
<a href='{$blog->latestEntry()->url()}' title='{lang="view_this_entry" sprintf="$blog->latestEntry()->name"}'>
|
||||
{{if $blog->latestEntry()->unread()}}
|
||||
<span class='ipsItemStatus' data-ipsTooltip title="{lang="unread_blog"}"><i class="fa fa-circle"></i></span>
|
||||
{{endif}}
|
||||
{wordbreak="$blog->latestEntry()->name"}
|
||||
</a>
|
||||
</h3>
|
||||
{{if !( $blog->owner() instanceof \IPS\Member )}}
|
||||
<p class='ipsType_medium ipsType_reset ipsType_light'>{lang="byline" htmlsprintf="trim( $blog->latestEntry()->author()->link() )"} {datetime="$blog->latestEntry()->date"}</p>
|
||||
{{endif}}
|
||||
</div>
|
||||
</div>
|
||||
<div class='ipsType_medium ipsType_richText ipsSpacer_both cBlogInfo_content'>
|
||||
<div class='ipsType_medium ipsType_richText ipsSpacer_both cBlogInfo_content' data-controller="core.front.core.lightboxedImages">
|
||||
{$blog->latestEntry()->content()|raw}
|
||||
</div>
|
||||
<ul class='ipsList_inline'>
|
||||
@@ -339,40 +340,6 @@
|
||||
{template="blogViewMedium" group="view" app="blog" params="$entry, $table, FALSE"}
|
||||
</li>
|
||||
{{endforeach}}]]></template>
|
||||
<template template_group="global" template_name="snippet" template_data="$activity, $type='activity'" template_location="front" template_app="blog"><![CDATA[
|
||||
{{if $activity instanceof \IPS\calendar\Event\Comment or $activity instanceof \IPS\calendar\Event\Review}}
|
||||
{{$item = $activity->item();}}
|
||||
{{else}}
|
||||
{{$item = $activity;}}
|
||||
{{endif}}
|
||||
|
||||
{{if $activity instanceof \IPS\blog\Entry\Comment}}
|
||||
{{if mb_strlen( trim( strip_tags( $activity->truncated() ) ) ) }}
|
||||
<div class='cSearchActivity_info ipsContained'>
|
||||
<div class='ipsType_medium ipsType_richText ipsContained ipsSpacer_bottom' data-ipsTruncate data-ipsTruncate-size='3 lines' data-ipsTruncate-type='remove'>
|
||||
{$activity->truncated()|raw}
|
||||
</div>
|
||||
{{if $type != 'search'}}
|
||||
<ul class='ipsList_inline ipsType_light'>
|
||||
<li>{template="reputationMini" group="global" app="core" params="$activity, '', NULL, TRUE"}</li>
|
||||
</ul>
|
||||
{{endif}}
|
||||
</div>
|
||||
{{endif}}
|
||||
{{else}}
|
||||
<div class='cSearchActivity_info ipsContained'>
|
||||
{{if $type != 'search'}}<a href='{$activity->url()}' class='ipsType_normal ipsType_break'>{$item->mapped('title')}</a>{{endif}}
|
||||
<div class='ipsType_medium ipsType_richText ipsContained ipsSpacer_both ipsSpacer_half' data-ipsTruncate data-ipsTruncate-size='3 lines' data-ipsTruncate-type='remove'>
|
||||
{$item->truncated()|raw}
|
||||
</div>
|
||||
<ul class='ipsList_inline ipsType_light'>
|
||||
<li>{lang="num_comments" pluralize="$item->count_comments"}</li>
|
||||
{{if $type != 'search' and $item instanceof \IPS\Content\Reputation and settings.reputation_enabled}}
|
||||
<li>{template="reputationMini" group="global" app="core" params="$item, '', NULL, TRUE"}</li>
|
||||
{{endif}}
|
||||
</ul>
|
||||
</div>
|
||||
{{endif}}]]></template>
|
||||
<template template_group="livesearch" template_name="blog" template_data="$blog" template_location="admin" template_app="blog"><![CDATA[<li class='ipsPad_half ipsClearfix' data-role='result'>
|
||||
<a href='{url="app=blog&module=blogs&controller=blogs&do=form&id="}{$blog->id}' class='ipsPos_left'>{$blog->_title}</a>
|
||||
</li>
|
||||
@@ -402,7 +369,7 @@
|
||||
{{endif}}
|
||||
{{if count( $elements ) > 1}}
|
||||
<h2 class='ipsType_sectionTitle ipsType_reset'>{lang="entry_information"}</h2>
|
||||
<div class='ipsTabs ipsTabs_contained ipsClearfix ipsJS_show' id='tabs_{$id}' data-ipsTabBar data-ipsTabBar-contentArea='#ipsTabs_content_{$id}'>
|
||||
<div class='ipsTabs ipsClearfix ipsJS_show' id='tabs_{$id}' data-ipsTabBar data-ipsTabBar-contentArea='#ipsTabs_content_{$id}'>
|
||||
<a href='#tabs_{$id}' data-action='expandTabs'><i class='fa fa-caret-down'></i></a>
|
||||
<ul role='tablist'>
|
||||
{{foreach $elements as $name => $content}}
|
||||
@@ -414,7 +381,7 @@
|
||||
{{endforeach}}
|
||||
</ul>
|
||||
</div>
|
||||
<div id='ipsTabs_content_{$id}' class='ipsTabs_panels ipsTabs_contained'>
|
||||
<div id='ipsTabs_content_{$id}' class='ipsTabs_panels'>
|
||||
{{foreach $elements as $name => $contents}}
|
||||
<div id='ipsTabs_tabs_{$id}_{$id}_tab_{$name}_panel' class="ipsTabs_panel ipsPad" aria-labelledby="{$id}_tab_{$name}" aria-hidden="false">
|
||||
<ul class='ipsForm ipsForm_vertical'>
|
||||
@@ -644,20 +611,11 @@
|
||||
{{endif}}
|
||||
</div>]]></template>
|
||||
<template template_group="view" template_name="blogViewLarge" template_data="$entry, $table, $first = FALSE" template_location="front" template_app="blog"><![CDATA[
|
||||
<article class='cBlogView_entry {{if $entry->hidden()}}ipsModerated{{endif}}'>
|
||||
<article class='cBlogView_entry ipsContained {{if $entry->hidden()}}ipsModerated{{endif}}' data-controller="core.front.core.lightboxedImages">
|
||||
<header class='ipsPhotoPanel ipsPhotoPanel_notPhone ipsPhotoPanel_small ipsSpacer_bottom'>
|
||||
{template="userPhoto" app="core" params="$entry->author()" group="global"}
|
||||
<div>
|
||||
<h2 class='ipsType_pageTitle'>
|
||||
{{if $entry->prefix()}}
|
||||
{template="prefix" group="global" app="core" params="$entry->prefix( TRUE ), $entry->prefix()"}
|
||||
{{endif}}
|
||||
<a href="{$entry->url()}" title="{lang="read_more_about" sprintf="$entry->name"}" {{if $entry->canEdit()}}data-role="editableTitle"{{endif}}>
|
||||
{{if $entry->unread()}}
|
||||
<span class='ipsItemStatus' data-ipsTooltip title="{lang="unread_blog"}"><i class="fa fa-circle"></i></span>
|
||||
{{endif}}
|
||||
{{if $entry->canEdit()}}<span data-role="editableTitle">{wordbreak="$entry->name"}</span>{{else}}{wordbreak="$entry->name"}{{endif}}
|
||||
</a>
|
||||
{{if $entry->locked()}}<i class='fa fa-lock'></i> {{endif}}{$entry->caption}
|
||||
{{if $entry->isFutureDate() || $entry->mapped('pinned') || $entry->mapped('featured') || $entry->hidden() === -1 || $entry->hidden() === 1 || $entry->status === 'draft'}}
|
||||
{{if $entry->isFutureDate() and $entry->status !== 'draft'}}
|
||||
@@ -677,8 +635,18 @@
|
||||
<span class="ipsBadge ipsBadge_icon ipsBadge_positive" data-ipsTooltip title='{lang="featured"}'><i class='fa fa-star'></i></span>
|
||||
{{endif}}
|
||||
{{endif}}
|
||||
|
||||
{{if $entry->prefix()}}
|
||||
{template="prefix" group="global" app="core" params="$entry->prefix( TRUE ), $entry->prefix()"}
|
||||
{{endif}}
|
||||
<a href="{$entry->url()}" class='ipsType_blendLinks' title="{lang="read_more_about" sprintf="$entry->name"}" {{if $entry->canEdit()}}data-role="editableTitle"{{endif}}>
|
||||
{{if $entry->unread()}}
|
||||
<span class='ipsItemStatus' data-ipsTooltip title="{lang="unread_blog"}"><i class="fa fa-circle"></i></span>
|
||||
{{endif}}
|
||||
{{if $entry->canEdit()}}<span data-role="editableTitle">{wordbreak="$entry->name"}</span>{{else}}{wordbreak="$entry->name"}{{endif}}
|
||||
</a>
|
||||
</h2>
|
||||
<p class='ipsType_light ipsType_reset'>
|
||||
<p class='ipsType_light ipsType_reset ipsType_blendLinks'>
|
||||
{lang="byline" htmlsprintf="$entry->author()->link()"}{datetime="$entry->date"}
|
||||
</p>
|
||||
</div>
|
||||
@@ -687,11 +655,13 @@
|
||||
<section class='ipsType_normal ipsType_richText ipsType_break ipsSpacer_both' data-ipsTruncate {{if $first}}data-ipsTruncate-size='20 lines'{{else}}data-ipsTruncate-size='7 lines'{{endif}}>
|
||||
{$entry->content|raw}
|
||||
</section>
|
||||
{{if count( $entry->tags() )}}
|
||||
{template="tags" group="global" app="core" params="$entry->tags()"}
|
||||
{{if count( $entry->tags() )}}
|
||||
<div class='ipsSpacer_top'>
|
||||
{template="tags" group="global" app="core" params="$entry->tags()"}
|
||||
</div>
|
||||
{{endif}}
|
||||
|
||||
<ul class='ipsList_inline'>
|
||||
<ul class='ipsList_inline ipsSpacer_top'>
|
||||
{{if $table->canModerate()}}
|
||||
<li class='ipsPos_left'>
|
||||
{{$idField = $entry::$databaseColumnId;}}
|
||||
@@ -702,25 +672,16 @@
|
||||
{{if \IPS\Settings::i()->blog_enable_rating}}
|
||||
<li>{template="rating" app="core" params="'small', $entry->averageRating()" group="global"}</li>
|
||||
{{endif}}
|
||||
<li><a href='{$entry->url()}#comments' title='{lang="view_comments"}'><i class='fa fa-comment'></i> {lang="num_comments" pluralize="$entry->num_comments"}</a></li>
|
||||
<li><a href='{$entry->url()}#comments' title='{lang="view_comments"}' class='ipsType_light'>{lang="num_comments" pluralize="$entry->num_comments"}</a></li>
|
||||
<li class='ipsType_light'>{lang="num_views_with_number" pluralize="$entry->views"}</li>
|
||||
</ul>
|
||||
</article>]]></template>
|
||||
<template template_group="view" template_name="blogViewMedium" template_data="$entry, $table" template_location="front" template_app="blog"><![CDATA[
|
||||
<article class='cBlogView_entry {{if $entry->hidden()}}ipsModerated{{endif}}'>
|
||||
<article class='cBlogView_entry ipsContained {{if $entry->hidden()}}ipsModerated{{endif}}' data-controller="core.front.core.lightboxedImages">
|
||||
<header class='ipsPhotoPanel ipsPhotoPanel_mini ipsPhotoPanel_notPhone'>
|
||||
{template="userPhoto" app="core" params="$entry->author(), 'mini'" group="global"}
|
||||
<div>
|
||||
<h2 class='ipsType_sectionHead ipsType_blendLinks ipsTruncate ipsTruncate_line'>
|
||||
{{if $entry->prefix()}}
|
||||
{template="prefix" group="global" app="core" params="$entry->prefix( TRUE ), $entry->prefix()"}
|
||||
{{endif}}
|
||||
<a href="{$entry->url()}" title="{lang="read_more_about" sprintf="$entry->name"}" {{if $entry->canEdit()}}data-role="editableTitle"{{endif}}>
|
||||
{{if $entry->unread()}}
|
||||
<span class='ipsItemStatus' data-ipsTooltip title="{lang="unread_blog"}"><i class="fa fa-circle"></i></span>
|
||||
{{endif}}
|
||||
{wordbreak="$entry->name"}
|
||||
</a>
|
||||
{{if $entry->isFutureDate() || $entry->mapped('pinned') || $entry->mapped('featured') || $entry->hidden() === -1 || $entry->hidden() === 1}}
|
||||
{{if $entry->isFutureDate() and $entry->status !== 'draft'}}
|
||||
<span class="ipsBadge ipsBadge_icon ipsBadge_small ipsBadge_warning" data-ipsTooltip title='{$entry->futureDateBlurb()}'><i class='fa fa-clock-o'></i></span>
|
||||
@@ -734,8 +695,18 @@
|
||||
<span class="ipsBadge ipsBadge_icon ipsBadge_small ipsBadge_positive" data-ipsTooltip title='{lang="featured"}'><i class='fa fa-star'></i></span>
|
||||
{{endif}}
|
||||
{{endif}}
|
||||
|
||||
{{if $entry->prefix()}}
|
||||
{template="prefix" group="global" app="core" params="$entry->prefix( TRUE ), $entry->prefix()"}
|
||||
{{endif}}
|
||||
<a href="{$entry->url()}" title="{lang="read_more_about" sprintf="$entry->name"}" {{if $entry->canEdit()}}data-role="editableTitle"{{endif}}>
|
||||
{{if $entry->unread()}}
|
||||
<span class='ipsItemStatus' data-ipsTooltip title="{lang="unread_blog"}"><i class="fa fa-circle"></i></span>
|
||||
{{endif}}
|
||||
{wordbreak="$entry->name"}
|
||||
</a>
|
||||
</h2>
|
||||
<p class='ipsType_light ipsType_reset'>
|
||||
<p class='ipsType_light ipsType_reset ipsType_blendLinks'>
|
||||
{lang="byline" htmlsprintf="$entry->author()->link()"}{datetime="$entry->date"}
|
||||
</p>
|
||||
{{if \IPS\Settings::i()->blog_enable_rating}}
|
||||
@@ -756,46 +727,15 @@
|
||||
</li>
|
||||
{{endif}}
|
||||
<li><strong><a href='{$entry->url()}' title="{lang="read_more_about" sprintf="$entry->name"}">{lang="read_more"}</a></strong></li>
|
||||
<li><a href='{$entry->url()}#comments' title='{lang="view_comments"}'><i class='fa fa-comment'></i> {lang="num_comments" pluralize="$entry->num_comments"}</a></li>
|
||||
<li><a href='{$entry->url()}#comments' title='{lang="view_comments"}' class='ipsType_light'>{lang="num_comments" pluralize="$entry->num_comments"}</a></li>
|
||||
<li class='ipsType_light'>{lang="num_views_with_number" pluralize="$entry->views"}</li>
|
||||
</ul>
|
||||
</article>]]></template>
|
||||
<template template_group="view" template_name="blogViewSmall" template_data="$entry, $table" template_location="front" template_app="blog"><![CDATA[
|
||||
<li class='cBlogView_entry'>
|
||||
<div class='ipsPhotoPanel ipsPhotoPanel_tiny ipsPhotoPanel_notPhone'>
|
||||
{template="userPhoto" app="core" params="$entry->author(), 'tiny'" group="global"}
|
||||
<div>
|
||||
{{if $entry->prefix()}}
|
||||
{template="prefix" group="global" app="core" params="$entry->prefix( TRUE ), $entry->prefix()"}
|
||||
{{endif}}
|
||||
<a href="{$entry->url()}" title="{lang="read_more_about" sprintf="$entry->name"}" class='ipsType_large ipsType_blendLinks' {{if $entry->canEdit()}}data-role="editableTitle"{{endif}}>
|
||||
{{if $entry->unread()}}
|
||||
<span class='ipsItemStatus' data-ipsTooltip title="{lang="unread_blog"}"><i class="fa fa-circle"></i></span>
|
||||
{{endif}}
|
||||
{wordbreak="$entry->name"}
|
||||
</a><br>
|
||||
<p class='ipsType_light ipsType_reset'>
|
||||
{lang="byline" htmlsprintf="$entry->author()->link()"}{datetime="$entry->date"}
|
||||
</p>
|
||||
|
||||
<ul class='ipsList_inline'>
|
||||
{{if $table->canModerate()}}
|
||||
<li class='ipsPos_left'>
|
||||
{{$idField = $entry::$databaseColumnId;}}
|
||||
<input type='checkbox' data-role='moderation' name="moderate[{$entry->$idField}]" data-actions="{expression="implode( ' ', $table->multimodActions( $entry ) )"}" data-state='{{if $entry->tableStates()}}{$entry->tableStates()}{{endif}}'>
|
||||
</li>
|
||||
{{endif}}
|
||||
<li>
|
||||
<a href='{$entry->url()}#comments' title='{lang="view_comments"}'><i class='fa fa-comment'></i> {lang="num_comments" pluralize="$entry->num_comments"}</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</li>]]></template>
|
||||
<template template_group="view" template_name="comments" template_data="$entry" template_location="front" template_app="blog"><![CDATA[<div class='ipsBox'>
|
||||
<div data-controller='core.front.core.commentFeed' data-baseURL='{$entry->url()}' data-feedID='entry-{$entry->id}' id='comments'>
|
||||
<div data-controller='core.front.core.commentFeed' {{if settings.auto_polling_enabled}}data-autoPoll{{endif}} data-baseURL='{$entry->url()}' data-feedID='entry-{$entry->id}' id='comments'>
|
||||
<div class='ipsPad'>
|
||||
<h2 class='ipsType_sectionHead ipsSpacer_bottom' data-role="comment_count">{lang="num_comments_uc" pluralize="$entry->num_comments"}</h2>
|
||||
<h2 class='ipsType_sectionHead' data-role="comment_count">{lang="num_comments_uc" pluralize="$entry->num_comments"}</h2>
|
||||
<hr class='ipsHr'>
|
||||
{{if $entry->commentPageCount() > 1}}
|
||||
{$entry->commentPagination()|raw}
|
||||
<br><br>
|
||||
@@ -851,13 +791,10 @@
|
||||
{{endif}}
|
||||
<a href='{$blog->url()}' title='{lang="go_to_blog" sprintf="$blog->_title"}' class='ipsType_blendLinks'>
|
||||
<h1 class='ipsType_pageTitle ipsType_break ipsTruncate ipsTruncate_line'>
|
||||
{{if $blog->pinned && \IPS\Request::i()->module != 'view'}}
|
||||
{{if $blog->pinned}}
|
||||
<span class="ipsBadge ipsBadge_icon ipsBadge_small ipsBadge_positive" data-ipsTooltip title='{lang="pinned"}'><i class='fa fa-thumb-tack'></i></span>
|
||||
{{endif}}
|
||||
{$blog->_title}
|
||||
{{if $blog->pinned && \IPS\Request::i()->module == 'view'}}
|
||||
<span class="ipsBadge ipsBadge_icon ipsBadge_small ipsBadge_positive" data-ipsTooltip title='{lang="pinned"}'><i class='fa fa-thumb-tack'></i></span>
|
||||
{{endif}}
|
||||
</h1>
|
||||
</a>
|
||||
<p class='ipsType_normal ipsType_reset ipsType_blendLinks'>
|
||||
@@ -880,11 +817,6 @@
|
||||
<article class='ipsBox ipsPad ipsSpacer_top'>
|
||||
<header>
|
||||
<h1 class='ipsType_pageTitle ipsType_largeTitle ipsType_break'>
|
||||
{{if $entry->prefix()}}
|
||||
{template="prefix" group="global" app="core" params="$entry->prefix( TRUE ), $entry->prefix()"}
|
||||
{{endif}}
|
||||
{wordbreak="$entry->name"}
|
||||
{{if $entry->locked()}}<i class='fa fa-lock'></i> {{endif}}{$entry->caption}
|
||||
{{if $entry->isFutureDate() || $entry->mapped('pinned') || $entry->mapped('featured') || $entry->hidden() === -1 || $entry->hidden() === 1 || $entry->status === 'draft'}}
|
||||
{{if $entry->isFutureDate() and $entry->status !== 'draft'}}
|
||||
<span class="ipsBadge ipsBadge_icon ipsBadge_warning" data-ipsTooltip title='{$entry->futureDateBlurb()}'><i class='fa fa-clock-o'></i></span>
|
||||
@@ -903,6 +835,12 @@
|
||||
<span class="ipsBadge ipsBadge_icon ipsBadge_positive" data-ipsTooltip title='{lang="featured"}'><i class='fa fa-star'></i></span>
|
||||
{{endif}}
|
||||
{{endif}}
|
||||
|
||||
{{if $entry->prefix()}}
|
||||
{template="prefix" group="global" app="core" params="$entry->prefix( TRUE ), $entry->prefix()"}
|
||||
{{endif}}
|
||||
{wordbreak="$entry->name"}
|
||||
{{if $entry->locked()}}<i class='fa fa-lock'></i> {{endif}}{$entry->caption}
|
||||
</h1>
|
||||
|
||||
<div class='ipsPhotoPanel ipsPhotoPanel_tiny ipsSpacer_top'>
|
||||
@@ -911,7 +849,7 @@
|
||||
</div>
|
||||
{template="userPhoto" app="core" params="$entry->author(), 'tiny'" group="global"}
|
||||
<div>
|
||||
<p class='ipsType_light ipsType_reset'>{{if $entry->date > time()}}{lang="entry_future_posted"}{{else}}{lang="entry_posted"}{{endif}} {datetime="$entry->date"}</p>
|
||||
<p class='ipsType_light ipsType_reset ipsType_blendLinks'>{{if $entry->date > time()}}{lang="entry_future_posted" htmlsprintf="$entry->author()->link()"}{{else}}{lang="entry_posted" htmlsprintf="$entry->author()->link()"}{{endif}} · {datetime="$entry->date"}</p>
|
||||
<p class='ipsType_light ipsType_reset'>{lang="num_views_with_number" pluralize="$entry->views"}</p>
|
||||
{{if \IPS\Settings::i()->blog_enable_rating}}
|
||||
{$entry->rating()|raw}
|
||||
@@ -1135,6 +1073,206 @@
|
||||
<div class='ipsResponsive_showPhone ipsResponsive_block ipsSpacer_top'>
|
||||
{template="follow" app="core" group="global" params="'blog', 'blog', $blog->_id, \IPS\blog\Entry::containerFollowerCount( $blog )"}
|
||||
</div>]]></template>
|
||||
<template template_group="widgets" template_name="blogCommentFeed" template_data="$comments, $title, $orientation='vertical'" template_location="front" template_app="blog"><![CDATA[{{if !empty( $comments ) }}
|
||||
<h3 class='ipsType_reset ipsWidget_title'>{$title}</h3>
|
||||
{{if $orientation == 'vertical'}}
|
||||
<div class='ipsWidget_inner ipsPad_half'>
|
||||
<ul class='ipsDataList ipsDataList_reducedSpacing'>
|
||||
{{foreach $comments as $comment}}
|
||||
<li class='ipsDataItem'>
|
||||
<div class='ipsDataItem_icon ipsPos_top'>
|
||||
{template="userPhoto" group="global" app="core" params="$comment->author(), 'tiny'"}
|
||||
</div>
|
||||
<div class='ipsDataItem_main'>
|
||||
<a href="{$comment->url()}" class='ipsType_medium ipsType_break'>{wordbreak="$comment->item()->name"}</a><br>
|
||||
<p class='ipsType_reset ipsType_medium ipsType_light ipsType_blendLinks'>{lang="byline_nodate" htmlsprintf="$comment->author()->link()"} · <a href="{$comment->url()}" class='ipsDataItem_title ipsType_break ipsType_blendLinks'>{$comment->dateLine()|raw}</a></p>
|
||||
<div class='ipsType_medium ipsType_textBlock ipsType_richText ipsType_break ipsContained ipsSpacer_top ipsSpacer_half' data-ipsTruncate data-ipsTruncate-type='remove' data-ipsTruncate-size='{{if $orientation == 'vertical'}}6 lines{{else}}2 lines{{endif}}'>
|
||||
{$comment->truncated( true )|raw}
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
{{endforeach}}
|
||||
</ul>
|
||||
</div>
|
||||
{{else}}
|
||||
<div class='ipsWidget_inner'>
|
||||
<ul class='ipsDataList'>
|
||||
{{foreach $comments as $comment}}
|
||||
<li class='ipsDataItem ipsClearfix'>
|
||||
<div class='ipsComment_header ipsPhotoPanel ipsPhotoPanel_mini'>
|
||||
{template="userPhoto" app="core" group="global" params="$comment->author(), 'mini', $comment->warningRef()"}
|
||||
<div>
|
||||
<p class='ipsPos_right ipsType_reset ipsType_blendLinks'>
|
||||
<a href='{$comment->item()->url()->setQueryString( array( 'do' => 'findComment', 'comment' => $comment->id ) )}' data-ipsTooltip title='{lang="share_this_comment"}' data-ipsMenu data-ipsMenu-closeOnClick='false' id='elShareComment_{$comment->id}'><i class='fa fa-share-alt'></i></a>
|
||||
</p>
|
||||
<h3 class='ipsComment_author ipsType_blendLinks'>
|
||||
<strong class='ipsType_normal'>{template="userLink" app="core" group="global" params="$comment->author(), $comment->warningRef()"}</strong>
|
||||
{template="reputationBadge" group="global" app="core" params="$comment->author()"}
|
||||
</h3>
|
||||
<p class='ipsComment_meta ipsType_light ipsType_medium'>
|
||||
<a href='{$comment->item()->url()->setQueryString( array( 'do' => 'findComment', 'comment' => $comment->id ) )}' class='ipsType_blendLinks' title='{lang="share_this_comment"}'>{$comment->dateLine()|raw}</a>
|
||||
{{if $comment->editLine()}}
|
||||
({lang="edited_lc"})
|
||||
{{endif}}
|
||||
{{if $comment->hidden()}}
|
||||
· {$comment->hiddenBlurb()}
|
||||
{{endif}}
|
||||
{{if $comment instanceof \IPS\Content\ReportCenter and !\IPS\Member::loggedIn()->group['gbw_no_report'] and $comment->hidden() !== 1 }}
|
||||
· <a href='{$comment->url('report')}' data-ipsDialog data-ipsDialog-remoteSubmit data-ipsDialog-size='medium' data-ipsDialog-flashMessage='{lang="report_submit_success"}' data-ipsDialog-title="{lang="report"}" data-action='reportComment' title='{lang="report_content"}'>{lang="report"}</a>
|
||||
{{endif}}
|
||||
</p>
|
||||
|
||||
{{if member.modPermission('mod_see_warn') and $comment->warning}}
|
||||
{template="commentWarned" group="global" app="core" params="$comment"}
|
||||
{{endif}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class='ipsPad ipsClearfix'>
|
||||
{{if in_array( 'IPS\Content\Reputation', class_implements( $comment ) ) and settings.reputation_highlight and $comment->reputation() >= settings.reputation_highlight}}
|
||||
<strong class='ipsComment_popularFlag' data-ipsTooltip title='{lang="this_is_a_popular_comment"}'><i class='fa fa-star'></i></strong>
|
||||
{{endif}}
|
||||
<a href="{$comment->url()}" class='ipsDataItem_title ipsType_break'>{wordbreak="$comment->item()->name"}</a><br>
|
||||
<div data-role='commentContent' class='ipsType_normal ipsType_richText ipsType_break ipsContained' data-controller='core.front.core.lightboxedImages'>
|
||||
{{if $comment->hidden() === 1 && $comment->author()->member_id == \IPS\Member::loggedIn()->member_id}}
|
||||
<strong class='ipsType_medium ipsType_warning'><i class='fa fa-info-circle'></i> {lang="comment_awaiting_approval"}</strong>
|
||||
{{endif}}
|
||||
{$comment->content()|raw}
|
||||
|
||||
{{if $comment->editLine()}}
|
||||
{$comment->editLine()|raw}
|
||||
{{endif}}
|
||||
</div>
|
||||
|
||||
{{if $comment->hidden() !== 1 && $comment instanceof \IPS\Content\Reputation and settings.reputation_enabled}}
|
||||
{template="reputation" group="global" app="core" params="$comment, 'ipsPos_right ipsResponsive_noFloat'"}
|
||||
{{endif}}
|
||||
</div>
|
||||
</li>
|
||||
{{endforeach}}
|
||||
</ul>
|
||||
</div>
|
||||
{{endif}}
|
||||
{{endif}}
|
||||
]]></template>
|
||||
<template template_group="widgets" template_name="blogs" template_data="$blogs, $title, $orientation='vertical'" template_location="front" template_app="blog"><![CDATA[<h3 class='ipsType_reset ipsWidget_title'>{$title}</h3>
|
||||
{{if $orientation == 'vertical'}}
|
||||
<div class='ipsPad_half ipsWidget_inner'>
|
||||
<ul class='ipsDataList ipsDataList_reducedSpacing'>
|
||||
{{foreach $blogs as $blog}}
|
||||
<li class='ipsDataItem'>
|
||||
<div class='ipsColumns ipsColumns_collapsePhone'>
|
||||
<h4 class='ipsType_large ipsType_reset'>{$blog->_title}</h4>
|
||||
<div>
|
||||
<ul class='ipsGrid'>
|
||||
<li class='ipsGrid_span4'><strong class='ipsType_normal'>{$blog->_items}</strong><br>{lang="blog_entries" pluralize="$blog->_items"}</li>
|
||||
<li class='ipsGrid_span4'><strong class='ipsType_normal'>{$blog->_comments}</strong><br>{lang="blog_comments" pluralize="$blog->_comments"}</li>
|
||||
<li class='ipsGrid_span4'><strong class='ipsType_normal'>{$blog->num_views}</strong><br>{lang="blog_views" pluralize="$blog->num_views"}</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
{{endforeach}}
|
||||
</ul>
|
||||
</div>
|
||||
{{else}}
|
||||
<ol class="ipsDataList ipsClear cBlogList ipsAreaBackground ipsDataList_large" data-role="tableRows" itemscope="" itemtype="http://schema.org/ItemList">
|
||||
{{foreach $blogs as $blog}}
|
||||
<li class='ipsDataItem ipsAreaBackground_reset'>
|
||||
<div class='ipsColumns ipsColumns_collapsePhone'>
|
||||
<div class='ipsColumn ipsColumn_veryWide cBlogInfo ipsAreaBackground_light'>
|
||||
{$blog->coverPhoto()|raw}
|
||||
<div class='ipsPad'>
|
||||
<ul class='ipsGrid'>
|
||||
<li class='ipsGrid_span4'><strong class='ipsType_normal'>{$blog->_items}</strong><br>{lang="blog_entries" pluralize="$blog->_items"}</li>
|
||||
<li class='ipsGrid_span4'><strong class='ipsType_normal'>{$blog->_comments}</strong><br>{lang="blog_comments" pluralize="$blog->_comments"}</li>
|
||||
<li class='ipsGrid_span4'><strong class='ipsType_normal'>{$blog->num_views}</strong><br>{lang="blog_views" pluralize="$blog->num_views"}</li>
|
||||
</ul>
|
||||
{{if count( $blog->_recentEntries )}}
|
||||
<h4 class='ipsType_minorHeading'>{lang="recent_entries"}</h4>
|
||||
<ul class='ipsDataList ipsDataList_reducedSpacing ipsType_medium ipsList_reset ipsType_light'>
|
||||
{{foreach $blog->_recentEntries as $entry}}
|
||||
<li class='ipsDataItem'>
|
||||
<div class='ipsDataItem_main'>
|
||||
{{if $entry->unread()}}
|
||||
<a href='{$entry->url()}' title='{lang="view_this_entry" sprintf="$entry->name"}' class=''>
|
||||
<span class='ipsItemStatus ipsItemStatus_tiny'><i class='fa fa-circle'></i></span>
|
||||
</a>
|
||||
{{endif}}
|
||||
<a href='{$entry->url()}' title='{lang="view_this_entry" sprintf="$entry->name"}' class='ipsType_break'>
|
||||
{wordbreak="$entry->name"}
|
||||
</a>
|
||||
</div>
|
||||
</li>
|
||||
{{endforeach}}
|
||||
</ul>
|
||||
{{endif}}
|
||||
</div>
|
||||
</div>
|
||||
<div class='ipsColumn ipsColumn_fluid ipsPad'>
|
||||
{{if $blog->latestEntry()}}
|
||||
<div class='ipsPhotoPanel ipsPhotoPanel_mini'>
|
||||
{template="userPhoto" app="core" params="$blog->latestEntry()->author(), 'mini'" group="global"}
|
||||
<div>
|
||||
<strong class='ipsType_minorHeading'>{lang="latest_entry"}</strong><br>
|
||||
<h3 class='ipsType_reset ipsType_sectionHead ipsType_blendLinks'>
|
||||
<a href='{$blog->latestEntry()->url()}' title='{lang="view_this_entry" sprintf="$blog->latestEntry()->name"}'>
|
||||
{{if $blog->latestEntry()->unread()}}
|
||||
<span class='ipsItemStatus' data-ipsTooltip title="{lang="unread_blog"}"><i class="fa fa-circle"></i></span>
|
||||
{{endif}}
|
||||
{wordbreak="$blog->latestEntry()->name"}
|
||||
</a>
|
||||
{{if $blog->latestEntry()->locked()}}<i class='fa fa-lock'></i> {{endif}}{$blog->latestEntry()->caption}
|
||||
{{if $blog->latestEntry()->isFutureDate() || $blog->latestEntry()->mapped('pinned') || $blog->latestEntry()->mapped('featured') || $blog->latestEntry()->hidden() === -1 || $blog->latestEntry()->hidden() === 1 || $blog->latestEntry()->status === 'draft'}}
|
||||
{{if $blog->latestEntry()->isFutureDate()}}
|
||||
<span class="ipsBadge ipsBadge_icon ipsBadge_warning" data-ipsTooltip title='{$blog->latestEntry()->futureDateBlurb()}'><i class='fa fa-clock-o'></i></span>
|
||||
{{elseif $blog->latestEntry()->hidden() === -1}}
|
||||
<span class="ipsBadge ipsBadge_icon ipsBadge_warning" data-ipsTooltip title='{$blog->latestEntry()->hiddenBlurb()}'><i class='fa fa-eye-slash'></i></span>
|
||||
{{elseif $blog->latestEntry()->hidden() === 1}}
|
||||
<span class="ipsBadge ipsBadge_icon ipsBadge_warning" data-ipsTooltip title='{lang="pending_approval"}'><i class='fa fa-warning'></i></span>
|
||||
{{endif}}
|
||||
{{if $blog->latestEntry()->status === 'draft'}}
|
||||
<span class="ipsBadge ipsBadge_icon ipsBadge_warning" data-ipsTooltip title='{lang="unpublished"}'><i class='fa fa-pencil-square-o'></i></span>
|
||||
{{endif}}
|
||||
{{if $blog->latestEntry()->mapped('pinned')}}
|
||||
<span class="ipsBadge ipsBadge_icon ipsBadge_positive" data-ipsTooltip title='{lang="pinned"}'><i class='fa fa-thumb-tack'></i></span>
|
||||
{{endif}}
|
||||
{{if $blog->latestEntry()->mapped('featured')}}
|
||||
<span class="ipsBadge ipsBadge_icon ipsBadge_positive" data-ipsTooltip title='{lang="featured"}'><i class='fa fa-star'></i></span>
|
||||
{{endif}}
|
||||
{{endif}}
|
||||
</h3>
|
||||
{{if !( $blog->owner() instanceof \IPS\Member )}}
|
||||
<p class='ipsType_medium ipsType_reset ipsType_light'>{lang="byline" htmlsprintf="trim( $blog->latestEntry()->author()->link() )"} {datetime="$blog->latestEntry()->date"}</p>
|
||||
{{endif}}
|
||||
</div>
|
||||
</div>
|
||||
<div class='ipsType_medium ipsType_richText ipsSpacer_both cBlogInfo_content'>
|
||||
{$blog->latestEntry()->content()|raw}
|
||||
</div>
|
||||
<ul class='ipsList_inline'>
|
||||
<li>
|
||||
<strong><a href='{$blog->latestEntry()->url()}' title='{lang="read_more_entry"}'>{lang="read_more"}</a></strong>
|
||||
</li>
|
||||
{{if \IPS\Settings::i()->blog_enable_rating}}
|
||||
<li>{template="rating" app="core" params="'small', $blog->latestEntry()->averageRating()" group="global"}</li>
|
||||
{{endif}}
|
||||
{{if !$blog->latestEntry()->num_comments}}
|
||||
<li class='ipsType_light'>{lang="num_comments" pluralize="$blog->latestEntry()->num_comments"}</li>
|
||||
{{else}}
|
||||
<li><a href='{$blog->latestEntry()->url()}#comments' title='{lang="see_comments_on_entry"}'>{lang="num_comments" pluralize="$blog->latestEntry()->num_comments"}</a></li>
|
||||
{{endif}}
|
||||
</ul>
|
||||
{{else}}
|
||||
<p class='ipsEmpty ipsType_center'>{lang="no_entries_yet"}</p>
|
||||
{{endif}}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</li>
|
||||
{{endforeach}}
|
||||
</ol>
|
||||
{{endif}}]]></template>
|
||||
<template template_group="widgets" template_name="blogStatistics" template_data="$stats, $orientation='vertical'" template_location="front" template_app="blog"><![CDATA[<h3 class='ipsType_reset ipsWidget_title'>{lang="block_blogStatistics"}</h3>
|
||||
<div class='ipsWidget_inner'>
|
||||
{{if $orientation == 'vertical'}}
|
||||
@@ -1186,8 +1324,8 @@
|
||||
{template="userPhoto" app="core" params="$entry->author(), 'tiny'" group="global"}
|
||||
</div>
|
||||
<div class='ipsDataItem_main'>
|
||||
<a href="{$entry->url()}" title='{lang="view_this_entry" sprintf="$entry->_title"}' class='ipsType_normal ipsType_break'>{wordbreak="$entry->name"}</a><br>
|
||||
<span class='ipsType_light ipsType_medium ipsType_break ipsContained'>{lang="byline_nodate" htmlsprintf="$entry->author()->link()"} {lang="in"} <a href='{$entry->container()->url()}' class='ipsType_blendLinks'>{$entry->container()->_title}</a></span>
|
||||
<a href="{$entry->url('getLastComment')}" title='{lang="view_this_entry" sprintf="$entry->_title"}' class='ipsType_medium ipsType_break'>{wordbreak="$entry->name"}</a><br>
|
||||
<span class='ipsType_blendLinks ipsType_light ipsType_medium ipsType_break ipsContained'>{lang="byline_nodate" htmlsprintf="$entry->author()->link()"} {lang="in"} <a href='{$entry->container()->url()}' class='ipsType_blendLinks'>{$entry->container()->_title}</a></span>
|
||||
{{if \IPS\Settings::i()->blog_enable_rating}}
|
||||
{template="rating" group="global" location="front" app="core" params="'small', $entry->averageRating()"}
|
||||
{{endif}}
|
||||
|
||||
@@ -84,5 +84,18 @@
|
||||
"100042": "4.0.12",
|
||||
"100043": "4.0.12.1",
|
||||
"100044": "4.0.13",
|
||||
"100045": "4.0.13.1"
|
||||
"100045": "4.0.13.1",
|
||||
"101000": "4.1.0 Beta 1",
|
||||
"101001": "4.1.0 Beta 2",
|
||||
"101002": "4.1.0 Beta 3",
|
||||
"101003": "4.1.0 Beta 4",
|
||||
"101004": "4.1.0 Beta 5",
|
||||
"101005": "4.1.0 Beta 6",
|
||||
"101006": "4.1.0 Beta 7",
|
||||
"101007": "4.1.0 Beta 8",
|
||||
"101008": "4.1.0 Beta 9",
|
||||
"101009": "4.1.0 Beta 10",
|
||||
"101010": "4.1.0",
|
||||
"101011": "4.1.1",
|
||||
"101012": "4.1.2"
|
||||
}
|
||||
@@ -17,5 +17,27 @@
|
||||
"allow_reuse": true,
|
||||
"menu_style": "modal",
|
||||
"embeddable": true
|
||||
},
|
||||
"blogCommentFeed": {
|
||||
"class": "\\IPS\\Widget\\PermissionCache",
|
||||
"restrict": [
|
||||
"sidebar",
|
||||
"cms"
|
||||
],
|
||||
"default_area": "",
|
||||
"allow_reuse": true,
|
||||
"menu_style": "modal",
|
||||
"embeddable": true
|
||||
},
|
||||
"blogs": {
|
||||
"class": "\\IPS\\Widget\\PermissionCache",
|
||||
"restrict": [
|
||||
"sidebar",
|
||||
"cms"
|
||||
],
|
||||
"default_area": "",
|
||||
"allow_reuse": true,
|
||||
"menu_style": "menu",
|
||||
"embeddable": true
|
||||
}
|
||||
}
|
||||
@@ -23,14 +23,28 @@ if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
* @brief Content Router extension: Entries
|
||||
*/
|
||||
class _Blog
|
||||
{
|
||||
/**
|
||||
* @brief Content Item Classes
|
||||
*/
|
||||
public $classes = array( 'IPS\blog\Entry' );
|
||||
|
||||
{
|
||||
/**
|
||||
* @brief Owned Node Classes
|
||||
*/
|
||||
public $ownedNodes = array( 'IPS\blog\Blog' );
|
||||
|
||||
/**
|
||||
* @brief Content Item Classes
|
||||
*/
|
||||
public $classes = array();
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param \IPS\Member|NULL $member If checking access, the member to check for, or NULL to not check access
|
||||
* @return void
|
||||
*/
|
||||
public function __construct( \IPS\Member $member = NULL )
|
||||
{
|
||||
if ( $member === NULL or $member->canAccessModule( \IPS\Application\Module::get( 'blog', 'blogs', 'front' ) ) )
|
||||
{
|
||||
$this->classes[] = 'IPS\blog\Entry';
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -22,8 +22,18 @@ if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
/**
|
||||
* Front Navigation Extension: Blogs
|
||||
*/
|
||||
class _Blogs
|
||||
class _Blogs extends \IPS\core\FrontNavigation\FrontNavigationAbstract
|
||||
{
|
||||
/**
|
||||
* Get Type Title which will display in the AdminCP Menu Manager
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public static function typeTitle()
|
||||
{
|
||||
return \IPS\Member::loggedIn()->language()->addToStack('frontnavigation_blogs');
|
||||
}
|
||||
|
||||
/**
|
||||
* Can access?
|
||||
*
|
||||
@@ -31,7 +41,7 @@ class _Blogs
|
||||
*/
|
||||
public function canView()
|
||||
{
|
||||
return !\IPS\Application::load('blog')->hide_tab and \IPS\Member::loggedIn()->canAccessModule( \IPS\Application\Module::get( 'blog', 'blogs' ) );
|
||||
return parent::canView() and \IPS\Member::loggedIn()->canAccessModule( \IPS\Application\Module::get( 'blog', 'blogs' ) );
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -63,14 +73,4 @@ class _Blogs
|
||||
{
|
||||
return \IPS\Dispatcher::i()->application->directory === 'blog';
|
||||
}
|
||||
|
||||
/**
|
||||
* Children
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function children()
|
||||
{
|
||||
return array();
|
||||
}
|
||||
}
|
||||
@@ -27,7 +27,7 @@ class _Blog
|
||||
/**
|
||||
* Process Form
|
||||
*
|
||||
* @param \IPS\Form\Tabbed $form The form
|
||||
* @param \IPS\Helpers\Form $form The form
|
||||
* @param \IPS\Member\Group $group Existing Group
|
||||
* @return void
|
||||
*/
|
||||
@@ -40,8 +40,9 @@ class _Blog
|
||||
$form->add(new \IPS\Helpers\Form\YesNo('g_blog_allowprivate', $group->g_blog_allowprivate, FALSE, array(), NULL, NULL, NULL, 'g_blog_allowprivate'));
|
||||
$form->add(new \IPS\Helpers\Form\YesNo('g_blog_allowownmod', $group->g_blog_allowownmod, FALSE, array(), NULL, NULL, NULL, 'g_blog_allowownmod'));
|
||||
$form->add(new \IPS\Helpers\Form\YesNo('g_blog_allowdelete', $group->g_blog_allowdelete, FALSE, array(), NULL, NULL, NULL, 'g_blog_allowdelete'));
|
||||
$form->add(new \IPS\Helpers\Form\YesNo('g_blog_allowcomment', $group->g_blog_allowcomment));
|
||||
}
|
||||
|
||||
$form->add(new \IPS\Helpers\Form\YesNo('g_blog_allowcomment', $group->g_blog_allowcomment));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -60,7 +61,8 @@ class _Blog
|
||||
$group->g_blog_allowprivate = $values['g_blog_allowprivate'];
|
||||
$group->g_blog_allowownmod = $values['g_blog_allowownmod'];
|
||||
$group->g_blog_allowdelete = $values['g_blog_allowdelete'];
|
||||
$group->g_blog_allowcomment = $values['g_blog_allowcomment'];
|
||||
}
|
||||
|
||||
$group->g_blog_allowcomment = $values['g_blog_allowcomment'];
|
||||
}
|
||||
}
|
||||
@@ -49,7 +49,7 @@ class _Upgrade
|
||||
|
||||
$file = \IPS\File::create( 'core_Attachment', $entry['entry_image'], NULL, NULL, FALSE, $filePath );
|
||||
$attachment = $file->makeAttachment('');
|
||||
$fileName = htmlentities( $attachment['attach_file'], \IPS\HTMLENTITIES, 'UTF-8', TRUE );
|
||||
$fileName = htmlspecialchars( $attachment['attach_file'], \IPS\HTMLENTITIES, 'UTF-8', TRUE );
|
||||
|
||||
$image = <<<IMAGE
|
||||
<a href="<fileStore.core_Attachment>/{$file}" class="ipsAttachLink ipsAttachLink_image" style="float:left;"><img data-fileid="{$attachment['attach_id']}" src="<fileStore.core_Attachment>/{$file}" class="ipsImage ipsImage_thumbnailed" style="margin:10px;" alt="{$fileName}"></a>
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
{
|
||||
"1": {
|
||||
"method": "dropColumn",
|
||||
"params": [
|
||||
"blog_blogs",
|
||||
"blog_view_level"
|
||||
]
|
||||
},
|
||||
"2": {
|
||||
"method": "changeIndex",
|
||||
"params": [
|
||||
"blog_blogs",
|
||||
"blog_grabber",
|
||||
{
|
||||
"type": "key",
|
||||
"name": "blog_grabber",
|
||||
"length": [
|
||||
null
|
||||
],
|
||||
"columns": [
|
||||
"blog_disabled"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -78,9 +78,9 @@ class _Upgrade
|
||||
}
|
||||
|
||||
/* Set language strings */
|
||||
\IPS\Lang::saveCustom( 'blog', "blogs_blog_{$blog->id}", html_entity_decode( $original['blog_name'], ENT_QUOTES, 'UTF-8' ) );
|
||||
\IPS\Lang::saveCustom( 'blog', "blogs_blog_{$blog->id}", \IPS\Text\Parser::utf8mb4SafeDecode( $original['blog_name'] ) );
|
||||
\IPS\Lang::saveCustom( 'blog', "blogs_blog_{$blog->id}_desc", \IPS\Text\Parser::parseStatic( $original['blog_desc'], TRUE, NULL, NULL, TRUE, TRUE, TRUE ) );
|
||||
\IPS\Lang::saveCustom( 'blog', "blogs_groupblog_name_{$blog->id}", html_entity_decode( $original['blog_groupblog_name'], ENT_QUOTES, 'UTF-8' ) );
|
||||
\IPS\Lang::saveCustom( 'blog', "blogs_groupblog_name_{$blog->id}", \IPS\Text\Parser::utf8mb4SafeDecode( $original['blog_groupblog_name'] ) );
|
||||
|
||||
$blog->save();
|
||||
}
|
||||
|
||||
@@ -81,7 +81,7 @@ class _Blog extends \IPS\Node\Model implements \IPS\Node\Ratings, \IPS\Content\E
|
||||
/**
|
||||
* @brief Icon
|
||||
*/
|
||||
public static $icon = 'file-text-o';
|
||||
public static $icon = 'file-text';
|
||||
|
||||
/**
|
||||
* @brief [Node] If the node can be "owned", the owner "type" (typically "member" or "group") and the associated database column
|
||||
@@ -473,19 +473,19 @@ class _Blog extends \IPS\Node\Model implements \IPS\Node\Ratings, \IPS\Content\E
|
||||
}
|
||||
|
||||
/**
|
||||
* Get URL
|
||||
*
|
||||
* @return \IPS\Http\Url
|
||||
* @brief URL Base
|
||||
*/
|
||||
public function url()
|
||||
{
|
||||
if( $this->_url === NULL )
|
||||
{
|
||||
$this->_url = \IPS\Http\Url::internal( "app=blog&module=blogs&controller=view&id={$this->_id}", 'front', 'blogs_blog', array( $this->seo_name ) );
|
||||
}
|
||||
|
||||
return $this->_url;
|
||||
}
|
||||
public static $urlBase = 'app=blog&module=blogs&controller=view&id=';
|
||||
|
||||
/**
|
||||
* @brief URL Base
|
||||
*/
|
||||
public static $urlTemplate = 'blogs_blog';
|
||||
|
||||
/**
|
||||
* @brief SEO Title Column
|
||||
*/
|
||||
public static $seoTitleColumn = 'seo_name';
|
||||
|
||||
/**
|
||||
* @brief Cached latest entry
|
||||
@@ -672,7 +672,7 @@ class _Blog extends \IPS\Node\Model implements \IPS\Node\Ratings, \IPS\Content\E
|
||||
*/
|
||||
protected function get__title()
|
||||
{
|
||||
return htmlentities( \IPS\Member::loggedIn()->language()->get( static::$titleLangPrefix . $this->_id ), ENT_QUOTES | \IPS\HTMLENTITIES, 'UTF-8', FALSE );
|
||||
return htmlspecialchars( \IPS\Member::loggedIn()->language()->get( static::$titleLangPrefix . $this->_id ), ENT_QUOTES | \IPS\HTMLENTITIES, 'UTF-8', FALSE );
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -70,7 +70,7 @@ class _Feed extends \IPS\Patterns\ActiveRecord
|
||||
|
||||
if ( $article['link'] )
|
||||
{
|
||||
$link = htmlentities( $this->import_show_link, ENT_QUOTES | \IPS\HTMLENTITIES, 'UTF-8', FALSE );
|
||||
$link = htmlspecialchars( $this->import_show_link, ENT_QUOTES | \IPS\HTMLENTITIES, 'UTF-8', FALSE );
|
||||
$entry->content .= "<br><p><a href='{$article['link']}'>{$link}</a></p>";
|
||||
}
|
||||
|
||||
|
||||
@@ -73,7 +73,7 @@ class _Comment extends \IPS\Content\Comment implements \IPS\Content\EditHistory,
|
||||
/**
|
||||
* @brief Icon
|
||||
*/
|
||||
public static $icon = 'file-text-o';
|
||||
public static $icon = 'file-text';
|
||||
|
||||
/**
|
||||
* @brief Reputation Type
|
||||
|
||||
@@ -120,7 +120,7 @@ class _Entry extends \IPS\Content\Item implements
|
||||
/**
|
||||
* @brief Icon
|
||||
*/
|
||||
public static $icon = 'file-text-o';
|
||||
public static $icon = 'file-text';
|
||||
|
||||
/**
|
||||
* @brief The map of permission columns
|
||||
@@ -203,29 +203,21 @@ class _Entry extends \IPS\Content\Item implements
|
||||
* @brief Cached URLs
|
||||
*/
|
||||
protected $_url = array();
|
||||
|
||||
/**
|
||||
* Get URL
|
||||
*
|
||||
* @param string|NULL $action Action
|
||||
* @return \IPS\Http\Url
|
||||
*/
|
||||
public function url( $action=NULL )
|
||||
{
|
||||
$_key = md5( $action );
|
||||
|
||||
if( !isset( $this->_url[ $_key ] ) )
|
||||
{
|
||||
$this->_url[ $_key ] = \IPS\Http\Url::internal( "app=blog&module=blogs&controller=entry&id={$this->id}", 'front', 'blog_entry', $this->name_seo );
|
||||
|
||||
if ( $action )
|
||||
{
|
||||
$this->_url[ $_key ] = $this->_url[ $_key ]->setQueryString( 'do', $action );
|
||||
}
|
||||
}
|
||||
|
||||
return $this->_url[ $_key ];
|
||||
}
|
||||
/**
|
||||
* @brief URL Base
|
||||
*/
|
||||
public static $urlBase = 'app=blog&module=blogs&controller=entry&id=';
|
||||
|
||||
/**
|
||||
* @brief URL Base
|
||||
*/
|
||||
public static $urlTemplate = 'blog_entry';
|
||||
|
||||
/**
|
||||
* @brief SEO Title Column
|
||||
*/
|
||||
public static $seoTitleColumn = 'name_seo';
|
||||
|
||||
/**
|
||||
* Can view this entry
|
||||
@@ -307,13 +299,13 @@ class _Entry extends \IPS\Content\Item implements
|
||||
}
|
||||
|
||||
/**
|
||||
* Additional WHERE clauses for New Content view
|
||||
* Additional WHERE clauses for Follow view
|
||||
*
|
||||
* @param bool $joinContainer If true, will join container data (set to TRUE if your $where clause depends on this data)
|
||||
* @param array $joins Other joins
|
||||
* @return array
|
||||
*/
|
||||
public static function vncWhere( &$joinContainer, &$joins )
|
||||
public static function followWhere( &$joinContainer, &$joins )
|
||||
{
|
||||
$joinContainer = TRUE;
|
||||
if ( \IPS\Member::loggedIn()->member_id )
|
||||
@@ -325,7 +317,7 @@ class _Entry extends \IPS\Content\Item implements
|
||||
$where = array( \IPS\Content::socialGroupGetItemsWithPermissionWhere( 'blog_blogs.blog_social_group', \IPS\Member::loggedIn() ) );
|
||||
}
|
||||
|
||||
return array_merge( parent::vncWhere( $joinContainer, $joins ), $where );
|
||||
return array_merge( parent::followWhere( $joinContainer, $joins ), $where );
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -0,0 +1,58 @@
|
||||
<?php
|
||||
/**
|
||||
* @brief blogCommentFeed Widget
|
||||
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
|
||||
* @copyright (c) 2001 - SVN_YYYY Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/legal/standards/
|
||||
* @package IPS Social Suite
|
||||
* @subpackage blog
|
||||
* @since 13 Jul 2015
|
||||
* @version SVN_VERSION_NUMBER
|
||||
*/
|
||||
|
||||
namespace IPS\blog\widgets;
|
||||
|
||||
/* To prevent PHP errors (extending class does not exist) revealing path */
|
||||
if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
{
|
||||
header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' );
|
||||
exit;
|
||||
}
|
||||
|
||||
/**
|
||||
* blogCommentFeed Widget
|
||||
*/
|
||||
class _blogCommentFeed extends \IPS\Content\WidgetComment
|
||||
{
|
||||
/**
|
||||
* @brief Widget Key
|
||||
*/
|
||||
public $key = 'blogCommentFeed';
|
||||
|
||||
/**
|
||||
* @brief App
|
||||
*/
|
||||
public $app = 'blog';
|
||||
|
||||
/**
|
||||
* @brief Plugin
|
||||
*/
|
||||
public $plugin = '';
|
||||
|
||||
/**
|
||||
* Class
|
||||
*/
|
||||
protected static $class = 'IPS\blog\Entry\Comment';
|
||||
|
||||
/**
|
||||
* Get where clause
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
protected function buildWhere()
|
||||
{
|
||||
$where = parent::buildWhere();
|
||||
$where['item'][] = array( 'entry_status!=?', 'draft' );
|
||||
return $where;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,146 @@
|
||||
<?php
|
||||
/**
|
||||
* @brief blogs Widget
|
||||
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
|
||||
* @copyright (c) 2001 - SVN_YYYY Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/legal/standards/
|
||||
* @package IPS Social Suite
|
||||
* @subpackage blog
|
||||
* @since 13 Jul 2015
|
||||
* @version SVN_VERSION_NUMBER
|
||||
*/
|
||||
|
||||
namespace IPS\blog\widgets;
|
||||
|
||||
/* To prevent PHP errors (extending class does not exist) revealing path */
|
||||
if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
{
|
||||
header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' );
|
||||
exit;
|
||||
}
|
||||
|
||||
/**
|
||||
* blogs Widget
|
||||
*/
|
||||
class _blogs extends \IPS\Widget\PermissionCache
|
||||
{
|
||||
/**
|
||||
* @brief Widget Key
|
||||
*/
|
||||
public $key = 'blogs';
|
||||
|
||||
/**
|
||||
* @brief App
|
||||
*/
|
||||
public $app = 'blog';
|
||||
|
||||
/**
|
||||
* @brief Plugin
|
||||
*/
|
||||
public $plugin = '';
|
||||
|
||||
/**
|
||||
* Specify widget configuration
|
||||
*
|
||||
* @param null|\IPS\Helpers\Form $form Form object
|
||||
* @return null|\IPS\Helpers\Form
|
||||
*/
|
||||
public function configuration( &$form=null )
|
||||
{
|
||||
if ( $form === null )
|
||||
{
|
||||
$form = new \IPS\Helpers\Form;
|
||||
}
|
||||
|
||||
/* Block title */
|
||||
$form->add( new \IPS\Helpers\Form\Text( 'widget_feed_title', isset( $this->configuration['widget_feed_title'] ) ? $this->configuration['widget_feed_title'] : \IPS\Member::loggedIn()->language()->addToStack( 'blogs' ) ) );
|
||||
|
||||
/* Author */
|
||||
$author = NULL;
|
||||
try
|
||||
{
|
||||
if ( isset( $this->configuration['widget_feed_author'] ) and is_array( $this->configuration['widget_feed_author'] ) )
|
||||
{
|
||||
foreach( $this->configuration['widget_feed_author'] as $id )
|
||||
{
|
||||
$author[ $id ] = \IPS\Member::load( $id );
|
||||
}
|
||||
}
|
||||
}
|
||||
catch( \OutOfRangeException $ex ) { }
|
||||
$form->add( new \IPS\Helpers\Form\Member( 'widget_feed_author', $author, FALSE, array( 'multiple' => true ) ) );
|
||||
|
||||
|
||||
|
||||
$form->add( new \IPS\Helpers\Form\Select( 'widget_blog_last_date', isset( $this->configuration['widget_blog_last_date'] ) ? $this->configuration['widget_blog_last_date'] : '0', FALSE, array(
|
||||
'options' => array(
|
||||
0 => 'show_all',
|
||||
1 => 'today',
|
||||
5 => 'last_5_days',
|
||||
7 => 'last_7_days',
|
||||
10 => 'last_10_days',
|
||||
15 => 'last_15_days',
|
||||
20 => 'last_20_days',
|
||||
25 => 'last_25_days',
|
||||
30 => 'last_30_days',
|
||||
60 => 'last_60_days',
|
||||
90 => 'last_90_days',
|
||||
)
|
||||
) ) );
|
||||
|
||||
|
||||
/* Number to show */
|
||||
$form->add( new \IPS\Helpers\Form\Number( 'widget_feed_show', isset( $this->configuration['widget_feed_show'] ) ? $this->configuration['widget_feed_show'] : 5, TRUE ) );
|
||||
|
||||
$form->add( new \IPS\Helpers\Form\Select( 'widget_feed_sort_on', isset( $this->configuration['widget_feed_sort_on'] ) ? $this->configuration['widget_feed_sort_on'] : 'blog_edate', FALSE, array( 'options' => array(
|
||||
'blog_edate' => 'widget__blog_edate',
|
||||
'blog_entries' => 'widget__blog_count_entries',
|
||||
'blog_comments' => 'widget__blog_count_comments'
|
||||
) ) ), NULL, NULL, NULL, 'widget_feed_sort_on' );
|
||||
|
||||
$form->add( new \IPS\Helpers\Form\Select( 'widget_feed_sort_dir', isset( $this->configuration['widget_feed_sort_dir'] ) ? $this->configuration['widget_feed_sort_dir'] : 'desc', FALSE, array(
|
||||
'options' => array(
|
||||
'desc' => 'descending',
|
||||
'asc' => 'ascending'
|
||||
)
|
||||
) ) );
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Render a widget
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function render()
|
||||
{
|
||||
$where = array( array( 'blog_disabled=0 AND blog_social_group IS NULL' ) );
|
||||
$sortBy = ( isset( $this->configuration['widget_feed_sort_on'] ) and isset( $this->configuration['widget_feed_sort_dir'] ) ) ? ( $this->configuration['widget_feed_sort_on'] . ' ' . $this->configuration['widget_feed_sort_dir'] ) : NULL;
|
||||
$limit = isset( $this->configuration['widget_feed_show'] ) ? $this->configuration['widget_feed_show'] : 5;
|
||||
|
||||
if ( isset( $this->configuration['widget_feed_author'] ) and is_array( $this->configuration['widget_feed_author'] ) )
|
||||
{
|
||||
$where[] = array( \IPS\Db::i()->in( 'blog_member_id', $this->configuration['widget_feed_author'] ) );
|
||||
}
|
||||
|
||||
/* Get results */
|
||||
$blogs = array();
|
||||
|
||||
foreach( \IPS\Db::i()->select( '*', 'blog_blogs', $where, $sortBy, array( 0, $limit ) ) as $row )
|
||||
{
|
||||
$blog = \IPS\blog\Blog::constructFromData( $row );
|
||||
$blog->coverPhoto()->editable = false;
|
||||
$blogs[] = $blog;
|
||||
}
|
||||
|
||||
if ( count( $blogs ) )
|
||||
{
|
||||
return $this->output( $blogs, isset( $this->configuration['widget_feed_title'] ) ? $this->configuration['widget_feed_title'] : \IPS\Member::loggedIn()->language()->addToStack( 'blogs' ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
return '';
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user