Forums / Addon Admin Tools / Superglobals Plus

Superglobals Plus

Views: 22,680

Results 21 to 40 of 107
3 Sep 2011, 2:26 PM
#21
torvista avatar

torvista

Totally Zenned

Join Date:
Aug 2007
Location:
Gijón, Asturias, Spain
Posts:
2,876
Plugin Contributions:
7

Superglobals Plus

Is there a reason why there is an extra constant used in the admin side?

In
admin
/includes/functions/extra_functions/superglobals.php

there is this constant defined:

define('SHOW_SUPERGLOBALS_FROM_ADMIN', TRUE);

this is only used in the main function in
catalog
includes\functions\extra_functions\superglobals.php

if (defined('SHOW_SUPERGLOBALS_FROM_ADMIN')){
  // the script is being called from the admin
  if((SHOW_SUPERGLOBALS_ADMIN == 'true').......
```SHOW_SUPERGLOBALS_ADMIN is the constant used in the administration page. Why not just use that one and remove the overall "if"?

Steve
github.com/torvista: BackupMySQL, Structured Data, Multiple Copy-Move-Delete, Google reCaptcha, Image Checker, Spanish Language Pack and more...

5 Sep 2011, 9:06 AM
#22
paulm avatar

paulm

Totally Zenned

Join Date:
Nov 2003
Posts:
1,878
Plugin Contributions:
5

Re: Superglobals Plus

Hi torvista,

the same function is used for both the admin and catalog side, and the defined('SHOW_SUPERGLOBALS_FROM_ADMIN') check is to determine if the funtion is called from the admin or catalogue. The SHOW_SUPERGLOBALS_ADMIN definition however is used to enable or disable the superglobals script depending on the admin configuration setting.

If only the value of SHOW_SUPERGLOBALS_ADMIN is used, the superglobals script will be enabled for both the admin and catalog if SHOW_SUPERGLOBALS_ADMIN is True.

(I am not sure though why I haven't used the existing IS_ADMIN_FLAG definition for this, maybe to make it fully independent of Zen Cart.)

8 Sep 2011, 1:51 PM
#23
paulm avatar

paulm

Totally Zenned

Join Date:
Nov 2003
Posts:
1,878
Plugin Contributions:
5

Re: Superglobals Plus

Update:

  • Display superglobals in popup window.

  • CSS only loads if required.

For now zip attached to this post.

9 Sep 2011, 12:40 PM
#24
dw08gm avatar

dw08gm

Totally Zenned

Join Date:
Sep 2008
Location:
DownUnder, overlooking South Pole.
Posts:
1,018
Plugin Contributions:
2

Re: Superglobals Plus

Can SGP1.31 be used with 139h.

Thanks in advance

9 Sep 2011, 1:02 PM
#25
paulm avatar

paulm

Totally Zenned

Join Date:
Nov 2003
Posts:
1,878
Plugin Contributions:
5

Re: Superglobals Plus

Yes, it's compatible with all 1.3.9 versions (and 1.5.0., lat9 has included instructions for both).

10 Sep 2011, 1:27 PM
#26
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,119
Plugin Contributions:
56

Re: Superglobals Plus

paulm:

Update:

  • Display superglobals in popup window.

Nice! That makes it much easier to go back and forth between the variables that are "in play" and the rendered result.

11 Sep 2011, 12:50 PM
#27
paulm avatar

paulm

Totally Zenned

Join Date:
Nov 2003
Posts:
1,878
Plugin Contributions:
5

Re: Superglobals Plus

lat9:

Nice! That makes it much easier to go back and forth between the variables that are "in play" and the rendered result.Thanks for the feedback, I like the popup output much better too (but couldn't find the English words to describe those advantages).

12 Sep 2011, 2:12 PM
#28
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,119
Plugin Contributions:
56

Re: Superglobals Plus

Superglobals Plus v1.4 has been submitted to "Free Software Add-ons". That version includes the popup window feature that paulm previously posted.

13 Oct 2012, 5:08 PM
#29
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,119
Plugin Contributions:
56

Re: Superglobals Plus

Super Globals Plus v1.4.1 has been submitted to the Plugins area. This version updates the htmlentities calls to ensure PHP 5.4 compliance and corrects a couple of HTML validation issues.

24 Nov 2012, 4:02 PM
#30
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,119
Plugin Contributions:
56

Re: Superglobals Plus

Super Globals Plus v1.4.2 has been submitted to the Plugins area:

  • Updated installation SQL files to correct problem documented by swguy here
  • Added new configuration value for v1.5.0 and later SQL values to control whether or not the *queryCache *object is shown. This object can be **huge **and takes a while to process. Changes made to the superglobals.sql file as well as /includes/functions/extra_functions/superglobals.php. Note that the *queryCache *object was introduced in Zen Cart v1.5.1; changing this configuration value on a v1.5.0 installation will have no effect.
16 Jan 2013, 6:00 PM
#31
torvista avatar

torvista

Totally Zenned

Join Date:
Aug 2007
Location:
Gijón, Asturias, Spain
Posts:
2,876
Plugin Contributions:
7

Re: Superglobals Plus

This object can be **huge **and takes a while to process.
Yes, my local development server can't deal with superglobals showing this...times out. The query cache filter is most welcome, thanks for the update.

Steve
github.com/torvista: BackupMySQL, Structured Data, Multiple Copy-Move-Delete, Google reCaptcha, Image Checker, Spanish Language Pack and more...

23 Jan 2013, 5:19 PM
#32
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,119
Plugin Contributions:
56

Re: Superglobals Plus

Grrr, I got bit by the :censored: PHP feechur documented here: https://bugs.php.net/bug.php?id=39579. I was wondering why, all of a sudden, array index 0 wasn't being output by superglobals. The fix is to use the === operator on line 139 of /includes/functions/extra_functions/superglobals.php:

        if ( !$showQueryCache && $key === 'queryCache' ) continue;  /*v1.4.3-c-lat9*/

I'll be submitting this update to the plugins area shortly.

27 Feb 2013, 1:16 PM
#33
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,119
Plugin Contributions:
56

Re: Superglobals Plus

v1.4.4 has been submitted to the plugins area, containing a couple of cleanups:

  1. Corrected validation errors (empty <strong> tags and popup display) — torvista
  2. Added "future proofing" around call to mysql_fetch_array call (deprecated in PHP 5.5) — lat9
27 Feb 2013, 1:30 PM
#34
design75 avatar

design75

Totally Zenned

Join Date:
Dec 2009
Location:
Amersfoort, The Netherlands
Posts:
2,862
Plugin Contributions:
5

Re: Superglobals Plus

:thumbsup: I started using this tool a while ago and I must say it is just wonderful. It really enhanced my understanding of Zen Cart, and is very helpful in finding certain settings in cookies and other variables.

30 Nov 2013, 7:11 PM
#35
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,119
Plugin Contributions:
56

Re: Superglobals Plus

v1.5.0 has been submitted to the plugins area (http://www.zen-cart.com/downloads.php?do=file&id=524), containing downwardly-compatible Zen Cart v1.5.2 changes in the /YOUR_ADMIN_OPTIONAL directory.

8 Jun 2014, 3:56 PM
#36
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,119
Plugin Contributions:
56

Re: Superglobals Plus

v1.6 of this plugin has been submitted:

  • BUGFIX: SQL uninstall scripts need to account for cgi of 0.
  • Zen Cart v1.5.3 compatability changes
  • Incorporate database update into PHP script (no more SQL patch for installation)
  • Added configuration value to allow entry of a list of variables to be excluded from the superglobals display
  • Incorporate previous admin-optional changes into the mainline, simplifying the installation
15 Oct 2014, 2:56 PM
#37
delia avatar

delia

Totally Zenned

Join Date:
May 2006
Location:
Gardiner, Maine
Posts:
2,383
Plugin Contributions:
7

Re: Superglobals Plus

I have it installed but when adding to the shopping cart it only displays Array () and doesn't change no matter what the admin settings are. No popup. No ipaddress only. Working fine in admin. The catalog files are all in the right place. I've done this before with no issue. Have no clue what might be going on but it's not my server. Is any of this dependent on server settings?

The full-time Zen Cart Guru. WizTech4ZC.com
New template for 2.0 viewable here: 2.0 Demo

15 Oct 2014, 8:31 PM
#38
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,119
Plugin Contributions:
56

Re: Superglobals Plus

delia:

I have it installed but when adding to the shopping cart it only displays Array () and doesn't change no matter what the admin settings are. No popup. No ipaddress only. Working fine in admin. The catalog files are all in the right place. I've done this before with no issue. Have no clue what might be going on but it's not my server. Is any of this dependent on server settings?
There are no server-setting dependencies. When you say "**it **only displays Array ()", what is it?

15 Oct 2014, 8:37 PM
#39
delia avatar

delia

Totally Zenned

Join Date:
May 2006
Location:
Gardiner, Maine
Posts:
2,383
Plugin Contributions:
7

Re: Superglobals Plus

at the bottom of the page when looking at the website. It displays normally in admin with the styling and everything.

You can see it here: http://www.picpads.com/dev/index.php?main_page=index&cPath=8

The full-time Zen Cart Guru. WizTech4ZC.com
New template for 2.0 viewable here: 2.0 Demo

15 Oct 2014, 8:54 PM
#40
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,119
Plugin Contributions:
56

Re: Superglobals Plus

Looking at the source of the page link, there's no

<!--bof- superglobals display -->

before the Array () output. Since the admin is working properly, the configuration settings are OK and /includes/functions/extra_functions/superglobals.php is in place. I suggest that you re-examine the code merge made to /includes/templates/YOUR_TEMPLATE/common/tpl_main_page.php.