Paulm, we were talking about the Return Auth mod, not this one![]()
Paulm, we were talking about the Return Auth mod, not this one![]()
I no longer provide installation support on forum for all my modules. However, if there are real bugs with the modules please feel free to contact me
paulm, thank you for this excellent tool! I have installed it and it is already helping me learn more about Zen Cart. It works with version 1.3.8.
I would like to suggest some improvement to the readme.txt in the package available for download. I believe that it is slightly clearer and may actually eliminate the need for the second readme.txt in extras subdirectory.
Here goes (only for the Zen Cart catalog section - I haven't tried the admin yet)...
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Installation (Zen Cart catalog):
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
1) Backup your files and the database (as always).
2) Copy the contents of the superglobals.sql file into the textbox of the sql patch tool in the Zen Cart admin/tools/ section
(do not use the sql upload feature, that usually does not work well).
If the Zen Cart sql tool returns errors, it's usually caused by its bugs. In that case use phpMyAdmin for example (don't forget to add your table prefixes if any!).
3) Copy the file superglobals.php
from: superglobals-plus_v1.24\catalog\includes\functions\extra_functions\
to your shop's: \includes\functions\extra_functions\
4) Copy the file stylesheet_superglobals.css to your catalog template css directory:
includes\templates\<YOUR TEMPLATE>\css\
5) Copy the file
from: includes\templates\template_default\common
to: includes/templates/<YOUR TEMPLATE>/common/
(if the subdirectory 'common' doesn't exist under <YOUR TEMPLATE>, create it)
TOpen the tpl_main_page.php file and, just before the ending </body> tag, add:
6) Open the file admin/includes/footer.php and, just before the ending </body> tag, add:PHP Code:
<!--bof- superglobals display -->
<?php
// BEGIN Superglobals
if(SHOW_SUPERGLOBALS == 'true') echo superglobals_echo();
// END Superglobals
?>
<!--eof- superglobals display -->
7) ReadyPHP Code:
<!--bof- superglobals display -->
<?php
// BEGIN Superglobals
if(SHOW_SUPERGLOBALS_ADMIN == 'true') echo superglobals_echo();
// END Superglobals
?>
<!--eof- superglobals display -->
(or ready to install the admin version if you like).
One thing that seems to be missing in this excellent utility (SuperGlobals Plus) is a legend describing the meaning of the text colors. At first, I thought that red/green was referring to the lifetime of the objects, but now I think that the colors simply describe the type of the objects:
GREEN: array, string, integer, boolean, etc. (PHP built-in types).
RED: object (class instance)
BLUE: resource (handle, mysql link, result, etc.)
GREY: superglobals message
Please correct if I am mistaken.
Daniel
Hi Daniel,
thanks for the readme update
The coloring is probably not very logical. I just quickly added some colors at the time to make it a bit easyer to read.
Not all types have specific colors, and the colors are inherited. So, for example, because $GLOBALS is an array (colored green by the css) all childs of $GLOBALS will become green, unless another color has been assigned to the child. Objects are colored red, and all it's childs (that do not have a specific color assigned) will be red too.
You can see in the stylesheet how it's done:
Code:#superglobals .superglobals_array { border-left-color: green; color: green; } #superglobals .superglobals_object { border-left-color: red; color: red; } #superglobals .superglobals_empty { color: gray; } .superglobals_resource { color: blue; } .superglobals_type { color: black; }
A small improvement might be to add a border at the bottom of each list (ul). I think that makes it a bit easier to see to what parent the childs belong.
Change:
ToCode:#superglobals ul { border: 1px solid black; border-width: 0 0 0px 1px; border-left-color: black; }
Or maybe even turn the ul's into boxes, like this:Code:#superglobals ul { border: 1px solid black; border-width: 0 0 1px 1px; border-left-color: black; }
(now I look at it I wonder why I have not done it like this in the first place...)Code:#superglobals ul { border: 1px solid black; border-width: 1px; border-left-color: black; }
Last edited by paulm; 22 Aug 2008 at 12:12 PM.
You are very welcome but really, thank YOU for this great contribution. What I did is negligible comparing to your work.
BTW, I discovered a typo in my readme update: I mistakenly omitted the filename in step 5. Instead of: "5) Copy the file ", it should read: "5) Copy the file tpl_main_page.php"
And thank you for the clarification regarding the text coloring.
Daniel
Anyone using this most helpful add-on for ZC 1.38a admin should note that there's another change required for full function. In \YOURADMIN\index.php, make the following change (after saving the file!) near the very end of the file:
Code:</div> <!--bof- superglobals display --> <?php // BEGIN Superglobals if(SHOW_SUPERGLOBALS_ADMIN == 'true') echo superglobals_echo(); // END Superglobals ?> <!--eof- superglobals display --> </body> </html>
I just submitted the update for this great debug tool to the "Free Software Add-ons" so that it is usable under 1.5.0.
The update is now available from the "Free Software Add-ons".
Thanks, paulm, I didn't know you were still "around". This is the first add-on that gets installed on any of my Zen Cart installations!
Bookmarks