pusatdata

Joomla 1.5 List Category Ada Thumbnail

Nov 20th, 2014
275
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.79 KB | None | 0 0
  1. components/com_content/views/category/tmpl/default_items.php
  2.  
  3. =============
  4. <?php // no direct access
  5. defined('_JEXEC') or die('Restricted access'); ?>
  6. <script language="javascript" type="text/javascript">
  7.  
  8. function tableOrdering( order, dir, task )
  9. {
  10. var form = document.adminForm;
  11.  
  12. form.filter_order.value = order;
  13. form.filter_order_Dir.value = dir;
  14. document.adminForm.submit( task );
  15. }
  16. </script>
  17. <form action="<?php echo $this->action; ?>" method="post" name="adminForm">
  18. <table width="100%" border="0" cellspacing="0" cellpadding="0">
  19. <?php if ($this->params->get('filter') || $this->params->get('show_pagination_limit')) : ?>
  20. <tr>
  21. <td colspan="5">
  22. <table>
  23. <tr>
  24. <?php if ($this->params->get('filter')) : ?>
  25. <td align="left" width="60%" nowrap="nowrap">
  26. <?php echo JText::_($this->params->get('filter_type') . ' Filter').'&nbsp;'; ?>
  27. <input type="text" name="filter" value="<?php echo $this->escape($this->lists['filter']);?>" class="inputbox" onchange="document.adminForm.submit();" />
  28. </td>
  29. <?php endif; ?>
  30. <?php if ($this->params->get('show_pagination_limit')) : ?>
  31. <td align="right" width="40%" nowrap="nowrap">
  32. <?php
  33. echo '&nbsp;&nbsp;&nbsp;'.JText::_('Display Num').'&nbsp;';
  34. echo $this->pagination->getLimitBox();
  35. ?>
  36. </td>
  37. <?php endif; ?>
  38. </tr>
  39. </table>
  40. </td>
  41. </tr>
  42. <?php endif; ?>
  43. <?php if ($this->params->get('show_headings')) : ?>
  44. <tr>
  45. <td class="sectiontableheader<?php echo $this->escape($this->params->get('pageclass_sfx')); ?>" align="right" width="5%">
  46. <?php echo JText::_('Num'); ?>
  47. </td>
  48. <?php if ($this->params->get('show_title')) : ?>
  49. <td class="sectiontableheader<?php echo $this->escape($this->params->get('pageclass_sfx')); ?>" >
  50. <?php echo JHTML::_('grid.sort', 'Item Title', 'a.title', $this->lists['order_Dir'], $this->lists['order'] ); ?>
  51. </td>
  52. <?php endif; ?>
  53. <?php if ($this->params->get('show_date')) : ?>
  54. <td class="sectiontableheader<?php echo $this->escape($this->params->get('pageclass_sfx')); ?>" width="25%">
  55. <?php echo JHTML::_('grid.sort', 'Date', 'a.created', $this->lists['order_Dir'], $this->lists['order'] ); ?>
  56. </td>
  57. <?php endif; ?>
  58. <?php if ($this->params->get('show_author')) : ?>
  59. <td class="sectiontableheader<?php echo $this->escape($this->params->get('pageclass_sfx')); ?>" width="20%">
  60. <?php echo JHTML::_('grid.sort', 'Author', 'author', $this->lists['order_Dir'], $this->lists['order'] ); ?>
  61. </td>
  62. <?php endif; ?>
  63. <?php if ($this->params->get('show_hits')) : ?>
  64. <td align="center" class="sectiontableheader<?php echo $this->escape($this->params->get('pageclass_sfx')); ?>" width="5%" nowrap="nowrap">
  65. <?php echo JHTML::_('grid.sort', 'Hits', 'a.hits', $this->lists['order_Dir'], $this->lists['order'] ); ?>
  66. </td>
  67. <?php endif; ?>
  68. </tr>
  69. <?php endif; ?>
  70. <?php foreach ($this->items as $item) : ?>
  71. <tr class="sectiontableentry<?php echo ($item->odd +1 ) . $this->escape($this->params->get('pageclass_sfx')); ?>" >
  72. <td align="right">
  73. <?php echo $this->pagination->getRowOffset( $item->count ); ?>
  74. </td>
  75. <?php if ($this->params->get('show_title')) : ?>
  76. <?php if ($item->access <= $this->user->get('aid', 0)) : ?>
  77. <td>
  78. <b><a href="<?php echo $item->link; ?>">
  79.  
  80.  
  81.  
  82. <?php
  83. $text = $item->introtext;
  84. if(preg_match('/<\s*img[^>]+>/Ui', $text, $matches)){
  85. $image=$matches[0];
  86. $text = str_replace($image,'',$text);
  87. }
  88. if ($matches) {
  89. $image = str_replace('img src="','img align=left width=110px height=85px style=padding-right:5px; src="',$image);
  90. $image = str_replace("caption","", $image);
  91. echo '' . $image . '';
  92. }
  93. ?>
  94.  
  95.  
  96.  
  97.  
  98.  
  99. <?php echo $this->escape($item->title); ?></a></b><br/>
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119. <?php $this->item = $item; echo JHTML::_('icon.edit', $item, $this->params, $this->access) ?>
  120. </td>
  121. <?php else : ?>
  122. <td>
  123. <?php
  124. echo $this->escape($item->title).' : ';
  125. $link = JRoute::_('index.php?option=com_user&view=login');
  126. $returnURL = JRoute::_(ContentHelperRoute::getArticleRoute($item->slug, $item->catslug, $item->sectionid), false);
  127. $fullURL = new JURI($link);
  128. $fullURL->setVar('return', base64_encode($returnURL));
  129. $link = $fullURL->toString();
  130. ?>
  131. <a href="<?php echo $link; ?>">
  132. <?php echo JText::_( 'Register to read more...' ); ?></a>
  133. </td>
  134. <?php endif; ?>
  135. <?php endif; ?>
  136. <?php if ($this->params->get('show_date')) : ?>
  137. <td>
  138. <?php echo $item->created; ?>
  139. </td>
  140. <?php endif; ?>
  141. <?php if ($this->params->get('show_author')) : ?>
  142. <td >
  143. <?php echo $this->escape($item->created_by_alias) ? $this->escape($item->created_by_alias) : $this->escape($item->author); ?>
  144. </td>
  145. <?php endif; ?>
  146. <?php if ($this->params->get('show_hits')) : ?>
  147. <td align="center">
  148. <?php echo $this->escape($item->hits) ? $this->escape($item->hits) : '-'; ?>
  149. </td>
  150. <?php endif; ?>
  151. </tr>
  152. <?php endforeach; ?>
  153. <?php if ($this->params->get('show_pagination')) : ?>
  154. <tr>
  155. <td colspan="5">&nbsp;</td>
  156. </tr>
  157. <tr>
  158. <td align="center" colspan="4" class="sectiontablefooter<?php echo $this->escape($this->params->get('pageclass_sfx')); ?>">
  159. <?php echo $this->pagination->getPagesLinks(); ?>
  160. </td>
  161. </tr>
  162. <tr>
  163. <td colspan="5" align="right">
  164. <?php echo $this->pagination->getPagesCounter(); ?>
  165. </td>
  166. </tr>
  167. <?php endif; ?>
  168. </table>
  169.  
  170. <input type="hidden" name="id" value="<?php echo $this->category->id; ?>" />
  171. <input type="hidden" name="sectionid" value="<?php echo $this->category->sectionid; ?>" />
  172. <input type="hidden" name="task" value="<?php echo $this->lists['task']; ?>" />
  173. <input type="hidden" name="filter_order" value="" />
  174. <input type="hidden" name="filter_order_Dir" value="" />
  175. <input type="hidden" name="limitstart" value="0" />
  176. <input type="hidden" name="viewcache" value="0" />
  177. </form>
Advertisement
Add Comment
Please, Sign In to add comment