PageRenderTime 43ms CodeModel.GetById 13ms RepoModel.GetById 0ms app.codeStats 0ms

/content/code/trunk/modules/mod_artofcontent_add/mod_artofcontent_add.php

https://bitbucket.org/eddieajau/the-art-of-joomla-archive
PHP | 38 lines | 19 code | 7 blank | 12 comment | 10 complexity | d46f66383138a11f2884c89004746806 MD5 | raw file
  1. <?php
  2. /**
  3. * @version $Id:combolayout.php 2547 2007-11-10 04:37:15Z masterchief $
  4. * @package NewLifeInIT
  5. * @subpackage mod_artofcontent_add
  6. * @copyright Copyright 2005 - 2010 New Life in IT Pty Ltd. All rights reserved.
  7. * @license GNU General Public License <http://www.gnu.org/copyleft/gpl.html>
  8. * @author Andrew Eddie <andrew.eddie@newlifeinit.com>
  9. * @link http://www.theartofjoomla.com/extensions/artof-content.html
  10. */
  11. // No direct access.
  12. defined('JPATH_BASE') or die();
  13. // Include dependancies.
  14. if (!class_exists('modArtofContentAddHelper')) {
  15. require dirname(__FILE__).'/helper.php';
  16. }
  17. // Load the attributes in the JDOC tag into the parameters.
  18. $temp = new JParameter(null);
  19. $temp->loadArray($attribs);
  20. $params->merge($temp);
  21. $option = JRequest::getCmd('option');
  22. $view = JRequest::getCmd('view');
  23. $task = JRequest::getCmd('task');
  24. if ($option == 'com_content' && $view == 'article' && ($task == 'new' || $task == 'edit')) {
  25. return false;
  26. }
  27. if (modArtofContentAddHelper::canAdd()) {
  28. $categoryId = modArtofContentAddHelper::getCategoryId();
  29. $sectionId = modArtofContentAddHelper::getSectionId();
  30. require JModuleHelper::getLayoutPath($module->module, $params->get('layout', 'default'));
  31. }