xoops forums

trabis

Core Developer
Posted on: 2009/8/9 2:30
trabis
trabis (Show more)
Core Developer
Posts: 2268
Since: 2006/9/1 1
#31

Re: PHP-Debugging without XOOPS

Hi, I have made a logger pack with default, pqp and firephp.
http://www.xuups.com/loggerpack.rar

You need to install it over XOOPS 2.4 to take advantage of the query time logging. You can download the beta from SVN:
http://xoops.svn.sourceforge.net/view ... ore/trunk.tar.gz?view=tar

This is done with minimal hack, only class xoopslogger is overwritten. You can choose the logger you want to use in xoops_data/configs.php

Firephp is not fully implemented but, maybe you can merge your smarty work using this new interface. Thanks.

urbanspacema

Quite a regular
Posted on: 2009/8/9 3:18
urbanspacema
urbanspacema (Show more)
Quite a regular
Posts: 276
Since: 2004/9/19
#32

Re: PHP-Debugging without XOOPS

wow pqp is fantastic, tnx Trabis

frankblack

Just can't stay away
Posted on: 2009/8/9 6:40
frankblack
frankblack (Show more)
Just can't stay away
Posts: 830
Since: 2005/6/13
#33

Re: PHP-Debugging without XOOPS

Excellent! So rapidly my litte project started so rapidly it came to an end.

In fact if you need smarty debugging just log $xoopsTpl. Only thing which COULD be added is making a switch for selecting the groups e.g. like I did for all, regs only or admins only.

Thx Trabis

hervet

Friend of XOOPS
Posted on: 2009/8/9 11:35
hervet
hervet (Show more)
Friend of XOOPS
Posts: 2267
Since: 2003/11/4
#34

Re: PHP-Debugging without XOOPS

Quote:

frankblack wrote:
Feels like an accolade to hear this from you. Really! I admire your whole work, so this compliment makes me feel proud.

You should not, you are much more better than me.
Working with good tools is still more pleasant and with this tool it's a real pleasure.

I have always wanted to do a such work for FirePhp and FireBug but never took the time to do it.

I will just permit myself to modify your example like this :
require_once XOOPS_ROOT_PATH.'/Frameworks/FirePHPCore/FirePHP.class.php';
FirePHP::getInstance(true)->log($yourvariable);

it is less readable but it avoid to declare a variable
It's only for the case where you want to see one variable's content.

If the different methods of the XOOPS kernel and classes could chain like this, it will be very useful.

kaotik

Just can't stay away
Posted on: 2009/8/10 9:51
kaotik
kaotik (Show more)
Just can't stay away
Posts: 861
Since: 2004/2/19
#35

Re: PHP-Debugging without XOOPS

Hi frankblack. I understand your frustation with xajax. I used xajax in my modules in the past also.
I've since switched to jquery. It's so much easier to make ajax calls (and so much more)! You will be amazed how much time and effort you can save.
Want to include a php file in a certain <div> when a link is pressed? Here's the jquery code:
<class="ajaxify" href="example.php" target="#container">Click here</a>

So now, when a link with the class (could also be an ID) "ajaxify" is pressed it will load file "example.php" into a target <div> (could be ul,table, etc) with id "container". It's really that simple.
In case your interested, here's the jquery plugin I'm using:
http://maxblog.me/ajaxify/demo.php

kaotik

Just can't stay away
Posted on: 2009/8/10 9:53
kaotik
kaotik (Show more)
Just can't stay away
Posts: 861
Since: 2004/2/19
#36

Re: PHP-Debugging without XOOPS

trabis: nice work with your module. I'm going to try it. I was familiar with pqp but seeing it in XOOPS should very interesting

kaotik

Just can't stay away
Posted on: 2009/8/10 9:57
kaotik
kaotik (Show more)
Just can't stay away
Posts: 861
Since: 2004/2/19
#37

Re: PHP-Debugging without XOOPS

frankblack: another advantage that xajax can't do: history and bookmarking. When a user clicks on the browser back button, he's taken to the previous ajax call. The same with bookmarking.

frankblack

Just can't stay away
Posted on: 2009/8/10 10:28
frankblack
frankblack (Show more)
Just can't stay away
Posts: 830
Since: 2005/6/13
#38

Re: PHP-Debugging without XOOPS

@kaotik: of course I could use jquery, but this would mean to rewrite a lot of functions in my module. So maybe later. Besides when XOOPS becomes XHTML strict in a day far in the future (still even not XHTML transitional), we have to remove the target attribute which is now used with ajaxify.

About history and bookmarking: there are workarounds for that if I remember correctly.

urbanspacema

Quite a regular
Posted on: 2009/8/10 18:28
urbanspacema
urbanspacema (Show more)
Quite a regular
Posts: 276
Since: 2004/9/19
#39

Re: PHP-Debugging without XOOPS

be careful because this hack stop jQuery in the new Oxygen control panel. (tested on FF)

kaotik

Just can't stay away
Posted on: 2009/8/11 9:57
kaotik
kaotik (Show more)
Just can't stay away
Posts: 861
Since: 2004/2/19
#40

Re: PHP-Debugging without XOOPS

Thanks for the heads up. Have you identified the conflict?
I'll investigate. If it still doesn't work I'll just do my ajax calls directly from jquery