Feuille des rôles – établissement du cellule de la SFPT

0
Rate this post

// The general audit at the top of each aboutissement/*** @inventaire 5.0.4 Release for Joomla 2.5* @emballage Joomla* @contrefactrice Nombreuse (C) 2005 – 2012 Open Rattachement Matters, Inc. All rights reserved.* @license GNU General Ordinaire License, see LICENSE.php*/ // No éclatant access allowed to this filedefined( ‘_JEXEC’ ) or die( ‘Restricted access’ ); // Transport Joomla! Plugin library filejimport(‘joomla.plugin.plugin’);// introduction WeblinksHelperRouterequire_once JPATH_ROOT.’/components/com_weblinks/helpers/rocade.php’;//The Urinoir plugin AllWeblinksclass plgContentAllWeblinks extends JPlugin{ // plugin parameters // _plgContentAllWeblinksReplace will set the values; protected $days_new; protected $txt_new; protected $days_mod; protected $txt_mod; protected $lengthoftitle; protected $orderby; protected $Corderby; protected $linkcount; protected $displayemptycat; // These params can also be overridden in the commmandline protected $real_url; protected $show_title; protected $show_new; protected $show_mod; protected $show_hits; protected $new_window; protected $moduleclass_sfx; protected $num_ccols; protected $num_cols; protected $répartition; protected $display_ctitle; protected $show_cdate; protected $show_ldate; protected $show_author; protected $display_cdescription; protected $display_ldescription; protected $DEBUG = 0; protected $exclude_id = 0; function plgContentAllWeblinks( &$subject, $params ) { ascendant::__construct( $subject, $params ); } /** * Plugin that loads rythmé positions within souplesse */ // onPrepareContent, meaning the plugin is rendered at the first initiation in preparing souplesse for portée officiel function onContentPrepare($context, &$traité, &$params, $limitstart) { // cohérent avantage check to determine whether bot should process further if ( JString::strpos( $article->text, ‘all_weblinks’ ) === false ) { return true; } // Don’t repeat the CSS for each conseil of this bot in a cadet! static $included_allweblinks_css; if (!$included_allweblinks_css) { $cryptogramme = JFactory::getDocument(); $url = ‘plugins/souplesse/allweblinks/allweblinks/includes/css/allweblinks.css’; $document->addStyleSheet($url); $document->addCustomTag( ” ); $included_allweblinks_css = 1; } découvert $mainframe; // A database connection is created $db = JFactory::getDBO(); // adage to search for $regex = “#{all_weblinkss*(.*?)}(.*?){/all_weblinks}#s”; // Get plugin interpellation // check whether plugin has been unpublished if ( !$this->params->get( ‘enabled’, 1 ) ) { $article->text = preg_replace( $regex, ”, $article->text ); return true; } // find all instances of plugin and put in $matches preg_match_all( $regex, $article->text, $matches ); // Number of plugins $count = count( $matches[0] ); // plugin only processes if there are any instances of the plugin in the text if ( $count ) { $this->_process( $traité, $matches, $count, $regex, $params); } // No return value } // The proccessing function protected function _process( &$traité, &$matches, $count, $regex, $params ) { // Get the links for every occurence of all_weblinks for ( $i=0; $i < $count; $i++ ) { $load = str_replace( ‘all_weblinks’, ”, $matches[0][$i] ); $load = str_replace( ‘{‘, ”, $load ); $load = str_replace( ‘}’, ”, $load ); $load = trim( $load ); $this->_plgContentAllWeblinksReplace($traité, $matches, $i, $count, $regex, $params ) ; } } protected function _plgContentAllWeblinksReplace(&$traité, &$matches, $i, $count, $regex, $params) { // Get plugin parameters $param_line = $matches[1][$i]; $catids = trim($matches[2][$i]); $this->days_new = $this->params->def(‘Ldaysnew’); $this->txt_new = $this->params->def(‘Ltxtnew’); $this->days_mod = $this->params->def(‘Ldaysmod’); $this->txt_mod = $this- >params->def(‘Ltxtmod’); $this->lengthoftitle = $this->params->def(‘Llengthoftitle’, 30); $this->orderby = $this->params->def( ‘Lorder’, ‘created DESC’); $this->Corderby = $this->params->def( ‘LCorder’, ‘a.catid’); $this->linkcount = $this->params->def( ‘Lcatlinks’, 999); $this->displayemptycat = $this->params->def( ‘Ldisplayemptycat’, 0); // These params can also be overridden in the commmandline $this->real_url = $this->_params($param_line, ‘real_url’, $this->params->def(‘Lrealurl’)); $this->show_title = $this->_params($param_line, ‘show_title’, $this->params->def(‘Lshowtitle’)); $this->show_new = $this->_params($param_line, ‘show_new’, $this->params->def(‘Lshownew’)); $this->show_mod = $this->_params($param_line, ‘show_mod’, $this->params->def(‘Lshowmod’)); $this->show_hits = $this->_params($param_line, ‘show_hits’, $this->params->def(‘Lshowhits’)); $this->new_window = $this->_params($param_line, ‘new_window’, $this->params->def(‘Lpopuplinks’)); $this->nofollow = $this->_params($param_line, ‘nofollow’, $this->params->def(‘Lnofollowlinks’)); $this->moduleclass_sfx = $this->_params($param_line, ‘moduleclass_sfx’, $this->params->def(‘moduleclass_sfx’)); $this->num_cols = $this->_params($param_line, ‘num_cols’, $this->params->def(‘Lnumcols’)); $this->num_ccols = $this->_params($param_line, ‘num_ccols’, $this->params->def(‘Lnumccols’)); $this->répartition = $this->_params($param_line, ‘répartition’, $this->params->def(‘Llayout’)); $this->enablepaging = $this->_params($param_line, ‘enablepaging’, $this->params->def(‘Lenablepaging’)); $this->display_ctitle = $this->_params($param_line, ‘display_ctitle’,$this->params->def(‘Lshowheader’)); $this->show_cdate = $this->_params($param_line, ‘show_cdate’,$this->params->def(‘Lshowcdate’)); $this->show_ldate = $this->_params($param_line, ‘show_ldate’,$this->params->def(‘Lshowldate’)); $this->show_author = $this->_params($param_line, ‘show_author’,$this->params->def(‘Lshowauthor’)); $this->display_cdescription = $this->_params($param_line, ‘display_cdescription’,$this->params->def(‘Ldisplaycdescription’)); $this->display_ldescription = $this->_params($param_line, ‘display_ldescription’,$this->params->def(‘Ldisplayldescription’)); // These params can ONLY be set in the commmandline $this->DEBUG = $this->_params($param_line, ‘DEBUG’, ‘0’); $this->exclude_id = $this->_params($param_line, ‘exclude_id’, ‘0’); //$this->DEBUG=1; switch ($this->répartition) { case 0 : $llayout=””; circonvolution; case 1 : $llayout=” col”; circonvolution; case 2 : $llayout=” blocks”; circonvolution; case 3 : $llayout=”pages”; circonvolution; case 4 : $llayout=”sliders”; $this->display_ctitle = 0 ;//disable category titles circonvolution; case 5 : $llayout=”tabs”; $this->display_ctitle = 0 ;//disable category titles circonvolution; default: // if a wrong répartition is choosen reset to 0 $llayout=””; $this->répartition=0; } $replace =””; // count Categories !isset($GLOBALS[‘all_weblinks’]) ? $GLOBALS[‘all_weblinks’] = 1 : $GLOBALS[‘all_weblinks’]++; # DEBUG if requested by specifing DEBUG=[1] if ($this->DEBUG) $replace .= “

### DEBUG plugin-parameters:

  • days_new=[$this->days_new]
  • txt_new=[$this->txt_new]
  • show_title=[$this->show_title]
  • show_new=[$this->show_new]
  • days_mod=[$this->days_mod]
  • txt_mod=[$this->txt_mod]
  • show_mod=[$this->show_mod]
  • displayemptycat=[$this->displayemptycat]
  • new_window=[$this->new_window]
  • nofollow=[$this->nofollow]
  • show_hits=[$this->show_hits]
  • display_ctitle=[$this->display_ctitle]
  • show_cdate=[$this->show_cdate]
  • show_ldate=[$this->show_ldate]
  • show_author=[$this->show_author]
  • lengthoftitle=[$this->lengthoftitle]
  • display_cdescription=[$this->display_cdescription]
  • display_ldescription=[$this->display_ldescription]
  • number of category columns=[$this->num_ccols]
  • number of link columns=[$this->num_cols]
  • orderby=[$this->orderby]
  • Corderby=[$this->Corderby]
  • linkcount=[$this->linkcount]
  • exclude_id=[$this->exclude_id]
  • catids=[$catids]
  • répartition=[$this->layout]
  • enablepaging=[$this->enablepaging]

### DEBUG END ###”; # Initialize and clear the souplesse from other modules if ($this->moduleclass_sfx==” && $this->layoutmoduleclass_sfx = $llayout; // Start of weblinks portée $replace .= “n