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(15,"104");
0034 $productsThemesPlasma = $modelInfo->getJsonLastProductsForHostStores(15,"365,119,123,266,114,118,349,417,101,100,111,422,423,446,417");
0035 $productsWindowmanager = $modelInfo->getJsonLastProductsForHostStores(15,"117,267,139,143,142,140,141,144");
0036 $productsIconsCursors= $modelInfo->getJsonLastProductsForHostStores(15,"386,107");
0037 $productsScreenshots= $modelInfo->getJsonLastProductsForHostStores(15,"225,445");
0038 $productsApps = $modelInfo->getJsonLastProductsForHostStores(15,233);
0039 $productsAddons = $modelInfo->getJsonLastProductsForHostStores(15,"152");
0040 $productsWallpapersOriginal = $modelInfo->getJsonLastProductsForHostStores(15,"295,158",null,true);
0041 $productsWallpapers = $modelInfo->getJsonLastProductsForHostStores(15,"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','catIds' =>'104','products' => $productsThemesGTK),
0084   'productsThemesPlasma' => array('title' =>'KDE Plasma','catIds' =>'365','products' => $productsThemesPlasma),
0085 
0086   'productsWindowmanager' =>array('title' =>'Window Managers','catIds' =>'147','products' => $productsWindowmanager),
0087   'productsIconsCursors' =>array('title' =>'Icons, Cursors','catIds' =>'386,107','products' => $productsIconsCursors),
0088 
0089   'productsWallpapers' =>array('title' =>'Artwork, Wallpapers','catIds' =>'158,295','products' => $productsWallpapers),
0090   'productsWallpapersOriginal' =>array('title' =>'Artwork, Wallpapers (Original)','catIds' =>'158,295','products' => $productsWallpapersOriginal),
0091 
0092   'productsAddons' =>array('title' =>'App Add-Ons','catIds' =>'152','products' => $productsAddons),
0093   'productsApps' =>array('title' =>'Applications','catIds' =>'233','products' => $productsApps),
0094 
0095   'productsScreenshots' =>array('title' =>'Concepts, Screenshots','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 <link type="text/css" rel="stylesheet" href="/theme/react/assets/css/carousel.css"/>
0102 
0103 <main id="explore-content" class="startpage-store">
0104 
0105     <div class="sidebar-left">
0106       <?php  echo $this->render('explore/partials/filter.phtml'); ?>
0107     </div>
0108 
0109     <div class="content">
0110       <div id="main-content"></div>
0111       <script type="text/javascript">
0112         var page = "opendesktop";
0113         var hpVersion = 2;
0114         var data = <?php echo Zend_Json::encode($response)?>;
0115       </script>
0116       <script src="/theme/react/opendesktop-home.js" type="text/javascript"></script>
0117       <div id="carousel-module-container">
0118       </div>
0119       <script src="/theme/react/carousel.js" type="text/javascript"></script>
0120     </div>
0121 
0122     <div class="sidebar-right">
0123       <aside  id="explore-sidebar" >
0124         <?php
0125             $this->show_git = false;
0126             echo $this->render('/home/partials/common_rightsidebar.phtml');
0127         ?>
0128         <div>
0129             <script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
0130             <!-- Responsive New Displayblock -->
0131             <ins class="adsbygoogle"
0132                  style="display:block"
0133                  data-ad-client="ca-pub-1150932386931372"
0134                  data-ad-slot="1024407251"
0135                  data-ad-format="auto"></ins>
0136             <script>
0137             (adsbygoogle = window.adsbygoogle || []).push({});
0138             </script>
0139         </div>
0140       </aside>
0141     </div>
0142 
0143   <div class="tooltip_templates" style="display:none">
0144       <span id="tooltip_content">
0145           <i class="fa fa-spinner"></i>
0146       </span>
0147   </div>
0148 
0149 </main>