This topic is locked

Smarty debug console

3/2/2009 2:19:19 PM
PHPRunner General questions
K
kinho author

Hi All,
Question: How can I get a $Smarty debug console?

  1. I have: set $dDebug variable in include/dbcommon.php file to true;
  2. I add the line: $smarty->debugging = TRUE; at the end of a ListOnLoad code_snippet
    When I run the generated page, I got a PHP error
    quote

    PHP error happenedTechnical information

    Error type 8

    Error description Undefined variable: _debug_start_time

    URL localhost/DemoN/jobs1/output/jobsjobs_list.php?

    Error file C:\DemoN\Jobs1\output\oldlibs\Smarty.class5.php

    Error line 1311

    SQL query select jobsjobs.ID, jobsjobs.Company, jobsjobs.Title, jobsjobs.TypeID, jobsjobs.Description, jobsjobs.HowToApply, jobsjobs.Zip, jobsjobs.City, jobsjobs.`state`, jobsjobs.Country, jobsjobs.Website, jobsjobs.LogoURL, jobsjobs.DateAdded, jobsjobs.Title AS Job, concat(jobsjobs.City, ', ', jobsjobs.`state`, ' ', jobsjobs.Zip) AS Location, jobsjobtype.`Type` AS Category FROM jobsjobs LEFT OUTER JOIN jobsjobtype ON jobsjobs.TypeID = jobsjobtype.ID

    unquote
    What have I done wrong and/or missing in getting the 'Smarty debugging console'?
    Thanks in advance,

Admin 3/2/2009

PHPRunner doesn't support Smarty debugging console but you can do this on your own.

  1. Build your project
  2. Download Smarty from smart.net and extract all files from libs\plugins to <output directory>\oldlibs\plugins.
  3. Add $smarty->debugging=true; somewhere in your code
    Here is the example of how it works.

    http://demo.asprunner.net/kornilov_gmail_c...bsjobs_list.php

K
kinho author 3/2/2009

Hi Sergey,
Brilliant!
I can see the debug console, and a bunch of variables that I am hoping to get a better understanding of the process.
Thanks and regards,

Kin

K
kinho author 3/3/2009

>>> 2. Download Smarty from smart.net and extract all files from libs\plugins to <output directory>\oldlibs\plugins.
Hi Sergey,
It sounds crazy. I have the <output>/oldlibs/plugins in the example template projects.

I test CARS/NEWs projects, and the smarty console come up with the variables.
However, I don't see the <output>/oldlibs/plugins from my own test projects.

The smarty won't show even after I copy the old/libs/plugins fromt he template projects.
Any suggestions?
Thanks,

Kin

Admin 3/3/2009

Kin,
we stopped using Smarty for new projects in PHPRunner 5.0. You'll see Smarty references only if you create a project from template or open project created by older version of PHPRunner.
PHPRunner 5.1 drops Smarty all together.
You can learn more about PHPRunner templates at http://www.xlinesoft.com/phprunner/docs/smarty_templates.htm

K
kinho author 3/3/2009

>> PHPRunner 5.1 drops Smarty all together.
Hi Sergey,
Thanks for the headup. I guess it is better off to concentrate on the '$xt - template processor object' now.

Based on the 5.1 preview, I like the new features such as menu, time slot picker.
Have a great week,

Kin