31
trabis
Re: PHP-Debugging without XOOPS
  • 2009/8/9 2:30

  • trabis

  • Core Developer

  • Posts: 2269

  • Since: 2006/9/1 1


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/viewvc/xoops/XoopsCore/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.

32
urbanspacema
Re: PHP-Debugging without XOOPS

wow pqp is fantastic, tnx Trabis

33
frankblack
Re: PHP-Debugging without XOOPS
  • 2009/8/9 6:40

  • frankblack

  • Just can't stay away

  • Posts: 830

  • Since: 2005/6/13


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

34
hervet
Re: PHP-Debugging without XOOPS
  • 2009/8/9 11:35

  • hervet

  • Friend of XOOPS

  • Posts: 2267

  • Since: 2003/11/4


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.

35
kaotik
Re: PHP-Debugging without XOOPS
  • 2009/8/10 9:51

  • kaotik

  • Just can't stay away

  • Posts: 861

  • Since: 2004/2/19


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
when a link is pressed? Here's the jquery code:
<class="ajaxify" href="example.php" target="#container">Click herea>

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
(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

36
kaotik
Re: PHP-Debugging without XOOPS
  • 2009/8/10 9:53

  • kaotik

  • Just can't stay away

  • Posts: 861

  • Since: 2004/2/19


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

37
kaotik
Re: PHP-Debugging without XOOPS
  • 2009/8/10 9:57

  • kaotik

  • Just can't stay away

  • Posts: 861

  • Since: 2004/2/19


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.

38
frankblack
Re: PHP-Debugging without XOOPS
  • 2009/8/10 10:28

  • frankblack

  • Just can't stay away

  • Posts: 830

  • Since: 2005/6/13


@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.

39
urbanspacema
Re: PHP-Debugging without XOOPS

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

40
kaotik
Re: PHP-Debugging without XOOPS
  • 2009/8/11 9:57

  • kaotik

  • Just can't stay away

  • Posts: 861

  • Since: 2004/2/19


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

Login

Who's Online

390 user(s) are online (289 user(s) are browsing Support Forums)


Members: 0


Guests: 390


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits