PageRenderTime 26ms CodeModel.GetById 16ms RepoModel.GetById 0ms app.codeStats 0ms

/components/com_rwcards/views/rwcards/tmpl/default.php

http://j-ecard-28022011.googlecode.com/
PHP | 143 lines | 109 code | 15 blank | 19 comment | 5 complexity | 2a97ac8d8537ff5b86786afc817b054b MD5 | raw file
Possible License(s): LGPL-2.1, Apache-2.0, BSD-3-Clause
  1. <?php
  2. /**
  3. * RWCards Template for RWCards Entry page
  4. *
  5. * @author Ralf Weber <ralf@weberr.de>
  6. * @cleanup code by A. Dalebout <siam@kiwuweb.de>
  7. * @version 3.1
  8. * @copyright Copyright (c) 2010, LoadBrain
  9. * @link http://www.weberr.de/
  10. * @link http://www.kiwuweb.de/
  11. * @license GNU/GPL
  12. */
  13. // no direct access
  14. defined('_JEXEC') or die('Restricted access');
  15. global $mainframe;
  16. // Load the moo.fx scripts
  17. $document = &JFactory::getDocument();
  18. // start build additional Stylesheet by A. Dalebout
  19. $style = '';
  20. if ( count($this->rwcards[0]) > 0) {
  21. for ($i=0; $i < count($this->rwcards); $i++) {
  22. $style .="
  23. #myGallery_rwcards_".$i."
  24. {
  25. width: " . $this->params->get("thumb_box_width", '260px') . " !important;
  26. height: " . $this->params->get("thumb_box_height", '220px') . " !important;
  27. border: 1px solid #000;
  28. }
  29. #myGallery_rwcards_".$i." img.thumbnail
  30. {
  31. display: none;
  32. }
  33. #rwcardsTable
  34. {
  35. width:100%;
  36. border:0px;
  37. padding:1em;
  38. border:1px solid black;
  39. margin:2px;
  40. }";
  41. }
  42. }
  43. // finish build additional Stylesheet by A. Dalebout
  44. $document->addStyleDeclaration($style); // send additional Stylesheet to joomlal by A.Dalebout
  45. JHTML::_('behavior.mootools');
  46. $document->addScript(JURI::base() . 'components/com_rwcards/js/rwcards.gallery.js');
  47. $document->addStyleSheet( JURI::base() . 'components/com_rwcards/css/rwcards.slideshow.css', 'text/css', null, array( 'id' => 'StyleSheet' ) );
  48. ?>
  49. <h1><?php echo $this->params->get('cats_page_heading','View Cards'); ?></h1>
  50. <?php
  51. if ( count($this->rwcards[0]) > 0) {
  52. for ($i=0; $i < count($this->rwcards); $i++) {
  53. ?>
  54. <script type="text/javascript">
  55. function startGallery_rwcards_<?php echo $i; ?>() {
  56. var myGallery = new gallery($('myGallery_rwcards_<?php echo $i; ?>'), {
  57. timed: true,
  58. showArrows: false,
  59. showCarousel: false
  60. });
  61. }
  62. window.addEvent('domready', startGallery_rwcards_<?php echo $i; ?>);
  63. </script>
  64. <table id="rwcardsTable<?php echo $i;?>" border="0">
  65. <tr>
  66. <td width="150px">
  67. <div id="rwcards_gallery">
  68. <div id="myGallery_rwcards_<?php echo $i; ?>">
  69. <?php
  70. // loop through cards in section
  71. foreach ($this->rwcards[$i] as $key => $val) {
  72. ?>
  73. <div class="imageElement">
  74. <h3><?php echo $val->thumb_title; ?></h3>
  75. <p><?php echo $val->thumb_desc; ?></p>
  76. <a href="<?php echo JRoute::_('index.php?option=com_rwcards&amp;controller=rwcardslistonecategory&amp;Itemid=' . JRequest::getCmd( "Itemid" )
  77. . '&amp;category_id=' . $val->category_id
  78. . '&amp;reWritetoSender=' . @$this->reWritetoSender
  79. . '&amp;sessionId=' . @$this->sessionId);
  80. ?>" title="<?php echo htmlentities( $val->category_kategorien_name, ENT_QUOTES, 'UTF-8' ); ?>" class="open"></a>
  81. <img src="<?php echo JURI::base(); ?>images/stories/cards/<?php echo strtolower(substr($val->picture, 0, -4) )
  82. . $this->suffix . strtolower( substr($val->picture, strrpos($val->picture, ".")) );
  83. ?>" class="full" alt="<?php echo nl2br( htmlentities( $val->category_kategorien_name, ENT_QUOTES, 'UTF-8' )); ?>" />
  84. </div>
  85. <?php
  86. }
  87. ?>
  88. </div>
  89. </div>
  90. </td>
  91. <td valign="top" style="width:200px; padding: 0px 5px;">
  92. <span style="font-weight: bold; text-decoration:underline;"><?php // print_r( $this->rwcards[$i]); // sb ?>
  93. <a href="<?php echo JRoute::_('index.php?option=com_rwcards&amp;controller=rwcardslistonecategory&amp;Itemid=' . JRequest::getCmd( "Itemid" )
  94. . '&amp;category_id=' . $this->categoryData[$i]->id
  95. . '&amp;reWritetoSender=' . @$this->reWritetoSender
  96. . '&amp;sessionId=' . @$this->sessionId );
  97. ?>" class="open"><?php echo htmlentities( $this->categoryData[$i]->category_kategorien_name, ENT_QUOTES, 'UTF-8' ); ?></a>
  98. </span>
  99. <br />
  100. <br />
  101. <?php echo htmlentities( $this->categoryData[$i]->category_description, ENT_QUOTES, 'UTF-8' ); ?>
  102. <br /><br /><br /><br />
  103. <a href="<?php echo JRoute::_('index.php?option=com_rwcards&amp;controller=rwcardslistonecategory&amp;Itemid=' . JRequest::getCmd( "Itemid" )
  104. . '&amp;category_id=' . $this->categoryData[$i]->id
  105. . '&amp;reWritetoSender=' . @$this->reWritetoSender
  106. . '&amp;sessionId=' . @$this->sessionId );
  107. ?>" class="open"><?php echo JText::_('ECARD_SEE_ALL_CARDS'); ?></a>
  108. </td>
  109. </tr>
  110. </table>
  111. <?php
  112. }
  113. }
  114. else {
  115. ?>
  116. <table id="rwcardsTable">
  117. <tr>
  118. <td valign="top">
  119. <span style="font-weight: bold; color:red; font-size:14px;">
  120. <?php echo JText::_('RWCARDS_NO_CATEGORY_PUBLISHE_OR_CREATED'); ?><br />
  121. <?php echo JText::_('RWCARDS_NO_PICTURES_PUBLISHE_OR_CREATED');?>
  122. </span>
  123. </td>
  124. </tr>
  125. </table>
  126. <?php
  127. }
  128. ?>