diff --git a/application/modules/default/views/scripts/product/index.phtml b/application/modules/default/views/scripts/product/index.phtml
index df63fd676..20bdc21b0 100644
--- a/application/modules/default/views/scripts/product/index.phtml
+++ b/application/modules/default/views/scripts/product/index.phtml
@@ -1,1134 +1,1104 @@
.
**/
$helpAddDefaultScheme = new Default_View_Helper_AddDefaultScheme();
$helpMemberUrl = new Default_View_Helper_BuildMemberUrl();
$helpEncryptUrl = new Default_View_Helper_EncryptUrl();
$helpImage = new Default_View_Helper_Image();
$helpTruncate = new Default_View_Helper_Truncate();
$helpProductUrl = new Default_View_Helper_BuildProductUrl();
$helpBBCode = new Default_View_Helper_Bbcode2html();
$identity = Zend_Auth::getInstance()->getStorage()->read();
$loginUrl = '/login?redirect=' . $helpEncryptUrl->encryptUrl(Zend_Controller_Front::getInstance()->getRequest()
->getRequestUri(), true);
$viewSidebar = 'product/partials/productAboutSidebar.phtml';
$viewClaimBox = false;
if ($this->product->claimable == 1) {
$viewClaimBox = 'product/partials/productClaimTopHeader.phtml';
}
$helpProjectFiles = new Default_View_Helper_ProjectFiles();
$productFileInfos = $helpProjectFiles->projectFiles($this->product->ppload_collection_id);
$this->product->title = Default_Model_HtmlPurify::purify($this->product->title);
$this->product->description = Default_Model_BBCode::renderHtml(Default_Model_HtmlPurify::purify($this->product->description));
$this->product->version = Default_Model_HtmlPurify::purify($this->product->version);
//$this->product->embed_code =Default_Model_HtmlPurify::purify($this->product->embed_code,Default_Model_HtmlPurify::ALLOW_EMBED);
$this->product->link_1 = Default_Model_HtmlPurify::purify($helpAddDefaultScheme->addDefaultScheme($this->product->link_1),Default_Model_HtmlPurify::ALLOW_URL);
$this->product->source_url = Default_Model_HtmlPurify::purify($this->product->source_url,Default_Model_HtmlPurify::ALLOW_URL);
$this->product->facebook_code = Default_Model_HtmlPurify::purify($this->product->facebook_code,Default_Model_HtmlPurify::ALLOW_URL);
$this->product->twitter_code = Default_Model_HtmlPurify::purify($this->product->twitter_code,Default_Model_HtmlPurify::ALLOW_URL);
$this->product->google_code = Default_Model_HtmlPurify::purify($this->product->google_code,Default_Model_HtmlPurify::ALLOW_URL);
$this->doctype(Zend_View_Helper_Doctype::XHTML1_RDFA);
$this->headMeta()->setName('description',
$helpTruncate->truncate($this->product->description, 200, '...', false, true));
$this->headMeta()->setName('title',
$helpTruncate->truncate($this->product->title, 200, '...', false, true));
$this->headMeta()->appendProperty('og:url', $helpProductUrl->buildProductUrl($this->product->project_id, '', null, true));
$this->headMeta()->appendProperty('og:type', 'website');
$this->headMeta()->appendProperty('og:title', $this->product->title);
$this->headMeta()->appendProperty('og:description',
$helpTruncate->truncate($this->product->description, 200, '...', false, true));
$this->headMeta()->appendProperty('og:image',
$helpImage->Image($this->product->image_small, array('width' => 400, 'height' => 400)));
$tableProject = new Default_Model_Project();
$tableProjectUpdates = new Default_Model_ProjectUpdates();
$this->updates = $tableProjectUpdates->fetchProjectUpdates($this->product->project_id);
$tableProjectRatings = new Default_Model_DbTable_ProjectRating();
$this->ratings = $tableProjectRatings->fetchRating($this->product->project_id);
$cntRatingsActive = 0;
foreach ($this->ratings as $p) {
if($p['rating_active']==1) $cntRatingsActive =$cntRatingsActive+1;
}
if (Zend_Auth::getInstance()->hasIdentity()){
$this->ratingOfUser = $tableProjectRatings->getProjectRateForUser($this->product->project_id,$identity->member_id);
}
$tableProjectFollower = new Default_Model_DbTable_ProjectFollower();
$this->likes = $tableProjectFollower->fetchLikesForProject($this->product->project_id);
$projectplings = new Default_Model_ProjectPlings();
$this->projectplings = $projectplings->fetchPlingsForProject($this->product->project_id);
$tagmodel = new Default_Model_Tags();
$helperUserRole = new Backend_View_Helper_UserRole();
$userRoleName = $helperUserRole->userRole();
$productJson = Zend_Json::encode($this->product);
$filesJson = $this->filesJson;
$helperCatXdgType = new Default_View_Helper_CatXdgType();
$xdgTypeJson = Zend_Json::encode($helperCatXdgType->catXdgType($this->product->project_category_id));
$isowner = false;
if(Zend_Auth::getInstance()->hasIdentity() && $identity->member_id==$this->product->member_id){
$isowner = true;
}
$filesTable = new Default_Model_DbTable_PploadFiles();
$countFiles = $filesTable->fetchFilesCntForProject($this->product->ppload_collection_id);
?>
hasIdentity()) {
?>
hasIdentity()) {
?>
hasIdentity()) { ?>
Please login.
Login
to limit spam and fraud voting.
Become a supporter
You can still 'Like' a product, but that doesn't affect its score.
*/
?>
partial(
'/product/partials/projectlike.phtml',
array(
"authMember" => $identity,
"project_id" => $this->product->project_id
)
);
?>
render('partials/sidebarRating.phtml'); ?>
product->embed_code) && trim($this->product->embed_code)!=''): ?>
galleryPictures = $tableProject->getGalleryPictureSources($this->product->project_id);
if (count($this->galleryPictures) > 0) {
foreach ($this->galleryPictures as $picture): ?>
product->embed_code) && (trim($this->product->embed_code)!='')): ?>
= $this->product->embed_code ?>
galleryPictures as $picture): ?>
galleryPictures) > 1 || (count($this->galleryPictures) ==1&&(null != $this->product->embed_code) && (trim($this->product->embed_code)!=''))) { ?>
product->is_gitlab_project && $this->product->use_gitlab_project_readme && null != $this->gitlab_project['readme_url']) {
?>
Description:
=$this->readme ?>
Description:
=$this->product->description ?>
isProjectEbook($this->product->project_id)){?>
getTagsEbookSubject($this->product->project_id);
if(false === empty($tagsuser))
{
echo 'Subjects:
';
foreach ($tagsuser as $tag) {
?>
- =$tag?>
';
} ?>
getTagsEbookAuthor($this->product->project_id);
if(false === empty($tagsuser))
{
echo 'Author/s:
';
foreach ($tagsuser as $tag) {
?>
- =$tag?>
';
} ?>
getTagsEbookEditor($this->product->project_id);
if(false === empty($tagsuser))
{
echo 'Editor/s:
';
foreach ($tagsuser as $tag) {
?>
- =$tag?>
';
} ?>
getTagsEbookIllustrator($this->product->project_id);
if(false === empty($tagsuser))
{
echo 'Illustrator/s:
';
foreach ($tagsuser as $tag) {
?>
- =$tag?>
';
} ?>
getTagsEbookTranslator($this->product->project_id);
if(false === empty($tagsuser))
{
echo 'Tranlator/s:
';
foreach ($tagsuser as $tag) {
?>
- =$tag?>
';
} ?>
getTagsEbookShelf($this->product->project_id);
if(false === empty($tagsuser))
{
echo 'Bookshelf:
';
foreach ($tagsuser as $tag) {
?>
- =$tag?>
';
} ?>
getTagsEbookLanguage($this->product->project_id);
if(false === empty($tagsuser))
{
echo 'Language:
';
foreach ($tagsuser as $tag) {
?>
- =$tag?>
';
} ?>
getTagsEbookType($this->product->project_id);
if(false === empty($tagsuser))
{
echo 'Type:
';
foreach ($tagsuser as $tag) {
?>
- =$tag?>
';
} ?>
updates) > 0) {
$this->productUpdate = $this->updates[0];
?>
Last changelog:
= $this->render('product/partials/productUpdatesV1.phtml'); ?>
paramPageId;
$testComments = $modelComments->getCommentTreeForProject($this->product->project_id);
$testComments->setItemCountPerPage(25);
$testComments->setCurrentPageNumber($offset);
$this->comments = $testComments;
echo $this->render('product/partials/productCommentsUX1.phtml');
?>
partial(
$viewClaimBox,
array(
"member" => $this->member,
"product" => $this->product
)
);
}
?>
product->embed_code)): ?>
= $this->product->embed_code ?>
updates) > 0) { ?>
updates as $this->productUpdate) {
echo $this->render('product/partials/productUpdatesV1.phtml');
}
?>
product->show_gitlab_project_issues) { ?>
gitlab_project_issues;
$i = 0;
foreach ($issues as $issue){
$date = date('Y-m-d H:i:s', strtotime($issue['created_at']));
echo '';
$i ++;
if($i>5) {
break;
}
}
?>
Show all = count($issues) ?> Issues
ratings) > 0) { ?>
render('product/partials/productRating.phtml');
?>
likes) > 0) { ?>
render('product/partials/productLikes.phtml');
?>
projectplings) > 0) { ?>
render('product/partials/productPlings.phtml');
?>
render('product/partials/ppload.phtml');
?>
product->claimable)) { ?>
render('partials/sidebarRating.phtml'); */ ?>
*/
?>
moreProducts = $tableProject->fetchMoreProjects($this->product, 6);
$this->moreProductsTitle = 'More ' . $this->product->cat_title . ' from ' . $this->product->username;
if (count($this->moreProducts) > 0) {
echo $this->render('product/partials/productMoreProductsWidgetV1.phtml');
} ?>
moreProducts = $tableProject->fetchMoreProjectsOfOtherUsr($this->product, 6);
$this->moreProductsTitle = 'Other ' . $this->product->cat_title;
if (count($this->moreProducts) > 0) {
echo $this->render('product/partials/productMoreProductsWidgetV1.phtml');
} ?>
render('partials/sidebarCcLicense.phtml'); ?>
render('product/partials/details.phtml'); ?>
render('product/partials/tags.phtml'); ?>
-
-
-
-
+ }(document, 'script', 'facebook-jssdk'));
+
+
inlineScript()->appendScript(
' $(document).ready(function(){
InitActiveHashTab.setup();
PartialJson.setup();
PartialJsonFraud.setup();
ProductDetailCarousel.setup();
PartialCommentReviewForm.setup();
PartialsButtonHeartDetail.setup();
PartialsButtonPlingProject.setup();
TooltipUser.setup("tooltipuserleft","left");
AppimagequestionOnClick.setup();
Opendownloadfile.setup();
});
');
diff --git a/application/modules/default/views/scripts/product/partials/details.phtml b/application/modules/default/views/scripts/product/partials/details.phtml
index a90f80288..2bf0fcfe4 100644
--- a/application/modules/default/views/scripts/product/partials/details.phtml
+++ b/application/modules/default/views/scripts/product/partials/details.phtml
@@ -1,375 +1,332 @@
.
**/
$tableProject = new Default_Model_Project();
$this->product_views = $tableProject->fetchProjectViews($this->product->project_id);
$helperUserRole = new Backend_View_Helper_UserRole();
$userRoleName = $helperUserRole->userRole();
$tableTags = new Default_Model_Tags();
$tagsArray = $tableTags->getTagsArray($this->product->project_id, $tableTags::TAG_TYPE_PROJECT, $tableTags::TAG_GHNS_EXCLUDED_GROUPID);
$isGhnsExcluded = false;
if(isset($tagsArray) && (count($tagsArray) == 1)) {
$isGhnsExcluded = true;
}
$filesTable = new Default_Model_DbTable_PploadFiles();
$countDownloadsToday = $filesTable->fetchCountDownloadsTodayForProject($this->product->ppload_collection_id);
if(empty($countDownloadsToday)) {
$countDownloadsToday = 0;
}
// $heute = date("Y-m-d H:i:s");
$today = (new DateTime())->modify('-1 day');
$filterDownloadToday = $today->format("Y-m-d H:i:s");
?>
inlineScript()->appendScript(
' $(document).ready(function(){
GhnsExcludedClick.setup('.$this->product->project_id.');
});
');
}