File indexing completed on 2024-12-29 05:24:43
0001 <?php 0002 /** 0003 * ocs-webserver 0004 * 0005 * Copyright 2016 by pling GmbH. 0006 * 0007 * This file is part of ocs-webserver. 0008 * 0009 * This program is free software: you can redistribute it and/or modify 0010 * it under the terms of the GNU Affero General Public License as 0011 * published by the Free Software Foundation, either version 3 of the 0012 * License, or (at your option) any later version. 0013 * 0014 * This program is distributed in the hope that it will be useful, 0015 * but WITHOUT ANY WARRANTY; without even the implied warranty of 0016 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 0017 * GNU Affero General Public License for more details. 0018 * 0019 * You should have received a copy of the GNU Affero General Public License 0020 * along with this program. If not, see <http://www.gnu.org/licenses/>. 0021 **/ 0022 $this->headTitle($_SERVER['HTTP_HOST'], 'SET'); 0023 $this->doctype(Zend_View_Helper_Doctype::XHTML1_RDFA); 0024 $this->headMeta()->appendProperty('og:url', 'www.opendesktop.org'); 0025 $this->headMeta()->appendProperty('og:type', 'website'); 0026 $this->headMeta()->appendProperty('og:title', 'opendesktop.org'); 0027 $this->headMeta()->appendProperty('og:site_name','www.opendesktop.org'); 0028 $this->headMeta()->appendProperty('og:description','A community where developers and artists share applications, themes and other content'); 0029 $this->headMeta()->appendProperty('og:image','https://www.opendesktop.org/images/system/opendesktop-logo.png'); 0030 0031 $modelInfo = new Default_Model_Info(); 0032 0033 $productsThemesGTK = $modelInfo->getJsonLastProductsForHostStores(5,"366,363,273,267,138,125,131,153,154,414,133"); 0034 $productsThemesPlasma = $modelInfo->getJsonLastProductsForHostStores(5,"365,119,123,266,114,118,349,417,101,100,111,422,423,446,417"); 0035 $productsWindowmanager = $modelInfo->getJsonLastProductsForHostStores(5,"117,267,139,143,142,140,141,144"); 0036 $productsIconsCursors= $modelInfo->getJsonLastProductsForHostStores(5,"386,107"); 0037 $productsScreenshots= $modelInfo->getJsonLastProductsForHostStores(5,"225,445"); 0038 $productsApps = $modelInfo->getJsonLastProductsForHostStores(5,233); 0039 $productsAddons = $modelInfo->getJsonLastProductsForHostStores(5,"152"); 0040 $productsWallpapersOriginal = $modelInfo->getJsonLastProductsForHostStores(5,"295,158",null,true); 0041 $productsWallpapers = $modelInfo->getJsonLastProductsForHostStores(5,"295,158",null,false); 0042 $this->countSupporters = $modelInfo->getCountAllSupporters(); 0043 $featuredProducts = $modelInfo->getFeaturedProductsForHostStores(100); 0044 if ($featuredProducts->getTotalItemCount()) { 0045 $request = Zend_Controller_Front::getInstance()->getRequest(); 0046 $offset = (int)$request->getParam('page'); 0047 $irandom = rand(1,$featuredProducts->getTotalItemCount()); 0048 $featuredProducts->setItemCountPerPage(1); 0049 $featuredProducts->setCurrentPageNumber($irandom); 0050 $this->featureProducts = $featuredProducts; 0051 } 0052 0053 $helperBuildMemberUrl = new Default_View_Helper_BuildMemberUrl(); 0054 $helperImage = new Default_View_Helper_Image(); 0055 $helpPrintDate = new Default_View_Helper_PrintDate(); 0056 0057 $item; 0058 foreach ($this->featureProducts as $i) { 0059 $item = $i; 0060 break; 0061 } 0062 $helpCategories = new Default_View_Helper_FetchCategoriesForProductAsString(); 0063 $imagehelper = new Default_View_Helper_Image(); 0064 $feature = array( 0065 'project_id' => $item['project_id'], 0066 'member_id' => $item['member_id'], 0067 'username' => $item['username'], 0068 'profile_image_url' => $imagehelper->Image($item['profile_image_url'],array('width' => 300, 'height' => 230, 'crop' => 1)), 0069 'featured' => $item['featured'], 0070 'description' => $item['description'], 0071 'title' => $item['title'], 0072 'category' => $helpCategories->fetchCategoriesForProductAsString($item['project_id']), 0073 'image_small' => $item['image_small'], 0074 'laplace_score' => $item['laplace_score'], 0075 'count_likes' => $item['count_likes'], 0076 'count_dislikes' => $item['count_dislikes'], 0077 'changed_at' => $item['changed_at'], 0078 'created_at' => $item['created_at'], 0079 'count_comments' => $item['count_comments'] 0080 ); 0081 0082 $response = array( 0083 'productsThemesGTK' => array('title' =>'GTK/Gnome','catTitleIds' =>'366','catIds' =>'366,363,273,267,138,125,131,153,154,414,133','products' => $productsThemesGTK), 0084 'productsThemesPlasma' => array('title' =>'KDE Plasma','catTitleIds' =>'365','catIds' =>'365,119,123,266,114,118,349,417,101,100,111,422,423,446,417','products' => $productsThemesPlasma), 0085 0086 'productsWindowmanager' =>array('title' =>'Window Managers','catTitleIds' =>'147','catIds' =>'117,267,139,143,142,140,141,144','products' => $productsWindowmanager), 0087 'productsIconsCursors' =>array('title' =>'Icons, Cursors','catTitleIds' =>'386,107','catIds' =>'386,107','products' => $productsIconsCursors), 0088 0089 'productsWallpapers' =>array('title' =>'Artwork, Wallpapers','catTitleIds' =>'158,295','catIds' =>'158,295','products' => $productsWallpapers), 0090 'productsWallpapersOriginal' =>array('title' =>'Artwork, Wallpapers (Original)','catTitleIds' =>'158,295','catIds' =>'158,295','products' => $productsWallpapersOriginal), 0091 0092 'productsAddons' =>array('title' =>'App Add-Ons','catTitleIds' =>'152','catIds' =>'152','products' => $productsAddons), 0093 'productsApps' =>array('title' =>'Applications','catTitleIds' =>'233','catIds' =>'233','products' => $productsApps), 0094 0095 'productsScreenshots' =>array('title' =>'Concepts, Screenshots','catTitleIds' =>'445,225','catIds' =>'445,225','products' => $productsScreenshots), 0096 "featureProducts" => Zend_Json::encode($feature) 0097 ); 0098 0099 ?> 0100 <link type="text/css" rel="stylesheet" href="/theme/react/assets/css/homepage.css"/> 0101 0102 <main id="explore-content" class="startpage-store"> 0103 0104 <div class="sidebar-left"> 0105 <?php echo $this->render('explore/partials/filter.phtml'); ?> 0106 </div> 0107 0108 <div class="content"> 0109 <div id="main-content"></div> 0110 <script type="text/javascript"> 0111 var data = <?php echo Zend_Json::encode($response)?>; 0112 var hpVersion = 1; 0113 0114 </script> 0115 <script src="/theme/react/opendesktop-home.js" type="text/javascript"></script> 0116 </div> 0117 0118 <div class="sidebar-right"> 0119 <aside id="explore-sidebar" > 0120 <?php 0121 $this->show_git = false; 0122 echo $this->render('/home/partials/common_rightsidebar.phtml'); 0123 ?> 0124 <div> 0125 <script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script> 0126 <!-- Responsive New Displayblock --> 0127 <ins class="adsbygoogle" 0128 style="display:block" 0129 data-ad-client="ca-pub-1150932386931372" 0130 data-ad-slot="1024407251" 0131 data-ad-format="auto"></ins> 0132 <script> 0133 (adsbygoogle = window.adsbygoogle || []).push({}); 0134 </script> 0135 </div> 0136 </aside> 0137 </div> 0138 0139 <div class="tooltip_templates" style="display:none"> 0140 <span id="tooltip_content"> 0141 <i class="fa fa-spinner"></i> 0142 </span> 0143 </div> 0144 0145 </main>