PageRenderTime 39ms CodeModel.GetById 12ms RepoModel.GetById 0ms app.codeStats 0ms

/content/code/trunk/administrator/components/com_artofcontent/helpers/html/artofcontent.php

https://bitbucket.org/eddieajau/the-art-of-joomla-archive
PHP | 56 lines | 24 code | 6 blank | 26 comment | 2 complexity | 8ca8bbca2230140c4ba659e7cdfa0bbb MD5 | raw file
  1. <?php
  2. /**
  3. * @version $Id: artofcontent.php 497 2010-12-29 00:45:05Z eddieajau $
  4. * @package NewLifeInIT
  5. * @subpackage com_artofcontent
  6. * @copyright Copyright 2005 - 2010 New Life in IT Pty Ltd. All rights reserved
  7. * @license GNU General Public License <http://www.fsf.org/licensing/licenses/gpl.html>
  8. * @link http://www.theartofjoomla.com
  9. */
  10. // No direct access.
  11. defined('_JEXEC') or die;
  12. /**
  13. * Component HTML Helper
  14. *
  15. * @package NewLifeInIT
  16. * @subpackage com_artofcontent
  17. */
  18. class JHtmlArtofContent
  19. {
  20. /**
  21. * Display the published setting and icon
  22. *
  23. * @param int The value of the published field
  24. * @param int The row index
  25. *
  26. * @return string
  27. */
  28. function rule($value, $i, $suffix='')
  29. {
  30. $codes = array(1 => '&#10003;', 0 => '&#10007;');
  31. $alts = array(0 => 'COM_ARTOFCONTENT_RULE_DENIED', 1 => 'COM_ARTOFCONTENT_RULE_ALLOWED');
  32. $code = JArrayHelper::getValue($codes, $value, $codes[0]);
  33. $task = $value == 1 ? 'category.deny' : 'category.allow';
  34. $action = $value == 1 ? JText::_('COM_ARTOFCONTENT_RULE_DENY') : JText::_('COM_ARTOFCONTENT_RULE_ALLOW');
  35. // $html = '
  36. // <a href="javascript:void(0);" onclick="return listItemTask(\'cb'. $i .'\',\''. $prefix.$task .'\')" title="'. $action .'">
  37. // <img src="'. $img .'" border="0" alt="'. $alt .'" /></a>';
  38. $html = '<span class="rule">'.$code.'</span>';
  39. return $html;
  40. }
  41. function footer()
  42. {
  43. JHtml::_('behavior.modal', 'a.modal');
  44. echo '<div id="taojfooter">';
  45. echo '<a href="'.JRoute::_('index.php?option=com_artofcontent&view=about&tmpl=component').'" class="modal" rel="{handler: \'iframe\'}">';
  46. echo 'Artof User '.ArtofContentVersion::getVersion(true, true).'</a>';
  47. echo ' &copy; 2005 - 2010 <a href="http://www.newlifeinit.com" target="_blank">New Life in IT Pty Ltd</a>. All rights reserved.';
  48. echo '</div>';
  49. }
  50. }