Version 4.1.2
This commit is contained in:
1 parent
3ba79295ee
commit
28bd025b35
1131 files changed
+63658
-20579
No files matched your search
@@ -1,13 +1,13 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<emails><template><template_app>downloads</template_app><template_name>digests__comment</template_name><template_content_html><![CDATA[<tr style='border-bottom: 1px solid #eeeeee'>
|
||||
<td width='120' align='center' valign='top'>
|
||||
<td dir='{dir}' width='120' align='center' valign='top'>
|
||||
{{if $comment->item()->primary_screenshot_thumb}}
|
||||
<img src='{$comment->item()->primary_screenshot_thumb}' style='border: 1px solid #000; vertical-align: middle;' width='100' height='100'>
|
||||
{{else}}
|
||||
<div style='width: 100px; height: 100px; background: #f5f5f5'> </div>
|
||||
{{endif}}
|
||||
</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_file", FALSE, array( 'sprintf' => array( $comment->author()->name ) ) )}
|
||||
</p>
|
||||
@@ -31,30 +31,30 @@
|
||||
|
||||
<table width='100%' cellpadding='0' cellspacing='0' border='0'>
|
||||
<tr>
|
||||
<td width='40' valign='top' class='hidePhone' style='width: 0; max-height: 0; overflow: hidden; float: left;'>
|
||||
<td dir='{dir}' width='40' valign='top' class='hidePhone' style='width: 0; max-height: 0; overflow: hidden; float: left;'>
|
||||
<img src='{$content->author()->photo}' width='40' height='40' style='border: 1px solid #777777; vertical-align: middle;'>
|
||||
</td>
|
||||
<td width='30' valign='top' class='hidePhone' style='width: 0; max-height: 0; overflow: hidden; float: left;'>
|
||||
<td dir='{dir}' width='30' valign='top' class='hidePhone' style='width: 0; max-height: 0; overflow: hidden; float: left;'>
|
||||
<br />
|
||||
<span style='display: block; width: 0px; height: 0px; border-width: 15px; border-color: transparent #f9f9f9 transparent transparent; border-style: solid'></span>
|
||||
</td>
|
||||
<td valign='top' style='background: #f9f9f9;'>
|
||||
<td dir='{dir}' valign='top' style='background: #f9f9f9;'>
|
||||
<table width='100%' cellpadding='10' cellspacing='0' border='0'>
|
||||
<tr>
|
||||
<td>
|
||||
<td dir='{dir}'>
|
||||
<table width='100%' cellpadding='5' cellspacing='0' border='0'>
|
||||
<tr>
|
||||
<td style="font-family: 'Helvetica Neue', helvetica, sans-serif; line-height: 1.5; font-size: 14px; color: #8d8d8d">
|
||||
<td dir='{dir}' style="font-family: 'Helvetica Neue', helvetica, sans-serif; line-height: 1.5; font-size: 14px; color: #8d8d8d">
|
||||
{$email->language->addToStack("email_posted_in", FALSE, array( 'sprintf' => array( $content->container()->_title ) ) )}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="font-family: 'Helvetica Neue', helvetica, sans-serif; line-height: 1.5; font-size: 14px;">
|
||||
<td dir='{dir}' style="font-family: 'Helvetica Neue', helvetica, sans-serif; line-height: 1.5; font-size: 14px;">
|
||||
{$email->parseTextForEmail( $content->content() )|raw}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<td dir='{dir}'>
|
||||
<a href='{$content->url()}' style="color: #ffffff; font-family: 'Helvetica Neue', helvetica, sans-serif; text-decoration: none; font-size: 14px; background: {setting="email_color"}; line-height: 32px; padding: 0 10px; display: inline-block; border-radius: 3px;">{$email->language->addToStack("go_to_this_x", FALSE, array( 'sprintf' => array( mb_strtolower( $email->language->addToStack( $content::$title, FALSE ) ) ) ) )}</a>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -72,14 +72,14 @@
|
||||
{$email->language->addToStack("go_to_this_x", FALSE, array( 'sprintf' => array( mb_strtolower( $email->language->addToStack( $content::$title, FALSE ) ) ) ) )}: {$content->url()}
|
||||
|
||||
-- {setting="board_name"}]]></template_content_plaintext></template><template><template_app>downloads</template_app><template_name>digests__item</template_name><template_content_html><![CDATA[<tr style='border-bottom: 1px solid #eeeeee'>
|
||||
<td width='120' align='center' valign='top'>
|
||||
<td dir='{dir}' width='120' align='center' valign='top'>
|
||||
{{if $file->primary_screenshot_thumb}}
|
||||
<img src='{$file->primary_screenshot_thumb}' style='border: 1px solid #000; vertical-align: middle;' width='100' height='100'>
|
||||
{{else}}
|
||||
<div style='width: 100px; height: 100px; background: #f5f5f5'> </div>
|
||||
{{endif}}
|
||||
</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_file_in", FALSE, array( 'sprintf' => array( $file->author()->name, $file->container()->_title ) ) )}
|
||||
</p>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<javascript app="downloads">
|
||||
<file javascript_app="downloads" javascript_location="front" javascript_path="controllers/submit" javascript_name="ips.submit.main.js" javascript_type="controller" javascript_version="100045" javascript_position="1000050"><![CDATA[/**
|
||||
<file javascript_app="downloads" javascript_location="front" javascript_path="controllers/submit" javascript_name="ips.submit.main.js" javascript_type="controller" javascript_version="101012" javascript_position="1000050"><![CDATA[/**
|
||||
* IPS Social Suite 4
|
||||
* (c) 2013 Invision Power Services - http://www.invisionpower.com
|
||||
*
|
||||
@@ -395,7 +395,7 @@
|
||||
}
|
||||
});
|
||||
}(jQuery, _));]]></file>
|
||||
<file javascript_app="downloads" javascript_location="front" javascript_path="controllers/view" javascript_name="ips.view.changeLog.js" javascript_type="controller" javascript_version="100045" javascript_position="1000100"><![CDATA[/**
|
||||
<file javascript_app="downloads" javascript_location="front" javascript_path="controllers/view" javascript_name="ips.view.changeLog.js" javascript_type="controller" javascript_version="101012" javascript_position="1000100"><![CDATA[/**
|
||||
* IPS Social Suite 4
|
||||
* (c) 2013 Invision Power Services - http://www.invisionpower.com
|
||||
*
|
||||
@@ -517,7 +517,7 @@
|
||||
|
||||
});
|
||||
}(jQuery, _));]]></file>
|
||||
<file javascript_app="downloads" javascript_location="front" javascript_path="controllers/view" javascript_name="ips.view.download.js" javascript_type="controller" javascript_version="100045" javascript_position="1000100">/**
|
||||
<file javascript_app="downloads" javascript_location="front" javascript_path="controllers/view" javascript_name="ips.view.download.js" javascript_type="controller" javascript_version="101012" javascript_position="1000100">/**
|
||||
* IPS Social Suite 4
|
||||
* (c) 2013 Invision Power Services - http://www.invisionpower.com
|
||||
*
|
||||
@@ -638,7 +638,7 @@
|
||||
|
||||
});
|
||||
}(jQuery, _));</file>
|
||||
<file javascript_app="downloads" javascript_location="front" javascript_path="templates" javascript_name="ips.templates.submit.js" javascript_type="template" javascript_version="100045" javascript_position="1000150"><![CDATA[/* VIEW TEMPLATES */
|
||||
<file javascript_app="downloads" javascript_location="front" javascript_path="templates" javascript_name="ips.templates.submit.js" javascript_type="template" javascript_version="101012" javascript_position="1000150"><![CDATA[/* VIEW TEMPLATES */
|
||||
ips.templates.set('downloads.submit.screenshot', " \
|
||||
<div class='ipsGrid_span3 ipsAttach ipsImageAttach ipsPad_half ipsAreaBackground_light' id='{{id}}' data-role='file' data-fileid='{{id}}' data-fullsizeurl='{{imagesrc}}' data-thumbnailurl='{{thumbnail}}' data-isImage='1'>\
|
||||
<ul class='ipsList_inline ipsImageAttach_controls'>\
|
||||
@@ -659,7 +659,7 @@ ips.templates.set('downloads.submit.screenshot', " \
|
||||
{{/thumb}}\
|
||||
</div>\
|
||||
</label>\
|
||||
<h2 class='ipsType_reset ipsAttach_title ipsType_medium' data-role='title'>{{title}}</h2>\
|
||||
<h2 class='ipsType_reset ipsAttach_title ipsType_medium ipsTruncate ipsTruncate_line' data-role='title'>{{title}}</h2>\
|
||||
<p class='ipsType_light'>{{size}} · <span data-role='status'>{{statusText}}</span></p>\
|
||||
</div>\
|
||||
");
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<language>
|
||||
<app key="downloads" version="100045">
|
||||
<app key="downloads" version="101012">
|
||||
<word key="__app_downloads" js="0">Downloads</word>
|
||||
<word key="frontnavigation_downloads" js="0">Downloads</word>
|
||||
<word key="__indefart_downloads_file_comment" js="0">a comment on a file</word>
|
||||
@@ -11,10 +11,12 @@
|
||||
<word key="menu__downloads_stats" js="0">Downloads</word>
|
||||
<word key="module__downloads_stats" js="0">Statistics</word>
|
||||
<word key="file_download" js="0">File Download</word>
|
||||
<word key="downloads_file_container" js="0">category</word>
|
||||
<word key="filestorage__downloads_Files" js="0">IP.Downloads Files</word>
|
||||
<word key="filestorage__downloads_Screenshots" js="0">IP.Downloads Screenshots</word>
|
||||
<word key="filestorage__downloads_FileField" js="0">IP.Downloads Custom Fields</word>
|
||||
<word key="downloads_files" js="0">Downloads Files</word>
|
||||
<word key="downloads_file" js="0">File</word>
|
||||
<word key="modlog__action_restorebackup" js="0"><![CDATA[Restored a previous version for a file: <a href='%s'>%s</a>]]></word>
|
||||
<word key="modlog__action_visibilitybackup" js="0"><![CDATA[Toggled visibility for a previous version for a file: <a href='%s'>%s</a>]]></word>
|
||||
<word key="modlog__action_deletebackup" js="0"><![CDATA[Deleted a previous version for a file: <a href='%s'>%s</a>]]></word>
|
||||
@@ -198,10 +200,11 @@
|
||||
<word key="screenshots" js="0">Screenshots</word>
|
||||
<word key="screenshots_ct" js="0">{# [1:Screenshot][?:Screenshots]}</word>
|
||||
<word key="url_screenshots" js="0">Linked Screenshots</word>
|
||||
<word key="file_title" js="0">File name</word>
|
||||
<word key="file_title" js="0">File Name</word>
|
||||
<word key="file_submitter" js="0">Submitter</word>
|
||||
<word key="file_submitted" js="0">Submitted</word>
|
||||
<word key="view_file" js="0">View File</word>
|
||||
<word key="version" js="0">Version</word>
|
||||
<word key="file_version" js="0">Version number</word>
|
||||
<word key="file_tags" js="0">Tags</word>
|
||||
<word key="file_changelog" js="0">What's New</word>
|
||||
@@ -217,7 +220,6 @@
|
||||
<word key="x_purchases" js="0">{# [1:purchase][?:purchases]}</word>
|
||||
<word key="num_downloads" js="0">{# [1:download][?:downloads]}</word>
|
||||
<word key="files_no_number" js="0">{!# [1:file][?:files]}</word>
|
||||
<word key="downloads_file" js="0">File</word>
|
||||
<word key="downloads_file_comment" js="0">File Comment</word>
|
||||
<word key="downloads_file_review" js="0">File Review</word>
|
||||
<word key="downloads_file_pl" js="0">Files</word>
|
||||
@@ -462,6 +464,10 @@
|
||||
<word key="mailsub__downloads_notification_new_file_version" js="0"><![CDATA[{$content->author()->name|raw} has uploaded a new version of {$content->mapped("title")|raw}]]></word>
|
||||
<word key="notification__new_file_version" js="0">%s uploaded a new version of %s</word>
|
||||
<word key="emailtpl_notification_new_file_version" js="0">New File Version Notification</word>
|
||||
<word key="block_downloadsCommentFeed" js="0">Download Comments</word>
|
||||
<word key="block_downloadsCommentFeed_desc" js="0">Display a feed of comments</word>
|
||||
<word key="block_downloadsReviewFeed" js="0">Download Reviews</word>
|
||||
<word key="block_downloadsReviewFeed_desc" js="0">Display a feed of reviews</word>
|
||||
<word key="makePrimaryScreenshot" js="1">Make this the primary screenshot</word>
|
||||
<word key="removeScreenshot" js="1">Remove this screenshot</word>
|
||||
</app>
|
||||
|
||||
@@ -70,7 +70,7 @@
|
||||
</div>
|
||||
{template="categoryMenu" group="browse" params="$category->children()"}
|
||||
|
||||
{{if \IPS\downloads\Category::canOnAny('add')}}
|
||||
{{if \IPS\downloads\Category::canOnAny('add') AND ( !$category OR $category->can('add') ) }}
|
||||
<ul class="ipsToolList ipsToolList_horizontal ipsResponsive_hidePhone ipsClearfix ipsSpacer_both">
|
||||
{template="categoryButtons" group="browse" params="\IPS\downloads\Category::canOnAny('add'), $category"}
|
||||
</ul>
|
||||
@@ -80,7 +80,7 @@
|
||||
{$table|raw}
|
||||
</div>
|
||||
|
||||
{{if \IPS\downloads\Category::canOnAny('add')}}
|
||||
{{if \IPS\downloads\Category::canOnAny('add') AND ( !$category OR $category->can('add') ) }}
|
||||
<ul class="ipsToolList ipsToolList_horizontal ipsResponsive_showPhone ipsResponsive_block ipsClearfix ipsSpacer_top">
|
||||
{template="categoryButtons" group="browse" params="\IPS\downloads\Category::canOnAny('add'), $category"}
|
||||
</ul>
|
||||
@@ -90,9 +90,11 @@
|
||||
{template="follow" app="core" group="global" params="'downloads', 'category', $category->_id, \IPS\downloads\File::containerFollowers( $category )->count( TRUE )"}
|
||||
</div>]]></template>
|
||||
<template template_group="browse" template_name="categoryButtons" template_data="$canSubmitFiles, $currentCategory=NULL" template_location="front" template_app="downloads"><![CDATA[
|
||||
{{if $canSubmitFiles AND ( !$currentCategory OR $currentCategory->can('add') ) }}
|
||||
<li class='ipsToolList_primaryAction'>
|
||||
<a class="ipsButton ipsButton_medium ipsButton_important ipsButton_fullWidth" href="{{if $currentCategory}}{url="app=downloads&module=downloads&controller=submit&category={$currentCategory->id}&_new=1" seoTemplate="downloads_submit"}{{else}}{url="app=downloads&module=downloads&controller=submit&_new=1" seoTemplate="downloads_submit"}{{endif}}" data-ipsDialog data-ipsDialog-title='{lang="submit_a_file"}' data-ipsDialog-size='narrow'>{lang="submit_a_file"}</a>
|
||||
</li>]]></template>
|
||||
</li>
|
||||
{{endif}}]]></template>
|
||||
<template template_group="browse" template_name="categoryMenu" template_data="$categories" template_location="front" template_app="downloads"><![CDATA[<ul class='ipsMenu ipsMenu_auto ipsHide' id='elDownloadsCategories_menu'>
|
||||
{{foreach $categories as $cat}}
|
||||
{{if $cat->can('view')}}
|
||||
@@ -137,13 +139,16 @@
|
||||
{{if $lastPost = $category->lastFile()}}
|
||||
<li>{template="userPhoto" app="core" group="global" params="$lastPost->author(), 'tiny'"}</li>
|
||||
<li><a href="{$lastPost->url()}" class='ipsType_break ipsContained'>{$lastPost->name}</a></li>
|
||||
<li>{lang="byline_nodate" htmlsprintf="$lastPost->author()->link()"}</li>
|
||||
<li class='ipsType_blendLinks'>{lang="byline_nodate" htmlsprintf="$lastPost->author()->link()"}</li>
|
||||
<li data-short="1 dy" class="ipsType_light">{datetime="$lastPost->submitted"}</li>
|
||||
{{endif}}
|
||||
</ul>
|
||||
{{if method_exists( $table, 'canModerate' ) AND $table->canModerate()}}
|
||||
<div class='ipsDataItem_modCheck'>
|
||||
<input type='checkbox' data-role='moderation' name="moderate[{$category->_id}]" data-actions="{expression="implode( ' ', $table->multimodActions( $category ) )"}" data-state=''>
|
||||
<span class='ipsCustomInput'>
|
||||
<input type='checkbox' data-role='moderation' name="moderate[{$category->_id}]" data-actions="{expression="implode( ' ', $table->multimodActions( $category ) )"}" data-state=''>
|
||||
<span></span>
|
||||
</span>
|
||||
</div>
|
||||
{{endif}}
|
||||
</li>
|
||||
@@ -407,12 +412,6 @@
|
||||
<span class='ipsItemStatus ipsItemStatus_small' data-ipsTooltip title='{{if $file->unread() === -1}}{lang="new"}{{else}}{lang="updated"}{{endif}}'><i class="fa fa-circle"></i></span>
|
||||
{{endif}}
|
||||
|
||||
{{if $file->prefix()}}
|
||||
{template="prefix" group="global" app="core" params="$file->prefix( TRUE ), $file->prefix()"}
|
||||
{{endif}}
|
||||
|
||||
<a href='{$file->url()}' title='{lang="view_this_file" sprintf="$file->name"}' {{if $file->canEdit()}}data-role="editableTitle"{{endif}}>{wordbreak="$file->name"}</a>
|
||||
|
||||
{{if $file->mapped('pinned') || $file->mapped('featured') || $file->hidden() === -1 || $file->hidden() === 1}}
|
||||
{{if $file->hidden() === -1}}
|
||||
<span class="ipsBadge ipsBadge_small ipsBadge_icon ipsBadge_warning" data-ipsTooltip title='{$file->hiddenBlurb()}'><i class='fa fa-eye-slash'></i></span>
|
||||
@@ -426,6 +425,12 @@
|
||||
<span class="ipsBadge ipsBadge_small ipsBadge_icon ipsBadge_positive" data-ipsTooltip title='{lang="featured"}'><i class='fa fa-star'></i></span>
|
||||
{{endif}}
|
||||
{{endif}}
|
||||
|
||||
{{if $file->prefix()}}
|
||||
{template="prefix" group="global" app="core" params="$file->prefix( TRUE ), $file->prefix()"}
|
||||
{{endif}}
|
||||
|
||||
<a href='{$file->url()}' title='{lang="view_this_file" sprintf="$file->name"}' {{if $file->canEdit()}}data-role="editableTitle"{{endif}}>{wordbreak="$file->name"}</a>
|
||||
</h4>
|
||||
<p class='ipsType_reset ipsType_light ipsType_blendLinks'>
|
||||
{lang="byline_nodate" htmlsprintf="$file->author()->link()"}
|
||||
@@ -485,7 +490,10 @@
|
||||
</div>
|
||||
{{if method_exists( $table, 'canModerate' ) AND $table->canModerate()}}
|
||||
<div class='ipsDataItem_modCheck'>
|
||||
<input type='checkbox' data-role='moderation' name="moderate[{$file->id}]" data-actions="{expression="implode( ' ', $table->multimodActions( $file ) )"}" data-state='{{if $file->tableStates()}}{$file->tableStates()}{{endif}}'>
|
||||
<span class='ipsCustomInput'>
|
||||
<input type='checkbox' data-role='moderation' name="moderate[{$file->id}]" data-actions="{expression="implode( ' ', $table->multimodActions( $file ) )"}" data-state='{{if $file->tableStates()}}{$file->tableStates()}{{endif}}'>
|
||||
<span></span>
|
||||
</span>
|
||||
</div>
|
||||
{{endif}}
|
||||
</li>
|
||||
@@ -534,55 +542,164 @@
|
||||
</div>
|
||||
</div>]]></template>
|
||||
<template template_group="global" template_name="link" template_data="$file" template_location="global" template_app="downloads"><![CDATA[<a href="{$file->url()}" class="ipsType_blendLinks" target="_blank">{wordbreak="$file->name"}</a>]]></template>
|
||||
<template template_group="global" template_name="snippet" template_data="$activity, $type='activity'" template_location="front" template_app="downloads"><![CDATA[
|
||||
{{if $activity instanceof \IPS\downloads\File\Comment or $activity instanceof \IPS\downloads\File\Review}}
|
||||
{{$item = $activity->item();}}
|
||||
{{else}}
|
||||
{{$item = $activity;}}
|
||||
{{endif}}
|
||||
<template template_group="global" template_name="manageFollowRow" template_data="$table, $headers, $rows, $includeFirstCommentInCommentCount=TRUE" template_location="front" template_app="downloads"><![CDATA[{{if count( $rows )}}
|
||||
{{foreach $rows as $row}}
|
||||
{{$idField = $row::$databaseColumnId;}}
|
||||
<li class="ipsDataItem ipsDataItem_responsivePhoto {{if $row->unread()}}ipsDataItem_unread{{endif}} {{if method_exists( $row, 'tableClass' ) && $row->tableClass()}}ipsDataItem_{$row->tableClass()}{{endif}} {{if $row->hidden()}}ipsModerated{{endif}}" data-controller='core.front.system.manageFollowed' data-followID='{$row->_followData['follow_area']}-{$row->_followData['follow_rel_id']}'>
|
||||
<div class='ipsDataItem_generic ipsDataItem_size2'>
|
||||
<div class='ipsThumb ipsThumb_bg ipsThumb_small' style='background-image: url( {file="$row->primary_screenshot" extension="downloads_Screenshots"} )'></div>
|
||||
</div>
|
||||
<div class='ipsDataItem_main ipsPos_middle'>
|
||||
<h4 class='ipsDataItem_title ipsType_break ipsType_normal'>
|
||||
{{if $row->mapped('locked')}}
|
||||
<i class="fa fa-lock"></i>
|
||||
{{endif}}
|
||||
|
||||
<div class='cSearchActivity_info ipsContained'>
|
||||
<div class='ipsColumns'>
|
||||
{{if $row->mapped('pinned') || $row->mapped('featured') || $row->hidden() === -1 || $row->hidden() === 1}}
|
||||
<span>
|
||||
{{if $row->hidden() === -1}}
|
||||
<span class="ipsBadge ipsBadge_icon ipsBadge_small ipsBadge_warning" data-ipsTooltip title='{$row->hiddenBlurb()}'><i class='fa fa-eye-slash'></i></span>
|
||||
{{elseif $row->hidden() === 1}}
|
||||
<span class="ipsBadge ipsBadge_icon ipsBadge_small ipsBadge_warning" data-ipsTooltip title='{lang="pending_approval"}'><i class='fa fa-warning'></i></span>
|
||||
{{endif}}
|
||||
{{if $row->mapped('pinned')}}
|
||||
<span class="ipsBadge ipsBadge_icon ipsBadge_small ipsBadge_positive" data-ipsTooltip title='{lang="pinned"}'><i class='fa fa-thumb-tack'></i></span>
|
||||
{{endif}}
|
||||
{{if $row->mapped('featured')}}
|
||||
<span class="ipsBadge ipsBadge_icon ipsBadge_small ipsBadge_positive" data-ipsTooltip title='{lang="featured"}'><i class='fa fa-star'></i></span>
|
||||
{{endif}}
|
||||
</span>
|
||||
{{endif}}
|
||||
|
||||
{{if $row->prefix()}}
|
||||
{template="prefix" group="global" app="core" params="$row->prefix( TRUE ), $row->prefix()"}
|
||||
{{endif}}
|
||||
|
||||
<a href='{$row->url()}'>
|
||||
{{if $row->mapped('title')}}{wordbreak="$row->mapped('title')"}{{else}}<em class="ipsType_light">{lang="content_deleted"}</em>{{endif}}
|
||||
</a>
|
||||
</h4>
|
||||
<div class='ipsDataItem_meta ipsType_light ipsType_blendLinks' data-ipsTruncate data-ipsTruncate-size='2 lines' data-ipsTruncate-type='remove'>
|
||||
{{if method_exists( $row, 'tableDescription' )}}
|
||||
{$row->tableDescription()|raw}
|
||||
{{else}}
|
||||
{lang="byline" htmlsprintf="$row->author()->link( $row->warningRef() )"}{datetime="$row->__get( $row::$databaseColumnMap['date'] )"}
|
||||
{lang="in"} <a href="{$row->container()->url()}">{$row->container()->_title}</a>
|
||||
{{endif}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class='ipsDataItem_generic ipsDataItem_size1 ipsType_center ipsType_large'>
|
||||
<span class='ipsBadge ipsBadge_icon ipsBadge_new {{if !$row->_followData['follow_is_anon']}}ipsHide{{endif}}' data-role='followAnonymous' data-ipsTooltip title='{lang="follow_is_anon"}'><i class='fa fa-eye-slash'></i></span>
|
||||
</div>
|
||||
|
||||
<div class='ipsDataItem_generic ipsDataItem_size6'>
|
||||
<ul class='ipsList_reset'>
|
||||
<li title='{lang="follow_when"}' data-role='followDate'><i class='fa fa-clock-o'></i> {datetime="$row->_followData['follow_added']"}</li>
|
||||
<li title='{lang="follow_how"}' data-role='followFrequency'>
|
||||
{{if $row->_followData['follow_notify_freq'] == 'none'}}
|
||||
<i class='fa fa-bell-slash-o'></i>
|
||||
{{else}}
|
||||
<i class='fa fa-bell'></i>
|
||||
{{endif}} {lang="follow_freq_{$row->_followData['follow_notify_freq']}"}
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class='ipsDataItem_generic ipsDataItem_size6 ipsType_center'>
|
||||
{template="manageFollow" group="system" app="core" params="$row->_followData['follow_app'], $row->_followData['follow_area'], $row->_followData['follow_rel_id']"}
|
||||
</div>
|
||||
|
||||
{{if $table->canModerate()}}
|
||||
<div class='ipsDataItem_modCheck'>
|
||||
<span class='ipsCustomInput'>
|
||||
<input type='checkbox' data-role='moderation' name="moderate[{$row->$idField}]" data-actions="{expression="implode( ' ', $table->multimodActions( $row ) )"}" data-state='{{if $row->tableStates()}}{$row->tableStates()}{{endif}}'>
|
||||
<span></span>
|
||||
</span>
|
||||
</div>
|
||||
{{endif}}
|
||||
|
||||
</li>
|
||||
{{endforeach}}
|
||||
{{endif}}
|
||||
]]></template>
|
||||
<template template_group="global" template_name="searchResultCommentSnippet" template_data="$indexData, $screenshot, $url, $reviewRating, $condensed" template_location="front" template_app="downloads"><![CDATA[
|
||||
{{if $condensed}}
|
||||
{{if $screenshot}}
|
||||
<span class='ipsThumb_bg ipsThumb_small ipsPos_left' style='background-image: url("{file="$screenshot_thumb" extension="downloads_Screenshots"}")'>
|
||||
<img src='{file="$screenshot_thumb" extension="downloads_Screenshots"}' alt='' class="">
|
||||
</span>
|
||||
{{else}}
|
||||
<span class='ipsNoThumb ipsThumb_small ipsPos_left'></span>
|
||||
{{endif}}
|
||||
{{else}}
|
||||
<div class='ipsColumns ipsColumns_collapsePhone ipsColumns_noSpacing'>
|
||||
<div class='ipsColumn ipsColumn_narrow'>
|
||||
{template="thumbImage" group="global" app="core" params="$item->primary_screenshot_thumb, $item->name, '', 'cSearchActivity_image', 'view_this', $item->url()"}
|
||||
<a href='{$url}'>
|
||||
{{if $screenshot}}
|
||||
<img src='{file="$screenshot" extension="downloads_Screenshots"}' class='ipsImage ipsStream_image'>
|
||||
{{else}}
|
||||
<div class='ipsNoThumb ipsNoThumb_file ipsThumb_medium'></div>
|
||||
{{endif}}
|
||||
</a>
|
||||
</div>
|
||||
<div class='ipsColumn ipsColumn_fluid'>
|
||||
{{if $activity instanceof \IPS\downloads\File\Comment or $activity instanceof \IPS\downloads\File\Review}}
|
||||
{{if $activity instanceof \IPS\downloads\File\Review}}
|
||||
{template="rating" group="global" location="front" app="core" params="'large', $item->rating, \IPS\Settings::i()->reviews_rating_out_of"}
|
||||
<div class='ipsStream_comment ipsPad'>
|
||||
{{if $reviewRating !== NULL}}
|
||||
{template="rating" app="core" params="'medium', $reviewRating" group="global"}
|
||||
{{endif}}
|
||||
<div class='ipsType_medium ipsType_richText ipsContained {{if $activity instanceof \IPS\downloads\File\Review}}ipsSpacer_both{{else}}ipsSpacer_bottom{{endif}} ipsSpacer_half' data-ipsTruncate data-ipsTruncate-size='3 lines' data-ipsTruncate-type='remove'>
|
||||
{$activity->truncated()|raw}
|
||||
{{if trim( $indexData['index_content'] ) !== ''}}
|
||||
<div class='ipsType_richText ipsType_break ipsType_medium' {{if !( \IPS\Dispatcher::i()->application->directory == 'core' and \IPS\Dispatcher::i()->module and \IPS\Dispatcher::i()->module->key == 'search' )}}data-ipsTruncate data-ipsTruncate-type='remove' data-ipsTruncate-size='3 lines'{{else}}data-searchable data-findTerm{{endif}}>
|
||||
{$indexData['index_content']|raw}
|
||||
</div>
|
||||
{{endif}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{endif}}]]></template>
|
||||
<template template_group="global" template_name="searchResultFileSnippet" template_data="$indexData, $itemData, $screenshot, $url, $price, $condensed" template_location="front" template_app="downloads"><![CDATA[{{if $condensed}}
|
||||
{{if $screenshot}}
|
||||
<span class='ipsThumb_bg ipsThumb_small ipsPos_left' style='background-image: url("{file="$screenshot" extension="downloads_Screenshots"}")'>
|
||||
<img src='{file="$screenshot" extension="downloads_Screenshots"}' alt='' class="">
|
||||
</span>
|
||||
{{else}}
|
||||
<span class='ipsNoThumb ipsThumb_small ipsPos_left'></span>
|
||||
{{endif}}
|
||||
{{else}}
|
||||
<div class='ipsColumns ipsColumns_collapsePhone'>
|
||||
<div class='ipsColumn ipsColumn_medium'>
|
||||
<a href='{$url}'>
|
||||
{{if $screenshot}}
|
||||
<img src='{file="$screenshot" extension="downloads_Screenshots"}' class='ipsImage ipsStream_image'>
|
||||
{{else}}
|
||||
<div class='ipsNoThumb ipsThumb_small'></div>
|
||||
{{endif}}
|
||||
</a>
|
||||
</div>
|
||||
<div class='ipsColumn ipsColumn_fluid ipsStream_snippetInfo'>
|
||||
<p class='ipsType_reset ipsType_light ipsType_normal'>{lang="version"} {$itemData['file_version']}</p>
|
||||
<p class='ipsType_reset ipsType_normal'><i class='fa fa-download'></i> {lang="num_downloads" pluralize="$itemData['file_downloads']"}</p>
|
||||
|
||||
{{if trim( $indexData['index_content'] ) !== ''}}
|
||||
<div class='ipsSpacer_top ipsSpacer_half ipsType_richText ipsType_break ipsType_medium' {{if !( \IPS\Dispatcher::i()->application->directory == 'core' and \IPS\Dispatcher::i()->module and \IPS\Dispatcher::i()->module->key == 'search' )}}data-ipsTruncate data-ipsTruncate-type='remove' data-ipsTruncate-size='2 lines'{{else}}data-searchable data-findTerm{{endif}}>
|
||||
{$indexData['index_content']|raw}
|
||||
</div>
|
||||
<ul class='ipsList_inline ipsType_light'>
|
||||
{{if $activity instanceof \IPS\downloads\File\Review}}
|
||||
<li>{lang="x_members_found_helpful" sprintf="$activity->mapped('votes_helpful'), \IPS\Member::loggedIn()->language()->pluralize( \IPS\Member::loggedIn()->language()->get( 'x_members' ), array( $activity->mapped('votes_total') ) )"}</li>
|
||||
{{endif}}
|
||||
{{if $type != 'search' and $activity instanceof \IPS\Content\Reputation and settings.reputation_enabled}}
|
||||
<li>{template="reputationMini" group="global" app="core" params="$activity, '', NULL, TRUE"}</li>
|
||||
{{endif}}
|
||||
</ul>
|
||||
{{else}}
|
||||
{{if $type != 'search'}}<a href='{$item->url()}' class='ipsType_normal ipsType_break'>{$item->mapped('title')} <span class='ipsType_light ipsType_small'>v{$item->version}</span></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_downloads" pluralize="$item->downloads"}</li>
|
||||
{{if $item->container()->bitoptions['comments']}}
|
||||
<li>{lang="num_comments" pluralize="$item->comments"}</li>
|
||||
{{endif}}
|
||||
{{if $item->container()->bitoptions['reviews']}}
|
||||
<li>{lang="num_reviews" pluralize="$item->reviews"} {{if $item->reviews > 0}} {template="rating" group="global" location="front" app="core" params="'tiny', $item->rating, \IPS\Settings::i()->reviews_rating_out_of"}{{endif}}</li>
|
||||
{{endif}}
|
||||
{{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>
|
||||
{{endif}}
|
||||
|
||||
{{if \IPS\Application::appIsEnabled( 'nexus' ) and settings.idm_nexus_on}}
|
||||
<p class='ipsType_large ipsType_reset ipsSpacer_top ipsSpacer_half'>
|
||||
<span class='ipsStream_price'>
|
||||
{{if $price}}
|
||||
{$price|raw}
|
||||
{{else}}
|
||||
{lang="file_free"}
|
||||
{{endif}}
|
||||
</span>
|
||||
</p>
|
||||
{{endif}}
|
||||
</div>
|
||||
</div>
|
||||
</div>]]></template>
|
||||
{{endif}}]]></template>
|
||||
<template template_group="livesearch" template_name="category" template_data="$category" template_location="admin" template_app="downloads"><![CDATA[<li class='ipsPad_half ipsClearfix' data-role='result'>
|
||||
<a href='{url="app=downloads&module=downloads&controller=categories&do=form&id="}{$category->id}' class='ipsPos_left'>{$category->_title}</a>
|
||||
</li>
|
||||
@@ -683,27 +800,30 @@
|
||||
{$pagination|raw}
|
||||
<br><br>
|
||||
{{endif}}
|
||||
|
||||
<table class="ipsTable ipsTable_zebra">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{lang="member"}</th>
|
||||
<th>{lang="downloads"}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{{foreach $select as $row}}
|
||||
{{$member = \IPS\Member::constructFromData( $row );}}
|
||||
{{if count( $select )}}
|
||||
<table class="ipsTable ipsTable_zebra">
|
||||
<thead>
|
||||
<tr>
|
||||
<td>{template="userPhoto" app="core" group="global" params="$member"} {$member->name}</td>
|
||||
<td><a href='{url="app=downloads&module=stats&controller=member&do=downloads&id={$member->member_id}&tab=downloads&&type%5Bd74394%5D=Table"}'>{$row['downloads']}</a></td>
|
||||
<th>{lang="member"}</th>
|
||||
<th>{lang="downloads"}</th>
|
||||
</tr>
|
||||
{{endforeach}}
|
||||
</tbody>
|
||||
</table>
|
||||
<br>
|
||||
</thead>
|
||||
<tbody>
|
||||
{{foreach $select as $row}}
|
||||
{{$member = \IPS\Member::constructFromData( $row );}}
|
||||
<tr>
|
||||
<td>{template="userPhoto" app="core" group="global" params="$member"} {$member->name}</td>
|
||||
<td><a href='{url="app=downloads&module=stats&controller=member&do=downloads&id={$member->member_id}&tab=downloads&&type%5Bd74394%5D=Table"}'>{$row['downloads']}</a></td>
|
||||
</tr>
|
||||
{{endforeach}}
|
||||
</tbody>
|
||||
</table>
|
||||
<br>
|
||||
|
||||
{$pagination|raw}]]></template>
|
||||
{$pagination|raw}
|
||||
{{else}}
|
||||
<p class="ipsPad">{lang="no_results"}</p>
|
||||
{{endif}}]]></template>
|
||||
<template template_group="stats" template_name="graphs" template_data="$graph" template_location="admin" template_app="downloads"><![CDATA[{$graph|raw}
|
||||
<div class="ipsPad_half ipsAreaBackground">
|
||||
{lang="download_graph_disclaimer"}
|
||||
@@ -718,27 +838,30 @@
|
||||
{$pagination|raw}
|
||||
<br><br>
|
||||
{{endif}}
|
||||
|
||||
<table class="ipsTable ipsTable_zebra">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{lang="member"}</th>
|
||||
<th>{lang="files"}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{{foreach $select as $row}}
|
||||
{{$member = \IPS\Member::constructFromData( $row );}}
|
||||
{{if count( $select )}}
|
||||
<table class="ipsTable ipsTable_zebra">
|
||||
<thead>
|
||||
<tr>
|
||||
<td>{template="userPhoto" app="core" group="global" params="$member"} {$member->link()|raw}</td>
|
||||
<td><a href='{$member->url()->setQueryString( array( 'do' => 'content', 'type' => 'downloads_file' ) )}' target='_blank'>{$row['files']}</a></td>
|
||||
<th>{lang="member"}</th>
|
||||
<th>{lang="files"}</th>
|
||||
</tr>
|
||||
{{endforeach}}
|
||||
</tbody>
|
||||
</table>
|
||||
<br>
|
||||
</thead>
|
||||
<tbody>
|
||||
{{foreach $select as $row}}
|
||||
{{$member = \IPS\Member::constructFromData( $row );}}
|
||||
<tr>
|
||||
<td>{template="userPhoto" app="core" group="global" params="$member"} {$member->link()|raw}</td>
|
||||
<td><a href='{$member->url()->setQueryString( array( 'do' => 'content', 'type' => 'downloads_file' ) )}' target='_blank'>{$row['files']}</a></td>
|
||||
</tr>
|
||||
{{endforeach}}
|
||||
</tbody>
|
||||
</table>
|
||||
<br>
|
||||
|
||||
{$pagination|raw}]]></template>
|
||||
{$pagination|raw}
|
||||
{{else}}
|
||||
<p class="ipsPad">{lang="no_results"}</p>
|
||||
{{endif}}]]></template>
|
||||
<template template_group="submit" template_name="bulkForm" template_data="$form, $category" template_location="front" template_app="downloads"><![CDATA[
|
||||
{template="pageHeader" group="global" app="core" params="\IPS\Member::loggedIn()->language()->addToStack('submit_bulk_information')"}
|
||||
<hr class='ipsHr'>
|
||||
@@ -751,7 +874,7 @@
|
||||
{{endif}}
|
||||
|
||||
|
||||
<form accept-charset='utf-8' method="post" action="{$form->action}" enctype="multipart/form-data" id='elDownloadsSubmit'>
|
||||
<form accept-charset='utf-8' method="post" action="{$form->action}" enctype="multipart/form-data" id='elDownloadsSubmit' data-ipsForm>
|
||||
<input type="hidden" name="{$form->id}_submitted" value="1">
|
||||
{{foreach $form->hiddenValues as $k => $v}}
|
||||
<input type="hidden" name="{$k}" value="{$v}">
|
||||
@@ -990,7 +1113,7 @@
|
||||
<div class='ipsColumns ipsColumns_collapsePhone'>
|
||||
<div class='ipsColumn ipsColumn_medium ipsType_center'>
|
||||
<a href="{$file->url()}">
|
||||
<img src="{file="$file->primary_screenshot" extension="downloads_Screenshots"}" alt="{$file->name}">
|
||||
<img src="<fileStore.downloads_Screenshots>/{$file->primary_screenshot}" alt="{$file->name}"
|
||||
</a>
|
||||
<br><br>
|
||||
<a href="{$file->url()}" class='ipsButton ipsButton_primary ipsButton_fullWidth ipsButton_small'>
|
||||
@@ -1112,8 +1235,7 @@
|
||||
</div>
|
||||
</form>]]></template>
|
||||
<template template_group="view" template_name="comments" template_data="$file" template_location="front" template_app="downloads"><![CDATA[
|
||||
<div data-controller='core.front.core.commentFeed' data-commentsType='comments' data-baseURL='{$file->url()}' {{if $file->isLastPage()}}data-lastPage{{endif}} data-feedID='file-{$file->id}' id='comments'>
|
||||
<br>
|
||||
<div data-controller='core.front.core.commentFeed' {{if settings.auto_polling_enabled}}data-autoPoll{{endif}} data-commentsType='comments' data-baseURL='{$file->url()}' {{if $file->isLastPage()}}data-lastPage{{endif}} data-feedID='file-{$file->id}' id='comments'>
|
||||
{{if $file->commentPageCount() > 1}}
|
||||
{$file->commentPagination( array( 'tab' ) )|raw}
|
||||
<br><br>
|
||||
@@ -1142,8 +1264,7 @@
|
||||
{$file->commentPagination( array( 'tab' ) )|raw}
|
||||
{{endif}}
|
||||
{{if $file->commentForm() || $file->locked() || \IPS\Member::loggedin()->restrict_post || \IPS\Member::loggedIn()->members_bitoptions['unacknowledged_warnings']}}
|
||||
<br><br>
|
||||
<div class='ipsAreaBackground ipsPad' data-role='replyArea'>
|
||||
<div class='ipsAreaBackground ipsPad ipsSpacer_top' data-role='replyArea'>
|
||||
{{if $file->commentForm()}}
|
||||
{{if $file->locked()}}
|
||||
<p class='ipsType_reset ipsType_warning ipsComposeArea_warning ipsSpacer_bottom ipsSpacer_half'><i class='fa fa-info-circle'></i> {lang="file_locked_can_comment"}</p>
|
||||
@@ -1264,7 +1385,7 @@
|
||||
{{endforeach}}
|
||||
</ul>
|
||||
</div>]]></template>
|
||||
<template template_group="view" template_name="reviews" template_data="$file" template_location="front" template_app="downloads"><![CDATA[<div data-controller='core.front.core.commentFeed' data-commentsType='reviews' data-baseURL='{$file->url()}' {{if $file->isLastPage('reviews')}}data-lastPage{{endif}} data-feedID='file-{$file->id}-reviews' id='reviews'>
|
||||
<template template_group="view" template_name="reviews" template_data="$file" template_location="front" template_app="downloads"><![CDATA[<div data-controller='core.front.core.commentFeed' {{if settings.auto_polling_enabled}}data-autoPoll{{endif}} data-commentsType='reviews' data-baseURL='{$file->url()}' {{if $file->isLastPage('reviews')}}data-lastPage{{endif}} data-feedID='file-{$file->id}-reviews' id='reviews'>
|
||||
{{if $file->canReview()}}
|
||||
{{if $file->locked()}}
|
||||
<strong class='ipsType_warning'><i class='fa fa-info-circle'></i> {lang="item_locked_can_review"}</strong>
|
||||
@@ -1280,7 +1401,7 @@
|
||||
{{elseif $file->hasReviewed()}}
|
||||
<!-- Already reviewed -->
|
||||
{{elseif $file->mustDownloadBeforeReview()}}
|
||||
<p class='ipsType_reset ipsType_light'>{lang="no_download_review"}</p>
|
||||
<p class='ipsType_reset ipsType_light ipsType_normal'>{lang="no_download_review"}</p>
|
||||
{{elseif \IPS\Member::loggedIn()->restrict_post}}
|
||||
{template="reviewUnavailable" group="forms" location="front" app="core" params="'restricted_cannot_comment'"}
|
||||
{{elseif \IPS\Member::loggedIn()->members_bitoptions['unacknowledged_warnings']}}
|
||||
@@ -1288,8 +1409,8 @@
|
||||
{{endif}}
|
||||
{{endif}}
|
||||
{{if count( $file->reviews() )}}
|
||||
<hr class='ipsHr'>
|
||||
<div class="ipsClearfix ipsSpacer_both">
|
||||
{{if !$file->hasReviewed()}}<hr class='ipsHr'>{{endif}}
|
||||
<div class="ipsClearfix ipsSpacer_bottom">
|
||||
{{if $file->reviewPageCount() > 1}}
|
||||
<div class="ipsPos_left ipsResponsive_noFloat">
|
||||
{$file->reviewPagination( array( 'tab', 'sort' ) )|raw}
|
||||
@@ -1327,6 +1448,8 @@
|
||||
{$file->reviewPagination( array( 'tab', 'sort' ) )|raw}
|
||||
</div>
|
||||
{{endif}}
|
||||
{{elseif !$file->canReview()}}
|
||||
<p class="ipsType_normal ipsType_light ipsType_reset" data-role="noReviews">{lang="no_reviews"}</p>
|
||||
{{endif}}
|
||||
</div>]]></template>
|
||||
<template template_group="view" template_name="view" template_data="$file, $commentsAndReviews, $versionData, $previousVersions, $next=NULL, $prev=NULL, $cfields=array()" template_location="front" template_app="downloads"><![CDATA[<div itemscope itemtype="http://schema.org/CreativeWork">
|
||||
@@ -1447,7 +1570,29 @@
|
||||
{$file->desc|raw}
|
||||
</div>
|
||||
|
||||
<hr class='ipsHr'>
|
||||
{{if $versionData['b_changelog'] or !empty( $previousVersions )}}
|
||||
<hr class='ipsHr ipsSpacer_both ipsSpacer_double'>
|
||||
<section data-controller='downloads.front.view.changeLog'>
|
||||
<h2 class='ipsType_sectionHead'>{lang="whats_new_in_version" sprintf="$versionData['b_version']"}{{if !empty( $previousVersions )}} <a href='#' id='elChangelog' data-ipsMenu data-ipsMenu-selectable="radio" class='ipsButton ipsButton_verySmall ipsButton_light' title='{lang="see_changelog_title"}'>{lang="see_changelog"} <i class='fa fa-caret-down'></i></a>{{endif}}</h2>
|
||||
|
||||
<div data-role='changeLogData'>
|
||||
{template="changeLog" group="view" params="$file, $versionData"}
|
||||
</div>
|
||||
<ul class='ipsMenu ipsMenu_selectable ipsMenu_auto ipsHide' id='elChangelog_menu'>
|
||||
<li class='ipsMenu_item {{if !request.changelog}}ipsMenu_itemChecked{{endif}}' data-ipsMenuValue='{$file->version}'><a href='{$file->url()->setQuerystring( 'changelog', 0 )}' title='{lang="see_changelog_for" sprintf="$file->version"}'>{$file->version}</a></li>
|
||||
{{foreach $previousVersions as $version}}
|
||||
<li class='ipsMenu_item {{if request.changelog == $version['b_id']}}ipsMenu_itemChecked{{endif}} {{if $version['b_hidden']}}ipsModerated{{endif}}' data-ipsMenuValue='{$version['b_version']}'>
|
||||
<a href='{$file->url()->setQueryString( 'changelog', $version['b_id'] )}' title='{lang="see_changelog_for" sprintf="$version['b_version']"}'>
|
||||
{$version['b_version']}<br>
|
||||
<span class='ipsType_light'>{expression="\IPS\DateTime::ts( $version['b_updated'] )->html()" raw="true"}</span>
|
||||
</a>
|
||||
</li>
|
||||
{{endforeach}}
|
||||
</ul>
|
||||
</section>
|
||||
{{endif}}
|
||||
|
||||
<hr class='ipsHr ipsSpacer_top ipsSpacer_double'>
|
||||
|
||||
{{if $file instanceof \IPS\Content\Reputation and settings.reputation_enabled}}
|
||||
<div class='ipsPos_right'>
|
||||
@@ -1503,24 +1648,6 @@
|
||||
<a href='{$file->url('report')}' data-ipsDialog data-ipsDialog-size='medium' data-ipsDialog-title="{lang="report_file"}" data-ipsDialog-remoteSubmit data-ipsDialog-flashMessage="{lang="report_submit_success"}" title="{lang="report_file"}" class='ipsType_medium'>{lang="report_file"}</a>
|
||||
{{endif}}
|
||||
</section>
|
||||
|
||||
{{if $versionData['b_changelog'] or !empty( $previousVersions )}}
|
||||
<hr class='ipsHr'>
|
||||
<br>
|
||||
<section data-controller='downloads.front.view.changeLog'>
|
||||
<h2 class='ipsType_sectionHead'>{lang="whats_new_in_version" sprintf="$versionData['b_version']"}{{if !empty( $previousVersions )}} <a href='#' id='elChangelog' data-ipsMenu data-ipsMenu-selectable="radio" class='ipsButton ipsButton_verySmall ipsButton_light' title='{lang="see_changelog_title"}'>{lang="see_changelog"} <i class='fa fa-caret-down'></i></a>{{endif}}</h2>
|
||||
|
||||
<div data-role='changeLogData'>
|
||||
{template="changeLog" group="view" params="$file, $versionData"}
|
||||
</div>
|
||||
<ul class='ipsMenu ipsMenu_selectable ipsMenu_auto ipsHide' id='elChangelog_menu'>
|
||||
<li class='ipsMenu_item {{if !request.changelog}}ipsMenu_itemChecked{{endif}}' data-ipsMenuValue='{$file->version}'><a href='{$file->url()->setQuerystring( 'changelog', 0 )}' title='{lang="see_changelog_for" sprintf="$file->version"}'>{$file->version}</a></li>
|
||||
{{foreach $previousVersions as $version}}
|
||||
<li class='ipsMenu_item {{if request.changelog == $version['b_id']}}ipsMenu_itemChecked{{endif}} {{if $version['b_hidden']}}ipsModerated{{endif}}' data-ipsMenuValue='{$version['b_version']}'><a href='{$file->url()->setQueryString( 'changelog', $version['b_id'] )}' title='{lang="see_changelog_for" sprintf="$version['b_version']"}'>{$version['b_version']}</a></li>
|
||||
{{endforeach}}
|
||||
</ul>
|
||||
</section>
|
||||
{{endif}}
|
||||
</div>
|
||||
</article>
|
||||
<aside class='ipsColumn ipsColumn_wide'>
|
||||
@@ -1658,6 +1785,169 @@
|
||||
{$commentsAndReviews|raw}
|
||||
{{endif}}
|
||||
</div>]]></template>
|
||||
<template template_group="widgets" template_name="downloadsCommentFeed" template_data="$comments, $title, $orientation='vertical'" template_location="front" template_app="downloads"><![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_light ipsType_medium ipsType_blendLinks'>{lang="byline_nodate" htmlsprintf="$comment->author()->link()"} · <a href='{$comment->item()->url()->setQueryString( array( 'do' => 'findComment', 'comment' => $comment->id ) )}' class='ipsType_blendLinks' title='{lang="share_this_comment"}'>{$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="downloadsReviewFeed" template_data="$comments, $title, $orientation='vertical'" template_location="front" template_app="downloads"><![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='ipsDataItem_title ipsType_break'>{wordbreak="$comment->item()->name"}</a><br>
|
||||
<span class='ipsType_light ipsType_small'>{lang="byline_nodate" htmlsprintf="$comment->author()->link()"} · <a href='{$comment->item()->url()->setQueryString( array( 'do' => 'findComment', 'comment' => $comment->id ) )}' class='ipsType_blendLinks' title='{lang="share_this_comment"}'>{$comment->dateLine()|raw}</a></span>
|
||||
{template="rating" group="global" location="front" app="core" params="'small', $comment->rating, \IPS\Settings::i()->reviews_rating_out_of"}
|
||||
<div class='ipsType_medium ipsType_textBlock ipsType_richText ipsType_break ipsContained' 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}}
|
||||
<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'>
|
||||
{{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>
|
||||
{{endforeach}}
|
||||
</ul>
|
||||
</div>
|
||||
{{endif}}
|
||||
{{endif}}
|
||||
]]></template>
|
||||
<template template_group="widgets" template_name="downloadStats" template_data="$stats, $latestFile, $orientation='vertical'" template_location="front" template_app="downloads"><![CDATA[<h3 class='ipsType_reset ipsWidget_title'>{lang="block_downloadStats"}</h3>
|
||||
<div class='ipsWidget_inner'>
|
||||
{{if $orientation == 'vertical'}}
|
||||
@@ -1785,7 +2075,7 @@
|
||||
<div class='ipsDataItem_main ipsType_break'>
|
||||
<a href="{$file->url()}" title='{lang="view_this_file" sprintf="$file->name"}'>{wordbreak="$file->name"}</a>
|
||||
<br>
|
||||
<span class='ipsType_light ipsType_medium'>{lang="byline_nodate" htmlsprintf="$file->author()->link()"}</span><br>
|
||||
<span class='ipsType_light ipsType_medium ipsType_blendLinks'>{lang="byline_nodate" htmlsprintf="$file->author()->link()"}</span><br>
|
||||
{{if $file->container()->bitoptions['reviews']}}
|
||||
{template="rating" group="global" location="front" app="core" params="'small', $file->rating, \IPS\Settings::i()->reviews_rating_out_of"}
|
||||
{{endif}}
|
||||
@@ -1805,7 +2095,7 @@
|
||||
<template template_group="widgets" template_name="topDownloads" template_data="$week, $month, $year, $all, $orientation='vertical'" template_location="front" template_app="downloads"><![CDATA[<h3 class='ipsType_reset ipsWidget_title'>{lang="block_topDownloads"}</h3>
|
||||
|
||||
{{if $orientation == 'vertical'}}
|
||||
<div class='ipsTabs ipsTabs_small ipsClearfix' id='elDownloadsTopDownloads' data-ipsTabBar data-ipsTabBar-stretch data-ipsTabBar-contentArea='#elDownloadsTopDownloads_content'>
|
||||
<div class='ipsTabs ipsTabs_small ipsTabs_stretch ipsClearfix' id='elDownloadsTopDownloads' data-ipsTabBar data-ipsTabBar-contentArea='#elDownloadsTopDownloads_content'>
|
||||
<a href='#elDownloadsTopDownloads' data-action='expandTabs'><i class='fa fa-caret-down'></i></a>
|
||||
<ul role="tablist">
|
||||
<li>
|
||||
@@ -1948,7 +2238,7 @@
|
||||
<template template_group="widgets" template_name="topSubmitters" template_data="$week, $month, $year, $all, $orientation='vertical'" template_location="front" template_app="downloads"><![CDATA[<h3 class='ipsType_reset ipsWidget_title'>{lang="block_topSubmitters"}</h3>
|
||||
|
||||
{{if $orientation == 'vertical'}}
|
||||
<div class='ipsTabs ipsTabs_small ipsClearfix' id='elDownloadsTopSubmitters' data-ipsTabBar data-ipsTabBar-stretch data-ipsTabBar-contentArea='#elDownloadsTopSubmitters_content'>
|
||||
<div class='ipsTabs ipsTabs_small ipsTabs_stretch ipsClearfix' id='elDownloadsTopSubmitters' data-ipsTabBar data-ipsTabBar-contentArea='#elDownloadsTopSubmitters_content'>
|
||||
<a href='#elDownloadsTopSubmitters' data-action='expandTabs'><i class='fa fa-caret-down'></i></a>
|
||||
<ul role="tablist">
|
||||
<li>
|
||||
@@ -2142,8 +2432,14 @@
|
||||
.cDownloadsCarouselItem {
|
||||
width: 170px;
|
||||
min-height: 240px;
|
||||
margin-right: 6px !important;
|
||||
}
|
||||
|
||||
html[dir="ltr"] .cDownloadsCarouselItem {
|
||||
margin-right: 6px !important;
|
||||
}
|
||||
html[dir="rtl"] .cDownloadsCarouselItem {
|
||||
margin-left: 6px !important;
|
||||
}
|
||||
|
||||
.cDownloadsCarouselItem .ipsThumb {
|
||||
max-width: 100%;
|
||||
|
||||
@@ -78,5 +78,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"
|
||||
}
|
||||
@@ -33,5 +33,27 @@
|
||||
"allow_reuse": true,
|
||||
"menu_style": "modal",
|
||||
"embeddable": true
|
||||
},
|
||||
"downloadsCommentFeed": {
|
||||
"class": "\\IPS\\Widget\\PermissionCache",
|
||||
"restrict": [
|
||||
"sidebar",
|
||||
"cms"
|
||||
],
|
||||
"default_area": "",
|
||||
"allow_reuse": true,
|
||||
"menu_style": "modal",
|
||||
"embeddable": true
|
||||
},
|
||||
"downloadsReviewFeed": {
|
||||
"class": "\\IPS\\Widget\\PermissionCache",
|
||||
"restrict": [
|
||||
"sidebar",
|
||||
"cms"
|
||||
],
|
||||
"default_area": "",
|
||||
"allow_reuse": true,
|
||||
"menu_style": "modal",
|
||||
"embeddable": true
|
||||
}
|
||||
}
|
||||
@@ -27,5 +27,19 @@ class _Downloads
|
||||
/**
|
||||
* @brief Content Item Classes
|
||||
*/
|
||||
public $classes = array( 'IPS\downloads\File' );
|
||||
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( 'downloads', 'downloads', 'front' ) ) )
|
||||
{
|
||||
$this->classes[] = 'IPS\downloads\File';
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -22,8 +22,18 @@ if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
/**
|
||||
* Front Navigation Extension: Downloads
|
||||
*/
|
||||
class _Downloads
|
||||
class _Downloads 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_downloads');
|
||||
}
|
||||
|
||||
/**
|
||||
* Can access?
|
||||
*
|
||||
@@ -31,7 +41,7 @@ class _Downloads
|
||||
*/
|
||||
public function canView()
|
||||
{
|
||||
return !\IPS\Application::load('downloads')->hide_tab and \IPS\Member::loggedIn()->canAccessModule( \IPS\Application\Module::get( 'downloads', 'downloads' ) );
|
||||
return parent::canView() and \IPS\Member::loggedIn()->canAccessModule( \IPS\Application\Module::get( 'downloads', 'downloads' ) );
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -63,14 +73,4 @@ class _Downloads
|
||||
{
|
||||
return \IPS\Dispatcher::i()->application->directory === 'downloads';
|
||||
}
|
||||
|
||||
/**
|
||||
* Children
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function children()
|
||||
{
|
||||
return array();
|
||||
}
|
||||
}
|
||||
@@ -27,7 +27,7 @@ class _Downloads
|
||||
/**
|
||||
* 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
|
||||
*/
|
||||
|
||||
@@ -55,7 +55,7 @@ class _DownloadLog
|
||||
try
|
||||
{
|
||||
$file = \IPS\downloads\File::load( $val );
|
||||
return "<a href='" . $file->url() . "' target='_blank'>" . htmlentities( $file->name, \IPS\HTMLENTITIES, 'UTF-8', FALSE ) . '</a>';
|
||||
return "<a href='" . $file->url() . "' target='_blank'>" . htmlspecialchars( $file->name, \IPS\HTMLENTITIES, 'UTF-8', FALSE ) . '</a>';
|
||||
}
|
||||
catch ( \OutOfRangeException $e )
|
||||
{
|
||||
|
||||
@@ -27,7 +27,7 @@ class _Downloads
|
||||
/**
|
||||
* Process Form
|
||||
*
|
||||
* @param \IPS\Form\Tabbed $form The form
|
||||
* @param \IPS\Helpers\Form $form The form
|
||||
* @param \IPS\Member $member Existing Member
|
||||
* @return void
|
||||
*/
|
||||
|
||||
@@ -45,15 +45,21 @@ class _settings extends \IPS\Dispatcher\Controller
|
||||
{
|
||||
$form->addTab( 'paid_file_settings' );
|
||||
$form->add( new \IPS\Helpers\Form\YesNo( 'idm_nexus_on', \IPS\Settings::i()->idm_nexus_on, FALSE, array( 'togglesOn' => array( 'idm_nexus_tax', 'idm_nexus_percent', 'idm_nexus_transfee' ) ) ) );
|
||||
$form->add( new \IPS\Helpers\Form\Node( 'idm_nexus_tax', \IPS\Settings::i()->idm_nexus_tax, FALSE, array( 'class' => '\IPS\nexus\Tax', 'zeroVal' => 'do_not_tax' ), NULL, NULL, NULL, 'idm_nexus_tax' ) );
|
||||
$form->add( new \IPS\Helpers\Form\Node( 'idm_nexus_tax', \IPS\Settings::i()->idm_nexus_tax ?:0, FALSE, array( 'class' => '\IPS\nexus\Tax', 'zeroVal' => 'do_not_tax' ), NULL, NULL, NULL, 'idm_nexus_tax' ) );
|
||||
$form->add( new \IPS\Helpers\Form\Number( 'idm_nexus_percent', \IPS\Settings::i()->idm_nexus_percent, FALSE, array( 'min' => 0, 'max' => 100 ), NULL, NULL, '%', 'idm_nexus_percent' ) );
|
||||
$form->add( new \IPS\nexus\Form\Money( 'idm_nexus_transfee', json_decode( \IPS\Settings::i()->idm_nexus_transfee, TRUE ), FALSE, array(), NULL, NULL, NULL, 'idm_nexus_transfee' ) );
|
||||
$form->add( new \IPS\Helpers\Form\Node( 'idm_nexus_gateways', explode( ',', \IPS\Settings::i()->idm_nexus_gateways ), FALSE, array( 'class' => '\IPS\nexus\Gateway', 'zeroVal' => 'no_restriction', 'multiple' => TRUE ), NULL, NULL, NULL, 'idm_nexus_gateways' ) );
|
||||
$form->add( new \IPS\Helpers\Form\Node( 'idm_nexus_gateways', ( \IPS\Settings::i()->idm_nexus_gateways ) ? explode( ',', \IPS\Settings::i()->idm_nexus_gateways ) : 0, FALSE, array( 'class' => '\IPS\nexus\Gateway', 'zeroVal' => 'no_restriction', 'multiple' => TRUE ), NULL, NULL, NULL, 'idm_nexus_gateways' ) );
|
||||
$form->add( new \IPS\Helpers\Form\CheckboxSet( 'idm_nexus_display', explode( ',', \IPS\Settings::i()->idm_nexus_display ), FALSE, array( 'options' => array( 'purchases' => 'idm_purchases', 'downloads' => 'downloads' ) ) ) );
|
||||
}
|
||||
|
||||
if ( $values = $form->values( TRUE ) )
|
||||
{
|
||||
/* We can't store '' for idm_nexus_display as it will fall back to the default */
|
||||
if ( ! $values['idm_nexus_display'] )
|
||||
{
|
||||
$values['idm_nexus_display'] = 'none';
|
||||
}
|
||||
|
||||
$form->saveAsSettings( $values );
|
||||
|
||||
/* Clear guest page caches */
|
||||
|
||||
@@ -50,7 +50,7 @@ class _downloaders extends \IPS\Dispatcher\Controller
|
||||
if ( isset( \IPS\Request::i()->form ) )
|
||||
{
|
||||
$form = new \IPS\Helpers\Form( 'form', 'go' );
|
||||
$form->add( new \IPS\Helpers\Form\DateRange( 'stats_date_range' ) );
|
||||
$form->add( new \IPS\Helpers\Form\DateRange( 'stats_date_range' ), NULL, FALSE, array( 'start' => array( 'max' => new \IPS\DateTime() ), 'end' => array( 'max' => new \IPS\DateTime() ) ));
|
||||
|
||||
if ( $values = $form->values() )
|
||||
{
|
||||
|
||||
@@ -88,6 +88,7 @@ class _member extends \IPS\Dispatcher\Controller
|
||||
case 'downloads':
|
||||
$downloadsChart = new \IPS\Helpers\Chart\Dynamic( \IPS\Http\Url::internal( "app=downloads&module=stats&controller=member&do=downloads&id={$member->member_id}&tab=downloads&_graph=1" ), 'downloads_downloads', 'dtime', '', array(), 'ColumnChart', 'monthly', array( 'start' => 0, 'end' => 0 ), array( 'dfid', 'dtime', 'dsize', 'dua', 'dip' ) );
|
||||
$downloadsChart->where[] = array( 'dmid=?', $member->member_id );
|
||||
$downloadsChart->availableTypes = array( 'LineChart', 'ColumnChart', 'BarChart', 'Table' );
|
||||
$downloadsChart->tableParsers = array(
|
||||
'dfid' => function( $val )
|
||||
{
|
||||
|
||||
@@ -50,7 +50,7 @@ class _submitters extends \IPS\Dispatcher\Controller
|
||||
if ( isset( \IPS\Request::i()->form ) )
|
||||
{
|
||||
$form = new \IPS\Helpers\Form( 'form', 'go' );
|
||||
$form->add( new \IPS\Helpers\Form\DateRange( 'stats_date_range' ) );
|
||||
$form->add( new \IPS\Helpers\Form\DateRange( 'stats_date_range' ), NULL, FALSE, array( 'start' => array( 'max' => new \IPS\DateTime() ), 'end' => array( 'max' => new \IPS\DateTime() ) ) );
|
||||
|
||||
if ( $values = $form->values() )
|
||||
{
|
||||
|
||||
@@ -69,7 +69,7 @@ class _browse extends \IPS\Dispatcher\Controller
|
||||
/* Get stuff */
|
||||
$featured = iterator_to_array( \IPS\downloads\File::featured( 4, '_rand' ) );
|
||||
$new = \IPS\downloads\File::getItemsWithPermission( array(), NULL, 14 );
|
||||
$highestRated = \IPS\downloads\File::getItemsWithPermission( array( array( 'file_rating > ?', 0 ) ), 'file_rating DESC', 14 );
|
||||
$highestRated = \IPS\downloads\File::getItemsWithPermission( array( array( 'file_rating > ?', 0 ) ), 'file_rating DESC, file_reviews DESC', 14 );
|
||||
$mostDownloaded = \IPS\downloads\File::getItemsWithPermission( array( array( 'file_downloads > ?', 0 ) ), 'file_downloads DESC', 14 );
|
||||
|
||||
/* Online User Location */
|
||||
@@ -91,7 +91,7 @@ class _browse extends \IPS\Dispatcher\Controller
|
||||
{
|
||||
$_count = \IPS\downloads\File::getItemsWithPermission( array( array( \IPS\downloads\File::$databasePrefix . \IPS\downloads\File::$databaseColumnMap['container'] . '=?', $category->_id ) ), NULL, 1, 'read', NULL, 0, NULL, FALSE, FALSE, FALSE, TRUE );
|
||||
|
||||
if( !$_count['cnt'] )
|
||||
if( !$_count )
|
||||
{
|
||||
/* Show a 'no files' template if there's nothing to display */
|
||||
$table = \IPS\Theme::i()->getTemplate( 'browse' )->noFiles( $category );
|
||||
@@ -109,7 +109,7 @@ class _browse extends \IPS\Dispatcher\Controller
|
||||
'file_paid' => "( file_cost<>'' OR file_nexus>0 )",
|
||||
);
|
||||
}
|
||||
$table->title = \IPS\Member::loggedIn()->language()->pluralize( \IPS\Member::loggedIn()->language()->get('download_file_count'), array( $_count['cnt'] ) );
|
||||
$table->title = \IPS\Member::loggedIn()->language()->pluralize( \IPS\Member::loggedIn()->language()->get('download_file_count'), array( $_count ) );
|
||||
}
|
||||
|
||||
/* Online User Location */
|
||||
|
||||
@@ -416,6 +416,22 @@ class _submit extends \IPS\Dispatcher\Controller
|
||||
{
|
||||
$input->options['autoSaveKey'] .= $key;
|
||||
}
|
||||
|
||||
if ( isset( $input->options['toggles'] ) )
|
||||
{
|
||||
foreach ( $input->options['toggles'] as $trigger => $toggles )
|
||||
{
|
||||
foreach ( $toggles as $k => $v )
|
||||
{
|
||||
$input->options['toggles'][ $trigger ][ $k ] = "{$v}_{$key}";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ( $input->htmlId )
|
||||
{
|
||||
$input->htmlId = "{$input->htmlId}_{$key}";
|
||||
}
|
||||
|
||||
$form->add( $input );
|
||||
}
|
||||
@@ -501,13 +517,15 @@ class _submit extends \IPS\Dispatcher\Controller
|
||||
foreach ( $data['files'] as $key => $fileUrl )
|
||||
{
|
||||
/* $values isn't going to work as is here */
|
||||
$save = array(
|
||||
'file_title' => $values["filedata_{$key}_file_title"],
|
||||
'file_desc' => $values["filedata_{$key}_file_desc"],
|
||||
'file_tags' => $values["filedata_{$key}_file_tags"],
|
||||
'file_version' => $values["filedata_{$key}_file_version"],
|
||||
'postKey' => md5( "{$data['postKey']}-{$key}" )
|
||||
);
|
||||
$save = array( 'postKey' => md5( "{$data['postKey']}-{$key}" ) );
|
||||
$len = mb_strlen( "filedata_{$key}_" );
|
||||
foreach ( $values as $k => $v )
|
||||
{
|
||||
if ( mb_substr( $k, 0, $len ) == "filedata_{$key}_" )
|
||||
{
|
||||
$save[ mb_substr( $k, $len ) ] = $v;
|
||||
}
|
||||
}
|
||||
\IPS\downloads\File::createFromForm( $save, $category, FALSE );
|
||||
}
|
||||
|
||||
|
||||
@@ -406,6 +406,13 @@ class _view extends \IPS\Content\Controller
|
||||
/* Print the file, honoring ranges */
|
||||
$ranges = new \IPS\Http\Ranges( $file, (int) \IPS\Member::loggedIn()->group['idm_throttling'] );
|
||||
|
||||
/* If using PHP-FPM, close the request so that __destruct tasks are run after data is flushed to the browser
|
||||
@see http://www.php.net/manual/en/function.fastcgi-finish-request.php */
|
||||
if( function_exists( 'fastcgi_finish_request' ) )
|
||||
{
|
||||
fastcgi_finish_request();
|
||||
}
|
||||
|
||||
exit;
|
||||
}
|
||||
|
||||
@@ -669,7 +676,6 @@ class _view extends \IPS\Content\Controller
|
||||
|
||||
/* Output */
|
||||
\IPS\Output::i()->title = $this->file->name;
|
||||
\IPS\Output::i()->breadcrumb[] = array( $this->file->url(), $this->file->name );
|
||||
|
||||
/* Handle submissions */
|
||||
if ( $values = $form->values() )
|
||||
@@ -953,6 +959,7 @@ class _view extends \IPS\Content\Controller
|
||||
\IPS\Output::i()->breadcrumb[] = array( $category->url(), $category->_title );
|
||||
}
|
||||
catch ( \Exception $e ) { }
|
||||
\IPS\Output::i()->breadcrumb[] = array( $this->file->url(), $this->file->name );
|
||||
|
||||
\IPS\Output::i()->output = \IPS\Theme::i()->getTemplate( 'submit' )->newVersion( $form, $category->versioning !== 0 );
|
||||
}
|
||||
|
||||
@@ -54,13 +54,26 @@ class _Upgrade
|
||||
{
|
||||
foreach( $votes as $member => $rating )
|
||||
{
|
||||
\IPS\Db::i()->insert( 'downloads_reviews', array(
|
||||
'review_fid' => $file['file_id'],
|
||||
'review_mid' => $member,
|
||||
'review_rating' => $rating,
|
||||
) );
|
||||
|
||||
$voteCount++;
|
||||
try
|
||||
{
|
||||
$member = \IPS\Member::load( $member );
|
||||
|
||||
\IPS\Db::i()->insert( 'downloads_reviews', array(
|
||||
'review_fid' => $file['file_id'],
|
||||
'review_mid' => $member->member_id,
|
||||
'review_author_name' => $member->name,
|
||||
'review_rating' => $rating,
|
||||
/* The review_ip column does not accept NULL values */
|
||||
'review_ip' => '',
|
||||
'review_date' => time(),
|
||||
'review_approved' => 1,
|
||||
/* The search index does not allow blank text */
|
||||
'review_text' => '',
|
||||
) );
|
||||
|
||||
$voteCount++;
|
||||
}
|
||||
catch( \Exception $e ){}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,71 @@
|
||||
<?php
|
||||
/**
|
||||
* @brief 4.1.0 Beta 1 Upgrade Code
|
||||
* @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
|
||||
* @since 23 Sep 2015
|
||||
* @version SVN_VERSION_NUMBER
|
||||
*/
|
||||
|
||||
namespace IPS\downloads\setup\upg_101000;
|
||||
|
||||
/* 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;
|
||||
}
|
||||
|
||||
/**
|
||||
* 4.1.0 Beta 1 Upgrade Code
|
||||
*/
|
||||
class _Upgrade
|
||||
{
|
||||
/**
|
||||
* Fix broken downloads reviews from 100044
|
||||
*
|
||||
* @return array If returns TRUE, upgrader will proceed to next step. If it returns any other value, it will set this as the value of the 'extra' GET parameter and rerun this step (useful for loops)
|
||||
*/
|
||||
public function step1()
|
||||
{
|
||||
foreach( \IPS\Db::i()->select( '*', 'downloads_reviews', 'review_date is null' ) as $review )
|
||||
{
|
||||
try
|
||||
{
|
||||
$member = \IPS\Member::load( $review['review_mid'] );
|
||||
|
||||
\IPS\Db::i()->update( 'downloads_reviews', array( 'review_date' => time(), 'review_text' => '', 'review_author_name' => $member->name ), array( 'review_id=?', $review['review_id'] ) );
|
||||
}
|
||||
catch( \Exception $e ){}
|
||||
}
|
||||
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/**
|
||||
* Custom title for this step
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function step1CustomTitle()
|
||||
{
|
||||
return "Adjusting empty download reviews";
|
||||
}
|
||||
|
||||
/**
|
||||
* Reset the forum ID to post to if the forum ID does not exist
|
||||
*
|
||||
* @return array If returns TRUE, upgrader will proceed to next step. If it returns any other value, it will set this as the value of the 'extra' GET parameter and rerun this step (useful for loops)
|
||||
*/
|
||||
public function finish()
|
||||
{
|
||||
$prefix = \IPS\Db::i()->prefix;
|
||||
|
||||
\IPS\Db::i()->update( 'downloads_categories', array( 'cforum_id' => 0 ), 'cforum_id NOT IN( SELECT id FROM ' . $prefix . 'forums_forums )' );
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
@@ -293,7 +293,7 @@ class _Category extends \IPS\Node\Model implements \IPS\Node\Permissions
|
||||
if ( \IPS\Application::appIsEnabled( 'forums' ) )
|
||||
{
|
||||
$form->addTab( 'category_forums_integration' );
|
||||
$form->add( new \IPS\Helpers\Form\YesNo( 'cforum_on', $this->forum_id, FALSE, array( 'togglesOn' => array(
|
||||
$form->add( new \IPS\Helpers\Form\YesNo( 'cforum_on', $this->forum_id, FALSE, array( 'disableCopy' => TRUE, 'togglesOn' => array(
|
||||
'cforum_id',
|
||||
'ctopic_prefix',
|
||||
'ctopic_suffix',
|
||||
@@ -489,21 +489,21 @@ class _Category extends \IPS\Node\Model implements \IPS\Node\Permissions
|
||||
* @brief Cached URL
|
||||
*/
|
||||
protected $_url = NULL;
|
||||
|
||||
|
||||
/**
|
||||
* Get URL
|
||||
*
|
||||
* @return \IPS\Http\Url
|
||||
* @brief URL Base
|
||||
*/
|
||||
public function url()
|
||||
{
|
||||
if( $this->_url === NULL )
|
||||
{
|
||||
$this->_url = \IPS\Http\Url::internal( "app=downloads&module=downloads&controller=browse&id={$this->_id}", 'front', 'downloads_cat', $this->name_furl );
|
||||
}
|
||||
|
||||
return $this->_url;
|
||||
}
|
||||
public static $urlBase = 'app=downloads&module=downloads&controller=browse&id=';
|
||||
|
||||
/**
|
||||
* @brief URL Base
|
||||
*/
|
||||
public static $urlTemplate = 'downloads_cat';
|
||||
|
||||
/**
|
||||
* @brief SEO Title Column
|
||||
*/
|
||||
public static $seoTitleColumn = 'name_furl';
|
||||
|
||||
/**
|
||||
* Get message
|
||||
|
||||
@@ -132,6 +132,9 @@ class _Field extends \IPS\CustomField
|
||||
unset( $values['cf_topic'] );
|
||||
}
|
||||
|
||||
$values['search_type'] = $values['pf_search_type'];
|
||||
unset( $values['pf_search_type'] );
|
||||
|
||||
return parent::formatFormValues( $values );
|
||||
}
|
||||
}
|
||||
@@ -95,4 +95,28 @@ class _Comment extends \IPS\Content\Comment implements \IPS\Content\EditHistory,
|
||||
{
|
||||
return parent::url( $action )->setQueryString( 'tab', 'comments' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Get snippet HTML for search result display
|
||||
*
|
||||
* @param array $indexData Data from the search index
|
||||
* @param array $authorData Basic data about the author. Only includes columns returned by \IPS\Member::columnsForPhoto()
|
||||
* @param array $itemData Basic data about the item. Only includes columns returned by item::basicDataColumns()
|
||||
* @param array|NULL $containerData Basic data about the author. Only includes columns returned by container::basicDataColumns()
|
||||
* @param array $reputationData Array of people who have given reputation and the reputation they gave
|
||||
* @param int|NULL $reviewRating If this is a review, the rating
|
||||
* @param string $view 'expanded' or 'condensed'
|
||||
* @return callable
|
||||
*/
|
||||
public static function searchResultSnippet( array $indexData, array $authorData, array $itemData, array $containerData = NULL, array $reputationData, $reviewRating, $view )
|
||||
{
|
||||
$screenshot = NULL;
|
||||
if ( isset( $itemData['extra'] ) )
|
||||
{
|
||||
$screenshot = isset( $itemData['extra']['record_thumb'] ) ? $itemData['extra']['record_thumb'] : $itemData['extra']['record_location'];
|
||||
}
|
||||
$url = \IPS\Http\Url::internal( \IPS\downloads\File::$urlBase . $indexData['index_item_id'], 'front', \IPS\downloads\File::$urlTemplate, \IPS\Http\Url::seoTitle( $indexData['index_title'] ?: $itemData[ \IPS\downloads\File::$databasePrefix . \IPS\downloads\File::$databaseColumnMap['title'] ] ) );
|
||||
|
||||
return \IPS\Theme::i()->getTemplate( 'global', 'downloads', 'front' )->searchResultCommentSnippet( $indexData, $screenshot, $url, $reviewRating, $view == 'condensed' );
|
||||
}
|
||||
}
|
||||
@@ -128,6 +128,47 @@ class _File extends \IPS\Content\Item implements
|
||||
* @brief [Content] Key for hide reasons
|
||||
*/
|
||||
public static $hideLogKey = 'downloads-file';
|
||||
|
||||
/**
|
||||
* Columns needed to query for search result / stream view
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function basicDataColumns()
|
||||
{
|
||||
$return = parent::basicDataColumns();
|
||||
$return[] = 'file_primary_screenshot';
|
||||
$return[] = 'file_version';
|
||||
$return[] = 'file_downloads';
|
||||
$return[] = 'file_cost';
|
||||
$return[] = 'file_nexus';
|
||||
return $return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Query to get additional data for search result / stream view
|
||||
*
|
||||
* @param array $items Item data (will be an array containing values from basicDataColumns())
|
||||
* @return array
|
||||
*/
|
||||
public static function searchResultExtraData( $items )
|
||||
{
|
||||
$screenshotIds = array();
|
||||
foreach ( $items as $itemData )
|
||||
{
|
||||
if ( $itemData['file_primary_screenshot'] )
|
||||
{
|
||||
$screenshotIds[] = $itemData['file_primary_screenshot'];
|
||||
}
|
||||
}
|
||||
|
||||
if ( count( $screenshotIds ) )
|
||||
{
|
||||
return iterator_to_array( \IPS\Db::i()->select( array( 'record_file_id', 'record_location', 'record_thumb' ), 'downloads_files_records', \IPS\Db::i()->in( 'record_id', $screenshotIds ) )->setKeyField( 'record_file_id' ) );
|
||||
}
|
||||
|
||||
return array();
|
||||
}
|
||||
|
||||
/**
|
||||
* Set name
|
||||
@@ -171,29 +212,21 @@ class _File 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=downloads&module=downloads&controller=view&id={$this->id}", 'front', 'downloads_file', $this->name_furl );
|
||||
|
||||
if ( $action )
|
||||
{
|
||||
$this->_url[ $_key ] = $this->_url[ $_key ]->setQueryString( 'do', $action );
|
||||
}
|
||||
}
|
||||
|
||||
return $this->_url[ $_key ];
|
||||
}
|
||||
/**
|
||||
* @brief URL Base
|
||||
*/
|
||||
public static $urlBase = 'app=downloads&module=downloads&controller=view&id=';
|
||||
|
||||
/**
|
||||
* @brief URL Base
|
||||
*/
|
||||
public static $urlTemplate = 'downloads_file';
|
||||
|
||||
/**
|
||||
* @brief SEO Title Column
|
||||
*/
|
||||
public static $seoTitleColumn = 'name_furl';
|
||||
|
||||
/**
|
||||
* Get URL for last comment page
|
||||
@@ -225,6 +258,16 @@ class _File extends \IPS\Content\Item implements
|
||||
return array( \IPS\Theme::i()->getTemplate( 'browse', 'downloads' ), 'rows' );
|
||||
}
|
||||
|
||||
/**
|
||||
* HTML to manage an item's follows
|
||||
*
|
||||
* @return callable
|
||||
*/
|
||||
public static function manageFollowRows()
|
||||
{
|
||||
return array( \IPS\Theme::i()->getTemplate( 'global', 'downloads', 'front' ), 'manageFollowRow' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Files
|
||||
*/
|
||||
@@ -288,17 +331,29 @@ class _File extends \IPS\Content\Item implements
|
||||
* @return \IPS\nexus\Money|NULL
|
||||
*/
|
||||
public function price()
|
||||
{
|
||||
return static::_price( $this->cost, $this->nexus );
|
||||
}
|
||||
|
||||
/**
|
||||
* Get Price
|
||||
*
|
||||
* @param float $cost The cost
|
||||
* @param string $nexusPackageIds Comma-delimited list of associated package IDs
|
||||
* @return \IPS\nexus\Money|NULL
|
||||
*/
|
||||
public static function _price( $cost, $nexusPackageIds )
|
||||
{
|
||||
if ( \IPS\Application::appIsEnabled( 'nexus' ) and \IPS\Settings::i()->idm_nexus_on )
|
||||
{
|
||||
if ( $this->nexus )
|
||||
if ( $nexusPackageIds )
|
||||
{
|
||||
$packages = explode( ',', $this->nexus );
|
||||
$packages = explode( ',', $nexusPackageIds );
|
||||
try
|
||||
{
|
||||
if ( count( $packages ) === 1 )
|
||||
{
|
||||
return \IPS\nexus\Package::load( $this->nexus )->priceToDisplay();
|
||||
return \IPS\nexus\Package::load( $nexusPackageIds )->priceToDisplay();
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -310,10 +365,10 @@ class _File extends \IPS\Content\Item implements
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if ( $this->cost )
|
||||
if ( $cost )
|
||||
{
|
||||
$currency = isset( $_SESSION['currency'] ) ? $_SESSION['currency'] : \IPS\nexus\Customer::loggedIn()->defaultCurrency();
|
||||
if ( $costs = json_decode( $this->cost, TRUE ) and isset( $costs[ $currency ]['amount'] ) )
|
||||
if ( $costs = json_decode( $cost, TRUE ) and isset( $costs[ $currency ]['amount'] ) )
|
||||
{
|
||||
if ( $costs[ $currency ]['amount'] )
|
||||
{
|
||||
@@ -322,7 +377,7 @@ class _File extends \IPS\Content\Item implements
|
||||
}
|
||||
else
|
||||
{
|
||||
return new \IPS\nexus\Money( $this->cost, $currency );
|
||||
return new \IPS\nexus\Money( $cost, $currency );
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1364,6 +1419,28 @@ class _File extends \IPS\Content\Item implements
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Are comments supported by this class?
|
||||
*
|
||||
* @param \IPS\Member\NULL $member The member to check for or NULL fto not check permission
|
||||
* @return int
|
||||
*/
|
||||
public static function supportsComments( \IPS\Member $member = NULL )
|
||||
{
|
||||
return parent::supportsComments() and ( !$member or \IPS\downloads\Category::countWhere( 'read', $member, array( 'cbitoptions & 4' ) ) );
|
||||
}
|
||||
|
||||
/**
|
||||
* Are reviews supported by this class?
|
||||
*
|
||||
* @param \IPS\Member\NULL $member The member to check for or NULL to not check permission
|
||||
* @return int
|
||||
*/
|
||||
public static function supportsReviews( \IPS\Member $member = NULL )
|
||||
{
|
||||
return parent::supportsReviews() and ( !$member or \IPS\downloads\Category::countWhere( 'read', $member, array( 'cbitoptions & 256' ) ) );
|
||||
}
|
||||
|
||||
/* !Tags */
|
||||
|
||||
@@ -1865,6 +1942,32 @@ class _File extends \IPS\Content\Item implements
|
||||
return $this->primary_screenshot_thumb ? \IPS\File::get( 'downloads_Screenshots', $this->primary_screenshot_thumb ) : NULL;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get snippet HTML for search result display
|
||||
*
|
||||
* @param array $indexData Data from the search index
|
||||
* @param array $authorData Basic data about the author. Only includes columns returned by \IPS\Member::columnsForPhoto()
|
||||
* @param array $itemData Basic data about the item. Only includes columns returned by item::basicDataColumns()
|
||||
* @param array|NULL $containerData Basic data about the author. Only includes columns returned by container::basicDataColumns()
|
||||
* @param array $reputationData Array of people who have given reputation and the reputation they gave
|
||||
* @param int|NULL $reviewRating If this is a review, the rating
|
||||
* @param string $view 'expanded' or 'condensed'
|
||||
* @return callable
|
||||
*/
|
||||
public static function searchResultSnippet( array $indexData, array $authorData, array $itemData, array $containerData = NULL, array $reputationData, $reviewRating, $view )
|
||||
{
|
||||
$screenshot = NULL;
|
||||
if ( isset( $itemData['extra'] ) )
|
||||
{
|
||||
$screenshot = isset( $itemData['extra']['record_thumb'] ) ? $itemData['extra']['record_thumb'] : $itemData['extra']['record_location'];
|
||||
}
|
||||
$url = \IPS\Http\Url::internal( static::$urlBase . $indexData['index_item_id'], 'front', static::$urlTemplate, \IPS\Http\Url::seoTitle( $indexData['index_title'] ?: $itemData[ static::$databasePrefix . static::$databaseColumnMap['title'] ] ) );
|
||||
|
||||
$price = static::_price( $itemData['file_cost'], $itemData['file_nexus'] );
|
||||
|
||||
return \IPS\Theme::i()->getTemplate( 'global', 'downloads', 'front' )->searchResultFileSnippet( $indexData, $itemData, $screenshot, $url, $price, $view == 'condensed' );
|
||||
}
|
||||
|
||||
/**
|
||||
* If, when making a post, we should merge with an existing comment, this method returns the comment to merge with
|
||||
*
|
||||
|
||||
@@ -99,4 +99,22 @@ class _Review extends \IPS\Content\Review implements \IPS\Content\EditHistory, \
|
||||
{
|
||||
return parent::url( $action )->setQueryString( 'tab', 'reviews' );
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Get snippet HTML for search result display
|
||||
*
|
||||
* @param array $indexData Data from the search index
|
||||
* @param array $authorData Basic data about the author. Only includes columns returned by \IPS\Member::columnsForPhoto()
|
||||
* @param array $itemData Basic data about the item. Only includes columns returned by item::basicDataColumns()
|
||||
* @param array|NULL $containerData Basic data about the author. Only includes columns returned by container::basicDataColumns()
|
||||
* @param array $reputationData Array of people who have given reputation and the reputation they gave
|
||||
* @param int|NULL $reviewRating If this is a review, the rating
|
||||
* @param string $view 'expanded' or 'condensed'
|
||||
* @return callable
|
||||
*/
|
||||
public static function searchResultSnippet( array $indexData, array $authorData, array $itemData, array $containerData = NULL, array $reputationData, $reviewRating, $view )
|
||||
{
|
||||
return \IPS\downloads\File\Comment::searchResultSnippet( $indexData, $authorData, $itemData, $containerData, $reputationData, $reviewRating, $view );
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
<?php
|
||||
/**
|
||||
* @brief downloadsCommentFeed 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\downloads\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;
|
||||
}
|
||||
|
||||
/**
|
||||
* downloadsCommentFeed Widget
|
||||
*/
|
||||
class _downloadsCommentFeed extends \IPS\Content\WidgetComment
|
||||
{
|
||||
/**
|
||||
* @brief Widget Key
|
||||
*/
|
||||
public $key = 'downloadsCommentFeed';
|
||||
|
||||
/**
|
||||
* @brief App
|
||||
*/
|
||||
public $app = 'downloads';
|
||||
|
||||
/**
|
||||
* @brief Plugin
|
||||
*/
|
||||
public $plugin = '';
|
||||
|
||||
/**
|
||||
* Class
|
||||
*/
|
||||
protected static $class = 'IPS\downloads\File\Comment';
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
<?php
|
||||
/**
|
||||
* @brief downloadsReviewFeed 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\downloads\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;
|
||||
}
|
||||
|
||||
/**
|
||||
* downloadsReviewFeed Widget
|
||||
*/
|
||||
class _downloadsReviewFeed extends \IPS\Content\WidgetComment
|
||||
{
|
||||
/**
|
||||
* @brief Widget Key
|
||||
*/
|
||||
public $key = 'downloadsReviewFeed';
|
||||
|
||||
/**
|
||||
* @brief App
|
||||
*/
|
||||
public $app = 'downloads';
|
||||
|
||||
/**
|
||||
* @brief Plugin
|
||||
*/
|
||||
public $plugin = '';
|
||||
|
||||
/**
|
||||
* Class
|
||||
*/
|
||||
protected static $class = 'IPS\downloads\File\Review';
|
||||
}
|
||||
Reference in new issue
Block a user