Foros del Web » Creando para Internet » Sistemas de gestión de contenidos » Joomla »

plugins/system/comments.php on line 34 me bloqueo mi pagina

Estas en el tema de plugins/system/comments.php on line 34 me bloqueo mi pagina en el foro de Joomla en Foros del Web. Buenos dias les cuento que sin querer habilite en los Plugins de mi pagina en joomla system/comments Y ahora me bloqueo la pagina y de ...
  #1 (permalink)  
Antiguo 20/01/2009, 07:23
 
Fecha de Ingreso: enero-2009
Mensajes: 4
Antigüedad: 15 años, 3 meses
Puntos: 0
plugins/system/comments.php on line 34 me bloqueo mi pagina

Buenos dias les cuento que sin querer habilite en los Plugins de mi pagina en

joomla system/comments

Y ahora me bloqueo la pagina y de la unica manera que puedo entrar es por FTP

Mi pagina es www.guiasdecorrientes.com.ar y cuando ingreso sale la siguiente

frase:


Parse error: syntax error, unexpected '=', expecting ')' in /home/guiascte/public_html/plugins/system/comments.php on line 34


Y yo lo que hice fue entrar por FTP y bajarme el archivo comments.php este es el codigo

Código php:
Ver original
  1. <?php
  2. /**
  3. * denCODE v0.5
  4. * @copyright (C) 2007 3DEN StudiO
  5. * @package Joomla!
  6. * @license [url]http://www.gnu.org/copyleft/gpl.html[/url] GNU/GPL
  7. */
  8. // no direct access
  9. defined( '_JEXEC' ) or die( 'Access Denied!' );
  10.  
  11. // Import ComponentHelper or nothing at all
  12. if(
  13.     !is_file(JPATH_SITE.DS.'components'.DS.'com_comments'.DS.'comments.php')
  14.     ||  !is_file(JPATH_SITE.DS.'modules'.DS.'mod_comments'.DS.'helper.php')
  15. ){
  16.     JError::raiseWarning( 123, JText::_('COMPONENT NOT FOUND'));
  17.     return;
  18. }
  19.  
  20.  
  21. /**
  22.  * @package     Joomla
  23.  */
  24. class plgSystemComments extends JPlugin
  25. {
  26.    
  27.     /**
  28.      * Generic Get Comments
  29.      * @return html
  30.      * @param string $mode (form, list, link) what to display
  31.      * @param $item Object
  32.      * @param $params Object[optional]
  33.      */
  34.     function onGetComments($mode, &$item, &$params=null)
  35.     {
  36.         //PARAMs
  37.         $plgParams =& $this->_getParams();
  38.         $plgParams->merge($params) or $plgParams->bind($params);   
  39.  
  40.         // Check Item
  41.         if(is_object($item) ){
  42.             $cotid = $item->id;
  43.         }elseif(is_array($item)){
  44.             $cotid = $item['id'];
  45.         }else{
  46.             $cotid = (int)$item;
  47.         }
  48.  
  49.         // Set Params
  50.         $plgParams->set('cotid', $cotid);
  51.         $plgParams->set('mode', strtolower($mode));
  52.  
  53.         // Module
  54.         $module = &JModuleHelper::getModule('mod_comments');       
  55.         $module->params = $plgParams->toString();
  56.  
  57.         return JModuleHelper::renderModule($module);
  58.     }
  59.  
  60.  
  61.     /**
  62.      * on load content function
  63.      *
  64.      * @return boolean True on sucess
  65.      * @param $row Object
  66.      * @param $params Object
  67.      * @param $page Object[optional]
  68.      */
  69.     function onAfterDisplayContent( &$row, &$params, $page=0 ){    
  70.    
  71.         //Regular Expression
  72.         $regex = '/\{comments(.*?)}/i';
  73.         $total = preg_match_all( $regex, $row->text, $matches );
  74.         if(!$total){
  75.             return false;
  76.         }
  77.    
  78.         // Custom Params           
  79.         $parts = trim($matches[1][0]);
  80.         $position = 'end';
  81.        
  82.         // Switch view
  83.         switch( JRequest::getCmd('view') ){
  84.             case 'article':
  85.                 $html = $this->onGetComments('list', $row, $params)
  86.                     . $this->onGetComments('form', $row, $params);
  87.                 break;
  88.                
  89.             default:
  90.                 $params->set('link', JRoute::_('index.php?option=com_content&view=article&id='.$row->slug.'&catid='.$row->catslug) );
  91.                 $html = $this->onGetComments('link' ,$row, $params);
  92.                 $position = 'bottom';
  93.                 break; 
  94.         }
  95.        
  96.         /************************************************************
  97.          *  Display
  98.          ************************************************************/
  99.         // Clean Comments tags
  100.         $row->text = preg_replace( $regex, '', $row->text );
  101.    
  102.         // switch position
  103.         switch($position){
  104.             case 'end'://after content
  105.                 return $html;
  106.                 break;
  107.             case 'bottom'://bottom of content
  108.                 $row->text .= $html;   
  109.                 break;
  110.                
  111.             case 'start'://[useless]before content
  112.                 echo $html;
  113.                 break;     
  114.             case 'top'://[useless]top of content
  115.                 $row->text = $html . $row->text;   
  116.                 break;     
  117.         }
  118.         return;
  119.     }
  120.  
  121.  
  122.     /**
  123.      * Display Captha
  124.      * @return
  125.      */
  126.     function onCaptcha_Display() {     
  127.         $session =& JFactory::getSession();
  128.         $params =& $this->_getParams();
  129.  /*        
  130.         require_once(JPATH_PLUGINS.DS.'system'.DS.'Captcha04'.DS."Functions.php"); // string generator, crypt/decrypt functions
  131.         require_once(JPATH_PLUGINS.DS.'system'.DS.'Captcha04'.DS."GIFEncoder.class.php"); // gif animation
  132.         $tries = $session->get('attempts');
  133.         if ($tries > $this->max_tries) $rnd = 'You are a spambot';
  134.         else $rnd = rnd_string  (intval($params->get('word_len')) );
  135.         $cid = md5_encrypt  ( $rnd );
  136.         $uid = "54;".$cid;
  137.        
  138.         $session->set('bigo_uid',$cid); // secret word
  139.        
  140.        
  141.         require_once(JPATH_PLUGINS.DS.'system'.DS.'Captcha04'.DS."CaptchaImage.php"); // creates the magic!
  142.         exit();
  143. */
  144.     }
  145.  
  146.     /**
  147.      * Confirm Captcha
  148.      * @return
  149.      * @param $word Object
  150.      * @param $return Object
  151.      */
  152.     function onCaptcha_confirm($word, &$return) {      
  153.         global $mainframe;
  154. /*
  155.         require_once(JPATH_PLUGINS.DS.'system'.DS.'Captcha04'.DS."Functions.php");
  156.         $session =& JFactory::getSession();
  157.        
  158.         // guessing protection
  159.         $tries = 0;
  160.         $tries = $session->get('attempts');    
  161.         $session->set('attempts', ++$tries);
  162.  
  163.         if (!$word || $tries > $this->max_tries) {
  164.             return false;
  165.         }
  166.        
  167.         $correct = md5_decrypt ( $session->get('bigo_uid') );
  168.         $session->set('bigo_uid', null);
  169.         if (strtolower($word) == strtolower($correct)) {
  170.             $session->set('attempts',0);
  171.             $return = true;
  172.         } else $return = false;                
  173.         return $return;
  174. */     
  175.     }
  176.  
  177.  
  178.     /**
  179.      * Get Comments parameters object
  180.      *
  181.      * @return JParameter
  182.      */
  183.     function &_getParams(){
  184.         static $plgParams;
  185.         if( !empty($plgParams) ){
  186.             return $plgParams;     
  187.         }
  188.        
  189.         $plugin =& JPluginHelper::getPlugin('system', 'comments');
  190.         $plgParams = new JParameter( $plugin->params );
  191.        
  192.         // Some defs
  193.         $plgParams->set('cache', 0);
  194.         $plgParams->def('link_layout', 'link_readon');
  195.         $plgParams->def('list_layout', 'list');
  196.         $plgParams->def('form_layout', 'form');
  197.        
  198.         return $plgParams;
  199.     }
  200. }


Les agradeceria si me pueden orientar que debo hacer.
Ya que tengo todo armado y me llevaria demasiado tiempo en armarlo de nuevo.
GRACIAS.

Última edición por jam1138; 20/01/2009 a las 09:00 Razón: Aplico etiquetas para colorear código
  #2 (permalink)  
Antiguo 20/01/2009, 08:57
 
Fecha de Ingreso: enero-2009
Mensajes: 4
Antigüedad: 15 años, 3 meses
Puntos: 0
Respuesta: plugins/system/comments.php on line 34 me bloqueo mi pagina

Bueno por suerte despues de un poco de investigación Google jeje encontre la solucion.

Espero les sirva de ayuda a todos aquellos que se les bloquea la pagina o la administracion en joomla.

La solución:

Si no pueden ver su sitio en joomla por haber insertado algun Modulo o Plugin, No puedes ingresar como administrador proceder de la siguiente manera:

1º- Entrar a nuestra base de datos por MySQLadmin.

2º- De la tabla de la Izquierda seleccionar Jos_Plugins y luego seleccionar EXAMINAR y nos aparecera en forma de lista todos los plugins instalados.

3º- Seleccionamos el plugins que queremos editar ( click en el simbolo del lapiz ) y cambiamos el valor de Published de "1" a "0"

Y listo la pagina vuelve a la normalidad.
  #3 (permalink)  
Antiguo 20/01/2009, 09:02
Avatar de jam1138
/** @package Moderador */
 
Fecha de Ingreso: julio-2004
Ubicación: sèveR led onieR lE
Mensajes: 9.368
Antigüedad: 19 años, 8 meses
Puntos: 102
Respuesta: plugins/system/comments.php on line 34 me bloqueo mi pagina

.. no se ve nada raro en tu código.

Muevo el tema al foro de Joomla, a ver si allá tienen idea de lo que pudo haber pasado.
__________________
٩(͡๏̯͡๏)۶
» Cómo hacer preguntas de manera inteligente «

"100 años después, la revolución no es con armas, es intelectual y digital"
  #4 (permalink)  
Antiguo 20/01/2009, 18:49
Avatar de Larenz
Colaborador
 
Fecha de Ingreso: enero-2007
Ubicación: Nicaragua
Mensajes: 1.398
Antigüedad: 17 años, 3 meses
Puntos: 55
Respuesta: plugins/system/comments.php on line 34 me bloqueo mi pagina

Gracias por cómo pudistes resolver tu problema. Seguro que a alguno de nosotros nos servirá ese dato.
__________________
¡No lo sé todo! Pero comencé como tú, ¡sin saber nada!
Encuéntrame en Facebook: Perfil + Página
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 14:25.