SNIPPET: ENABLE DEBUG CONSOLE FOR SPECIFIC IP ADDRESS ONLY

Snippet: Enable Debug Console for Specific IP Address Only 
Compatibility
All Versions
Credits
Rating
  • Currently 3.50/5

Rating: 3.5/5
(2 votes cast)

Login to Rate

Gives you a private debug console for a specific IP address, so as not to disturb customer view...

First apply this SQL patch...

REPLACE INTO `xcart_config` ( `name` , `comment` , `value` , `category` , `orderby` , `type` , `defvalue` , `variants` )
VALUES ('enable_debug_console_ip', 'Only show debug console to this IP address', 'xx.xx.xx.xx', 'General', '611', 'text', '', '');

Then in init.php, replace...

	#
	# Include webmaster mode
	#
	@include_once($xcart_dir."/include/webmaster.php");

	if($config["General"]["enable_debug_console"]=="Y" || $editor_mode=='editor')
		$smarty->debugging=true;

With...

	#
	# Include webmaster mode
	#
	@include_once($xcart_dir."/include/webmaster.php");

	if($config["General"]["enable_debug_console"]=="Y" || $editor_mode=='editor')
#		$smarty->debugging=true;
		if ($config["General"]["enable_debug_console_ip"] == $_SERVER['REMOTE_ADDR']) {
			$smarty->debugging=true;
		}

Then go into General Settings and add your IP address.

To view all available Smarty variables in the debug console (ie. not just templates), then in smarty.php, replace...

$smarty->debug_tpl = "file:debug_templates.tpl";

With...

$smarty->debug_tpl = "file:debug.tpl";


ID: 89 | CAT: 19
No comments yet... why not be the first?

Comment / Reply



Emails will not be published or shared. If you have a Gravatar account - the avatar image associated with your email address will appear. Please note, all comments are moderated, so be nice.



Like this comments mod? Get it here

There have been no reviews/comments yet

Please login to leave a comment/review
Name: *
Email: *
Telephone:  
Question(s): *
Code:  
Enter Code: *
    Submit
Your name
Your email
Recipient's email
  Send to friend
 X 

You added a product to the cart!

View cart

Checkout

Back to products

Close

PayPal Accepted