[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4688: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4690: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4691: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4692: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
Poco Forums • View topic - who is setting path for templates and scripts

who is setting path for templates and scripts

Scripting questions and ideas

Moderators: Eric, Tomas, robin, Michael

who is setting path for templates and scripts

Postby ente » Fri Jun 16, 2006 10:50 pm

Of course it is not vital, but I still would like to know why it it like this (and what I would have to do against it:

Even so I have wirtten in the directories settings dialogue

p:\abc\pocomail\templates
and
p:\abc\pocomail\scripts

...the scripts find the templates only when they are copied to

p:\abc\pocomail\mail

I also checked with the ini files for the scripts, but found no way to set a path there either.

Cordially
Götz Perll
ente
Resident Poster
 
Posts: 182
Joined: Mon Sep 27, 2004 7:17 am
Location: Zurich, Switzerland

Postby Michael » Sat Jun 17, 2006 1:32 am

I would suggest using the $scriptpath and $templatepath builtin variables for the paths. I have not had any problem finding the templates when I use these constructs.
Michael
Moderator
 
Posts: 866
Joined: Mon Jul 26, 2004 12:14 pm
Location: Victoria BC, Canada

Postby ente » Sat Jun 17, 2006 2:42 am

Michael wrote:I would suggest using the $scriptpath and $templatepath builtin variables for the paths. I have not had any problem finding the templates when I use these constructs.


Thank you, Michael,

could you please tell where they are and where and how to place them
tnx
ente
Resident Poster
 
Posts: 182
Joined: Mon Sep 27, 2004 7:17 am
Location: Zurich, Switzerland

Postby Michael » Sat Jun 17, 2006 5:47 am

These are builtin variables that you would use in a script, something like:
Code: Select all
AddStrings $File $ScriptPath "myscript.poc"
Michael
Moderator
 
Posts: 866
Joined: Mon Jul 26, 2004 12:14 pm
Location: Victoria BC, Canada

Postby ente » Tue Jun 20, 2006 9:21 am

Michael wrote:These are builtin variables that you would use in a script, something like:
Code: Select all
AddStrings $File $ScriptPath "myscript.poc"


Tnx, Michael,
sorry for being stubborn. Does that mean that I have to put in every script file the line you send me and there, instead of "myscript.poc", I have, when the name of this script is "ABEstrpl.poc", to replace your myscript.poc by this?

Shall I place this line at the beginning or at the end?

Have I somewhere in the script to mention the path?

Is this somewhere described in the pocoscript reference?

Why have I to write this in the script?

Why have I to set the script path in the Tools/Options/directories - what means, in the .ini-File is this path set and the program should know about? An old, a very old bug - then I'm wondering aout this for at least three, even four years?
ente
Resident Poster
 
Posts: 182
Joined: Mon Sep 27, 2004 7:17 am
Location: Zurich, Switzerland

Postby Michael » Tue Jun 20, 2006 3:49 pm

The builtin variables are described in the "Variables" section of the Poco Script reference manual.

As to whether you have to put this in every script, I would think not, only those where you have the need to read files. I don't know what you are using scripts for so it is difficult to say how many. In my instance it would be very few scripts I would need to change.

Also, note that there is a builtin variable that gives you the name of the current script: $PocoScriptName
Michael
Moderator
 
Posts: 866
Joined: Mon Jul 26, 2004 12:14 pm
Location: Victoria BC, Canada


Return to PocoScript Help and How-To

Who is online

Users browsing this forum: No registered users and 2 guests

cron