Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#16 2009-08-06 17:03:57

johnstephens
Plugin Author
From: Woodbridge, VA
Registered: 2008-06-01
Posts: 1,000
Website

Re: Show svnversion in txp:php or txp:variable

Should have turned on Textpattern’s debugging production status.

If I enter this in the terminal within the project directory:

php -r "echo exec(svnversion);"

I get the correct version info.

When I enter this in my template:

<txp:php>echo exec(svnversion);</txp:php>

I get this:

Tag error: <txp:php> ->  Notice: Use of undefined constant svnversion - assumed 'svnversion'  on line 1
textpattern/publish/taghandlers.php:3082 eval()
textpattern/publish.php:1090 php()
textpattern/publish.php:1025 processTags()
textpattern/lib/txplib_misc.php:909 parse()
textpattern/publish.php:1090 splat()
textpattern/publish.php:1012 processTags()
textpattern/lib/txplib_misc.php:1540 parse()
textpattern/publish/taghandlers.php:246 parse_form()
textpattern/publish.php:1090 output_form()
textpattern/publish.php:1012 processTags()

Entering the absolute path to svnversion results in a more terse debug message:

Parse error: syntax error, unexpected '/', expecting ')' in /path/to/textpattern/publish/taghandlers.php(3082) : eval()'d code on line 1

I should stop messing around with this! ;)

Offline

#17 2009-08-06 17:51:16

jm
Plugin Author
From: Missoula, MT
Registered: 2005-11-27
Posts: 1,746
Website

Re: Show svnversion in txp:php or txp:variable

johnstephens wrote:

Tag error: <txp:php> -> Notice: Use of undefined constant svnversion – assumed ‘svnversion’ on line 1

You must quote svnversion (string, not constant or function).

Offline

Board footer

Powered by FluxBB