Page 1 of 1

unexpected T_PROTECTED on line 3

Posted: Fri Apr 22, 2016 10:52 am
by masterblaster
Line 3 isn't correct? :crazy:
why?why?

Code: Select all

<?php
// The general information at the top of each file
/**
* @version    4.0.7 Release for Joomla 2.5
* @package    Joomla
* @copyright  Copyright (C) 2005 - 2012 Open Source Matters, Inc. All rights reserved.
* @license    GNU General Public License, see LICENSE.php
*/
 
// No direct access allowed to this file
defined( '_JEXEC' ) or die( 'Restricted access' );
 
// Import Joomla! Plugin library file
jimport('joomla.plugin.plugin');
// import panes
jimport('joomla.html.pane');
// import WeblinksHelperRoute
require_once JPATH_ROOT.'/components/com_weblinks/helpers/route.php';

//The Content plugin AllWeblinks
class 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_cols;
	protected $layout;
	protected $show_header;
	protected $show_cdate;
	protected $show_mdate;
	protected $show_author;
	protected $display_cdescription;
	protected $display_ldescription;
	protected $DEBUG = 0;
	protected $exclude_id = 0;

Re: unexpected T_PROTECTED on line 3

Posted: Fri Apr 22, 2016 11:25 am
by requinix

Code: Select all

/**
That is line 3.

Are you looking at the right file? Right line number?

Re: unexpected T_PROTECTED on line 3

Posted: Fri Apr 22, 2016 11:51 am
by Celauran
Also, line 3 of what? You've got at least three other files being included here.

Re: unexpected T_PROTECTED on line 3

Posted: Fri Apr 22, 2016 11:44 pm
by Christopher
Yes, look for a file where line 3 is a protected property declaration.

Re: unexpected T_PROTECTED on line 3

Posted: Tue Apr 26, 2016 10:30 am
by masterblaster
Sorry guys. The right file is:
<?php// The general information at the top of each file/*** @version 4.0.7 Release for Joomla 2.5* @package Joomla* @copyright Copyright (C) 2005 - 2012 Open Source Matters, Inc. All rights reserved.* @license GNU General Public License, see LICENSE.php*/ // No direct access allowed to this filedefined( '_JEXEC' ) or die( 'Restricted access' ); // Import Joomla! Plugin library filejimport('joomla.plugin.plugin');// import panesjimport('joomla.html.pane');// import WeblinksHelperRouterequire_once JPATH_ROOT.'/components/com_weblinks/helpers/route.php';//The Content 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_cols;
protected $layout;
protected $show_header;
protected $show_cdate;
protected $show_mdate;
protected $show_author;
protected $display_cdescription;
protected $display_ldescription;
protected $DEBUG = 0;
protected $exclude_id = 0;

The blue line "protected $new_window;" is the line 3

Re: unexpected T_PROTECTED on line 3

Posted: Tue Apr 26, 2016 2:28 pm
by requinix
Ah.

You see how the first line is all smashed together? That's bad. You need to undo that. Use that first version you posted earlier.

The problem is the line comment. You effectively have

Code: Select all

<?php //

protected $new_window;
...
which is clearly not what it should be.

Re: unexpected T_PROTECTED on line 3

Posted: Tue Apr 26, 2016 5:44 pm
by Christopher
This looks better!

Code: Select all

<?php
// The general information at the top of each file
/*** 
@version    4.0.7 Release for Joomla 2.5* 
@package    Joomla* 
@copyright  Copyright (C) 2005 - 2012 Open Source Matters, Inc. All rights reserved.* 
@license    GNU General Public License, see LICENSE.php
*/
 // No direct access allowed to this file
defined( '_JEXEC' ) or die( 'Restricted access' );
 // Import Joomla! Plugin library file
jimport('joomla.plugin.plugin');
// import panes
jimport('joomla.html.pane');
// import WeblinksHelperRoute
require_once JPATH_ROOT.'/components/com_weblinks/helpers/route.php';
//The Content plugin AllWeblinks
class 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_cols;	
        protected $layout;	
        protected $show_header;	
        protected $show_cdate;	
        protected $show_mdate;
        protected $show_author;
        protected $display_cdescription;
        protected $display_ldescription;	
        protected $DEBUG = 0;	
        protected $exclude_id = 0;

Re: unexpected T_PROTECTED on line 3

Posted: Tue Apr 26, 2016 11:00 pm
by masterblaster
Thx Christopher and requinix.
All right. [SOLVED]