PageRenderTime 46ms CodeModel.GetById 19ms RepoModel.GetById 1ms app.codeStats 0ms

/modules/mod_image_show_gk4/styles/gk_cherrydesign/view.php

https://gitlab.com/ppapadatis/Videolearn
PHP | 113 lines | 81 code | 13 blank | 19 comment | 25 complexity | eb553d7d1b771292c41ed8f575ca7316 MD5 | raw file
  1. <?php
  2. /**
  3. * GK Image Show - view file
  4. * @package Joomla!
  5. * @Copyright (C) 2009-2011 Gavick.com
  6. * @ All rights reserved
  7. * @ Joomla! is Free Software
  8. * @ Released under GNU/GPL License : http://www.gnu.org/copyleft/gpl.html
  9. * @ version $Revision: GK4 1.0 $
  10. **/
  11. // access restriction
  12. defined('_JEXEC') or die('Restricted access');
  13. // vars
  14. $highest_layer = 0;
  15. // initializing variables
  16. $URI = JURI::getInstance();
  17. ?>
  18. <div id="gkIs-<?php echo $this->config['module_id'];?>" class="gkIsWrapper-gk_cherrydesign" style="height: <?php echo $height; ?>px;">
  19. <?php if($this->config['config']->gk_cherrydesign->gk_cherrydesign_pagination) : ?>
  20. <ul class="gkIsPagination<?php echo ($this->config['config']->gk_cherrydesign->gk_cherrydesign_pagination_position == 'left') ? ' left' : ' right'; ?>">
  21. <?php
  22. $counter = 0;
  23. for($x = 0; $x < count($this->config['image_show_data']); $x++) :
  24. ?>
  25. <?php if($this->config['image_show_data'][$x]->published) : ?>
  26. <li>
  27. <?php
  28. echo $counter+1;
  29. $counter++;
  30. ?>
  31. </li>
  32. <?php endif; ?>
  33. <?php endfor; ?>
  34. </ul>
  35. <?php endif; ?>
  36. <div class="gkIsImage<?php echo ($this->config['config']->gk_cherrydesign->gk_cherrydesign_pagination_position == 'left') ? ' right' : ' left'; ?>" style="width: <?php echo $width; ?>px;height: <?php echo $height; ?>px;">
  37. <?php for($i = 0; $i < count($this->config['image_show_data']); $i++) : ?>
  38. <?php if($this->config['image_show_data'][$i]->published) : ?>
  39. <?php
  40. unset($path, $title, $link);
  41. // creating slide path
  42. $path = $uri->root().'modules/mod_image_show_gk4/cache/'.GKIS_Coffe_Image::translateName($this->config['image_show_data'][$i]->image, $this->config['module_id']);
  43. if($this->config['image_show_data'][$i]->type == "k2"){
  44. $title = htmlspecialchars($this->articlesK2[$this->config['image_show_data'][$i]->artK2_id]["title"]);
  45. $link = $this->articlesK2[$this->config['image_show_data'][$i]->artK2_id]["link"];
  46. } else {
  47. // creating slide title
  48. $title = htmlspecialchars(($this->config['image_show_data'][$i]->type == "text") ? $this->config['image_show_data'][$i]->name : $this->articles[$this->config['image_show_data'][$i]->art_id]["title"]);
  49. // creating slide link
  50. $link = ($this->config['image_show_data'][$i]->type == "text") ? $this->config['image_show_data'][$i]->url : $this->articles[$this->config['image_show_data'][$i]->art_id]["link"];
  51. }
  52. ?>
  53. <div class="gkIsSlide" style="z-index: <?php echo $i+1; ?>;" title="<?php echo $title; ?>"><a href="<?php echo $path; ?>">src</a><a href="<?php echo $link; ?>">link</a></div>
  54. <?php endif; ?>
  55. <?php endfor; ?>
  56. <div class="gkIsPreloader"></div>
  57. <div class="gkIsOverlay"></div>
  58. <?php if($this->config['config']->gk_cherrydesign->gk_cherrydesign_show_text_block) : ?>
  59. <div class="gkIsTextData">
  60. <?php for($i = 0; $i < count($this->config['image_show_data']); $i++) : ?>
  61. <?php if($this->config['image_show_data'][$i]->published) : ?>
  62. <?php
  63. // cleaning variables
  64. unset($title, $link, $text, $exploded_text);
  65. if($this->config['image_show_data'][$i]->type == "k2"){
  66. $title = htmlspecialchars($this->articlesK2[$this->config['image_show_data'][$i]->artK2_id]["title"]);
  67. $link = $this->articlesK2[$this->config['image_show_data'][$i]->artK2_id]["link"];
  68. $text = $this->articlesK2[$this->config['image_show_data'][$i]->artK2_id]["content"];
  69. } else {
  70. // creating slide title
  71. $title = htmlspecialchars(($this->config['image_show_data'][$i]->type == "text") ? $this->config['image_show_data'][$i]->name : $this->articles[$this->config['image_show_data'][$i]->art_id]["title"]);
  72. // creating slide link
  73. $link = ($this->config['image_show_data'][$i]->type == "text") ? $this->config['image_show_data'][$i]->url : $this->articles[$this->config['image_show_data'][$i]->art_id]["link"];
  74. // creating slide text
  75. $text = ($this->config['image_show_data'][$i]->type != "text") ? $this->articles[$this->config['image_show_data'][$i]->art_id]["text"] : $this->config['image_show_data'][$i]->content;
  76. }
  77. $text = htmlspecialchars_decode($text);
  78. if($this->config['config']->gk_cherrydesign->gk_cherrydesign_clean_xhtml) $text = strip_tags($text);
  79. $exploded_text = explode(" ", stripslashes($text));
  80. $text = '';
  81. for($j = 0; $j < $this->config['config']->gk_cherrydesign->gk_cherrydesign_wordcount; $j++) {
  82. if(isset($exploded_text[$j])) {
  83. $text .= $exploded_text[$j]." ";
  84. }
  85. }
  86. if($this->config['config']->gk_cherrydesign->gk_cherrydesign_wordcount < count($exploded_text)) {
  87. $text .= '&hellip;';
  88. }
  89. ?>
  90. <div class="gkIsTextItem">
  91. <h4><span><?php echo $title; ?></span></h4>
  92. <p><?php echo $text; ?></p>
  93. <a href="<?php echo $link; ?>" class="readmore"><?php echo $this->config['config']->gk_cherrydesign->gk_cherrydesign_readmore_text; ?></a>
  94. </div>
  95. <?php endif; ?>
  96. <?php endfor; ?>
  97. </div>
  98. <?php endif; ?>
  99. </div>
  100. </div>