Does not work - IF-ELSE-ENDIF skin!

Algol

New member
Joined
Oct 4, 2013
Messages
4
Hello,

Required for scripts IF in /skins/enhanced/user/filemanager/edit.html or /skins/enhanced/header.html

I've tried:

|$/usr/local/bin/php
<?php
$domain="|DOMAIN|";
if($domain=="domain.com"){echo 'ok';}

echo "Document root is: ".getenv("DOCUMENT_ROOT");

?>
DONE|

OR:

|*if DOMAIN|
<a href="http://|DOMAIN|">Link to |DOMAIN|</a>
|*else|
Sorry, no domain to click
|*endif|


Does not work!
 

Algol

New member
Joined
Oct 4, 2013
Messages
4
Does not work

Hello,

Is the |DOMAIN| token being passed via GET? If not, it won't be set.
It might also be set as |domain| rather than |DOMAIN|

To see all tokens that are available on a given page, add this token for testing:
|DUMPTOKENS|

http://www.directadmin.com/features.php?id=623

John
John, thanks for the reply. But it does not work (

http://IP:2222/CMD_FILE_MANAGER?DOMAIN=domain.com or http://IP:2222/CMD_FILE_MANAGER?domain=domain.com

in /skins/enhanced/header.html

|*if DOMAIN|
<a href="http://|DOMAIN|">Link to |domain|</a>
|*else|
Sorry, no domain to click
|*endif|

|*if DOMAIN|
<a href="http://|DOMAIN|">Link to |domain|</a>
|*else|
Sorry, no domain to click
|*endif|

Does not work.
Only in the file manager does not work.

I would $_GET any parameter passed to.
 

Algol

New member
Joined
Oct 4, 2013
Messages
4
Сorrection

Сorrection

|*if DOMAIN|
<a href="http://|DOMAIN|">Link to |domain|</a>
|*else|
Sorry, no domain to click
|*endif|

|*if domain|
<a href="http://|domain|">Link to |domain|</a>
|*else|
Sorry, no domain to click
|*endif|
 

DirectAdmin Support

Administrator
Staff member
Joined
Feb 27, 2003
Messages
8,919
Sorry, I didn't notice your mention of the file manager in your first post.
Because the Filemanager is chrooted, it will be the exception to the rule.
The skins are all pre-parsed with the FileManager because once chrooted, the scripts in the skins cannot access their parsers (Eg: it would be looking /home/user/usr/local/bin/php, thus this doesn't work).

I'm guessing this code works everywhere else but the Filemanager.. so if that's the case, unfortunately it won't work in the FM.

John
 

Algol

New member
Joined
Oct 4, 2013
Messages
4
Sorry, I didn't notice your mention of the file manager in your first post.
Because the Filemanager is chrooted, it will be the exception to the rule.
The skins are all pre-parsed with the FileManager because once chrooted, the scripts in the skins cannot access their parsers (Eg: it would be looking /home/user/usr/local/bin/php, thus this doesn't work).

I'm guessing this code works everywhere else but the Filemanager.. so if that's the case, unfortunately it won't work in the FM.

John
Is no way not to give any information to $_GET or $_POST? :(

The fact is that if we go http://IP:2222/CMD_FILE_MANAGER?TESTFUNCTION=TTTTTTT

in /skins/enhanced/header.html

|TESTFUNCTION|

Activated, displays TTTTTTT

And if:

|*if TESTFUNCTION|
<a href="http://|DOMAIN|">Link to |domain|</a>
|*else|
Sorry, no domain to click
|*endif|

Does not work :(
 
Top